diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-27 09:12:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-27 09:12:50 -0400 |
commit | 5653b2a033e7a4173d2f178b5ce52384666d3d7b (patch) | |
tree | 5c8fc7282ad1ce0c215786a70b35296645df2a1b /tests/if.cc | |
parent | 3d0133c2f793e82d7519d8e2c5023114cd0f0eab (diff) | |
parent | a4dd1f00a5d0108058fb3bfbd5f399a507792859 (diff) |
Merge pull request #68 from bdunahu/bdunahu
[WIP] Pipeline cleanup and revisited GUI storage display
Diffstat (limited to 'tests/if.cc')
-rw-r--r-- | tests/if.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/if.cc b/tests/if.cc index 8b30d0e..e2a7dbe 100644 --- a/tests/if.cc +++ b/tests/if.cc @@ -36,7 +36,7 @@ class IFFixture int i; for (i = 0; i < this->m_delay + 1; ++i) { - r = this->ct->advance(WAIT); + r = this->ct->advance(READY); // check response CHECK(r == nullptr); } @@ -52,11 +52,11 @@ class IFFixture int i; for (i = 0; i < this->c_delay; ++i) { - r = this->ct->advance(WAIT); + r = this->ct->advance(READY); // check response REQUIRE(r == nullptr); } - r = this->ct->advance(WAIT); + r = this->ct->advance(READY); // check response REQUIRE(r != nullptr); return r; @@ -75,7 +75,7 @@ TEST_CASE_METHOD(IFFixture, "fetch returns single instuction", "[if_pipe]") InstrDTO *i; i = this->fetch_through(); - REQUIRE(i->get_instr_bits() == this->p[0]); + REQUIRE(i->slot_A == this->p[0]); delete i; } @@ -88,13 +88,13 @@ TEST_CASE_METHOD(IFFixture, "fetch returns two instuctions", "[if_pipe]") expected_cycles = this->m_delay + this->c_delay + 2; i = this->fetch_through(); - REQUIRE(i->get_instr_bits() == this->p[0]); + REQUIRE(i->slot_A == this->p[0]); delete i; expected_cycles += this->c_delay + 1; i = this->fetch_cache(); - REQUIRE(i->get_instr_bits() == this->p[1]); + REQUIRE(i->slot_A == this->p[1]); delete i; } @@ -122,9 +122,9 @@ TEST_CASE_METHOD(IFFixture, "fetch waits with old instruction", "[if_pipe]") REQUIRE(i != nullptr); } - i = this->ct->advance(WAIT); + i = this->ct->advance(READY); REQUIRE(i != nullptr); - REQUIRE(i->get_instr_bits() == this->p[0]); + REQUIRE(i->slot_A == this->p[0]); delete i; } |