diff --git a/dram/resources/simulations/sim-batch.xml b/dram/resources/simulations/sim-batch.xml index a2c51fda..7541ef7a 100644 --- a/dram/resources/simulations/sim-batch.xml +++ b/dram/resources/simulations/sim-batch.xml @@ -3,15 +3,15 @@ - + - + - + diff --git a/dram/src/common/xmlAddressdecoder.cpp b/dram/src/common/xmlAddressdecoder.cpp index 7771d118..ff3f1ac7 100644 --- a/dram/src/common/xmlAddressdecoder.cpp +++ b/dram/src/common/xmlAddressdecoder.cpp @@ -1,13 +1,11 @@ #include "xmlAddressdecoder.h" #include #include "Utils.h" +#include "bitset" using namespace std; using namespace tinyxml2; -//string xmlAddressDecoder::addressConfigURI = ""; -//tinyxml2::XMLElement* xmlAddressDecoder::addressMap = NULL; - tinyxml2::XMLElement* xmlAddressDecoder::addressmapping = NULL; xmlAddressDecoder::xmlAddressDecoder(string addressConfigURI) @@ -22,26 +20,17 @@ xmlAddressDecoder::xmlAddressDecoder(string addressConfigURI) xmlAddressDecoder::xmlAddressDecoder(XMLElement* addressmap) { tinyxml2::XMLDocument doc; - //std::cout<<"fffffff"<Name()<Name()); if( xmlNodeName != "addressmapping") reportFatal("AddressDecorder", "addressmap node expected"); - cout<Attribute("src")) { - - - string src(addressmap->Attribute("src")); - std::cout<Attribute("src")); + loadXML(src, doc); + addressmap = (doc.FirstChildElement("addressmapping")); } -cout<FirstChildElement(); child != NULL; child = child->NextSiblingElement()) { int from; @@ -67,3 +56,14 @@ DecodedAddress xmlAddressDecoder::decodeAddress(sc_dt::uint64 addr) result.bytes = (addr & masks["bytes"]) >> shifts["bytes"]; return result; } + +void xmlAddressDecoder::print() +{ + cout << "Used addressmapping:" << endl; + cout<<"===================="<(pair.second)<Attribute("src")) { - XMLDocument doc; - - string src(memconfig->Attribute("src")); - std::cout<<"inner first"<Attribute("src")); + loadXML(src, doc); + loadMemConfig(config, doc.FirstChildElement("memconfig")); } loadConfig(config, memconfig); } @@ -52,13 +49,11 @@ void ConfigurationLoader::loadSimConfig(Configuration& config, XMLElement* simco { if(simconfig->Attribute("src")) { - XMLDocument doc; - - string src(simconfig->Attribute("src")); - std::cout<<"inner first"<Attribute("src")); + std::cout<<"inner first"<Attribute("src")) - //{ - - XMLDocument doc; + XMLDocument doc; string src(memspec->Attribute("src")); config.memspecUri = src; - std::cout<<"inner first"<Name()<