public class CrossbarSwitch extends BasicSwitch
CommunicationAspect
that, when its
BasicSwitch.sendToken(Receiver, Receiver, Token)
method is called, delays
the delivery of the specified token to the specified receiver
according to a delays on input buffers, delays on output buffers
and delays in the switch fabric of a crossbar switch. This actor is
used the same way as the BasicSwitch
; just the switch fabric
implemented here is different. I.e. this switch can potentially exhibit
better throughput performance as some tokens can be processed in parallel
by the switch fabric. For more information on how a crossbar switch works
please refer to the
http://en.wikipedia.org/wiki/Crossbar_switch
General Properties.Red (derler) |
Yellow (derler) |
BasicSwitch.BasicSwitchAttributes
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.Integer,java.util.TreeSet<TimedEvent>> |
_switchFabricQueue
Switch fabric queues for every output port.
|
protected java.util.HashMap<java.lang.Integer,FIFOQueue> |
_waitingOnSwitchFabricQueue
Queue that stores tokens that have been put into the input queue but
cannot be processed by the switch fabric because the crossbar switch
for this connection is busy.
|
_inputBufferDelay, _inputTokens, _ioPortToSwitchInPort, _ioPortToSwitchOutPort, _nextFireTime, _numberOfPorts, _outputBufferDelay, _outputTokens, _switchFabricDelay, inputBufferDelay, numberOfPorts, outputBufferDelay, switchFabricDelay
_parameters, _tokenCount
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
decoratorHighlightColorName
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
CrossbarSwitch(CompositeEntity container,
java.lang.String name)
Construct a CrossbarSwitch with a name and a container.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_scheduleRefire()
Schedule a refiring of the actor at the current or a future time.
|
java.lang.Object |
clone(Workspace workspace)
Clone this actor into the specified workspace.
|
void |
fire()
Move tokens from the input queue to the switch fabric, move tokens
from the switch fabric to the output queues and send tokens from the
output queues to the target receivers.
|
void |
initialize()
Initialize actor variables.
|
_getNextFireTime, _getPortID, attributeChanged, createDecoratorAttributes, createIntermediateReceiver, getReceiver, postfire, reset, sendToken, setContainer, setPortIn, setPortOut
_sendToReceiver, decoratedObjects, isGlobalDecorator, registerListener, sendCommunicationEvent
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
description, getContainer, getDisplayName, getFullName, getName, getName, setName
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
getDerivedLevel, getDerivedList, propagateValue
protected java.util.HashMap<java.lang.Integer,java.util.TreeSet<TimedEvent>> _switchFabricQueue
protected java.util.HashMap<java.lang.Integer,FIFOQueue> _waitingOnSwitchFabricQueue
public CrossbarSwitch(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor.fIllegalActionException
- If the container is incompatible
with this actor.NameDuplicationException
- If the name coincides with
an actor already in the container.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class BasicSwitch
workspace
- The workspace for the cloned object.java.lang.CloneNotSupportedException
- If cloned ports cannot have
as their container the cloned entity (this should not occur), or
if one of the attributes cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class BasicSwitch
IllegalActionException
- Thrown if token cannot be sent to
target receiver.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class BasicSwitch
IllegalActionException
- If the superclass throws it or
the switch table could not be parsed from the actor parameters.protected void _scheduleRefire() throws IllegalActionException
_scheduleRefire
in class BasicSwitch
IllegalActionException
- If actor cannot be refired at
the computed time.