Latch inferred from an incomplete combinational block

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

A designer intends the following Verilog block to be combinational logic. The signal y is declared as a reg.


Verilog
always @(*) begin
  if (en)
    y = d;
end


a) What hardware does a synthesis tool infer for y, and why?


b) Rewrite the block so that y is purely combinational, equals d when en is 1, and equals 0 when en is 0.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Computer-Aided Design and Simulation Tools for Digital Design Questions: