diff --git a/simulators/c++2/src_simulator/TMLTransaction.cpp b/simulators/c++2/src_simulator/TMLTransaction.cpp index c78a08f79fe10344eadccf81855376e412de3974..bdf01026ad6aaeb03683cb1d429c8995fc8eb9d2 100755 --- a/simulators/c++2/src_simulator/TMLTransaction.cpp +++ b/simulators/c++2/src_simulator/TMLTransaction.cpp @@ -47,6 +47,7 @@ MemPoolNoDel<TMLTransaction> TMLTransaction::memPool(BLOCK_SIZE_TRANS); TMLTransaction::TMLTransaction():_runnableTime(0), _startTime(0), _length(0), _virtualLength(0), _command(0),_transactCoreNumber(0),_transVcdOutputState(END_IDLE_TRANS),_endState(false), + _reconfigState(false), /*_previousTransEndTime(0),*/ #ifdef PENALTIES_ENABLED _idlePenalty(0), _taskSwitchingPenalty(0), //, _branchingPenalty(0), @@ -56,7 +57,7 @@ TMLTransaction::TMLTransaction():_runnableTime(0), _startTime(0), _length(0), _v } -TMLTransaction::TMLTransaction(TMLCommand* iCommand, TMLLength iVirtualLength, TMLTime iRunnableTime, TMLChannel* iChannel):_runnableTime(iRunnableTime), _startTime(0), _length(0), _virtualLength(iVirtualLength), _command(iCommand), +TMLTransaction::TMLTransaction(TMLCommand* iCommand, TMLLength iVirtualLength, TMLTime iRunnableTime, TMLChannel* iChannel):_runnableTime(iRunnableTime), _startTime(0), _length(0), _virtualLength(iVirtualLength), _command(iCommand),_endState(false), _reconfigState(false), #ifdef PENALTIES_ENABLED _idlePenalty(0), _taskSwitchingPenalty(0), //, _branchingPenalty(0), #endif diff --git a/simulators/c++2/src_simulator/TMLTransaction.h b/simulators/c++2/src_simulator/TMLTransaction.h index a4a3df15b468b092ad6952ffaea8f8b271e4aa77..df082268d28c5503b6f06d85e7a8c6111b0787aa 100644 --- a/simulators/c++2/src_simulator/TMLTransaction.h +++ b/simulators/c++2/src_simulator/TMLTransaction.h @@ -258,6 +258,8 @@ class TMLTransaction { inline vcdTransVisState getTransVcdOutPutState() {return _transVcdOutputState;} inline void setEndState (bool f) { _endState=f;} inline bool getEndState () {return _endState;} + inline void setReconfigState (bool t) {_reconfigState=t;} + inline bool getReconfigState () {return _reconfigState;} void toXML(std::ostringstream& glob, int deviceID, std::string deviceName, ID uniqueID) const; @@ -278,7 +280,7 @@ class TMLTransaction { vcdTransVisState _transVcdOutputState; //state of transaction for VCD output bool _endState; - + bool _reconfigState; ///previous end time for the cpu VCD output // unsigned int _previousTransEndTime; //device executes the current device diff --git a/simulators/c++2/src_simulator/arch/FPGA.cpp b/simulators/c++2/src_simulator/arch/FPGA.cpp index d242637e564a4ca65d352c448bca948c6ac5a8b4..2219af7b639cc0af455ec9b64b45f826ea7c0f26 100644 --- a/simulators/c++2/src_simulator/arch/FPGA.cpp +++ b/simulators/c++2/src_simulator/arch/FPGA.cpp @@ -246,8 +246,8 @@ std::cout<<"fpga addTransaction"<<std::endl; _endSchedule=_maxEndTime+_reconfigNumber*_reconfigTime; else{ _endSchedule=0; - } + std::cout<<"in add trans reconfig number is ----"<<_reconfigNumber<<std::endl; #ifdef DEBUG_FPGA std::cout<<"_maxEndTime is "<<_maxEndTime<<std::endl; @@ -260,12 +260,7 @@ std::cout<<"fpga addTransaction"<<std::endl; _overallTransSize+=_nextTransaction->getOperationLength(); //NEW!!!!!!!! //std::cout << "lets crash execute\n"; // std::cout<<_nextTransaction->toString()<<std::endl; - if(_nextTransaction->getCommand()==0) - std::cout<<"111"<<std::endl; - else - std::cout<<"333"<<std::endl; _nextTransaction->getCommand()->execute(); //NEW!!!! - std::cout<<"222"<<std::endl; //std::cout << "not crashed\n"; #ifdef TRANSLIST_ENABLED _transactList.push_back(_nextTransaction); @@ -285,6 +280,7 @@ std::cout<<"fpga addTransaction"<<std::endl; void FPGA::schedule(){ std::cout << "fpga:schedule BEGIN " << _name << "+++++++++++++++++++++++++++++++++\n"; _reconfigNumber=_scheduler->schedule(_endSchedule); + std::cout<<"in schedule reconfig number is ---"<<_reconfigNumber<<std::endl; TMLTransaction* aOldTransaction = _nextTransaction; _nextTransaction=_scheduler->getNextTransaction(_endSchedule); @@ -464,24 +460,29 @@ double FPGA::averageLoad (TMLTask* currTask) const{ void FPGA::drawPieChart(std::ofstream& myfile) const { TMLTime _maxEndTime=0; - + std::cout<<"drawPieChart!!!!"<<std::endl; for( TransactionList::const_iterator i = _transactList.begin(); i != _transactList.end(); ++i ) { - if( (*i)-> getCommand()->getTask() == _htmlCurrTask ){ + if( (*i)-> getCommand()->getTask() == _htmlCurrTask || _reconfigNumber !=0){ TMLTime _endTime= (*i)->getEndTime(); _maxEndTime=max(_maxEndTime,_endTime); } } + std::map <TMLTask*, double > transPercentage; for( TransactionList::const_iterator i = _transactList.begin(); i!= _transactList.end(); ++i){ - if( (*i)-> getCommand()->getTask() == _htmlCurrTask ){ + if( (*i)-> getCommand()->getTask() == _htmlCurrTask || _reconfigNumber != 0){ transPercentage[(*i)-> getCommand()->getTask()]+=(double)((*i)->getEndTime()-(*i)->getStartTime())/_maxEndTime; } } + + std::string pieName; + if(_reconfigNumber == 0 && _htmlCurrTask != 0) + pieName = "_"+_htmlCurrTask->toShortString(); std::map <TMLTask*, double>::iterator iter = transPercentage.begin(); - myfile << " var ctx" << _ID << "_" << _htmlCurrTask->toShortString() << "= $(\"#pie-chartcanvas-" << _ID << "_" << _htmlCurrTask->toShortString() << "\");\n"; + myfile << " var ctx" << _ID << pieName << "= $(\"#pie-chartcanvas-" << _ID << pieName << "\");\n"; double idle=1; - myfile << " var data" << _ID << "_" << _htmlCurrTask->toShortString() << " = new Array ("; + myfile << " var data" << _ID << pieName << " = new Array ("; while( iter != transPercentage.end()){ myfile << "\"" << iter->second << "\","; idle-=iter->second; @@ -489,16 +490,16 @@ void FPGA::drawPieChart(std::ofstream& myfile) const { } myfile << "\"" << idle << "\");\n"; - myfile << " var efficiency" << _ID << "_" << _htmlCurrTask->toShortString() << " = [];" << std::endl; - myfile << " var coloR" << _ID << "_" << _htmlCurrTask->toShortString() << " = [];" << std::endl; - myfile << " var dynamicColors" << _ID << "_" << _htmlCurrTask->toShortString() << SCHED_HTML_JS_FUNCTION; + myfile << " var efficiency" << _ID << pieName << " = [];" << std::endl; + myfile << " var coloR" << _ID << pieName << " = [];" << std::endl; + myfile << " var dynamicColors" << _ID << pieName << SCHED_HTML_JS_FUNCTION; - myfile << " for (var i in data" << _ID << "_" << _htmlCurrTask->toShortString() << "){\n"; - myfile << " efficiency" << _ID << "_" << _htmlCurrTask->toShortString() << ".push(data" << _ID << "_" << _htmlCurrTask->toShortString() << "[i]);\n"; - myfile << " coloR" << _ID << "_" << _htmlCurrTask->toShortString() << ".push(dynamicColors" << _ID << "_" << _htmlCurrTask->toShortString() << "());\n"; + myfile << " for (var i in data" << _ID << pieName << "){\n"; + myfile << " efficiency" << _ID << pieName << ".push(data" << _ID << pieName << "[i]);\n"; + myfile << " coloR" << _ID << pieName << ".push(dynamicColors" << _ID << pieName << "());\n"; myfile << "}" << std::endl; - myfile << " var data" << _ID << "_" << _htmlCurrTask->toShortString() << " = { \n"; + myfile << " var data" << _ID << pieName << " = { \n"; myfile << " labels : ["; iter = transPercentage.begin(); while( iter != transPercentage.end()){ @@ -509,27 +510,39 @@ void FPGA::drawPieChart(std::ofstream& myfile) const { myfile << "\"idle time\"],\n"; myfile << " datasets : [\n \ {\n \ - data : efficiency" << _ID << "_" << _htmlCurrTask->toShortString() << ",\n"; - myfile << " backgroundColor : coloR" << _ID << "_" << _htmlCurrTask->toShortString() << std::endl; + data : efficiency" << _ID << pieName << ",\n"; + myfile << " backgroundColor : coloR" << _ID << pieName << std::endl; // myfile << SCHED_HTML_JS_CONTENT1 << "Average load is " << averageLoad(_htmlCurrTask) << SCHED_HTML_JS_CONTENT2 << std::endl; myfile << SCHED_HTML_JS_CONTENT1; - myfile << " var options" << _ID << "_" << _htmlCurrTask->toShortString() << SCHED_HTML_JS_CONTENT3; - myfile << _name << "_" << _htmlCurrTask->toShortString() << ": Average load is " << std::setprecision(2) << averageLoad(_htmlCurrTask) << SCHED_HTML_JS_CONTENT2 << std::endl; + myfile << " var options" << _ID << pieName << SCHED_HTML_JS_CONTENT3; + myfile << _name << pieName << ": Average load is " << std::setprecision(2) << averageLoad(_htmlCurrTask) << SCHED_HTML_JS_CONTENT2 << std::endl; } void FPGA::buttonPieChart(std::ofstream& myfile) const{ // myfile << "$(\"#" << _ID << "\").click(function() {\n"; - for(TaskList::const_iterator i = _taskList.begin(); i!= _taskList.end(); ++i){ - myfile << " var chart" << _ID << "_" << (*i)->toShortString() << " = new Chart( "<< - "ctx" << _ID << "_" << (*i)->toShortString() << ", {\n \ + if(_reconfigNumber == 0){ + for(TaskList::const_iterator i = _taskList.begin(); i!= _taskList.end(); ++i){ + myfile << " var chart" << _ID << "_" << (*i)->toShortString() << " = new Chart( "<< + "ctx" << _ID << "_" << (*i)->toShortString() << ", {\n \ type : \"pie\",\n"; - myfile << " data : data" << _ID << "_" << (*i)->toShortString() <<",\n"; - myfile << " options : options" << _ID << "_" << (*i)->toShortString() << std::endl; - myfile << " });" << std::endl; - myfile << " chart" << _ID << "_" << (*i)->toShortString() << SCHED_HTML_JS_HIDE; - myfile << " chart" << _ID << "_" << (*i)->toShortString() << ".update();" << std::endl; + myfile << " data : data" << _ID << "_" << (*i)->toShortString() <<",\n"; + myfile << " options : options" << _ID << "_" << (*i)->toShortString() << std::endl; + myfile << " });" << std::endl; + myfile << " chart" << _ID << "_" << (*i)->toShortString() << SCHED_HTML_JS_HIDE; + myfile << " chart" << _ID <<"_" << (*i)->toShortString() << ".update();" << std::endl; + } + } + else{ + myfile << " var chart" << _ID << " = new Chart( "<< + "ctx" << _ID << ", {\n \ + type : \"pie\",\n"; + myfile << " data : data" << _ID << ",\n"; + myfile << " options : options" << _ID << std::endl; + myfile << " });" << std::endl; + myfile << " chart" << _ID << SCHED_HTML_JS_HIDE; + myfile << " chart" << _ID << ".update();" << std::endl; } } @@ -543,8 +556,12 @@ void FPGA::showPieChart(std::ofstream& myfile) const{ //if( _taskNumber == 1) // myfile << SCHED_HTML_JS_DIV_BEGIN << std::endl; // else + std::string pieName; + if(_reconfigNumber == 0 && _htmlCurrTask != 0) + pieName = "_"+_htmlCurrTask->toShortString(); + myfile << SCHED_HTML_JS_DIV_BEGIN2 << std::endl; - myfile << SCHED_HTML_JS_BEGIN_CANVAS << _ID << "_" << _htmlCurrTask->toShortString() << SCHED_HTML_JS_END_CANVAS <<std::endl; + myfile << SCHED_HTML_JS_BEGIN_CANVAS << _ID << pieName << SCHED_HTML_JS_END_CANVAS <<std::endl; myfile << SCHED_HTML_JS_DIV_END << std::endl; } @@ -562,7 +579,8 @@ std::string FPGA::determineHTMLCellClass(unsigned int &nextColor ) { return taskCellClasses[ _htmlCurrTask ]; } -void FPGA::HW2HTML(std::ofstream& myfile) { +void FPGA::HW2HTML(std::ofstream& myfile) { + std::cout<<"reconfig number is !!!!!--------------"<< _reconfigNumber <<std::endl; if(_startFlagHTML == true){ //myfile << "<h2><span>Scheduling for device: "<< _name << "</span></h2>" << std::endl; myfile << SCHED_HTML_JS_DIV_BEGIN3 << SCHED_HTML_BOARD; @@ -580,10 +598,11 @@ void FPGA::HW2HTML(std::ofstream& myfile) { TMLTime aCurrTime = 0; unsigned int taskOccurTime = 0; for( TransactionList::const_iterator i = _transactList.begin(); i != _transactList.end(); ++i ) { -#ifdef DEBUG_FPGA - std::cout << (*i)-> getCommand()->getTask()->toString() <<std::endl; - std::cout<< _htmlCurrTask->toString()<<std::endl; -#endif + std::cout<<"trans HW name " << (*i)->toShortString()<<" "<< (*i)->getReconfigState()<<std::endl; + + if(_reconfigNumber != 0) + _htmlCurrTask = (*i)->getCommand()->getTask();//NEW!!! + if( (*i)-> getCommand()->getTask() == _htmlCurrTask ){ if(taskOccurTime==0){ taskOccurTime++; @@ -603,7 +622,6 @@ void FPGA::HW2HTML(std::ofstream& myfile) { // Issue #4 - TMLTask* task = aCurrTrans->getCommand()->getTask(); // std::cout<<"what is this task?"<<task->toString()<<std::endl; const std::string cellClass = determineHTMLCellClass( nextCellClassIndex ); std::string aCurrTransName=aCurrTrans->toShortString(); @@ -612,6 +630,16 @@ void FPGA::HW2HTML(std::ofstream& myfile) { writeHTMLColumn( myfile, aLength, cellClass, aCurrTrans->toShortString(), aCurrContent ); aCurrTime = aCurrTrans->getEndTime(); + + if(aCurrTrans->getReconfigState()==true){ + //if(aCurrTrans->getReconfigState()==true){ + if(++i == _transactList.end()){ + break; + } + --i; + writeHTMLColumn(myfile, _reconfigTime, "not", "Reconfiguration time", "Reconfiguration time"); + aCurrTime+=_reconfigTime; + } } } @@ -633,7 +661,7 @@ void FPGA::HW2HTML(std::ofstream& myfile) { //myfile << "</tr>" << std::endl << "</table>" << std::endl; - if(_currTaskNumber == _taskNumber){ + if(_currTaskNumber == _taskNumber || _reconfigNumber != 0){ myfile << "</tr>" << std::endl << "</table>" << std::endl << SCHED_HTML_JS_DIV_END << std::endl; myfile << SCHED_HTML_JS_CLEAR << std::endl; @@ -662,6 +690,9 @@ void FPGA::schedule2HTML(std::ofstream& myfile) { std::cout << (*i)-> getCommand()->getTask()->toString() <<std::endl; std::cout<< _htmlCurrTask->toString()<<std::endl; #endif + if(_reconfigNumber != 0) + _htmlCurrTask = (*i)->getCommand()->getTask();//NEW!!! + if( (*i)-> getCommand()->getTask() == _htmlCurrTask ){ if(taskOccurTime==0){ _currTaskNumber++; @@ -681,13 +712,23 @@ void FPGA::schedule2HTML(std::ofstream& myfile) { // Issue #4 - TMLTask* task = aCurrTrans->getCommand()->getTask(); // std::cout<<"what is this task?"<<task->toString()<<std::endl; const std::string cellClass = determineHTMLCellClass( nextCellClassIndex ); writeHTMLColumn( myfile, aLength, cellClass, aCurrTrans->toShortString() ); aCurrTime = aCurrTrans->getEndTime(); + + if(aCurrTrans->getReconfigState()==true){ + //if(aCurrTrans->getReconfigState()==true){ + if(++i == _transactList.end()){ + break; + } + --i; + writeHTMLColumn(myfile, _reconfigTime, "not", "Reconfiguration time", "Reconfiguration time"); + aCurrTime+=_reconfigTime; + } + } } @@ -712,7 +753,7 @@ void FPGA::schedule2HTML(std::ofstream& myfile) { std::cout<<"_taskNumer is"<<_taskNumber<<std::endl; std::cout<<"curr task number is "<<_currTaskNumber<<std::endl; #endif - if(_currTaskNumber == _taskNumber){ + if(_currTaskNumber == _taskNumber || _reconfigNumber != 0){ //#ifdef DEBUG_FPGA std::cout<<" i am showing the name of tasks!"<<std::endl; //#endif diff --git a/simulators/c++2/src_simulator/arch/FPGA.h b/simulators/c++2/src_simulator/arch/FPGA.h index 90c33dd2e9698d4d08dd94232e045fc7fc568e16..c3a483464f19f7e9f37520e673ed4038775290ef 100644 --- a/simulators/c++2/src_simulator/arch/FPGA.h +++ b/simulators/c++2/src_simulator/arch/FPGA.h @@ -144,6 +144,7 @@ public: void buttonPieChart(std::ofstream& myfile) const; void showPieChart(std::ofstream& myfile) const; std::string determineHTMLCellClass(unsigned int &nextColor ); + inline unsigned int getReconfigNumber() {return _reconfigNumber;} protected: ///List of all tasks running on the FPGA TaskList _taskList; diff --git a/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp b/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp index d10661cdeff02a9cfbba98776b75adc1fe153609..fd6c16fa68f87a8a3de1d3761ccbe3665ee7539f 100644 --- a/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp +++ b/simulators/c++2/src_simulator/arch/ReconfigScheduler.cpp @@ -137,9 +137,10 @@ TMLTime ReconfigScheduler::schedule(TMLTime iEndSchedule){ if(_tempWorkloadList.empty()){ _taskOrder=_taskOrder.substr(_indexMark+1, _taskOrder.length()); #ifdef DEBUG_FPGA - std::cout<<"_taskOrder is "<<_taskOrder<<std::endl; + std::cout<<"_taskOrder is "<<_taskOrder<<" "<<_nextTransaction->toShortString()<<std::endl; #endif ++_reconfigNumber; + _nextTransaction->setReconfigState(true); } #ifdef DEBUG_FPGA diff --git a/simulators/c++2/src_simulator/arch/ReconfigScheduler.h b/simulators/c++2/src_simulator/arch/ReconfigScheduler.h index 32be30b26ed8a05e2b23b18f37db113511b15602..c35d9e23f28df6547aa3ce0c8c4e90713c368c72 100644 --- a/simulators/c++2/src_simulator/arch/ReconfigScheduler.h +++ b/simulators/c++2/src_simulator/arch/ReconfigScheduler.h @@ -66,6 +66,7 @@ public: inline TMLTransaction* getNextTransaction(TMLTime iEndSchedule) const {return _nextTransaction;} inline std::string toString() const {return _name;} void reset(); + std::string getTaskOrder() {return _taskOrder;} //void transWasScheduled(SchedulableDevice* iDevice); protected: ///Name of the scheduler diff --git a/simulators/c++2/src_simulator/arch/WorkloadSource.h b/simulators/c++2/src_simulator/arch/WorkloadSource.h index 185a914f4d1e68fc6c8df648a99b5b51a8746801..82910e307bdcdd9295baa7d108960851c95c8fb5 100644 --- a/simulators/c++2/src_simulator/arch/WorkloadSource.h +++ b/simulators/c++2/src_simulator/arch/WorkloadSource.h @@ -105,6 +105,7 @@ public: return os; } virtual std::string toString() const =0; + virtual std::string getTaskOrder() {return 0;} ///Signals that the last scheduled transaction has been selected by the given device /** \param iDevice Pointer to the device diff --git a/simulators/c++2/src_simulator/definitions.h b/simulators/c++2/src_simulator/definitions.h index 2a9880339c6299c394c225cfd85b4c342cc65393..e0f26f6f804494aefdf1bfb84a213bf1213169d6 100644 --- a/simulators/c++2/src_simulator/definitions.h +++ b/simulators/c++2/src_simulator/definitions.h @@ -86,7 +86,7 @@ using std::max; #undef DEBUG_BUS #undef DEBUG_SERIALIZE -#undef DEBUG_FPGA +#define DEBUG_FPGA #undef DEBUG_SIMULATE //enables mapping of DIPLODOCUS channels onto buses #define BUS_ENABLED diff --git a/simulators/c++2/src_simulator/sim/Simulator.cpp b/simulators/c++2/src_simulator/sim/Simulator.cpp index 0706315b7e06d09f9ae28cc4a3f135097d2a2c96..f89907dbf4bf932d7c8c813efae05a5ae8a18275 100644 --- a/simulators/c++2/src_simulator/sim/Simulator.cpp +++ b/simulators/c++2/src_simulator/sim/Simulator.cpp @@ -118,7 +118,7 @@ TMLTransaction* Simulator::getTransLowestEndTime(SchedulableDevice*& oResultDevi std::cout<<aTempTrans->toShortString()<<"getEndtime is "<<aTempTrans->getEndTime()<<std::endl; std::cout<<"alowest time is "<<aLowestTime<<std::endl; if (aTempTrans->getEndTime() < aLowestTime){ - std::cout<<"in!!!"<<std::endl; + // std::cout<<"in!!!"<<std::endl; aMarker=aTempTrans; aLowestTime=aTempTrans->getEndTime(); oResultDevice=aTempDevice; @@ -498,11 +498,15 @@ std::cout<<"schedule2HTML--------------------------------------***************** (*i)->drawPieChart(myfile); } for(FPGAList::const_iterator i=_simComp->getFPGAList().begin(); i != _simComp->getFPGAList().end(); ++i){ - for(TaskList::const_iterator j = (*i)->getTaskList().begin(); j != (*i)->getTaskList().end(); ++j){ - (*i)->setHtmlCurrTask(*j); + if((*i)->getReconfigNumber()==0){ + for(TaskList::const_iterator j = (*i)->getTaskList().begin(); j != (*i)->getTaskList().end(); ++j){ + (*i)->setHtmlCurrTask(*j); + (*i)->drawPieChart(myfile); + } + } + else{ (*i)->drawPieChart(myfile); } - // (*i)->buttonPieChart(myfile); } for(BusList::const_iterator j=_simComp->getBusList().begin(); j != _simComp->getBusList().end(); ++j){ (*j)->drawPieChart(myfile); @@ -543,25 +547,19 @@ std::cout<<"schedule2HTML--------------------------------------***************** for(FPGAList::const_iterator j=_simComp->getFPGAList().begin(); j != _simComp->getFPGAList().end(); ++j){ (*j)->setStartFlagHTML(true); - for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ - (*j)->setHtmlCurrTask(*i); -#ifdef DEBUG_HTML - std::cout<<"begin fpga html "<<(*j)->toShortString()<<std::endl; - std::cout<<"task is !!!!!"<<(*i)->toString()<<std::endl; -#endif - (*j)->HW2HTML(myfile); - (*j)->setStartFlagHTML(false); + if((*j)->getReconfigNumber()==0){ + for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ + (*j)->setHtmlCurrTask(*i); + (*j)->HW2HTML(myfile); + (*j)->setStartFlagHTML(false); + } } - // myfile << SCHED_HTML_JS_TABLE_BEGIN << std::endl; - // myfile << SCHED_HTML_JS_BUTTON1 << (*j)->getID() << SCHED_HTML_JS_BUTTON2 << std::endl; - // myfile << SCHED_HTML_JS_TABLE_END << std::endl; - for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ - (*j)->setHtmlCurrTask(*i); - //(*j)->showPieChart(myfile); + else{ + (*j)->HW2HTML(myfile); + (*j)->setStartFlagHTML(false); } } - // myfile << SCHED_HTML_JS_TABLE_END << std::endl << "</tr>" << std::endl; - // myfile << SCHED_HTML_JS_CLEAR <<std::endl; + for(BusList::const_iterator j=_simComp->getBusList().begin(); j != _simComp->getBusList().end(); ++j){ @@ -578,8 +576,13 @@ std::cout<<"schedule2HTML--------------------------------------***************** (*i)->showPieChart(myfile); } for(FPGAList::const_iterator j=_simComp->getFPGAList().begin(); j != _simComp->getFPGAList().end(); ++j){ - for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ - (*j)->setHtmlCurrTask(*i); + if((*j)->getReconfigNumber()==0){ + for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ + (*j)->setHtmlCurrTask(*i); + (*j)->showPieChart(myfile); + } + } + else{ (*j)->showPieChart(myfile); } } @@ -610,14 +613,17 @@ std::cout<<"schedule2HTML--------------------------------------***************** } for(FPGAList::const_iterator j=_simComp->getFPGAList().begin(); j != _simComp->getFPGAList().end(); ++j){ (*j)->setStartFlagHTML(true); - for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ - (*j)->setHtmlCurrTask(*i); + if((*j)->getReconfigNumber()==0){ + for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ + (*j)->setHtmlCurrTask(*i); + (*j)->schedule2HTML(myfile); + (*j)->setStartFlagHTML(false); + } + } + else{ (*j)->schedule2HTML(myfile); (*j)->setStartFlagHTML(false); - } - for(TaskList::const_iterator i = (*j)->getTaskList().begin(); i != (*j)->getTaskList().end(); ++i){ - (*j)->setHtmlCurrTask(*i); - } + } } for(BusList::const_iterator j=_simComp->getBusList().begin(); j != _simComp->getBusList().end(); ++j){ (*j)->schedule2HTML(myfile); @@ -825,7 +831,7 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ _simComp->setStopFlag(false,""); for(TaskList::const_iterator i=_simComp->getTaskList().begin(); i!=_simComp->getTaskList().end();i++){ if ((*i)->getCurrCommand()!=0) (*i)->getCurrCommand()->prepare(true); - std::cout<<"in prepare"<< (*i)->toString() << std::endl; + // std::cout<<"in prepare"<< (*i)->toString() << std::endl; } #ifdef EBRDD_ENABLED for(EBRDDList::const_iterator i=_simComp->getEBRDDIterator(false); i!=_simComp->getEBRDDIterator(true);i++){ @@ -856,9 +862,9 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ #ifdef DEBUG_SIMULATE std::cout<<"device is "<<deviceLET->getName()<<std::endl; #endif - std::cout<<"111flag "<<_simComp->getStopFlag()<<std::endl; + // std::cout<<"111flag "<<_simComp->getStopFlag()<<std::endl; bool x = deviceLET->addTransaction(0); - std::cout<<"222flag "<<_simComp->getStopFlag()<<std::endl; + //std::cout<<"222flag "<<_simComp->getStopFlag()<<std::endl; #ifdef DEBUG_SIMULATE std::cout<<"in simulator end addTransactin"<<std::endl; #endif