Specifications
1–14 Chapter 1: Nios II Hardware Development
Creating the Design Example
Nios II Hardware Development Tutorial May 2011 Altera Corporation
1 You must type these tutorial component names exactly as specified. Otherwise, the
tutorial programs written for this Nios II system fail in later steps. In general, it is a
good habit to give descriptive names to hardware components. Nios II programs use
these symbolic names to access the component hardware. Therefore, your choice of
component names can make Nios II programs easier to read and understand.
Add the Nios II Processor Core
In this section you add the Nios II/s core and configure it to use 2 KB of on-chip
instruction cache memory. For educational purposes, the tutorial design example uses
the Nios II/s (standard) core, which provides a balanced trade-off between
performance and resource utilization. In reality, the Nios II/s core is more powerful
than necessary for most simple control applications.
Perform the following steps to add a Nios II/s core to the system:
1. On the Component Library tab, expand Processors, and then click Nios II
Processor.
2. Click Add. The Nios II Processor parameter editor appears, displaying the Core
Nios II tab. Figure 1–6 shows the GUI.
3. Under Select a Nios II core, select Nios II/s.
4. In the Hardware multiplication type list, select None.
5. Turn off Hardware divide.
6. Click Finish. You return to the Qsys System Contents tab, and an instance of the
Nios II core appears in the system contents table. Ignore the exception and reset
vector error messages. You resolve these errors in steps 13 and 14.
7. In the Name column, right-click the Nios II processor and click Rename.
8. Type
cpu
and press Enter.
9. In the Connections column, connect the
clk
port of the clk_0 clock source to both
the
clk1
port of the on-chip memory and the clk port of the Nios II processor by
clicking the hollow dots on the connection line. The dots become solid indicating
the ports are connected.
10. Connect the
clk_reset
port of the clk_0 clock source to both the
reset1
port of the
on-chip memory and the
reset_n
port of the Nios II processor.
11. Connect the
s1
port of the on-chip memory to both the
data_master
port and
instruction_master
port of the Nios II processor.
12. Double-click the Nios II processor row of the system contents table to reopen the
Nios II Processor parameter editor.
13. Under Reset Vector, select onchip_mem.s1 in the Reset vector memory list and
type
0x0
in the Reset vector offset box.
14. Under Exception Vector, select onchip_mem.s1 in the Exception vector memory
list and type
0x20
in the Exception vector offset box.