BLK_ToggleFF : A toggle flip-flop (T-FF)
A toggle flip-flop (T-FF) inverts its current output out whenever the input clock in rises.
This T-FF model is described with two gate primitives, dff_xbit and inv_xbit primitives. The parameter delay_cq sets the input-to-output delay (i.e. the clk-to-q delay) of the T-FF and the parameter init_value sets the initial value of the T-FF’s output.
Input/Output Terminals
| Name | I/O | Type | Description |
| out | output | xbit | output |
| in | input | xbit | input |
Parameters
| Name | Type | Default | Description |
| delay_cq | real | 50p | clk-to-q delay |
| init_value | bit | 0 | initial output value |
List of Testbenches
| tb_check : A testbench for checking the basic operation of a toggle flip-flop |
tb_check : A testbench for checking the basic operation of a toggle flip-flop
This testbench checks the basic fucntionality of a toggle flip-flop (T-FF) by feeding a periodic clock input and observing the output. The T-FF is expected to produce a periodic clock output with half the input frequency, which transitions at each rising edge of the input clock.
Simulation Results
Figure. the basic operation of a toggle flip-flop.