45 #ifndef __MEM_DRAMSIM2_WRAPPER_HH__
46 #define __MEM_DRAMSIM2_WRAPPER_HH__
50 #include "DRAMSim2/Callback.h"
57 class MultiChannelMemorySystem;
74 DRAMSim::MultiChannelMemorySystem*
dramsim;
84 const std::string& file_name)
const;
100 const std::string& system_file,
101 const std::string& working_dir,
102 const std::string& trace_file,
103 unsigned int memory_size_mb,
118 void setCallbacks(DRAMSim::TransactionCompleteCB* read_callback,
119 DRAMSim::TransactionCompleteCB* write_callback);
163 #endif //__MEM_DRAMSIM2_WRAPPER_HH__
Wrapper class to avoid having DRAMSim2 names like ClockDomain etc clashing with the normal gem5 world...
void printStats()
Print the stats gathered in DRAMsim2.
void enqueue(bool is_write, uint64_t addr)
Enqueue a packet.
DRAMSim::MultiChannelMemorySystem * dramsim
double clockPeriod() const
Get the internal clock period used by DRAMSim2, specified in ns.
void setCallbacks(DRAMSim::TransactionCompleteCB *read_callback, DRAMSim::TransactionCompleteCB *write_callback)
Set the callbacks to use for read and write completion.
unsigned int queueSize() const
Get the transaction queue size used by DRAMSim2.
bool canAccept() const
Determine if the controller can accept a new packet or not.
DRAMSim2Wrapper(const std::string &config_file, const std::string &system_file, const std::string &working_dir, const std::string &trace_file, unsigned int memory_size_mb, bool enable_debug)
Create an instance of the DRAMSim2 multi-channel memory controller using a specific config and system...
unsigned int burstSize() const
Get the burst size in bytes used by DRAMSim2.
void tick()
Progress the memory controller one cycle.
T extractConfig(const std::string &field_name, const std::string &file_name) const