FSM Simulator

VisualSim Block Documentation ›› Full Library ›› Model ›› FSM ››
Parent Previous Next



Full Library / Model / FSM / FSM Simulator
Block Name: FSM Simulator (FSMDirector)


A director is a form of Model of Computation.  A Director is also known as a simulator type.  It should be used for a model or a hierarchical block that is to be executed according to this MoC. An FSMDirector governs the execution of a Hierarchical block containing an FSM description. A Hierarchical FSM is a Hierarchical block with a FSMDirector as local director. The mode control logic is captured by a mode controller, an instance of FSM-Controller. Each state of the mode controller represents a mode of operation and can be refined by a anoher block.

When a Hierarchical block containing the FSM-Controller and the FSM Simulator is fired, this director first transfers the input tokens from the outside domain to the mode controller and the refinement of its current state. The preemptive transitions from the current state of the mode controller are examined. If there is more than one transition enabled, an exception is thrown. If there is exactly one preemptive transition enabled then it is chosen and the choice actions contained by the transition are executed. The refinement of the current state is not fired. Any output token produced by the mode controller is transferred to the outside domain. If no preemptive transition is enabled, the refinement of the current state is fired. The non-preemptive transitions from the current state of the mode controller are examined. If there is more than one transition enabled, an exception is thrown. If there is exactly one non-preemptive transition enabled then it is chosen and the choice actions contained by the transition are executed. Any output token produced by the mode controller or the refinement is transferred to the outside domain.

The mode controller does not change state during successive firings in one iteration in order to support outside simulators that iterate to a fixed point. When the Hierarchical FSM is postfired, the chosen transition of the latest firing is committed. The commit actions contained by the transition are executed and the current state of the mode controller is set to the destination state of the transition.


Field Detail

controllerName

public VisualSim.kernel.util.StringAttribute controllerName




Created with the Personal Edition of HelpNDoc: Easily create Web Help sites