From db158de830e4fd4ab20ef5d357e24147c7a9281d Mon Sep 17 00:00:00 2001 From: bd Date: Wed, 5 Mar 2025 14:17:45 -0500 Subject: constructors + method declarations for cache, dram, reponse, storage --- src/storage/cache.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/storage/cache.cc (limited to 'src/storage/cache.cc') 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::Cache(int lines, Storage *lower, int delay) +{ + this->data = new std::vector>; + 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; } -- cgit v1.2.3