约束中心对齐源同步输出

author-image

作者

在源同步输出接口中,FPGA 为目标设备提供源时钟。在中心对齐源同步接口中,时钟转换在数据有效窗口的中间进行。图 1 显示了源同步输出接口示例。

图 1. 源同步输出接口。

按照以下步骤约束中心对齐源同步输出接口:

  1. 创建基础时钟和生成时钟
  2. 添加输出延迟约束
  3. 添加伪路径异常,从时序分析和报告中排除无效路径

有关以下任何步骤或计算和约束的更多详细信息,请参阅“AN 433:约束和分析源同步接口”(PDF)

时钟

FPGA 的输入端口需要一个基础时钟。
所有锁相环 (PLL) 输出都需要生成时钟。双倍数据速率中心对齐源同步输出的输出时钟与数据时钟相比偏移了 90 度。
FPGA 的输出时钟端口需要生成时钟。生成时钟是数据总线输出延迟值的时钟参考。

输出延迟约束

可以使用最大偏移规格来计算输出延迟值。最大偏移规格表示数据总线的各个位离开 FPGA 所允许的时间变化。

输出最大延迟的值 =(单元间隔/2)- 最大偏移值

输出最小延迟的值 =最大偏移值 -(1.5 * 单元间隔)。

伪路径异常

在此中心对齐示例中,数据是在源时钟和目标时钟的上升沿向上升沿转换时以及下降沿向下降沿转换时传输的。由于无法在时钟反沿转换时传输数据,请使用伪路径异常来减少时钟上升沿至下降沿以及下降沿至上升沿的转换。

SDC 文件示例


# Create a base clock on the input port of the FPGA, with a 10 ns period
create_clock -name input_clock -period 10 [get_ports clk_in]

# Create generated clocks on the PLL outputs
# Output clk[0] drives the data register
# Output clk[1] drives the output clock port with a 90 degree shift
create_generated_clock -name data_clock -source [get_pins pll|inclk[0]] \
[get_pins pll|clk[0]]
create_generated_clock -name clock_clock -phase 90 -source [get_pins pll|inclk[0] \
[get_pins pll|clk[1]]

# Create the generated clock on the output clock port of the FPGA
create_generated_clock -name output_clock -source [get_pins pll|clk[1]] \
[get_ports clk_out]

# Add maximum and minimum output delay constraints
# assuming a skew requirement of +/- 250ps
# Use the equations for the output delay values listed above
set_output_delay -max -clock output_clock [expr { (5 / 2) - 0.250 }] \
[get_ports data_out*]
set_output_delay -max -clock output_clock -clock_fall \
[expr { (5 / 2) - 0.250 }] [get_ports data_out*] -add
set_output_delay -min -clock output_clock [expr { (0.250 - (1.5 * 5) }] \
[get_ports data_out*]
set_output_delay -min -clock output_clock -clock_fall \
[expr { (0.250 - ( 1.5 * 5 ) }] [get_ports data_out*] -add

# Add false path exceptions for cross-clock transfers
set_false_path -setup -end -rise_from [get_clocks data_clock] \
-fall_to [get_clocks output_clock]
set_false_path -setup -end -fall_from [get_clocks data_clock] \
-rise_to [get_clocks output_clock]
set_false_path -hold -end -rise_from [get_clocks data_clock] \
-fall_to [get_clocks output_clock]
set_false_path -hold -end -fall_from [get_clocks data_clock] \
-rise_to [get_clocks output_clock]