How do you plan to solve it?
module dff_posedge ( input CLK, input D, output reg Q ); always@(posedge CLK) begin if(D) Q<=1; else Q<=0; end endmodule