Commit a4dcb3db authored by Ludovic Apvrille's avatar Ludovic Apvrille

Removing useless cout in diplo simulator

parent a223cd7e
......@@ -67,7 +67,7 @@ BusMaster* TMLChannel::getNextMaster(TMLTransaction* iTrans){
}
BusMaster* TMLChannel::getFirstMaster(TMLTransaction* iTrans){
std::cout<<"get First master"<<std::endl;
//std::cout<<"get First master"<<std::endl;
//if (iTrans->getCommand()->getTask()==_writeTask){
//std::cout << "fima 1\n";
if (_masters==0 || _slaves==0 || _numberOfHops==0 ) {return 0;}
......
......@@ -362,7 +362,7 @@ unsigned int TMLTask::getState() const{
}
TMLTransaction* TMLTask::getNextTransaction(TMLTime iEndSchedule) const{
std::cout<<"TMLTask get next trans"<<std::endl;
//std::cout<<"TMLTask get next trans"<<std::endl;
return (_currCommand==0)?0:_currCommand->getCurrTransaction();
//return (_currCommand==0 || _isScheduled)?0:_currCommand->getCurrTransaction();
}
......
......@@ -50,13 +50,13 @@ TMLWriteCommand::TMLWriteCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLeng
}
void TMLWriteCommand::execute(){
std::cout << "in write " << _channel << "\n";
std::cout << "Length of write:" << _length << std::endl;
//std::cout << "in write " << _channel << "\n";
//std::cout << "Length of write:" << _length << std::endl;
_channel->write();
//std::cout << "channel not zero\n";
std::cout << _currTransaction->getVirtualLength() << " samples written\n";
//std::cout << _currTransaction->getVirtualLength() << " samples written\n";
_progress+=_currTransaction->getVirtualLength();
std::cout << "WriteCommand progress: " << _progress << std::endl << std::endl;
//std::cout << "WriteCommand progress: " << _progress << std::endl << std::endl;
//_task->setEndLastTransaction(_currTransaction->getEndTime());
_task->addTransaction(_currTransaction);
//std::cout << "Trans written: " << _currTransaction->toString() << "\n";
......
......@@ -69,12 +69,12 @@ void TMLbrbwChannel::write(){
//aLostBytes /= 100;
aLostBytes = min(aLostBytes/100, _maxNbOfLosses - _nbOfLosses);
_content += _writeTrans->getVirtualLength() - aLostBytes;
std::cout << "Bytes to write: " << _writeTrans->getVirtualLength()-aLostBytes << "\n";
std::cout << "Bytes lost: " << aLostBytes << "\n";
// std::cout << "Bytes to write: " << _writeTrans->getVirtualLength()-aLostBytes << "\n";
//std::cout << "Bytes lost: " << aLostBytes << "\n";
_nbOfLosses += aLostBytes;
} else {
#endif
std::cout << "write all " << _writeTrans->getVirtualLength() << "\n";
//std::cout << "write all " << _writeTrans->getVirtualLength() << "\n";
_content+=_writeTrans->getVirtualLength();
#ifdef LOSS_ENABLED
}
......
......@@ -77,9 +77,9 @@ void Bus::schedule(){
_schedulingNeeded=false;
#ifdef DEBUG_BUS
if (_nextTransaction==0)
std::cout << "Bus:schedule: decision of BUS " << _name << ": no transaction" << std::endl;
std::cout << "Bus:schedule: decision of BUS " << _name << ": no transaction" << std::endl;
else
std::cout << "Bus:schedule: decision of BUS " << _name << ": " << _nextTransaction->toString() << std::endl;
std::cout << "Bus:schedule: decision of BUS " << _name << ": " << _nextTransaction->toString() << std::endl;
#endif
}
......@@ -91,7 +91,7 @@ void Bus::schedule(){
//Adds the transaction determined by the scheduling algorithm to the internal list of scheduled transactions
bool Bus::addTransaction(TMLTransaction* iTransToBeAdded){
std::cout << "Bus add trans ####" << _nextTransaction << "\n";
//std::cout << "Bus add trans ####" << _nextTransaction << "\n";
_endSchedule = _nextTransaction->getEndTime();
//std::cout << "set end time to " << _endSchedule << "\n";
//_transactList.push_back(_nextTransaction);
......@@ -107,7 +107,7 @@ bool Bus::addTransaction(TMLTransaction* iTransToBeAdded){
#endif
_nextTransaction = 0;
_schedulingNeeded=true;
std::cout << "End Bus add trans\n";
//std::cout << "End Bus add trans\n";
return true;
}
......
......@@ -123,23 +123,23 @@ void SingleCoreCPU::calcStartTimeLength(TMLTime iTimeSlice){
std::cout << "CPU:calcSTL: scheduling decision of CPU " << _name << ": " << _nextTransaction->toString() << std::endl;
#endif
#ifdef BUS_ENABLED
std::cout << "CPU:calcSTL: scheduling decision of CPU " << _name << ": " << _nextTransaction->toString() << std::endl;
std::cout << "get channel " << std::endl;
//std::cout << "CPU:calcSTL: scheduling decision of CPU " << _name << ": " << _nextTransaction->toString() << std::endl;
//std::cout << "get channel " << std::endl;
TMLChannel* aChannel=_nextTransaction->getCommand()->getChannel(0);
std::cout << "after get channel " << std::endl;
//std::cout << "after get channel " << std::endl;
if (aChannel==0) {
//std::cout << "no channel " << std::endl;
_masterNextTransaction=0;
} else {
std::cout << "get bus " << std::endl;
//std::cout << "get bus " << std::endl;
_masterNextTransaction= getMasterForBus(aChannel->getFirstMaster(_nextTransaction));
std::cout << "after get first bus " << std::endl;
//std::cout << "after get first bus " << std::endl;
if (_masterNextTransaction!=0){
std::cout << "before register transaction at bus " << _masterNextTransaction->toString() << std::endl;
//std::cout << "before register transaction at bus " << _masterNextTransaction->toString() << std::endl;
_masterNextTransaction->registerTransaction(_nextTransaction);
std::cout << "Transaction registered at bus " << _masterNextTransaction->toString() << std::endl;
//std::cout << "Transaction registered at bus " << _masterNextTransaction->toString() << std::endl;
} else {
std::cout << " NO MASTER NEXT TRANSACTION " << std::endl;
//std::cout << " NO MASTER NEXT TRANSACTION " << std::endl;
}
}
#endif
......@@ -147,7 +147,7 @@ void SingleCoreCPU::calcStartTimeLength(TMLTime iTimeSlice){
TMLTime aStartTime = max(_endSchedule,_nextTransaction->getRunnableTime());
TMLTime aReminder = aStartTime % _timePerCycle;
if (aReminder!=0) aStartTime+=_timePerCycle - aReminder;
std::cout << "CPU: set start time in CPU=" << aStartTime << " Reminder=" << aReminder <<"\n";
//std::cout << "CPU: set start time in CPU=" << aStartTime << " Reminder=" << aReminder <<"\n";
_nextTransaction->setStartTime(aStartTime);
......@@ -245,7 +245,7 @@ std::cout<<"addTransaction"<<std::endl;
bool aFinish;
//TMLTransaction* aTransCopy=0;
std::cout << "*************** LOOKING for master of" << _nextTransaction->toString() << std::endl;
//std::cout << "*************** LOOKING for master of" << _nextTransaction->toString() << std::endl;
if (_masterNextTransaction==0){
aFinish=true;
#ifdef DEBUG_CPU
......@@ -259,31 +259,31 @@ std::cout<<"addTransaction"<<std::endl;
//std::cout << "*************** LOOKING for master of" << _nextTransaction->toString() << std::endl;
BusMaster* aFollowingMaster =_nextTransaction->getChannel()->getNextMaster(_nextTransaction);
if (aFollowingMaster==0){
std::cout << "1\n";
//std::cout << "1\n";
aFinish=true;
//aTransCopy = new TMLTransaction(*_nextTransaction);
//_nextTransaction = aTransCopy;
BusMaster* aTempMaster = getMasterForBus(_nextTransaction->getChannel()->getFirstMaster(_nextTransaction));
std::cout << "2\n";
//std::cout << "2\n";
Slave* aTempSlave= _nextTransaction->getChannel()->getNextSlave(_nextTransaction);
std::cout << "3\n";
//std::cout << "3\n";
aTempMaster->addBusContention(_nextTransaction->getStartTime()-max(_endSchedule,_nextTransaction->getRunnableTime()));
while (aTempMaster!=0){
std::cout << "3a\n";
//std::cout << "3a\n";
aTempMaster->addTransaction(_nextTransaction);
std::cout << "3b\n";
//std::cout << "3b\n";
//if (aTempSlave!=0) aTempSlave->addTransaction(_nextTransaction);
if (aTempSlave!=0) aTempSlave->addTransaction(_nextTransaction); //NEW
std::cout << "4\n";
//std::cout << "4\n";
aTempMaster =_nextTransaction->getChannel()->getNextMaster(_nextTransaction);
std::cout << "5\n";
//std::cout << "5\n";
aTempSlave= _nextTransaction->getChannel()->getNextSlave(_nextTransaction);
}
std::cout << "6\n";
//std::cout << "6\n";
} else {
std::cout << _name << " bus transaction next round" << std::endl;
//std::cout << _name << " bus transaction next round" << std::endl;
_masterNextTransaction=aFollowingMaster;
std::cout << "7\n";
//std::cout << "7\n";
_masterNextTransaction->registerTransaction(_nextTransaction);
aFinish=false;
}
......@@ -319,7 +319,7 @@ std::cout<<"addTransaction"<<std::endl;
void SingleCoreCPU::schedule(){
//std::cout <<"Hello\n";
std::cout << "CPU:schedule BEGIN " << _name << "+++++++++++++++++++++++++++++++++\n";
//std::cout << "CPU:schedule BEGIN " << _name << "+++++++++++++++++++++++++++++++++\n";
TMLTime aTimeSlice = _scheduler->schedule(_endSchedule);
//_schedulingNeeded=false; 05/05/11
//std::cout << "1\n";
......@@ -342,7 +342,7 @@ void SingleCoreCPU::schedule(){
}
//std::cout << "5\n";
if (_nextTransaction!=0 && aOldTransaction != _nextTransaction) calcStartTimeLength(aTimeSlice);
std::cout << "CPU:schedule END " << _name << "+++++++++++++++++++++++++++++++++\n";
//std::cout << "CPU:schedule END " << _name << "+++++++++++++++++++++++++++++++++\n";
}
//std::string SingleCoreCPU::toString() const{
......
......@@ -64,7 +64,7 @@ public:
WorkloadSource(Priority iPriority, WorkloadSource** aSourceArray, unsigned int iNbOfSources): _priority(iPriority), _srcArraySpecified(true){
for (unsigned int i=0;i<iNbOfSources;i++){
addWorkloadSource(aSourceArray[i]);
std::cout << "Workload source added " << aSourceArray[i]->toString() << "\n";
//std::cout << "Workload source added " << aSourceArray[i]->toString() << "\n";
}
delete[] aSourceArray;
}
......
......@@ -67,8 +67,8 @@ public class TMLActivityElementWithAction extends TMLActivityElement {
}
public String customExtraToXML() {
String s = " action=\"" + getAction() + "\"";
return s;
String s = " action=\"" + getAction() + "\"";
return s;
}
}
......@@ -142,8 +142,13 @@ public class TaskNetworkInterface extends TMLTask {
state.setAction("loopExit = 2");
addElement(loop, state);
TMLExecI execI = new TMLExecI("ExecI", referenceObject);
execI.setAction("1");
addElement(state, execI);
TMLSequence mainSequence = new TMLSequence("mainSequence", referenceObject);
addElement(state, mainSequence);
addElement(execI, mainSequence);
for(i=0; i<nbOfVCs; i++) {
TMLChoice testOnLoopExit = null;
......
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