summaryrefslogtreecommitdiff
path: root/tests/cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cache.cc')
-rw-r--r--tests/cache.cc23
1 files changed, 6 insertions, 17 deletions
diff --git a/tests/cache.cc b/tests/cache.cc
index 14459b9..0b04bce 100644
--- a/tests/cache.cc
+++ b/tests/cache.cc
@@ -25,8 +25,7 @@ class CacheFixture
{
for (int i = 0; i < delay; ++i) {
Response r = f();
- this->c->resolve();
-
+
// check response
CHECK(r == expected);
// check for early modifications
@@ -90,8 +89,7 @@ TEST_CASE_METHOD(
CHECK(r == BLOCKED);
r = c->write_word(FETCH, w, 0b1);
CHECK(r == WAIT);
- this->c->resolve();
-
+
// check for early modifications
actual = c->view(0, 1)[0];
REQUIRE(this->expected == this->actual);
@@ -102,8 +100,7 @@ TEST_CASE_METHOD(
CHECK(r == WAIT);
r = c->write_word(FETCH, w, 0b1);
CHECK(r == WAIT);
- this->c->resolve();
-
+
// check for early modifications
actual = c->view(0, 1)[0];
REQUIRE(this->expected == this->actual);
@@ -111,11 +108,6 @@ TEST_CASE_METHOD(
r = c->write_word(MEM, w, 0b0);
CHECK(r == OK);
- // clock cycle did NOT resolve yet!
- // this fetch should not make progress
- r = c->write_word(FETCH, w, 0b1);
- CHECK(r == WAIT);
- c->resolve();
actual = d->view(0, 1)[0];
// we do NOT write back now!
@@ -132,8 +124,7 @@ TEST_CASE_METHOD(
r = c->write_word(FETCH, w, 0b1);
CHECK(r == OK);
- c->resolve();
-
+
expected.at(1) = w;
actual = c->view(0, 1)[0];
REQUIRE(expected == actual);
@@ -161,8 +152,7 @@ TEST_CASE_METHOD(
r = c->write_word(MEM, w, 0b0);
CHECK(r == OK);
- c->resolve();
-
+
expected.at(0) = w;
actual = c->view(0, 1)[0];
REQUIRE(expected == actual);
@@ -180,8 +170,7 @@ TEST_CASE_METHOD(
// after the fetch, this cache line should be empty
this->c->write_word(FETCH, w, 0b10000001);
CHECK(r == OK);
- c->resolve();
-
+
expected.at(0) = 0;
actual = c->view(0, 1)[0];
CHECK(expected == actual);