Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

StateMachine Modeling For HDLs

To efficiently generate Hardware Description Language (HDL) code from StateMachine models, apply the design practices described in this topic. Hardware Description Languages include VHDL, Verilog and SystemC.

In an HDL StateMachine model, you might expect to:

  • Designate Driving Triggers
  • Establish Port–Trigger Mapping
  • Add to Active State Logic




See also

Designate Driving Triggers

  • A 'Change' Trigger is deemed to be an asynchronousTrigger if:
         -  There is a transition from the actual SubMachine State (which
            encapsulates the actual logic) that it triggers, and
         -  The target State of that transition has a self transition triggered
            by the same Trigger
  • Asynchronous Triggers should be modeled according to this pattern:
         -  The Trigger should be of type Change (specification: True / False)
         -  The active State (SubMachine State) should have a transition
             triggered by it
         -  The target State of the triggered transition should have a self
             transition with the same Trigger
  • A Trigger of type 'Time', which triggers the transitions to the active state (SubMachine State), is deemed to be the Clock; the specification of this trigger should conform to the target language:
         -  VHDL - rising_edge / falling_edge
         -  Verilog - posedge / negedge
         -  SystemC - positive / negative
StateMachines Trigger

Establish Port-Trigger Mapping

After successfully modeling the different operating modes of the component, and the Triggers associated with them, you must associate the Triggers with the component's Ports.

A Dependency relationship from the Port to the associated Trigger is used to signify that association.

An example of Hardware Description Language (HDL) in Sparx Systems Enterprise Architect.

Active State Logic

Designating the driving Trigger and establishing the Port-Trigger mapping put in place the preliminaries required for efficiently interpreting the hardware components.

We now model the actual StateMachine logic within the Active (SubMachine) State.


  • To be able to generate code from behavioral models, all behavioral constructs should be contained within a Class
  • The current code generation engine supports only one clock Trigger for a component

Learn more