State machines
Draw states and transitions in Logic Tools; Coppa runs them, or builds them from flip-flops and gates.
- Place a State Machine from Logic › Programmable.
- In the inspector, choose Edit State Machine…. The editor opens in Logic Tools.
- Double-click empty space to add a state, and drag states to arrange them. Click one to name it, set its outputs and add transitions.
- Give each transition a condition in Verilog, such as
A & !B. Leave it empty to always take it.
The part has CLK, RST and your inputs on the left and your outputs on the right. At each rising edge of CLK, the first transition from the current state whose condition holds is taken; RST high goes back to the initial state, marked with an arrow.
- Moore outputs belong to states; Mealy outputs belong to the transition that would be taken, and fall back to the state’s.
- Encoding stores the state in binary, one-hot or Gray code.
- While the circuit runs, the editor fills in the current state and the part shows its name below it.
- Build Gates places a block of D flip-flops and gates beside it, its logic minimised from truth tables. Codes no state uses lead back to the initial state.
The machine is saved in the document with the part.
Applies to Coppa 0.1 Preview 14. Last updated 22 November 2026.