You are on page 1of 1

module FED(in,clk,out);

input in,clk;
output out;
wire q0,q1;
D_FF D1(in,clk,q0), //instantiation of D Flip Flop
D2(q0,clk,q1);
assign out=(q0 && !q1);
endmodule
module D_FF(d,clk,q); //D Flip Flop module
input d,clk;
output reg q;
always@(negedge clk)
begin
q<=d;
end
endmodule

You might also like