Design a positive-edge–triggered T flip-flop with active-high asynchronous reset and preset. Reset dominates preset; preset forces Q=1 only when reset is inactive.
t_ff_async_prCLKRSTPRETQRST=1 → Q=0 immediately.PRE=1 → Q=1 immediately.posedge CLK:T=1 → Q=~QT=0 → holdalways @() with nonblocking assignments (<=).RST > PRE > toggle/hold.From Q=0:
PRE↑ (with RST=0) → Q=1RST↑ → Q=0 (reset dominates)RST=0, PRE=0, T=1 at edge → Q=1 (toggle)T=0 at edge → Q=1 (hold)