09 Latches and Flip-Flops

【HDLBits刷题笔记】09 Latches and Flip-Flops

Dff

这一节终于开始时序电路了。首先是一个用的最多的D触发器。

module top_module (
    input clk,    // Clocks are used in sequential circuits
    input d,
    output reg q );//

    // Use a clocked always block
    //   copy d to q at every positive edge of clk
    //   Clocked always blocks should use non-blocking assignments
    always@(posedge clk)
    begin
       q <= d; 
    end

endmodule
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » 09 Latches and Flip-Flops