AN 717: Nios II Gen2 Hardware Development Tutorial

ID 683615
Date 9/22/2014
Public
Document Table of Contents

1.5.5.3. Add the Processor Core

You add the /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 /f core is configured to provide a balanced trade-off between performance and resource utilization. To add a /f core to the system, perform the following steps:

  1. On the IP Catalog tab, expand Processors and Peripherals, and then click Gen2 Processor.
  2. Click Add.
    The Processor parameter editor appears, displaying the Core Nios II tab.
  3. In the Main Tab under Select an Implementation, select /f.
  4. Click Finish and return to the System Contents tab.
    The 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 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 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 processor.
  9. Connect the s1 port of the on-chip memory to both the data_master port and instruction_master port of the processor.
  10. Double-click the processor row of the system contents table to reopen the 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 System Contents tab.
    Do not change any settings on the MMU and MPU Settings and JTAG Debug tabs.