Commit 6c6e7300 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Merge branch 'revert-c7faf42b' into 'master'

Revert c7faf42b

Closes #233

See merge request !261
parents dee83c34 409957be
......@@ -43,9 +43,13 @@ Ludovic Apvrille, Renaud Pacalet
#include <TMLTransaction.h>
#include <SimComponents.h>
//#include <CommandListener.h>
TMLDelayCommand::TMLDelayCommand(ID iID, TMLTask* iTask,TMLLength iStatLength, ActionFuncPointer iActionFunc, const char* iLiveVarList, bool iCheckpoint):TMLCommand(iID, iTask, 1, 1, iLiveVarList, iCheckpoint),_actionFunc(iActionFunc){
_length = iStatLength;
TMLDelayCommand::TMLDelayCommand(ID iID, TMLTask* iTask,TMLLength iStatLength, ActionFuncPointer iActionFunc, const char* iLiveVarList, bool iCheckpoint, bool isActiveDelay):TMLCommand(iID, iTask, 1, 1, iLiveVarList, iCheckpoint),_actionFunc(iActionFunc){
if (!isActiveDelay){
_isActiveDelay = false;
}else {
_length = iStatLength;
_isActiveDelay = true;
}
_type=ACT;
}
void TMLDelayCommand::execute(){
......@@ -62,28 +66,46 @@ TMLCommand* TMLDelayCommand::prepareNextTransaction(){
_task->setCurrCommand(this);
return this; //for command which generates transactions this is returned anyway by prepareTransaction
}
if(_isActiveDelay){
if (_progress==0){
(_task->*_actionFunc)();
_execTimes++;
if (_length==0){
//std::cout << "ExeciCommand len==0 " << std::endl;
TMLCommand* aNextCommand=getNextCommand();
#ifdef STATE_HASH_ENABLED
if (_liveVarList!=0) _task->refreshStateHash(_liveVarList);
#endif
_task->setCurrCommand(aNextCommand);
//FOR_EACH_CMDLISTENER (*i)->commandFinished(this);
#ifdef LISTENERS_ENABLED
NOTIFY_CMD_FINISHED(this);
//NOTIFY_CMD_FINISHED(0);
#endif
if (aNextCommand!=0) return aNextCommand->prepare(false);
}
}
if (_progress==0){
(_task->*_actionFunc)();
_execTimes++;
if (_length==0){
//std::cout << "ExeciCommand len==0 " << std::endl;
TMLCommand* aNextCommand=getNextCommand();
#ifdef STATE_HASH_ENABLED
if (_liveVarList!=0) _task->refreshStateHash(_liveVarList);
#endif
_task->setCurrCommand(aNextCommand);
//FOR_EACH_CMDLISTENER (*i)->commandFinished(this);
#ifdef LISTENERS_ENABLED
NOTIFY_CMD_FINISHED(this);
//NOTIFY_CMD_FINISHED(0);
#endif
if (aNextCommand!=0) return aNextCommand->prepare(false);
}
}
_currTransaction = new TMLTransaction(this, _length-_progress,_task->getEndLastTransaction());
return this;
_currTransaction = new TMLTransaction(this, _length-_progress,_task->getEndLastTransaction());
return this;
}
else {
TMLCommand* aNextCommand=getNextCommand();
(_task->*_actionFunc)();
_execTimes++;
#ifdef STATE_HASH_ENABLED
if (_liveVarList!=0) _task->refreshStateHash(_liveVarList);
#endif
_task->setCurrCommand(aNextCommand);
//FOR_EACH_CMDLISTENER (*i)->commandFinished(this);
#ifdef LISTENERS_ENABLED
NOTIFY_CMD_FINISHED(this);
//NOTIFY_CMD_FINISHED(0);
#endif
if (aNextCommand!=0) return aNextCommand->prepare(false);
return 0;
}
// return 0;
}
std::string TMLDelayCommand::toString() const{
......
......@@ -56,7 +56,8 @@ public:
\param iLiveVarList Bitmap of live variables
\param iCheckpoint Checkpoint Flag
*/
TMLDelayCommand(ID iID, TMLTask* iTask, TMLLength iStatLength, ActionFuncPointer iActionFunc, const char* iLiveVarList, bool iCheckpoint);
bool _isActiveDelay;
TMLDelayCommand(ID iID, TMLTask* iTask, TMLLength iStatLength, ActionFuncPointer iActionFunc, const char* iLiveVarList, bool iCheckpoint, bool isActiveDelay);
void execute();
//TMLTask* getDependentTask() const;
std::string toString() const;
......
......@@ -52,6 +52,7 @@ import java.util.Objects;
*/
public class TMLActivityElementWithIntervalAction extends TMLActivityElement {
protected String minDelay, maxDelay;
protected boolean isActiveDelay = false;
public TMLActivityElementWithIntervalAction(String _name, Object _referenceObject) {
super(_name, _referenceObject);
......@@ -74,16 +75,20 @@ public class TMLActivityElementWithIntervalAction extends TMLActivityElement {
}
public String customExtraToXML() {
return " min=\"" + minDelay + "\" max=\"" + maxDelay + "\" ";
return " min=\"" + minDelay + "\" max=\"" + maxDelay + "\" " + "isActiveDelay=\"" + isActiveDelay + "\" ";
}
public void setActiveDelay(boolean _b){
isActiveDelay = _b;}
public boolean getActiveDelay(){return isActiveDelay;}
public boolean equalSpec(Object o) {
if (!(o instanceof TMLActivityElementWithIntervalAction)) return false;
if (!super.equalSpec(o)) return false;
TMLActivityElementWithIntervalAction tmlAEIAction = (TMLActivityElementWithIntervalAction) o;
return Objects.equals(minDelay, tmlAEIAction.getMinDelay()) &&
Objects.equals(maxDelay, tmlAEIAction.getMaxDelay());
Objects.equals(maxDelay, tmlAEIAction.getMaxDelay()) &&
Objects.equals(isActiveDelay, tmlAEIAction.getActiveDelay());
}
......
......@@ -53,7 +53,7 @@ import java.util.Objects;
public class TMLDelay extends TMLActivityElementWithIntervalAction {
private String timeUnit = "ns"; // Shall be either "ns" or "us" or "ms" or "s"
public TMLDelay(String _name, Object _referenceObject) {
super(_name, _referenceObject);
}
......
......@@ -432,9 +432,9 @@ public class TMLTextSpecification<E> {
tmp1 = ((TMLDelay) elt).getMinDelay();
tmp2 = ((TMLDelay) elt).getMaxDelay();
if (tmp1.compareTo(tmp2) == 0) {
code = "DELAY" + SP + modifyString(((TMLDelay) elt).getMinDelay()) + SP + modifyString(((TMLDelay) elt).getUnit()) + CR;
code = "DELAY" + SP + modifyString(((TMLDelay) elt).getMinDelay()) + SP + modifyString(((TMLDelay) elt).getUnit()) + SP + "isActiveDelay" + SP + ((TMLDelay) elt).getActiveDelay() + CR;
} else {
code = "DELAY" + SP + modifyString(((TMLDelay) elt).getMinDelay()) + SP + modifyString(((TMLDelay) elt).getMaxDelay()) + SP + modifyString(((TMLDelay) elt).getUnit()) + CR;
code = "DELAY" + SP + modifyString(((TMLDelay) elt).getMinDelay()) + SP + modifyString(((TMLDelay) elt).getMaxDelay()) + SP + modifyString(((TMLDelay) elt).getUnit()) + SP + "isActiveDelay" + SP + ((TMLDelay) elt).getActiveDelay() + CR;
}
return code + makeBehavior(task, elt.getNextElement(0));
......@@ -2643,13 +2643,13 @@ public class TMLTextSpecification<E> {
inTaskDec = false;
// inTaskBehavior = true;
if ((_split.length < 3) || (_split.length > 5)) {
error = "A DELAY operation must be declared with 2 or 3 parameters, and not " + (_split.length - 1);
if ((_split.length < 3) || (_split.length > 6)) {
error = "A DELAY operation must be declared with 2, 3, 4 or 5 parameters, and not " + (_split.length - 1);
addError(0, _lineNb, 0, error);
return -1;
}
if (_split.length == 3) {
if (_split.length == 3 || _split.length == 5) {
if (!checkParameter("DELAY", _split, 2, 0, _lineNb)) {
error = "A DELAY operation must be specified with a valid time unit (ns, us, ms, s))";
addError(0, _lineNb, 0, error);
......@@ -2657,7 +2657,7 @@ public class TMLTextSpecification<E> {
}
}
if (_split.length == 4) {
if (_split.length == 4 || _split.length == 6) {
if (!checkParameter("DELAY", _split, 3, 0, _lineNb)) {
error = "A DELAY operation must be specified with a valid time unit (ns, us, ms, s))";
addError(0, _lineNb, 0, error);
......@@ -2668,11 +2668,19 @@ public class TMLTextSpecification<E> {
TMLDelay delay = new TMLDelay("delay", null);
delay.setMinDelay(_split[1]);
if (_split.length == 3) {
delay.setMaxDelay(_split[1]);
delay.setUnit(_split[2]); // DELAY min unit - this is for old format
} else if (_split.length == 4) {
delay.setMaxDelay(_split[2]);
delay.setUnit(_split[3]); // DELAY min max unit - this is for old format
} else if (_split.length == 5) {
delay.setMaxDelay(_split[1]);
delay.setUnit(_split[2]);
delay.setActiveDelay(Boolean.valueOf(_split[4])); // DELAY min unit isActivedelay boolean
} else {
delay.setMaxDelay(_split[2]);
delay.setUnit(_split[3]);
delay.setActiveDelay(Boolean.valueOf(_split[5])); // DELAY min max unit isActivedelay boolean
}
......
......@@ -557,11 +557,20 @@ public class MappedSystemCTask {
comment = action;
action += "\nif (tmpDelayxy==0) tmpDelayxy=1;\n";
if (delay.getMinDelay().equals(delay.getMaxDelay())) {
action += "_endLastTransaction+=0";
if (!delay.getActiveDelay()){
action += "_endLastTransaction+=tmpDelayxy"; // Take all delay totally idle for x units of time
} else {
action += "_endLastTransaction+=0"; //consumes cycles
}
delayLen = delay.getMaxDelay() + "*" + masterClockFreq + delay.getMasterClockFactor();
} else {
action += "TMLTime tmpDelayxx = " + delay.getMinDelay() + "*" + masterClockFreq + delay.getMasterClockFactor() + ";\nif (tmpDelayxx==0) tmpDelayxx=1;\n";
action += "_endLastTransaction+= 0";
if (!delay.getActiveDelay()){
action += "_endLastTransaction+= myrand(tmpDelayxx,tmpDelayxy)"; // Take all delay totally idle for x units of time
} else {
action += "_endLastTransaction+=0"; //consumes cycles
}
delayLen = delay.getMinDelay() + "*" + masterClockFreq + delay.getMasterClockFactor();
}
String elemName = currElem.getName(), idString;
......@@ -575,7 +584,7 @@ public class MappedSystemCTask {
idString = String.valueOf(currElem.getID());
}
hcode += "TMLDelayCommand " + cmdName + SCCR;
initCommand += "," + cmdName + "(" + idString + ",this,"+ delayLen +",(ActionFuncPointer)&" + reference + "::" + cmdName + "_func, " + getFormattedLiveVarStr(currElem) + ")" + CR;
initCommand += "," + cmdName + "(" + idString + ",this,"+ delayLen +",(ActionFuncPointer)&" + reference + "::" + cmdName + "_func, " + getFormattedLiveVarStr(currElem) + ", " + delay.getActiveDelay() + ")" + CR;
nextCommand = cmdName + ".setNextCommand(array(1,(TMLCommand*)" + makeCommands(currElem.getNextElement(0), false, retElement, null) + "));\n";
functions += "void " + reference + "::" + cmdName + "_func(){\n#ifdef ADD_COMMENTS\naddComment(new Comment(_endLastTransaction,0," + commentNum + "));\n#endif\n" + modifyString(addSemicolonIfNecessary(action)) + CR;
//functions+="return 0"+ SCCR;
......
......@@ -291,6 +291,7 @@ public class ActivityDiagram2TMLTranslator {
tmldelay.setMinDelay(modifyString(((TMLADDelay)tgc).getDelayValue()));
tmldelay.setMaxDelay(modifyString(((TMLADDelay)tgc).getDelayValue()));
tmldelay.setUnit(((TMLADDelay)tgc).getUnit());
tmldelay.setActiveDelay(((TMLADDelay)tgc).getActiveDelayEnable());
activity.addElement(tmldelay);
((BasicErrorHighlight)tgc).setStateAction(ErrorHighlight.OK);
corrTgElement.addCor(tmldelay, tgc);
......@@ -300,6 +301,7 @@ public class ActivityDiagram2TMLTranslator {
tmldelay.setMinDelay(modifyString(((TMLADDelayInterval)tgc).getMinDelayValue()));
tmldelay.setMaxDelay(modifyString(((TMLADDelayInterval)tgc).getMaxDelayValue()));
tmldelay.setUnit(((TMLADDelayInterval)tgc).getUnit());
tmldelay.setActiveDelay(((TMLADDelayInterval)tgc).getActiveDelayEnableValue());
activity.addElement(tmldelay);
((BasicErrorHighlight)tgc).setStateAction(ErrorHighlight.OK);
corrTgElement.addCor(tmldelay, tgc);
......
......@@ -66,6 +66,7 @@ public class TGCTimeDelay extends TGCWithoutInternalComponent{
private String maxDelay = "";
private String unit = "ns"; // can be "ns" or "us" or "ms" or "s";
private boolean hasMaxDelay;
private boolean isActiveDelay;
public TGCTimeDelay(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) {
super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp);
......@@ -144,11 +145,13 @@ public class TGCTimeDelay extends TGCWithoutInternalComponent{
}
array[0] = getMinDelay(); array[1] = getMaxDelay(); array[2] = getUnit();
JDialogTimeIntervalUnit jdti = new JDialogTimeIntervalUnit(frame, array, hasMaxDelay, "Setting time parameters", ind, "max");
JDialogTimeIntervalUnit jdti = new JDialogTimeIntervalUnit(getTDiagramPanel().getMainGUI(), frame, array, hasMaxDelay, isActiveDelay,
"Setting time parameters", ind,
"max");
//jdti.setSize(350, 250);
GraphicLib.centerOnParent(jdti, 350, 250);
jdti.setVisible( true ); // blocked until dialog has been closed
isActiveDelay = jdti.isActiveDelay();
minDelay = array[0]; maxDelay = array[1]; unit = array[2];
if (hasMaxDelay) {
......@@ -180,6 +183,12 @@ public class TGCTimeDelay extends TGCWithoutInternalComponent{
public void setHasMaxValue(boolean b) {
hasMaxDelay = b;
}
public void setActiveDelay(boolean b) {
isActiveDelay = b;
}
public boolean getActiveDelay() {
return isActiveDelay;
}
public void setMinDelay(String del) {
minDelay = del;
......@@ -207,6 +216,8 @@ public class TGCTimeDelay extends TGCWithoutInternalComponent{
sb.append(getMaxDelay());
sb.append("\" hasMaxDelay=\"");
sb.append(hasMaxDelay);
sb.append("\" isActiveDelay=\"");
sb.append(isActiveDelay);
sb.append("\" unit=\"");
sb.append(getUnit());
sb.append("\" />\n");
......@@ -236,6 +247,9 @@ public class TGCTimeDelay extends TGCWithoutInternalComponent{
if (elt.getAttribute("hasMaxDelay") != null) {
hasMaxDelay = elt.getAttribute("hasMaxDelay").compareTo("true") == 0;
}
if (elt.getAttribute("isActiveDelay") != null) {
isActiveDelay = elt.getAttribute("isActiveDelay").compareTo("true") == 0;
}
unit = elt.getAttribute("unit");
}
}
......
......@@ -81,6 +81,7 @@ public class TMLADDelay extends TADComponentWithSubcomponents /* Issue #69 TGCWi
tgc.setMinDelay("10");
tgc.setMaxDelay("nope");
tgc.setHasMaxValue(false);
tgc.setActiveDelay(false);
tgc.setUnit("ms");
tgc.setName("value of the delay");
tgc.makeValue();
......@@ -139,7 +140,8 @@ public class TMLADDelay extends TADComponentWithSubcomponents /* Issue #69 TGCWi
public String getUnit() {
return ((TGCTimeDelay)tgcomponent[0]).getUnit();
}
public boolean getActiveDelayEnable(){return ((TGCTimeDelay)tgcomponent[0]).getActiveDelay(); }
@Override
public int getType() {
return TGComponentManager.TMLAD_DELAY;
......
......@@ -156,7 +156,9 @@ public class TMLADDelayInterval extends TADComponentWithSubcomponents /* Issue #
public void setMaxValue(String val) {
((TGCTimeDelay)(tgcomponent[0])).setMaxDelay(val);
}
public boolean getActiveDelayEnableValue(){return ((TGCTimeDelay)tgcomponent[0]).getActiveDelay(); }
@Override
public int getType() {
return TGComponentManager.TMLAD_INTERVAL_DELAY;
......
......@@ -41,6 +41,9 @@
package ui.window;
import help.HelpManager;
import ui.MainGUI;
import ui.TGHelpButton;
import ui.util.IconManager;
import javax.swing.*;
......@@ -59,15 +62,17 @@ public class JDialogTimeIntervalUnit extends JDialogBase implements ActionListen
private String[] arrayDelay;
private boolean hasMaxDelay;
private boolean isActiveDelay;
private JPanel panel1;
// Panel1
private JTextField text1, text2;
private JComboBox<String> unit;
private JCheckBox wait_delay;
private String id1, id2;
private MainGUI mgui;
public TGHelpButton myButton;
/* Creates new form */
// arrayDelay: [0] -> minDelay ; [1] -> maxDelay
public JDialogTimeIntervalUnit(Frame f, String[] _arrayDelay, boolean _hasMaxDelay, String title) {
......@@ -80,17 +85,26 @@ public class JDialogTimeIntervalUnit extends JDialogBase implements ActionListen
pack();
}
public JDialogTimeIntervalUnit(Frame f, String[] _arrayDelay, boolean _hasMaxDelay, String title, String _id1, String _id2) {
public JDialogTimeIntervalUnit(MainGUI _mgui, Frame f, String[] _arrayDelay, boolean _hasMaxDelay, boolean _isActiveDelay, String title,
String _id1,
String _id2) {
super(f, title, true);
mgui =_mgui;
arrayDelay = _arrayDelay;
hasMaxDelay = _hasMaxDelay;
isActiveDelay = _isActiveDelay;
id1 = _id1;
id2 = _id2;
initComponents();
myInitComponents();
pack();
}
private void makeEndHelpButton(String helpWord, MainGUI mgui, HelpManager hm, JPanel panel, GridBagConstraints c) {
Icon myIcon = IconManager.imgic32;
myButton = new TGHelpButton(myIcon, helpWord, mgui, hm);
myButton.addToPanel(panel, c);
}
private void myInitComponents() {
}
......@@ -115,7 +129,7 @@ public class JDialogTimeIntervalUnit extends JDialogBase implements ActionListen
panel1.setBorder(new javax.swing.border.TitledBorder("setting min and max delays"));
}
panel1.setPreferredSize(new Dimension(300, 150));
// first line panel1
c1.weighty = 1.0;
c1.weightx = 1.0;
......@@ -123,7 +137,7 @@ public class JDialogTimeIntervalUnit extends JDialogBase implements ActionListen
c1.fill = GridBagConstraints.BOTH;
c1.gridheight = 1;
panel1.add(new JLabel(" "), c1);
// second line panel1
c1.gridwidth = 1;
c1.gridheight = 1;
......@@ -166,7 +180,14 @@ public class JDialogTimeIntervalUnit extends JDialogBase implements ActionListen
unit.addItem("s");
unit.setSelectedItem(arrayDelay[2]);
panel1.add(unit, c1);
c1.gridwidth = 1;
if ((id1 != null) && (id2 != null)){
wait_delay = new JCheckBox("Active Delay");
wait_delay.setSelected(isActiveDelay);
panel1.add(wait_delay,c1);
c1.gridwidth = GridBagConstraints.REMAINDER; //end row
makeEndHelpButton("activedelay.html", mgui, mgui.getHelpManager(), panel1, c1);
}
// main panel;
c0.gridwidth = 1;
c0.gridheight = 10;
......@@ -182,7 +203,9 @@ public class JDialogTimeIntervalUnit extends JDialogBase implements ActionListen
initButtons(c0, c, this);
}
public boolean isActiveDelay() {
return wait_delay.isSelected();
}
public void actionPerformed(ActionEvent evt) {
String command = evt.getActionCommand();
......
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>TTool help</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="active-delay">active delay</h1>
<p>The delay transaction “wait x” will consume x cycles when the box is checked, if not the task should be totally idle for x units of time.</p>
</body>
</html>
# active delay
The delay transaction "wait x" will consume x cycles when the box is checked, if not the task should be totally idle for x units of time.
......@@ -6,6 +6,7 @@
----fork fork channel functional view diplodocus
----join join channel functional view diplodocus
--- activitydiagram activity_diagram activity diagram function view tasks
----activedelay active_delay delay consumes cycles
-- architecture architecture hardware os operating system
--- cpu cpu processor cpu os
----cpuname cpu_name cpu name
......
// TML Application - FORMAT 0.1
// Application: /home/pham/Documents/TToolDev/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Sep 27 17:17:01 CEST 2019
// Application: /home/levan/Desktop/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Nov 15 15:15:40 CET 2019
// Channels
CHANNEL Application__channel BRBW 4 8 OUT Application__PrimitiveComp1 IN Application__PrimitiveComp2
......@@ -120,10 +120,10 @@ TASK Application__PrimitiveComp5
WRITE Application__channel3 1
EXECI 10
EXECI 10 20
DELAY 10 ms
DELAY 10 ms isActiveDelay false
EXECC 100 encryption1 ADV 100 100 0 0
EXECC 100 encryption1 ADV 100 100 0 0
DELAY 10 20 ms
DELAY 10 20 ms isActiveDelay false
RANDOM 0 attr1 0 10
FOR( ; ; )
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
......@@ -154,10 +154,10 @@ TASK Application__PrimitiveComp5_0
WRITE Application__channel3_0 1
EXECI 10
EXECI 10 20
DELAY 10 ms
DELAY 10 ms isActiveDelay false
EXECC 100 encryption1 ADV 100 100 0 0
EXECC 100 encryption1 ADV 100 100 0 0
DELAY 10 20 ms
DELAY 10 20 ms isActiveDelay false
RANDOM 0 attr1 0 10
FOR( ; ; )
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
......
// TML Application - FORMAT 0.1
// Application: /home/pham/Documents/TToolDev/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Sep 27 17:18:23 CEST 2019
// Application: /home/levan/Desktop/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Nov 15 15:19:32 CET 2019
// Channels
CHANNEL Application__channel BRBW 4 8 OUT Application__PrimitiveComp1 IN Application__PrimitiveComp2
......@@ -88,10 +88,10 @@ TASK Application__PrimitiveComp5
WRITE Application__channel3 1
EXECI 10
EXECI 10 20
DELAY 10 ms
DELAY 10 ms isActiveDelay false
EXECC 100 encryption1 ADV 100 100 0 0
EXECC 100 encryption1 ADV 100 100 0 0
DELAY 10 20 ms
DELAY 10 20 ms isActiveDelay false
RANDOM 0 attr1 0 10
FOR( ; ; )
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
......@@ -122,10 +122,10 @@ TASK Application__PrimitiveComp5_0
WRITE Application__channel3_0 1
EXECI 10
EXECI 10 20
DELAY 10 ms
DELAY 10 ms isActiveDelay false
EXECC 100 encryption1 ADV 100 100 0 0
EXECC 100 encryption1 ADV 100 100 0 0
DELAY 10 20 ms
DELAY 10 20 ms isActiveDelay false
RANDOM 0 attr1 0 10
FOR( ; ; )
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
......
// TML Application - FORMAT 0.1
// Application: /home/pham/Documents/TToolDev/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Sep 27 17:18:55 CEST 2019
// Application: /home/levan/Desktop/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Nov 15 15:20:48 CET 2019
// Channels
CHANNEL Application__channel BRBW 4 8 OUT Application__PrimitiveComp1 IN Application__PrimitiveComp2
......@@ -71,10 +71,10 @@ TASK Application__PrimitiveComp5
WRITE Application__channel3 1
EXECI 10
EXECI 10 20
DELAY 10 ms
DELAY 10 ms isActiveDelay false
EXECC 100 encryption1 ADV 100 100 0 0
EXECC 100 encryption1 ADV 100 100 0 0
DELAY 10 20 ms
DELAY 10 20 ms isActiveDelay false
RANDOM 0 attr1 0 10
FOR( ; ; )
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
......@@ -105,10 +105,10 @@ TASK Application__PrimitiveComp5_0
WRITE Application__channel3_0 1
EXECI 10
EXECI 10 20
DELAY 10 ms
DELAY 10 ms isActiveDelay false
EXECC 100 encryption1 ADV 100 100 0 0
EXECC 100 encryption1 ADV 100 100 0 0
DELAY 10 20 ms
DELAY 10 20 ms isActiveDelay false
RANDOM 0 attr1 0 10
FOR( ; ; )
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
......
// TML Application - FORMAT 0.1
// Application: /home/pham/Documents/TToolDev/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Sep 27 17:19:30 CEST 2019
// Application: /home/levan/Desktop/TTool/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
// Generated: Fri Nov 15 15:21:23 CET 2019
// Channels
CHANNEL Application__channel BRBW 4 8 OUT Application__PrimitiveComp1 IN Application__PrimitiveComp2
......@@ -71,10 +71,10 @@ TASK Application__PrimitiveComp5
WRITE Application__channel3 1
EXECI 10
EXECI 10 20
DELAY 10 ms
DELAY 10 ms isActiveDelay false
EXECC 100 encryption1 ADV 100 100 0 0
EXECC 100 encryption1 ADV 100 100 0 0
DELAY 10 20 ms
DELAY 10 20 ms isActiveDelay false
RANDOM 0 attr1 0 10
FOR( ; ; )
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
......
// TML Application - FORMAT 0.1
// Application: /home/levan/Desktop/TTool/ttool/src/test/resources/tmltranslator/simulator/delay-readwrite.xml
// Generated: Fri Nov 15 17:28:44 CET 2019
// Channels
// Events
EVENT TestCycleEvt_wait__evt__TestCycleEvt_wait__evt(int) INF TestCycleEvt_wait__C0 TestCycleEvt_wait__C1
// Requests
TASK TestCycleEvt_wait__C0
TASKOP
//Local variables
int x = 0
int loop__0 = 0
//Behavior
FOR(loop__0 = 0; loop__0<10; loop__0 = loop__0 + 1)
NOTIFY TestCycleEvt_wait__evt__TestCycleEvt_wait__evt x
x=x+1
DELAY 1 us isActiveDelay true
ENDFOR
ENDTASK
TASK TestCycleEvt_wait__C1
TASKOP
//Local variables
int x
//Behavior
FOR( ; ; )
WAIT TestCycleEvt_wait__evt__TestCycleEvt_wait__evt x
ENDFOR
ENDTASK
// Master clock frequency - in MHz
MASTERCLOCKFREQUENCY 200
NODE CPU CPU0
SET CPU0 nbOfCores 1
SET CPU0 byteDataSize 4
SET CPU0 pipelineSize 5
SET CPU0 goIdleTime 10
SET CPU0 maxConsecutiveIdleCycles 10
SET CPU0 taskSwitchingTime 20
SET CPU0 branchingPredictionPenalty 2
SET CPU0 cacheMiss 5
SET CPU0 schedulingPolicy 0
SET CPU0 sliceTime 1
SET CPU0 execiTime 1
SET CPU0 execcTime 1
SET CPU0 clockDivider 1
NODE BUS Bus0
SET Bus0 byteDataSize 4
SET Bus0 pipelineSize 1
SET Bus0 arbitration 0
SET Bus0 clockDivider 1
NODE MEMORY Memory0
SET Memory0 byteDataSize 4
SET Memory0 clockDivider 1
NODE LINK link_CPU0_to_Bus0
SET link_CPU0_to_Bus0 node CPU0
SET link_CPU0_to_Bus0 bus Bus0
SET link_CPU0_to_Bus0 priority 0
NODE LINK link_Memory0_to_Bus0
SET link_Memory0_to_Bus0 node Memory0
SET link_Memory0_to_Bus0 bus Bus0
SET link_Memory0_to_Bus0 priority 0
TMLSPEC
#include "delayRW.tml"
ENDTMLSPEC
TMLARCHI
#include "delayRW.tarchi"
ENDTMLARCHI
TMLMAPPING
MAP CPU0 TestCycleEvt_wait__C0
SET TestCycleEvt_wait__C0 priority 1
MAP CPU0 TestCycleEvt_wait__C1
SET TestCycleEvt_wait__C1 priority 9
ENDTMLMAPPING
// TML Application - FORMAT 0.1
// Application: /home/levan/Desktop/TTool/ttool/src/test/resources/tmltranslator/simulator/delay-readwrite.xml
// Generated: Fri Nov 15 17:28:44 CET 2019
// Channels