Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE ATTACH ALL SCHEMATICS & DIADRAMS AS A PICTURE. THANKS!! a. (10 pts) Consider the following two System Verilog modules. Do they have the same

PLEASE ATTACH ALL SCHEMATICS & DIADRAMS AS A PICTURE. THANKS!!

a.

(10 pts) Consider the following two System Verilog modules.

  • Do they have the same function?
  • Sketch the circuit schematic each one implies.

b.

(12 pts) Sketch the state transition diagram for the FSM described by the following HDL code. Draw a state diagram for this Moore machine making sure to label and specify the outputs for each state. Include and label all possible state transition arcs, including self-transitions.

module fsm( input logic clk,

input logic reset,

input logic a, b,

output logic y );

typedef enum logic[1:0] {S0, S1, S2, S3} statetype;

statetype state, nextstate;

always_ff @( posedge clk, posedge reset)

begin

if( reset )

state <= S0;

else

state <= nextstate;

end

always_comb

case(state)

S0: if (a^b) nextstate = S1;

else nextstate = S0;

S1: if (a&b) nextstate = S2;

else nextstate = S0;

S2: if (a|b) nextstate = S3;

else nextstate = S0;

S3: if (a|b) nextstate = S3;

else nextstate = S0;

default: nextstate = S0;

endcase

assign y = (state == S1) | (state == S2);

endmodule

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Digital Design and Computer Architecture

Authors: David Harris, Sarah Harris

2nd edition

9789382291527, 978-0123944245

More Books

Students also viewed these Programming questions

Question

=+c. Find the probability that x 1 y # 21.

Answered: 1 week ago

Question

=+b. Find the probability mass function of y.

Answered: 1 week ago