...
 
Commits (2)
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -60,9 +60,9 @@ public class TMLChannel extends TMLCommunicationElement {
public int confStatus;
public boolean checkConf;
public boolean checkAuth;
private int size;
private int size; // width of the channel i.e. nb of bytes of each sample
private int type;
private int max;
private int max; // Maximum number of samples
public TMLCPrimitivePort port;
public TMLCPrimitivePort port2;
public ArrayList<TMLCPrimitivePort> ports;
......@@ -74,6 +74,7 @@ public class TMLChannel extends TMLCommunicationElement {
// Used for 1 -> many channel, or for many -> 1 channel
protected ArrayList<TMLTask> originTasks, destinationTasks;
protected ArrayList<TMLPort> originPorts, destinationPorts;
protected int nbOfSamples = 1; // Represent how many samples are read (join) or written (fork) at once
......
......@@ -172,7 +172,7 @@ public class TMLArchiArtifact extends TGCWithoutInternalComponent implements Swa
}
public void resizeWithFather() {
if ((father != null) && ((father instanceof TMLArchiCPUNode) || (father instanceof TMLArchiHWANode))) {
if ((father != null) && ((father instanceof TMLArchiCPUNode) || (father instanceof TMLArchiHWANode) || (father instanceof TMLArchiFPGANode))) {
//
setCdRectangle(0, father.getWidth() - getWidth(), 0, father.getHeight() - getHeight());
//setCd(Math.min(x, father.getWidth() - getWidth()), Math.min(y, father.getHeight() - getHeight()));
......
......@@ -271,6 +271,10 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib
ll.add( (TMLArchiHWANode) tgc );
}
if (tgc instanceof TMLArchiFPGANode) {
ll.add( (TMLArchiFPGANode) tgc );
}
if (tgc instanceof TMLArchiCommunicationNode) {
ll.add( (TMLArchiCommunicationNode) tgc );
}
......@@ -300,6 +304,9 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib
}
public boolean isMapped(String _ref, String _name) {
//TraceManager.addDev("isMapped Ref:" + _ref + " name=" + _name);
Iterator<TGComponent> iterator = getListOfNodes().listIterator();
TGComponent node;
Vector<TMLArchiArtifact> v;
......@@ -309,6 +316,8 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib
while(iterator.hasNext()) {
node = iterator.next();
//TraceManager.addDev("Testing node: " + node.getName());
if (node instanceof TMLArchiCPUNode) {
v = ((TMLArchiCPUNode) node ).getArtifactList();
......@@ -321,8 +330,36 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib
}
}
}
if (node instanceof TMLArchiFPGANode) {
v = ((TMLArchiFPGANode) node ).getArtifactList();
//TraceManager.addDev("FPGANode: " + ((TMLArchiFPGANode) node).getNodeName() + " artifact list:" + v.size());
for(i=0; i<v.size(); i++) {
artifact = v.get(i);
if (artifact.getValue().equals(name)) {
return true;
}
}
}
if (node instanceof TMLArchiHWANode) {
v = ((TMLArchiHWANode) node ).getArtifactList();
for(i=0; i<v.size(); i++) {
artifact = v.get(i);
if (artifact.getValue().equals(name)) {
return true;
}
}
}
}
//TraceManager.addDev("Not mapped");
return false;
}
......@@ -339,13 +376,15 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib
node = iterator.next();
// Task mapping
if ((node instanceof TMLArchiCPUNode) || (node instanceof TMLArchiHWANode)) {
if ((node instanceof TMLArchiCPUNode) || (node instanceof TMLArchiHWANode) || (node instanceof TMLArchiFPGANode)) {
if (node instanceof TMLArchiCPUNode) {
v = ((TMLArchiCPUNode)(node)).getArtifactList();
//
} else {
} else if (node instanceof TMLArchiHWANode){
v = ((TMLArchiHWANode)(node)).getArtifactList();
//
} else {
v = ((TMLArchiFPGANode)(node)).getArtifactList();
}
for(i=0; i<v.size(); i++) {
......
......@@ -163,7 +163,7 @@ public class JDialogTMLTaskArtifact extends JDialogBase implements ActionListene
c3.gridwidth = GridBagConstraints.REMAINDER; //end row
Vector<String> operationsListS = new Vector<>();
int indexOp = 0;
TraceManager.addDev( "Inside JDialogTMLTaskArtifact: " + MECType );
//TraceManager.addDev( "Inside JDialogTMLTaskArtifact: " + MECType );
if( MECType instanceof FepMEC ) {
operationsListS = FepMEC.OPERATIONS_LIST;
indexOp = operationsListS.indexOf( operation );
......