mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-20 03:47:15 -04:00
[cosim] Fix cosim mcycle update
This resolves an off by one issue
This commit is contained in:
parent
f44ae90040
commit
4fa6329c58
1 changed files with 5 additions and 1 deletions
|
@ -351,7 +351,11 @@ void SpikeCosim::set_mcycle(uint64_t mcycle) {
|
|||
#ifdef OLD_SPIKE
|
||||
processor->get_state()->mcycle = mcycle;
|
||||
#else
|
||||
processor->get_state()->mcycle->write(mcycle);
|
||||
// TODO: Spike decrements mcycle on write to hack around an issue it has with
|
||||
// correctly writing minstret. Preferably this write would use a backdoor
|
||||
// access and avoid that decrement but backdoor access isn't part of the
|
||||
// public CSR interface.
|
||||
processor->get_state()->mcycle->write(mcycle + 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue