The following SystemVerilog modules show errors that the authors have seen students make in the laboratory. Explain

Question:

The following SystemVerilog modules show errors that the authors have seen students make in the laboratory. Explain the error in each module and show how to fix it. 

(a) 

module latch(input logic clk. input logic [3:0] d. output reg [3:0] q): always @(clk) if (clk) q <= d: endmodule

(b)

module gates (input logic [3:0] a, b. output logic [3:0] y1. y2. y3. y4. y5): always @(a) begin yl = a & b; y2 = a | b:

(c)

(d)

(e)

(f)

(g)

(h)

(i)


(j)


Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: