| Contents | Index |
| On this page… |
|---|
Stateflow charts provide concise descriptions of complex system behavior using hierarchical finite state machine (FSM) theory, flow diagram notation, and state-transition diagrams.
You use a chart to model a finite state machine or a complex control algorithm intended for realization as an ASIC or FPGA. When the model meets design requirements, you then generate HDL code (VHDL or Verilog) that implements the design embodied in the model. You can simulate and synthesize generated HDL code using industry standard tools, and then map your system designs into FPGAs and ASICs.
In general, generation of VHDL or Verilog code from a model containing a chart does not differ greatly from HDL code generation from any other model. The HDL code generator is designed to
Support the largest possible subset of chart semantics that is consistent with HDL. This broad subset lets you generate HDL code from existing models without significant remodeling effort.
Generate bit-true, cycle-accurate HDL code that is fully compatible with Stateflow simulation semantics.
The following demos, illustrating HDL code generation from subsystems that include Stateflow charts, are available:
Greatest Common Divisor
Pipelined Configurable FIR
2D FDTD Behavioral Model
CPU Behavioral Model
To open the demo models, type the following command:
demos
This command opens the Help window. In the Demos pane on the left, select Simulink > Simulink HDL Coder. Then, double-click the icon for any of the following demos, and follow the instructions in the demo window.
If you are familiar with Stateflow charts and Simulink models but have not yet tried HDL code generation, see the hands-on exercises in Introduction to HDL Code Generation.
If you are not familiar with Stateflow charts, see Stateflow Getting Started Guide. See also the Simulink® Coder™ documentation.
![]() | Stateflow HDL Code Generation Support | Quick Guide to Requirements for Stateflow HDL Code Generation | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |