Nios II Custom Instruction User Guide

ID 683242
Date 4/27/2020
Public
Document Table of Contents
Give Feedback

4.1.9. Saving and Adding the CRC Custom Instruction

To save the custom instruction and add it to your Nios II processor, follow these steps:

  1. Click Finish. A dialog box prompts you to save your changes before exiting.
  2. Click Yes, Save. The new custom instruction appears in the Platform Designer Component Library.
  3. In the Platform Designer Component Library, under Library, select CRC, the new custom instruction you created in the design example.
  4. Click Add to add the new instruction to the Platform Designer system.
    Platform Designer automatically assigns an unused selection index to the new custom instruction. You can see this index in the System Contents tab, in the Base column, in the form "Opcode <N>". <N> is represented as a decimal number. The selection index is exported to system.h when you generate the system.
  5. In the Connections panel, connect the new CRC_0 component’s nios_custom_instruction_slave interface to the cpu component’s custom_instruction_master interface.
  6. Optional: You can change the custom instruction's selection index in the System Contents tab. In the Base column across from the custom instruction slave, click on "Opcode <N>", and type the desired selection index in decimal.