1 // See LICENSE for license details.
3 #ifndef _RISCV_SV_DECODE_H
4 #define _RISCV_SV_DECODE_H
14 class sv_insn_t
: public insn_t
17 sv_insn_t(insn_bits_t bits
, int& v
, unsigned int f
) :
18 insn_t(bits
), voffs(v
), fimap(f
) {}
19 uint64_t rd () { return remap(insn_t::rd (), fimap
& REG_RD
); }
20 uint64_t rs1() { return remap(insn_t::rs1(), fimap
& REG_RS1
); }
21 uint64_t rs2() { return remap(insn_t::rs2(), fimap
& REG_RS2
); }
22 uint64_t rs3() { return remap(insn_t::rs3(), fimap
& REG_RS3
); }
26 // remaps the register through the lookup table.
27 // will need to take the current loop index/offset somehow
28 uint64_t remap(uint64_t reg
, bool isint
);