**JK Flip-Flop RTL Design & Verification:** What condition in an SR Flip-…
**JK Flip-Flop RTL Design & Verification:** What condition in an SR Flip-Flop does a **JK Flip-Flop** eliminate? State its characteristic equation, truth table, and write synthesizable Verilog RTL code with synchronous reset and its testbench.
Model answer
### 1. Working Principle & Invalid State Elimination In an SR Flip-Flop, $S=1, R=1$ creates an undefined race condition. A **JK Flip-Flop** eliminates this undefined state by toggling the output when $J=1, K=1$: Q_{next} = J \,\overline{Q} + \overline{K}\, Q {cc|cc} J & K & Q_{next} & Mode \\ \hline 0 & 0 & Q & Hold \\ 0 & 1 & 0 & Reset \\ 1 & 0 & 1 & Set \\ 1 & 1 & \overline{Q} & Toggle ### 2. Behavioral Verilog RTL Implementation ### 3. Verilog Testbench