From d919ac46b5ff94b89514b576a6d6659ccf526a49 Mon Sep 17 00:00:00 2001 From: Christos Bakalis Date: Wed, 17 Jan 2024 12:01:16 -0800 Subject: [PATCH] add RXRECCLKOUT functionality to the PGP2FC GT --- protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.dcp | 4 ++-- protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.xci | 5 +++-- .../pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyCoreWrapper.vhd | 9 ++++++--- .../pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyUltra.vhd | 6 ++++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.dcp b/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.dcp index d250500e57..b705a004c6 100644 --- a/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.dcp +++ b/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.dcp @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03e754925c96f2b62d86de34d37c9e23a3e0e94cf36d9de473fe9e0084e076c7 -size 313146 +oid sha256:44598e02aeab4733c5c014c81bf55c67b402f5340221ca793d1c43a8699c80c0 +size 313487 diff --git a/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.xci b/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.xci index c0d60b9dbd..1d790d3728 100644 --- a/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.xci +++ b/protocols/pgp/pgp2fc/gtyUltraScale+/ip/Pgp2fcGtyCore.xci @@ -155,7 +155,7 @@ "RX_CC_VAL_1_3": [ { "value": "00000000", "resolve_type": "user", "enabled": false, "usage": "all" } ], "RX_CC_K_1_3": [ { "value": "false", "resolve_type": "user", "format": "bool", "enabled": false, "usage": "all" } ], "RX_CC_DISP_1_3": [ { "value": "false", "resolve_type": "user", "format": "bool", "enabled": false, "usage": "all" } ], - "ENABLE_OPTIONAL_PORTS": [ { "value": "cplllockdetclk_in cplllocken_in cpllrefclksel_in drpaddr_in drpclk_in drpdi_in drpen_in drpwe_in gtgrefclk_in loopback_in rxcdrreset_in rxpcsreset_in rxpmareset_in rxpolarity_in txpcsreset_in txpmareset_in txpolarity_in cpllfbclklost_out cplllock_out cpllrefclklost_out drpdo_out drprdy_out rxdlysresetdone_out rxphaligndone_out rxresetdone_out rxsyncdone_out txresetdone_out", "value_src": "user", "resolve_type": "user", "usage": "all" } ], + "ENABLE_OPTIONAL_PORTS": [ { "value": "cplllockdetclk_in cplllocken_in cpllrefclksel_in drpaddr_in drpclk_in drpdi_in drpen_in drpwe_in gtgrefclk_in loopback_in rxcdrreset_in rxpcsreset_in rxpmareset_in rxpolarity_in txpcsreset_in txpmareset_in txpolarity_in cpllfbclklost_out cplllock_out cpllrefclklost_out drpdo_out drprdy_out rxdlysresetdone_out rxphaligndone_out rxrecclkout_out rxresetdone_out rxsyncdone_out txresetdone_out", "value_src": "user", "resolve_type": "user", "usage": "all" } ], "RX_REFCLK_SOURCE": [ { "value": "X0Y4 clk1+2", "value_src": "user", "resolve_type": "user", "usage": "all" } ], "TX_REFCLK_SOURCE": [ { "value": "X0Y4 clk1+2", "value_src": "user", "resolve_type": "user", "usage": "all" } ], "RX_RECCLK_OUTPUT": [ { "value": "", "resolve_type": "user", "usage": "all" } ], @@ -170,7 +170,7 @@ "PRESET": [ { "value": "GTY-Aurora_8B10B", "value_src": "user", "resolve_type": "user", "usage": "all" } ], "INTERNAL_PRESET": [ { "value": "Aurora_8B10B", "value_src": "user", "resolve_type": "user", "usage": "all" } ], "INTERNAL_PORT_USAGE_UPDATED": [ { "value": "0", "resolve_type": "generated", "format": "long", "enabled": false, "usage": "all" } ], - "INTERNAL_PORT_ENABLEMENT_UPDATED": [ { "value": "29", "resolve_type": "generated", "format": "long", "enabled": false, "usage": "all" } ], + "INTERNAL_PORT_ENABLEMENT_UPDATED": [ { "value": "28", "resolve_type": "generated", "format": "long", "enabled": false, "usage": "all" } ], "INTERNAL_CHANNEL_SITES_UPDATED": [ { "value": "7", "resolve_type": "generated", "format": "long", "enabled": false, "usage": "all" } ], "INTERNAL_CHANNEL_COLUMN_LOC_MAX": [ { "value": "96", "resolve_type": "generated", "format": "long", "enabled": false, "usage": "all" } ], "INTERNAL_RX_COMMA_PRESET_UPDATE": [ { "value": "11", "resolve_type": "generated", "format": "long", "enabled": false, "usage": "all" } ], @@ -922,6 +922,7 @@ "rxoutclk_out": [ { "direction": "out", "size_left": "0", "size_right": "0", "driver_value": "0" } ], "rxphaligndone_out": [ { "direction": "out", "size_left": "0", "size_right": "0", "driver_value": "0" } ], "rxpmaresetdone_out": [ { "direction": "out", "size_left": "0", "size_right": "0", "driver_value": "0" } ], + "rxrecclkout_out": [ { "direction": "out", "size_left": "0", "size_right": "0", "driver_value": "0" } ], "rxresetdone_out": [ { "direction": "out", "size_left": "0", "size_right": "0", "driver_value": "0" } ], "rxsyncdone_out": [ { "direction": "out", "size_left": "0", "size_right": "0", "driver_value": "0" } ], "txoutclk_out": [ { "direction": "out", "size_left": "0", "size_right": "0", "driver_value": "0" } ], diff --git a/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyCoreWrapper.vhd b/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyCoreWrapper.vhd index d923e25bcd..8c885043ee 100644 --- a/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyCoreWrapper.vhd +++ b/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyCoreWrapper.vhd @@ -5,11 +5,11 @@ ------------------------------------------------------------------------------- -- Description: PGPv2b GTY Ultrascale IP Core Wrapper ------------------------------------------------------------------------------- --- This file is part of 'Example Project Firmware'. +-- This file is part of 'SLAC Firmware Standard Library'. -- It is subject to the license terms in the LICENSE.txt file found in the -- top-level directory of this distribution and at: -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. --- No part of 'Example Project Firmware', including this file, +-- No part of 'SLAC Firmware Standard Library', including this file, -- may be copied, modified, propagated, or distributed except according to -- the terms contained in the LICENSE.txt file. ------------------------------------------------------------------------------- @@ -57,6 +57,7 @@ entity Pgp2fcGtyCoreWrapper is rxDecErr : out slv(1 downto 0); rxPolarity : in sl; rxOutClk : out sl; + rxRecClk : out sl; -- raw recovered clock -- Tx Ports txReset : in sl; @@ -154,6 +155,7 @@ architecture mapping of Pgp2fcGtyCoreWrapper is rxctrl3_out : out std_logic_vector (7 downto 0); rxdlysresetdone_out : out std_logic_vector (0 downto 0); rxoutclk_out : out std_logic_vector (0 downto 0); + rxrecclkout_out : out std_logic_vector (0 downto 0); rxphaligndone_out : out std_logic_vector (0 downto 0); rxpmaresetdone_out : out std_logic_vector (0 downto 0); rxresetdone_out : out std_logic_vector (0 downto 0); @@ -322,6 +324,7 @@ begin rxdlysresetdone_out(0) => rxDlysResetDone, rxphaligndone_out(0) => rxPhyAlignDone, rxoutclk_out(0) => rxOutClkGt, + rxrecclkout_out(0) => rxRecClk, txoutclk_out(0) => txOutClkGt, -- unused rxpmaresetdone_out(0) => rxPmaResetDone, rxresetdone_out(0) => rxResetDone, @@ -419,7 +422,7 @@ begin drpAddr => drpAddr, -- [out] drpDi => drpDi, -- [out] drpDo => drpDo); -- [in] - + txctrl2 <= "000000" & txDataK; txUsrActive <= txUsrClkActive and txPmaResetDone; rxUsrActive <= rxUsrClkActive and rxPmaResetDone; diff --git a/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyUltra.vhd b/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyUltra.vhd index ae960f4036..e79c1a662e 100644 --- a/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyUltra.vhd +++ b/protocols/pgp/pgp2fc/gtyUltraScale+/rtl/Pgp2fcGtyUltra.vhd @@ -5,11 +5,11 @@ ------------------------------------------------------------------------------- -- Description: PGPv2b GTY Ultrascale Core Module ------------------------------------------------------------------------------- --- This file is part of 'Example Project Firmware'. +-- This file is part of 'SLAC Firmware Standard Library'. -- It is subject to the license terms in the LICENSE.txt file found in the -- top-level directory of this distribution and at: -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. --- No part of 'Example Project Firmware', including this file, +-- No part of 'SLAC Firmware Standard Library', including this file, -- may be copied, modified, propagated, or distributed except according to -- the terms contained in the LICENSE.txt file. ------------------------------------------------------------------------------- @@ -52,6 +52,7 @@ entity Pgp2fcGtyUltra is gtRefClk : in sl; gtFabricRefClk : in sl; gtUserRefClk : in sl; + rxRecClk : out sl; -- Gt Serial IO pgpGtTxP : out sl; pgpGtTxN : out sl; @@ -212,6 +213,7 @@ begin rxDecErr => phyRxLaneIn.decErr, rxPolarity => RX_POLARITY_G, rxOutClk => pgpRxOutClk, + rxRecClk => rxRecClk, txReset => gtTxUserReset, txUsrClk => pgpTxClk, txUsrClkActive => pgpTxMmcmLocked,