用Verilog语言实现奇数倍分频电路3分频、5分频、7分频
时间:02-11
来源:网络整理
点击:
always @(q1 or q2)
d=q1&q2 ;
always @(posedge d)
throut=~throut;
endmodule
用Verilog语言写五分频电路,占空比为50%:module div_5 ( clkin,rst,clkout );
input clkin,rst;
output clkout;
reg [2:0] step1, step2;
always @(posedge clkin )
if(!rst)
step1<=3'b000;
else
begin
case (step1)
3'b000: step1<=3'b001;
3'b001: step1<=3'b011;
3'b011: step1<=3'b100;
3'b100: step1<=3'b010;
3'b010: step1<=3'b000;
default:step1<=3'b000;
endcase
end
always @(negedge clkin )
if(!rst)
step2<=3'b000;
else
begincase (step2)
3'b000: step2<=3'b001;
3'b001: step2<=3'b011;
3'b011: step2<=3'b100;
3'b100: step2<=3'b010;
3'b010: step2<=3'b000;
default:step2<=3'b000;
endcase
end
assign clkout=step1[0]|step2[0];
- Xilinx Kintex UltraScale 一半尺寸的 PCI Express 平台 (HTG-K816)(06-15)
- Xilinx全新参考设计提供业界首个单芯片400G解决方案(02-12)
- Xilinx用于工业自动化的机器视觉解决方案(11-30)
- Xilinx多协议机器视觉摄像机参考设计(12-01)
- 机器视觉技术原理解析及解决方案集锦(02-06)
- 机器视觉在汽车电子方向的应用解决方案(02-13)