如下,该
D触发器输入为clk,rst_n,set,d。输出为q
module d_flipflop (input clk , input rst_n , input set , input d , output reg q);
always @ (posedge clk or negedge rst_n or posedge set) begin
if (~rst_n) q <= 1'b0;
else if (set) q <= 1'b1;
else q <= d;
end
endmodule
追问使能端呢?
本回答被网友采纳