已知时钟信号clkin的频率为50MHz的方波信号,下面程序中clkout的频率为( )。module function(rst, clkin, clkout);input clkin, rst;output clkout;reg clkout;reg[2:0] cnt;always @(posedge clkin or negedge rst)begin if(!rst) begin cnt<=3'd0; clkout<=1'b0; end else if (cnt>=3'd4) begin cnt<=3'd0; clkout<=~clkout; end else cnt<=cnt+1'b1;endendmodule
选项:
A:2.5MHz;
B:20MHz;
C:5MHz;
D:10MHz
发布时间:2024-04-21 20:48:53