Commit ed201590 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Merge branch 'latencyDetailedAnalysis' into 'master'

Latency detailed analysis

See merge request !260
parents 42f25c48 503179da
......@@ -26,6 +26,10 @@ dependencies {
compile name:'jautomata-core'
compile name:'com.microsoft.z3'
compileOnly name: 'jna-3.3.0'
compile name: 'jgrapht-core-1.3.0'
compile name: 'jgrapht-ext-1.3.0'
compile name: 'jgrapht-io-1.3.0'
compile name: 'jgraphx-3.4.1.3'
}
jar {
......
......@@ -36,7 +36,6 @@
* knowledge of the CeCILL license and that you accept its terms.
*/
package tmltranslator;
import myutil.TraceManager;
......@@ -44,8 +43,7 @@ import myutil.TraceManager;
import java.util.*;
/**
* Class TMLArchitecture
* Creation: 05/09/2007
* Class TMLArchitecture Creation: 05/09/2007
*
* @author Ludovic APVRILLE
* @version 1.1 19/05/2008
......@@ -59,7 +57,6 @@ public class TMLArchitecture {
private int hashCode;
private boolean hashCodeComputed = false;
public TMLArchitecture() {
init();
}
......@@ -70,10 +67,10 @@ public class TMLArchitecture {
}
private void computeHashCode() {
TMLArchiTextSpecification architxt = new TMLArchiTextSpecification(/*"spec.tarchi"*/);
TMLArchiTextSpecification architxt = new TMLArchiTextSpecification(/* "spec.tarchi" */);
String s = architxt.toTextFormat(this);
hashCode = s.hashCode();
//TraceManager.addDev("TARCHI hashcode = " + hashCode);
// TraceManager.addDev("TARCHI hashcode = " + hashCode);
}
public int getHashCode() {
......@@ -93,7 +90,6 @@ public class TMLArchitecture {
return masterClockFrequency;
}
public void addHwNode(HwNode _node) {
hwnodes.add(_node);
}
......@@ -137,7 +133,6 @@ public class TMLArchitecture {
addHwLink(link);
}
public boolean hasCPU() {
for (HwNode node : hwnodes) {
if (node instanceof HwCPU) {
......@@ -149,7 +144,7 @@ public class TMLArchitecture {
public boolean hasHwExecutionNode() {
for (HwNode node : hwnodes) {
if ((node instanceof HwCPU)|| (node instanceof HwA)|| (node instanceof HwFPGA)) {
if ((node instanceof HwCPU) || (node instanceof HwA) || (node instanceof HwFPGA)) {
return true;
}
}
......@@ -258,7 +253,6 @@ public class TMLArchitecture {
return list;
}
public int getNbOfCPU() {
int cpt = 0;
for (HwNode node : hwnodes) {
......@@ -279,7 +273,6 @@ public class TMLArchitecture {
return cpt;
}
public int getNbOfMem() {
int cpt = 0;
for (HwNode node : hwnodes) {
......@@ -300,9 +293,9 @@ public class TMLArchitecture {
public HwNode getHwNodeByName(String _name) {
for (HwNode node : hwnodes) {
//TraceManager.addDev("Comparing >" + node.getName() + "< vs >" + _name + "<");
// TraceManager.addDev("Comparing >" + node.getName() + "< vs >" + _name + "<");
if (node.getName().compareTo(_name) == 0) {
//TraceManager.addDev("Returning node " + node.getName());
// TraceManager.addDev("Returning node " + node.getName());
return node;
}
}
......@@ -389,7 +382,8 @@ public class TMLArchitecture {
List<HwLink> tempList = new ArrayList<HwLink>();
for (HwLink link : hwlinks) {
if (link.hwnode == node) tempList.add(link);
if (link.hwnode == node)
tempList.add(link);
}
return tempList;
......@@ -406,7 +400,8 @@ public class TMLArchitecture {
public boolean isNodeConnectedToBus(HwNode node, HwBus bus) {
for (HwLink link : hwlinks) {
if (node == link.hwnode && bus == link.bus) return true;
if (node == link.hwnode && bus == link.bus)
return true;
}
return false;
}
......@@ -415,7 +410,8 @@ public class TMLArchitecture {
List<HwLink> tempList = new ArrayList<HwLink>();
for (HwLink link : hwlinks) {
if (link.bus == bus) tempList.add(link);
if (link.bus == bus)
tempList.add(link);
}
return tempList;
......@@ -430,17 +426,17 @@ public class TMLArchitecture {
if (node instanceof HwCPU) {
HwCPU cpu = (HwCPU) node;
complexity += cpu.nbOfCores * cpu.byteDataSize * cpu.pipelineSize;
//TraceManager.addDev("complexity CPU= " + complexity);
// TraceManager.addDev("complexity CPU= " + complexity);
}
if (node instanceof HwBus) {
HwBus bus = (HwBus) node;
complexity += bus.byteDataSize * bus.pipelineSize;
//TraceManager.addDev("complexity bus= " + complexity);
// TraceManager.addDev("complexity bus= " + complexity);
}
}
//TraceManager.addDev("Complexity = " + complexity);
// TraceManager.addDev("Complexity = " + complexity);
return complexity;
}
......@@ -476,11 +472,10 @@ public class TMLArchitecture {
return false;
}
// For NoC manipulation
public void removeAllNonHwExecutionNodes() {
List<HwNode> newList = new ArrayList<HwNode>();
for(HwNode node: hwnodes) {
for (HwNode node : hwnodes) {
if (node instanceof HwExecutionNode) {
newList.add(node);
}
......@@ -489,9 +484,9 @@ public class TMLArchitecture {
}
public HwNoC getHwNoC() {
for(HwNode node: hwnodes) {
for (HwNode node : hwnodes) {
if (node instanceof HwNoC) {
return ((HwNoC)node);
return ((HwNoC) node);
}
}
return null;
......@@ -503,17 +498,60 @@ public class TMLArchitecture {
}
public boolean equalSpec(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
TMLArchitecture that = (TMLArchitecture) o;
TMLComparingMethod comp = new TMLComparingMethod();
if (!comp.isHwNodeListEquals(hwnodes, that.hwnodes)) return false;
if (!comp.isHwNodeListEquals(hwnodes, that.hwnodes))
return false;
if(!comp.isHwlinkListEquals(hwlinks, that.hwlinks)) return false;
if (!comp.isHwlinkListEquals(hwlinks, that.hwlinks))
return false;
return masterClockFrequency == that.masterClockFrequency;
}
public List<HwNode> getBUSs() {
List<HwNode> buss = new ArrayList<HwNode>();
for (HwNode node : hwnodes) {
if (node instanceof HwBus) {
buss.add(node);
}
}
return buss;
}
public List<HwMemory> getMemories() {
List<HwMemory> list = new ArrayList<HwMemory>();
for (HwNode node : hwnodes) {
if (node instanceof HwMemory) {
HwMemory memory = (HwMemory) node;
list.add(memory);
}
}
return list;
}
public List<HwBridge> getHwBridge() {
List<HwBridge> bridgeList = new ArrayList<HwBridge>();
for (HwNode node : hwnodes) {
if (node instanceof HwBridge) {
HwBridge bridge = (HwBridge) node;
bridgeList.add(bridge);
}
}
return bridgeList;
}
}
......@@ -38,7 +38,6 @@
* knowledge of the CeCILL license and that you accept its terms.
*/
package tmltranslator;
import graph.AUTGraph;
......@@ -55,8 +54,7 @@ import java.util.*;
import java.util.stream.Collectors;
/**
* Class TMLMapping
* Creation: 05/09/2007
* Class TMLMapping Creation: 05/09/2007
*
* @author Ludovic APVRILLE, Andrea ENRICI
* @version 1.1 10/06/2014
......@@ -65,7 +63,7 @@ public class TMLMapping<E> {
private TMLModeling<E> tmlm;
private TMLArchitecture tmla;
// private TMLCP tmlcp;
// private TMLCP tmlcp;
// Mapping of tasks
private List<HwExecutionNode> onnodes;
......@@ -98,11 +96,9 @@ public class TMLMapping<E> {
private HashMap<HwNode, AUTState> nodesToStates;
private ArrayList<AUTState> commNodes;
// REFERENCES TO BE REMOVED!!!! :(
//private TMLComponentDesignPanel tmldp;
//public TMLArchiPanel tmlap;
// private TMLComponentDesignPanel tmldp;
// public TMLArchiPanel tmlap;
public TMLMapping(TMLModeling<E> _tmlm, TMLArchitecture _tmla, boolean reset) {
......@@ -172,7 +168,6 @@ public class TMLMapping<E> {
listE = cl;
}
public void addCustomValue(String custom) {
customValues.add(custom);
}
......@@ -181,7 +176,7 @@ public class TMLMapping<E> {
HwCPU cpu;
HwMemory mem;
HwBus bus;
HwLink link0;//, link1;
HwLink link0;// , link1;
TMLTask t;
TMLChannel ch;
Iterator<TMLTask> iterator;
......@@ -239,7 +234,6 @@ public class TMLMapping<E> {
}
}
// Verify that all channels are mapped at least on one bus
// and on one memory. Create the necessary hardware elements
// if they do not exist on the path which is suggested by already
......@@ -255,7 +249,7 @@ public class TMLMapping<E> {
if (mem == null) {
}
//TraceManager.addDev("Memory of channel " + ch + " is " + mem);
// TraceManager.addDev("Memory of channel " + ch + " is " + mem);
}
// Is there a memory?
......@@ -354,8 +348,8 @@ public class TMLMapping<E> {
onnodes = new ArrayList<HwExecutionNode>();
oncommnodes = new ArrayList<HwCommunicationNode>();
mappedcommelts = new ArrayList<TMLElement>();
// mappedCPs = new ArrayList<TMLCP>();
// commEltsMappedOnCPs = new ArrayList<TMLElement>();
// mappedCPs = new ArrayList<TMLCP>();
// commEltsMappedOnCPs = new ArrayList<TMLElement>();
mappedCPLibs = new ArrayList<TMLCPLib>();
customValues = new ArrayList<String>();
}
......@@ -408,7 +402,6 @@ public class TMLMapping<E> {
return tmla.getCPUandHwAIDs();
}
public String[] getBusIDs() {
if (tmla == null) {
return null;
......@@ -441,7 +434,6 @@ public class TMLMapping<E> {
return tmlm.makeVariableIDs(index);
}
public void addTMLCPLib(TMLCPLib _tmlcplib) {
mappedCPLibs.add(_tmlcplib);
}
......@@ -477,7 +469,6 @@ public class TMLMapping<E> {
return ret;
}
public void addTaskToHwExecutionNode(TMLTask _task, HwExecutionNode _hwnode) {
onnodes.add(_hwnode);
mappedtasks.add(_task);
......@@ -538,7 +529,6 @@ public class TMLMapping<E> {
return mappedcommelts;
}
public TMLTask getTaskByName(String _name) {
return tmlm.getTMLTaskByName(_name);
}
......@@ -603,10 +593,10 @@ public class TMLMapping<E> {
if (elt == _ch) {
HwCommunicationNode node = oncommnodes.get(cpt);
if (node instanceof HwMemory) {
ret += node.getName() + " ; ";
ret += node.getName() + " ; ";
}
}
cpt ++;
cpt++;
}
return ret;
}
......@@ -628,7 +618,6 @@ public class TMLMapping<E> {
return onnodes.get(index);
}
public void removeTask(TMLTask _task) {
int index = mappedtasks.indexOf(_task);
if (index > -1) {
......@@ -654,7 +643,8 @@ public class TMLMapping<E> {
public boolean isCommNodeMappedOn(TMLElement _channel, HwCommunicationNode _node) {
for (int i = 0; i < oncommnodes.size(); i++) {
if ((_node == null || oncommnodes.get(i) == _node) && mappedcommelts.get(i) == _channel) return true;
if ((_node == null || oncommnodes.get(i) == _node) && mappedcommelts.get(i) == _channel)
return true;
}
return false;
}
......@@ -720,7 +710,8 @@ public class TMLMapping<E> {
LinkedList<HwCommunicationNode> list = new LinkedList<HwCommunicationNode>();
int index = 0;
for (TMLElement tmlelem : mappedcommelts) {
if (tmlelem == _elementToFind) list.add(oncommnodes.get(index));
if (tmlelem == _elementToFind)
list.add(oncommnodes.get(index));
index++;
}
return list;
......@@ -729,8 +720,10 @@ public class TMLMapping<E> {
public HwNode getHwNodeByTask(TMLTask cmpTask) {
int i = 0;
for (TMLTask task : mappedtasks) {
if (task == cmpTask) break;
else i++;
if (task == cmpTask)
break;
else
i++;
}
return onnodes.get(i);
}
......@@ -819,7 +812,6 @@ public class TMLMapping<E> {
return list;
}
public int getArchitectureComplexity() {
if (tmla == null) {
return 0;
......@@ -828,7 +820,6 @@ public class TMLMapping<E> {
return tmla.getArchitectureComplexity();
}
public void removeForksAndJoins() {
TraceManager.addDev("\n\nRemove fork and join in MAPPING. Current nb of tasks:" + tmlm.getTasks().size());
if (tmlm != null) {
......@@ -851,7 +842,7 @@ public class TMLMapping<E> {
if (chan != null) {
TMLTask origin = chan.getOriginTask();
if ((origin != null) && (isTaskMapped(origin))) {
HwExecutionNode node = getHwNodeOf(origin);
HwExecutionNode node = getHwNodeOf(origin);
if (node != null) {
TraceManager.addDev("\n\nMapping fork task " + task.getName() + " to " + node.getName());
addTaskToHwExecutionNode(task, node);
......@@ -876,7 +867,7 @@ public class TMLMapping<E> {
TraceManager.addDev("\n\nFORKTASK is mapped: " + task.getName());
}
} else {
//TraceManager.addDev("Non fork task found: " + task.getName());
// TraceManager.addDev("Non fork task found: " + task.getName());
}
if (task.getName().startsWith("JOINTASK_")) {
if (!isTaskMapped(task)) {
......@@ -896,7 +887,6 @@ public class TMLMapping<E> {
}
}
}
public void handleCPs() {
......@@ -904,7 +894,8 @@ public class TMLMapping<E> {
TraceManager.addDev("\n\n**** HANDLING CPs:");
for (TMLCPLib cp : mappedCPLibs) {
//TraceManager.addDev(" Found cp:" + cp.getName() + " ref=" + cp.getTypeName());
// TraceManager.addDev(" Found cp:" + cp.getName() + " ref=" +
// cp.getTypeName());
if (cp.isDMATransfer()) {
TraceManager.addDev(" Found cp DMA:" + cp.getName() + "::" + cp.getTypeName());
handleCPDMA(cp);
......@@ -922,10 +913,8 @@ public class TMLMapping<E> {
// Remove CPs
mappedCPLibs = new ArrayList<TMLCPLib>();
}
private void handleCPDMA(TMLCPLib _cp) {
for (TMLCPLibArtifact arti : _cp.getArtifacts()) {
handleCPDMAArtifact(_cp, arti);
......@@ -1003,7 +992,6 @@ public class TMLMapping<E> {
return;
}
// At each origin: We write in a new local channel in a NBRNBW fashion
// This new channel is mapped on Src_Storage_Instance_1
// Then, we send an event to a new DMA task mapped
......@@ -1028,7 +1016,7 @@ public class TMLMapping<E> {
TMLPort portOutDMA = new TMLPort("portfromDMATask__" + chan.getName(), chan);
TMLTask origin = chan.getOriginTask();
//TMLTask destination = chan.getDestinationTask();
// TMLTask destination = chan.getDestinationTask();
fromOriginToDMA.setTasks(origin, dmaTask);
fromOriginToDMA.setPorts(chan.getOriginPort(), portInDMA);
......@@ -1044,10 +1032,9 @@ public class TMLMapping<E> {
toDMA.addParam(new TMLType(TMLType.NATURAL));
toDMA.setTasks(origin, dmaTask);
fromDMA.setTasks(dmaTask, origin);
//origin.addSendEventAfterWriteIn(fromOriginToDMA, toDMA, "size");
// origin.addSendEventAfterWriteIn(fromOriginToDMA, toDMA, "size");
origin.addSendAndReceiveEventAfterWriteIn(fromOriginToDMA, toDMA, fromDMA, "size", "");
// We need to create the activity diagram of DMATask
// We wait for the wait event. Then, we read/write one by one until we have read size
TMLActivity activity = dmaTask.getActivityDiagram();
......@@ -1107,7 +1094,6 @@ public class TMLMapping<E> {
// Map DMA task to the DMA node of the CPLib
addTaskToHwExecutionNode(dmaTask, node);
}
public String getMappedTasksString() {
......@@ -1247,7 +1233,6 @@ public class TMLMapping<E> {
fromDMA1ToDestination.setTasks(dmaTask1, destination1);
fromDMA1ToDestination.setPorts(portOutDMA1, portIn1DestinationTask);
// In the origin task, we change all writing to "chan" to "fromOriginToDMA"
origin1.replaceWriteChannelWith(chan, fromOriginToDMA1);
TMLEvent toDMA1 = new TMLEvent("toDMA1" + chan.getName(), chan, 1, false);
......@@ -1264,9 +1249,9 @@ public class TMLMapping<E> {
tmlm.addEvent(interdma2);
interdma2.setTasks(dmaTask1, dmaTask2);
// We need to create the activity diagram of DMATask
// We wait for the wait event. Then, we read/write one by one until we have read size
// We wait for the wait event. Then, we read/write one by one until we have read
// size
TMLActivity activity1 = dmaTask1.getActivityDiagram();
TMLStartState start1 = new TMLStartState("startOfDMA1", null);
activity1.setFirst(start1);
......@@ -1335,8 +1320,10 @@ public class TMLMapping<E> {
fromOriginToDMA2.setSize(chan.getSize());
tmlm.addChannel(fromOriginToDMA2);
TMLChannel fromDMA2ToDestination = chan;
/*= new TMLChannel("fromDMATask2__" + chan.getName(), chan);
tmlm.addChannel(fromDMA2ToDestination);*/
/*
* = new TMLChannel("fromDMATask2__" + chan.getName(), chan);
* tmlm.addChannel(fromDMA2ToDestination);
*/
TMLPort portInDMA2 = new TMLPort("portToDMATask2__" + chan.getName(), chan);
TMLPort portOutDMA2 = new TMLPort("portfromDMATask2__" + chan.getName(), chan);
......@@ -1348,7 +1335,6 @@ public class TMLMapping<E> {
fromDMA2ToDestination.setTasks(dmaTask2, destination1);
fromDMA2ToDestination.setPorts(portOutDMA2, portIn2DestinationTask);
// In the origin task, we change all writing to "chan" to "fromOriginToDMA"
origin2.replaceWriteChannelWith(chan, fromOriginToDMA2);
TMLEvent toDMA2 = new TMLEvent("toDMA2" + chan.getName(), chan, 1, false);
......@@ -1357,7 +1343,6 @@ public class TMLMapping<E> {
toDMA2.setTasks(origin2, dmaTask2);
origin2.addSendEventAfterWriteIn(fromOriginToDMA2, toDMA2, "size");
// We need to create the activity diagram of DMATask2
// We wait for the wait event. Then, we read/write one by one until we have read size
TMLActivity activity2 = dmaTask2.getActivityDiagram();
......@@ -1423,7 +1408,7 @@ public class TMLMapping<E> {
addTaskToHwExecutionNode(dmaTask2, node2);
// Remove olf channel from TMLModeling
//tmlm.removeChannel(chan);
// tmlm.removeChannel(chan);
chan.removeComplexInformations();
}
......@@ -1488,7 +1473,6 @@ public class TMLMapping<E> {
removeCommMapping(chan);
addCommToHwCommNode(chan, mem2);
// We create a new Task mapped on CPUController, with a new channel
TMLTask origin = chan.getOriginTask();
TMLTask ctrl = new TMLTask("MemCpyController__" + chan.getName(), chan, null);
......@@ -1563,7 +1547,6 @@ public class TMLMapping<E> {
read.addNext(write);
write.addNext(stopWrite);
}
public void linkTasks2TMLChannels() {
......@@ -1598,7 +1581,7 @@ public class TMLMapping<E> {
public void linkTasks2TMLEvents() {
//ListIterator iterator;
// ListIterator iterator;
if (tmlm != null) {
final Iterator<TMLTask> iterator = tmlm.getTasks().listIterator();
......@@ -1646,7 +1629,6 @@ public class TMLMapping<E> {
return true;
}
public List<HwNode> getPath(TMLTask t1, TMLTask t2) {
HwNode node1 = getHwNodeOf(t1);
HwNode node2 = getHwNodeOf(t2);
......@@ -1655,9 +1637,9 @@ public class TMLMapping<E> {
return path;
}
if (node1 != node2) {
//Navigate architecture for node
// Navigate architecture for node
List<HwLink> links = getTMLArchitecture().getHwLinks();
// HwNode last = node1;
// HwNode last = node1;
List<HwNode> found = new ArrayList<HwNode>();
List<HwNode> done = new ArrayList<HwNode>();
Map<HwNode, List<HwNode>> pathMap = new HashMap<HwNode, List<HwNode>>();
......@@ -1669,8 +1651,7 @@ public class TMLMapping<E> {
pathMap.put(link.bus, tmp);
}
}
outerloop:
while (found.size() > 0) {
outerloop: while (found.size() > 0) {
HwNode curr = found.remove(0);
for (HwLink link : links) {
if (curr == link.bus) {
......@@ -1699,7 +1680,6 @@ public class TMLMapping<E> {
return path;
}
public boolean isAttackerAccessible(TMLChannel chan) {
TMLTask orig = chan.getSystemOriginTask();
TMLTask dest = chan.getSystemDestinationTask();
......@@ -1738,11 +1718,10 @@ public class TMLMapping<E> {
s += "<CUSTOMVALUE value=\"" + val + "\" />\n";
}
s += "</TMLMAPPING>\n";
//s = myutil.Conversion.transformToXMLString(s);
// s = myutil.Conversion.transformToXMLString(s);
return s;
}
public void makeAutomata() {
if (nodesToStates != null) {
return;
......@@ -1803,14 +1782,13 @@ public class TMLMapping<E> {
aut = new AUTGraph(states, transitions);
}
public boolean checkPath(HwNode node1, HwNode node2) {
makeAutomata();
AUTState st1 = nodesToStates.get(node1);
AUTState st2 = nodesToStates.get(node2);
//TraceManager.addDev("st1=" + st1 + " st2=" + st2);
// TraceManager.addDev("st1=" + st1 + " st2=" + st2);
if ((st1 == null) || (st2 == null)) {
return false;
......@@ -1819,12 +1797,12 @@ public class TMLMapping<E> {
DijkstraState[] dss;
dss = GraphAlgorithms.ShortestPathFrom(aut, st1.id);
//TraceManager.addDev("Path from: " + st1.id + " to " + st2.id + ": size=" + dss[st2.id].path.length);
// TraceManager.addDev("Path from: " + st1.id + " to " + st2.id + ": size=" +
// dss[st2.id].path.length);
return dss[st2.id].path.length > 0;
}
public TMLChannelPath makePathOfChannel(TMLChannel ch) {
TMLChannelPath path = new TMLChannelPath(ch);
return path;
......@@ -1842,35 +1820,36 @@ public class TMLMapping<E> {
}
int cpt = 0;
for(HwNode node: tmla.getHwNodes()) {
for (HwNode node : tmla.getHwNodes()) {
if (node instanceof HwNoC) {
cpt ++;
cpt++;
}
}
return cpt;
}
public boolean equalSpec(Object o) {
if (!(o instanceof TMLMapping)) return false;
if (!(o instanceof TMLMapping))
return false;
TMLMapping<?> that = (TMLMapping<?>) o;
TMLComparingMethod comp = new TMLComparingMethod();
if(!comp.isOncommondesListEquals(oncommnodes, that.getCommunicationNodes()))
if (!comp.isOncommondesListEquals(oncommnodes, that.getCommunicationNodes()))
return false;
if(!comp.isMappedcommeltsListEquals(mappedcommelts, that.getMappedCommunicationElement()))
if (!comp.isMappedcommeltsListEquals(mappedcommelts, that.getMappedCommunicationElement()))
return false;
if(!comp.isTasksListEquals(mappedtasks, that.getMappedTasks()))
if (!comp.isTasksListEquals(mappedtasks, that.getMappedTasks()))
return false;
if(!comp.isOnExecutionNodeListEquals(onnodes, that.getNodes()))
if (!comp.isOnExecutionNodeListEquals(onnodes, that.getNodes()))
return false;
if(!comp.isListOfStringArrayEquals(pragmas, that.getPragmas()))
if (!comp.isListOfStringArrayEquals(pragmas, that.getPragmas()))
return false;
if(!comp.isSecurityPatternMapEquals(mappedSecurity, that.mappedSecurity))
if (!comp.isSecurityPatternMapEquals(mappedSecurity, that.mappedSecurity))
return false;
return tmlm.equalSpec(that.tmlm) &&
......@@ -1878,10 +1857,9 @@ public class TMLMapping<E> {
firewall == that.firewall;
}
public void remap(HwExecutionNode src, HwExecutionNode dst) {
int cpt = 0;
for(int i=0; i<onnodes.size(); i++) {
for (int i = 0; i < onnodes.size(); i++) {
HwExecutionNode node = onnodes.get(i);
if (node == src) {
TMLTask task = mappedtasks.get(i);
......@@ -1892,4 +1870,30 @@ public class TMLMapping<E> {
}
}
}
public HashSet<TMLTask> getLisMappedTasks(HwNode node) {
HashSet<TMLTask> tasks = new HashSet<TMLTask>();
int i = 0;