Question: PROCEDURE 1. Create a module with required number of variables and mention its input/output. 2. Write the description of the sequence detector FSM in behavioral

PROCEDURE 1. Create a module with required number of variables and mention its input/output. 2. Write the description of the sequence detector FSM in behavioral model. 3. Create another module referred as test bench to verify the functionality. 4. Follow the steps required to simulate the design and compare the obtained output with the required one. CODE // sequence detector module p22(clk, rst, inp, outp); input clk, rst, inp; output outp; reg [1:0] state; reg outp; always @( posedge clk, rst ) begin if( rst ) state <= 2'b00; else begin case( {state,inp}) 3'b000: begin state <= 2'b00; end 3'b001: begin state <= 2'b01; end 3'b010: begin state <= 2'b10; end 3'b011: begin state <= 2'b01; end 3'b100: begin state <= 2'b10; end 3'b101: begin state <= 2'b11; end 3'b110: begin state <= 2'b10; end 3'b111: begin state <= 2'b01; end endcase end assign outp = (({state,inp})==3'b111)? 1'b1 : 1'b0; end endmodule

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!