用Verilog来实现d触发器2分频的Verilog hdl程序

Posted ajiaoa

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用Verilog来实现d触发器2分频的Verilog hdl程序相关的知识,希望对你有一定的参考价值。

module divide_2(clk,rst,clk_out);

input clk,rst;
output clk_out;

reg clk_out;

always @(posedge clk or negedge rst)
 if(!rst)
  begin
   clk_out<=0;
  end
 else
  begin
   clk_out<=~clk_out;
  end

endmodule 

以上是关于用Verilog来实现d触发器2分频的Verilog hdl程序的主要内容,如果未能解决你的问题,请参考以下文章