StateChipGenerator generates AstroChip sources from StateChipGenerator
files. The files describe a simple machine. The machine starts with
the bit "1" in the firststate modules. In every computing cycle one
data word is processed. If a state module contains the bit "1" and
the current data word is equal to one in the rules, the bit is
transferred to the module defined in the rule.
The first line must be:
Define the states:
The line after "firststate" or "state" contains the state name.
The lines until the next "firststate", "state" or "data" keyword
are state change rules.
If the data words are three bits long and the data word currently
processed is "001", the next state is "state2". You can use "*"
instead of "0" or "1". Then the rule is used for "0" and "1" at
The lines after this keyword contain data words. The first data
word is processed first.
data word examples:
The StateChipGenerator files (.scg) can be transformed with
java StateChipGenerator example.scg
or another source instead of example.scg.
StateChipGenerator is written in JAVA. It is compatible to JAVA 1.8
and doesn't use a deprecated JAVA API. JAVA 1.8 or higher must
be installed to start it with the "java" command.
A target file is created, if there are no errors.
You can use AstroChip2.1 to test it. The AstroChip2.1 source must be loaded
in AstroChip2.1. Then you must use the MODULE browser and select some
logic elements. The status of those elements is displayed after
every cycle. If no logic elements are displayed, nothing of the
data flow is visible.
There are five examples contained in StateChipGenerator: example.scg,
example2.scg, example3.scg, example4.scg and example5.scg. First they
must be compiled with StateChipGenerator.
The corresponding view-files example.view,
example2.view, example3.view, example4.view and example5.view can be
loaded in the MODULE browser to view the main data flow in the examples.