...
 
Commits (2)
......@@ -82,12 +82,12 @@ using std::min;
using std::max;
#undef DEBUG_KERNEL
#undef DEBUG_CPU
#define DEBUG_CPU
#undef DEBUG_BUS
#undef DEBUG_SERIALIZE
#undef DEBUG_FPGA
#undef DEBUG_SIMULATE
#define DEBUG_SIMULATE
//enables mapping of DIPLODOCUS channels onto buses
#define BUS_ENABLED
//cost of a send/wait command
......
......@@ -841,6 +841,11 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
if (_wasReset) NOTIFY_SIM_STARTED();
_wasReset=false;
#endif
if( transLET !=0 && _simComp->getStopFlag())
isFinish=false;
while ( transLET!=0 && !_simComp->getStopFlag()){
#ifdef DEBUG_SIMULATE
std::cout<<"come in cpu"<<std::endl;
......@@ -850,11 +855,6 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
#endif
commandLET=transLET->getCommand();
/* if(transLET!=0 && transLET->getCommand()->getTask()->getIsDaemon()==false){
for(TaskList::const_iterator i=_simComp->getNonDaemonTaskList().begin(); i != _simComp->getNonDaemonTaskList().end(); ++i){
std::cout<<"non dameon task"<<(*i)->toString()<<" state is "<<(*i)->getState()<<(*i)->getCurrCommand()->toString()<<std::endl;
}
}*/
if(transLET!=0 && transLET->getCommand()->getTask()->getIsDaemon()==true){
if(transLET->getStartTime() >= deviceLET->getSimulatedTime()){
......@@ -872,6 +872,8 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
break;
}
}
else
isFinish=false;
#ifdef DEBUG_SIMULATE
......@@ -1009,10 +1011,9 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
}
bool aSimCompleted = ( transLET==0 && !_simComp->getStoppedOnAction());
if(isFinish==true){
// std::cout<<"terminated!!!"<<std::endl;
if(isFinish==true)
aSimCompleted = true;
}
if (aSimCompleted){
#ifdef LISTENERS_ENABLED
......