Home / Learn Verilog / T Flip-Flop
T Flip-Flop
Toggle on every enabled edge.
In shortToggle on every enabled edge.
What's actually going on
What it is
A T flip-flop flips its output when T=1.
Why it matters
Counters and frequency dividers.
Mechanically speaking
if (t) q <= ~q;
Shows up in
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
ToggleVerilog: edit and run
q is a clock divided by 2.
Check yourself
1. T=1 makes q...
Flip each edge.