diff --git a/src/main/java/tmltranslator/tonetwork/TaskOUTForVC.java b/src/main/java/tmltranslator/tonetwork/TaskOUTForVC.java index 26a2c494ac7f5746a60af0e2cfb4b2bbd12e4ec4..98fe2e07530d808176332c506703b87ea1a0dd45 100644 --- a/src/main/java/tmltranslator/tonetwork/TaskOUTForVC.java +++ b/src/main/java/tmltranslator/tonetwork/TaskOUTForVC.java @@ -97,69 +97,74 @@ public class TaskOUTForVC extends TMLTask { TMLStartState start = new TMLStartState("mainStart", referenceObject); activity.setFirst(start); + // Loop forever + TMLForLoop mainLoop = new TMLForLoop("MainLoop", referenceObject); + mainLoop.setInfinite(true); + activity.addLinkElement(start,mainLoop); + // Select Event TMLSelectEvt select = new TMLSelectEvt("selectEvent", referenceObject); - activity.addLinkElement(start, select); + activity.addLinkElement(mainLoop, select); // Branch for each input event for(int i=0; i<inPacketEvents.size(); i++) { - waitEvt = new TMLWaitEvent("PacketEvent", referenceObject); - waitEvt.setEvent(inPacketEvents.get(i)); - waitEvt.addParam("pktlen"); - waitEvt.addParam("dstX"); - waitEvt.addParam("dstY"); - waitEvt.addParam("vc"); - waitEvt.addParam("eop"); - waitEvt.addParam("chid"); - activity.addLinkElement(select, waitEvt); + TMLWaitEvent waitPacket = new TMLWaitEvent("WaitForFirstFlit", referenceObject); + waitPacket.setEvent(inPacketEvents.get(i)); + waitPacket.addParam("pktlen"); + waitPacket.addParam("dstX"); + waitPacket.addParam("dstY"); + waitPacket.addParam("vc"); + waitPacket.addParam("eop"); + waitPacket.addParam("chid"); + activity.addLinkElement(select, waitPacket); // loop on packet size TMLForLoop packetLoop = new TMLForLoop("packetLoop", referenceObject); packetLoop.setInit("j=0"); packetLoop.setCondition("j<pktlen"); packetLoop.setIncrement("j=j+1"); - activity.addLinkElement(waitEvt, packetLoop); + activity.addLinkElement(waitPacket, packetLoop); // Inside packetloop - sendEvt = new TMLSendEvent("PacketInfo", referenceObject); - sendEvt.setEvent(outVCEvent); - sendEvt.addParam("pktlen"); - sendEvt.addParam("dstX"); - sendEvt.addParam("dstY"); - sendEvt.addParam("vc"); - sendEvt.addParam("eop"); - sendEvt.addParam("chid"); - activity.addLinkElement(packetLoop, sendEvt); + TMLSendEvent sendFlitEvt = new TMLSendEvent("PacketInfo", referenceObject); + sendFlitEvt.setEvent(outVCEvent); + sendFlitEvt.addParam("pktlen"); + sendFlitEvt.addParam("dstX"); + sendFlitEvt.addParam("dstY"); + sendFlitEvt.addParam("vc"); + sendFlitEvt.addParam("eop"); + sendFlitEvt.addParam("chid"); + activity.addLinkElement(packetLoop, sendFlitEvt); waitEvt = new TMLWaitEvent("ReturnFromVC", referenceObject); waitEvt.setEvent(vcSelect); - activity.addLinkElement(sendEvt, waitEvt); + activity.addLinkElement(sendFlitEvt, waitEvt); sendEvt = new TMLSendEvent("Feedback", referenceObject); sendEvt.setEvent(outFeedbackEvents.get(i)); activity.addLinkElement(waitEvt, sendEvt); - TMLChoice choice = new TMLChoice("Choice on EOP", referenceObject); + TMLChoice choice = new TMLChoice("ChoiceOnEOP", referenceObject); activity.addLinkElement(sendEvt, choice); // Left branch of choice - waitEvt = new TMLWaitEvent("PacketEvent", referenceObject); - waitEvt.setEvent(inPacketEvents.get(i)); - waitEvt.addParam("pktlen"); - waitEvt.addParam("dstX"); - waitEvt.addParam("dstY"); - waitEvt.addParam("vc"); - waitEvt.addParam("eop"); - waitEvt.addParam("chid"); - activity.addLinkElement(choice, waitEvt); + TMLWaitEvent waitNextFlit = new TMLWaitEvent("WaitForNextFlit", referenceObject); + waitNextFlit.setEvent(inPacketEvents.get(i)); + waitNextFlit.addParam("pktlen"); + waitNextFlit.addParam("dstX"); + waitNextFlit.addParam("dstY"); + waitNextFlit.addParam("vc"); + waitNextFlit.addParam("eop"); + waitNextFlit.addParam("chid"); + activity.addLinkElement(choice, waitNextFlit); choice.addGuard("eop == 0"); - stop = new TMLStopState("StopStateLeftChoice", referenceObject); - activity.addLinkElement(waitEvt, stop); + TMLStopState stopAfterFlit = new TMLStopState("StopStateLeftChoice", referenceObject); + activity.addLinkElement(waitNextFlit, stopAfterFlit); //Right branch of choice - stop = new TMLStopState("StopStateRightChoice", referenceObject); - activity.addLinkElement(choice, stop); + TMLStopState stopEOP = new TMLStopState("StopStateRightChoice", referenceObject); + activity.addLinkElement(choice, stopEOP); choice.addGuard("eop > 0"); // Exit of the loop diff --git a/src/main/java/ui/MainGUI.java b/src/main/java/ui/MainGUI.java index 88b754e658381e26839f68bf85c754376fcc2c69..2d4d292a00a7046cf53a94bdd8bc74cff671827d 100644 --- a/src/main/java/ui/MainGUI.java +++ b/src/main/java/ui/MainGUI.java @@ -4914,7 +4914,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per JDialogNoCManagement jdsenm = new JDialogNoCManagement(frame, this, "Removing NoC", map); // jdsez3.setSize(600,800); GraphicLib.centerOnParent(jdsenm, 700, 800); - if (automatic) { + if (!automatic) { jdsenm.setVisible(true); } else { jdsenm.startProcess(); diff --git a/src/main/java/ui/window/JDialogSystemCGeneration.java b/src/main/java/ui/window/JDialogSystemCGeneration.java index fffdeaf602c866741b5019e28ac8c73c20b4792d..2c25f0a7cd9f01c498cceba6ca631dd2fd7bf294 100644 --- a/src/main/java/ui/window/JDialogSystemCGeneration.java +++ b/src/main/java/ui/window/JDialogSystemCGeneration.java @@ -479,7 +479,7 @@ public class JDialogSystemCGeneration extends JDialog implements ActionListener, exe.addActionListener(this); exegroup.add(exe); jp03.add(exe, c03); - + exe2 = new JTextField(pathExecute, 100); jp03.add(exe2, c02);