Commit 6aa1d7d5 authored by Alexander Diewald's avatar Alexander Diewald

Merge branch '3962' of https://git.fortiss.org/af3/af3.git into 3962

Conflicts:
	org.fortiss.af3.mode.ui/src/org/fortiss/af3/mode/ui/editor/fx/.ratings
Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parents abef5b73 49eba43e
HierarchicPlatformArchitectureCompositor.java bbd67a9699b73eb051a815aa513f61621e3836d4 GREEN
HierarchicalCompositionRules.java 9ab422ee2de9216a99a2ebd13345db453132e803 GREEN
HierarchicalCompositionRules.java da79b6c828dd13909ec4aba6062ae09865eda86f GREEN
......@@ -75,6 +75,7 @@ public class HierarchicalCompositionRules extends PlatformHierarchicalCompositio
rval.add(ITileDomain.class);
rval.add(IOffChipNetworkDomain.class);
rval.add(IMemoryDomain.class);
rval.add(IPeripheralsDomain.class);
} else if(hasEqualLevel(domain, ITileDomain.class)) {
// Required for availability of these elements at the tile level (i.e., to drop elements
// from the processor / NoC domain into tile domain elements.)
......
......@@ -5,12 +5,12 @@ CoreCompositor.java 050798a2f694a04c23595ab7b9dee9756e9a3404 GREEN
MemoryCompositor.java 3064bb9b47a0df16eb85304481716d56273a21b9 GREEN
NetworkInterfaceCompositor.java da20db4c57e17921143fd8ea87635d9f341904b5 GREEN
NocRouterCompositor.java 3180a7cc98c6335f3fdc70befbdd5367e924e3d2 GREEN
NodeCompositor.java 02f6556b04c58a481c698a161e7a2607be30c2f8 GREEN
NodeCompositor.java 096dee7cba39dec1c767ebfc68cc13dbded7fa56 GREEN
OffChipNetworkCompositor.java 7eae93d5e917837891bfdd624fede77fd762858d GREEN
OffChipNetworkGatewayCompositor.java 9aed7241e987c5bb525886840fed9604dd78ede0 GREEN
OffChipNetworkRouterCompositor.java b7893fbbc0865f98d63c4ac7c647f5efba3b7b28 GREEN
OnChipNetworkCompositor.java b90a297b0efdeb97b4b06c2bd0e22ad7737df588 GREEN
OnChipOffChipGatewayCompositor.java e9f51bc859ec7901c8f9fa1b1751c2a5804d6b3c GREEN
PowerSupplyCompositor.java 1a3f76d53557533d80c7ffdb8c28500bd453ff47 GREEN
TileCompositor.java 2b59f673831d5d6a2065db8903b2bf8c06f0c1e8 GREEN
TileCompositor.java ebeed4a6bfcddf498379e5a05d1bc33d3a633afa GREEN
WatchDogCompositor.java 9d121bde08bc3e68c91ab53c673bd8865ae6fc44 GREEN
......@@ -24,6 +24,7 @@ import org.fortiss.af3.platform.hierarchic.model.electronics.PowerIn;
import org.fortiss.af3.platform.hierarchic.model.node.Node;
import org.fortiss.af3.platform.hierarchic.model.peripherals.GeneralPurposeInput;
import org.fortiss.af3.platform.hierarchic.model.peripherals.GeneralPurposeOutput;
import org.fortiss.af3.platform.hierarchic.model.peripherals.WatchDog;
import org.fortiss.af3.platform.hierarchic.model.tile.OnChipNetwork;
import org.fortiss.af3.platform.hierarchic.model.tile.Tile;
import org.fortiss.af3.platform.model.IArchitectureDomain;
......@@ -51,7 +52,7 @@ public final class NodeCompositor extends ExecutionUnitComponentCompositorBase<N
@Override
protected boolean canBeAddedAtCurrentLevel(IArchitectureDomain element) {
return super.canBeAddedAtCurrentLevel(element) ||
isInstanceOfAny(element, Tile.class, OnChipNetwork.class, PowerIn.class,
GeneralPurposeInput.class, GeneralPurposeOutput.class);
isInstanceOfAny(element, WatchDog.class, Tile.class, OnChipNetwork.class,
PowerIn.class, GeneralPurposeInput.class, GeneralPurposeOutput.class);
}
}
......@@ -23,7 +23,6 @@ import org.fortiss.af3.platform.hierarchic.compose.base.elements.ExecutionUnitCo
import org.fortiss.af3.platform.hierarchic.model.peripherals.GeneralPurposeInput;
import org.fortiss.af3.platform.hierarchic.model.peripherals.GeneralPurposeOutput;
import org.fortiss.af3.platform.hierarchic.model.peripherals.WatchDogIn;
import org.fortiss.af3.platform.hierarchic.model.tile.OnChipOffChipExport;
import org.fortiss.af3.platform.hierarchic.model.tile.Tile;
import org.fortiss.af3.platform.model.IArchitectureDomain;
......@@ -49,8 +48,7 @@ public final class TileCompositor extends ExecutionUnitComponentCompositorBase<T
/** {@inheritDoc} */
@Override
protected boolean canBeAddedAtCurrentLevel(IArchitectureDomain element) {
return isInstanceOfAny(element, OnChipOffChipExport.class, WatchDogIn.class,
GeneralPurposeInput.class, GeneralPurposeOutput.class) ||
super.canBeAddedAtCurrentLevel(element);
return isInstanceOfAny(element, WatchDogIn.class, GeneralPurposeInput.class,
GeneralPurposeOutput.class) || super.canBeAddedAtCurrentLevel(element);
}
}
BehaviorComponentCompositor.java a1dbd75cfce361b709249b0d851f080cf63d243c GREEN
ConnectorConnectionCompositor.java 2111cd454554b3caf887a1381cc1184ba3ff13eb YELLOW
ConnectorConnectionCompositor.java cfa132219000b2f3048c56452e22eeac832314b3 YELLOW
ConnectorStateConnectionCompositor.java a0fb18af7ded52cbcb18be83cf1d9960028ceac2 GREEN
StateAutomatonCompositor.java 42625f27b7e2d5de0df39c56618173ff057ea7a5 GREEN
StateCompositor.java 299d369552fb940a1297d64606c3c0c1698e57a8 GREEN
......
......@@ -22,6 +22,7 @@ import org.fortiss.af3.state.model.State;
import org.fortiss.tooling.base.compose.ConnectorConnectionCompositorBase;
import org.fortiss.tooling.base.model.base.ConnectionSegmentBase;
import org.fortiss.tooling.base.model.base.ConnectorBase;
import org.fortiss.tooling.base.model.base.EntryConnectorBase;
import org.fortiss.tooling.base.model.element.IConnection;
import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext;
......@@ -40,21 +41,22 @@ public class ConnectorConnectionCompositor
// Do not allow connections from and to already occupied ports.
// Since a link can be drawn from an entry not to an exit node as well, both end
// points have to be checked for both incoming and outgoing links.
boolean freeSource, freeTarget;
// If both connectors are on the same level, they can be connected only once.
boolean freeSource = false;
boolean freeTarget = false;
// If both connectors are on the same level, they can be connected only once:
if(source.eContainer() == target.eContainer()) {
freeSource = source.getOutgoing().isEmpty() && source.getIncoming().isEmpty();
freeTarget = target.getIncoming().isEmpty() && target.getOutgoing().isEmpty();
} else {
freeSource = isSameLevelPortFree(source);
freeTarget = isSameLevelPortFree(target);
// In case on of the connections is attached to the parent, it is possible that a port
// has an incoming and an outcoming connection (one on each level).
if(source.eContainer() == target.eContainer().eContainer()) {
freeSource = source.getOutgoing().isEmpty();
freeTarget = target.getIncoming().isEmpty() && target.getOutgoing().isEmpty();
} else {
freeSource = source.getOutgoing().isEmpty() && source.getIncoming().isEmpty();
freeTarget = target.getIncoming().isEmpty();
}
// has an incoming and an outcoming connection (one on each level):
} else if(source.eContainer() == target.eContainer().eContainer()) {
// Case where the source is the cross-level port:
freeSource = isCrossLevelPortFree(source);
freeTarget = isSameLevelPortFree(target);
} else if(source.eContainer() != target.eContainer().eContainer()) {
// Case where the target is the cross-level port:
freeSource = isSameLevelPortFree(source);
freeTarget = isCrossLevelPortFree(target);
}
if(freeSource && freeTarget) {
return super.canConnect(source, target, parent, context);
......@@ -62,6 +64,29 @@ public class ConnectorConnectionCompositor
return false;
}
/**
* Checks whether a port is available for a connection on the same level. In this case the port
* cannot have any other connections.
*/
private boolean isSameLevelPortFree(ConnectorBase connector) {
return connector.getOutgoing().isEmpty() && connector.getIncoming().isEmpty();
}
/**
* Checks whether a port is available for a connection to or from another level. In this case
* the port may already have another connection on the other level. However, the port cannot
* have an existing connection on the level of the connection to be established.
*/
private boolean isCrossLevelPortFree(ConnectorBase connector) {
boolean isFree;
if(connector instanceof EntryConnectorBase) {
isFree = connector.getOutgoing().isEmpty();
} else {
isFree = connector.getIncoming().isEmpty();
}
return isFree;
}
/** {@inheritDoc} */
@Override
protected ConnectionSegmentBase createConnection() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment