User guide
SFSU - Embedded Systems Tutorial Nano- Electronics & Computing Research Lab
46
Step 2: Building Qsys System
1) Open Qsys under tools tab
2) Start by adding a Nios II Processor Core: Under “Component Library”-> Processors ->
Nios II Processor -> Add
a. Select “Nios II/s”
b. Set “Hardware multiplication type” = “None”
c. Disable “Hardware divide”
d. “Finish”
e. Rename Nios to “cpu”
3) On-Chip Memory: Under “Component Library”-> Memories and Memory Controllers ->
On-Chip -> On-Chip Memory (RAM or ROM)-> Click “Add”
a. Block Type list = “Auto”
b. Total Memory size = “204800” to specify 2KB of memory
c. Do not change any other default settings.
d. “Finish”
e. Under the “System Contents” tab, right-click the on-chip memory and rename as
“onchip_mem”
4) JTAG UART: Component Library -> Interface Protocols -> Serial -> JTAG UART ->
Add
a. Do not change any default settings
b. Rename to “jtag_uart”
5) Interval Timer: Component Library -> Peripherals -> Microcontroller Peripherals ->
Interval Timer-> Add
a. Under “Hardware Options” set “Presets” to “Full-Featured”
b. Do not change any other default settings
c. Rename to “sys_clk_timer”
6) System ID Peripheral: Component Library-> Peripherals -> Debug and Performance ->
System ID Peripheral-> Add
a. Do not change any default settings
b. Rename as “sysid”
7) PIO’s: Component Library-> Peripherals -> Microcontroller Peripherals -> PIO -> Add
a. Under “Basic Settings” enter the value of “4” for the box labeled “Width”
b. Do not change any other default settings
c. Finish
d. Rename as “pio_led”
e. For this example us two “pio_led”
f. Repeat these steps for two “pio_sw” with 4 bits of width and change to input.
g. Repeat these steps for pio_hex0 through 7 with widths of 7 bits.
8) LCD: Component Library-> Peripherals -> Display-> Character LCD -> Add
a. Finish
9) Go to the “Connections” column and connect the following ports: (Figure Below)
a. For all the components connect the clock input and outputs to clock_50
b. For all the components connect the Avalon memory mapped slave to the On-chip
memory AMMS.
c. Open the Nios II processor named CPU and change the reset vector and
exception vectors to onchip_memory2