用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 

posted @ 2020-06-03 14:41  Connor_Jiao  阅读(1736)  评论(0编辑  收藏  举报