summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-05 14:17:45 -0500
committerbd <bdunahu@operationnull.com>2025-03-05 14:17:45 -0500
commitdb158de830e4fd4ab20ef5d357e24147c7a9281d (patch)
treea00ae7890a5b8eba91f81ac84d20a5ee0c5be0d6 /src/storage
parentb4d1e8248400015f2fd0c4b0f04cf33dc867e9cd (diff)
constructors + method declarations for cache, dram, reponse, storage
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/cache.cc21
-rw-r--r--src/storage/dram.cc20
2 files changed, 39 insertions, 2 deletions
diff --git a/src/storage/cache.cc b/src/storage/cache.cc
new file mode 100644
index 0000000..efcaa32
--- /dev/null
+++ b/src/storage/cache.cc
@@ -0,0 +1,21 @@
+#include <cache.h>
+
+Cache::Cache(int lines, Storage *lower, int delay)
+{
+ this->data = new std::vector<std::array<unsigned int, 4>>;
+ this->data->resize(lines);
+ this->lower = lower;
+ this->delay = delay;
+ this->lower = nullptr;
+}
+
+Cache::~Cache() { delete this->data; }
+
+Response *Cache::write(Accessor accessor, signed int data, int address)
+{
+ return new Response();
+}
+
+Response *Cache::read(Accessor accessor, int address) { return nullptr; }
+
+int **Cache::view(int base, int lines) { return nullptr; }
diff --git a/src/storage/dram.cc b/src/storage/dram.cc
index 9e6f6f1..b3b728d 100644
--- a/src/storage/dram.cc
+++ b/src/storage/dram.cc
@@ -1,5 +1,21 @@
#include <dram.h>
+#include <response.h>
-Dram::Dram() {
- address_space.resize(4096);
+Dram::Dram(int lines, int delay)
+{
+ this->data = new std::vector<std::array<unsigned int, 4>>;
+ this->data->resize(lines);
+ this->delay = delay;
+ this->lower = nullptr;
}
+
+Dram::~Dram() { delete this->data; }
+
+Response *Dram::write(Accessor accessor, signed int data, int address)
+{
+ return new Response();
+}
+
+Response *Dram::read(Accessor accessor, int address) { return nullptr; }
+
+int **Dram::view(int base, int lines) { return nullptr; }