Verilog Seq
Verilog Seq
f = x1 & x2;
Thus, a given variable has the same value for all statements in the block.
When Resetn, the reset input, is equal to 0, the flip-flop’s Q output is set to
0.
The sensitivity list specifies the negative edge of Resetn as an event trigger
along with the positive edge of the clock.
We cannot omit the keyword negedge because the sensitivity list cannot
have both edge-triggered and level sensitive signals.
module flipflop (D, Clock, Resetn, Q);
input D, Clock, Resetn;
output reg Q;
always @(negedge Resetn or posedge Clock)
if (!Resetn)
Q <= 0;
else
Q <= D;
endmodule
SYNCHRONOUS CLEAR