完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我是FPGA新手,现在正在使用XC6SLX9TQG144 -2。 我使用时钟向导通过PLL_BASE生成500MHz时钟供内部使用。 当我使用500MHz时钟作为二进制计数器的时钟输入(也由核心生成器生成)和某些控制逻辑的时钟边沿触发时,它不起作用。 但是,如果我尝试使用较慢的250MHz时钟作为计数器电路的时钟输入,那么它的工作正常。 我很遗憾为什么FPGP可以产生500MHz的时钟而不能用于逻辑时钟输入,有没有什么方法可以使用500MHz时钟供内部使用? 谢谢! 以上来自于谷歌翻译 以下为原文 Hi, I am new to FPGA and I am using XC6SLX9 TQG144 -2 now. I use the clocking wizard to generate a 500MHz clock by PLL_BASE for internal use. When I use the 500MHz clock to be the clock input of the Binary Counter (also generated by Core Generator) and the clock edge trigger for some control logic, it's doesn't work. However, if I try to use a slower 250MHz clock to be the clock input for my counter circuit and it's work properly. I am curious that why the FPGP can generate 500MHz clock but can't use it for logic clock input, is there any method can use 500MHz clock for internal use? Thank you! |
|
相关推荐
4个回答
|
|
你做过模拟吗?
你能提供一段代码吗? 如何监控计数器输出。 谢谢和RegardsBalkrishan ----------------------------------------------- ---------------------------------------------请将帖子标记为 一个答案“接受为解决方案”,以防它有助于解决您的查询。如果一个帖子引导到解决方案,请给予赞誉。 以上来自于谷歌翻译 以下为原文 have you done simulation. Can you please provide piece of code . How you monitor counter output. Thanks and Regards Balkrishan -------------------------------------------------------------------------------------------- Please mark the post as an answer "Accept as solution" in case it helped resolve your query. Give kudos in case a post in case it guided to the solution. |
|
|
|
这是用于生成500MHz时钟的代码。
模块Clk_generator( 输入Clk_I10M, 输入Clk_Reset, 输出Clk_O50M, 输出Clk_Locked_50M, 输出Clk_O500M, 输出Clk_Locked_500M ); //时钟倍数从10MHz到50MHz开始//////////////////// clk_wiz_I10M_O50M Uclk_wiz_I10M_O50M (//端口时钟 .CLK_IN1(Clk_I10M),// IN //输出端口 .CLK_OUT1(Clk_O50M),// OUT //状态和控制信号 .RESET(Clk_Reset),// IN .LOCKED(Clk_Locked_50M)); // OUT //时钟倍数从10MHz到50MHz结束//////////////////// //从50MHz到500MHz的时钟倍数启动///////////////// 电线ClkFb_500M; clk_wiz_I50M_O500M Uclk_wiz_I50M_O500M (//端口时钟 .CLK_IN1(Clk_O50M),// IN .CLKFB_IN(ClkFb_500M),// IN //输出端口 .CLK_OUT1(Clk_O500M),// OUT .CLKFB_OUT(ClkFb_500M),// OUT //状态和控制信号 .RESET(Clk_Reset),// IN .LOCKED(Clk_Locked_500M)); // OUT //时钟倍数从50MHz到500MHz结束///////////////// endmodule 然后我将500MHz时钟连接到以下模块。 我使用500MHz时钟来计算“Clk_O1Hz”和“GPS_1pps”之间的相位差,为不同的条件生成计数器启动,停止和重载的控制信号,我使用serverl寄存器作为布尔值。 为了在重新加载后保持计数器输出,我使用DFF来存储计数器值。 模块Phase_comparator(Clk_O1Hz,GPS_1pps,Clk_I500M,Clk_rst,Comp_out,Comp_Finish); 输入Clk_O1Hz; 输入GPS_1pps; 输入Clk_I500M; 输入Clk_rst; 输出[31:0] Comp_out; 输出Comp_Finish; reg Comp_Start; reg more180; reg完成; reg SCLR; 总是@(posedge Clk_I500M或posedge Clk_rst) 开始 if(Clk_rst) 开始 Comp_Start 我做了模拟,如果我将时钟从500MHz调到240MHz,电路就能正常工作。 仿真结果表明,如果时钟太快(例如500MHz),计数器输出变为“X” 我试图将控制信号替换为.ce(1)和.sclr(0)以使计数器自由运行,它可以承受的最大时钟约为350MHz。 但是,如果我使用我编写的控制逻辑,如果时钟快于240MHz,则“Comp_Start”和“SCLR”将输出“X”,然后计数器也将输出错误。 以上来自于谷歌翻译 以下为原文 Here is the code that for generate 500MHz clock. module Clk_generator( input Clk_I10M, input Clk_Reset, output Clk_O50M, output Clk_Locked_50M, output Clk_O500M, output Clk_Locked_500M );// Clock multiple from 10MHz to 50MHz Start ////////////////////clk_wiz_I10M_O50M Uclk_wiz_I10M_O50M (// Clock in ports .CLK_IN1 (Clk_I10M), // IN // Clock out ports .CLK_OUT1 (Clk_O50M), // OUT // Status and control signals .RESET (Clk_Reset), // IN .LOCKED (Clk_Locked_50M)); // OUT // Clock multiple from 10MHz to 50MHz End ////////////////////// Clock multiple from 50MHz to 500MHz Start /////////////////wire ClkFb_500M;clk_wiz_I50M_O500M Uclk_wiz_I50M_O500M (// Clock in ports .CLK_IN1 (Clk_O50M), // IN .CLKFB_IN (ClkFb_500M), // IN // Clock out ports .CLK_OUT1 (Clk_O500M), // OUT .CLKFB_OUT (ClkFb_500M), // OUT // Status and control signals .RESET (Clk_Reset), // IN .LOCKED (Clk_Locked_500M)); // OUT// Clock multiple from 50MHz to 500MHz End /////////////////endmodule Then I connect the 500MHz clock to the following module. I use the 500MHz clock to counting the phase difference between "Clk_O1Hz" and "GPS_1pps", to generate the control signal for the counter start, stop and reload for different condition, I used serverl register to be the boolean. To keep the counter output after reload, I use a DFF to store the counter value. module Phase_comparator(Clk_O1Hz, GPS_1pps, Clk_I500M, Clk_rst, Comp_out, Comp_Finish);input Clk_O1Hz;input GPS_1pps;input Clk_I500M;input Clk_rst;output [31:0] Comp_out;output Comp_Finish;reg Comp_Start;reg more180;reg Finished;reg SCLR;always@(posedge Clk_I500M or posedge Clk_rst)beginif (Clk_rst)beginComp_Start <= 0;more180 <= 0;Finished <= 0;SCLR <= 1;endelsebegin//Phase difference less than 180 degree, start counterif((GPS_1pps==1) && (Clk_O1Hz==0) && (Comp_Start==0) && (more180==0) && (Finished==0))beginComp_Start <= 1;more180 <= 0;Finished <= 0;SCLR <= 0;end//Phase difference less than 180 degree, stop counterelse if((GPS_1pps==1) && (Clk_O1Hz==1) && (Comp_Start==1) && (more180==0) && (Finished==0))beginComp_Start <= 0;more180 <= 0;Finished <= 1;end//Phase difference less than 180 degree, reload counterelse if((GPS_1pps==0) && (Clk_O1Hz==0) && (Comp_Start==0) && (more180==0) && (Finished==1))beginComp_Start <= 0;more180 <= 0;Finished <= 0;SCLR <= 1;end//Phase difference more than 180 degree, start counterelse if ((GPS_1pps==1) && (Clk_O1Hz==1) && (Comp_Start==0) && (more180==0) && (Finished==0))beginComp_Start <= 1;more180 <= 1;Finished <= 0;SCLR <= 0;end//Phase difference more than 180 degree, stop counterelse if ((GPS_1pps==0) && (Clk_O1Hz==1) && (Comp_Start==1) && (more180==1) && (Finished==0))beginComp_Start <= 0;more180 <= 1;Finished <= 1;end//Phase difference more than 180 degree, reload counterelse if ((GPS_1pps==0) && (Clk_O1Hz==1) && (Comp_Start==0) && (more180==1) && (Finished==1))beginComp_Start <= 0;more180 <= 0;Finished <= 0;SCLR <= 1;endendendassign Comp_Finish = !Comp_Start;wire [31:0] Comp_counter;Phase_Counter UPhase_Counter (.clk(Clk_I500M),.ce(Comp_Start),.sclr(SCLR),.q(Comp_counter)); // Bus [31 : 0] dff_32_async_reset Udff_32_async_reset (.data(Comp_counter),// Data Input.clk(Comp_Start),// Clock Input, negedge trigger.reset(Clk_rst),// Reset input .q(Comp_out));// Q outputendmodule I have done simulation, the circuit work properly if I tune down the clock from 500MHz to 240MHz. The simulation result show that the counter output become "X" if the clock is too fast (e.g. 500MHz) I have tried to replace the control signal to .ce(1) and .sclr(0) to let the counter free running, the max clock it can suffer is around 350MHz. However, if I use the control logic that I have written, the "Comp_Start" and "SCLR" will output "X" if the clock is faster than 240MHz and then counter will also output wrong. |
|
|
|
你如何将500 Mhz时钟从PLL驱动到计数器?
你需要使用BUFPLL。 --Krishna 以上来自于谷歌翻译 以下为原文 How are you driving the 500 Mhz clock from PLL to the counter? You will need to use BUFPLL. --Krishna |
|
|
|
首先,我只有10MHz fpga时钟输入,我尝试使用10MHz时钟产生50MHz时钟,然后使用50MHz时钟产生500MHz时钟。
我不知道我需要自己添加BUFPLL,所以只需将PLL_BASE的时钟输出连接到计数器时钟输入,看完你的回复后,我尝试添加BUFPLL 我已经阅读了UG382 Spartan-6 FPGA时钟资源,但对PLL_BASE和BUFPLL之间的连接有一些疑问,它表明CLKOUT0应连接到PLLIN,CLKOUT1应连接到BUFG,然后连接到BUFLL的GCLK(例如,图1,图1- 16)。 我想问一下CLKOUT0和CLKOUT1的设置是什么? 是否都设置为500MHz输出? 谢谢! 以上来自于谷歌翻译 以下为原文 First, I just have a 10MHz fpga clock input, I try to use the 10MHz clock to generate a 50MHz clock, then use the 50MHz clock to generate a 500MHz clock. I don't know I need to add BUFPLL by myself before so just connect the clock output of PLL_BASE to the counter clock input, after read your reply, I try to add the BUFPLL I have read the UG382 Spartan-6 FPGA Clocking Resource but have some question about the connection between PLL_BASE and BUFPLL, it show that CLKOUT0 should connect to PLLIN and CLKOUT1 should connect to BUFG and then GCLK of BUFLL (e.g. Page 33, Figure 1-16). I want to ask what is the setting of CLKOUT0 and CLKOUT1? Is that both set to be 500MHz output? Thank you! |
|
|
|
只有小组成员才能发言,加入小组>>
2380 浏览 7 评论
2797 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2262 浏览 9 评论
3335 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2428 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
755浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
543浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
365浏览 1评论
1961浏览 0评论
681浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 14:34 , Processed in 1.456701 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号