Algorithm State Machine: Circuits and Control Circuits. Data Path Circuits Perform The Functions Such As
Algorithm State Machine: Circuits and Control Circuits. Data Path Circuits Perform The Functions Such As
Every digital system can be partitioned into two parts. Those are data path digital
circuits and control circuits. Data path circuits perform the functions such as
arithmetic, logical, shifting. storing of binary information data and transfer of data
from one system to the other system. Whereas, control circuits determine the flow
of operations of digital circuits. It is difficult to describe the behavior of large state
machines using state diagrams. To overcome this difficulty, Algorithmic State
Machine ASM charts can be used. ASM charts are similar to flow charts. They are
used to represent the flow of tasks to be performed by data path circuits and control
circuits.
Data processor is a hardware required for data manipulation that may consist of
adder, subtractor, shift register, and produces the output. In addition to this
function, the data processor also provides status of the data manipulation to the
controller.
The controller, which is also termed as ASM, provides sequence of command to
the data processor. It is called ASM because it consists of well-defined finite
number of steps to the solution of a process.
The algorithmic state machine (ASM) is a method for designing finite state
machines. It is used to represent diagrams of digital integrated circuits. The ASM
diagram is like a state diagram but more structured and, thus, easier to understand.
An ASM chart is a method of describing the sequential operations of a digital
system. ASM charts are useful for specifying detailed logic for sequential circuits
similar to flowcharts.
It describes the sequence of events as well as timing relationship between the states
of FSM. It specifies the step-by-step procedure in order to complete a given digital
design. It can also be called as a hard-wired flow chart.
It is composed of three basic elements:
a) State Box
b) Decision Box
c) Conditional Box
a) STATE BOX
State box is represented in rectangular shape. Each state box represents one state
of the sequential circuit. It is having one entry point and one exit point. Name of
the state is placed to the left of state box. After a state assignment has been made,
a state code may be placed at the upper right corner of the box
b) DECISION BOX
It is a diamond shaped box that represents a decision in the simple case. It
represents a binary decision with two outgoing arrows. It is having one entry point
and two exit paths. The inputs or Boolean expressions can be placed inside the
decision box, which are to be checked whether they are true or false. If the
condition is true, then it will prefer path1. Otherwise, it will prefer path2.
c) CONDITIONAL BOX
It is an oval box that represents a conditional output list. It is also having one entry
point and one exit point similar to state box. The conditional outputs can be placed
inside state box. In general, Mealy state machine outputs are represented inside
conditional output box. So, based on the requirement, we can use the above
components properly for drawing ASM charts.
RULES TO BE FOLLOWED
Several ASM charts can be drawn for the same system. But the following rules
are to be followed each time designing an ASM chart
1. For every valid combination of inputs there must be exactly one exit path.
2. No internal feedback within an ASM block is allowed
3. Parallel paths that lead to the same exit path are allowed.
4. An ASM chart can have multiple exit paths.
For conversion of FSM to ASM, the states get represented by state boxes instead
of nodes.
State transition are still represented by arrows but the input indicated adjacent to
arrows in the state diagram are replaced by decision boxes with the true and false
branches.
In the state diagram, the outputs are indicated along with inputs using a separator
slash or comma. While in an ASM chart Mealy type outputs are now indicated in
conditional output boxes and Moore type outputs are indicated within the state box.
ASM Chart from Mealy Machine
Example: 1
Design a sequence detector for sequence 0101. Overlapping of input bits are
allowed.
State Diagram for sequence detector
Conversion from FSM to ASM Chart
State Table State Assignment Table
Present Next State, Output Present Next State (Y1Y0),
State X=0 X=1 State (y1y0) Output (Z)
A B, 0 A, 0 X=0 X=1
B B, 0 C, 0 00 01, 0 00, 0
C D, 0 A, 0 01 01, 0 11, 0
D B, 0 C, 1 11 10, 0 00, 0
10 01, 0 11, 1
Y0 = y1’y0’x’+y1’y0x’+y1y0’x’+y1’y0x+y1y0’x
Y1 = y1y0x’+y1’y0x+ y1y0’x
Z = y1y0’x
Example: 2
Design a Mod-6 Counter using Mealy Machine.
Example: 3
Make the state diagram for a serial adder using mealy machine. Also make its
corresponding ASM chart and find the necessary expressions for designing of
circuit.
ASM Chart from Moore Machine
Example: 1
Make ASM Chart for given state diagram, wherein input is of single bit.
State Table State AssignmentTable
Present Next State Output Present Next State Output
State X = 0 X = 1 State Y1Y0 Z
S0 S3 S1 0 y1y0 X = 0 X = 1
S1 S0 S2 1 00 10 01 0
S2 S1 S2 0 01 00 11 1
S3 S3 S1 1 11 01 11 0
10 10 01 1
Example: 2
Make ASM Chart for given state diagram, wherein input is of two bits.
State table
Present Next State Output
State XY = XY = XY = XY =
00 01 10 11
A A C C B 1
B B A A C 0
C C B B A 0
State assignment table
Present Next State (Y1Y0) Output
State XY = XY = XY = XY =
y1y0 00 01 10 11 Z
00 00 11 11 01 1
01 01 00 00 11 0
11 11 01 01 00 0
Z = y1’y0’
Y0 = y1’y0x’y’ +y1y0x’y’+y1’y0’x’y+y1y0x’y+y1’y0’xy’+y1y0xy’+
y1’y0’xy+y1’y0xy
Y1 = y1y0x’y’ + y1’y0’x’y+y1’y0’xy’+y1’y0xy