Question: The following partial code ( CODE 3 ) for a FSM contains 1 or more errors, how many errors are there ? ( one numeric

The following partial code (CODE 3) for a FSM contains 1 or more errors,
how many errors are there ?
(one numeric answer in range 0 to 8)
CODE 3
localparam ST0=1;
localparam ST1=2;
localparam ST2=3;
localparam ST3=0;
always @(posedge clk or negedge nrst)
if (!nrst) state <= ST0; else state = nextstate;
always @(*)
case (state)
ST0: if (a) nextstate = ST1;
ST1: if (b) nextstate = ST0; else nextstate = ST1;
ST2: if (a) nextstate = ST3;
ST3: if (b) nextstate = ST0; else nextstate = ST3;
default:
endcase
always @(*)
if (state == ST3) d =1;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!