Warnings eliminated.
Variable surrounded by IFPOW() macro since it is only needed for power simulations. Unused variable removed. Warning suppressed with __attribute__((__unused__)). The variable was not removed because of its type: sc_module_name. It may be useful. Other changes: cscope* added to gitignore.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,3 +16,4 @@ dram/build-*/
|
|||||||
._.DS_Store
|
._.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.swp
|
*.swp
|
||||||
|
cscope*
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ struct Dram: sc_module
|
|||||||
TlmRecorder::getInstance().recordPhase(payload, phase, sc_time_stamp() + delay);
|
TlmRecorder::getInstance().recordPhase(payload, phase, sc_time_stamp() + delay);
|
||||||
|
|
||||||
// This is only needed for power simulation:
|
// This is only needed for power simulation:
|
||||||
unsigned long long cycle = sc_time_stamp().value()/Configuration::getInstance().memSpec.clk.value();
|
IFPOW(unsigned long long cycle = sc_time_stamp().value()/Configuration::getInstance().memSpec.clk.value());
|
||||||
unsigned int bank = DramExtension::getExtension(payload).getBank().ID();
|
unsigned int bank = DramExtension::getExtension(payload).getBank().ID();
|
||||||
|
|
||||||
if (phase == BEGIN_PRE)
|
if (phase == BEGIN_PRE)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Simulation::Simulation(sc_module_name /*name*/, string pathToResources, string traceName, DramSetup setup,
|
Simulation::Simulation(sc_module_name __attribute__((__unused__)) name, string pathToResources, string traceName, DramSetup setup,
|
||||||
std::vector<Device> devices) :
|
std::vector<Device> devices) :
|
||||||
traceName(traceName), dramSetup(setup)
|
traceName(traceName), dramSetup(setup)
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ Simulation::Simulation(sc_module_name /*name*/, string pathToResources, string t
|
|||||||
ConfigurationLoader::loadMemSpec(Configuration::getInstance(), setup.memspec);//pathToResources + string("configs/memspecs/") + setup.memspec);
|
ConfigurationLoader::loadMemSpec(Configuration::getInstance(), setup.memspec);//pathToResources + string("configs/memspecs/") + setup.memspec);
|
||||||
ConfigurationLoader::loadSimConfig(Configuration::getInstance(), setup.simconfig);
|
ConfigurationLoader::loadSimConfig(Configuration::getInstance(), setup.simconfig);
|
||||||
|
|
||||||
setupTlmRecorder(traceName, pathToResources, setup, devices);
|
setupTlmRecorder(traceName, pathToResources, devices);
|
||||||
instantiateModules(pathToResources, devices);
|
instantiateModules(pathToResources, devices);
|
||||||
bindSockets();
|
bindSockets();
|
||||||
setupDebugManager(traceName);
|
setupDebugManager(traceName);
|
||||||
@@ -51,7 +51,7 @@ void Simulation::setupDebugManager(const string& traceName)
|
|||||||
dbg.openDebugFile(traceName + ".txt");
|
dbg.openDebugFile(traceName + ".txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Simulation::setupTlmRecorder(const string &traceName, const string &pathToResources, const DramSetup &setup, const std::vector<Device> &devices)
|
void Simulation::setupTlmRecorder(const string &traceName, const string &pathToResources, const std::vector<Device> &devices)
|
||||||
{
|
{
|
||||||
if(Configuration::getInstance().DatabaseRecording)
|
if(Configuration::getInstance().DatabaseRecording)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class Simulation: public sc_module, public TracePlayerListener
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SC_HAS_PROCESS(Simulation);
|
SC_HAS_PROCESS(Simulation);
|
||||||
|
//Simulation(sc_module_name name, string pathToResources, string traceName, std::vector<Device> devices);
|
||||||
Simulation(sc_module_name name, string pathToResources, string traceName, DramSetup setup,
|
Simulation(sc_module_name name, string pathToResources, string traceName, DramSetup setup,
|
||||||
std::vector<Device> devices);
|
std::vector<Device> devices);
|
||||||
~Simulation();
|
~Simulation();
|
||||||
@@ -75,7 +76,7 @@ private:
|
|||||||
clock_t simulationStartTime;
|
clock_t simulationStartTime;
|
||||||
void report(std::string message);
|
void report(std::string message);
|
||||||
void setupDebugManager(const string& traceName);
|
void setupDebugManager(const string& traceName);
|
||||||
void setupTlmRecorder(const string &traceName, const string &pathToResources, const DramSetup &setup, const std::vector<Device> &devices);
|
void setupTlmRecorder(const string &traceName, const string &pathToResources, const std::vector<Device> &devices);
|
||||||
void instantiateModules(const string &pathToResources, const std::vector<Device> &devices);
|
void instantiateModules(const string &pathToResources, const std::vector<Device> &devices);
|
||||||
void bindSockets();
|
void bindSockets();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user