使用Verilog HDL实现50MHz分频为50Hz

来源:学生学帮网 编辑:学帮网 时间:2024/06/06 02:53:47

使用Verilog HDL实现50MHz分频为50Hz

module Frequency(nrst,clk_in,clk_out);
input wire nrst;
input wire clk_in;
output reg clk_out;
reg [18:0]r_cnt;

always @(posedge clk_in)
if(nrst) begin
if(r_cnt < 19'd499999)
r_cnt