fixes quantum and quantum break handling
This commit is contained in:
@@ -39,8 +39,13 @@ public:
|
||||
uint64_t get_state() override { return this->state.mstatus.backing.val; }
|
||||
|
||||
void notify_phase(iss::arch_if::exec_phase p) override {
|
||||
if (p == iss::arch_if::ISTART)
|
||||
if (p == iss::arch_if::ISTART && !first) {
|
||||
auto cycle_incr = owner->get_last_bus_cycles();
|
||||
if(cycle_incr>1)
|
||||
this->instr_if.update_last_instr_cycles(cycle_incr);
|
||||
owner->sync(this->instr_if.get_total_cycles());
|
||||
}
|
||||
first=false;
|
||||
}
|
||||
|
||||
iss::sync_type needed_sync() const override { return iss::PRE_SYNC; }
|
||||
@@ -175,8 +180,9 @@ public:
|
||||
private:
|
||||
sysc::tgfs::core_complex *const owner;
|
||||
sc_core::sc_event wfi_evt;
|
||||
uint64_t hostvar;
|
||||
uint64_t hostvar{std::numeric_limits<uint64_t>::max()};
|
||||
unsigned to_host_wr_cnt = 0;
|
||||
bool first{true};
|
||||
};
|
||||
}
|
||||
#endif /* _SYSC_SC_CORE_ADAPTER_H_ */
|
||||
|
Reference in New Issue
Block a user