Home
Nios II Development Kit Getting Started User Guide
Contents
1. SOPC Builder System C altera kits nios2 examples verilog niosII_cyclonell_2c35 ste_v CPU cpu Select Project Template Blank Project Board Diagnostics Custom Instruction Tutorial Count Binary Dhrystone Hello Freestanding Hello LED Hello PERE Hello World Small Memory Test Simple Socket Server Tightly_Coupled_Memories Description Simple program that prints Hello from Nios IT Details stream This example runs on the Nios II standard runs with or without the MicroC OS II RTOS and pr Browse El This example prints Hello from Nios Il to the STDOUT full_featured fast and low_cost example designs It requires a STDOUT device in your system s hardware Next gt Cancel 2 Select Hello World in the Select Project Template list 3 Click Finish to create the project named hello_world_0 This process also creates a system library project named hello_world_0_syslib 4 Inthe C C Projects view on the left right click the hello_world_0 project and choose Build Project When the build finishes the Console view at the bottom of the workbench displays the message Build completed If the Console view is not visible click the Console tab 1 12 Nios Il Development Kit Getting Started User Guide Altera Corporation May 2005 Getting Started Downloading Executable Code to the Nios Development Board From the Nios II IDE perform th
2. Follow the on screen instructions and prompts To create new Nios II hardware designs you must first obtain a Nios II processor core license Visit the Altera licensing page at www altera com licensing and click the hyperlink for the appropriate Nios development kit The Nios II IDE and the software tool chain do not require a license Therefore you do not need a license if you will only develop software for the Nios II processor The MegaCore IP Library CD ROM If you own the Nios Development Board Cyclone II Edition and you want to create new hardware designs that take advantage of the DDR SDRAM chip on the board you must also install the MegaCore IP Library This CD ROM installs a library of ready made intellectual 1 4 Altera Corporation Nios Il Development Kit Getting Started User Guide May 2005 Getting Started The Nios Development Board Altera Corporation May 2005 property IP cores that are optimized for Altera devices and includes a DDR2 SDRAM controller Without the MegaCore IP Library you cannot build SOPC Builder systems that interface with DDR SDRAM 2 The license for the Nios Development Kit Cyclone II Edition includes a license for the DDR2 SDRAM Controller MegaCore The other cores in the MegaCore IP Library are fully functional for evaluation but have a timeout feature You must purchase a full license to ship a product that includes any other MegaCores View the readme txt file at the top level o
3. Nios II Nios ll Development Kit Getting Started User Guide A DTE RA 101 Innovation Drive San Jose CA 95134 408 544 7000 http www altera com P25 10108 03 Copyright O 2005 Altera Corporation All rights reserved Altera The Programmable Solutions Company the stylized Altera logo specific device des ignations and all other words and logos that are identified as trademarks and or service marks are unless noted otherwise the trademarks and service marks of Altera Corporation in the U S and other countries All other product or service names are the property of their respective holders Al tera products are protected under numerous U S and foreign patents and pending applications maskwork rights and copyrights Altera warrants performance of its semiconductor products to current specifications in accordance with Altera s standard warranty but reserves the right to make changes to any products and services at any time without notice Altera assumes no responsibility or liability arising out of the ap hsal plication or use of any information product or service described herein except as expressly agreed to in writing by Altera _ Corporation Altera customers are advised to obtain the latest version of device specifications before relying on any published in formation and before placing orders for products or services 4 DI Printed on recycled paper UG NIOSIIDEVKIT 2 0 i EN ISO 9001 ii Altera Corporation NOTE RYN Co
4. ard perform the following steps 1 Remove the Nios development board from its anti static shipping bag Take care not to expose the board to electrostatic discharge ESD during setup or use 2 Place the board legs down on a flat surface Orient the board as shown in Figure 1 1 with the dual 7 segment LEDs U8 and U9 closest to you 3 Connect the LCD module ribbon cable to connector J12 as shown in Figure 1 1 on page 1 6 gt Be sure to connect pin 1 on the LCD module to pin 1 of J12 by aligning the triangular marks on the ribbon cable header with the locations of pin 1 on the LCD module and the J12 header You can identify pin 1 by its square solder pad on the bottom of the board 1 6 Altera Corporation Nios Il Development Kit Getting Started User Guide May 2005 Getting Started Altera Corporation May 2005 Connecting the LCD module to any other connector will damage the LCD module Do not mistake J12 with the similar J15 at the bottom edge of the board CAUTION 4 Remove the CompactFlash card from the CompactFlash socket on the back of the board IS The LCD screen will not function if a CompactFlash card is seated in the CompactFlash socket 5 Connect the DC power supply to connector J26 as shown in Figure 1 1 on page 1 13 Select the appropriate power cord for your geographic region Connect one end to the DC power supply and the other end to a power outlet Verifying Correct Operation of the Nios Develop
5. e 2 Set up and verify correct operation of the Nios development board 3 Establish communication between the Nios development board and the host PC 4 Compile C code and download the code to the Nios development board When you finish this guide you will be ready to begin designing custom Nios II embedded processor systems Before proceeding check the contents of the kit and verify that you received the following items Nios Development Board and Accessories Nios development board CompactFlash card socketed in the Nios development board USB Blaster download cable Ethernet cable Ethernet cross over adapter LCD module 9 pin RS 232 serial cable DC power supply Three regional power cables Before You Begin 1 2 Development Tools Included in the kit is a CD ROM folder containing the following E Nios II Embedded Processor for Windows CD ROM E Nios II Embedded Processor for Linux CD ROM M Quartus II Design Software for PCs CD ROM E MegaCore IP Library for Windows and Linux CD ROM See www altera com for available evaluation software by third party Nios IT Development Partners Documentation M This Nios II Development Kit Getting Started User Guide M Quartus II Installation amp Licensing for PCs manual Licensing Considerations You need your computer s network identification card NIC ID to license the development tools The NIC ID is a 12 digit hexadecimal number that identifies your comp
6. e following steps to download executable code and run it on the board 1 Choose Run Run menu The Run window opens 2 Select Nios II Hardware in the Configurations list 3 Click New 4 Click the Target Connection tab 5 From the JTAG Cable list select USB Blaster In a moment the Run button becomes active See Figure 1 4 Figure 1 4 Run Window in the Nios Il IDE Create manage and run configurations W Configurations Name hello_world_0 Nios II HW configuration FA Nios II Hardware pia hello_world_0 Nios II F Nios IT Instruction Set Sim El Main AL Target Connection 188 Debugger l E Source l L Common Nios 11 Modelsim Help F Mios Il Multiprocessor Colle JTAG cable a Refresh JTAG device automatic lt the device which has the processor gt X Refresh Nios II Terminal communication device jtag_uart lt stdin stdout stderr gt Si Host COM port TEEN Delete Apply Revert Altera Corporation 1 13 May 2005 Nios Il Development Kit Getting Started User Guide Starting the Nios Il Development Tools 6 Click Run at the bottom of the window The hello_world_0 software image downloads to the Nios development board and begins running Hello from Nios II appears in the Console view of the Nios II IDE See Figure 1 5 If the Console view is not visible click on the Console tab to bring it to the foreground Figure 1 5 Hello World in the Ni
7. f the CD ROM for instructions on installing the MegaCore IP Library For further information on the DDR SDRAM controller see the Altera DDR DDR2 SDRAM Controller Compiler User Guide The Nios development board will be your steady companion through much of your development effort with the Nios II processor Hardware designers can use the Nios development board as a platform to prototype complex embedded systems Software developers can use the Nios II reference design preprogrammed on the development board to begin prototyping software immediately The Nios development board comes pre configured with a Nios II processor hardware reference design and a software reference design stored in flash memory For complete details on the Nios development board refer to the appropriate Nios Development Board Reference Manual Setting Up the Nios Development Board First you will set up the Nios development board The Nios development board will show activity to verify that it is alive and functioning correctly Figure 1 1 shows a Nios Development Board Cyclone II Edition with the power cable LCD module and USB Blaster cable attached For all Nios development boards the relative location and orientation of the cables is the same 1 5 Nios Il Development Kit Getting Started User Guide The Nios Development Board Figure 1 1 Nios Development Board with Power LCD amp USB Blaster Connections To set up the Nios development bo
8. in a list of items when the sequence of the items is not important Y The checkmark indicates a procedure that consists of one step only La The hand points to information that requires special attention The caution indicates required information that needs special consideration and Aa understanding and should be read prior to starting or continuing with the procedure or process n The warning indicates information that should be read prior to starting or continuing the procedure or processes Lu The angled arrow indicates you should press the Enter key The feet direct you to more information on a particular topic Altera Corporation vii Typographic Conventions Nios Il Development Kit Getting Started User Guide viii Altera Corporation N D TE PYA Getting Started Introduction Before You Begin Altera Corporation May 2005 Welcome to the Nios II development kit The Nios II development kit is a complete embedded systems development kit for the Nios II embedded processor In addition to the full featured Nios development board the kit includes all the hardware and software development tools documentation and accessories you need to begin developing Nios II embedded processor systems This user guide will familiarize you with the contents of the Nios II development kit and walk you through setting up your Nios II development environment In this guide you will 1 Install the development tools softwar
9. ment Board You will see activity on the board after applying power As soon as you apply power to the Nios development board the Altera FPGA is configured with a Nios II processor hardware reference design Once the FPGA configuration is complete the Nios II processor in the FPGA wakes up initializes itself with boot code from flash memory and displays Nios II on the LCD for 10 seconds followed by scrolling instructions for a web server demo You can connect the board to an Ethernet network and view web pages served from the web server reference design Verify the following indicators of a properly functioning Nios development board The LED labeled Power is on The LED labeled Safe or Factory is on The LCD displays Nios II The two 7 segment LEDs are active displaying a spinning pattern The LEDs DO D7 are active displaying a bouncing pattern If you are not the first user of your Nios development board the board may no longer contain the original factory image programmed in flash memory In this case you will not see the same indicators noted above The LED labeled User might be on or flashing indicating that the development board is programmed with another designer s user image If you want to reprogram your board to its factory default condition refer to the appropriate Nios Development Board Reference Manual 1 7 Nios Il Development Kit Getting Started User Guide Establishing Board to PC C
10. ment Kit Getting Started User Guide iv Altera Corporation N D TE RYN About This User Guide This getting started user guide provides initial information about how to use the Altera Nios II development kit including unpacking the kit installing required software connecting the Nios development board to a PC and running sample software Table 1 1 shows this document s revision history Refer to the Nios II embedded processor readme file for late breaking information that is not available in this document Table 1 1 Tutorial Revision History Date Description May 2005 Updates for the Nios Il version 5 0 release December 2004 Updates for the Nios Il development kit version 1 1 September 2004 Updates for the Nios ll development kit version 1 01 May 2004 Initial publication for the Nios Il development kit version 1 0 How to Find M The Adobe Acrobat Find feature allows you to search the contents of a PDF file Click the binoculars toolbar icon to open the Find dialog Information box E Bookmarks serve as an additional table of contents M Thumbnail icons which provide miniature previews of each page provide a link to the pages E Numerous links shown in green text allow you to jump to related information Altera Corporation v How to Contact Altera Nios Il Development Kit Getting Started User Guide How to Contact Altera For the most up to date information abo
11. ntents About This User Guid cocida V How to Find Information none nonnnonanonn nro nr on rn nn nr nn nr sense v How to Contact Altera i Typographic Conventions uiuiilcni le vi Getting IP A A o A ei aeoteaweeccesetins 1 Introduccion rara S Before Yo Begin i iaia Nios Development Board and Accessories Development Tools uin Documentation A A es he oe Licensing Considerations vcd eni Quartus II System Requirements Installing the Development Tools The Quartus II Design Software CD ROM The Nios Il Embedded Processor CD ROM i 14 The MegaCore IP Library CD ROM scr ti 14 The Nios Development Board Setting Up the Nios Development Board mnocenconencononennonennennrnononnncarannannennnneranernnnernnnarnerannerannerannes 15 Verifying Correct Operation of the Nios Development Board n 1 7 Establishing Board to PC Communication ss 1 8 Connecting the USB Blaster Download Cable ss 1 8 Starting the Nios II Development Tools Starting the Quartus M Software Downloading a Hardware Image to the FPGA ss Starting the Nios II IDE from SOPC Builder Building a First Software Project cccccessesseseeseseseseeessseeseseseseeeenseees Downloading Executable Code to the Nios Development Board Taking the Next Step iii Documentation Library iii itin raire Altera Corporation Contents Nios Il Develop
12. ommunication Establishing Board to PC Communication Starting the Nios Il Development Tools 1 8 If this is the first time you are applying power to the Nios development board and you do not see the indicators above check all the connections and make sure that power is supplied to the board properly For further assistance visit Altera s online technical support web site at mysupport altera com In this section you will connect the Nios development board to your PC via a USB cable to establish communication with the development board Connecting the USB Blaster Download Cable Connect your USB Blaster download cable to the Nios development board as instructed below 1 Remove power from the Nios development board by disconnecting the power cable 2 Connect one end of the USB cable to the USB port on your PC Connect the other end to the USB Blaster download cable 3 Connect the USB Blaster download cable to the 10 pin header J24 on the Nios development board so that it extends upward away from you See Figure 1 1 on page 1 6 4 Re apply power to the Nios development board 5 Install the USB Blaster driver on the host computer For Windows PCs the driver is located in the directory lt Quartus II install path gt drivers usb blaster For Linux PCs see the file readme txt on the installation CD ROM For details on installing the USB Blaster driver for Windows see the USB Blaster Download Cable User Guide at ww
13. orial available within the Nios II IDE These tutorials introduce you to the development process for the Nios II embedded processor Each tutorial uses the Nios development board as a demonstration platform and walks you step by step through the process of creating hardware and software for Nios Il embedded processor systems For complete documentation on the Nios II processor open the file lt Nios II kit path gt documents index htm For details on the Nios II IDE launch the IDE and see the Nios II IDE help system 1 15 Nios Il Development Kit Getting Started User Guide Documentation Library 1 16 Altera Corporation Nios Il Development Kit Getting Started User Guide May 2005
14. os Il IDE Console View C C hello_world c Nios II IDE File Edit Navigate Search Run Project Tools Window Help ri gt m 3 0 Q 89 E cc 3 0 PO O hello_worid c ES A BE outline ES Bl Welcome 3 Eg ak v o a s 5 reduced fobtpr sas aw ov E hello_world_0 cues ie see mera Welcome to the Altera 66 125 hello_world _0_sysib std 4 main Nios II IDE E Nios II Device Drivers i Overview Find vat N include lt stdio h gt about int main printf Hello from Nios II n Tutorials return 0 lt Problems AE Properties ello_world_0 Nios IT HW configuration Nios II Hardware Nios II Terminal Window 4 22 05 5 36 PM th in this nios2 terminal Use the IDE stop button or Ctrl C to terminate Hello from Nios II Congratulations You have completed the first steps to familiarize yourself with the Nios IT Development Kit If you completed all of the steps above then you have installed your Nios IT development environment and verified that the Nios development board and tools function correctly 1 14 Altera Corporation Nios Il Development Kit Getting Started User Guide May 2005 Getting Started Taking the Next Step Documentation Library Altera Corporation May 2005 To learn more about the Nios II embedded processor hardware designers can start with the Nios II Hardware Development Tutorial Software developers can start with the Nios II Software Development Tut
15. r the example design used in this getting started user guide For example the Nios II Development Kit Stratix Edition Quartus II project file is located at lt Nios II kit path gt examples verilog niosII_stratix_1s10 standard standard qpf IS You can use the vhdl directory instead of the verilog directory if you prefer the VHDL language Downloading a Hardware Image to the FPGA To download the Nios II SRAM Object File sof image to the Nios development board follow these steps 1 Choose Programmer Tools menu Altera Corporation 1 9 May 2005 Nios Il Development Kit Getting Started User Guide Starting the Nios Il Development Tools 2 Click Hardware Setup 3 Select USB Blaster in the Currently selected hardware list and click Close 4 Turn on Program Configure located on the same row as standard sof 5 Click Start Upon download success the Messages window will display Info successfully performed operation s If you do not see this message check your cable connections and the Quartus II Programmer hardware setup Starting the Nios Il IDE from SOPC Builder Now that you have configured the FPGA with a Nios II system sof file you can proceed to the Nios II IDE to download software to the processor To start the Nios II IDE perform the following steps 1 Choose SOPC Builder Tools menu 2 When the SOPC Builder window opens click on the System Generation tab 3 Click Run Nios IT IDE
16. s Altera s comprehensive environment for system on a programmable chip SOPC hardware design Using the Quartus II software you can develop hardware design files synthesize a netlist for the design and output a configuration file for the target FPGA You use the Quartus II software to assign I O pin locations apply compilation constraints e g timing requirements and perform timing analysis on the FPGA design The Quartus II software installation also includes the SOPC Builder system integration tool You use SOPC Builder to define and integrate Nios II processor based hardware systems Install and license the Quartus II software as described in the Quartus II Installation amp Licensing for PCs manual or the Quartus II Installation amp Licensing for UNIX and Linux Workstations manual During the Quartus II installation do not install the Nios II Embedded Processor Evaluation Edition because you will install the full version separately You can select Custom Setup during installation to install only the Quartus II components that you require for your Nios II development environment For a minimal installation install the following components Mm Quartus II software m SOPC Builder support M Device support for the FPGA family on your Nios development board E Tutorial Files You need administrative privileges to install parts of the Quartus II software on Windows XP Windows 2000 Windows NT and Linux 1 3 Nios Il Developmen
17. t Kit Getting Started User Guide Installing the Development Tools The Nios Il Embedded Processor CD ROM The Nios II Embedded Processor CD ROM contains the tools listed below M Nios II CPU and Peripheral Components for SOPC Builder You use these components to generate Nios IT hardware systems in SOPC Builder M Nios II Integrated Development Environment IDE The Nios II IDE is the software development interface for the Nios II processor All software development tasks can be accomplished within the Nios II IDE including creating editing compiling and debugging programs Mm GNU toolchain The Nios II compiler tool chain is based on the standard GNU GCC compiler assembler linker and makefile facilities To install the Nios II Embedded Processor CD ROM perform one of the following steps Y On Windows PCs insert the Nios II Embedded Processor for Windows CD ROM into your computer If the install program does not automatically start browse to your CD ROM drive and run the program launcher exe Follow the on screen instructions It is recommended that you accept the default install options A If you are reinstalling the Nios II Development Kit it is recommended that you first uninstall the previous installation v On Linux PCs insert the Nios II Embedded Processor for Linux CD ROM into a drive and make sure that drive is mounted Run the executable script install from the root directory of the CD filesystem
18. talic type with initial capital letters Example AN 75 High Speed Board Design Italic type Internal timing parameters and variables are shown in italic type Examples tpa n 1 Variable names are enclosed in angle brackets lt gt and shown in italic type Example lt file name gt lt project name gt pof file Initial Capital Letters Keyboard keys and menu names are shown with initial capital letters Examples Delete key the Options menu Subheading Title References to sections within a document and titles of on line help topics are shown in quotation marks Example Typographic Conventions vi Altera Corporation About This User Guide Typographic Conventions Visual Cue Courier type Meaning Signal and port names are shown in lowercase Courier type Examples data1 tdi input Active low signals are denoted by suffix n e g resetn Anything that must be typed exactly as it appears is shown in Courier type For example c qdesigns tutorial chiptrip gdf Also sections of an actual file such as a Report File references to parts of files e g the AHDL keyword SUBDESIGN as well as logic function names e g TRI are shown in Courier 1 2 3 and Numbered steps are used in a list of items when the sequence of the items is a b c etc important such as the steps listed in a procedure Mee Bullets are used
19. to start the Nios II IDE See Figure 1 2 gt In the future you can launch the Nios II IDE directly without running the Quartus II software On Windows PCs choose Start gt Programs gt Altera gt Nios II Development Kit gt Nios IT IDE On Linux PCs run the executable file lt Nios II kit path gt bin nios2 ide 1 10 Altera Corporation Nios Il Development Kit Getting Started User Guide May 2005 Getting Started Figure 1 2 Starting the Nios Il IDE from SOPC Builder Altera SOPC Builder std_2C35 File Module System View Tools Help Options BB run nios I IDE Y HDL Generate system module logic in Verilog O Simulation Create simulator project files UG Done checking for updates 4 When the Nios II IDE starts it displays the Workspace Launcher dialog Click OK to accept the default workspace directory Building a First Software Project To create a simple Hello World project perform the following steps 1 From the File menu choose New gt C C Application The New Project wizard appears See Figure 1 3 Altera Corporation 1 11 May 2005 Nios Il Development Kit Getting Started User Guide Starting the Nios Il Development Tools Figure 1 3 New Project Wizard in the Nios Il IDE New Project C C Application Click Finish to create this project with a default system library e Name TEE world 0 M Use Default Location Select Target Hardware
20. ut Altera products go to the Altera world wide web site at www altera com For technical support on this product go to www altera com mysupport For additional information about Altera products consult the sources shown below Information Type Technical support USA amp Canada www altera com mysupport All Other Locations www altera com mysupport 800 800 EPLD 3753 7 00 a m to 5 00 p m Pacific Time 1 408 544 8767 7 00 a m to 5 00 p m GMT 8 00 Pacific Time Product literature www altera com www altera com Altera literature services literature O altera com literature O altera com Non technical customer service 800 767 3753 1 408 544 7000 7 00 a m to 5 00 p m GMT 8 00 Pacific Time FTP site ftp altera com ftp altera com Typographic Conventions This document uses the typographic conventions shown below Visual Cue Bold Type with Initial Capital Letters Meaning Command names dialog box titles checkbox options and dialog box options are shown in bold initial capital letters Example Save As dialog box bold type External timing parameters directory names project names disk drive names filenames filename extensions and software utility names are shown in bold type Examples fmax qdesigns directory d drive chiptrip gdf file Italic Type with Initial Capital Letters Document titles are shown in i
21. uter for licensing purposes When obtaining a license file for network licensing use the NIC ID for the computer that will act as the license server To display your NIC ID perform one of the following steps Mm On Windows PCs open a command prompt and type lt Windows installation path gt system32 ipconfig all Your NIC ID is the number on the line labeled Physical Address minus the hyphens E On Linux PCs open a shell command prompt and type ifconfig Your NIC ID is the number labeled HWaddr minus the colons US Ifthis command fails to display your NIC ID make sure the ifconfig utility is in the search path On many Linux installations the ifconfig utility is located in the sbin directory Typing the full path to the ifconfig executable file e g sbin ifconfig may resolve the problem Altera Corporation Nios Il Development Kit Getting Started User Guide May 2005 Getting Started Installing the Development Tools Altera Corporation May 2005 Quartus II System Requirements The Nios II Development Kit version 5 0 requires the Quartus II software version 5 0 Your PC system must meet the Quartus II software minimum system requirements Refer to System Requirements of the Quartus II Installation amp Licensing Manual for PCs included in the kit for system requirements Install the development tools in the following order The Quartus Il Design Software CD ROM The Quartus II design software i
22. w altera com Once you have connected your Nios development board to your computer you can start the Nios II IDE from the Quartus II software Starting the Quartus Il Software Start the Quartus II software and open a Nios II project by performing the following steps 1 Launch the Quartus II software Altera Corporation Nios Il Development Kit Getting Started User Guide May 2005 Getting Started On Windows PCs choose Start gt Programs gt Altera gt Quartus II On Linux PCs type quartus ata shell command prompt assuming the Quartus II program directory is in the search path If prompted about software updates click Yes to get updates automatically from the Altera web site 2 When the Quartus II window appears choose Open Project File menu 7 Be sure to choose Open Project and not Open 3 Browse to the directory lt Nios II kit path gt examples verilog niosII_ lt board type gt standard for your board Replace lt board type gt with a directory name shown in Table 1 1 Table 1 1 Design File Directory Names Nios Development Board Directory Name Stratix Il Edition niosll_stratixIl_2560_es Stratix Edition niosll_stratix_1s10 or niosll_stratix_1s10_es Cyclone II Edition niosil_cyclonell_2c35 Cyclone Edition niosil_cyclone_1c20 Stratix Professional Edition niosil_stratix_1s40 4 Select the file standard qpf and click Open The standard qpf file contains project definitions fo
Download Pdf Manuals
Related Search
Related Contents
GUIDE DE L`UTILISATEUR 取扱説明書 - Brother Huffy 211583 User's Manual MC92600 Quad 1.25 Gbaud SERDES User`s Manual Manuel Fly Data - ULM Technologie OLCT 10N Overview for Avaya MultiVantage Express O 410 Operating Manual v03 Annexes - Animafac Manual de instruções para operação, manutenção e ficha Copyright © All rights reserved.
Failed to retrieve file