summaryrefslogtreecommitdiff
path: root/tests/cache_2_1.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-14 16:28:05 -0400
committerbd <bdunahu@operationnull.com>2025-04-14 16:28:05 -0400
commitee433509972d9390a52f188e902eb74e55596822 (patch)
treea2bb8d9eb7220cbaf147c3af3fb837bec6736296 /tests/cache_2_1.cc
parentb91eb002d4e6b2dc0c51b03df57c5089659ac669 (diff)
Allow multi-level cache by passing a size into the constructor
Diffstat (limited to 'tests/cache_2_1.cc')
-rw-r--r--tests/cache_2_1.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/cache_2_1.cc b/tests/cache_2_1.cc
new file mode 100644
index 0000000..101c6c3
--- /dev/null
+++ b/tests/cache_2_1.cc
@@ -0,0 +1,21 @@
+#include "c11.h"
+#include "cache.h"
+#include "dram.h"
+#include "storage.h"
+#include <catch2/catch_test_macros.hpp>
+
+/**
+ * one way associative, two level
+ */
+class C21 : public C11
+{
+ public:
+ C21() : C11()
+ {
+ Storage *s;
+
+ s = new Dram(this->m_delay);
+ s = new Cache(s, 5, this->c_delay);
+ this->c = new Cache(s, 7, this->c_delay);
+ }
+};