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:
Éder Ferreira Zulian
2015-04-24 09:11:25 +02:00
parent ce7f85c3e1
commit 6cf6c6be95
4 changed files with 7 additions and 5 deletions

1
.gitignore vendored
View File

@@ -16,3 +16,4 @@ dram/build-*/
._.DS_Store
.DS_Store
*.swp
cscope*

View File

@@ -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)

View File

@@ -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<Device> 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<Device> &devices)
void Simulation::setupTlmRecorder(const string &traceName, const string &pathToResources, const std::vector<Device> &devices)
{
if(Configuration::getInstance().DatabaseRecording)
{

View File

@@ -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<Device> devices);
Simulation(sc_module_name name, string pathToResources, string traceName, DramSetup setup,
std::vector<Device> 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<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 bindSockets();
};