Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TTool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
42
Issues
42
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
mbe-tools
TTool
Commits
fefe4fb3
Commit
fefe4fb3
authored
Jun 06, 2019
by
apvrille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding params of events in txt and html traces
parent
faac414e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
7 deletions
+24
-7
simulators/c++2/src_simulator/app/TMLCommand.cpp
simulators/c++2/src_simulator/app/TMLCommand.cpp
+1
-1
simulators/c++2/src_simulator/app/TMLCommand.h
simulators/c++2/src_simulator/app/TMLCommand.h
+3
-0
simulators/c++2/src_simulator/app/TMLSendCommand.cpp
simulators/c++2/src_simulator/app/TMLSendCommand.cpp
+3
-2
simulators/c++2/src_simulator/app/TMLSendCommand.h
simulators/c++2/src_simulator/app/TMLSendCommand.h
+3
-1
simulators/c++2/src_simulator/sim/Simulator.cpp
simulators/c++2/src_simulator/sim/Simulator.cpp
+2
-2
src/main/java/tmltranslator/tomappingsystemc2/MappedSystemCTask.java
...va/tmltranslator/tomappingsystemc2/MappedSystemCTask.java
+12
-1
No files found.
simulators/c++2/src_simulator/app/TMLCommand.cpp
View file @
fefe4fb3
...
...
@@ -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
);
}
...
...
simulators/c++2/src_simulator/app/TMLCommand.h
View file @
fefe4fb3
...
...
@@ -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
;
...
...
simulators/c++2/src_simulator/app/TMLSendCommand.cpp
View file @
fefe4fb3
...
...
@@ -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
->
toS
hortString
()
;
outp
<<
_task
->
toString
()
<<
": Send "
<<
_channel
->
toS
tring
()
<<
" params:"
<<
lastParams
;
return
outp
.
str
();
}
simulators/c++2/src_simulator/app/TMLSendCommand.h
View file @
fefe4fb3
...
...
@@ -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
simulators/c++2/src_simulator/sim/Simulator.cpp
View file @
fefe4fb3
...
...
@@ -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
;
...
...
src/main/java/tmltranslator/tomappingsystemc2/MappedSystemCTask.java
View file @
fefe4fb3
...
...
@@ -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"
;
//}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment