SURF  1.0
Pgp2bGth7VarLatWrapper.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : Pgp2bGth7VarLatWrapper.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2015-04-01
5 -- Last update: 2016-08-24
6 -------------------------------------------------------------------------------
7 -- Description: Example PGP 3.125 Gbps front end wrapper
8 -- Note: Default generic configurations are for the Diligent NetFPGA-SUME development board
9 -- Note: Default uses FPGA fabric clock = 156.25 MHz reference clock
10 -------------------------------------------------------------------------------
11 -- This file is part of 'SLAC Firmware Standard Library'.
12 -- It is subject to the license terms in the LICENSE.txt file found in the
13 -- top-level directory of this distribution and at:
14 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
15 -- No part of 'SLAC Firmware Standard Library', including this file,
16 -- may be copied, modified, propagated, or distributed except according to
17 -- the terms contained in the LICENSE.txt file.
18 -------------------------------------------------------------------------------
19 
20 library ieee;
21 use ieee.std_logic_1164.all;
22 
23 use work.StdRtlPkg.all;
24 use work.AxiStreamPkg.all;
25 use work.Pgp2bPkg.all;
26 use work.AxiLitePkg.all;
27 
28 library unisim;
29 use unisim.vcomponents.all;
30 
31 --! @see entity
32  --! @ingroup protocols_pgp_pgp2b_gth7
34  generic (
35  TPD_G : time := 1 ns;
36  -- CPLL Configurations (Defaults: pgpClk = 156.25 MHz Configuration)
37  CPLL_FBDIV_G : natural := 4;
38  CPLL_FBDIV_45_G : natural := 5;
39  CPLL_REFCLK_DIV_G : natural := 1;
40  -- MGT Configurations (Defaults: pgpClk = 156.25 MHz Configuration)
41  RXOUT_DIV_G : natural := 2;
42  TXOUT_DIV_G : natural := 2;
43  RX_CLK25_DIV_G : natural := 7;
44  TX_CLK25_DIV_G : natural := 7;
45  RX_OS_CFG_G : bit_vector := "0000010000000"; -- Set by wizard
46  RXCDR_CFG_G : bit_vector := x"0002007FE1000C2200018"; -- Set by wizard
47  RXDFEXYDEN_G : sl := '1'; -- Set by wizard
48  -- PGP Settings
49  VC_INTERLEAVE_G : integer := 0; -- No interleave Frames
50  PAYLOAD_CNT_TOP_G : integer := 7; -- Top bit for payload counter
51  NUM_VC_EN_G : integer range 1 to 4 := 4;
53  TX_ENABLE_G : boolean := true; -- Enable TX direction
54  RX_ENABLE_G : boolean := true); -- Enable RX direction
55  port (
56  -- Clocks and Reset
57  pgpClk : in sl;
58  pgpRst : in sl;
59  -- Non VC TX Signals
62  -- Non VC RX Signals
65  -- Frame TX Interface
67  pgpTxSlaves : out AxiStreamSlaveArray(3 downto 0);
68  -- Frame RX Interface
70  pgpRxCtrl : in AxiStreamCtrlArray(3 downto 0);
71  -- GT Pins
72  gtTxP : out sl;
73  gtTxN : out sl;
74  gtRxP : in sl;
75  gtRxN : in sl;
76  -- Debug Interface
77  txPreCursor : in slv(4 downto 0) := (others => '0');
78  txPostCursor : in slv(4 downto 0) := (others => '0');
79  txDiffCtrl : in slv(3 downto 0) := "1000";
80  -- AXI-Lite Interface
81  axilClk : in sl := '0';
82  axilRst : in sl := '0';
87 end Pgp2bGth7VarLatWrapper;
88 
89 architecture mapping of Pgp2bGth7VarLatWrapper is
90 
91 begin
92 
93  Pgp2bGth7VarLat_Inst : entity work.Pgp2bGth7VarLat
94  generic map (
95  TPD_G => TPD_G,
96  -- CPLL Configurations
97  TX_PLL_G => "CPLL",
98  RX_PLL_G => "CPLL",
99  CPLL_REFCLK_SEL_G => "111",
103  -- MGT Configurations
111  -- VC Configuration
118  port map (
119  -- GT Clocking
120  stableClk => pgpClk,
121  gtCPllRefClk => pgpClk,
122  gtCPllLock => open,
123  gtQPllRefClk => '0',
124  gtQPllClk => '0',
125  gtQPllLock => '1',
126  gtQPllRefClkLost => '0',
127  gtQPllReset => open,
128  -- GT Serial IO
129  gtTxP => gtTxP,
130  gtTxN => gtTxN,
131  gtRxP => gtRxP,
132  gtRxN => gtRxN,
133  -- Tx Clocking
134  pgpTxReset => pgpRst,
135  pgpTxRecClk => open,
136  pgpTxClk => pgpClk,
137  pgpTxMmcmReset => open,
138  pgpTxMmcmLocked => '1',
139  -- Rx clocking
140  pgpRxReset => pgpRst,
141  pgpRxRecClk => open,
142  pgpRxClk => pgpClk,
143  pgpRxMmcmReset => open,
144  pgpRxMmcmLocked => '1',
145  -- Non VC TX Signals
146  pgpTxIn => pgpTxIn,
147  pgpTxOut => pgpTxOut,
148  -- Non VC RX Signals
149  pgpRxIn => pgpRxIn,
150  pgpRxOut => pgpRxOut,
151  -- Frame TX Interface
154  -- Frame RX Interface
156  pgpRxCtrl => pgpRxCtrl,
157  -- Debug Interface
161  -- AXI-Lite Interface
162  axilClk => axilClk,
163  axilRst => axilRst,
168 
169 end mapping;
RXCDR_CFG_Gbit_vector := x"0002007FE1000C2200018"
CPLL_REFCLK_SEL_Gbit_vector := "001"
out pgpRxMastersAxiStreamMasterArray( 3 downto 0)
array(natural range <> ) of AxiStreamSlaveType AxiStreamSlaveArray
out axilReadSlaveAxiLiteReadSlaveType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_DECERR_C
out pgpTxSlavesAxiStreamSlaveArray( 3 downto 0)
out pgpRxMastersAxiStreamMasterArray( 3 downto 0)
in axilRstsl := '0'
in axilWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
in txPostCursorslv( 4 downto 0) :=( others => '0')
in pgpRxCtrlAxiStreamCtrlArray( 3 downto 0)
out axilWriteSlaveAxiLiteWriteSlaveType
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
VC_INTERLEAVE_Ginteger := 0
TX_PLL_Gstring := "QPLL"
out axilReadSlaveAxiLiteReadSlaveType
in pgpRxInPgp2bRxInType
in axilWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
TX_CLK25_DIV_Ginteger := 7
RX_OS_CFG_Gbit_vector := "0000010000000"
out pgpRxOutPgp2bRxOutType
in pgpTxMastersAxiStreamMasterArray( 3 downto 0)
in txDiffCtrlslv( 3 downto 0) := "1000"
RX_OS_CFG_Gbit_vector := "0000010000000"
RX_PLL_Gstring := "CPLL"
in pgpTxInPgp2bTxInType
in txDiffCtrlslv( 3 downto 0) := "1000"
PAYLOAD_CNT_TOP_Ginteger := 7
RXCDR_CFG_Gbit_vector := x"0002007FE1000C2200018"
in pgpRxCtrlAxiStreamCtrlArray( 3 downto 0)
in pgpTxMastersAxiStreamMasterArray( 3 downto 0) :=( others => AXI_STREAM_MASTER_INIT_C)
Pgp2bRxInType
Definition: Pgp2bPkg.vhd:55
slv( 1 downto 0) := "11" AXI_RESP_DECERR_C
Definition: AxiLitePkg.vhd:49
NUM_VC_EN_Ginteger range 1 to 4:= 4
in axilClksl := '0'
CPLL_FBDIV_Ginteger := 4
out axilWriteSlaveAxiLiteWriteSlaveType
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
in axilReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
array(natural range <> ) of AxiStreamCtrlType AxiStreamCtrlArray
_library_ ieeeieee
out pgpTxSlavesAxiStreamSlaveArray( 3 downto 0)
array(natural range <> ) of AxiStreamMasterType AxiStreamMasterArray
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
Definition: AxiLitePkg.vhd:69
TX_ENABLE_Gboolean := true
NUM_VC_EN_Ginteger range 1 to 4:= 4
AxiLiteReadSlaveType
Definition: AxiLitePkg.vhd:85
out pgpTxOutPgp2bTxOutType
AxiLiteWriteMasterType :=(awaddr =>( others => '0'),awprot =>( others => '0'),awvalid => '0',wdata =>( others => '0'),wstrb =>( others => '1'),wvalid => '0',bready => '1') AXI_LITE_WRITE_MASTER_INIT_C
Definition: AxiLitePkg.vhd:125
TPD_Gtime := 1 ns
in axilReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
TXOUT_DIV_Ginteger := 2
in txPreCursorslv( 4 downto 0) :=( others => '0')
in txPostCursorslv( 4 downto 0) :=( others => '0')
Pgp2bTxOutType
Definition: Pgp2bPkg.vhd:135
RX_CLK25_DIV_Ginteger := 7
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_DECERR_C
RXOUT_DIV_Ginteger := 2
CPLL_REFCLK_DIV_Ginteger := 1
RX_ENABLE_Gboolean := true
Pgp2bRxOutType
Definition: Pgp2bPkg.vhd:69
CPLL_FBDIV_45_Ginteger := 5
std_logic_vector slv
Definition: StdRtlPkg.vhd:29
in txPreCursorslv( 4 downto 0) :=( others => '0')