diff options
author | bd <bdunahu@operationnull.com> | 2025-04-16 22:22:09 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-16 22:22:09 -0400 |
commit | 23d3ebb2702e6b08c7f6b997067e1bc76483b813 (patch) | |
tree | da31aa76d8ea073d92757466985ecdf9ff57a2d9 /tests | |
parent | b778ccc3e7c2f2ac3c4892a87f5269f342fd895f (diff) |
Partial fixes for changes in DRAM/Cache, including uncovered bug
Diffstat (limited to 'tests')
-rw-r--r-- | tests/controller.cc | 2 | ||||
-rw-r--r-- | tests/ex.cc | 2 | ||||
-rw-r--r-- | tests/id.cc | 4 | ||||
-rw-r--r-- | tests/if.cc | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/controller.cc b/tests/controller.cc index a009a70..74284b7 100644 --- a/tests/controller.cc +++ b/tests/controller.cc @@ -16,7 +16,7 @@ class ControllerPipeFixture ControllerPipeFixture() { this->d = new Dram(1); - this->c = new Cache(this->d, 0); + this->c = new Cache(this->d, 5, 0, 0); IF *f = new IF(nullptr); ID *d = new ID(f); diff --git a/tests/ex.cc b/tests/ex.cc index 13437f7..a493a21 100644 --- a/tests/ex.cc +++ b/tests/ex.cc @@ -13,7 +13,7 @@ class EXFixture EXFixture() { this->dr = new Dram(3); - this->c = new Cache(this->dr, 1); + this->c = new Cache(this->dr, 5, 0, 1); this->dum = new DUM(nullptr); this->e = new EX(dum); this->ct = new Controller(this->e, this->c, true); diff --git a/tests/id.cc b/tests/id.cc index 77a7cd9..b8d0479 100644 --- a/tests/id.cc +++ b/tests/id.cc @@ -13,7 +13,7 @@ class IDFixture IDFixture() { this->dr = new Dram(3); - this->c = new Cache(this->dr, 1); + this->c = new Cache(this->dr, 5, 0, 1); this->dum = new DUM(nullptr); this->d = new ID(dum); this->ct = new Controller(this->d, this->c, true); @@ -152,7 +152,7 @@ TEST_CASE_METHOD(IDFixture, "Parse arbitrary i-type # two", "[id]") t = this->encode_I_type(0xCC, 0b010, 0b101, 0b1011, 0b1); i = this->decode_bits(t); - + CHECK(i->get_s1() == 0x00000000); // registers are empty CHECK(i->get_s2() == 0x00000000); CHECK(i->get_s3() == 0xCC); diff --git a/tests/if.cc b/tests/if.cc index d6c1bca..5ccd73b 100644 --- a/tests/if.cc +++ b/tests/if.cc @@ -17,7 +17,7 @@ class IFFixture p = {0xC000, 0xC001, 0xC002, 0xC003}; d->load(p); - this->c = new Cache(d, this->c_delay); + this->c = new Cache(d, 5, 0, this->c_delay); this->f = new IF(nullptr); this->ct = new Controller(this->f, this->c, true); } |