
Algorithmic State Machines (ASM)
A flowchart-like chart that specifies a controller's states, decisions, and outputs.
Description
An ASM chart is a hardware flowchart for sequential control. It uses state boxes (one per clock state), decision boxes (diamonds testing inputs), and conditional output boxes. Unlike a software flowchart, an ASM block executes in one clock cycle and maps directly to a state machine.
- State box: a rectangle = one state (one clock cycle); lists unconditional outputs.
- Decision box: a diamond tests an input → branches.
- Conditional output box: oval, asserts an output only on a branch (Mealy).
- An ASM block = one state box + its decision/conditional boxes.
- Everything in a block happens within a single clock.
- A software flowchart has no timing; an ASM block is one clock.
- Maps directly to a hardware state machine.
- Moore outputs in state boxes; Mealy outputs in conditional boxes.
- Each state box → one FSM state.
- Drives the datapath control signals.
At a glance
What
A charting method for clocked control sequences (states, decisions, outputs).
Why
It captures controller behavior more clearly than a raw state diagram.
How
State boxes + decision diamonds + conditional outputs, one ASM block per clock.
Where
Designing the control unit of an RTL system.
When
Before coding or building the controller FSM.
Think of it like…
An ASM chart is a board game turn diagram: each square is one turn (clock), the forks are dice checks (inputs), and some forks trigger a bonus action (conditional output).
Three ASM elements
- State box: a rectangle = one state (one clock cycle); lists unconditional outputs.
- Decision box: a diamond tests an input → branches.
- Conditional output box: oval, asserts an output only on a branch (Mealy).
- An ASM block = one state box + its decision/conditional boxes.
- Everything in a block happens within a single clock.
ASM vs flowchart
- A software flowchart has no timing; an ASM block is one clock.
- Maps directly to a hardware state machine.
- Moore outputs in state boxes; Mealy outputs in conditional boxes.
- Each state box → one FSM state.
- Drives the datapath control signals.
ASM symbols
| Symbol | Meaning |
|---|---|
| Rectangle | state (1 clock) |
| Diamond | decision on input |
| Oval | conditional (Mealy) output |
Real-world applications
The 5 Whys
- 1
Why ASM charts? Clear timing-aware control specification.
- 2
Why state boxes = 1 clock? Ties the chart to hardware timing.
- 3
Why decision boxes? Branch on inputs.
- 4
Why conditional outputs? Capture Mealy behavior.
- 5
Root cause: an ASM chart is a state machine drawn with explicit clock timing.
Cheat sheet
Working principle
- State boxes + decision diamonds + conditional outputs, one ASM block per clock.
- A charting method for clocked control sequences (states, decisions, outputs).
Formulas & Boolean expressions
- State box: a rectangle = one state (one clock cycle); lists unconditional outputs.
- An ASM block = one state box + its decision/conditional boxes.
- Rectangle = state (1 clock)
- Diamond = decision on input
- Oval = conditional (Mealy) output
Key facts
- State box: a rectangle = one state (one clock cycle); lists unconditional outputs.
- A software flowchart has no timing; an ASM block is one clock.
Why it exists
- Root cause: an ASM chart is a state machine drawn with explicit clock timing.