时钟奇偶分频
发布时间
阅读量:
阅读量
偶数倍频分
// 偶数N分频
// 计数器位宽 X
module div(
input clk,
input rst_n,
output out_clk);
reg out_clk;
reg [X:0] cnt;
always @(posedge clk or negedge rst_n)
if(!rst_n) begin
cnt <= 0; out_clk <= 0;
else if(cnt == N/2 - 1) begin
cnt <= 0; out_clk <= ~out_clk;
end
else begin
cnt <= cnt + 1'b1; out_clk <= out_clk;
end
endmodule
非对称占空比的分频技术
// 奇数N分频
/
全部评论 (0)
还没有任何评论哟~
