adds tracing functionality

This commit is contained in:
2023-09-22 12:40:35 +02:00
parent f74f98f361
commit 212fb1c8ff
6 changed files with 63 additions and 32 deletions

View File

@ -329,9 +329,9 @@ protected:
*/
const std::string core_type_name() const override { return traits<BASE>::core_type; }
uint64_t get_pc() override { return arch.reg.PC; };
uint64_t get_pc() override { return arch.reg.PC; }
uint64_t get_next_pc() override { return arch.reg.NEXT_PC; };
uint64_t get_next_pc() override { return arch.reg.NEXT_PC; }
uint64_t get_instr_word() override { return arch.reg.instruction; }
@ -341,9 +341,11 @@ protected:
uint64_t get_total_cycles() override { return arch.reg.icount + arch.cycle_offset; }
void update_last_instr_cycles(unsigned cycles) override { arch.cycle_offset += cycles - 1; };
void update_last_instr_cycles(unsigned cycles) override { arch.cycle_offset += cycles - 1; }
bool is_branch_taken() override { return arch.reg.last_branch; };
bool is_branch_taken() override { return arch.reg.last_branch; }
unsigned get_reg_num() override {return traits<BASE>::NUM_REGS; }
riscv_hart_mu_p<BASE, FEAT> &arch;
};