之前介紹MII接口時(shí),有介紹過(guò)RGMII接口的由來(lái),下面在貼一下:
表8?7 MII接口介紹

RGMII是GMII的簡(jiǎn)化版本,發(fā)送端信號(hào):TXD[3:0]、 TX_CLK、TX_EN,接收端信號(hào):RX_DV、RXD[3:0]、RX_CLK,當(dāng)Clock=125MHz,數(shù)據(jù)位寬4bit(一個(gè)時(shí)鐘周期里,上升沿取TXRX的0-3bit,下降沿取TXRX的4-7bit,所以實(shí)際還是在一個(gè)時(shí)鐘周期里傳輸8bit數(shù)據(jù)),1000Mbps=125 MHz *8bit、100Mbps=25 MHz *8bit、10Mbps=2.5MHz *8bit。
其實(shí)從實(shí)現(xiàn)方式看,很容易看出RGMII傳輸/收取數(shù)據(jù)的方式和DDR的方式類(lèi)似,所以下面會(huì)針對(duì)這方面詳細(xì)介紹。8.5.1.1 RGMII信號(hào)定義及時(shí)序RGMII 使用 4bit 數(shù)據(jù)接口采用上下沿 DDR( Double Data Rate)的方式在一個(gè)時(shí)鐘周期之內(nèi)傳輸 8bit數(shù)據(jù)信號(hào),即上升沿發(fā)送或接收數(shù)據(jù)的低 4 位[3:0],下降沿發(fā)送或接收數(shù)據(jù)的高 4 位[7:4]。
發(fā)送端:
TXC:發(fā)送數(shù)據(jù)信號(hào)和控制信號(hào)對(duì)應(yīng)的同步時(shí)鐘信號(hào)( 125M、 25M、 2.5M)
TXD[3:0]:發(fā)送數(shù)據(jù)信號(hào), 4bit 位寬
TX_CTL:發(fā)送控制信號(hào)
發(fā)送端信號(hào)時(shí)序如下圖所示。

圖8?18 RGMII發(fā)送端信號(hào)時(shí)序(來(lái)源88E1512datasheet,下同)
一般的 PHY 芯片都支持兩種 RGMII 發(fā)送端口的時(shí)序關(guān)系。一種稱為非延時(shí)模式,如下圖所示:

圖8?19 RGMII發(fā)送端非延時(shí)模式(來(lái)源88E1512datasheet,下同)

即要滿足時(shí)鐘信號(hào) TXC 的邊沿對(duì)準(zhǔn)數(shù)據(jù)信號(hào) TXD[3:0]和控制信號(hào) TX_CTL 有效窗口中心附近的位置,也就是說(shuō) TXC 比其他信號(hào)存在 2ns( 90°相位)(2ns來(lái)源:當(dāng) RGMII 接口工作于 1000M 速率時(shí), TXC 和RXC 時(shí)鐘信號(hào)都為 125MHz,那么單個(gè)接口的數(shù)據(jù)率便等同于 250Mbps,單個(gè)信號(hào)的有效數(shù)據(jù)窗最大為 4ns。)左右的延時(shí)。
另一種為延時(shí)模式,如下圖所示。

圖8?20 RGMII發(fā)送端延時(shí)模式(來(lái)源88E1512datasheet,下同)

這種時(shí)序要求 TXC 的邊沿不其發(fā)送的數(shù)據(jù) TXD 和控制信號(hào) TX_CTL 邊沿對(duì)齊,所有信號(hào)具有相同的相位。
一般來(lái)說(shuō),大部分 PHY 芯片默認(rèn)都是采用正常時(shí)序模式,可通過(guò) MDIO 接口設(shè)置寄存器,或者芯片特殊功能引腳將其配置為延時(shí)模式。
接收端:
RXC:接收數(shù)據(jù)信號(hào)和控制信號(hào)對(duì)應(yīng)的同步時(shí)鐘信號(hào)( 125M、 25M、 2.5M)
RXD[3:0]:接收數(shù)據(jù)信號(hào),4bit 位寬
RX_CTL:接收控制信號(hào)
接收端信號(hào)的時(shí)序如下圖所示。

圖8?21 RGMII接收端信號(hào)時(shí)序
同理接收端也有非延時(shí)和延時(shí)模式,原理同上,時(shí)序圖如下。

圖8?22 RGMII接收端非延時(shí)模式(來(lái)源88E1512datasheet,下同)


圖8?23 RGMII接收端延時(shí)模式(來(lái)源88E1512datasheet,下同)

8.5.1.2 RGMII時(shí)序中的原語(yǔ)使用在 FPGA 中設(shè)計(jì)高速源同步接口的重點(diǎn)在于時(shí)序控制和時(shí)序約束。
在 7 系列 FPGA 中實(shí)現(xiàn) RGMII 接口需要借助 5 種原語(yǔ),分別是:IDDR、 ODDR、 IDELAYE2、ODELAYE2(A7 中沒(méi)有)、 IDELAYCTRL。
其中, IDDR 和 ODDR 分別是輸入和輸出的雙邊沿寄存器,位于 IOB 中。IDELAYE2 和ODELAYE2,分別用于控制 IO 口輸入和輸出延時(shí)。同時(shí), IDELAYE2 和 ODELAYE2 的延時(shí)值需要使用原語(yǔ) IDELAYCTRL 來(lái)進(jìn)行校準(zhǔn)。另外,需要注意的是,在 7 系列器件的 HR Bank 中沒(méi)有ODELAYE2,只有在 HP BANK 中才有 ODELAYE2。
上述幾個(gè)原語(yǔ)在Xilinx中屬于I/O計(jì)算組件,其他常見(jiàn)的原語(yǔ)如下:
表8?8 I/O端口組件

下面針對(duì)即將使用的幾個(gè)原語(yǔ)進(jìn)行介紹(摘選自米聯(lián)客教程,在此謝過(guò)):
( 1) IDDR
IDDR 將輸入的雙邊沿 DDR 信號(hào),在輸出端恢復(fù)為兩個(gè)并行單邊沿 SDR 信號(hào)。IDDR 的原語(yǔ)如下。詳細(xì)參數(shù)可參考 UG471。
代碼8?1 IDDR 的原語(yǔ)
1.// IDDR : In order to incorporate this function into the design,
2.// Verilog : the following instance declaration needs to be placed
3.// instance : in the body of the design code. The instance name
4.// declaration : (IDDR_inst) and/or the port declarations within the
5.// code : parenthesis may be changed to properly reference and
6.// : connect this function to the design. Delete or comment
7.// : out inputs/outs that are not necessary.
8.
9.// 《-----cut code=“” below=“” this=“” line----=“”》
10.
11. // IDDR: Input Double Data Rate Input Register with Set, Reset
12. // and Clock Enable.
13. // Artix-7
14. // Xilinx HDL Language Template, version 2018.3
15.
16. IDDR #(
17. .DDR_CLK_EDGE(“OPPOSITE_EDGE”), // “OPPOSITE_EDGE”, “SAME_EDGE”
18. // or “SAME_EDGE_PIPELINED”
19. .INIT_Q1(1‘b0), // Initial value of Q1: 1’b0 or 1‘b1
20. .INIT_Q2(1’b0), // Initial value of Q2: 1‘b0 or 1’b1
21. .SRTYPE(“SYNC”) // Set/Reset type: “SYNC” or “ASYNC”
22. ) IDDR_inst (
23. .Q1(Q1), // 1-bit output for positive edge of clock
24. .Q2(Q2), // 1-bit output for negative edge of clock
25. .C(C), // 1-bit clock input
26. .CE(CE), // 1-bit clock enable input
27. .D(D), // 1-bit DDR data input
28. .R(R), // 1-bit reset
29. .S(S) // 1-bit set
30. );
31.
32. // End of IDDR_inst instantiation
33.
34.
C 為同步時(shí)鐘, Q1 和 Q2 則是分別與 C 上升沿和下降沿同步的輸出的 SDR 數(shù)據(jù), D 為 DDR 輸入。參數(shù) DDR_CLK_EDGE 用來(lái)決定了 C、 Q1、 Q2 和 D 之間的時(shí)序關(guān)系。DDR_CLK_EDGE 有 3 種模式:OPPOSITE_EDGE、 SAME_EDGE 以及 SAME_EDGE_PIPELINED,3 種時(shí)序關(guān)系如下圖所示。



圖8?24 DDR_CLK_EDGE 3 種模式(來(lái)源UG741)
(2) ODDR
使用 ODDR 將 TXC 同一個(gè)時(shí)鐘周期內(nèi)的兩個(gè) SDR 信號(hào)分別通過(guò)上升沿和下降沿輸出為 DDR 信號(hào)。ODDR 的原語(yǔ)如下,詳細(xì)參數(shù)可參考 UG471。
代碼8?2 ODDR原語(yǔ)
1.// ODDR : In order to incorporate this function into the design,
2.// Verilog : the following instance declaration needs to be placed
3.// instance : in the body of the design code. The instance name
4.// declaration : (ODDR_inst) and/or the port declarations within the
5.// code : parenthesis may be changed to properly reference and
6.// : connect this function to the design. Delete or comment
7.// : out inputs/outs that are not necessary.
8.
9.// 《-----cut code=“” below=“” this=“” line----=“”》
10.
11. // ODDR: Output Double Data Rate Output Register with Set, Reset
12. // and Clock Enable.
13. // Artix-7
14. // Xilinx HDL Language Template, version 2018.3
15.
16. ODDR #(
17. .DDR_CLK_EDGE(“OPPOSITE_EDGE”), // “OPPOSITE_EDGE” or “SAME_EDGE”
18. .INIT(1‘b0), // Initial value of Q: 1’b0 or 1‘b1
19. .SRTYPE(“SYNC”) // Set/Reset type: “SYNC” or “ASYNC”
20. ) ODDR_inst (
21. .Q(Q), // 1-bit DDR output
22. .C(C), // 1-bit clock input
23. .CE(CE), // 1-bit clock enable input
24. .D1(D1), // 1-bit data input (positive edge)
25. .D2(D2), // 1-bit data input (negative edge)
26. .R(R), // 1-bit reset
27. .S(S) // 1-bit set
28. );
29.
30. // End of ODDR_inst instantiation
31.
32.
DDR_CLK_EDGE 有兩種模式: OPPOSITE_EDGE 和 SAME_EDGE,兩種時(shí)序關(guān)系如下圖所示。


圖8?25 DDR_CLK_EDGE兩種模式
對(duì)于 OPPOSITE_EDGE 模式,在 FPGA 內(nèi)部也同樣需要兩個(gè)反相時(shí)鐘來(lái)同步 D1 和 D2,較少使用。在設(shè)計(jì) RGMII 接口時(shí)使用了 SAME_EDGE 模式。
(3) IDELAYE2
IDELAYE2 用于在信號(hào)通過(guò)引腳進(jìn)入芯片內(nèi)部之前,進(jìn)行延時(shí)調(diào)節(jié)。這里給出本方案中的用法,原語(yǔ)描述如下。詳細(xì)參數(shù)可參考 UG471。
代碼8?3 IDELAYE2 原語(yǔ)
1.// IDELAYE2 : In order to incorporate this function into the design,
2.// Verilog : the following instance declaration needs to be placed
3.// instance : in the body of the design code. The instance name
4.// declaration : (IDELAYE2_inst) and/or the port declarations within the
5.// code : parenthesis may be changed to properly reference and
6.// : connect this function to the design. All inputs
7.// : and outputs must be connected.
8.
9.// 《-----cut code=“” below=“” this=“” line----=“”》
10.
11. // IDELAYE2: Input Fixed or Variable Delay Element
12. // Artix-7
13. // Xilinx HDL Language Template, version 2018.3
14.
15. (* IODELAY_GROUP = *) // Specifies group name for associated IDELAYs/ODELAYs and IDELAYCTRL
16.
17. IDELAYE2 #(
18. .CINVCTRL_SEL(“FALSE”), // Enable dynamic clock inversion (FALSE, TRUE)
19. .DELAY_SRC(“IDATAIN”), // Delay input (IDATAIN, DATAIN)
20. .HIGH_PERFORMANCE_MODE(“FALSE”), // Reduced jitter (“TRUE”), Reduced power (“FALSE”)
21. .IDELAY_TYPE(“FIXED”), // FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE
22. .IDELAY_VALUE(0), // Input delay tap setting (0-31)
23. .PIPE_SEL(“FALSE”), // Select pipelined mode, FALSE, TRUE
24. .REFCLK_FREQUENCY(200.0), // IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0)。
25. .SIGNAL_PATTERN(“DATA”) // DATA, CLOCK input signal
26. )
27. IDELAYE2_inst (
28. .CNTVALUEOUT(CNTVALUEOUT), // 5-bit output: Counter value output
29. .DATAOUT(DATAOUT), // 1-bit output: Delayed data output
30. .C(C), // 1-bit input: Clock input
31. .CE(CE), // 1-bit input: Active high enable increment/decrement input
32. .CINVCTRL(CINVCTRL), // 1-bit input: Dynamic clock inversion input
33. .CNTVALUEIN(CNTVALUEIN), // 5-bit input: Counter value input
34. .DATAIN(DATAIN), // 1-bit input: Internal delay data input
35. .IDATAIN(IDATAIN), // 1-bit input: Data input from the I/O
36. .INC(INC), // 1-bit input: Increment / Decrement tap delay input
37. .LD(LD), // 1-bit input: Load IDELAY_VALUE input
38. .LDPIPEEN(LDPIPEEN), // 1-bit input: Enable PIPELINE register to load data input
39. .REGRST(REGRST) // 1-bit input: Active-high reset tap-delay input
40. );
41.
42. // End of IDELAYE2_inst instantiation
43.
44.
(4) ODELAYE2
ODELAYE2原語(yǔ)如下,更多詳細(xì)信息可參考 UG471。
代碼8?4 ODELAYE2原語(yǔ)1.// ODELAYE2 : In order to incorporate this function into the design,
2.// Verilog : the following instance declaration needs to be placed
3.// instance : in the body of the design code. The instance name
4.// declaration : (ODELAYE2_inst) and/or the port declarations within the
5.// code : parenthesis may be changed to properly reference and
6.// : connect this function to the design. All inputs
7.// : and outputs must be connected.
8.
9.// 《-----cut code=“” below=“” this=“” line----=“”》
10.
11. // ODELAYE2: Output Fixed or Variable Delay Element
12. // Kintex-7
13. // Xilinx HDL Language Template, version 2018.3
14.
15. (* IODELAY_GROUP = *) // Specifies group name for associated IDELAYs/ODELAYs and IDELAYCTRL
16.
17. ODELAYE2 #(
18. .CINVCTRL_SEL(“FALSE”), // Enable dynamic clock inversion (FALSE, TRUE)
19. .DELAY_SRC(“ODATAIN”), // Delay input (ODATAIN, CLKIN)
20. .HIGH_PERFORMANCE_MODE(“FALSE”), // Reduced jitter (“TRUE”), Reduced power (“FALSE”)
21. .ODELAY_TYPE(“FIXED”), // FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE
22. .ODELAY_VALUE(0), // Output delay tap setting (0-31)
23. .PIPE_SEL(“FALSE”), // Select pipelined mode, FALSE, TRUE
24. .REFCLK_FREQUENCY(200.0), // IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0)。
25. .SIGNAL_PATTERN(“DATA”) // DATA, CLOCK input signal
26. )
27. ODELAYE2_inst (
28. .CNTVALUEOUT(CNTVALUEOUT), // 5-bit output: Counter value output
29. .DATAOUT(DATAOUT), // 1-bit output: Delayed data/clock output
30. .C(C), // 1-bit input: Clock input
31. .CE(CE), // 1-bit input: Active high enable increment/decrement input
32. .CINVCTRL(CINVCTRL), // 1-bit input: Dynamic clock inversion input
33. .CLKIN(CLKIN), // 1-bit input: Clock delay input
34. .CNTVALUEIN(CNTVALUEIN), // 5-bit input: Counter value input
35. .INC(INC), // 1-bit input: Increment / Decrement tap delay input
36. .LD(LD), // 1-bit input: Loads ODELAY_VALUE tap delay in VARIABLE mode, in VAR_LOAD or
37. // VAR_LOAD_PIPE mode, loads the value of CNTVALUEIN
38.
39. .LDPIPEEN(LDPIPEEN), // 1-bit input: Enables the pipeline register to load data
40. .ODATAIN(ODATAIN), // 1-bit input: Output delay data input
41. .REGRST(REGRST) // 1-bit input: Active-high reset tap-delay input
42. );
43.
44. // End of ODELAYE2_inst instantiation
45.
46.
(5) IDELAYCTRL
IDELAY2 和 ODELAY2 都需要 IDELAYCTRL 來(lái)進(jìn)行校準(zhǔn)。IDELAYCTRL 原語(yǔ)如下。更多詳細(xì)信息可參考 UG471。
代碼8?5 IDELAYCTRL 原語(yǔ)
1.// IDELAYCTRL : In order to incorporate this function into the design,
2.// Verilog : the following instance declaration needs to be placed
3.// instance : in the body of the design code. The instance name
4.// declaration : (IDELAYCTRL_inst) and/or the port declarations within the
5.// code : parenthesis may be changed to properly reference and
6.// : connect this function to the design. All inputs
7.// : and outputs must be connected.
8.
9.// 《-----cut code=“” below=“” this=“” line----=“”》
10.
11. // IDELAYCTRL: IDELAYE2/ODELAYE2 Tap Delay Value Control
12. // Artix-7
13. // Xilinx HDL Language Template, version 2018.3
14.
15. (* IODELAY_GROUP = *) // Specifies group name for associated IDELAYs/ODELAYs and IDELAYCTRL
16.
17. IDELAYCTRL IDELAYCTRL_inst (
18. .RDY(RDY), // 1-bit output: Ready output
19. .REFCLK(REFCLK), // 1-bit input: Reference clock input
20. .RST(RST) // 1-bit input: Active high reset input
21. );
22.
23. // End of IDELAYCTRL_inst instantiation
24.
25.
IDELAYCTRL 需要一個(gè)參考時(shí)鐘信號(hào) REFCLK 來(lái)校準(zhǔn) IDELAY2 和 ODELAY2 每個(gè) tap 的延時(shí)值,可用的 REFCLK 頻率為 200M、 300M、 400M。時(shí)鐘越高對(duì)應(yīng)的 tap 延時(shí)平均值越小,也就是說(shuō)延時(shí)調(diào)節(jié)精度越高。DS182 中對(duì)此有如下描述。

大部分情冴下使用 200M 的參考時(shí)鐘就可以滿足實(shí)際需求。
8.5.1.3 RGMII發(fā)送接口設(shè)計(jì)
(1) PHY RGMII 發(fā)送接口時(shí)序
相關(guān)的時(shí)序在上面已經(jīng)介紹,主要關(guān)注tsetup、thold 默認(rèn)模式具體如下:

(2)設(shè)計(jì)方案
針對(duì)上述時(shí)序關(guān)系, RGMII 發(fā)送接口的設(shè)計(jì)方案如下圖所示。

圖8?27 RGMII 發(fā)送接口的設(shè)計(jì)方案
(3)時(shí)序約束
針對(duì) RGMII 發(fā)送接口需要進(jìn)行 output delay 約束,如下所示。使用 MMCM 輸出的時(shí)鐘 phy_tx_clk 作為所有 ODDR 的輸入時(shí)鐘。這里以 1 個(gè) RGMII 接口為例。
代碼8?6 時(shí)序約束
1.settx_clk [get_clocks -include_generated_clocks -of [get_pins clk_wiz_0/inst/mmcm_adv_inst/CLKOUT1]]
2.create_generated_clock -name phy_tx_clk -source [get_pins clk_wiz_0/inst/mmcm_adv_inst/CLKOUT1] -multiply_by1 [get_ports phy1_rgmii_tx_clk]
3.set_output_delay -clock [get_clocksphy_tx_clk] -max -0.900 [get_ports {phy1_rgmii_tx_ctl phy1_rgmii_tx_data[*]}}]
4.set_output_delay -clock [get_clocksphy_tx_clk] -min -2.900 [get_ports {phy1_rgmii_tx_ctl {phy1_rgmii_tx_data[*]}}]
5.set_output_delay -clock [get_clocksphy_tx_clk] -max -0.900 [get_ports {phy1_rgmii_tx_ctl {phy1_rgmii_tx_data[*]}}] -clock_fall -
6.add_delay
7.set_output_delay -clock [get_clocksphy_tx_clk] -min -2.900 [get_ports {phy1_rgmii_tx_ctl {phy1_rgmii_tx_data[*]}}] -clock_fall -add_delay
由于時(shí)序分析中存在 2 個(gè)時(shí)鐘 phy_tx_clk 和 tx_clk,這兩個(gè)時(shí)鐘在物理上實(shí)際是同 1 個(gè)時(shí)鐘,都是由MMCM 同 1 個(gè)引腳輸出的。但是時(shí)序分析工具會(huì)把它們當(dāng)做 2 個(gè)不同的時(shí)鐘而進(jìn)行跨時(shí)鐘域分析。因此,需要剔除這 2 個(gè)時(shí)鐘之間的一些虛假路徑,避免時(shí)序報(bào)錯(cuò)。
針對(duì)本文檔的設(shè)計(jì)方法,RGMII 發(fā)送接口 DDR 的 setup time 分析是從 rise 到 rise,或者 fall 到 fall。因此需要剔除 rise 到 fall 和 fall 到 rise 的 setup time 偽路徑。同理, hold time 分析是從 rise 到 fall 或fall 到 rise,因此需要剔除 rise 到 rise 和 fall 到 fall 的 hold time 偽路徑。如下所示:
1.set_false_path -fall_from $tx_clk -rise_to [get_clocksphy_tx_clk] -setup
2.set_false_path -rise_from $tx_clk -fall_to [get_clocksphy_tx_clk] -setup
3.set_false_path -fall_from $tx_clk -fall_to [get_clocksphy_tx_clk] -hold
4.set_false_path -rise_from $tx_clk -rise_to [get_clocksphy_tx_clk] -hold
除此之外,由于 setup time 分析是從 rise 到 rise 或fall 到 fall 的。為了避免時(shí)序分析工具對(duì) 2 個(gè)時(shí)鐘phy_tx_clk 和 tx_clk 之間 setup time 進(jìn)行錯(cuò)誤的多周期分析,需要進(jìn)行如下約束。
1.set_multicycle_path 0 -setup -end -rise_from $tx_clk -rise_to [get_clocksphy_tx_clk]
2.set_multicycle_path 0 -setup -end -fall_from $tx_clk -fall_to [get_clocksphy_tx_clk]
8.5.1.4 RGMII接收接口設(shè)計(jì)
(1) PHY RGMII 接收接口時(shí)序
相關(guān)的時(shí)序在上面已經(jīng)介紹,主要關(guān)注tsetup、thold 默認(rèn)模式具體如下:

(2)設(shè)計(jì)方案
針對(duì)上述時(shí)序關(guān)系, RGMII 接收接口的設(shè)計(jì)方案如下圖所示。通過(guò) FPGA 引腳輸入的時(shí)鐘 RXC 經(jīng)過(guò)BUFIO 可以通過(guò)最短的延時(shí)接入 IDDR 中。另外,輸入時(shí)鐘經(jīng)過(guò) BUFG 或者 BUFR 進(jìn)入 FPGA 內(nèi)部時(shí)鐘網(wǎng)絡(luò)供內(nèi)部邏輯所使用。BUFR 僅局限于單個(gè) clock region 內(nèi)部的邏輯資源,如果邏輯規(guī)模較大,建議使用 BUFG。

圖8?30 RGMII 接收接口的設(shè)計(jì)方案
(3)時(shí)序約束
針對(duì) RGMII 接收接口需要進(jìn)行 intput delay 約束,如下所示。使用 PHY 芯片輸入時(shí)鐘作為所有 IDDR的輸入時(shí)鐘。這里以 1 個(gè) RGMII 接口為例。
1.create_clock -period 6.000 -name phy1_rx_clk [get_ports phy1_rgmii_rx_clk]
2.set_input_delay -clock [get_clocks phy1_rx_clk] -max 2.800 [get_ports {{phy1_rgmii_rx_data[*]} phy1_rgmii_rx_ctl}]
3.set_input_delay -clock [get_clocks phy1_rx_clk] -min 1.200 [get_ports {{phy1_rgmii_rx_data[*]} phy1_rgmii_rx_ctl}]
4.set_input_delay -clock [get_clocks phy1_rx_clk] -clock_fall -max -add_delay 2.800 [get_ports {{phy1_rgmii_rx_data[*]} phy1_rgmii_rx_ctl}]
5.set_input_delay -clock [get_clocks phy1_rx_clk] -clock_fall -min -add_delay 1.200 [get_ports {{phy1_rgmii_rx_data[*]} phy1_rgmii_rx_ctl}]
除此之外,還需要將所有 IDELAYE2 和 IDELAYCTRL 約束到一個(gè) group 中。在 7 系列器件中, 1 個(gè)BANK 對(duì)應(yīng)一個(gè) clock region,每個(gè) clock region 對(duì)應(yīng) 1 個(gè) IDELAYCTRL。FPGA中有 4 組 RGMII 接收接口,分布在 BANK13 和 BANK14 中。因此,需要分 2 個(gè) group 進(jìn)行約束,約束如下。
1.set_property IODELAY_GROUP iodelay_grp_bank13 [get_cells {idelayctrl_inst1 rgmii_receive_module1/delay_rgmii_rx_ctl
2.{rgmii_receive_module1/RGMII_RX_DATA_BUS[*].delay_rgmii_rxd}}]
3.set_property IODELAY_GROUP iodelay_grp_bank13 [get_cells {rgmii_receive_module2/delay_rgmii_rx_ctl
4.{rgmii_receive_module2/RGMII_RX_DATA_BUS[*].delay_rgmii_rxd}}]
5.set_property IODELAY_GROUP iodelay_grp_bank14 [get_cells {idelayctrl_inst2 rgmii_receive_module3/delay_rgmii_rx_ctl
6.{rgmii_receive_module3/RGMII_RX_DATA_BUS[*].delay_rgmii_rxd}}]
7.set_property IODELAY_GROUP iodelay_grp_bank14 [get_cells {rgmii_receive_module4/delay_rgmii_rx_ctl
8.{rgmii_receive_module4/RGMII_RX_DATA_BUS[*].delay_rgmii_rxd}}]
另外,約束每組 RGMII 接收接口的 IDELAYE2 的延時(shí) tap 數(shù),經(jīng)嘗試最佳 tap 為 14。如下所示。
1.set_property IDELAY_VALUE 14 [get_cells rgmii_receive_module1/delay_rgmii_rx_ctl] 2.set_property IDELAY_VALUE 14 [get_cells {rgmii_receive_module1/RGMII_RX_DATA_BUS[*].delay_rgmii_rxd}]
編輯:jq
-
芯片
+關(guān)注
關(guān)注
462文章
53253瀏覽量
455481 -
RMII
+關(guān)注
關(guān)注
0文章
8瀏覽量
12363 -
MII
+關(guān)注
關(guān)注
0文章
5瀏覽量
6229
原文標(biāo)題:基于原語(yǔ)的千兆以太網(wǎng)RGMII接口設(shè)計(jì)
文章出處:【微信號(hào):HXSLH1010101010,微信公眾號(hào):FPGA技術(shù)江湖】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
LAN8814 4端口千兆以太網(wǎng)收發(fā)器數(shù)據(jù)手冊(cè)總結(jié)
深入解析Microchip LAN8840千兆以太網(wǎng)收發(fā)器
LAN8841千兆以太網(wǎng)收發(fā)器技術(shù)解析
LAN8831千兆以太網(wǎng)收發(fā)器技術(shù)解析與應(yīng)用指南
LAN9370汽車(chē)級(jí)以太網(wǎng)交換機(jī)芯片技術(shù)解析
基于LAN8830千兆以太網(wǎng)收發(fā)器的工業(yè)應(yīng)用技術(shù)解析
LAN8804四端口千兆以太網(wǎng)收發(fā)器技術(shù)解析
基于LAN9646六端口千兆以太網(wǎng)交換機(jī)的技術(shù)解析與應(yīng)用
千兆以太網(wǎng)防護(hù):3 步搞定電涌威脅
Texas Instruments DP83867-EVM-AM以太網(wǎng)PHY附加板數(shù)據(jù)手冊(cè)
Analog Devices Inc. ADIN3310/ADIN6310工業(yè)級(jí)以太網(wǎng)交換機(jī)數(shù)據(jù)手冊(cè)
AD9574以太網(wǎng) 千兆以太網(wǎng)時(shí)鐘發(fā)生器技術(shù)手冊(cè)

探究關(guān)于原語(yǔ)的千兆以太網(wǎng)RGMII接口設(shè)計(jì)
評(píng)論