#ifndef DRAM_H #define DRAM_H #include "definitions.h" #include "storage.h" #include class Dram : public Storage { public: /** * Constructor. * @param The number of `lines` contained in memory. The total number of * words is this number multiplied by LINE_SIZE. * @param The number of clock cycles each access takes. * @return A new memory object. */ Dram(int lines, int delay); ~Dram(); Response write(Accessor accessor, signed int data, int address) override; Response read( Accessor accessor, int address, std::array &data) override; private: /** * Helper for `write`. */ void do_write(signed int, int); /** * Helper for `read`. */ void do_read(std::array &data_line, int address); }; std::ostream &operator<<(std::ostream &os, const Dram &d); #endif /* DRAM_H_INCLUDED */