Nios II Custom Instruction User Guide

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

4.1.7. Setting Up the CRC Custom Instruction Interfaces

To set up the custom instruction interfaces, you use the Interfaces tab.

To set up the custom instruction interfaces, follow these steps:

  1. In the View menu, click Interfaces to display the Interfaces tab.
    Figure 17. Opening the Interfaces Tab
  2. If the Remove Interfaces With No Signals button is active, click it.
  3. Ensure that a single interface remains, with Name set to the name in the Signals tab. For the design example, maintain the interface name nios_custom_instruction_slave.
  4. Ensure the Type for this interface is Custom Instruction Slave.
  5. For Clock Cycles, type 0. This is the correct value for a variable multicycle type custom instruction, such as the CRC module in the design example. For other designs, use the correct number of clock cycles for your custom instruction logic.
  6. For Operands, type 1, because the CRC custom instruction has one operand. For other designs, type the number of operands used by your custom instruction.
    Note: If you rename an interface by changing the value in the Name field, the Signals tab Interface column value changes automatically. The value shown in the block diagram updates when you change tabs and return to the Interfaces tab.
    Note: If the interface includes a done signal and a clk signal, the component editor infers that the interface is a variable multicycle type custom instruction interface, and sets the value of Clock Cycles to 0.