From b4d1e8248400015f2fd0c4b0f04cf33dc867e9cd Mon Sep 17 00:00:00 2001 From: bd Date: Tue, 4 Mar 2025 16:07:29 -0500 Subject: Impartial storage/dram classes --- inc/dram.h | 16 ++++++++++++++++ inc/storage.h | 15 +++++++++++++++ src/memory/driver.cc | 0 src/storage/dram.cc | 5 +++++ 4 files changed, 36 insertions(+) create mode 100644 inc/dram.h create mode 100644 inc/storage.h delete mode 100644 src/memory/driver.cc create mode 100644 src/storage/dram.cc 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 + +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 +#include + +class Storage +{ + public: + int **view(int base) { return nullptr; } + virtual bool store(); + + std::vector> 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 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::Dram() { + address_space.resize(4096); +} -- cgit v1.2.3