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