vimwiki/tech/D-flip-flop.wiki

30 lines
590 B
Plaintext
Raw Normal View History

2021-11-02 19:15:01 +00:00
= D-flip-Flop =
A D-flip-flop or data flip flop is a type of flip flop that can store a bit,
and has two inputs and two outputs
* D (data) input
* CLK (Clock) input
* Q (Stored Data) output
* NOT_Q (Stored Data) output
2021-11-02 19:30:01 +00:00
The D flip flop only changes on the rising edge of the clock. To create a
falling edge flip flop, place a not gate before the CLK signal
== Verilog ==
{{{
module D_flip_flop(D, EN, Q, Q_NOT);
output reg Q;
output Q_NOT;
input D, EN; //data and enable (clk)
always @(posedge EN) begin
Q <= D;
end
assign Q_NOT = ~Q;
endmodule
}}}