diff options
author | Siddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com> | 2025-03-11 11:18:01 -0400 |
---|---|---|
committer | Siddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com> | 2025-03-11 11:34:13 -0400 |
commit | 93b010dbbcdc921bfccae673918eb9fbf354538a (patch) | |
tree | ba813d226ae916abfef2502d3746f8fa3fbc40dc /inc/storage.h | |
parent | 1e1279817e8a2a03b8c1acb9425464c82a065e01 (diff) |
support for reading word, writing line to storage, dirty cache eviction, cache load
Diffstat (limited to 'inc/storage.h')
-rw-r--r-- | inc/storage.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/inc/storage.h b/inc/storage.h index a30e74d..fc93d7a 100644 --- a/inc/storage.h +++ b/inc/storage.h @@ -14,15 +14,22 @@ class Storage virtual ~Storage() = default; /** - * Write `data` into `address`. + * Write `data` word into `address`. * @param the source making the request. * @param the data (hexadecimal) to write. * @param the address to write to. * @return a status code reflecting the state of the request. */ virtual Response write(Accessor accessor, signed int data, int address) = 0; + + /** + * Write a data line to given address in this level of storage + */ + virtual Response write_line(Accessor accessor, std::array<signed int, LINE_SIZE> data_line, int address) = 0; + + /** - * Get the data at `address`. + * Get the data line at `address`. * @param the source making the request. * @param the address being accessed. * @return a status code reflecting the state of the request, and the @@ -32,6 +39,12 @@ class Storage Accessor accessor, int address, std::array<signed int, LINE_SIZE> &data) = 0; + + /** + * Read a word from given address in this level of storage + */ + virtual Response read_word(Accessor accessor, int address, signed int &data) = 0; + /** * Sidedoor view of `lines` of memory starting at `base`. * @param The base line to start getting memory from. |