forked from umd-memsys/DRAMSim2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDRAMSim.h
More file actions
52 lines (47 loc) · 1.71 KB
/
Copy pathDRAMSim.h
File metadata and controls
52 lines (47 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/****************************************************************************
* DRAMSim2: A Cycle Accurate DRAM simulator
*
* Copyright (C) 2010 Elliott Cooper-Balis
* Paul Rosenfeld
* Bruce Jacob
* University of Maryland
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*****************************************************************************/
#ifndef DRAMSIM_H
#define DRAMSIM_H
/*
* This is a public header for DRAMSim including this along with libdramsim.so should
* provide all necessary functionality to talk to an external simulator
*/
#include "Callback.h"
using std::string;
namespace DRAMSim
{
class MemorySystem
{
public:
bool addTransaction(bool isWrite, uint64_t addr);
bool WillAcceptTransaction();
void update();
void printStats();
void RegisterCallbacks(
TransactionCompleteCB *readDone,
TransactionCompleteCB *writeDone,
void (*reportPower)(double bgpower, double burstpower, double refreshpower, double actprepower));
};
MemorySystem *getMemorySystemInstance(unsigned id, string dev, string sys, string pwd, string trc, unsigned megsOfMemory);
}
#endif