Lesson 3
Compiling A Project In Quartus II
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Documentaion | Download PDF
Quartus II Setup
- Navigate to your project directory (in this case C:/altera/mySystems/system1)
- Open the Quartus project file (.qpf) in our case NiosII.qpf
- Quartus Should now open with your project
- Double click on NiosII under the “Entity” window on the left
- This should have a opened the NiosII.bdf file in the center of Quartus II
- If NiosII is not your top level entity (ie: shows as the highest element in the entity windows) preform the following, if it is the top most entity already then skip to step 4
- In the left hand pane next to Hierarchy click on Files
- Right click on NIosII.bdf
- Select Set as Top-Level Entity As shown below
- Go to Project --> Add/Remove Files in Project...
- In the settings pop up go to Files
- Next to filename click on the ... icon
- Find NiosII.bdf (note this file might already be added, if it is already added skip to step iv)
- Click open
- Click add
- Find niosiiStsyem.qip (the file we generated in Qsys located in system1/niosiiSystem/synthesis) You might have to change the file type to IP Variation (.qip .sip)
- Click open
- Click add
- Click Apply
- Click OK
- Go to Assignments --> device
- Click device and pin options
- Click Unused Pins
- For Reserve all unused pins select As input tri-stated
Adding A Block Diagram
- Double Click on the work space area (the area with a dot pattern)
- In the Symbol popup menu under name clink the ... button
- Navigate to the niosiiSystem.bsf that we created in Qsys (system1\niosiiSystem)
- Select niosiiSystem.bsf
- Click open
- A preview should now appear in the symbol popup
- Click OK in the symbol popup
- Place the block diagram anywhere on the workspace by clicking
Note: Pin names are case sensitive
Note: to make multiple bit connections to one pin use the format “PINNAME[X..Y]” where X is the most significant bit and Y is the least significant bit
Green Lines are Bidirectional Pins
Blue Lines are Input Pins
Purple Lines are Output Pins
Adding Pins By Using A Defined .qsf File
- Navigate to your project folder and find the file niosII.qsf (system1\niosII.qsf)
- Open the .qsf file in a text editor like notepad
- At the bottom of the file past in the contents of the .qsf file found at http://fpga.seanwrall.com/lessons/lesson3/ (Download DE2-115 .qsf file addon (TXT))
- Save the file
- Place a pin by clicking on Add a pin in the workspace tool bar
- Select the pin you need from he drop-down (input, output, bidirectional)
- Place the pin by clinking on the workspace where you want the pin to be placed
- When done placing the pin press Esc to stop placing more pins
- For this example we need two inputs and one output
- Connect the pins to the device by dragging from the device to the pin (not from the pin to the device)
- Name the pins the corresponding values in the .csv file found at http://fpga.seanwrall.com/lessons/lesson3/ (Download DE2-115 Pin Assignment (CSV))
- For us the clk_clk should be named CLOCK_50
- For us the green_leds_export[7..0] should be named LEDG[7..0]
- For us the reset_reset_n should be named KEY[0]
Compiling/Generating A Quartus Project
- Click start compilation (the purple arrow in the too bar)
- The progress of the compilation will be shown in the lower left and in the console window at the bottom
- When done the console window will display Quartus II Full Compilation was successful. 0 errors
- You do not want errors here but warnings are OK
Downloads
Download Written Documentaion (PDF)
Download Quartus and Qsys Project Files (ZIP)
Download DE2-115 .qsf file addon (TXT)
Download DE2-115 Pin Assignment (CSV)
Download DE2 .qsf file addon (NOT DE2-115) (TXT)
Well this donation will also go towards things like FPGA’s, server space and well beer if there is any left over.