Sunteți pe pagina 1din 3

FlipFlop tipo D

`timescale 1ns / 1ps


module flip_flop_D(
input CLOCK,
input DD,
output QQ
);

// declaración de la variable interna con valor inicial = 0


reg q_int = 1'b0;

always@(posedge CLOCK) CLOCK Qn+1


begin
q_int <= DD; ↑ D
end

assign QQ = q_int;

endmodule

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FlipFlop tipo D con habilitación y entradas para reinicio y establecimiento síncrono

`timescale 1ns / 1ps


module flip_flop_D(
input CLOCK, ENABLE,
input RESET, SET,
input DD,
output QQ
);

// declaración de la variable interna con valor inicial = 0


reg q_int = 1'b0;
always@(posedge CLOCK) CLOCK RESET SET ENABLE Qn+1
begin
↑ 1 X X 0
if (RESET)
q_int <= 1'b0; ↑ 0 1 X 1
else if (SET) ↑ 0 0 0 Qn
q_int <= 1'b1;
else if (ENABLE)
↑ 0 0 1 D

q_int <= DD;


end

assign QQ = q_int;

endmodule

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FlipFlop tipo D con habilitación y entrada para reinicio síncrono

`timescale 1ns / 1ps


module flip_flop_D(
input CLOCK, ENABLE,
input RESET,
input DD,
output QQ
);

// declaración de la variable interna con valor inicial = 0


reg q_int = 1'b0;

always@(posedge CLOCK)
begin CLOCK RESET ENABLE Qn+1
if (RESET)
q_int <= 1'b0;
↑ 1 X 0
else if (ENABLE) ↑ 0 0 Qn
q_int <= DD;
end ↑ 0 1 D

assign QQ = q_int;

endmodule

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FlipFlop tipo D con habilitación y entrada para reinicio síncrono activa bajo
`timescale 1ns / 1ps
module flip_flop_D(
input CLOCK, ENABLE,
input RESET,
input DD,
output QQ
);

// declaración de la variable interna con valor inicial = 0


reg q_int = 1'b0;

always@(posedge CLOCK)
begin CLOCK RESET ENABLE Qn+1
if (!RESET)
↑ 0 X 0
q_int <= 1'b0;
else if (ENABLE) ↑ 1 0 Qn
q_int <= DD; ↑ 1 1 D
end

assign QQ = q_int;

endmodule

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

S-ar putea să vă placă și