module  T_FF(EN,T,Q,QN);
input   EN;
input   T;
output  Q,QN;

reg  Q,QN;

always  @(posedge T)
begin
  if(EN == 1'b1)
    begin
      QN <= Q;
	  Q  <= ~Q;
    end
  else
    begin
      Q  <= Q;
      QN <= QN;
    end
end

endmodule