Nios II Classic Processor Reference Guide

ID 683620
Date 10/28/2016
Public
Document Table of Contents

4.6. Custom Instruction Tab

In Qsys, custom instructions are components in your design that you manually connect to the processor in the Qsys System Contents tab. Existing custom instruction components are available on the Component Library tab under Custom Instruction Modules. Thus, the Custom Instruction tab in the Nios  II Processor parameter editor is not used in Qsys.

To create your own custom instruction using the component editor, click New Component on the File menu in Qsys. After finishing in the component editor, the new instruction appears on the Component Library tab under Custom Instruction Modules in Qsys.

Note: All signals in Nios II custom instructions must have the Custom Instruction Slave interface type.

To guarantee the component editor automatically selects the Custom Instruction Slave interface type for your signals correctly during import, begin your signal names with the prefix ncs_. This prefix allows the component editor to determine the connection point type: a Nios II custom instruction slave. For example, if a custom instruction component has two data signals plus clock, reset, and result signals, an appropriate set of signal names is ncs_dataa, ncs_datab, ncs_clk, ncs_reset, and ncs_result.

A complete discussion of the hardware and software design process for custom instructions is beyond the scope of this chapter.

For full details on the topic of custom instructions, including working example designs, refer to the Nios II Custom Instruction User Guide.