From ee433509972d9390a52f188e902eb74e55596822 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 14 Apr 2025 16:28:05 -0400 Subject: Allow multi-level cache by passing a size into the constructor --- tests/c11.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/c11.h') diff --git a/tests/c11.h b/tests/c11.h index eb59cc0..6d63c77 100644 --- a/tests/c11.h +++ b/tests/c11.h @@ -6,12 +6,19 @@ #include #include +/** + * one way associative, single level + */ class C11 { public: - C11() : m_delay(4), c_delay(2), mem(new int), fetch(new int) + C11() { - this->c = new Cache(new Dram(this->m_delay), this->c_delay); + this->m_delay = 4; + this->c_delay = 2; + this->mem = new int(); + this->fetch = new int(); + this->c = new Cache(new Dram(this->m_delay), 5, this->c_delay); this->expected = {0, 0, 0, 0}; this->actual = this->c->view(0, 1)[0]; } -- cgit v1.2.3