HDLbits
Start Practicing

Circuits/Sequential Logic

D Flip-Flop with Asynchronous Reset

medium
dffflip-flopasync-resetsequential

Build a single D flip-flop with an asynchronous, active-high reset. When areset is asserted, q must go to 0 immediately — independent of clk. When areset is deasserted, q follows d, sampled on each rising edge of clk.

Interface

Signal Direction Width Description
clk input 1 Clock, rising-edge triggered
areset input 1 Asynchronous, active-high reset
d input 1 Data input
q output 1 Registered output

Behavior

  • On any rising edge of areset, q is forced to 0 right away (not synchronized to clk).
  • Otherwise, on each rising edge of clk, q <= d.