Merge branch 'library' of git.rhrk.uni-kl.de:EIT-Wehn/dram.vp.system into library

This commit is contained in:
Matthias Jung
2017-02-21 23:05:20 +01:00
5 changed files with 27 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<StaticTemperatureDefaultValue value="89" />
<ThermalSimPeriod value="100" />
<ThermalSimUnit value="us" />
<PowerInfoFile value="../../DRAMSys/simulator/resources/configs/thermalsim/powerInfo.xml"/>
<PowerInfoFile value="powerInfo.xml"/>
<IceServerIp value="127.0.0.1" />
<IceServerPort value="11880" />
<SimPeriodAdjustFactor value="10" />

View File

@@ -228,6 +228,17 @@ void Configuration::setParameter(std::string name, std::string value)
}
}
void Configuration::setPathToResources(std::string path)
{
pathToResources = path;
temperatureSim.setPathToResources(path);
}
std::string Configuration::getPathToResources()
{
return pathToResources;
}
void Configuration::setParameters(std::map<std::string, std::string> parameterMap)
{
for(auto item : parameterMap)

View File

@@ -53,6 +53,7 @@ struct Configuration
{
static std::string memspecUri;
static std::string mcconfigUri;
std::string pathToResources;
DEF_SINGLETON(Configuration);
@@ -98,6 +99,8 @@ struct Configuration
std::uint64_t getSimMemSizeInBytes();
unsigned int getDataBusWidth();
unsigned int getBytesPerBurst();
void setPathToResources(std::string path);
std::string getPathToResources();
private:
Configuration();

View File

@@ -49,6 +49,12 @@ struct TemperatureSimConfig {
// Temperature Scale
std::string TemperatureScale;
std::string pathToResources;
void setPathToResources(std::string path)
{
pathToResources = path;
}
// Static Temperature Simulation parameters
int StaticTemperatureDefaultValue;
@@ -72,6 +78,10 @@ struct TemperatureSimConfig {
{
printDebugMessage("Power Info File: " + powerInfoFile);
powerInfoFile = pathToResources
+ "/configs/thermalsim/"
+ powerInfoFile;
// Load the XML file into memory and parse it
tinyxml2::XMLDocument xml;
loadXML(powerInfoFile, xml);

View File

@@ -74,6 +74,8 @@ DRAMSys::DRAMSys(sc_module_name __attribute__((unused)) name,
simconfig,
thermalconfig);
Configuration::getInstance().setPathToResources(pathToResources);
// The xmlAddressDecoder MUST be initialized before calling the
// ConfigurationLoader because some information from the xmlAddressDecoder
// is needed to assure the coherence of the configuration.