CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

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.

Sign in to solveSee what Pro unlocks

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

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks