赛灵思
直播中

尹姗姗

7年用户 189经验值
私信 关注
[问答]

如何避免冻结DCM?

大家好,
我有一个用Spartan 3E控制HV脉冲的设备。
使用赛普拉斯的GPIF协议寻址多达512个寄存器和外部SRAM,与外部PC和存储器进行通信
时钟系统基于两个不同的外部时钟:48MHz控制GPIF通信和50MHz。我还使用DCM(由48MHz时钟驱动)创建270度移位时钟,以获得正确的信号读/写成一些静态
SRAM和另一个DCM创建一个20MHz时钟(从50MHz时钟)来控制脉冲的产生。
问题是,有时由于HV产生的噪声,我不再能够读取寄存器,并且我读取所有寄存器地址的相同值。
即便在这一刻,20MHz时钟仍能正常工作。
我想这个问题是由于48MHz DCM冻结,因为重置FPGA一切都恢复正常。
这有可能吗?
如果是,请问您是否有任何关于如何避免冻结DCM或如何自动重置的建议?
如果没有,你对如何解释这种行为有任何想法吗?
外部时钟始终有效。
非常感谢
克劳迪奥

以上来自于谷歌翻译


以下为原文

Hi all,
I have a device controlling HV pulses with a Spartan 3E. The communication with an external PC and memories is done using the GPIF protocol from Cypress addressing up to 512 registers and an external SRAM. The clock system is based on two different external clocks: a 48MHz controlling the GPIF communication and a 50MHz. I also use a DCM (driven by the 48MHz clock) to create a 270 degree shifted clock to obtain correct signals to read/ write into some static SRAM and another DCM to create a 20MHz clock (from the 50MHz clock) to control the pulse generation.

The problem is that sometimes due to the noise generated by the HV I'm no longer able to read the registers and I read always the same value for all the register addresses. Even in this moment the 20MHz clock continues to work properly.

I guess this issue is due to the freeze of the 48MHz DCM because resetting the fpga everything is resumed and works properly.
Is it possible this?
If yes, please, do you have any suggestion about how to avoid a freeze of the DCM or how to reset it automatically?
If not, do you have any idea about how to explain this behavior? The external clock is always working.

Thanks a lot
Claudio

回帖(9)

杨玲

2019-7-19 13:02:56
你不需要BUFGMUX,只需要一个IBUFG。
问题是,如果你没有在时钟爆发到多个BUFG / DCM组件之前自己实例化,那么工具将会出错,因为它们最终会推断出多个输入缓冲区。
如果您想使用时钟向导,您有两种选择:
1)在其中一个时钟向导模块中,使用“单端”作为时钟输入,并将IBUFG的输出带到该模块的输出端口。
然后其他BUFG或DCM将使用来自输入缓冲区的时钟而无需进一步缓冲(即,如果您有另一个时钟向导模块,则需要使用“内部”作为时钟输入,因此它不会添加另一个IBUFG)。
2)将所有时钟向导模块设置为使用“internal”作为时钟源,然后在代码的顶层实例化IBUFG。
使用IBUFG的输出来驱动复位发生器的BUFG以及使用相同时钟输入工作的任何DCM。
您不能做的是直接从输入引脚网络扇出,因为工具将推断出多个输入缓冲区。
-  Gabor
在原帖中查看解决方案

以上来自于谷歌翻译


以下为原文

You don't need a BUFGMUX, just an IBUFG.  The problem is that if you don't instantiate it yourself before the point where the clock breaks out into multiple BUFG / DCM components, then the tools will error out because they ill end up inferring more than one input buffer.
 
If you want to use the clocking wizard you have two choices:
 
1) in one of your clock wizard modules, use "Single-ended" as the clock input, and bring the output of the IBUFG to an output port of that module.  Then other BUFG or DCMs would use that clock from the input buffer without further buffering (i.e. if you have another clocking wizard module it would need to use "Internal" as the clock input so it doesn't add another IBUFG).
 
2) Set all clocking wizard modules to use "internal" as the clock source, then instantiate the IBUFG at the top level of your code.  Use the output of the IBUFG to drive the BUFG for the reset generator as well as any DCMs that work from the same clock input.
 
What you can't do is have fan-out directly from the input pin net because the tools will infer multiple input buffers.
-- GaborView solution in original post
举报

杨玲

2019-7-19 13:10:09
在导致其失锁的时钟事件后,DCM不会自动重新获得锁定。
它需要重置。
我通常会添加一个重置控制器来执行此操作。
复位控制器必须运行的时钟不是它正在复位的DCM的输出。
在您的情况下,它可能是来自引脚的输入时钟通过额外的BUFG,或者您可以使用50 MHz系统的现有时钟。
其余控制器的想法是,当DCM锁定且DCM状态显示输入时钟正常运行时,您有一个计数器保持在复位状态。
否则它会计数。
允许终端计数回绕到零(这很重要)。
然后,当计数器大于某个值(通常接近终端计数)时,DCM的复位被置位。
计数器应足够大,以便在最坏情况锁定时间的数据表时间结束后才能重置DCM。
如果锁定时间太长,这会阻止它不断重置DCM。
显然,DCM的输出将无法使用,并且您可能还需要重置DCM下游的其他电路。
但是,如果您的系统能够容忍,那么它仍然比重新加载比特流更好。
-  Gabor

以上来自于谷歌翻译


以下为原文

The DCM will not automatically re-gain lock after a clock event that causes it to lose lock.  It needs to be reset.  I normally add a reset controller to do this.  The reset controller must run on a clock that is not the output of the DCM it is resetting.  In your case it could be the input clock from the pin via an additional BUFG, or you could use an existing clock from the 50 MHz system.
 
The idea of the rest controller is that you have a counter which is held in reset when the DCM is locked and the DCM status shows that the input clock is running normally.  Otherwise it counts up.  At terminal count is allowed to wrap back to zero (this is important).  Then the reset of the DCM is asserted when the counter is greater than some value, usually near the terminal count.  The counter should be large enough that it doesn't reset the DCM until after the data sheet time for worst case lock time has elapsed.  That prevents it from constantly resetting the DCM if it takes too long to lock.
 
Obviously there will be some time period when that DCM's output is unusable, and you may also need to reset other circuitry downstream of the DCM.  However if your system can tolerate that, it's still better than re-loading the bitstream.
-- Gabor
举报

王梅

2019-7-19 13:26:16
你好Gabor,
谢谢你的回答。
所以不建议使用dcm的clock0输出来做你建议的。
如果我很好理解,即使该线在锁定时停止也会停止。
这是对的吗?
我试图限制fpga电路的复位,避免丢失系统状态并自动恢复
我想只重置通信寄存器
克劳迪奥

以上来自于谷歌翻译


以下为原文

Hello Gabor,
thank you for your anwer.
So it is not recommended to use the clock0 output of the dcm to do what you suggested. If I well understand, even that line is stopped when lock is down. Is it correct?
 
My though is to try to limit the reset of the fpga circuitry avoiding to lose the status of the system and recover it automatically
I would like to reset only the communication registers
 
Claudio
举报

杨玲

2019-7-19 13:42:46
锁定时,CLK0输出可能会发生转换,但复位输入有效时不会发生转换。
因此,如果将CLK0用于向DCM生成复位信号的状态逻辑,则一旦复位信号被置位,它就会被卡住。
另请注意,当锁定置为无效时,任何DCM输出的时序都可能超出约束条件(较短的脉冲宽度或较高的频率)。
-  Gabor

以上来自于谷歌翻译


以下为原文

There can be transitions on the CLK0 output when lock is down, but not while the reset input is active.  So if you use CLK0 for the state logic that generates the reset signal to the DCM it will get stuck as soon as the reset signal is asserted.  Also note that any DCM outputs may have timing that is outside of your constraints (shorter pulse width or higher frequency) while lock is deasserted.
-- Gabor
举报

更多回帖

发帖
×
20
完善资料,
赚取积分