Class simtix::Instr
Base class for all different kinds of Instructions. More...
#include <instr.h>
Inherited by the following classes: simtix::InstrAuipc, simtix::InstrBranch, simtix::InstrFormosa, simtix::InstrJal, simtix::InstrJalr, simtix::InstrLoad, simtix::InstrLui, simtix::InstrOp, simtix::InstrOpFp, simtix::InstrOpFused, simtix::InstrOpImm, simtix::InstrStore, simtix::InstrSystem, simtix::InstrTrap
Public Types
Type | Name |
---|---|
enum uint8_t | ExecutionUnit |
enum uint8_t | Opcode Opcode definitions. |
Public Functions
Type | Name |
---|---|
virtual void | Assign (const Instr * other) |
virtual bool | CanCommit () const = 0 |
virtual bool | CanExecute () const = 0 |
virtual bool | CanIssue () const = 0 |
virtual bool | CanRetire () const = 0 |
virtual void | Commit () = 0 |
virtual void | Decode () |
virtual void | Execute () = 0 |
virtual void | Issue () |
virtual void | OperandCollect () = 0 |
virtual void | Reset () |
virtual bool | barrier_valid () const |
virtual bool | exception_valid () const |
ExecutionUnit | execution_unit () const |
bool | illegal () const |
uint32_t | iword () const |
virtual bool | may_change_ctrl_flow () const |
uint8_t | opcode () const |
void | set_ssw (std::optional< uint32_t > ssw) |
uint32_t | sswid () const |
uint8_t | tswid () const |
uint32_t | wid () const |
uint64_t | wpc () const |
Public Static Functions
Type | Name |
---|---|
constexpr uint32_t | BitMask (uint32_t width) |
uint8_t | DecodeFunct3 (uint32_t iword) |
uint8_t | DecodeFunct7 (uint32_t iword) |
uint8_t | DecodeOpcode (uint32_t iword) |
uint8_t | DecodeRd (uint32_t iword) |
uint8_t | DecodeRs1 (uint32_t iword) |
uint8_t | DecodeRs2 (uint32_t iword) |
Protected Attributes
Type | Name |
---|---|
std::vector< Thread * > | active_threads_ |
ExecutionUnit | execution_unit_ = kALU |
uint8_t | funct3_ = 0 |
uint8_t | funct7_ = 0 |
bool | illegal_ = false |
uint32_t | iword_ |
std::string | mnemonic_ |
uint8_t | opcode_ = 0 |
uint8_t | rd_ = 0 |
uint8_t | rs1_ = 0 |
uint8_t | rs2_ = 0 |
std::optional< uint32_t > | ssw_ |
uint8_t | tswid_ = 0 |
Warp * | warp_ |
uint64_t | wpc_ |
Protected Functions
Type | Name |
---|---|
Instr (Warp * warp, uint32_t iword, uint64_t wpc) |
|
virtual void | Reinitialize (Warp * warp, uint32_t iword, uint64_t wpc) |
virtual | ~Instr () = default |
Detailed Description
This is an abstract class that defines multiple API to perform different operations to an instruction.
Public Types Documentation
enum ExecutionUnit
enum Opcode
Opcode definitions.
enum simtix::Instr::Opcode {
kLoad = 0b0000011,
kStore = 0b0100011,
kBranch = 0b1100011,
kCustom1 = 0b0101011,
kOpImm = 0b0010011,
kOp = 0b0110011,
kSystem = 0b1110011,
kAuipc = 0b0010111,
kLui = 0b0110111,
kOpImm32 = 0b0011011,
kOp32 = 0b0111011,
kFmadd = 0b1000011,
kFmsub = 0b1000111,
kFnmsub = 0b1001011,
kFnmadd = 0b1001111,
kOpFp = 0b1010011,
kJal = 0b1101111,
kJalr = 0b1100111
};
Public Functions Documentation
function Assign
function CanCommit
function CanExecute
function CanIssue
function CanRetire
function Commit
function Decode
function Execute
function Issue
function OperandCollect
function Reset
function barrier_valid
function exception_valid
function execution_unit
function illegal
function iword
function may_change_ctrl_flow
function opcode
function set_ssw
function sswid
function tswid
function wid
function wpc
Public Static Functions Documentation
function BitMask
function DecodeFunct3
function DecodeFunct7
function DecodeOpcode
function DecodeRd
function DecodeRs1
function DecodeRs2
Protected Attributes Documentation
variable active_threads_
variable execution_unit_
variable funct3_
variable funct7_
variable illegal_
variable iword_
variable mnemonic_
variable opcode_
variable rd_
variable rs1_
variable rs2_
variable ssw_
variable tswid_
variable warp_
variable wpc_
Protected Functions Documentation
function Instr
function Reinitialize
function ~Instr
The documentation for this class was generated from the following file projects/simtix/src/simtix/sm/instr.h