diff options
author | bd <bdunahu@operationnull.com> | 2025-04-01 23:22:12 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-01 23:22:12 -0400 |
commit | 9e30d0054e7b3eb10e4e464b12ae3cc1eecc9585 (patch) | |
tree | 5f49ef6a4e6f7529ac0d92fa7c5f3326d4140066 /src/sim/id.cc | |
parent | 05a873027d01cdf6318d67b77a4eaad120b05527 (diff) |
Fix bug with decode pushing checked_out when delayed with RAW
Diffstat (limited to 'src/sim/id.cc')
-rw-r--r-- | src/sim/id.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sim/id.cc b/src/sim/id.cc index 0df26f4..0c0be91 100644 --- a/src/sim/id.cc +++ b/src/sim/id.cc @@ -102,9 +102,10 @@ void ID::decode_R_type(signed int &s1, signed int &s2, signed int &s3) r1 = this->read_guard(s1); r2 = this->read_guard(s2); - this->write_guard(s3); - this->status = (r1 == OK && r2 == OK) ? OK : STALLED; + + if (this->status == OK) + this->write_guard(s3); } void ID::decode_I_type( @@ -123,7 +124,8 @@ void ID::decode_I_type( r1 = this->read_guard(s1); if (m != STORE && m != STOREV) { this->status = r1; - this->write_guard(s2); + if (r1 == OK) + this->write_guard(s2); } else this->status = (this->read_guard(s2) == OK && r1 == OK) ? OK : STALLED; } |