Codiode

Multiple Nonblocking Assignments

EasyLogic CircuitAnalyze

Hardware synthesis tools rely on strict evaluation rules to translate procedural blocks into predictable sequential logic.

The RTL snippet below defines a clocked process driving a register q.

always @(posedge clk) begin
    q <= d;
    if (en) begin
        q <= 1'b0;
    end
end

Multiple nonblocking assignments target q within the same cycle. This includes a default assignment and a conditional override based on the signal en.

Determine the resulting synthesized logic and the simulated behavior of q for various input conditions.

Constraints

  • Assume standard Verilog execution semantics.
  • clk, d, and en are synchronous 1-bit inputs.
  • q is a 1-bit register.

Topics

SequentialVerilogRTLNonblocking

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

Browse all problems · GATE digital electronics practice questions · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.