summaryrefslogtreecommitdiff
path: root/inc/dram.h
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-10 22:07:36 -0400
committerbd <bdunahu@operationnull.com>2025-03-10 22:07:36 -0400
commit85078b99e4cf652fcbd5f4d36b061674a2fe8aa6 (patch)
tree1e3097ec91c7fcd7fc9d00f912b46814900201f0 /inc/dram.h
parent25d6d41af95cc2a2db3ba2651e5d784413c7058f (diff)
overload << operator for dram
Diffstat (limited to 'inc/dram.h')
-rw-r--r--inc/dram.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/inc/dram.h b/inc/dram.h
index 20221b7..e8d3573 100644
--- a/inc/dram.h
+++ b/inc/dram.h
@@ -1,5 +1,7 @@
#ifndef DRAM_H
#define DRAM_H
+#include "definitions.h"
+#include <ostream>
#include <storage.h>
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 */