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