CDL Modules
Data Structures | Enumerations | Variables
riscv_internal_types.h File Reference

Data Structures

struct  t_riscv_csr_access
 
struct  t_riscv_csr_data
 
struct  t_riscv_csr_controls
 
struct  t_riscv_csr_dcsr
 
struct  t_riscv_csr_mstatus
 
struct  t_riscv_csr_mip
 
struct  t_riscv_csr_mie
 
struct  t_riscv_csrs_minimal
 
struct  t_riscv_i32_inst
 
struct  t_riscv_i32_decode_ext
 
struct  t_riscv_i32_decode
 
struct  t_riscv_i32_alu_result
 
struct  t_riscv_i32_coproc_controls
 
struct  t_riscv_i32_coproc_response
 
struct  t_riscv_i32_trace
 

Enumerations

enum  t_riscv_abi {
  riscv_abi_zero = 0,
  riscv_abi_link = 1,
  riscv_abi_sp = 2
}
 
enum  t_riscv_opc_rv32 {
  riscv_opc_load = 0,
  riscv_opc_load_fp = 1,
  riscv_opc_custom_0 = 2,
  riscv_opc_misc_mem = 3,
  riscv_opc_op_imm = 4,
  riscv_opc_auipc = 5,
  riscv_opc_op_imm32 = 6,
  riscv_opc_store = 8,
  riscv_opc_store_fp = 9,
  riscv_opc_custom_1 = 10,
  riscv_opc_amo = 11,
  riscv_opc_op = 12,
  riscv_opc_lui = 13,
  riscv_opc_op32 = 14,
  riscv_opc_madd = 16,
  riscv_opc_msub = 17,
  riscv_opc_nmsub = 18,
  riscv_opc_nmadd = 19,
  riscv_opc_op_fp = 20,
  riscv_opc_resvd_0 = 21,
  riscv_opc_custom_2 = 22,
  riscv_opc_branch = 24,
  riscv_opc_jalr = 25,
  riscv_opc_resvd_1 = 26,
  riscv_opc_jal = 27,
  riscv_opc_system = 28,
  riscv_opc_resvd_2 = 29,
  riscv_opc_custom_3 = 30
}
 
enum  t_riscv_opc_rv32c {
  riscv_opcc0_addi4spn = 0,
  riscv_opcc0_lw = 2,
  riscv_opcc0_sw = 6,
  riscv_opcc1_addi = 0,
  riscv_opcc1_jal = 1,
  riscv_opcc1_li = 2,
  riscv_opcc1_lui = 3,
  riscv_opcc1_arith = 4,
  riscv_opcc1_j = 5,
  riscv_opcc1_beqz = 6,
  riscv_opcc1_bnez = 7,
  riscv_opcc2_slli = 0,
  riscv_opcc2_lwsp = 2,
  riscv_opcc2_misc_alu = 4,
  riscv_opcc2_swsp = 6
}
 
enum  t_riscv_system_f12 {
  riscv_f12_ecall = 12h0,
  riscv_f12_ebreak = 12h1,
  riscv_f12_mret = 12h302,
  riscv_f12_mwfi = 12h105
}
 
enum  t_riscv_f3_alu {
  riscv_f3_addsub = 0,
  riscv_f3_sll = 1,
  riscv_f3_slt = 2,
  riscv_f3_sltu = 3,
  riscv_f3_xor = 4,
  riscv_f3_srlsra = 5,
  riscv_f3_or = 6,
  riscv_f3_and = 7
}
 
enum  t_riscv_f3_muldiv {
  riscv_f3_mul = 0,
  riscv_f3_mulh = 1,
  riscv_f3_mulhsu = 2,
  riscv_f3_mulhu = 3,
  riscv_f3_div = 4,
  riscv_f3_divu = 5,
  riscv_f3_rem = 6,
  riscv_f3_remu = 7
}
 
enum  t_riscv_f3_branch {
  riscv_f3_beq = 0,
  riscv_f3_bne = 1,
  riscv_f3_blt = 4,
  riscv_f3_bge = 5,
  riscv_f3_bltu = 6,
  riscv_f3_bgeu = 7
}
 
enum  t_riscv_f3_load {
  riscv_f3_lb = 0,
  riscv_f3_lh = 1,
  riscv_f3_lw = 2,
  riscv_f3_lbu = 4,
  riscv_f3_lhu = 5
}
 
enum  t_riscv_f3_store {
  riscv_f3_sb = 0,
  riscv_f3_sh = 1,
  riscv_f3_sw = 2
}
 
enum  t_riscv_f3_misc_mem {
  riscv_f3_fence = 0,
  riscv_f3_fence_i = 1
}
 
enum  t_riscv_f3_system {
  riscv_f3_privileged = 0,
  riscv_f3_csrrw = 1,
  riscv_f3_csrrs = 2,
  riscv_f3_csrrc = 3,
  riscv_f3_csrrwi = 5,
  riscv_f3_csrrsi = 6,
  riscv_f3_csrrci = 7
}
 
enum  t_riscv_mem_width {
  mw_byte,
  mw_half,
  mw_word
}
 
enum  t_riscv_op {
  riscv_op_branch,
  riscv_op_jal,
  riscv_op_jalr,
  riscv_op_system,
  riscv_op_csr,
  riscv_op_misc_mem,
  riscv_op_load,
  riscv_op_store,
  riscv_op_alu,
  riscv_op_muldiv,
  riscv_op_auipc,
  riscv_op_lui,
  riscv_op_ext,
  riscv_op_illegal
}
 
enum  t_riscv_subop {
  riscv_subop_valid =0,
  riscv_subop_illegal = 0xf,
  riscv_subop_beq =0,
  riscv_subop_bne =1,
  riscv_subop_blt =2,
  riscv_subop_bge =3,
  riscv_subop_bltu =4,
  riscv_subop_bgeu =5,
  riscv_subop_add = 0,
  riscv_subop_sub = 0+8,
  riscv_subop_sll = 1,
  riscv_subop_slt = 2,
  riscv_subop_sltu = 3,
  riscv_subop_xor = 4,
  riscv_subop_srl = 5,
  riscv_subop_sra = 5+8,
  riscv_subop_or = 6,
  riscv_subop_and = 7,
  riscv_subop_mull = 0,
  riscv_subop_mulhss = 1,
  riscv_subop_mulhsu = 2,
  riscv_subop_mulhu = 3,
  riscv_subop_divs = 4,
  riscv_subop_divu = 5,
  riscv_subop_rems = 6,
  riscv_subop_remu = 7,
  riscv_subop_lb = 0,
  riscv_subop_lh = 1,
  riscv_subop_lw = 2,
  riscv_subop_lbu = 4,
  riscv_subop_lhu = 5,
  riscv_subop_sb = 0,
  riscv_subop_sh = 1,
  riscv_subop_sw = 2,
  riscv_subop_ecall = 0,
  riscv_subop_ebreak = 1,
  riscv_subop_mret = 2,
  riscv_subop_mwfi = 3,
  riscv_subop_fence = 0,
  riscv_subop_fence_i = 1,
  riscv_subop_csrrw = 1,
  riscv_subop_csrrs = 2,
  riscv_subop_csrrc = 3
}
 
enum  t_riscv_mcause {
  riscv_mcause_instruction_misaligned = 0,
  riscv_mcause_instruction_fault = 1,
  riscv_mcause_illegal_instruction = 2,
  riscv_mcause_breakpoint = 3,
  riscv_mcause_load_misaligned = 4,
  riscv_mcause_load_fault = 5,
  riscv_mcause_store_misaligned = 6,
  riscv_mcause_store_fault = 7,
  riscv_mcause_uecall = 8,
  riscv_mcause_secall = 9,
  riscv_mcause_hecall = 10,
  riscv_mcause_mecall = 11
}
 
enum  t_riscv_trap_cause {
  riscv_trap_cause_instruction_misaligned = 0,
  riscv_trap_cause_instruction_fault = 1,
  riscv_trap_cause_illegal_instruction = 2,
  riscv_trap_cause_breakpoint = 3,
  riscv_trap_cause_load_misaligned = 4,
  riscv_trap_cause_load_fault = 5,
  riscv_trap_cause_store_misaligned = 6,
  riscv_trap_cause_store_fault = 7,
  riscv_trap_cause_uecall = 8,
  riscv_trap_cause_secall = 9,
  riscv_trap_cause_hecall = 10,
  riscv_trap_cause_mecall = 11
}
 
enum  t_riscv_csr_access_type {
  riscv_csr_access_none = 0,
  riscv_csr_access_write = 1,
  riscv_csr_access_read = 2,
  riscv_csr_access_rw = 3,
  riscv_csr_access_rs = 6,
  riscv_csr_access_rc = 7
}
 
enum  t_riscv_csr_addr {
  CSR_ADDR_READWRITE_MASK = 12hc00,
  CSR_ADDR_READ_WRITE_A = 12h000,
  CSR_ADDR_READ_WRITE_B = 12h400,
  CSR_ADDR_READ_WRITE_C = 12h800,
  CSR_ADDR_READ_ONLY = 12hC00,
  CSR_ADDR_MODE_MASK = 12h300,
  CSR_ADDR_USER_MODE = 12h000,
  CSR_ADDR_SUPERVISOR_MODE = 12h100,
  CSR_ADDR_HYPERVISOR_MODE = 12h200,
  CSR_ADDR_MACHINE_MODE = 12h300,
  CSR_ADDR_USTATUS = 12h000,
  CSR_ADDR_UIE = 12h004,
  CSR_ADDR_UTVEC = 12h005,
  CSR_ADDR_USCRATCH = 12h040,
  CSR_ADDR_UEPC = 12h041,
  CSR_ADDR_UCAUSE = 12h042,
  CSR_ADDR_UTVAL = 12h043,
  CSR_ADDR_UIP = 12h044,
  CSR_ADDR_CYCLE = 12hC00,
  CSR_ADDR_TIME = 12hC01,
  CSR_ADDR_INSTRET = 12hC02,
  CSR_ADDR_CYCLEH = 12hC80,
  CSR_ADDR_TIMEH = 12hC81,
  CSR_ADDR_INSTRETH = 12hC82,
  CSR_ADDR_SSTATUS = 12h100,
  CSR_ADDR_SEDELEG = 12h102,
  CSR_ADDR_SIDELEG = 12h103,
  CSR_ADDR_SIE = 12h104,
  CSR_ADDR_STVEC = 12h105,
  CSR_ADDR_SCOUNTEREN = 12h106,
  CSR_ADDR_SSCRATCH = 12h140,
  CSR_ADDR_SEPC = 12h141,
  CSR_ADDR_SCAUSE = 12h142,
  CSR_ADDR_SBADADDR = 12h143,
  CSR_ADDR_SIP = 12h144,
  CSR_ADDR_SPTBR = 12h180,
  CSR_ADDR_MSTATUS = 12h300,
  CSR_ADDR_MISA = 12h301,
  CSR_ADDR_MEDELEG = 12h302,
  CSR_ADDR_MIDELEG = 12h303,
  CSR_ADDR_MIE = 12h304,
  CSR_ADDR_MTVEC = 12h305,
  CSR_ADDR_MCOUNTEREN = 12h306,
  CSR_ADDR_MSCRATCH = 12h340,
  CSR_ADDR_MEPC = 12h341,
  CSR_ADDR_MCAUSE = 12h342,
  CSR_ADDR_MTVAL = 12h343,
  CSR_ADDR_MIP = 12h344,
  CSR_ADDR_MCYCLE = 12hB00,
  CSR_ADDR_MINSTRET = 12hB02,
  CSR_ADDR_MCYCLEH = 12hB80,
  CSR_ADDR_MINSTRETH = 12hB82,
  CSR_ADDR_MVENDORID = 12hF11,
  CSR_ADDR_MARCHID = 12hF12,
  CSR_ADDR_MIMPID = 12hF13,
  CSR_ADDR_MHARTID = 12hF14,
  CSR_ADDR_DSCRATCH = 12h7B2
}
 

Variables

constant integer riscv_i32_ones = 0
 
constant integer riscv_i32_opc = 2
 
constant integer riscv_i32_rd = 7
 
constant integer riscv_i32_f3 = 12
 
constant integer riscv_i32_rs1 = 15
 
constant integer riscv_i32_rs2 = 20
 
constant integer riscv_i32_f7 = 25
 
constant integer riscv_i32_f12 = 20
 

Data Structure Documentation

struct t_riscv_csr_access
Data Fields
t_riscv_csr_access_type access
bit[12] address
struct t_riscv_csr_data
Data Fields
bit illegal_access
bit[4] interrupt_cause

From table 3.6 in RV priv space 1.10

t_riscv_mode interrupt_mode

Mode to enter if take_interrupt is asserted

t_riscv_word read_data
bit take_interrupt
struct t_riscv_csr_controls
Data Fields
t_riscv_mode exec_mode

Mode of instruction in the execution stage

bit interrupt
bit retire
bit timer_clear
bit timer_inc
bit timer_load
bit[64] timer_value
bit trap
t_riscv_trap_cause trap_cause
bit[32] trap_pc
bit[32] trap_value
struct t_riscv_csr_dcsr
Data Fields
bit[3] cause

1=ebreak, 2=trigger module, 3=debugger request, 4=single step as step was set

bit ebreakm

make ebreak instructions in machine mode enter debug mode

bit ebreaks

make ebreak instructions in system mode enter debug mode

bit ebreaku

make ebreak instructions in user mode enter debug mode

bit mprven

if clear ignore mstatus.mprv when in debug mode

bit nmip

asserted if an NMI is pending for the hart

bit[2] prv

mode of execution prior to entry to debug mode, and to return to on dret

bit step

when set enter debug mode after current instruction completes

bit stepie

set to enable interrupts during stepping (may be hardwired to 0)

bit stopcount

set to stop cycle and instret incrementing on instructions executed in debug mode

bit stoptime

set to disable incrementing of hart-local timers when in debug mode

bit[4] xdebug_ver

4 for conformant debug support, 0 otherwise

struct t_riscv_csr_mstatus
Data Fields
bit[2] fs
bit mie
bit mpie
bit[2] mpp
bit mprv
bit mxr
bit sd
bit sie
bit spie
bit spp
bit sum
bit tsr
bit tvm
bit tw
bit uie
bit upie
bit[2] xs
struct t_riscv_csr_mip
Data Fields
bit meip

Machine-external interrupt pending, mirroring the input pin

bit msip

Machine system interrupt pending, set by memory-mapped register if supported

bit mtip

Machine timer interrupt pending, set by memory-mapped machine timer comparator meeting mtime

bit seip

System-external interrupt pending, mirroring the input pin

bit ssip

System software interrupt pending, set by software

bit stip

System timer interrupt pending, set by software

bit ueip

User-external interrupt pending, mirroring the input pin

bit usip

User software interrupt pending, set by software

bit utip

User timer interrupt pending, set by software

struct t_riscv_csr_mie
Data Fields
bit meie

Enable for machine-external interrupt pending

bit msie

Enable for machine system interrupt pending

bit mtie

Enable for machine timer interrupt pending

bit seie

Enable for system-external interrupt pending

bit ssie

Enable for system software interrupt pending

bit stie

Enable for system timer interrupt pending

bit ueie

Enable for user-external interrupt pending

bit usie

Enable for user software interrupt pending

bit utie

Enable for user timer interrupt pending

struct t_riscv_csrs_minimal
Data Fields
bit[64] cycles

Number of cycles since reset

bit[64] instret

Number of instructions retired

bit[32] mcause

Cause of last exception

bit[32] mepc

PC at last exception

bit[32] mscratch

Scratch register for exception routines

bit[32] mtval

Value associated with last exception

bit[32] mtvec

Trap vector, can be hardwired or writable

bit[64] time

Mirror of irqs.time - may be tied to 0 if only machine mode is supported

struct t_riscv_i32_inst
Data Fields
bit[32] data
t_riscv_mode mode
struct t_riscv_i32_decode_ext
Data Fields
bit dummy
struct t_riscv_i32_decode
Data Fields
t_riscv_csr_access csr_access

CSR access if valid and legal

t_riscv_i32_decode_ext ext

extended decode, not used by the main pipeline

bit illegal

asserted if an illegal opcode

bit[32] immediate

Immediate value decoded from the instruction

bit[5] immediate_shift

Immediate shift value decoded from the instruction

bit immediate_valid

Asserted if immediate data is valid (generally used instead of source register 2)

bit is_compressed

asserted if from an i32-c decode, clear otherwise (effects link register)

bit memory_read_unsigned

if a memory read (op is riscv_opc_load), this indicates an unsigned read; otherwise ignored

t_riscv_mem_width memory_width

ignored unless memory_read or memory_write; indicates size of memory transfer

t_riscv_op op

Operation class of the instruction

bit[5] rd

Destination register that is written by the instruction

bit rd_written

Asserted if Rd is written to (hence also Rd will be non-zero)

bit requires_machine_mode

Indicates that in non-machine-mode the instruction is illlegal

bit[5] rs1

Source register 1 that is required by the instruction

bit rs1_valid

Asserted if rs1 is valid; if deasserted then rs1 is not used

bit[5] rs2

Source register 2 that is required by the instruction

bit rs2_valid

Asserted if rs2 is valid; if deasserted then rs2 is not used

t_riscv_subop subop

Subclass of the operation class

struct t_riscv_i32_alu_result
Data Fields
t_riscv_word arith_result

Use for mem_address

bit branch_condition_met
t_riscv_word branch_target
t_riscv_csr_access csr_access
t_riscv_word result

Result of ALU operation, dependent on subop

struct t_riscv_i32_coproc_controls
Data Fields
bit alu_cannot_complete

Late in cycle: If asserted, alu cannot complete because it is still working on its operation

bit alu_cannot_start

Late in cycle: If asserted, alu_idecode may be valid but rs1/rs2 are not; once deasserted it remains deasserted until a new ALU instruction starts

bit alu_flush_pipeline

Late in cycle: If asserted, flush everything prior to alu; will only be asserted during a cycle if first cycle if ALU instruction - or if alu_cannot_start

t_riscv_word alu_rs1

Early in cycle (after some muxes)

t_riscv_word alu_rs2

Early in cycle (after some muxes)

t_riscv_i32_decode dec_idecode

Mid-cycle: Idecode for the next cycle

bit dec_idecode_valid

Mid-cycle: validates dec_idecode

bit dec_to_alu_blocked

Late in the cycle: if set, ALU will not take decode; note that ALU flush overpowers this

struct t_riscv_i32_coproc_response
Data Fields
bit cannot_complete

Early in cycle: if deasserted the module is performing a calculation that has not produced a valid result yet (feeds back in to controls alu_cannot_complete)

bit cannot_start

If asserted, block start of the ALU stage - the instruction is then tried again in the next cycle, but can be interrupted

t_riscv_word result
bit result_valid

Early in cycle, if asserted then coproc overcomes the ALU result

struct t_riscv_i32_trace
Data Fields
bit branch_taken

Asserted if a branch is being taken

bit[32] branch_target

Target of branch if being taken

bit[32] instr_pc

Program counter of the instruction

bit instr_valid
t_riscv_i32_inst instruction

Instruction word being decoded

t_riscv_word rfw_data

Result of ALU/memory operation for the instruction

bit rfw_data_valid
bit[5] rfw_rd
bit rfw_retire

Asserted if an instruction is being retired

bit trap

Enumeration Type Documentation

Enumerator
riscv_abi_zero 
riscv_abi_link 
riscv_abi_sp 
Enumerator
riscv_csr_access_none 
riscv_csr_access_write 
riscv_csr_access_read 
riscv_csr_access_rw 
riscv_csr_access_rs 
riscv_csr_access_rc 
Enumerator
CSR_ADDR_READWRITE_MASK 
CSR_ADDR_READ_WRITE_A 
CSR_ADDR_READ_WRITE_B 
CSR_ADDR_READ_WRITE_C 
CSR_ADDR_READ_ONLY 
CSR_ADDR_MODE_MASK 
CSR_ADDR_USER_MODE 
CSR_ADDR_SUPERVISOR_MODE 
CSR_ADDR_HYPERVISOR_MODE 
CSR_ADDR_MACHINE_MODE 
CSR_ADDR_USTATUS 
CSR_ADDR_UIE 
CSR_ADDR_UTVEC 
CSR_ADDR_USCRATCH 
CSR_ADDR_UEPC 
CSR_ADDR_UCAUSE 
CSR_ADDR_UTVAL 
CSR_ADDR_UIP 
CSR_ADDR_CYCLE 
CSR_ADDR_TIME 
CSR_ADDR_INSTRET 
CSR_ADDR_CYCLEH 
CSR_ADDR_TIMEH 
CSR_ADDR_INSTRETH 
CSR_ADDR_SSTATUS 
CSR_ADDR_SEDELEG 
CSR_ADDR_SIDELEG 
CSR_ADDR_SIE 
CSR_ADDR_STVEC 
CSR_ADDR_SCOUNTEREN 
CSR_ADDR_SSCRATCH 
CSR_ADDR_SEPC 
CSR_ADDR_SCAUSE 
CSR_ADDR_SBADADDR 
CSR_ADDR_SIP 
CSR_ADDR_SPTBR 
CSR_ADDR_MSTATUS 
CSR_ADDR_MISA 
CSR_ADDR_MEDELEG 
CSR_ADDR_MIDELEG 
CSR_ADDR_MIE 
CSR_ADDR_MTVEC 
CSR_ADDR_MCOUNTEREN 
CSR_ADDR_MSCRATCH 
CSR_ADDR_MEPC 
CSR_ADDR_MCAUSE 
CSR_ADDR_MTVAL 
CSR_ADDR_MIP 
CSR_ADDR_MCYCLE 
CSR_ADDR_MINSTRET 
CSR_ADDR_MCYCLEH 
CSR_ADDR_MINSTRETH 
CSR_ADDR_MVENDORID 
CSR_ADDR_MARCHID 
CSR_ADDR_MIMPID 
CSR_ADDR_MHARTID 
CSR_ADDR_DSCRATCH 
Enumerator
riscv_f3_addsub 
riscv_f3_sll 
riscv_f3_slt 
riscv_f3_sltu 
riscv_f3_xor 
riscv_f3_srlsra 
riscv_f3_or 
riscv_f3_and 
Enumerator
riscv_f3_beq 
riscv_f3_bne 
riscv_f3_blt 
riscv_f3_bge 
riscv_f3_bltu 
riscv_f3_bgeu 
Enumerator
riscv_f3_lb 
riscv_f3_lh 
riscv_f3_lw 
riscv_f3_lbu 
riscv_f3_lhu 
Enumerator
riscv_f3_fence 
riscv_f3_fence_i 
Enumerator
riscv_f3_mul 
riscv_f3_mulh 
riscv_f3_mulhsu 
riscv_f3_mulhu 
riscv_f3_div 
riscv_f3_divu 
riscv_f3_rem 
riscv_f3_remu 
Enumerator
riscv_f3_sb 
riscv_f3_sh 
riscv_f3_sw 
Enumerator
riscv_f3_privileged 
riscv_f3_csrrw 
riscv_f3_csrrs 
riscv_f3_csrrc 
riscv_f3_csrrwi 
riscv_f3_csrrsi 
riscv_f3_csrrci 
Enumerator
riscv_mcause_instruction_misaligned 
riscv_mcause_instruction_fault 
riscv_mcause_illegal_instruction 
riscv_mcause_breakpoint 
riscv_mcause_load_misaligned 
riscv_mcause_load_fault 
riscv_mcause_store_misaligned 
riscv_mcause_store_fault 
riscv_mcause_uecall 
riscv_mcause_secall 
riscv_mcause_hecall 
riscv_mcause_mecall 
Enumerator
mw_byte 
mw_half 
mw_word 
enum t_riscv_op
Enumerator
riscv_op_branch 
riscv_op_jal 
riscv_op_jalr 
riscv_op_system 
riscv_op_csr 
riscv_op_misc_mem 
riscv_op_load 
riscv_op_store 
riscv_op_alu 
riscv_op_muldiv 
riscv_op_auipc 
riscv_op_lui 
riscv_op_ext 
riscv_op_illegal 
Enumerator
riscv_opc_load 
riscv_opc_load_fp 
riscv_opc_custom_0 
riscv_opc_misc_mem 
riscv_opc_op_imm 
riscv_opc_auipc 
riscv_opc_op_imm32 
riscv_opc_store 
riscv_opc_store_fp 
riscv_opc_custom_1 
riscv_opc_amo 
riscv_opc_op 
riscv_opc_lui 
riscv_opc_op32 
riscv_opc_madd 
riscv_opc_msub 
riscv_opc_nmsub 
riscv_opc_nmadd 
riscv_opc_op_fp 
riscv_opc_resvd_0 
riscv_opc_custom_2 
riscv_opc_branch 
riscv_opc_jalr 
riscv_opc_resvd_1 
riscv_opc_jal 
riscv_opc_system 
riscv_opc_resvd_2 
riscv_opc_custom_3 
Enumerator
riscv_opcc0_addi4spn 
riscv_opcc0_lw 
riscv_opcc0_sw 
riscv_opcc1_addi 
riscv_opcc1_jal 
riscv_opcc1_li 
riscv_opcc1_lui 
riscv_opcc1_arith 
riscv_opcc1_j 
riscv_opcc1_beqz 
riscv_opcc1_bnez 
riscv_opcc2_slli 
riscv_opcc2_lwsp 
riscv_opcc2_misc_alu 
riscv_opcc2_swsp 
Enumerator
riscv_subop_valid 
riscv_subop_illegal 
riscv_subop_beq 
riscv_subop_bne 
riscv_subop_blt 
riscv_subop_bge 
riscv_subop_bltu 
riscv_subop_bgeu 
riscv_subop_add 
riscv_subop_sub 
riscv_subop_sll 
riscv_subop_slt 
riscv_subop_sltu 
riscv_subop_xor 
riscv_subop_srl 
riscv_subop_sra 
riscv_subop_or 
riscv_subop_and 
riscv_subop_mull 
riscv_subop_mulhss 
riscv_subop_mulhsu 
riscv_subop_mulhu 
riscv_subop_divs 
riscv_subop_divu 
riscv_subop_rems 
riscv_subop_remu 
riscv_subop_lb 
riscv_subop_lh 
riscv_subop_lw 
riscv_subop_lbu 
riscv_subop_lhu 
riscv_subop_sb 
riscv_subop_sh 
riscv_subop_sw 
riscv_subop_ecall 
riscv_subop_ebreak 
riscv_subop_mret 
riscv_subop_mwfi 
riscv_subop_fence 
riscv_subop_fence_i 
riscv_subop_csrrw 
riscv_subop_csrrs 
riscv_subop_csrrc 
Enumerator
riscv_f12_ecall 
riscv_f12_ebreak 
riscv_f12_mret 
riscv_f12_mwfi 
Enumerator
riscv_trap_cause_instruction_misaligned 
riscv_trap_cause_instruction_fault 
riscv_trap_cause_illegal_instruction 
riscv_trap_cause_breakpoint 
riscv_trap_cause_load_misaligned 
riscv_trap_cause_load_fault 
riscv_trap_cause_store_misaligned 
riscv_trap_cause_store_fault 
riscv_trap_cause_uecall 
riscv_trap_cause_secall 
riscv_trap_cause_hecall 
riscv_trap_cause_mecall 

Variable Documentation

constant integer riscv_i32_f12 = 20
constant integer riscv_i32_f3 = 12
constant integer riscv_i32_f7 = 25
constant integer riscv_i32_ones = 0
constant integer riscv_i32_opc = 2
constant integer riscv_i32_rd = 7
constant integer riscv_i32_rs1 = 15
constant integer riscv_i32_rs2 = 20