使用Verilog HDL实现50MHz分频为50Hz要求完整程序

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/01 02:40:17

使用Verilog HDL实现50MHz分频为50Hz要求完整程序
使用Verilog HDL实现50MHz分频为50Hz
要求完整程序

使用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