Commit d5d04fa5 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Revert "Merge branch 'dameon2' into 'master'"

This reverts merge request !232
parent 696264ee
......@@ -327,6 +327,7 @@ void TMLTask::finished(){
}
unsigned int TMLTask::getState() const{
std::cout<<"getState"<<std::endl;
/*if (!_transactList.empty() && _transactList.back()->getEndTime()==SchedulableDevice::getSimulatedTime()){
return RUNNING;
}else{
......
......@@ -812,10 +812,6 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
SchedulableDevice* deviceLET;
CPU* depCPU;
FPGA* depFPGA;
bool isFinish=true;
#ifdef DEBUG_KERNEL
std::cout << "kernel:simulate: first schedule" << std::endl;
#endif
......@@ -850,21 +846,14 @@ 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()){
// std::cout<<"bigger time"<<std::endl;
bool isFinish=true;
if(_simComp->getNonDaemonTaskList().empty())
isFinish=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((*i)->getState()!=3){
// std::cout<<"non dameon task"<<(*i)->toString()<<" state is "<<(*i)->getState()<<std::endl;
if((*i)->getState()!=3 && (*i)->getState()!=0){
// std::cout<<"not stop"<<std::endl;
isFinish=false;
break;
......@@ -1011,8 +1000,6 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
}
bool aSimCompleted = ( transLET==0 && !_simComp->getStoppedOnAction());
if(isFinish==true)
aSimCompleted = true;
if (aSimCompleted){
#ifdef LISTENERS_ENABLED
......
Markdown is supported
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