Commit 874f6112 authored by Anirudh's avatar Anirudh
Browse files

Changed dump function

parent 34c22903
......@@ -41,6 +41,13 @@ void Model::addSimulationTime(FindSimTime::simulationTimeMapType simTime)
_simTime = simTime;
}
void Model::addEntryFunctionGPUMacroMap(entryFunctionGPUMacroMapType e) {
//_entryFunctionGPUMacroMap.insert(e.begin(), e.end());
_entryFunctionGPUMacroMap = e;
llvm::errs()<<" \n Size : " <<_entryFunctionGPUMacroMap.size()<<" " <<e.size();
}
void Model::addGlobalEvents(FindGlobalEvents::globalEventMapType eventMap)
{
for (FindGlobalEvents::globalEventMapType::iterator it = eventMap.begin();
......@@ -110,6 +117,10 @@ Model::moduleMapType Model::getModuleDecl()
return _modules;
}
Model::entryFunctionGPUMacroMapType Model::getEntryFunctionGPUMacroMap() {
llvm::errs()<<"\n return Size : " <<_entryFunctionGPUMacroMap.size();
return _entryFunctionGPUMacroMap;
}
Model::moduleInstanceMapType Model::getModuleInstanceMap() {
return _moduleInstanceMap;
......@@ -136,8 +147,12 @@ void Model::dump(raw_ostream & os)
mit != _modules.end(); mit++) {
// Second is the ModuleDecl type.
os << "\nModel " << counterModel++;
mit->second->dump(os);
os << "\nModel " << mit->first<<"\n";
vector<ModuleDecl*> instanceVec = _moduleInstanceMap[mit->second];
for (int i = 0; i<instanceVec.size(); i++) {
os <<"\n Instance : "<<i + 1;
instanceVec.at(i)->dump(os);
}
}
os << "\nGlobal Events:\n";
for (Model::eventMapType::iterator it = _eventMap.begin(), ite =
......
......@@ -12,7 +12,7 @@
#include "FindSimTime.h"
#include "EntryFunctionContainer.h"
#include "FindNetlist.h"
#include "SCuitable/FindGPUMacro.h"
namespace scpar {
using namespace clang;
using namespace std;
......@@ -29,6 +29,9 @@ namespace scpar {
typedef pair<ModuleDecl*, vector<ModuleDecl*> >moduleInstancePairType;
typedef map<ModuleDecl*, vector<ModuleDecl*> >moduleInstanceMapType;
typedef pair<EntryFunctionContainer*, FindGPUMacro::forStmtGPUMacroMapType> entryFunctionGPUMacroPairType;
typedef map<EntryFunctionContainer*, FindGPUMacro::forStmtGPUMacroMapType> entryFunctionGPUMacroMapType;
Model();
~Model();
......@@ -39,9 +42,11 @@ namespace scpar {
void addGlobalEvents(FindGlobalEvents::globalEventMapType);
void addNetlist(FindNetlist &);
void addSCMain(FunctionDecl*);
void addEntryFunctionGPUMacroMap(entryFunctionGPUMacroMapType);
void updateModuleDecl();
moduleMapType getModuleDecl();
entryFunctionGPUMacroMapType getEntryFunctionGPUMacroMap();
eventMapType getEventMapType();
moduleInstanceMapType getModuleInstanceMap();
unsigned int getNumEvents();
......@@ -61,6 +66,7 @@ namespace scpar {
FindNetlist::portSignalMapType _portSignalMap;
FindNetlist::instancePortSignalMapType _instancePortSignalMap;
FindNetlist::instanceListModuleMapType _instanceListModuleMap;
entryFunctionGPUMacroMapType _entryFunctionGPUMacroMap;
};
}
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment