Visible to Intel only — GUID: ytl1675740202366
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: ytl1675740202366
Ixiasoft
3.3.2. ALU Switch
The funct3 field determines the ALU switch. Using data0 and data1 as inputs, the ALU switch picks an ALU operation, and delivers the result as alu_result at the start of the custom instruction. You can use the alu_result, concurrently with the same data0 and data1 in the custom instruction. When applying this feature, Intel recommends you to hardcode the funct3 value in the Platform Designer.
funct3 | ALU Operation | alu_result[31:0] |
---|---|---|
000 | ADD | Addition of data0 and data1. |
001 | Reserved | N/A |
010 | SLT (Set on Less Than (signed)) | 1 if data0 < data1, 0 otherwise. |
011 | SLTU (Set on Less Than (unsigned)) | 1 if data0 < data1, 0 otherwise. |
100 | XOR (Exclusive OR) | Bitwise XOR operation of data0 and data1. |
101 | Reserved | N/A |
110 | OR | Bitwise OR operation of data0 and data1. |
111 | AND | Bitwise AND operation of data0 and data1. |
Figure 11. ALU Switch Block Diagram
Figure 12. ALU Switch Timing Diagram with AND Operation