SOURCE ARCHIVE
EXTRACTED CONTENT
2,717 charsInstructions can be grouped into a number of categories.
Each category exercises different data and control paths in the core.
For example the ADD and SUB instructions are in the same category as they are almost identical for the microarchitecture (both read two registers and write to one, both feed operands to the ALU and take their result from it, both have the same response to interrupts etc; the only difference is the ALU operation).
Instructions can be compressed or uncompressed but that isn’t factored into the instruction categories below (excepting for illegal instructions). The decompression occurs in the IF stage and is invisible to the ID/EX stage so isn’t relevant for instruction execution. A separate set of category-agnostic compressed instruction behaviour is considered instead.
An instruction category is sampled at the ID/EX stage (which is where all the varying behaviours actually occur). Some categories are just a single instruction, which is named without further description.
- ALU - All of the reg/reg reg/imm instructions that use the ALU.
This is any RISC-V instruction with an opcode of
7'b0010011or7'b0110011(ibex_pkg::OPCODE_OPandibex_pkg::OPCODE_OP_IMM) other than theMUL*andDIV*family of instructions (from RV32M). - Mul - Any
MUL*instruction (from RV32M). - Div - Any
DIV*instruction (from RV32M). - Branch - Any
B*family branch instruction. - Jump -
JAL/JALR - Load - Any
L*family load instruction. - Store - Any
S*family load instruction. - CSRAccess - Any instruction from Zicsr.
- EBreakDbg/EBreakExc - An
EBREAKinstruction that either enters debug mode (Dbg) or causes an exception (Exc). Which occurs depends upon the setting ofdcsr.ebreakm/dcsr.ebreakucombined with the privilege level of executed instruction. - ECall -
ECALLis an environment call used for escalation of privilege. - MRet -
MRETreturn out of M-mode - DRet -
DRETruturn from debug mode. - WFI - wait for interrupt.
- Fence -
FENCEmemory fence on the data side. - FenceI -
FENCE.Iinstruction fence instruction. - FetchError - Any instruction that saw a fetch error.
- CompressedIllegal - Any compressed instruction with an illegal encoding.
- UncompressedIllegal - Any uncompressed instruction with an illegal encoding.
- CSRIllegal - Any instruction attempting a CSR access that is not allowed.
- PrivIllegal - Illegal due to privilege level or being in/out of debug mode.
- OtherIllegal - Any other instruction that raises an Illegal instruction exception that isn’t in the other categories.
- None - No instruction in ID/EX stage.