How do you plan to solve it?
module reg4 ( input CLK, input [3:0] D, output reg [3:0] Q ); // Write your code here always @(CLK) begin if(CLK==1) Q<=D; else Q<=Q; end endmodule