summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-04 16:07:29 -0500
committerbd <bdunahu@operationnull.com>2025-03-04 16:07:29 -0500
commitb4d1e8248400015f2fd0c4b0f04cf33dc867e9cd (patch)
treec2544110d7e6c6bdcab9dee9527a1d8a67d324de
parenta9af4fd3243e470ff33d50968f998bf78c152717 (diff)
Impartial storage/dram classes
-rw-r--r--inc/dram.h16
-rw-r--r--inc/storage.h15
-rw-r--r--src/memory/driver.cc0
-rw-r--r--src/storage/dram.cc5
4 files changed, 36 insertions, 0 deletions
diff --git a/inc/dram.h b/inc/dram.h
new file mode 100644
index 0000000..5bc933e
--- /dev/null
+++ b/inc/dram.h
@@ -0,0 +1,16 @@
+#ifndef DRAM_H
+#define DRAM_H
+#include <storage.h>
+
+class Dram : public Storage
+{
+ public:
+ Dram();
+ ~Dram();
+
+ int *load_line(int);
+
+ private:
+};
+
+#endif /* DRAM_H_INCLUDED */
diff --git a/inc/storage.h b/inc/storage.h
new file mode 100644
index 0000000..8973016
--- /dev/null
+++ b/inc/storage.h
@@ -0,0 +1,15 @@
+#ifndef STORAGE_H
+#define STORAGE_H
+#include <array>
+#include <vector>
+
+class Storage
+{
+ public:
+ int **view(int base) { return nullptr; }
+ virtual bool store();
+
+ std::vector<std::array<signed int, 4>> address_space;
+};
+
+#endif /* STORAGE_H_INCLUDED */
diff --git a/src/memory/driver.cc b/src/memory/driver.cc
deleted file mode 100644
index e69de29..0000000
--- a/src/memory/driver.cc
+++ /dev/null
diff --git a/src/storage/dram.cc b/src/storage/dram.cc
new file mode 100644
index 0000000..9e6f6f1
--- /dev/null
+++ b/src/storage/dram.cc
@@ -0,0 +1,5 @@
+#include <dram.h>
+
+Dram::Dram() {
+ address_space.resize(4096);
+}