
Chapter 1: Nios II Custom Instruction Overview 1–3
Custom Instruction Types
January 2011 Altera Corporation Nios II Custom Instruction User Guide
Implementing Custom Instruction Software
The Nios II custom instruction software interface is simple and abstracts the details of
the custom instruction from the software developer. For each custom instruction, the
Nios II Embedded Design Suite (EDS) generates a macro in the system header file,
system.h. You can use the macro directly in your C or C++ application code, and you
do not need to program assembly code to access custom instructions. Software can
also invoke custom instructions in Nios II processor assembly language.
For more information about the custom instruction software interface, refer to
Chapter 2, Software Interface.
Custom Instruction Types
Different types of custom instructions are available to meet the requirements of your
application. The type you choose determines the hardware interface for your custom
instruction.
Table 1–1 shows the available custom instruction types, applications, and associated
hardware ports.
Table 1–1. Custom Instruction Types, Applications, and Hardware Ports (Part 1 of 2)
Type Application Hardware Ports
Combinational Single clock cycle custom logic blocks.
■
dataa[31:0]
■
datab[31:0]
■
result[31:0]
Multicycle
Multi-clock cycle custom logic blocks of fixed or
variable durations.
■
dataa[31:0]
■
datab[31:0]
■
result[31:0]
■
clk
■
clk_en (1)
■
start
■
reset
■
done
Extended
Custom logic blocks that are capable of
performing multiple operations
■
dataa[31:0]
■
datab[31:0]
■
result[31:0]
■
clk
■
clk_en (1)
■
start
■
reset
■
done
■
n[7:0]
Kommentare zu diesen Handbüchern