diff options
author | bd <bdunahu@operationnull.com> | 2025-04-01 22:06:42 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-01 22:06:42 -0400 |
commit | d4e3a7a3b1cff6885978093d5cc125e38cc397b3 (patch) | |
tree | 92caf723e7eadfa063fafe2291ca6ec4ed9513e0 /tests/controller.cc | |
parent | 68324683cde10c636a4a602644f3e64d24b0e412 (diff) |
Finish adding initial tests for full pipeline
Diffstat (limited to 'tests/controller.cc')
-rw-r--r-- | tests/controller.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/controller.cc b/tests/controller.cc index c36eba6..c7e3c93 100644 --- a/tests/controller.cc +++ b/tests/controller.cc @@ -187,7 +187,6 @@ TEST_CASE_METHOD(ControllerPipeFixture, "two num adder", "[full pipe]") CHECK(i->get_instr_bits() == b3); delete i; - i = this->ct->advance(WAIT); REQUIRE(i == nullptr); i = this->ct->advance(WAIT); @@ -259,7 +258,6 @@ TEST_CASE_METHOD(ControllerPipeFixture, "two num adder", "[full pipe]") CHECK(i->get_time_of(WRITE) == 22); CHECK(i->get_s1() == 0xE); CHECK(i->get_s2() == 0x7); - CHECK(i->get_s3() == 0x0); // doesn't exist CHECK(this->ct->get_gprs().at(2) == 0x200); CHECK(this->ct->get_gprs().at(6) == 0x1); CHECK(i->get_pc() == 0x7); @@ -332,11 +330,11 @@ TEST_CASE_METHOD(ControllerPipeFixture, "two num adder", "[full pipe]") REQUIRE(i != nullptr); CHECK(i->get_mnemonic() == NOP); + delete i; - i = this->ct->advance(WAIT); REQUIRE(i != nullptr); // it was already in cache - + CHECK(i->get_time_of(FETCH) == 29); // clear out pipe (4) CHECK(i->get_time_of(DCDE) == 30); CHECK(i->get_time_of(EXEC) == 31); @@ -366,8 +364,8 @@ TEST_CASE_METHOD(ControllerPipeFixture, "two num adder", "[full pipe]") CHECK(i->get_time_of(EXEC) == 34); CHECK(i->get_time_of(MEM) == 35); CHECK(i->get_time_of(WRITE) == 36); - CHECK(i->get_s1() == 0x0); - CHECK(i->get_s2() == 0x200); + CHECK(i->get_s1() == 0x1); + CHECK(i->get_s2() == 0x0); CHECK(i->get_s3() == 0x0); CHECK(this->ct->get_gprs().at(2) == 0x200); CHECK(this->ct->get_gprs().at(6) == 0x1); |