diff --git a/gen_input/templates/interp/CORENAME.cpp.gtl b/gen_input/templates/interp/CORENAME.cpp.gtl index c893bbd..3361b14 100644 --- a/gen_input/templates/interp/CORENAME.cpp.gtl +++ b/gen_input/templates/interp/CORENAME.cpp.gtl @@ -175,22 +175,8 @@ private: decoder instr_decoder; iss::status fetch_ins(virt_addr_t pc, uint8_t * data){ - if(this->core.has_mmu()) { - auto phys_pc = this->core.virt2phys(pc); -// if ((pc.val & upper_bits) != ((pc.val + 2) & upper_bits)) { // we may cross a page boundary -// if (this->core.read(phys_pc, 2, data) != iss::Ok) return iss::Err; -// if ((data[0] & 0x3) == 0x3) // this is a 32bit instruction -// if (this->core.read(this->core.v2p(pc + 2), 2, data + 2) != iss::Ok) -// return iss::Err; -// } else { - if (this->core.read(phys_pc, 4, data) != iss::Ok) - return iss::Err; -// } - } else { - if (this->core.read(phys_addr_t(pc.access, pc.space, pc.val), 4, data) != iss::Ok) - return iss::Err; - - } + if (this->core.read(iss::address_type::PHYSICAL, pc.access, pc.space, pc.val, 4, data) != iss::Ok) + return iss::Err; return iss::Ok; } };