Nios II Custom Instruction User Guide

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

2.1.1.1. Combinational Custom Instruction Ports

A combinational custom instruction must have a result port, and may have optional dataa and datab ports.
Figure 3. Combinational Custom Instruction Block Diagram

In the figure above, the dataa and datab ports are inputs to the logic block, which drives the results on the result port. Because the logic function completes in a single clock cycle, a combinational custom instruction does not require control ports.

Table 2.  Combinational Custom Instruction Ports
Port Name Direction Required Description
dataa[31:0] Input No Input operand to custom instruction
datab[31:0] Input No Input operand to custom instruction
result[31:0] Output Yes Result of custom instruction

The only required port for combinational custom instructions is the result port. The dataa and datab ports are optional. Include them only if the custom instruction requires input operands. If the custom instruction requires only a single input port, use dataa.