ASM Creator User Manual
Draw Algorithmic State Machines (ASMs) and build them to a connectivity list
H:S & RTL Technology | ASM Creator User Manual
A Short ASM Creator Manual
ASM Creator is a part of the EDA tool Synthagate for High level and Logic synthesis of digital systems. With ASM Creator, it is possible to draw the Algorithmic State Machine (ASM) and build it to the connectivity list. An example of ASM Coder is presented in Fig. 1.
Figure 1. ASM of instruction Coder
The graph of ASM (from now on referred to as ASM) consists of several interconnected vertices. Any ASM begins with vertex Begin, which is followed by a combination of conditional and operator vertices and terminates with a vertex End. We can also use special Comment vertices, which are not part of ASM but can be added for explanations.
To place a vertex, select it from the pane on the left and drag-and-drop it to the desired location. It will align to the grid automatically. To make a connection, press the Connector button. The red dots will appear at the outputs of vertices that are not connected yet. Choose the output of the source vertex and connect it by the left button of the mouse with the input of the target vertex. If the input of the target vertex is already connected with the output of another vertex, we can connect the source with the arc entering the input of the target vertex (output of vertex with dmacycle is connected with the arc between the operator vertex and vertex End.
Every vertex has a fixed number of available connections. Vertex Begin has only one output, whereas vertex End – only one input. An operator vertex has one input and one output; a conditional vertex has one input and two outputs, marked by symbols 0 and 1. Each output can be connected with only one input, whereas input should be connected at least with one output.
Note, that the first output of the conditional vertex is automatically considered an output 0. Double-click at the arrow to change output 0 by 1 or output 1 by 0.
ASM Creator provides fast possibilities for changing the visual appearance of ASM. The formatting can be applied to an individual element by simply selecting it, or to a group of elements. The desired fragment of ASM is selected either by drawing a rectangle around it with a mouse or by clicking individual elements while holding the “Ctrl” key down. Any vertex or connection arrow can have a unique line width, line pattern, and fill color. It is possible to select the font size, style, alignment, and color of any object of ASM. To choose these parameters, you should apply to “Tools -> Options” from the drop-down menu.
Any selected element or a group of elements of ASM can be freely moved around. However, in order to maintain connection, arrows, which link the selected part to the rest of ASM, should not be selected.
When ready, the ASM can be saved as a name.asd file for subsequent viewing, editing, or printing with ASM Creator. ASM Creator allows open multiple “.asd” files at the same time. To switch between the opened files, click the corresponding filename in the pane just above the workspace. In order to close a file, select it and press the button with a white cross in a red rectangle or select the Close command from the File drop-down menu.
ASM Creator allows us to construct a hierarchy of algorithms. Any vertex with generalized operator (subASM) can be linked to another .asd file, which contains a subASM. For example, PackData (Fig. 2) is a subASM of MainCoder. In order to link it to a vertex PackData of ASM MainCoder from Fig. 1, the subASM should be saved with the same name (PackData.asd). Each subASM should be in a subfolder of a folder Initial, as ASM Creator would search all subfolders of the folder Initial to find it.
To open ASM of the linked subASM, right-click the corresponding generalized operator and select the “Open” command. If there is none, an empty workspace will be opened.
Figure 2. Generalized Operator PackData
When a user clicks build in ASM Creator (in Fig. 1), Synthagate immediately compiles this schematic into two files in folder Initial – MainCoder.gsa (ASM as a two connected list – Fig3. left) and file MainCoder.txt (a text file with the contents of the vertices in ASM – Fig3.right). These files are an internal representation of ASM, and Synthagate works with them, not with its pictures. From file MainCoder.txt, we see that the mode MainCoder contains four operators Y1 – Y4, six microoperations y1 – y6, and two logical conditions x1 and x2.
Figure 3. Files MainCoder.gsa and MainCoder.txt
Arithmetic, Boolean, and comparison operators are presented in Tables 1 and 2. A Boolean expression can be written in the conditional vertex, an operator with one, two, or more microoperations can be written in the operator vertex.
Table 2. Comparison operators
Table 1. Arithmetic operators
An example of ASM with different arithmetic and comparison operators is presented in Fig. 4.
Figure 4. Example of ASM with different arithmetic and comparison operators
Examples of assignment and shift operators
r1:=r2 – The length of vectors should be equal
r1:=”1011” – the assignment of binary constant to four-bit vector r1
r1:=x”1011” – the assignment of hexadecimal constant to sixteen-bit vector r1
r1:=0 – the reset of r1 (after that each bit of r1 is equal to 0)
r1:=1 – the preset of r1 (after that each bit of r1 is equal to 1)
p:=p+1 – p is a counter. Increment counter by one
p:=p-1 – p is a counter. Decrement counter by one
r2:=r2<<n – an n-bit shift of r2 to the left
r2:=r2>>n – an n-bit shift of r2 to the right
Arrays in ASM Creator
To apply to the part of an array, you should use the round brackets. A microoperation in operator vertex
a1 := b2(7-4)
means that the bits from 7 down to 4 of the output of unit b2 be assigned to the input of unit a1 having only 4 bits. More examples:
a3(5-4) := c5(15-14);
r1(0-7) := r2(63-56).