From 06f046806321c0076d00f28148b2ae5732cdea66 Mon Sep 17 00:00:00 2001 From: jerray <jawher.jerray@eurecom.fr> Date: Fri, 19 Aug 2022 13:13:11 +0200 Subject: [PATCH] fix stop simulation --- .../c++2/src_simulator/app/TMLChannel.h | 15 +++- .../c++2/src_simulator/app/TMLEventBChannel.h | 70 +++++++++++++++++ .../src_simulator/app/TMLEventFBChannel.h | 75 +++++++++++++++++++ .../c++2/src_simulator/app/TMLEventFChannel.h | 69 +++++++++++++++++ .../c++2/src_simulator/app/TMLbrbwChannel.cpp | 57 ++++++++++++++ .../c++2/src_simulator/app/TMLbrbwChannel.h | 2 + .../src_simulator/app/TMLbrnbwChannel.cpp | 55 ++++++++++++++ .../c++2/src_simulator/app/TMLbrnbwChannel.h | 2 + .../c++2/src_simulator/sim/Simulator.cpp | 15 ++-- src/main/java/graph/AUTGraph.java | 2 +- .../resources/help/diplodocussimulator.html | 24 +++++- .../resources/help/diplodocussimulator.md | 4 +- .../DiplodocusSimulatorTest.java | 4 +- 13 files changed, 380 insertions(+), 14 deletions(-) diff --git a/simulators/c++2/src_simulator/app/TMLChannel.h b/simulators/c++2/src_simulator/app/TMLChannel.h index c0591a3e52..d2f7b5fa5c 100644 --- a/simulators/c++2/src_simulator/app/TMLChannel.h +++ b/simulators/c++2/src_simulator/app/TMLChannel.h @@ -172,9 +172,20 @@ public: */ inline virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter* iParam) {return iNbOfSamples;} + ///Writes samples into the channel + /** + \param iNbOfSamples Number of samples to write + \param iParam Parameter to write + */ + inline virtual TMLLength writeSamples(TMLLength iNbOfSamples, Parameter* iParam) {return iNbOfSamples;} - - + ///Reads samples from the channel + /** + \param iNbOfSamples Number of samples to read + \param iParam Parameter to read + */ + inline virtual TMLLength readSamples(TMLLength iNbOfSamples, Parameter* iParam) {return iNbOfSamples;} + ///Writes XML information about the component to a stream /** \param s Reference to an output stream diff --git a/simulators/c++2/src_simulator/app/TMLEventBChannel.h b/simulators/c++2/src_simulator/app/TMLEventBChannel.h index abf9cb7523..367102c34f 100644 --- a/simulators/c++2/src_simulator/app/TMLEventBChannel.h +++ b/simulators/c++2/src_simulator/app/TMLEventBChannel.h @@ -231,7 +231,77 @@ public: return aNbToInsert; } + TMLLength writeSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + #ifdef LOSS_ENABLED + if (this->_maxNbOfLosses > this->_nbOfLosses && this->_lossRate!=0 && myrand(0,99) < this->_lossRate){ + this->_nbOfLosses++; + }else{ + #endif + + if (aNbToInsert>0){ + this->_content+=aNbToInsert; + iParam = this->_writeTrans->getCommand()->setParams(0); + for (TMLLength i=0; i<aNbToInsert; i++) this->_paramQueue.push_back(iParam); + #ifdef STATE_HASH_ENABLED + iParam->getStateHash(& this->_stateHash); //new in if + #endif + } + if (this->_readTrans!=0 && this->_readTrans->getVirtualLength()==0){ + this->_readTrans->setRunnableTime(this->_writeTrans->getEndTime()); + this->_readTrans->setChannel(this); + this->_readTrans->setVirtualLength(WAIT_SEND_VLEN); + } + #ifdef LOSS_ENABLED + } + #endif + #ifdef LISTENERS_ENABLED + NOTIFY_WRITE_TRANS_EXECUTED(this->_writeTrans); + #endif + this->_writeTrans=0; //TEST + + std::cout << "\nWriting in EventB Channel: " << aNbToInsert << ";" << std::endl; + std::cout << "\n_content: " << this->_content << ";" << std::endl; + return aNbToInsert; + } + + + TMLLength readSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + + if (this->_content<1){ + aNbToInsert = 0; + return aNbToInsert; + }else{ + if (this->_content==0 && _sourceIsFile) readNextEvents(); + if (aNbToInsert>0 && this->_content>=iNbOfSamples){ + this->_content-=aNbToInsert; + for (TMLLength i=0; i<aNbToInsert; i++){ + this->_readTrans->getCommand()->setParams(this->_paramQueue.front()); + delete dynamic_cast<SizedParameter<T,paramNo>*>(this->_paramQueue.front()); + this->_paramQueue.pop_front(); //NEW + } + }else if (aNbToInsert>0 && this->_content<iNbOfSamples){ + aNbToInsert = this->_content; + this->_content=0; + for (TMLLength i=0; i<aNbToInsert; i++){ + this->_readTrans->getCommand()->setParams(this->_paramQueue.front()); + delete dynamic_cast<SizedParameter<T,paramNo>*>(this->_paramQueue.front()); + this->_paramQueue.pop_front(); //NEW + } + } + #ifdef STATE_HASH_ENABLED + this->_hashValid = false; + #endif + + #ifdef LISTENERS_ENABLED + NOTIFY_READ_TRANS_EXECUTED(this->_readTrans); + #endif + this->_readTrans=0; + return aNbToInsert; + } + } protected: void readNextEvents(){ diff --git a/simulators/c++2/src_simulator/app/TMLEventFBChannel.h b/simulators/c++2/src_simulator/app/TMLEventFBChannel.h index d8fa24ece4..4a6e4b9558 100644 --- a/simulators/c++2/src_simulator/app/TMLEventFBChannel.h +++ b/simulators/c++2/src_simulator/app/TMLEventFBChannel.h @@ -175,6 +175,81 @@ public: if (this->_readTrans!=0) this->_readTrans->setVirtualLength((this->_content>0)?WAIT_SEND_VLEN:0); return aNbToInsert; } + + TMLLength writeSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + + #ifdef LOSS_ENABLED + if (this->_maxNbOfLosses > this->_nbOfLosses && this->_lossRate!=0 && (unsigned int)myrand(0,99) < this->_lossRate){ + this->_nbOfLosses++; + } else { + #endif + + if (aNbToInsert>0){ + this->_content+=aNbToInsert; + for (TMLLength i=0; i<aNbToInsert; i++) this->_paramQueue.push_back(iParam); + #ifdef STATE_HASH_ENABLED + iParam->getStateHash(& this->_stateHash); //NEW in if + #endif + } + if (this->_readTrans!=0 && this->_readTrans->getVirtualLength()==0){ + this->_readTrans->setRunnableTime(this->_writeTrans->getEndTime()); + this->_readTrans->setChannel(this); + this->_readTrans->setVirtualLength(WAIT_SEND_VLEN); + } + #ifdef LOSS_ENABLED + } + #endif + + #ifdef LISTENERS_ENABLED + NOTIFY_WRITE_TRANS_EXECUTED(this->_writeTrans); + #endif + this->_writeTrans=0; //TEST + + std::cout << "\nWriting in EventFB Channel: " << aNbToInsert << ";" << std::endl; + std::cout << "\n_content: " << this->_content << ";" << std::endl; + return aNbToInsert; + } + + + TMLLength readSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + + if (this->_content<1){ + aNbToInsert = 0; + return aNbToInsert; + }else{ + if (aNbToInsert>0 && this->_content>=iNbOfSamples){ + this->_content-=aNbToInsert; + for (TMLLength i=0; i<aNbToInsert; i++){ + this->_readTrans->getCommand()->setParams(this->_paramQueue.front()); + delete dynamic_cast<SizedParameter<T,paramNo>*>(this->_paramQueue.front()); + this->_paramQueue.pop_front(); //NEW + } + }else if (aNbToInsert>0 && this->_content<iNbOfSamples){ + aNbToInsert = this->_content; + this->_content=0; + for (TMLLength i=0; i<aNbToInsert; i++){ + this->_readTrans->getCommand()->setParams(this->_paramQueue.front()); + delete dynamic_cast<SizedParameter<T,paramNo>*>(this->_paramQueue.front()); + this->_paramQueue.pop_front(); //NEW + } + } + #ifdef STATE_HASH_ENABLED + this->_hashValid = false; + #endif + if (this->_writeTrans!=0 && this->_writeTrans->getVirtualLength()==0){ + this->_writeTrans->setRunnableTime(this->_readTrans->getEndTime()); + this->_writeTrans->setChannel(this); + this->_writeTrans->setVirtualLength(WAIT_SEND_VLEN); + } + #ifdef LISTENERS_ENABLED + NOTIFY_READ_TRANS_EXECUTED(this->_readTrans); + #endif + this->_readTrans=0; + return aNbToInsert; + } + } protected: ///Length of the channel TMLLength _length; diff --git a/simulators/c++2/src_simulator/app/TMLEventFChannel.h b/simulators/c++2/src_simulator/app/TMLEventFChannel.h index 4100f9215c..8d8a5caba8 100644 --- a/simulators/c++2/src_simulator/app/TMLEventFChannel.h +++ b/simulators/c++2/src_simulator/app/TMLEventFChannel.h @@ -168,6 +168,75 @@ public: if (this->_readTrans!=0) this->_readTrans->setVirtualLength((this->_content>0)?WAIT_SEND_VLEN:0); return aNbToInsert; } + + TMLLength writeSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + + if (this->_content<_length){ + #ifdef LOSS_ENABLED + if (this->_maxNbOfLosses > this->_nbOfLosses && this->_lossRate!=0 && myrand(0,99) < this->_lossRate){ + this->_nbOfLosses++; + }else{ + #endif + if (aNbToInsert>0){ + this->_content+=aNbToInsert; + for (TMLLength i=0; i<aNbToInsert; i++) this->_paramQueue.push_back(iParam); + #ifdef STATE_HASH_ENABLED + iParam->getStateHash(& this->_stateHash); //new in if + #endif + } + if (this->_readTrans!=0 && this->_readTrans->getVirtualLength()==0){ + this->_readTrans->setRunnableTime(this->_writeTrans->getEndTime()); + this->_readTrans->setChannel(this); + this->_readTrans->setVirtualLength(WAIT_SEND_VLEN); + } + #ifdef LOSS_ENABLED + } + #endif + } + #ifdef LISTENERS_ENABLED + NOTIFY_WRITE_TRANS_EXECUTED(this->_writeTrans); + #endif + this->_writeTrans=0; //TEST + + std::cout << "\nWriting in EventF Channel: " << aNbToInsert << ";" << std::endl; + std::cout << "\n_content: " << this->_content << ";" << std::endl; + return aNbToInsert; + } + + TMLLength readSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + if (this->_content<1){ + aNbToInsert = 0; + return aNbToInsert; + }else{ + if (aNbToInsert>0 && this->_content>=iNbOfSamples){ + this->_content-=aNbToInsert; + for (TMLLength i=0; i<aNbToInsert; i++){ + this->_readTrans->getCommand()->setParams(this->_paramQueue.front()); + delete dynamic_cast<SizedParameter<T,paramNo>*>(this->_paramQueue.front()); + this->_paramQueue.pop_front(); //NEW + } + }else if (aNbToInsert>0 && this->_content<iNbOfSamples){ + aNbToInsert = this->_content; + this->_content=0; + for (TMLLength i=0; i<aNbToInsert; i++){ + this->_readTrans->getCommand()->setParams(this->_paramQueue.front()); + delete dynamic_cast<SizedParameter<T,paramNo>*>(this->_paramQueue.front()); + this->_paramQueue.pop_front(); //NEW + } + } + #ifdef STATE_HASH_ENABLED + this->_hashValid = false; + #endif + #ifdef LISTENERS_ENABLED + NOTIFY_READ_TRANS_EXECUTED(this->_readTrans); + #endif + this->_readTrans=0; + return aNbToInsert; + } + + } protected: ///Length of the channel TMLLength _length; diff --git a/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp b/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp index b9f0c929b3..85acbc5a65 100644 --- a/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp +++ b/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp @@ -207,3 +207,60 @@ TMLLength TMLbrbwChannel::insertSamples(TMLLength iNbOfSamples, Parameter* iPara setTransactionLength(); return aNbToInsert; } + +TMLLength TMLbrbwChannel::writeSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + + #ifdef LOSS_ENABLED + if (_maxNbOfLosses > _nbOfLosses){ + TMLLength aLostBytes = iNbOfSamples * _lossRate + _lossRemainder; + _lossRemainder = aLostBytes % 100; + aLostBytes = min(aLostBytes/100, _maxNbOfLosses - _nbOfLosses); + _content += aNbToInsert - aLostBytes; + _nbOfLosses += aLostBytes; + } else { +#endif + _content+=aNbToInsert; +#ifdef LOSS_ENABLED + } +#endif + if (_readTrans!=0 && _readTrans->getVirtualLength()==0){ + _readTrans->setRunnableTime(_writeTrans->getEndTime()); + _readTrans->setVirtualLength(min(_content,_nbToRead)); + _overflow=false; + } + _nbToWrite=0; + //FOR_EACH_TRANSLISTENER (*i)->transExecuted(_writeTrans); +#ifdef LISTENERS_ENABLED + NOTIFY_WRITE_TRANS_EXECUTED(_writeTrans); +#endif + _writeTrans=0; + + + std::cout << "\nWriting in brbw Channel: " << aNbToInsert << ";" << std::endl; + std::cout << "\n_content: " << _content << ";" << std::endl; + return aNbToInsert; +} + + +TMLLength TMLbrbwChannel::readSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + if (_content<aNbToInsert){ + aNbToInsert=0; + return aNbToInsert; + } else { + _content-=aNbToInsert; + _nbToRead=0; + if (_writeTrans!=0 && _writeTrans->getVirtualLength()==0){ + _writeTrans->setRunnableTime(_readTrans->getEndTime()); + _writeTrans->setVirtualLength(min(_length-_content,_nbToWrite)); + _underflow=false; + } + //FOR_EACH_TRANSLISTENER (*i)->transExecuted(_readTrans); +#ifdef LISTENERS_ENABLED + NOTIFY_READ_TRANS_EXECUTED(_readTrans); +#endif + _readTrans=0; + return aNbToInsert; + } +} diff --git a/simulators/c++2/src_simulator/app/TMLbrbwChannel.h b/simulators/c++2/src_simulator/app/TMLbrbwChannel.h index 085663e034..994d314f46 100644 --- a/simulators/c++2/src_simulator/app/TMLbrbwChannel.h +++ b/simulators/c++2/src_simulator/app/TMLbrbwChannel.h @@ -74,6 +74,8 @@ public: inline TMLTask* getBlockedWriteTask() const {return _writeTask;} std::string toString() const; virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter* iParam); + virtual TMLLength writeSamples(TMLLength iNbOfSamples, Parameter* iParam); + virtual TMLLength readSamples(TMLLength iNbOfSamples, Parameter* iParam); protected: ///Determines the virtual length of read and write transactions based on the state of the channel void setTransactionLength() const; diff --git a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp index e284eed280..f218629a06 100644 --- a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp +++ b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp @@ -167,3 +167,58 @@ TMLLength TMLbrnbwChannel::insertSamples(TMLLength iNbOfSamples, Parameter* iPar return aNbToInsert; } + + +TMLLength TMLbrnbwChannel::writeSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; +#ifdef LOSS_ENABLED + if (_maxNbOfLosses > _nbOfLosses){ + TMLLength aLostBytes = aNbToInsert * _lossRate + _lossRemainder; + _lossRemainder = aLostBytes % 100; + aLostBytes = min(aLostBytes/100, _maxNbOfLosses - _nbOfLosses); + _content += aNbToInsert - aLostBytes; + _nbOfLosses += aLostBytes; + }else{ +#endif + //std::cout << "write all " << _writeTrans->getVirtualLength() << "\n"; + _content+=aNbToInsert; +#ifdef LOSS_ENABLED + } +#endif + if (_readTrans!=0 && _readTrans->getVirtualLength()==0){ + _readTrans->setRunnableTime(_writeTrans->getEndTime()); + _readTrans->setVirtualLength(min(_content,_nbToRead)); + _overflow=false; + } + _nbToWrite=0; + //FOR_EACH_TRANSLISTENER (*i)->transExecuted(_writeTrans); +#ifdef LISTENERS_ENABLED + NOTIFY_WRITE_TRANS_EXECUTED(_writeTrans); +#endif + _writeTrans=0; + setTransactionLength(); + + + std::cout << "\nWriting in brnbw Channel: " << aNbToInsert << ";" << std::endl; + std::cout << "\n_content: " << _content << ";" << std::endl; + return aNbToInsert; +} + + +TMLLength TMLbrnbwChannel::readSamples(TMLLength iNbOfSamples, Parameter* iParam){ + TMLLength aNbToInsert = iNbOfSamples; + if (_content<aNbToInsert){ + aNbToInsert = 0; + return aNbToInsert; + }else{ + _content-=aNbToInsert; + _nbToRead=0; + //FOR_EACH_TRANSLISTENER (*i)->transExecuted(_readTrans); +#ifdef LISTENERS_ENABLED + NOTIFY_READ_TRANS_EXECUTED(_readTrans); +#endif + _readTrans=0; + return aNbToInsert; + } +} + diff --git a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h index e2cd76879a..af779b29aa 100644 --- a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h +++ b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h @@ -72,6 +72,8 @@ public: inline TMLTask* getBlockedWriteTask() const {return 0;} std::string toString() const; virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter* iParam); + virtual TMLLength writeSamples(TMLLength iNbOfSamples, Parameter* iParam); + virtual TMLLength readSamples(TMLLength iNbOfSamples, Parameter* iParam); protected: ///Determines the virtual length of read and write transactions based on the state of the channel void setTransactionLength() const; diff --git a/simulators/c++2/src_simulator/sim/Simulator.cpp b/simulators/c++2/src_simulator/sim/Simulator.cpp index 96626e271c..47273f242f 100644 --- a/simulators/c++2/src_simulator/sim/Simulator.cpp +++ b/simulators/c++2/src_simulator/sim/Simulator.cpp @@ -981,7 +981,7 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ CPU* depCPU; FPGA* depFPGA; - bool isFinish=true; + bool isFinish=false; // bool isHanging = false; // long countMaxTrans = 0; @@ -1014,8 +1014,9 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ #endif - if( transLET !=0 && _simComp->getStopFlag()) - isFinish=false; + if( transLET ==0 && _simComp->getStopFlag()){ + isFinish=true; + } while ( transLET!=0 && !_simComp->getStopFlag()){ #ifdef DEBUG_SIMULATE @@ -1032,6 +1033,9 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ isFinish = true; break; } + // else{ + // isFinish = false; + // } int cnt = 0; int cnt1 = 0; for(TaskList::const_iterator i=_simComp->getNonDaemonTaskList().begin(); i != _simComp->getNonDaemonTaskList().end(); ++i){ @@ -1048,8 +1052,6 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ } } } - else - isFinish=false; #ifdef DEBUG_SIMULATE @@ -1215,7 +1217,6 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ if(isFinish==true) aSimCompleted = true; - if (aSimCompleted){ #ifdef LISTENERS_ENABLED NOTIFY_SIM_STOPPED(); @@ -2511,7 +2512,7 @@ void Simulator::exploreTree(unsigned int iDepth, ID iPrevID, std::ofstream& iAUT std::cout << "run to next done" << std::endl; aRandomCmd = _simComp->getCurrentRandomCmd(); //std::cout << "Random command:" << aRandomCmd <<std::endl; - }while (!aSimTerminated && aRandomCmd==0 && _simComp->wasKnownStateReached()==0); + }while (_simComp->getStopFlag()==false && !aSimTerminated && aRandomCmd==0 && _simComp->wasKnownStateReached()==0); #ifdef EXPLOGRAPH_ENABLED std::cout << "Explo graph AUT" << std::endl; aLastID = schedule2GraphAUT(iAUTFile, iPrevID,oTransCounter); diff --git a/src/main/java/graph/AUTGraph.java b/src/main/java/graph/AUTGraph.java index 353d5aaf37..b57fa21fa9 100755 --- a/src/main/java/graph/AUTGraph.java +++ b/src/main/java/graph/AUTGraph.java @@ -1751,7 +1751,7 @@ public class AUTGraph implements myutil.Graph { } public int getMaxValue(String nameOfTransition) { - int maxValue = -1; + int maxValue = 0; //System.out.println("executing. min value"); for (AUTTransition tr : transitions) { //System.out.println("executing. Dealing with " + tr.transition); diff --git a/src/main/resources/help/diplodocussimulator.html b/src/main/resources/help/diplodocussimulator.html index e0546a72f1..a929b734b4 100644 --- a/src/main/resources/help/diplodocussimulator.html +++ b/src/main/resources/help/diplodocussimulator.html @@ -516,7 +516,7 @@ Not defined: <unknow param></code></pre> <td style="text-align: center;">wic</td> <td style="text-align: center;">6</td> <td style="text-align: center;">Writes y samples / events to channel / event x</td> -<td style="text-align: center;">[Type: 1] Channel ID</td> +<td style="text-align: center;">[Type: 2] Channel ID or Channel name</td> <td style="text-align: center;">[Type: 2] Nb of samples</td> <td style="text-align: center;">-</td> <td style="text-align: center;">-</td> @@ -555,6 +555,28 @@ Not defined: <unknow param></code></pre> <td style="text-align: center;">-</td> <td style="text-align: center;">-</td> </tr> +<tr class="odd"> +<td style="text-align: center;">write-samples-in-channel</td> +<td style="text-align: center;">wsic</td> +<td style="text-align: center;">29</td> +<td style="text-align: center;">Writes y samples from channel x</td> +<td style="text-align: center;">[Type: 2] Channel ID or Channel name</td> +<td style="text-align: center;">[Type: 2] Nb of samples</td> +<td style="text-align: center;">-</td> +<td style="text-align: center;">-</td> +<td style="text-align: center;">-</td> +</tr> +<tr class="even"> +<td style="text-align: center;">read-from-channel</td> +<td style="text-align: center;">rfc</td> +<td style="text-align: center;">30</td> +<td style="text-align: center;">Reads y samples from channel x</td> +<td style="text-align: center;">[Type: 2] Channel ID or Channel name</td> +<td style="text-align: center;">[Type: 2] Nb of samples</td> +<td style="text-align: center;">-</td> +<td style="text-align: center;">-</td> +<td style="text-align: center;">-</td> +</tr> </tbody> </table> </body> diff --git a/src/main/resources/help/diplodocussimulator.md b/src/main/resources/help/diplodocussimulator.md index a0aca2dbfb..b681a01d91 100644 --- a/src/main/resources/help/diplodocussimulator.md +++ b/src/main/resources/help/diplodocussimulator.md @@ -89,8 +89,10 @@ save-trace-in-file | stif | 7 | Saves the current trace of the simulation in a V show-timeline-trace | stlt | 7 4 | Show the current timeline diagram trace in HTML format | [Type: 2] Task List | [Type: 1] Scale idle time: 0 -> no, 1 -> yes | [Type: 2] Start Time | [Type: 2] End Time | - set-variable | sv | 5 | Set the value of a variable | [Type: 1] task ID | [Type: 1] variable ID | [Type: 1] variable value | - | - stop | stop | 15 | Stops the currently running simulation | - | - | - | - | - -write-in-channel | wic | 6 | Writes y samples / events to channel / event x | [Type: 1] Channel ID | [Type: 2] Nb of samples | - | - | - +write-in-channel | wic | 6 | Writes y samples / events to channel / event x | [Type: 2] Channel ID or Channel name | [Type: 2] Nb of samples | - | - | - add-virtual-signals | avs | 1 16 | Send virtual events to channel | [Type: 2] Channel name | [Type: 2] Nb of samples | [Type: 2] value of samples | - | - save-status-in-file | ssif | 27 | Saves the current status into a file | [Type: 2] File name | - | - | - | - save-time-in-file | stf | 28 | Saves the current time into a file | [Type: 2] File name | - | - | - | - +write-samples-in-channel | wsic | 29 | Writes y samples from channel x | [Type: 2] Channel ID or Channel name | [Type: 2] Nb of samples | - | - | - +read-from-channel | rfc | 30 | Reads y samples from channel x | [Type: 2] Channel ID or Channel name | [Type: 2] Nb of samples | - | - | - diff --git a/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java b/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java index d7848fb2d3..2f975d2598 100644 --- a/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java +++ b/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java @@ -39,8 +39,8 @@ public class DiplodocusSimulatorTest extends AbstractTest { // model for Daemon Run To Next Breakpoint final String MODELS_DAEMON_RTNB = "testDaemon"; - final int [] DAEMON_RTNBP_1 = {11, 10, 85, 85}; - final int [] DAEMON_RTNBP_2 = {18, 17, 168, 168}; + final int [] DAEMON_RTNBP_1 = {10, 9, 2147483647, 0}; // 2147483647==-1 + final int [] DAEMON_RTNBP_2 = {17, 16, 2147483647, 0}; // 2147483647==-1 private String SIM_DIR; @BeforeClass -- GitLab