Skip to content
Snippets Groups Projects
Commit 1814d5ad authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

AVATAR: syntax hecker updated on parameters in signals

parent 538056a8
No related branches found
No related tags found
No related merge requests found
......@@ -284,18 +284,21 @@ public class AvatarSimulationBlock {
ast.block = block;
ast.asb = this;
ast.concernedElement = null;
ast.initialClockValue = _clockValue;
ast.clockValueWhenPerformed = _clockValue;
ast.initialClockValue = 0;
_aspt.clockValueAtEnd = clockValue;
if (lastTransaction != null) {
ast.initialClockValue = lastTransaction.clockValueWhenPerformed;
}
ast.clockValueWhenFinished = _clockValue;
ast.duration = _aspt.selectedDuration;
if (_aspt != null) {
if (_aspt.hasClock) {
if(lastTransaction != null) {
//TraceManager.addDev(" CLOCK CLOCK : selectedDuration=" + _aspt.selectedDuration + " previousclock = " +
if (_aspt.selectedDuration < (_clockValue - lastTransaction.clockValueWhenPerformed)) {
ast.duration = Math.min(_aspt.myMaxDuration, _clockValue - lastTransaction.clockValueWhenPerformed);
} else {
ast.duration = _aspt.selectedDuration;
}
if(_aspt.hasElaspedTime) {
ast.duration = _aspt.elapsedTime + _aspt.selectedDuration;
ast.duration = Math.min(_aspt.myMaxDuration, ast.duration);
}
ast.clockValueWhenFinished = _clockValue + ast.duration;
_aspt.clockValueAtEnd = ast.clockValueWhenFinished;
}
}
ast.id = ast.setID();
......
......@@ -79,6 +79,7 @@ public class AvatarSimulationPendingTransaction {
public long maxDuration; // max duration selected by simulator
public boolean hasClock; // Selected by simulator to indicate a delay on that transaction
public boolean durationSelected;
public long clockValueAtEnd;
// if linked duration
public boolean durationOnCurrent;
......
......@@ -64,7 +64,7 @@ public class AvatarSimulationTransaction {
public AvatarSimulationTransaction linkedTransaction;
public long initialClockValue;
public long duration;
public long clockValueWhenPerformed;
public long clockValueWhenFinished;
public long id;
public Vector<String> attributeValues;
public Vector<String> actions;
......
......@@ -509,7 +509,7 @@ public class AvatarSpecificationSimulation {
public void postExecutedTransaction(AvatarSimulationPendingTransaction _aspt) {
// Time transition?
if (_aspt.hasClock) {
clockValue += _aspt.selectedDuration;
clockValue = _aspt.clockValueAtEnd;
// Must set the elapsed time to all blocks having a time transition
// Must reset the elapsed time to other blocks
/*boolean found;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment