fixes sc_core_adapter wrt refactored memory hierarchy
This commit is contained in:
@@ -365,6 +365,7 @@ template <typename BASE, typename LOGCAT = logging::disass> struct riscv_hart_co
|
||||
csr_wr_cb[minstreth] = MK_CSR_WR_CB(write_instret);
|
||||
csr_rd_cb[mhartid] = MK_CSR_RD_CB(read_hartid);
|
||||
};
|
||||
|
||||
~riscv_hart_common() {
|
||||
if(io_buf.str().length()) {
|
||||
CPPLOG(INFO) << "tohost send '" << io_buf.str() << "'";
|
||||
@@ -427,14 +428,12 @@ template <typename BASE, typename LOGCAT = logging::disass> struct riscv_hart_co
|
||||
#endif
|
||||
}
|
||||
}
|
||||
try {
|
||||
tohost = symbol_table.at("tohost");
|
||||
} catch(std::out_of_range& e) {
|
||||
}
|
||||
try {
|
||||
fromhost = symbol_table.at("fromhost");
|
||||
} catch(std::out_of_range& e) {
|
||||
}
|
||||
auto to_it = symbol_table.find("tohost");
|
||||
if(to_it!=std::end(symbol_table))
|
||||
tohost = to_it->second;
|
||||
auto from_it = symbol_table.find("tohost");
|
||||
if(from_it!=std::end(symbol_table))
|
||||
tohost = from_it->second;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -743,12 +742,12 @@ template <typename BASE, typename LOGCAT = logging::disass> struct riscv_hart_co
|
||||
|
||||
mem::memory_hierarchy memories;
|
||||
|
||||
virtual mem::memory_if get_mem_if() override {
|
||||
assert(false || "This function should nevver be called");
|
||||
mem::memory_if get_mem_if() override {
|
||||
assert(false || "This function should never be called");
|
||||
return mem::memory_if{};
|
||||
}
|
||||
|
||||
virtual void set_next(mem::memory_if mem_if) { memory = mem_if; };
|
||||
void set_next(mem::memory_if mem_if) override { memory = mem_if; };
|
||||
|
||||
void set_irq_num(unsigned i) { mcause_max_irq = 1 << util::ilog2(i); }
|
||||
|
||||
|
Reference in New Issue
Block a user