summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-06 00:03:00 -0500
committerbd <bdunahu@operationnull.com>2025-03-06 00:03:00 -0500
commit20fe698a4074df4abe02f14a1a14481770e90abc (patch)
treee1d14c2ea93c1a4e6d87f007575e744a472147e0 /inc
parente296a3a6ab782cb80b7091324b41bb78db6d3906 (diff)
Storage.view method, some initial tests
Diffstat (limited to 'inc')
-rw-r--r--inc/cache.h1
-rw-r--r--inc/dram.h1
-rw-r--r--inc/storage.h4
3 files changed, 2 insertions, 4 deletions
diff --git a/inc/cache.h b/inc/cache.h
index 101cd6e..4d143aa 100644
--- a/inc/cache.h
+++ b/inc/cache.h
@@ -19,7 +19,6 @@ class Cache : public Storage
Response *write(Accessor accessor, signed int data, int address) override;
Response *read(Accessor accessor, int address) override;
- int **view(int base, int lines) override;
};
#endif /* CACHE_H_INCLUDED */
diff --git a/inc/dram.h b/inc/dram.h
index 41dd7de..6d33534 100644
--- a/inc/dram.h
+++ b/inc/dram.h
@@ -17,7 +17,6 @@ class Dram : public Storage
Response *write(Accessor accessor, signed int data, int address) override;
Response *read(Accessor accessor, int address) override;
- int **view(int base, int lines) override;
};
#endif /* DRAM_H_INCLUDED */
diff --git a/inc/storage.h b/inc/storage.h
index 1e512e2..5ad4f99 100644
--- a/inc/storage.h
+++ b/inc/storage.h
@@ -37,13 +37,13 @@ class Storage
* @return A matrix of data values, where each row is a line and each column
* is a word.
*/
- virtual int **view(int base, int lines) = 0;
+ std::vector<std::array<signed int, 4>> view(int base, int lines);
protected:
/**
* The data currently stored in this level of storage.
*/
- std::vector<std::array<unsigned int, 4>> *data;
+ std::vector<std::array<signed int, 4>> *data;
/**
* A pointer to the next lowest level of storage.
* Used in case of cache misses.