From 6cf6c6be95598bc91fb1268aa3949f41f9b21e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20Ferreira=20Zulian?= Date: Fri, 24 Apr 2015 09:11:25 +0200 Subject: [PATCH] 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. --- .gitignore | 1 + dram/src/simulation/Dram.h | 2 +- dram/src/simulation/Simulation.cpp | 6 +++--- dram/src/simulation/Simulation.h | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index fe3e5e06..7c5afac7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ dram/build-*/ ._.DS_Store .DS_Store *.swp +cscope* diff --git a/dram/src/simulation/Dram.h b/dram/src/simulation/Dram.h index fd0cfc83..79e1aa5d 100644 --- a/dram/src/simulation/Dram.h +++ b/dram/src/simulation/Dram.h @@ -93,7 +93,7 @@ struct Dram: sc_module TlmRecorder::getInstance().recordPhase(payload, phase, sc_time_stamp() + delay); // 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(); if (phase == BEGIN_PRE) diff --git a/dram/src/simulation/Simulation.cpp b/dram/src/simulation/Simulation.cpp index b2688f86..7cbf8851 100644 --- a/dram/src/simulation/Simulation.cpp +++ b/dram/src/simulation/Simulation.cpp @@ -21,7 +21,7 @@ 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 devices) : 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::loadSimConfig(Configuration::getInstance(), setup.simconfig); - setupTlmRecorder(traceName, pathToResources, setup, devices); + setupTlmRecorder(traceName, pathToResources, devices); instantiateModules(pathToResources, devices); bindSockets(); setupDebugManager(traceName); @@ -51,7 +51,7 @@ void Simulation::setupDebugManager(const string& traceName) dbg.openDebugFile(traceName + ".txt"); } -void Simulation::setupTlmRecorder(const string &traceName, const string &pathToResources, const DramSetup &setup, const std::vector &devices) +void Simulation::setupTlmRecorder(const string &traceName, const string &pathToResources, const std::vector &devices) { if(Configuration::getInstance().DatabaseRecording) { diff --git a/dram/src/simulation/Simulation.h b/dram/src/simulation/Simulation.h index 060803c4..f398b2f9 100644 --- a/dram/src/simulation/Simulation.h +++ b/dram/src/simulation/Simulation.h @@ -46,6 +46,7 @@ class Simulation: public sc_module, public TracePlayerListener { public: SC_HAS_PROCESS(Simulation); + //Simulation(sc_module_name name, string pathToResources, string traceName, std::vector devices); Simulation(sc_module_name name, string pathToResources, string traceName, DramSetup setup, std::vector devices); ~Simulation(); @@ -75,7 +76,7 @@ private: clock_t simulationStartTime; void report(std::string message); void setupDebugManager(const string& traceName); - void setupTlmRecorder(const string &traceName, const string &pathToResources, const DramSetup &setup, const std::vector &devices); + void setupTlmRecorder(const string &traceName, const string &pathToResources, const std::vector &devices); void instantiateModules(const string &pathToResources, const std::vector &devices); void bindSockets(); };