diff --git a/inc/BASE_ISA.h b/inc/BASE_ISA.h index b697cbf..e595628 100644 --- a/inc/BASE_ISA.h +++ b/inc/BASE_ISA.h @@ -1787,7 +1787,7 @@ namespace riscv_tlm { * @brief Decodes opcode of instruction * @return opcode of instruction */ - opCodes decode() { + opCodes decode() const { switch (opcode()) { case LUI: return OP_LUI; diff --git a/inc/C_extension.h b/inc/C_extension.h index 331e7d0..90e6ada 100644 --- a/inc/C_extension.h +++ b/inc/C_extension.h @@ -182,7 +182,7 @@ namespace riscv_tlm { return aux; } - inline void set_imm_I(std::uint32_t value) { + inline void set_imm_I(std::uint32_t value) const { this->m_instr.range(31, 20) = value; }