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,qis forced to0right away (not synchronized toclk). - Otherwise, on each rising edge of
clk,q <= d.