Commit 58168102 authored by apvrille's avatar apvrille

Slight update on simulator

parent c6ac338e
......@@ -51,17 +51,22 @@ TMLChoiceCommand::TMLChoiceCommand(ID iID, TMLTask* iTask, RangeFuncPointer iRan
TMLCommand* TMLChoiceCommand::getNextCommand() const{
ParamType aMin, aMax;
//return _nextCommand[(_task->*_rangeFunc)(aMin, aMax)];
// std::cout << "In choice command" << "\n";
//std::cout << toString() << "\n";
unsigned int aNextIndex = (_task->*_rangeFunc)(aMin, aMax);
_coveredBranchMap |= (1 << aNextIndex);
return _nextCommand[aNextIndex];
}
TMLCommand* TMLChoiceCommand::prepareNextTransaction(){
//std::cout << "Preparing next transaction in choice\n";
if (_simComp->getStopFlag()){
_simComp->setStoppedOnAction();
_task->setCurrCommand(this);
return this; //for command which generates transactions this is returned anyway by prepareTransaction
}
//std::cout << "Preparing next command in choice" << "\n";
TMLCommand* aNextCommand=getNextCommand();
_task->setCurrCommand(aNextCommand);
_execTimes++;
......
......@@ -82,6 +82,8 @@ TMLTransaction* Simulator::getTransLowestEndTime(SchedulableDevice*& oResultDevi
//for(CPUList::const_iterator i=_simComp->getCPUIterator(false); i != _simComp->getCPUIterator(true); ++i){
for(CPUList::const_iterator i=_simComp->getCPUList().begin(); i != _simComp->getCPUList().end(); ++i){
aTempDevice=*i;
//std::cout << "Preparing next transaction" << aTempDevice->toString() << "\n";
aTempTrans=aTempDevice->getNextTransaction();
if (aTempTrans!=0 && aTempTrans->getVirtualLength()>0){
#ifdef DEBUG_KERNEL
......
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