完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好
我的设计采用Xilinx Spartan 3E 1600芯片。 它有一个计数器和一个寄存器,可以偶尔对计数器的值进行采样。 整个系统以37.5Mhz的速率运行。 但是当我们读取寄存器时,它会在几秒到一分钟内出现一点误差。 例如,我们希望寄存器读取6,7,8,9等。它将读取6,7,6,8,9。或者当我们期望A,B,C,D,E时,它将读取A, B,F,C,D,E。有问题的位从内置更改为内置。 我们将时钟限制在37.5Mhz,并且地点和路线没有时间问题。 代码如下所示: 总是@(posedge clk或negedge resetL)开始if(~resetL) capturedPosition 以下为原文 Hi All I have a design in a Xilinx Spartan 3E 1600 chip. And it has a counter that keeps counting and a register that samples the value of the counter once in a while. The entire system runs at 37.5Mhz rate. But when we read the register it will have a bit error once in a few seconds to a minute. For example, we expect the register to read 6, 7, 8, 9 etc. It will read 6, 7, 6, 8, 9. Or when we expect A, B, C, D, E, it will read A, B, F, C, D, E. The bit that has problem changes from built to built. We have constrained the clock to 37.5Mhz and there is no timing issues from the place and route. The code looks like the following: always @ (posedge clk or negedge resetL) begin if ( ~resetL ) capturedPosition <= 16'h0000; else if (convstFlag == 1'b1) capturedPosition <= counter; else capturedPosition <= capturedPosition; end always @ (posedge clk or negedge resetL) begin if (~resetL) counter <= 16'h0000; else begin case (nxtEncoderState) STATE0 : case (encoder) 2'b01 : counter <= counter + 1'b1; 2'b10 : counter <= counter - 1'b1; default : counter <= counter; endcase STATE1 : case (encoder) 2'b11 : counter <= counter + 1'b1; 2'b00 : counter <= counter - 1'b1; default : counter <= counter; endcase STATE2 : case (encoder) 2'b00 : counter <= counter + 1'b1; 2'b11 : counter <= counter - 1'b1; default : counter <= counter; endcase STATE3 : case (encoder) 2'b10 : counter <= counter + 1'b1; 2'b01 : counter <= counter - 1'b1; default : counter <= counter; endcase default : counter <= counter; endcase end end If anyone has any ideas please drop me a hint. Thanks very much for your time. |
|
相关推荐
5个回答
|
|
您没有显示如何生成信号convstFlag和nEcodeState - 它们是否真正同步
与主clk? 约翰普罗塞纳 以上来自于谷歌翻译 以下为原文 You don't show how the signals convstFlag and nEcodeState are generated - are they truly synchronous with the main clk? John Providenza |
|
|
|
你用什么来看看capturePosition寄存器的值?
你用Chipscope吗? 干杯, 吉姆 干杯,吉姆 以上来自于谷歌翻译 以下为原文 What do you use to look at the value of capturedPosition register? Do you use Chipscope? Cheers, Jim Cheers, Jim |
|
|
|
extEcodeState作为37.5Mhz时钟的状态机生成,因此这是一个真正的时钟进程。
convstFlag作为寄存器从75Mhz时钟生成。 75Mhz时钟是将输入37.5Mhz时钟传递到xilinx DCM模块并使用clock2x输出的结果。 DCM获得2x反馈,即75Mhz时钟。 因此,除非DCM出现问题,否则我说所有信号都是由与输入37.5Mhz同步的时钟计时的寄存器输出。 萌 以上来自于谷歌翻译 以下为原文 The extEcodeState is generated as a state machine off of the 37.5Mhz clock, so that's a true clocked process. The convstFlag is generated as a register, from a 75Mhz clock. The 75Mhz clock is a result of passing the input 37.5Mhz clock into a xilinx DCM block and using the clock2x output. The DCM gets a 2x feedback that is the 75Mhz clock as well. So unless the DCM has got a problem, I say all the signals are output of registers clocked by clocks synchronous to the input 37.5Mhz. Meng |
|
|
|
不,我们使用外部处理器来读取FPGA的寄存器。
以上来自于谷歌翻译 以下为原文 No we use an extrenal processor to read the registers of the FPGA. |
|
|
|
您可能需要检查DCM连接。
我似乎记得Xilinx停止向人们暗示 使用2x时钟作为反馈。 我不记得它影响了哪个家庭,但你可能会检查。 如果是DCM 由于那样行为不端,你可能会遇到奇怪的时间问题。 约翰普罗塞纳 以上来自于谷歌翻译 以下为原文 You might want to check your DCM connections. I seem to recall Xilinx stopped suggesting that people use the 2x clock as a feedback. I don't recall which family it affected, but you might check. If the DCM is mi***ehaving because of that, you could have odd timing problems. John Providenza |
|
|
|
只有小组成员才能发言,加入小组>>
2442 浏览 7 评论
2835 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2306 浏览 9 评论
3388 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2483 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
1724浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
619浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
483浏览 1评论
2035浏览 0评论
760浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-11 07:16 , Processed in 1.457341 second(s), Total 85, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号