题解 | #异步复位的串联T触发器#
异步复位的串联T触发器
https://www.nowcoder.com/practice/9c8cb743919d405b9dac28eadecddfb5
`timescale 1ns/1ns module Tff_2 ( input wire data, clk, rst, output reg q ); //*************code***********// reg t1_out; always @(posedge clk or negedge rst) begin t1_out <= ~rst? 0:(data? ~t1_out:t1_out); q <= ~rst? 0:(t1_out? ~q:q); end //*************code***********// endmodule