Skip to content
Snippets Groups Projects
Commit bc8b2e36 authored by apvrille's avatar apvrille
Browse files

Remarks of Frederic G on NetworkInterfaceTask

parent 3888ccf4
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,16 @@ public class HwNoC extends HwCommunicationNode {
return map;
}
public String getHwExecutionNode(int x, int y) {
for(String s: placementMap.keySet()) {
Point p = placementMap.get(s);
if (p.x == x && p.y == y) {
return s;
}
}
return null;
}
......
......@@ -306,6 +306,9 @@ public class TMLArchitecture {
}
public HwCPU getHwCPUByName(String _name) {
if (_name == null) {
return null;
}
for (HwNode node : hwnodes) {
if (node.getName().equals(_name)) {
if (node instanceof HwCPU) {
......@@ -316,6 +319,21 @@ public class TMLArchitecture {
return null;
}
public HwExecutionNode getHwExecutionNodeByName(String _name) {
if (_name == null) {
return null;
}
for (HwNode node : hwnodes) {
if (node.getName().equals(_name)) {
if (node instanceof HwExecutionNode) {
return (HwExecutionNode) node;
}
}
}
return null;
}
public HwBus getHwBusByName(String _name) {
for (HwNode node : hwnodes) {
if (node.getName().equals(_name)) {
......
......@@ -122,7 +122,7 @@ public class TaskNetworkInterface extends TMLTask {
loop.setInfinite(true);
addElement(start, loop);
TMLActionState state = new TMLActionState("LoopExitSeeting", referenceObject);
TMLActionState state = new TMLActionState("LoopExitSetting", referenceObject);
state.setAction("loopexit = 2");
addElement(loop, state);
......@@ -158,7 +158,7 @@ public class TaskNetworkInterface extends TMLTask {
TMLChoice testingEvt = new TMLChoice("testingEvtVC", referenceObject);
addElement(notifiedEvent, testingEvt);
TMLStopState endOfLoopNotified = new TMLStopState("NoEvetNorispkt", referenceObject);
TMLStopState endOfLoopNotified = new TMLStopState("NoEventNorispkt", referenceObject);
addElement(testingEvt, endOfLoopNotified);
testingEvt.addGuard("(nEvt == 0) and (ispkt" + i + " == 0)");
......@@ -216,10 +216,14 @@ public class TaskNetworkInterface extends TMLTask {
// No feedback
TMLActionState noFeedbackAction = new TMLActionState("noFeedbackAction", referenceObject);
state.setAction("loopexit = 2");
noFeedbackAction.setAction("loopexit = 2");
addElement(testOnFeedback, noFeedbackAction);
testOnFeedback.addGuard("else");
TMLStopState endOfNoFeedback = new TMLStopState("endOfNoFeedback", referenceObject);
addElement(noFeedbackAction, endOfNoFeedback);
// Feedback present
TMLWriteChannel sendingSample = new TMLWriteChannel("SendingSample", referenceObject);
sendingSample.addChannel(outputChannel);
......
......@@ -91,9 +91,10 @@ public class TranslatedRouter<E> {
// MUX for the different writing tasks
// For each writing channel of the corresponding CPU, we need MUX to be created.
// We first get the corresponding CPU
String nameOfExecNode = noc.getHwExecutionNode(xPos, yPos);
HwExecutionNode execNode = tmlmap.getTMLArchitecture().getHwExecutionNodeByName(nameOfExecNode);
// VC DISPATCHERS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment