RFSM

RFSM is a toolset for describing and simulating StateChart-like state diagrams. The toolset is composed of

RFSM tools take

and generate

Additionnaly, dedicated backends can generate system descriptions in

for simulation of implementation.

The rfmsc compiler is intended to be used from the command line. Graphical User Interfaces are provided separately:

Documentation

The compiler user manual can be found here

The library API is documented here

Installation

The latest stable version is provided as a ready-to-install OPAM package. Just type

opam install rfsm

Compiling and running examples

Some examples are provided in the directories single and multi (the former concerns systems built from a single state diagram, the latter systems built from several diagrams).

For compiling and running an example

Viewing the graphical representations (.dot files) and the execution traces (.vcd files) is carried out by calling external programs called $DOTVIEWER and $VCDVIEWER in the Makefile. Default values are provided in the file <opam_prefix>/share/rfsm/platform, where <opam_prefix> is the root of the opam tree where the rfsm package has been installed. These values will probably to be adjusted according to your system.

The generated SystemC (resp. VHDL) code is written in sub-directory ./systemc (resp. ./vhdl). Also generated in these directories is a dedicated Makefile for compiling and running the generated code and viewing the results. This Makefile is derived from a template located in directory <opam_prefix>/share/rfsm/templates/. These templates will also probably have to be adjusted to suit your local SystemC or VHDL installation.

Some examples also contain a ./ml sub-directory. The ocaml source code located in these sub-directories illustrates the use of the rfsm library. The code can be compiled and run by simply typing make (provided, again, that the rfsm package has been properly installed).