Commit 258eeb03 authored by Siyuan Niu's avatar Siyuan Niu

task vcd is ok without penalty

parent c865cec0
......@@ -143,6 +143,19 @@ void TMLTask::getNextSignalChange(bool iInit, SignalChangeData* oSigData){
TMLTransaction* aCurrTrans=*_posTrasactListVCD;
//oNoMoreTrans=false;
switch (_vcdOutputState){
case START_TRANS:
//outp << VCD_PREFIX << vcdValConvert(RUNNING) << "ta" << _ID;
//oSigChange=outp.str();
do{
_previousTransEndTime=(*_posTrasactListVCD)->getEndTime();
_posTrasactListVCD++;
}while (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTimeOperation()==_previousTransEndTime);
_vcdOutputState=END_TRANS;
//return aCurrTrans->getStartTimeOperation();
if( aCurrTrans->getStartTimeOperation() ){
new (oSigData) SignalChangeData(RUNNING, aCurrTrans->getStartTimeOperation(), this);
break;
}
case END_TRANS:
if (aCurrTrans->getRunnableTime()==_previousTransEndTime){
//outp << VCD_PREFIX << vcdValConvert(RUNNABLE) << "ta" << _ID;
......@@ -168,17 +181,7 @@ void TMLTask::getNextSignalChange(bool iInit, SignalChangeData* oSigData){
//return aCurrTrans->getRunnableTime();
new (oSigData) SignalChangeData(RUNNABLE, aCurrTrans->getRunnableTime(), this);
break;
case START_TRANS:
//outp << VCD_PREFIX << vcdValConvert(RUNNING) << "ta" << _ID;
//oSigChange=outp.str();
do{
_previousTransEndTime=(*_posTrasactListVCD)->getEndTime();
_posTrasactListVCD++;
}while (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTimeOperation()==_previousTransEndTime);
_vcdOutputState=END_TRANS;
//return aCurrTrans->getStartTimeOperation();
new (oSigData) SignalChangeData(RUNNING, aCurrTrans->getStartTimeOperation(), this);
break;
}
}
//return 0;
......
......@@ -522,6 +522,7 @@ void Simulator::schedule2VCD(std::string& iTraceFileName) const{
myfile << "$var wire 2 " << (*i)->toShortString() << " " << (*i)->toString() << " $end\n";
else
myfile << "$var wire 1 " << (*i)->toShortString() << " " << (*i)->toString() << " $end\n";
std::cout<<"in trans!!!"<<std::endl;
aTopElement = new SignalChangeData();
(*i)->getNextSignalChange(true, aTopElement);
aQueue.push(aTopElement);
......
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