00001 #ifndef _DRAMSIMFRONT_H
00002 #define _DRAMSIMFRONT_H
00003
00004 #include <sst/core/eventFunctor.h>
00005 #include <sst/core/component.h>
00006 #include <memoryDev.h>
00007 #include <fstream>
00008 #include <Transaction.h>
00009
00010 #ifndef DRAMSIMT_DBG
00011 #define DRAMSIMT_DBG
00012 #endif
00013
00014 using namespace SST;
00015
00016 class DRAMSimTrace : public Component {
00017
00018 public:
00019
00020 DRAMSimTrace( ComponentId_t id, Params_t& params );
00021
00022 private:
00023
00024 DRAMSimTrace();
00025 DRAMSimTrace( const DRAMSimTrace& c );
00026 bool clock( Cycle_t );
00027
00028 private:
00029
00030 struct Op {
00031 uint64_t addr;
00032 enum DRAMSim::TransactionType type;
00033 };
00034
00035 typedef MemoryDev< uint64_t, Op* > memDev_t;
00036
00037 private:
00038
00039 Op* m_onDeckOp;
00040
00041 std::ifstream m_traceFile;
00042 TraceType m_traceType;
00043 memDev_t* m_memory;
00044
00045 uint64_t m_clockCycle;
00046 Log< DRAMSIMT_DBG >& m_dbg;
00047 Log<> m_log;
00048 };
00049
00050 #endif