Verilog Coding Exercise · Sequential
JK Flip-Flop
Set, reset, hold, or toggle — all four combinations, no invalid state.
A more flexible flip-flop than SR: J=K=1 toggles the output instead of producing an undefined result, which is exactly what an SR flip-flop can't safely do.