diff options
author | bd <bdunaisky@umass.edu> | 2025-03-06 21:28:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-06 21:28:20 +0000 |
commit | 0983f834b66f046c5468814fa86af3f4a3c215b6 (patch) | |
tree | af137790ab40290d1cc4e83f3261370c591512bc /src | |
parent | e3369aad54bce775e2951e71618eb2cbb17972f9 (diff) | |
parent | e296a3a6ab782cb80b7091324b41bb78db6d3906 (diff) |
Merge pull request #13 from bdunahu/bdunahu
constructors + method declarations for cache, dram, reponse, storage
Diffstat (limited to 'src')
-rw-r--r-- | src/memory/driver.cc | 0 | ||||
-rw-r--r-- | src/storage/cache.cc | 21 | ||||
-rw-r--r-- | src/storage/dram.cc | 21 |
3 files changed, 42 insertions, 0 deletions
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/cache.cc b/src/storage/cache.cc new file mode 100644 index 0000000..34bdc5f --- /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 new file mode 100644 index 0000000..20858cd --- /dev/null +++ b/src/storage/dram.cc @@ -0,0 +1,21 @@ +#include <dram.h> +#include <response.h> + +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; } |