FPGA 时序收敛:如何约束 2 个时钟之间的路径或如何强制保留路径?

发布于 2025-01-10 03:01:56 字数 1246 浏览 5 评论 0原文

在 Lattice Verilog FPGA 设计中,我有两个 PLL 生成的时钟,频率相同,均为 125MHz (8ns),但第二个时钟与第一个时钟相差 90°:

wire clk;
wire clk90; //clk90 is clk with phase at 90°
pllm pllm_inst(.CLKI(oscInternal), .CLKOP(clk), .CLKOS(clk90));

reg [63:0] wbuf;
always @(posedge clk) begin
    wbuf <= wbuf + 1;//Fake logic
end

wire [31:0] sdram_dq_tx;
ODDRXE ODDRXE00_inst(.D0(wbuf[0]), .D1(wbuf[16]), .SCLK(clk90), .RST(1'b0), .Q(sdram_dq_tx[0]));
...

该设计非常拥挤,所有时钟均出现以下 HOLD 错误wbuf:

Error: The following path exceeds requirements by 1.585ns
 
 Logical Details:  Cell type  Pin type       Cell/ASIC name  (clock net +/-)

   Source:         FF         Q              sdram_inst/wbuf[0]  (from clkop +)
   Destination:    FF         Data in        sdram_inst/ODDRXE00_inst  (to clkop2 +)

   Delay:               0.380ns  (34.5% logic, 65.5% route), 1 logic levels.

 Constraint Details:

      0.380ns physical path delay sdram_inst/SLICE_1029 to ddr_Dq[0]_MGIOL exceeds
     -0.011ns DO_HLD and
      0.000ns delay constraint less
     -1.976ns skew less
      0.000ns feedback compensation requirement (totaling 1.965ns) by 1.585ns

如何将两个时钟之间的路径限制为彼此 90°,以关闭我的设计时序?强制 wbuf 保持 2ns(8ns 的 90°)是否有意义?如何在时间限制下实现这一目标?

In a Lattice Verilog FPGA design, I have two PLL-generated clocks at the same frequency 125MHz (8ns) but the second clock is at 90° shift of the first clock:

wire clk;
wire clk90; //clk90 is clk with phase at 90°
pllm pllm_inst(.CLKI(oscInternal), .CLKOP(clk), .CLKOS(clk90));

reg [63:0] wbuf;
always @(posedge clk) begin
    wbuf <= wbuf + 1;//Fake logic
end

wire [31:0] sdram_dq_tx;
ODDRXE ODDRXE00_inst(.D0(wbuf[0]), .D1(wbuf[16]), .SCLK(clk90), .RST(1'b0), .Q(sdram_dq_tx[0]));
...

The design is very crowded and I get the following HOLD errors for all wbuf:

Error: The following path exceeds requirements by 1.585ns
 
 Logical Details:  Cell type  Pin type       Cell/ASIC name  (clock net +/-)

   Source:         FF         Q              sdram_inst/wbuf[0]  (from clkop +)
   Destination:    FF         Data in        sdram_inst/ODDRXE00_inst  (to clkop2 +)

   Delay:               0.380ns  (34.5% logic, 65.5% route), 1 logic levels.

 Constraint Details:

      0.380ns physical path delay sdram_inst/SLICE_1029 to ddr_Dq[0]_MGIOL exceeds
     -0.011ns DO_HLD and
      0.000ns delay constraint less
     -1.976ns skew less
      0.000ns feedback compensation requirement (totaling 1.965ns) by 1.585ns

How could I constraint this path between the two clocks at 90° of each other in order to close the timing of my design? Would it make sense to force on wbuf a hold of 2ns (90° of 8ns) and how can I achieve that with a timing constraint?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

擦肩而过的背影 2025-01-17 03:01:56

有些想法,虽然我不会声称它是答案,但作为答案发布比作为评论发布提供更好的结构;-)

两个上升沿之间只有 2 ns 可能太短,无法允许时序收敛,也是因为 wbuf Flip -Flops (FF) 位于主逻辑中,其中 DDR ODDRXE 位于 IO 边缘。

根据您在实际设计中可以执行的操作,有几种可能性:

  • 在 clk 下降沿重新捕获 wbuf 数据,这为直接触发器 (FF) 传输提供 4 ns,然后将重新捕获的值用于 clk90 ,从而获得 6 ns (270 deg)
  • 在 clk90 上重新捕获 FF 中的 wbuf 数据,然后再将重新捕获的值馈送到 clk90 处的 ODDRXE它只提供 2 ns 的重新捕获时间,重新捕获是在主逻辑中完成的,因此不在主逻辑和边缘 DDR 之间
  • 将时钟 clk90 更改为时钟 clk270,然后重新对齐 DDR ODDRXE 的数据以进行相应匹配,这将给出 6 ns 直到捕获 DDR 输入数据,DDR ODDRXE 的上升沿
  • 将 wbuf 逻辑移至 clk90,从而获得 clk 和 clk 之间的时钟域交叉clk90里面主要逻辑,同时使用wbuf直接为DDR ODDRXE

Some ideas, though I will not claim it as answers, but posting as answer gives better structure than posting as comment ;-)

Having only 2 ns between the two rising edges is probably to short to allow for timing closure, also since the wbuf Flip-Flops (FFs) are in main logic, where the DDR ODDRXE is at the edge for IO.

Depending on what you can do in the actual design, there are several possibilities:

  • Recapture the wbuf data on the falling edge of clk, which gives 4 ns for a direct Flip-Flop (FF) transfer, and then use the recaptured value for clk90, whereby you get 6 ns (270 deg)
  • Recapture the wbuf data in FFs on the clk90, before feeding the recaptured value to the ODDRXE at clk90, though it only gives 2 ns for recapture, the recapture is done in main logic, thus not between main logic and edge DDR
  • Change the clock clk90 to a clock clk270, and then realign the data for the DDR ODDRXE to match accordingly, which will give 6 ns for until capture of the DDR input data the the rising edge to the DDR ODDRXE
  • Move the wbuf logic to the clk90, thus getting the clock domain crossing between clk and clk90 inside the main logic, while using wbuf directly for the DDR ODDRXE
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文