summaryrefslogtreecommitdiff
path: root/inc/dram.h
diff options
context:
space:
mode:
authorSiddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com>2025-03-11 11:28:25 -0400
committerGitHub <noreply@github.com>2025-03-11 11:28:25 -0400
commit33c7c78b1c65c375d0291fd435e02ddc9d35681b (patch)
tree25646d98b4bfcf4b9a664eabfc2651c481984c1d /inc/dram.h
parent66edce63597093cf5f3afa5b577fd9e3ecae0ef6 (diff)
parent202f9a05d449ddc1160584c4e8a87f397f248e94 (diff)
Merge pull request #23 from bdunahu/bdunahu
Memory simulator CLI function implementation
Diffstat (limited to 'inc/dram.h')
-rw-r--r--inc/dram.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/inc/dram.h b/inc/dram.h
index 20221b7..2d4088f 100644
--- a/inc/dram.h
+++ b/inc/dram.h
@@ -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 */