Commit fefe4fb3 authored by apvrille's avatar apvrille

Adding params of events in txt and html traces

parent faac414e
...@@ -111,7 +111,7 @@ TMLCommand* TMLCommand::prepare(bool iInit){ ...@@ -111,7 +111,7 @@ TMLCommand* TMLCommand::prepare(bool iInit){
_task->setCurrCommand(aNextCommand); _task->setCurrCommand(aNextCommand);
if (aNextCommand==0){ if (aNextCommand==0){
return 0; return 0;
}else{ } else {
//std::cout << "Prepare command, prepare next command" << std::endl; //std::cout << "Prepare command, prepare next command" << std::endl;
return aNextCommand->prepare(false); return aNextCommand->prepare(false);
} }
......
...@@ -224,6 +224,9 @@ public: ...@@ -224,6 +224,9 @@ public:
static unsigned int getBranchCoverage(); static unsigned int getBranchCoverage();
///Reset coverage related state variables ///Reset coverage related state variables
static void clearCoverageVars(); static void clearCoverageVars();
std::string lastParams; // Exchanged params
protected: protected:
///ID of the command ///ID of the command
ID _ID; ID _ID;
......
...@@ -72,13 +72,14 @@ TMLCommand* TMLSendCommand::prepareNextTransaction(){ ...@@ -72,13 +72,14 @@ TMLCommand* TMLSendCommand::prepareNextTransaction(){
std::string TMLSendCommand::toString() const{ std::string TMLSendCommand::toString() const{
std::ostringstream outp; std::ostringstream outp;
outp << "Send in " << TMLCommand::toString() << " " << _channel->toString(); outp << "Send in " << TMLCommand::toString() << " " << _channel->toString() << " params=" << lastParams;
return outp.str(); return outp.str();
} }
std::string TMLSendCommand::toShortString() const{ std::string TMLSendCommand::toShortString() const{
// std::cout << "TMLSendCommand::short string params:" << lastParams.str() << "\n";
std::ostringstream outp; std::ostringstream outp;
outp << _task->toString() << ": Send " << _channel->toShortString(); outp << _task->toString() << ": Send " << _channel->toString() << " params:" << lastParams;
return outp.str(); return outp.str();
} }
...@@ -47,7 +47,7 @@ Ludovic Apvrille, Renaud Pacalet ...@@ -47,7 +47,7 @@ Ludovic Apvrille, Renaud Pacalet
#include <TMLEventChannel.h> #include <TMLEventChannel.h>
///This class models a send event operation within a TML task. ///This class models a send event operation within a TML task.
class TMLSendCommand:public TMLCommand{ class TMLSendCommand:public TMLCommand {
public: public:
///Constructor ///Constructor
/** /**
...@@ -86,6 +86,8 @@ protected: ...@@ -86,6 +86,8 @@ protected:
////Bitmap of live variables ////Bitmap of live variables
//const char* _liveVarList; //const char* _liveVarList;
TMLCommand* prepareNextTransaction(); TMLCommand* prepareNextTransaction();
}; };
#endif #endif
...@@ -1418,13 +1418,13 @@ void Simulator::decodeCommand(std::string iCmd, std::ostream& iXmlOutStream){ ...@@ -1418,13 +1418,13 @@ void Simulator::decodeCommand(std::string iCmd, std::ostream& iXmlOutStream){
if (aChannel==0){ if (aChannel==0){
aGlobMsg << TAG_MSGo << MSG_CMPNFOUND << TAG_MSGc << std::endl; aGlobMsg << TAG_MSGo << MSG_CMPNFOUND << TAG_MSGc << std::endl;
anErrorCode=2; anErrorCode=2;
}else{ } else {
aInpStream >> aParam1; aInpStream >> aParam1;
TMLEventChannel* anEventChannel = dynamic_cast<TMLEventChannel*>(aChannel); TMLEventChannel* anEventChannel = dynamic_cast<TMLEventChannel*>(aChannel);
if (anEventChannel==0){ if (anEventChannel==0){
//aChannel->insertSamples(aParam1, anInsertParam); //aChannel->insertSamples(aParam1, anInsertParam);
aChannel->insertSamples(aParam1, 0); aChannel->insertSamples(aParam1, 0);
}else{ } else {
//Parameter<ParamType> anInsertParam((dynamic_cast<TMLEventChannel*>(aChannel))->getParamNo()); //Parameter<ParamType> anInsertParam((dynamic_cast<TMLEventChannel*>(aChannel))->getParamNo());
Parameter* anInsertParam = anEventChannel->buildParameter(); Parameter* anInsertParam = anEventChannel->buildParameter();
aInpStream >> anInsertParam; aInpStream >> anInsertParam;
......
...@@ -922,9 +922,20 @@ public class MappedSystemCTask { ...@@ -922,9 +922,20 @@ public class MappedSystemCTask {
functions += "Parameter* " + reference + "::" + cmdName + "_func(Parameter* ioParam){" + CR; functions += "Parameter* " + reference + "::" + cmdName + "_func(Parameter* ioParam){" + CR;
if (wait) if (wait)
functions += "ioParam->getP(" + concatParams + ")" + SCCR + "return 0" + SCCR; functions += "ioParam->getP(" + concatParams + ")" + SCCR + "return 0" + SCCR;
else else {
//functions += "return new Parameter<ParamType>(" + nbOfParams + "," + concatParams + ")" + SCCR; //functions += "return new Parameter<ParamType>(" + nbOfParams + "," + concatParams + ")" + SCCR;
functions += "std::ostringstream ss" + SCCR + "\n";
functions += "ss << \"(\"";
for(int p=0; p<nbOfParams; p++) {
functions += " << " + paramArray[p];
if (p < nbOfParams - 1) {
functions += " << \",\"";
}
}
functions += " << \")\"" + SCCR;
functions += cmdName + ".lastParams = ss.str()" + SCCR + "\n";
functions += "return new SizedParameter<ParamType," + nbOfParams + ">(" + concatParams + ")" + SCCR; functions += "return new SizedParameter<ParamType," + nbOfParams + ">(" + concatParams + ")" + SCCR;
}
functions += "}\n\n"; functions += "}\n\n";
//} //}
} }
......
...@@ -307,7 +307,7 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal ...@@ -307,7 +307,7 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal
tabbedPane.setDisplayedMnemonicIndexAt(dst, mnemonicLoc); tabbedPane.setDisplayedMnemonicIndexAt(dst, mnemonicLoc);
tabbedPane.setForegroundAt(dst, fg); tabbedPane.setForegroundAt(dst, fg);
tabbedPane.setBackgroundAt(dst, bg); tabbedPane.setBackgroundAt(dst, bg);
tabbedPane.setSelectedIndex(dst); tabbedPane.setSelectedIndex(dst);
} }
......
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