diff --git a/src/sysc/core_complex.h b/src/sysc/core_complex.h index 33d78d1..5288a09 100644 --- a/src/sysc/core_complex.h +++ b/src/sysc/core_complex.h @@ -216,6 +216,21 @@ class core_complex : public sc_core::sc_module, public scc::traceable, public co return finish_evt; } + void register_csr_rd(unsigned csr_addr, sc2core_if::rd_csr_f &func) { + assert(core != nullptr); + core->register_csr_rd(csr_addr, func); + } + + void register_csr_wr(unsigned csr_addr, sc2core_if::wr_csr_f &func) { + assert(core != nullptr); + core->register_csr_wr(csr_addr, func); + } + + void register_unknown_instr_handler(util::delegate handler) { + assert(core != nullptr); + core->register_unknown_instr_handler(handler); + } + protected: void create_cpu(std::string const& type, std::string const& backend, unsigned gdb_port, uint32_t hart_id); int cmd_sysc(int argc, char* argv[], iss::debugger::out_func, iss::debugger::data_func, iss::debugger::target_adapter_if*);