diff options
author | bd <bdunahu@operationnull.com> | 2025-03-06 01:35:27 -0500 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-06 01:35:27 -0500 |
commit | 3221a2c310afb6ed124d6b67afda110d4b8dcade (patch) | |
tree | 11889ec161e7cc76e71967cd2920279d36e46910 /inc/storage.h | |
parent | e3e70b16d27b6972d6fe6f032426b889b03d1aef (diff) |
Allow sidedoor free access to writing memory
Diffstat (limited to 'inc/storage.h')
-rw-r--r-- | inc/storage.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/storage.h b/inc/storage.h index f5659c5..841c531 100644 --- a/inc/storage.h +++ b/inc/storage.h @@ -11,6 +11,7 @@ enum Accessor { FETCH, L1CACHE, IDLE, + SIDE, }; class Storage @@ -21,7 +22,7 @@ class Storage * @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 storage level. + * @return a status code reflecting the state of the request. */ virtual Response * write(Accessor accessor, signed int data, int address) = 0; @@ -29,7 +30,7 @@ class Storage * Get the data at `address`. * @param the source making the request. * @param the address being accessed. - * @return a status code reflecting the state of the storage level, and the + * @return a status code reflecting the state of the request, and the * data being returned. */ virtual Response *read(Accessor accessor, int address) = 0; @@ -44,6 +45,10 @@ class Storage protected: /** + * Helper for `write`. + */ + void do_write(signed int, int); + /** * The data currently stored in this level of storage. */ std::vector<std::array<signed int, LINE_SIZE>> *data; |