1.D触发器:
module D_flip_flop(
input [1:0] d,
input clk,
output reg[1:0] q,
output reg[1:0] qb
);
always @(posedge clk) //时钟上升沿触发D触发器
begin
q<= d ;
qb<= ~d ;
end
这篇博客介绍了如何使用Verilog语言来描述四种基本的触发器:D触发器、RS触发器、JK触发器和T触发器。详细展示了每个触发器的模块结构和逻辑实现,包括时钟边沿触发、状态更新以及各种输入条件下的输出行为。
module D_flip_flop(
input [1:0] d,
input clk,
output reg[1:0] q,
output reg[1:0] qb
);
always @(posedge clk) //时钟上升沿触发D触发器
begin
q<= d ;
qb<= ~d ;
end
5447
2400

被折叠的 条评论
为什么被折叠?