赛灵思
直播中

车进

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

如果时钟边沿和输出不对齐会发生什么?

总是@(posedge clk或posedge reset)如果(重置)开始sout结束,则开始sout结束
上面显示的是我的代码的简化版本。
输出数据应该与clk的正边缘对齐,但事实并非如此。
我该怎么做才能使它们对齐或使偏移量在一定值内?
我可以在约束文件中做些什么来实现这一目标吗?
谢谢

以上来自于谷歌翻译


以下为原文

always @(posedge clk or posedge reset) begin
       if (reset) begin
            sout <= 1;
       end
      else begin
           sout <= tx_data_out;
      end
end

Shown above is the a simplified version of my code. The output data should align with the positive edge of clk but it's not. What should I do to make them align or to make offset to be within certain value? Is there something I can do in the constraint file to make this happen?

Thanks

         

回帖(2)

胡丹丹

2019-3-22 07:10:07
你是如何确定两个信号没有对齐的?
您必须意识到输出触发器和到达器件引脚的实际信号存在一定的传输延迟。
有几种方法:
1.你可以将输出触发器限制在器件引脚的IOB中(我猜你有一个LOC约束)。
这提供了来自输出FF和器件引脚的最小路由延迟量。
2.您可以使用OFFSET = OUT约束约束输出网络。
您应该阅读Timing Closure指南以获取详细信息。
为什么这对你来说是一个问题?
时钟是否与数据一起传输?
如果是这样,则上述OFFSET约束可以与转发时钟的引用一起使用。
然后,这些工具将满足您指定的与所需时钟(而不是FPGA系统时钟)相关的输出时序。
----------“我们必须学会做的事情,我们从实践中学习。”
- 亚里士多德

以上来自于谷歌翻译


以下为原文

How are you determining that the two signals are not aligned?
 
You must be aware that there is a certain amount of transmission delay from the output flipflop and the actual signal arriving at the device pin.
 
There are a couple of approaches:
 
1. You can constrain the output flipflop to be in the IOB of the device pin (for which you have a LOC constraint, I suppose). This provides the smallest amount of routing delay from the output FF and the device pin.
2. You can constrain the output net with the OFFSET = OUT constraint. You should read the Timing Closure guide for detailed information.
 
Why is this an issue for you? Is the clock to be transmitted with the data? If so, the above OFFSET constraint can be used with a reference to the forwarded clock. The tools will then work to meet the output timing you specify in relation to the required clock (rather than the FPGA system clock).
 
----------
"That which we must learn to do, we learn by doing." - Aristotle
举报

张晶晶

2019-3-22 07:22:06
你好,只是小修正。
您可以使用IOB属性,以便工具自动将所有输出FF分配给IO站点以获得更好的性能。谢谢,Yash

以上来自于谷歌翻译


以下为原文

Hello,

Just small correction. You can use IOB attribute so that tool will automatically assign all output FF to the IO sites for better performance.

Thanks,
Yash
举报

更多回帖

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