Visible to Intel only — GUID: mfg1675738137610
Ixiasoft
4.3.1. Writing the Custom Instruction HDL File
4.3.2. Opening the Component Editor
4.3.3. Specifying the Custom Instruction Component Type
4.3.4. Displaying the Custom Instruction Block Symbol
4.3.5. Adding the Custom Instruction HDL File
4.3.6. Configuring the Custom Instruction Parameter Type
4.3.7. Setting Up the Custom Instruction Interfaces
4.3.8. Saving and Adding the Custom Instruction
4.3.9. Generating and Compiling the Processor System
Visible to Intel only — GUID: mfg1675738137610
Ixiasoft
2.2.1. Multicycle Custom Instruction Ports
Port Name | Direction | Required? | Description |
---|---|---|---|
clk | Input | Yes | System clock. |
reset | Input | Yes | Synchronous reset. |
data0[31:0] | Input | Optional 2 | Input operand to custom instruction logic block (Source Register 1). |
data1[31:0] | Input | Optional2 | Input operand to custom instruction logic block (Source Register 2). |
alu_result[31:0] | Input | Optional2 | Input operand to custom instruction logic block (ALU Switch result). |
ctrl[31:0] | Input | Optional2 | Custom instruction word. Reserved for other use. |
enable | Input | Yes | Custom instruction logic block enables. |
done | Output | Yes | Indicator to the completion of the custom instruction execution. |
result[31:0] | Output | Optional2 | Result of the custom instruction. |
The Nios® V processor system clock feeds the custom logic block’s clk port. The Nios® V processor system reset feeds the active high reset port. The reset port asserts only when the whole Nios® V processor system resets.
If you assert the enable port, the Nios® V processor custom instruction logic receives input thru the data0, data1, and alu_result ports, and drives the result to its result port. The processor considers the result as valid when the logic block asserts the done port. The ctrl port delivers the full instruction word to the logic block for other use.
Figure 4. Multicycle Custom Instruction Block Diagram
2 Use only if the custom instruction requires the port.