diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-03-11 11:28:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 11:28:25 -0400 |
commit | 33c7c78b1c65c375d0291fd435e02ddc9d35681b (patch) | |
tree | 25646d98b4bfcf4b9a664eabfc2651c481984c1d /inc/dram.h | |
parent | 66edce63597093cf5f3afa5b577fd9e3ecae0ef6 (diff) | |
parent | 202f9a05d449ddc1160584c4e8a87f397f248e94 (diff) |
Merge pull request #23 from bdunahu/bdunahu
Memory simulator CLI function implementation
Diffstat (limited to 'inc/dram.h')
-rw-r--r-- | inc/dram.h | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1,6 +1,8 @@ #ifndef DRAM_H #define DRAM_H -#include <storage.h> +#include "definitions.h" +#include "storage.h" +#include <ostream> class Dram : public Storage { @@ -16,9 +18,12 @@ class Dram : public Storage ~Dram(); Response write(Accessor accessor, signed int data, int address) override; - Response read(Accessor accessor, int address, std::array<signed int, LINE_SIZE>& data) override; + Response read( + Accessor accessor, + int address, + std::array<signed int, LINE_SIZE> &data) override; - private: + private: /** * Helper for `write`. */ @@ -26,8 +31,9 @@ class Dram : public Storage /** * Helper for `read`. */ - void do_read(std::array<signed int, LINE_SIZE>& data_line, int address); + void do_read(std::array<signed int, LINE_SIZE> &data_line, int address); }; -#endif /* DRAM_H_INCLUDED */ +std::ostream &operator<<(std::ostream &os, const Dram &d); +#endif /* DRAM_H_INCLUDED */ |