Question: Write a test bench in EDA playground to test fully this design as follows: / / Moore FSM module myMoore ( input clk , reset,

Write a "test bench" in EDA playground to test fully this design as follows:
//Moore FSM
module myMoore(input clk, reset, x,
output y);
//state encodings
parameter s0=2'b00, s1=2'b01, s2=2'b10;
//state variables
reg [1 : 0] state, nextstate;
//state register always block
always @(posedge clk, posedge reset)
if (reset) state = s0;
else state = nextstate;
//next state always block
always_comb
case (state)
s0 : nextstate = x ? s0 : s1;
s1 : nextstate = x ? s2 : s1;
s2 : nextstate = x ? s0 : s1;
default : nextstate = s0;
endcase
//output logic
assign y =(state == s2);
endmodule
Write a "test bench" in EDA playground to test

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 Programming Questions!