gute frage^^

This commit is contained in:
Janik Schlemminger
2014-10-08 21:04:44 +02:00
parent e105d54045
commit f35cc43186
14 changed files with 159 additions and 14 deletions

View File

@@ -0,0 +1,15 @@
<memspec>
<memconfig>
<parameter id="bankwiseLogic" type="bool" value="1" />
<parameter id="openPagePolicy" type="bool" value="1" />
<parameter id="adaptiveOpenPagePolicy" type="bool" value="0" />
<parameter id="refreshAwareScheduling" type="bool" value="0" />
<parameter id="maxNrOfTransactionsInDram" type="uint" value="2000" />
<parameter id="scheduler" type="string" value="FR_FCFS" />
<parameter id="capsize" type="uint" value="5" />
<parameter id="powerDownMode" type="string" value="Staggered" />
<parameter id="powerDownTimeout" type="uint" value="3" />
<parameter id="databaseRecordingEnabled" type="bool" value="1" />
</memconfig>
</memspec>

View File

@@ -0,0 +1,15 @@
<memspec>
<memconfig>
<parameter id="bankwiseLogic" type="bool" value="0" />
<parameter id="openPagePolicy" type="bool" value="1" />
<parameter id="adaptiveOpenPagePolicy" type="bool" value="0" />
<parameter id="refreshAwareScheduling" type="bool" value="0" />
<parameter id="maxNrOfTransactionsInDram" type="uint" value="2000" />
<parameter id="scheduler" type="string" value="FR_FCFS" />
<parameter id="capsize" type="uint" value="5" />
<parameter id="powerDownMode" type="string" value="Staggered" />
<parameter id="powerDownTimeout" type="uint" value="3" />
<parameter id="databaseRecordingEnabled" type="bool" value="1" />
</memconfig>
</memspec>

View File

@@ -0,0 +1,14 @@
<memspec>
<memconfig>
<parameter id="bankwiseLogic" type="bool" value="0" />
<parameter id="openPagePolicy" type="bool" value="1" />
<parameter id="adaptiveOpenPagePolicy" type="bool" value="0" />
<parameter id="refreshAwareScheduling" type="bool" value="1" />
<parameter id="maxNrOfTransactionsInDram" type="uint" value="50" />
<parameter id="scheduler" type="string" value="Grouper" />
<parameter id="capsize" type="uint" value="5" />
<parameter id="powerDownMode" type="string" value="Staggered" />
<parameter id="powerDownTimeout" type="uint" value="100" />
<parameter id="databaseRecordingEnabled" type="bool" value="1" />
</memconfig>
</memspec>

View File

@@ -0,0 +1,15 @@
<memspec>
<memconfig>
<parameter id="bankwiseLogic" type="bool" value="0" />
<parameter id="openPagePolicy" type="bool" value="1" />
<parameter id="adaptiveOpenPagePolicy" type="bool" value="0" />
<parameter id="refreshAwareScheduling" type="bool" value="1" />
<parameter id="maxNrOfTransactionsInDram" type="uint" value="50" />
<parameter id="scheduler" type="string" value="PAR_BS" />
<parameter id="capsize" type="uint" value="8" />
<parameter id="powerDownMode" type="string" value="Staggered" />
<parameter id="powerDownTimeout" type="uint" value="3" />
<parameter id="databaseRecordingEnabled" type="bool" value="0" />
</memconfig>
</memspec>

View File

@@ -0,0 +1,15 @@
<memspec>
<memconfig>
<parameter id="bankwiseLogic" type="bool" value="0" />
<parameter id="openPagePolicy" type="bool" value="1" />
<parameter id="adaptiveOpenPagePolicy" type="bool" value="0" />
<parameter id="refreshAwareScheduling" type="bool" value="0" />
<parameter id="maxNrOfTransactionsInDram" type="uint" value="50" />
<parameter id="scheduler" type="string" value="PAR_BS" />
<parameter id="capsize" type="uint" value="8" />
<parameter id="powerDownMode" type="string" value="Staggered" />
<parameter id="powerDownTimeout" type="uint" value="3" />
<parameter id="databaseRecordingEnabled" type="bool" value="1" />
</memconfig>
</memspec>

View File

@@ -0,0 +1,5 @@
<simconfig>
<DatabaseRecording value="1" />
<PowerAnalysys value="0" />
<Debug value="0" />
</simconfig>

View File

@@ -3,13 +3,13 @@
<Debug value="1" />
</simconfig>
<memspecs>
<memspec src="/home/schlemmi/newconfigs/mems.xml"></memspec>
<memspec src="/home/jonny/newconfigs/mems.xml"></memspec>
</memspecs>
<addressmappings>
<addressmapping src="/home/schlemmi/newconfigs/amc.xml"></addressmapping>
<addressmapping src="/home/jonny/newconfigs/amc.xml"></addressmapping>
</addressmappings>
<memconfigs>
<memconfig src="/home/schlemmi/newconfigs/memc.xml">
<memconfig src="/home/jonny/newconfigs/memc.xml">
</memconfig>
</memconfigs>
@@ -17,7 +17,7 @@
<tracesetup id="medium">
<!--<device clkMhz="200">test.stl</device>-->
<device clkMhz="200">medium.stl</device>
<device clkMhz="200">small.stl</device>
</tracesetup>
</tracesetups>

View File

@@ -129,14 +129,40 @@ string queryStringParameter(XMLElement* node, string name)
return 0;
}
string errorToString(XMLError error)
{
switch(error){
case XML_NO_ERROR: return "no error"; case XML_NO_ATTRIBUTE: return "NO_ATTRIBUTE";
case XML_WRONG_ATTRIBUTE_TYPE: return "WRONG_ATTRIBUTE_TYPE";
case XML_ERROR_FILE_NOT_FOUND: return "FILE_NOT_FOUND";
case XML_ERROR_FILE_COULD_NOT_BE_OPENED: return "FILE_COULD_NOT_BE_OPENED";
case XML_ERROR_FILE_READ_ERROR: return "FILE_READ_ERROR";
case XML_ERROR_ELEMENT_MISMATCH: return "ERROR_ELEMENT_MISMATCH";
case XML_ERROR_PARSING_ELEMENT: return "ERROR_PARSING_ELEMENT";
case XML_ERROR_PARSING_ATTRIBUTE: return "ERROR_PARSING_ATTRIBUTE";
case XML_ERROR_IDENTIFYING_TAG: return "ERROR_IDENTIFYING_TAG";
case XML_ERROR_PARSING_TEXT: return "ERROR_PARSING_TEXT";
case XML_ERROR_PARSING_CDATA: return "ERROR_PARSING_CDATA";
case XML_ERROR_PARSING_COMMENT: return "ERROR_PARSING_COMMENT";
case XML_ERROR_PARSING_DECLARATION: return "ERROR_PARSING_DECLARATION";
case XML_ERROR_PARSING_UNKNOWN: return "ERROR_PARSING_UNKNOWN";
case XML_ERROR_EMPTY_DOCUMENT: return "ERROR_EMPTY_DOCUMENT";
case XML_ERROR_MISMATCHED_ELEMENT: return "ERROR_MISMATCHED_ELEMENT";
case XML_ERROR_PARSING: return "ERROR_PARSING";
case XML_CAN_NOT_CONVERT_TEXT: return "CAN_NOT_CONVERT_TEXT";
case XML_NO_TEXT_NODE: return "NO_TEXT_NODE";
default: "";
}
}
void loadXML(string uri, XMLDocument& doc)
{
XMLError error = doc.LoadFile(uri.c_str());
if (error)
{
//TODO specify error
reportFatal("Configuration", "Error loading xml from: " + uri);
reportFatal("Configuration", "Error loading xml from: " + uri + " "
+ errorToString(error));
}
}

View File

@@ -51,7 +51,6 @@ void ConfigurationLoader::loadSimConfig(Configuration& config, XMLElement* simco
{
XMLDocument doc;
string src(simconfig->Attribute("src"));
std::cout<<"inner first"<<src<<endl;
loadXML(src, doc);
loadSimConfig(config, doc.FirstChildElement("simconfig"));
}

View File

@@ -0,0 +1,33 @@
/*
* MemSpecLoader.h
*
* Created on: Apr 7, 2014
* Author: jonny
*/
#ifndef MEMSPECLOADER_H_
#define MEMSPECLOADER_H_
#include <string>
#include "../../../common/third_party/tinyxml2.h"
#include "../../../common/Utils.h"
#include "Configuration.h"
namespace core {
class MemSpecLoader
{
public:
//void loadConfiguration(Configuration& config, std::string memspecUri, std::string memconfigUri);
static void loadMemConfig(std::string memconfigUri);
static void loadMemConfig(XMLElement* memconfig);
private:
//void loadMemConfig(Configuration& config, tinyxml2::XMLElement* memspec);
//void loadMemSpec(Configuration& config, tinyxml2::XMLElement* memspec);
//void loadDDR4(Configuration& config, tinyxml2::XMLElement* memspec);
//void loadWideIO(Configuration& config, tinyxml2::XMLElement* memspec);
};
} /* namespace core */
#endif /* MEMSPECLOADER_H_ */

View File

@@ -25,7 +25,17 @@ void PrechargeChecker::delayToSatisfyConstraints(ScheduledCommand& command) cons
}
else if (lastCommand.getCommand() == Command::Write)
{
//command.delayToMeetConstraint(lastCommand.getStart(), config.memSpec.tWL + getWriteAccessTime() + config.memSpec.tWR);
std::cout<<"\nPrechargecheck----- "<<sc_time_stamp()<<std::endl;
std::cout<<"Before Constraint: "<<command.getStart()<<std::endl;
command.delayToMeetConstraint(lastCommand.getStart(), config.memSpec.tWL + getWriteAccessTime() + config.memSpec.tWR);
std::cout<<"LastCommand Write: "<<lastCommand.getStart()<<std::endl;
std::cout<<"AccessTime: "<<getWriteAccessTime()<<std::endl;
std::cout<<"tWR, tWL: "<<config.memSpec.tWR<<", "<<config.memSpec.tWL<<std::endl;
std::cout<<"After Constraint: "<<command.getStart()<<std::endl;
}
else if (lastCommand.getCommand() == Command::PDNAX)
{

View File

@@ -31,6 +31,9 @@ using namespace Data;
#define POWER //not better to define in simulation xml? also flag for storage simulation
//configuration->PowerAnalysys
//configuration->ModelStorage
//configuration->ModelErrotInjection
#ifdef POWER
#define IFPOW(x) x

View File

@@ -13,8 +13,7 @@ using namespace std;
using namespace tinyxml2;
SimulationManager::SimulationManager(string resources) :
silent(false), resources(resources)
SimulationManager::SimulationManager(string resources) : resources(resources)
{
}

View File

@@ -16,8 +16,6 @@
struct SimulationBatch
{
//std::string simulationName;
std::vector<DramSetup> dramSetups;
std::map<std::string, std::vector<Device>> traceSetups;
void print();
@@ -34,7 +32,6 @@ public:
void runSimulations();
void startTraceAnalyzer();
bool silent;
private:
std::string resources;
std::string exportPath;
@@ -47,7 +44,6 @@ private:
void runSimulation(std::string traceName, DramSetup dramSetup, std::vector<Device> traceSetup);
void parseSimulationBatch(tinyxml2::XMLElement* simulation);
void addTraceSetup(SimulationBatch& batch, tinyxml2::XMLElement* element);
void checkPaths();
void report(std::string message);
};