在源同步輸出介面中,FPGA為目標器件提供時鐘。在居中對齊的源同步介面中,時鐘轉換發生在數據有效窗口的中間。圖1所示為源同步輸出介面示例。
使用以下步驟約束居中對齊的源同步輸出介面:
- 創建基本時鐘和生成的時鐘
- 添加輸出延遲約束
- 添加虛假路徑例外,從時序分析和報告中排除無效路徑
有關這些步驟中的任意步驟或下面描述的計算和約束的更多詳細資訊,請參閱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]