Skip to content

T-FF

Edge-triggered toggle flip-flop. On each active clock edge, the output q toggles when t=1 and holds when t=0. Optional synchronous active-high reset.

Category: Digital Logic / Sequential

Keywords: TFF, flip-flop, flipflop, FF, toggle, register, sequential, edge-triggered

Ports

NameDirectionValue typeNotes
tinputint
clkinputint
rstinputintVisible when has_rst == 1
qoutputint

Parameters

NameLabelTypeDefaultUnitsDescription
q0q₀int0Initial value of the stored state q at sim_time = 0.
has_rstReset portenum (disabled / enabled)0When enabled, exposes a synchronous active-high reset port. On a clock rising edge, if rst != 0 then q := 0 (per-bit clear).

Implemented in C++ class SimCompCtlTff (components/control/CSim_comp_ctl_tff/sim_comp_ctl_tff.h).

Released under the MIT License.