分频的程序
module baud(rst,clk50,clkb);input rst,clk50;
output clkb;
reg cnt;
always @(posedge clk50)
if(rst)begin
cnt<=12'd0;
clkb<=1'b0;
end
else if(cnt==12'd2604)begin
clkb<=!clkb;
cnt<=12'd0;
end
else cnt<=cnt+1'b1;
endmodule 偶数分频好大的分频那
偶数分频
页:
[1]