完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
在Spartan 3A-3400 DSP中没有正确合成的19位比较器,我遇到了合成问题。
当19位计数器等于19'd 24576时,我想要一个1位信号脉冲。但是在硬件中,当计数器等于19'd 57344时,脉冲会触发。 这在Isim的行为模拟中不会发生。 仅限实际硬件。 在二进制中,24576是100,000110000000000000和57344是0001110000000000000。 我尝试用几种不同的方式编写代码。 assign pulse =(counter == 19'd24576); 或同步方法 reg pulse = 1'b0; 永远@(posedge clk) 开始 if(counter == 19'd24576) pulse 以下为原文 I'm encountering a synthesis problem with a 19 bit comparator not being synthesized correctly in the Spartan 3A-3400 DSP. I want a 1 bit signal to pulse when a 19 bit counter is equal to 19'd 24576. However in hardware the pulse is firing when the counter is equal to 19'd 57344 instead. This does not occur in behavioral simulation in Isim. Only on the actual hardware. In binary, 24576 is 0000110000000000000 and 57344 is 0001110000000000000. I've tried writing the code a few different ways. assign pulse = (counter == 19'd24576); or a synchronous approach reg pulse = 1'b0; always @(posedge clk) begin if (counter == 19'd24576) pulse <= 1'b1; else pulse <= 1'b0; end Interestingly enough if I create a state machine and use 'less than' compare instead of equal compare (a state that waits while the counter < 24576, and then fires the pulse), it works fine. But this approach is not so practical because I need pulses at several multiples of 24576. I strongly prefer to figure out why the equal compare is behaving like this. Any ideas appreciated. Thanks. |
|
相关推荐
3个回答
|
|
G,
一种不合时宜的方法会出现故障(并失败)。 同步方法应该有效。 Austin Lesea主要工程师Xilinx San Jose 以上来自于谷歌翻译 以下为原文 g, An asynshronous approach will glitch (and fail). A synchronous approach should work. Austin Lesea Principal Engineer Xilinx San Jose |
|
|
|
谢谢。
ISE的版本是12.1。 我的时钟大约是120 MHz。 时间报告很好,没有报告时序故障。 错误的比较也不是随机的 - 在我提到的数字,57344而不是24576.同步和异步。 以上来自于谷歌翻译 以下为原文 Thanks. The version of ISE is 12.1. My clock is about 120 MHz. The timing report is fine, there are no timing failures reported. The false comparison is also not random -its at the number I mentioned, 57344 instead of 24576. Both the synchronous and asynchronous. |
|
|
|
24576 = 0x600057344 = 0xE00057344-24576 = 32768 = 2 ^ 15在RTL代码中某处有隐含的截断吗?
------------------------------------------“如果它不起作用 模拟,它不会在板上工作。“ 以上来自于谷歌翻译 以下为原文 24576 = 0x6000 57344 = 0xE000 57344-24576 = 32768 = 2^15 Is there an implied truncation somewhere in the RTL code? ------------------------------------------ "If it don't work in simulation, it won't work on the board." |
|
|
|
只有小组成员才能发言,加入小组>>
2162 浏览 7 评论
2605 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2077 浏览 9 评论
3149 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2192 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
416浏览 1评论
1517浏览 1评论
在使用xc5vsx95T时JTAG扫片不成功,测量TDO无信号输出
2175浏览 0评论
507浏览 0评论
1633浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-23 18:58 , Processed in 0.995295 second(s), Total 78, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号