-
-
Save Paebbels/6a53a8aa91cec6998fe7 to your computer and use it in GitHub Desktop.
Mealy automate example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clock: clk | |
inputs: in | |
outputs: out | |
states: cs (current state); ns (next state) | |
process(clk) | |
cs <= ns | |
process(cs, in) | |
ns := cs | |
out := 0 | |
case cs is | |
when S0: | |
if (in = 1): | |
ns := S1 | |
out := 1 | |
end | |
when S1: | |
ns := S0 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment