input clk,
input rst_n,
input en,
input d,
output reg q
);
if (!rst_n)
q <= 0;
else if (en)
q <= d;
endmodule
input D,clk,rst_;
output Q, QBar;
reg Q;
wire QBar;
always @(clk or rst_ or D)
begin
if(!rst_) Q=1'b0;
else if(clk)Q=D;
end
assign QBar = ~Q;
endmodule