Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

3.6.5.5.3. Add the Nios® II Processor Core

You add the Nios® II/f core and configure it to use 2 KB of on-chip instruction cache memory, no data cache and use static branch prediction. For this tutorial, the Nios® II/f core is configured to provide a balanced trade-off between performance and resource utilization. To add a Nios® II/f core to the system, perform the following steps:

  1. On the IP Catalog tab, expand Processors and Peripherals, and then click Nios® II Gen2 Processor.
  2. Click Add.
    The Nios® II Processor parameter editor appears, displaying the Core Nios II tab.
  3. In the Main Tab under Select an Implementation, select Nios® II/f.
  4. Click Finish and return to the Platform Designer System Contents tab.
    The Nios® II core instance appears in the system contents table. Ignore the exception and reset vector error messages. You resolve these errors in future steps.
  5. In the Name column, right-click the Nios® II processor and click Rename.
  6. Type cpu and press Enter.
  7. 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.
  8. 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.
  9. Connect the s1 port of the on-chip memory to both the data_master port and instruction_master port of the Nios® II processor.
  10. Double-click the Nios® II processor row of the system contents table to reopen the Nios® II Processor parameter editor.
  11. Under Reset Vector in Vectors tab, select onchip_mem.s1 in the Reset vector memory list and type 0x0 in the Reset vector offset box.
  12. Under Exception Vector, select onchip_mem.s1 in the Exception vector memory list and type 0x20 in the Exception vector offset box.
  13. Click the Caches and Memory Interfaces tab.
  14. In the Instruction cache list, select 2 Kbytes.
  15. Choose None for Data Cache size and do not change other default settings.
  16. In Advanced Features tab, select Static branch prediction type.
  17. Click Finish. You return to the Platform Designer System Contents tab.
    Do not change any settings on the MMU and MPU Settings and JTAG Debug tabs.