Wentworth Institute of Technology
Department of Electrical Engineering
Elec 667 Advanced
Assigning Pins using
pin assignments can become a tedious chore as the NIOS II processors
become loaded with more and more features.
In our early labs since there are only a few switches and LEDs we
are working with, this typically will be fairly short typing
assignment. However, let’s take the
opportunity to introduce a short-cut.
Quartus II will allow users to import assignments using
comma-separated-values files (*.csv).
Altera uses COOP students from Canadian universities and one lucky
student got to type 400+ assignments into a spreadsheet. This file is called DE2_pin_assignments.csv and is found on the Altera website:
this file where you can find it later.
import these assignments into Quartus II for use with any project, click
Assignments on the main menu and select Import Assignments. The following screen will appear:
- Browse to the DE2_Board_pin_assignments.csv
location. ALSO, deselect Copy
existing assignments into…. and then click OK. In the Quartus II message window you should see that 425
assignments were written.
- We have
to deal with the FPGA unused pins.
Some authors suggest they should be set to “inputs tri-stated with
weak pull up”. Here is the click
path to deal with that issue.
“Device and Pin option” button:
the Unused Pins tab then used
the pull down to see your options.
application may not tolerate the output pushing ground out the I/O’s so consider “As output driving an unspecified
signal” or the recommended “As input tri=stated with weak pull-up”.
Dual Purpose Pins, specifically nCEO which is
used by the IRDA_TXD, needs to be changed.
on the Dual-Purpose Pins tab
click in the Value column for NCEO a pull down menu appears
“Use as regular I/O”.
out of here back to your project
you’ve all ready used some assignment in a previous project and you want
to reuse the file but you’ve deleted some IP. Those pins are still assigned. Here’s how you can clean them up.
Assignments looks interesting and I did notice some categories related to
trouble shooting: Design Assistant, Programmer, Signal Probe, Signal Tap
II, Incremental Compilation.
Subjects for further investigation at a later date.
- The check box at the bottom “Remove
obsolete assignment” may work if we knew what Quartus considers an
obsolete assignment. Click on Help and type obsolete assignments into the
search box. Two topics come up that
appear interesting. One of them
gives us a definition: the removal of design assignments that no longer
exist. We did make assignments for
pins that have nothing connected to them externally or internally. What about the other two removal
choices: global and instance? Include
in your lab reports a screen shot of the Remove Assignments text box what boxes
you checked to clean up the excessive pin assignments.
the results by clicking Assignments>>Assignment Editor.
- I love
this feature. You can import all
the pins then trim away the ones you don’t want. The assignment of the global 50 MHz
clock is correctly assigned to PIN_N2 and KEY(0)
goes to the pin (PIN_G26) for the blue push button. The switches are assigned starting from
the right end of the row and using the next 7 consecutively. LEDG go the right pins to turn on the
green LEDs. Everything is correct.
in your lab reports a screen shot of some of the pin assignments with the message about the number
of assignments written.