JavaFSM<SUP>©</SUP>

by Karola Krönert and Ulrich Dallmann

ENGLISH translation by Holger Rehmeier
IPCT, PUCRS, BRASIL (moore tools)


JavaFSM as application
Selection between Mealy - and Moore networks
Saving and loading of designed machines
Loading of example-machines
Definition of the machine name
Definition of In- and Outputs
Design of the vending machine with help of the editor
Switch between edit - and simulation-mode
Definition of the logical transition-conditions and output-functions
Check the machine on correctness
Simulation through changing of in- and output values and clock
Output of the simulation results on the impulse diagram
Export of the machine in the VHDL / KISS-format

JavaFSM as application

To execute JavaFSM, you require the JDK of Sun. Download the file JavaFSM.zip and unpack it. Besides the program JavaFSM, it contains also some example-machines and documentation. Change to the JavaFSM folder and start the Interpreter doing this:
" Java -classpath PATH DE.uni_hamburg.informatik.tech.JavaFSM.JavaFSM ",  the path must point to JavaFSM.

Using Windows 95 / NT you can adapt the included batch file "JavaFSM.bat ". If JavaFSM is not direct on the drive C:\ , you have to enter the path there. Furthermore, the path must be set on the JDK

Selection between Mealy - and Moore networks

When starting the JavaFSM, a dialogue-window appears to the selection of the network type. Using Moore networks, the output values only depend on the calculation of the machine. However with Mealy, the input-values influence the lambda network, too, so the output values are depending on the input-values and can change their value without clock.
Through the menu "Machine - Moore" as well as "Machine - Mealy"  the type of network can be altered. However this is only possible in the edit mode, because the machine may not be changed during the simulation. With the change of the Mealy nchaltwerk to the Moore nchaltwerk, complex edit functions get lost and are replaced with "0".

Saving and loading of designed machines

JavaFSM offers the possibility to save designed machines and to load again.

In the application, you can select the file name in the menu "File - Load / Save". To the uniform labeling, these should carry the extension " .fsm ". On this occasion it is to be heeded that the CLASSPATH must be put down! Applets are prohibited to accesses the client computer due to security and it is not possible therefore to store data on the user drive directly.

With selection of the menu "File - Load / Save" in the Applet a dialogue-window opens . Files are saved under a name and a password, that should prevent an inadvertent overwriting and protects data of other users. You should be aware that all machines are saved on the server in the same folder. Therefore, a machine should get an unambiguous name (username_machinename). After entering the filenames and the password and confirmation the data is transferred to the server. Possibly appearing errors are passed out in the status line. If the machine was properly loaded / saved, the dialogue window closes. If an already existing filename is chosen when saving, the affiliated password must be declared. Otherwise, the error message that the file is already existing / password-error appears. Choose another filename instead.

Firewall / Proxy

A Java Applet may build a network-connection only to the server, from which it was loaded, due to security. Is there a Proxy-Server (Firewall) between this connection, unfortunately no machines can be loaded as well as saved, because the Proxy itself cannot be contacted! Nevertheless whoever would like to work with JavaFSM can download  it and  start as application.

Loading of example machines

In the menu "File - Examples" are some example machines, that are loaded from the Webserver. If any errors should appear, these are passed out in the status line. This selection is not possible in the application. There, the examples can be loaded from the subdirectory directly Beispiele.

Definition of the machine name

In the menu "Machine - Machine-name" you can choose a name for the machine. It appears on the window titles then.

Definition of in- and outputs

With the buttons as well as the menu "Signal" you can install the in- and outputs, altered as well as delete.
New: Opens a dialogue window, in that the name of the input / output and with inputs the initial value can be defined. A name is allowed to contain letters, digits and the signs "/" and "_", but the first sign may not be be a digit.
Change: After the selection of the change-button or the menus click on the input / output to be changed. The dialogue-window appears, in which the alterations can be done.
Delete: After the selection of the delete button or the menu click on the input / output to be deleted.

Design of the vending machine with help of the editor

With the Menu "Machine - Editor", you get to the machine editor. The left side contains the buttons and below the input-field. The grafic display is on the right.

The editor works modus orientaded. The buttons have following functions:
States: clicking the button "State" leads into the mode insertion of states. Conditions can now be inserted by clicking on the grafic display.
Transitions: clicking of the button "Transition" leads into the mode to insertion of the transitions. Inserting a transition one connective state after the other is selected. Clicking the first state, colors itself red. The following state is to be clicked afterwards. The transition is inserted. The state last selected remains selected (red), so that it is already the starting state for the next transition. Clicking on empty space, the state is unselected and so a new starting state can be selcted.
Deleting: clicking of the button "Delete" leads to the deleting modus. Everything, on that is clicked in this modus, gets deleted. Deleting states, also the affiliated transitions get deleted.
Start-state: In this mode, the the starting state can be fixed through clicking. A starting state must be fixed in each machine.
Move: States and comments can be moved in the move mode. Moving states, the transitions will move themselves with them. Furthermore, transitions and states can be selected, to change the transition conditions, the edit functions, and to define the names of the states in the options field. For a comment, the text can be defined in that field as well.

Comment: Here, comments can be inserted on the grafic display. These are framed and may include several lines. By clicking on the "Assume"-button, the text is pasted into the comment.

Definition of the logical transition conditions and output functions

When clicking on one transition (in the move mode), there appears a text field beyond the buttons, that contains the logical transition function. Following syntax is valid:

&: logical AND

|: logical OR

! : logical NOT

Transitions pointing from a condition, the transition function can also contain "*". That "*" stands for all other conditions, i.e. this transition is activated, if no other transition is activated.

Check the machine on correctness

Clicking on "FSM test" (in the editor) the current machine is checked on correctness. Errors are passed out in a window. With more complex machines, this can last some minutes (beside the size of the machine the number of inputs is relevant for the calculation time). It checks first, if conditions and transitions are existing at all, and if one of the states was defined as start. All possibilities are calculated, after that for each possibility it is testet if a following state is defined. In a dialogue window, statuses and errors are displayed.

Switch between edit and simulation mode

The program distinguishes between edit and simulation mode. In the editmode, inputs / outputs can be defined and are inserted into the machine. In the simulation mode, input values can changed, the clock generated and the impulse diagram displayed. Choose the menue "Simulation" to switch between simulation "Simulate" and edit "Edit". Changing the mode from the menu simulation to edit all previous data gets lost.

Simulation through changing of in- and outout values and clock

After changing to the simulation mode, the values of the inputs can be changed by clicking. Through clicking on the clock button "Clock" (or the menu "Simulation - Clock") the clock is generated. The machine calculates the following state  and changes steps to it. At the outputs new the values of the refering state are given. Through clicking on "Reset" (or menu "Simulation - Reset") the machine is reset (inputs and outputs as defined and start at start state). The impulse-diagram is also reset.

Output of the simulation result on the impulse diagram

Using the menu "Impulsediagram - Show" (only in the simulation mode) the impulse-diagram is opened.

Export of the machine in the VHDL / KISS-format

Through the menu "File - Convert - VHDL / KISS" the  machine is converted to the VHDL / KISS ormat. Because an Applet cannot store (security), the text is displayed in a text-field, from where it can copied and pasted into a normal editor.


JavaFSMTECHUlrich DallmannKarola Krönert