Professional Documents
Culture Documents
State Mach Onehot PDF
State Mach Onehot PDF
State Mach Onehot PDF
case (1’b1)
present_state[bit0]: next_state_assignment;
present_state[bit1]: next_state_assignment;
present_state[bit2]: next_state_assignment;
present_state[bit3]: next_state_assignment;
endcase
n16
arbiter_oh_ns[3]
dly dly n15
U22
done done U21
...
U23 n13
U27
U29 U28 n19
U30 n20 ...eg[2]
...eg[0]
...eg[3]
clk
n23
rst_n
n22
rst_n U26
n21
n18
clk
One-Hot State Machines
I The case items are unique, they may be decoded in parallel
I Good place to use unique case
always_comb begin
arbiter_oh_ns = 4’b0000; //default for _ns vector
gnt = 1’b0; //default assignment
unique case (1’b1)
...
U14
...[3]
U22 U18 U20
U21
U17 ...[0]
...[1]
U19 U15
U16
...[2]
U13