CMX
CMX firmware code in-line documentation
 All Classes Namespaces Files Functions Variables
SFP_TXRX.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
6 -------------------------------------------------------------------------------
7 
8 library ieee;
9 use ieee.std_logic_1164.all;
10 use ieee.std_logic_misc.all;
11 use ieee.numeric_std.all;
12 library UNISIM;
13 use UNISIM.VCOMPONENTS.ALL;
14 
15 
16 library work;
17 use work.CMXpackage.all;
18 
19 
20 
21 entity SFP_Data_TXRX is
22  generic
23  (
24  direction : std_logic; -- on CMX some GTX connected to SFP are TX some are
25  -- RX but never both; controls power state
26  -- and clock source; 1=TX, 0=RX
27  clock_source : std_logic --if '1' then the BUFR's will be
28  --instantiated and output clocks provided
29  --if '0' then the outside clock will be used
30  );
31  port
32  (
33  MGTREFCLK : in std_logic; --buffer has to be external
34  gtx_reset : in std_logic;
35  local_pll_lock_out : out std_logic;
36  GTX_TX_READY_OUT : out std_logic;
37  GTX_RX_READY_OUT : out std_logic;
38  PLLLKDET_diag : out std_logic;
39  local_gtx_reset_diag : out std_logic;
40  local_mmcm_reset_diag : out std_logic;
41  GTXTEST_diag : out std_logic;
42  RXN_IN : in std_logic;
43  RXP_IN : in std_logic;
44  TXN_OUT : out std_logic;
45  TXP_OUT : out std_logic;
46  clk40_out : out std_logic;
47  clk120_out : out std_logic;
48  clk40_in : in std_logic;
49  clk120_in : in std_logic;
50  indata : in std_logic_vector(7 downto 0);
51  odata : out std_logic_vector(7 downto 0);
52  TXPREEMPHASIS_IN : in std_logic_vector(3 downto 0);
53  TXPOSTEMPHASIS_IN : in std_logic_vector(4 downto 0);
54  TXDIFFCTRL_IN : in std_logic_vector(3 downto 0);
55  RXEQMIX_IN : in std_logic_vector(2 downto 0);
56  DFECLKDLYADJ : in std_logic_vector(5 downto 0);
57  DFECLKDLYADJMON : out std_logic_vector(5 downto 0);
58  DFEDLYOVRD : in std_logic;
59  DFEEYEDACMON : out std_logic_vector(4 downto 0);
60  DFESENSCAL : out std_logic_vector(2 downto 0);
61  DFETAP1 : in std_logic_vector(4 downto 0);
62  DFETAP1MONITOR : out std_logic_vector(4 downto 0);
63  DFETAP2 : in std_logic_vector(4 downto 0);
64  DFETAP2MONITOR : out std_logic_vector(4 downto 0);
65  DFETAP3 : in std_logic_vector(3 downto 0);
66  DFETAP3MONITOR : out std_logic_vector(3 downto 0);
67  DFETAP4 : in std_logic_vector(3 downto 0);
68  DFETAP4MONITOR : out std_logic_vector(3 downto 0);
69  DFETAPOVRD : in std_logic
70  );
71 
72 
73 
74 
75 
76 
77 end SFP_Data_TXRX;
78 
79 
80 
81 architecture RTL of SFP_Data_TXRX is
82 
83 
84  signal local_mmcm_reset : std_logic;
85  --signal local_mmcm_reset_undelayed : std_logic;
86  signal local_pll_lock : std_logic;
87  signal local_gtx_reset: std_logic;
88  --signal local_gtx_reset_undelayed: std_logic;
89 
90  component Delay is
91  generic (
92  del_length : integer);
93  port (
94  undelayed_in : in std_logic;
95  delayed_out : out std_logic;
96  clk : in std_logic);
97  end component Delay;
98 
99  ------------------------ Loopback and Powerdown Ports ----------------------
100  signal RXPOWERDOWN_IN : std_logic_vector(1 downto 0);
101  signal TXPOWERDOWN_IN : std_logic_vector(1 downto 0);
102  ------------------- Receive Ports - RX Data Path interface -----------------
103  signal RXDATA_OUT : std_logic_vector(7 downto 0);
104  signal RXRECCLK_OUT : std_logic;
105  signal RXRESET_IN : std_logic;
106  signal RXUSRCLK2_IN : std_logic;
107  ------------------ Transmit Ports - TX Data Path interface -----------------
108  signal TXDATA_IN : std_logic_vector(7 downto 0);
109  signal TXOUTCLK_OUT : std_logic;
110  signal TXRESET_IN : std_logic;
111  signal TXUSRCLK2_IN : std_logic;
112 
113  --------------- Transmit Ports - TX Driver and OOB signalling --------------
114  signal TXRESETDONE_OUT : std_logic;
115  signal RXRESETDONE_OUT : std_logic;
116 
117  signal RXPLLLKDET : std_logic;
118  signal TXPLLLKDET : std_logic;
119  signal PLLLKDET : std_logic;
120  signal PLLLKDET_r,PLLLKDET_rr : std_logic;
121 
122  signal GTXTEST : std_logic_vector(12 downto 0); --nominal: "1000000000000"
123  signal GTXTEST_DOUBLE_RESET_BIT : std_logic;
124  signal TXRXRESET : std_logic;
125 
126  signal double_reset_counter: unsigned(10 downto 0);
127  signal double_reset_counter_next: unsigned(10 downto 0);
128 
129  -- RX Datapath signals
130  signal rxdata_i : std_logic_vector(31 downto 0);
131 
132 
133  -- TX Datapath signals
134  signal txdata_i : std_logic_vector(31 downto 0);
135 
136  signal clk40_sig : std_logic;
137  signal clk120_sig : std_logic;
138 
139  -- ground and tied_to_vcc_i signals
140  signal tied_to_ground_i : std_logic;
141  signal tied_to_ground_vec_i : std_logic_vector(63 downto 0);
142  signal tied_to_vcc_i : std_logic;
143 
144  signal MGTREFCLK_IN : std_logic_vector(1 downto 0);
145 
146  signal rxrec_pll_locked : std_logic;
147  signal txrec_pll_locked : std_logic;
148 
149  component sfp_clk_manager
150  port
151  (-- Clock in ports
152  CLK_IN1 : in std_logic;
153  -- Clock out ports
154  CLK_OUT1 : out std_logic;
155  CLK_OUT2 : out std_logic;
156  -- Status and control signals
157  RESET : in std_logic;
158  LOCKED : out std_logic
159  );
160  end component;
161 
162 
163 begin
164 
165 
166  --double reset procedure ug366 v2.6 p137
167 
169  TXRXRESET<='0';
170 
171  --double_reset_counter_next<=double_reset_counter+1 when double_reset_counter/=to_unsigned(2047,11) else to_unsigned(2047,11);
172  --process(MGTREFCLK)
173  --begin
174  --
175  -- if rising_edge(MGTREFCLK) then
176  -- if PLLLKDET_rr/='1' then
177  -- double_reset_counter<=to_unsigned(0,11);
178  -- GTXTEST_DOUBLE_RESET_BIT<='0';
179  -- TXRXRESET<='0';
180  -- else
181  --
182  -- double_reset_counter<=double_reset_counter_next;
183  --
184  -- if (double_reset_counter>to_unsigned(1050,11) and double_reset_counter<=to_unsigned(1350,11))
185  -- or (double_reset_counter>to_unsigned(1650,11) and double_reset_counter<=to_unsigned(1950,11)) then
186  -- GTXTEST_DOUBLE_RESET_BIT<='1';
187  -- else
188  -- GTXTEST_DOUBLE_RESET_BIT<='0';
189  -- end if;
190  --
191  -- if double_reset_counter=to_unsigned(1954,11) then
192  -- TXRXRESET<='1';
193  -- else
194  -- TXRXRESET<='0';
195  -- end if;
196  -- end if;
197  --
198  -- PLLLKDET_rr<=PLLLKDET_r;
199  -- PLLLKDET_r<=PLLLKDET;
200  --
201  -- end if;
202  --end process;
203 
204 
205 
206  GTXTEST<="10000000000"& GTXTEST_DOUBLE_RESET_BIT &'0';
208  local_gtx_reset_diag<=local_gtx_reset;
209  local_gtx_reset<=gtx_reset;
210  local_mmcm_reset_diag<=local_mmcm_reset;
212 
213 
214  tied_to_ground_i <= '0';
215  tied_to_ground_vec_i <= x"0000000000000000";
216  tied_to_vcc_i <= '1';
217 
219 
220  RXDATA_OUT <= rxdata_i(7 downto 0);
221  odata<=RXDATA_OUT;
222  TXDATA_IN<=indata;
223  txdata_i <= (tied_to_ground_vec_i(23 downto 0) & TXDATA_IN);
224 
225  TXPOWERDOWN_IN<=((not direction) & (not direction));
227 
228  local_mmcm_reset<=not PLLLKDET;
229 
230  gen_connect_mmcm_reset_TX: if direction='1' generate
233  RXRESET_IN<='0';
234  end generate gen_connect_mmcm_reset_TX;
235  gen_connect_mmcm_reset_RX: if direction='0' generate
238  TXRESET_IN<='0';
239  end generate gen_connect_mmcm_reset_RX;
240 
243 
244  gen_clock_source: if clock_source='1' generate
245  gen_BUFR_RX: if direction='0' generate
246 
247 
248 -- rxrecclk_bufr_i_div1 : BUFR
249 -- generic map
250 -- (
251 -- BUFR_DIVIDE => "1",
252 -- SIM_DEVICE => "VIRTEX6"
253 -- )
254 -- port map
255 -- (
256 -- CE => '1',
257 -- CLR => '0',
258 -- I => RXRECCLK_OUT,
259 -- O => clk120_sig
260 -- );
261 
262 
263 -- rxrecclk_bufr_i_div3 : BUFR
264 -- generic map
265 -- (
266 -- BUFR_DIVIDE => "3",
267 -- SIM_DEVICE => "VIRTEX6"
268 -- )
269 -- port map
270 -- (
271 -- CE => '1',
272 -- CLR => '0',
273 -- I => RXRECCLK_OUT,
274 -- O => clk40_sig
275 -- );
276 
277 
278  rxrecclk_i : sfp_clk_manager
279  port map
280  (-- Clock in ports
281  CLK_IN1 => RXRECCLK_OUT,
282  -- Clock out ports
283  CLK_OUT1 => clk120_sig,
284  CLK_OUT2 => clk40_sig,
285  -- Status and control signals
286  RESET => local_mmcm_reset ,
287  LOCKED => local_pll_lock
288  );
289 
290 
291 
294 
296 
297 
298 
299  end generate gen_BUFR_RX;
300 
301 
302  gen_BUFR_TX: if direction='1' generate
303 
304 --
305 -- txoutclk_bufr_i_div1 : BUFR
306 -- generic map
307 -- (
308 -- BUFR_DIVIDE => "1",
309 -- SIM_DEVICE => "VIRTEX6"
310 -- )
311 -- port map
312 -- (
313 -- CE => '1',
314 -- CLR => '0',
315 -- I => TXOUTCLK_OUT,
316 -- O => clk120_sig
317 -- );
318 --
319 -- txoutclk_bufr_i_div3 : BUFR
320 -- generic map
321 -- (
322 -- BUFR_DIVIDE => "3",
323 -- SIM_DEVICE => "VIRTEX6"
324 -- )
325 -- port map
326 -- (
327 -- CE => '1',
328 -- CLR => '0',
329 -- I => TXOUTCLK_OUT,
330 -- O => clk40_sig
331 -- );
332 
333 
334  txrecclk_i : sfp_clk_manager
335  port map
336  (-- Clock in ports
337  CLK_IN1 => TXOUTCLK_OUT,
338  -- Clock out ports
339  CLK_OUT1 => clk120_sig,
340  CLK_OUT2 => clk40_sig,
341  -- Status and control signals
342  RESET => local_mmcm_reset ,
343  LOCKED => local_pll_lock
344  );
345 
348 
350  end generate gen_BUFR_TX;
351 
352  --process(MGTREFCLK, sys_pll_lock)
353  --begin
354  -- if sys_pll_lock/='1' then
355  -- local_gtx_reset_undelayed<='1';
356  -- elsif rising_edge(MGTREFCLK) then
357  -- local_gtx_reset_undelayed<='0';
358  -- end if;
359  --end process;
360 
361 
362  end generate gen_clock_source;
363 
364  local_pll_lock_out<=local_pll_lock;
365 
366 
367  --Delay_local_gtx_reset: entity work.Delay
368  -- generic map (
369  -- del_length => 200)
370  -- port map (
371  -- undelayed_in => local_gtx_reset_undelayed,
372  -- delayed_out => local_gtx_reset,
373  -- clk => MGTREFCLK);
374 
375 
376  gen_clock_sink: if clock_source='0' generate
377 
378  local_pll_lock<='0';
379 
380  --process(MGTREFCLK, other_sfp_pll_lock)
381  --begin
382  -- if other_sfp_pll_lock/='1' then
383  -- local_gtx_reset_undelayed<='1';
384  -- elsif rising_edge(MGTREFCLK) then
385  -- local_gtx_reset_undelayed<='0';
386  -- end if;
387  --end process;
388 
389  gen_sink_RX: if direction='0' generate
392 
393  --WTF 2050216 clk40_out<=clk40_sig;
395  end generate gen_sink_RX;
396 
397 
398  gen_sink_TX: if direction='1' generate
401 
403  end generate gen_sink_TX;
404 
405  end generate gen_clock_sink;
406 
407 
408 
409  gtxe1_i :GTXE1
410  generic map
411  (
412 
413  --_______________________ Simulation-Only Attributes ___________________
414 
415  SIM_RECEIVER_DETECT_PASS => (TRUE),
416 
417  SIM_GTXRESET_SPEEDUP => (0),
418 
419  SIM_TX_ELEC_IDLE_LEVEL => ("X"),
420 
421  SIM_VERSION => ("2.0"),
422  SIM_TXREFCLK_SOURCE => ("000"),
423  SIM_RXREFCLK_SOURCE => ("000"),
424 
425 
426  ----------------------------TX PLL----------------------------
427  TX_CLK_SOURCE => ("TXPLL"),
428  TX_OVERSAMPLE_MODE => (FALSE),
429  TXPLL_COM_CFG => (x"21680a"),
430  TXPLL_CP_CFG => (x"0D"),
431  TXPLL_DIVSEL_FB => (4),
432  TXPLL_DIVSEL_OUT => (4),
433  TXPLL_DIVSEL_REF => (1),
434  TXPLL_DIVSEL45_FB => (4),
435  TXPLL_LKDET_CFG => ("111"),
436  TX_CLK25_DIVIDER => (5),
437  TXPLL_SATA => ("00"),
438  TX_TDCC_CFG => ("00"),
439  PMA_CAS_CLK_EN => (FALSE),
440  POWER_SAVE => ("0000110000"),
441 
442  -------------------------TX Interface-------------------------
443  GEN_TXUSRCLK => (TRUE),
444  TX_DATA_WIDTH => (8),
445  TX_USRCLK_CFG => (x"00"),
446  TXOUTCLK_CTRL => ("TXOUTCLKPMA_DIV1"),
447  TXOUTCLK_DLY => ("0000000000"),
448 
449  --------------TX Buffering and Phase Alignment----------------
450  TX_PMADATA_OPT => ('0'),
451  PMA_TX_CFG => (x"80082"),
452  TX_BUFFER_USE => (TRUE),
453  TX_BYTECLK_CFG => (x"00"),
454  TX_EN_RATE_RESET_BUF => (TRUE),
455  TX_XCLK_SEL => ("TXOUT"),
456  TX_DLYALIGN_CTRINC => ("0100"),
457  TX_DLYALIGN_LPFINC => ("0110"),
458  TX_DLYALIGN_MONSEL => ("000"),
459  TX_DLYALIGN_OVRDSETTING => ("10000000"),
460 
461  -------------------------TX Gearbox---------------------------
462  GEARBOX_ENDEC => ("000"),
463  TXGEARBOX_USE => (FALSE),
464 
465  ----------------TX Driver and OOB Signalling------------------
466  TX_DRIVE_MODE => ("DIRECT"),
467  TX_IDLE_ASSERT_DELAY => ("101"),
468  TX_IDLE_DEASSERT_DELAY => ("011"),
469  TXDRIVE_LOOPBACK_HIZ => (FALSE),
470  TXDRIVE_LOOPBACK_PD => (FALSE),
471 
472  --------------TX Pipe Control for PCI Express/SATA------------
473  COM_BURST_VAL => ("1111"),
474 
475  ------------------TX Attributes for PCI Express---------------
476  TX_DEEMPH_0 => ("11010"),
477  TX_DEEMPH_1 => ("10000"),
478  TX_MARGIN_FULL_0 => ("1001110"),
479  TX_MARGIN_FULL_1 => ("1001001"),
480  TX_MARGIN_FULL_2 => ("1000101"),
481  TX_MARGIN_FULL_3 => ("1000010"),
482  TX_MARGIN_FULL_4 => ("1000000"),
483  TX_MARGIN_LOW_0 => ("1000110"),
484  TX_MARGIN_LOW_1 => ("1000100"),
485  TX_MARGIN_LOW_2 => ("1000010"),
486  TX_MARGIN_LOW_3 => ("1000000"),
487  TX_MARGIN_LOW_4 => ("1000000"),
488 
489  ----------------------------RX PLL----------------------------
490  RX_OVERSAMPLE_MODE => (FALSE),
491  RXPLL_COM_CFG => (x"21680a"),
492  RXPLL_CP_CFG => (x"0D"),
493  RXPLL_DIVSEL_FB => (4),
494  RXPLL_DIVSEL_OUT => (4),
495  RXPLL_DIVSEL_REF => (1),
496  RXPLL_DIVSEL45_FB => (4),
497  RXPLL_LKDET_CFG => ("111"),
498  RX_CLK25_DIVIDER => (5),
499 
500  -------------------------RX Interface-------------------------
501  GEN_RXUSRCLK => (TRUE),
502  RX_DATA_WIDTH => (8),
503  RXRECCLK_CTRL => ("RXRECCLKPMA_DIV1"),
504  RXRECCLK_DLY => ("0000000000"),
505  RXUSRCLK_DLY => (x"0000"),
506 
507  ----------RX Driver,OOB signalling,Coupling and Eq.,CDR-------
508  AC_CAP_DIS => (FALSE),
509  CDR_PH_ADJ_TIME => ("10100"),
510  OOBDETECT_THRESHOLD => ("011"),
511  PMA_CDR_SCAN => (x"640404C"),
512  PMA_RX_CFG => (x"05ce008"),
513  RCV_TERM_GND => (FALSE),
514  RCV_TERM_VTTRX => (TRUE),
515  RX_EN_IDLE_HOLD_CDR => (FALSE),
516  RX_EN_IDLE_RESET_FR => (FALSE),
517  RX_EN_IDLE_RESET_PH => (FALSE),
518  TX_DETECT_RX_CFG => (x"1832"),
519  TERMINATION_CTRL => ("00000"),
520  TERMINATION_OVRD => (FALSE),
521  CM_TRIM => ("01"),
522  PMA_RXSYNC_CFG => (x"00"),
523  PMA_CFG => (x"0040000040000000003"),
524  BGTEST_CFG => ("00"),
525  BIAS_CFG => (x"00000"),
526 
527  --------------RX Decision Feedback Equalizer(DFE)-------------
528  DFE_CAL_TIME => ("01100"),
529  DFE_CFG => ("00011011"),
530  RX_EN_IDLE_HOLD_DFE => (TRUE),
531  RX_EYE_OFFSET => (x"4C"),
532  RX_EYE_SCANMODE => ("00"),
533 
534  -------------------------PRBS Detection-----------------------
535  RXPRBSERR_LOOPBACK => ('0'),
536 
537  ------------------Comma Detection and Alignment---------------
538  ALIGN_COMMA_WORD => (1),
539  COMMA_10B_ENABLE => ("1111111111"),
540  COMMA_DOUBLE => (FALSE),
541  DEC_MCOMMA_DETECT => (FALSE),
542  DEC_PCOMMA_DETECT => (FALSE),
543  DEC_VALID_COMMA_ONLY => (FALSE),
544  MCOMMA_10B_VALUE => ("1010000011"),
545  MCOMMA_DETECT => (TRUE),
546  PCOMMA_10B_VALUE => ("0101111100"),
547  PCOMMA_DETECT => (TRUE),
548  RX_DECODE_SEQ_MATCH => (FALSE),
549  RX_SLIDE_AUTO_WAIT => (5),
550  RX_SLIDE_MODE => ("OFF"),
551  SHOW_REALIGN_COMMA => (TRUE),
552 
553  -----------------RX Loss-of-sync State Machine----------------
554  RX_LOS_INVALID_INCR => (8),
555  RX_LOS_THRESHOLD => (128),
556  RX_LOSS_OF_SYNC_FSM => (FALSE),
557 
558  -------------------------RX Gearbox---------------------------
559  RXGEARBOX_USE => (FALSE),
560 
561  -------------RX Elastic Buffer and Phase alignment------------
562  RX_BUFFER_USE => (TRUE),
563  RX_EN_IDLE_RESET_BUF => (FALSE),
564  RX_EN_MODE_RESET_BUF => (TRUE),
565  RX_EN_RATE_RESET_BUF => (TRUE),
566  RX_EN_REALIGN_RESET_BUF => (FALSE),
567  RX_EN_REALIGN_RESET_BUF2 => (FALSE),
568  RX_FIFO_ADDR_MODE => ("FAST"),
569  RX_IDLE_HI_CNT => ("1000"),
570  RX_IDLE_LO_CNT => ("0000"),
571  RX_XCLK_SEL => ("RXREC"),
572  RX_DLYALIGN_CTRINC => ("1110"),
573  RX_DLYALIGN_EDGESET => ("00010"),
574  RX_DLYALIGN_LPFINC => ("1110"),
575  RX_DLYALIGN_MONSEL => ("000"),
576  RX_DLYALIGN_OVRDSETTING => ("10000000"),
577 
578  ------------------------Clock Correction----------------------
579  CLK_COR_ADJ_LEN => (1),
580  CLK_COR_DET_LEN => (1),
581  CLK_COR_INSERT_IDLE_FLAG => (FALSE),
582  CLK_COR_KEEP_IDLE => (FALSE),
583  CLK_COR_MAX_LAT => (16),
584  CLK_COR_MIN_LAT => (14),
585  CLK_COR_PRECEDENCE => (TRUE),
586  CLK_COR_REPEAT_WAIT => (0),
587  CLK_COR_SEQ_1_1 => ("0000000000"),
588  CLK_COR_SEQ_1_2 => ("0000000000"),
589  CLK_COR_SEQ_1_3 => ("0000000000"),
590  CLK_COR_SEQ_1_4 => ("0000000000"),
591  CLK_COR_SEQ_1_ENABLE => ("1111"),
592  CLK_COR_SEQ_2_1 => ("0000000000"),
593  CLK_COR_SEQ_2_2 => ("0000000000"),
594  CLK_COR_SEQ_2_3 => ("0000000000"),
595  CLK_COR_SEQ_2_4 => ("0000000000"),
596  CLK_COR_SEQ_2_ENABLE => ("1111"),
597  CLK_COR_SEQ_2_USE => (FALSE),
598  CLK_CORRECT_USE => (FALSE),
599 
600  ------------------------Channel Bonding----------------------
601  CHAN_BOND_1_MAX_SKEW => (1),
602  CHAN_BOND_2_MAX_SKEW => (1),
603  CHAN_BOND_KEEP_ALIGN => (FALSE),
604  CHAN_BOND_SEQ_1_1 => ("0000000000"),
605  CHAN_BOND_SEQ_1_2 => ("0000000000"),
606  CHAN_BOND_SEQ_1_3 => ("0000000000"),
607  CHAN_BOND_SEQ_1_4 => ("0000000000"),
608  CHAN_BOND_SEQ_1_ENABLE => ("1111"),
609  CHAN_BOND_SEQ_2_1 => ("0000000000"),
610  CHAN_BOND_SEQ_2_2 => ("0000000000"),
611  CHAN_BOND_SEQ_2_3 => ("0000000000"),
612  CHAN_BOND_SEQ_2_4 => ("0000000000"),
613  CHAN_BOND_SEQ_2_CFG => ("00000"),
614  CHAN_BOND_SEQ_2_ENABLE => ("1111"),
615  CHAN_BOND_SEQ_2_USE => (FALSE),
616  CHAN_BOND_SEQ_LEN => (1),
617  PCI_EXPRESS_MODE => (FALSE),
618 
619  -------------RX Attributes for PCI Express/SATA/SAS----------
620  SAS_MAX_COMSAS => (52),
621  SAS_MIN_COMSAS => (40),
622  SATA_BURST_VAL => ("100"),
623  SATA_IDLE_VAL => ("100"),
624  SATA_MAX_BURST => (9),
625  SATA_MAX_INIT => (26),
626  SATA_MAX_WAKE => (9),
627  SATA_MIN_BURST => (5),
628  SATA_MIN_INIT => (14),
629  SATA_MIN_WAKE => (5),
630  TRANS_TIME_FROM_P2 => (x"03c"),
631  TRANS_TIME_NON_P2 => (x"19"),
632  TRANS_TIME_RATE => (x"ff"),
633  TRANS_TIME_TO_P2 => (x"064")
634 
635 
636  )
637  port map
638  (
639  ------------------------ Loopback and Powerdown Ports ----------------------
640  LOOPBACK => tied_to_ground_vec_i (2 downto 0),
641  RXPOWERDOWN => RXPOWERDOWN_IN,
642  TXPOWERDOWN => TXPOWERDOWN_IN,
643  -------------- Receive Ports - 64b66b and 64b67b Gearbox Ports -------------
644  RXDATAVALID => open,
645  RXGEARBOXSLIP => tied_to_ground_i,
646  RXHEADER => open,
647  RXHEADERVALID => open,
648  RXSTARTOFSEQ => open,
649  ----------------------- Receive Ports - 8b10b Decoder ----------------------
650  RXCHARISCOMMA => open,
651  RXCHARISK => open,
652  RXDEC8B10BUSE => tied_to_ground_i,
653  RXDISPERR => open,
654  RXNOTINTABLE => open,
655  RXRUNDISP => open,
656  USRCODEERR => tied_to_ground_i,
657  ------------------- Receive Ports - Channel Bonding Ports ------------------
658  RXCHANBONDSEQ => open,
659  RXCHBONDI => tied_to_ground_vec_i (3 downto 0),
660  RXCHBONDLEVEL => tied_to_ground_vec_i (2 downto 0),
661  RXCHBONDMASTER => tied_to_ground_i,
662  RXCHBONDO => open,
663  RXCHBONDSLAVE => tied_to_ground_i,
664  RXENCHANSYNC => tied_to_ground_i,
665  ------------------- Receive Ports - Clock Correction Ports -----------------
666  RXCLKCORCNT => open,
667  --------------- Receive Ports - Comma Detection and Alignment --------------
668  RXBYTEISALIGNED => open,
669  RXBYTEREALIGN => open,
670  RXCOMMADET => open,
671  RXCOMMADETUSE => tied_to_ground_i,
672  RXENMCOMMAALIGN => tied_to_ground_i,
673  RXENPCOMMAALIGN => tied_to_ground_i,
674  RXSLIDE => tied_to_ground_i,
675  ----------------------- Receive Ports - PRBS Detection ---------------------
676  PRBSCNTRESET => tied_to_ground_i,
677  RXENPRBSTST => tied_to_ground_vec_i (2 downto 0),
678  RXPRBSERR => open,
679  ------------------- Receive Ports - RX Data Path interface -----------------
680  RXDATA => rxdata_i,
681  RXRECCLK => RXRECCLK_OUT ,
682  RXRECCLKPCS => open,
683  RXRESET => tied_to_ground_i,
684  RXUSRCLK => tied_to_ground_i,
685  RXUSRCLK2 => RXUSRCLK2_IN ,
686  ------------ Receive Ports - RX Decision Feedback Equalizer(DFE) -----------
687  DFECLKDLYADJ => DFECLKDLYADJ ,
688  DFECLKDLYADJMON => DFECLKDLYADJMON,
689  DFEDLYOVRD => DFEDLYOVRD,
690  DFEEYEDACMON => DFEEYEDACMON ,
691  DFESENSCAL => DFESENSCAL,
692  DFETAP1 => DFETAP1,
693  DFETAP1MONITOR => DFETAP1MONITOR,
694  DFETAP2 => DFETAP2,
695  DFETAP2MONITOR => DFETAP2MONITOR,
696  DFETAP3 => DFETAP3,
697  DFETAP3MONITOR => DFETAP3MONITOR,
698  DFETAP4 => DFETAP4,
699  DFETAP4MONITOR => DFETAP4MONITOR,
700  DFETAPOVRD => DFETAPOVRD,
701  ------- Receive Ports - RX Driver,OOB signalling,Coupling and Eq.,CDR ------
702  GATERXELECIDLE => tied_to_vcc_i,
703  IGNORESIGDET => tied_to_vcc_i,
704  RXCDRRESET => tied_to_ground_i,
705  RXELECIDLE => open,
706  RXEQMIX(9 downto 3) => tied_to_ground_vec_i (6 downto 0),
707  RXEQMIX(2 downto 0) => RXEQMIX_IN,
708  RXN => RXN_IN,
709  RXP => RXP_IN,
710  -------- Receive Ports - RX Elastic Buffer and Phase Alignment Ports -------
711  RXBUFRESET => tied_to_ground_i,
712  RXBUFSTATUS => open,
713  RXCHANISALIGNED => open,
714  RXCHANREALIGN => open,
715  RXDLYALIGNDISABLE => tied_to_ground_i,
716  RXDLYALIGNMONENB => tied_to_ground_i,
717  RXDLYALIGNMONITOR => open,
718  RXDLYALIGNOVERRIDE => tied_to_vcc_i,
719  RXDLYALIGNRESET => tied_to_ground_i,
720  RXDLYALIGNSWPPRECURB => tied_to_vcc_i,
721  RXDLYALIGNUPDSW => tied_to_ground_i,
722  RXENPMAPHASEALIGN => tied_to_ground_i,
723  RXPMASETPHASE => tied_to_ground_i,
724  RXSTATUS => open,
725  --------------- Receive Ports - RX Loss-of-sync State Machine --------------
726  RXLOSSOFSYNC => open,
727  ---------------------- Receive Ports - RX Oversampling ---------------------
728  RXENSAMPLEALIGN => tied_to_ground_i,
729  RXOVERSAMPLEERR => open,
730  ------------------------ Receive Ports - RX PLL Ports ----------------------
731  GREFCLKRX => tied_to_ground_i,
732  GTXRXRESET => local_gtx_reset,
733  MGTREFCLKRX => MGTREFCLK_IN ,
734  NORTHREFCLKRX => tied_to_ground_vec_i (1 downto 0),
735  PERFCLKRX => tied_to_ground_i,
736  PLLRXRESET => tied_to_ground_i,
737  RXPLLLKDET => RXPLLLKDET,
738  RXPLLLKDETEN => tied_to_vcc_i,
739  RXPLLPOWERDOWN => tied_to_ground_i,
740  RXPLLREFSELDY => tied_to_ground_vec_i (2 downto 0),
741  RXRATE => tied_to_ground_vec_i (1 downto 0),
742  RXRATEDONE => open,
743  RXRESETDONE => RXRESETDONE_OUT,
744  SOUTHREFCLKRX => tied_to_ground_vec_i (1 downto 0),
745  -------------- Receive Ports - RX Pipe Control for PCI Express -------------
746  PHYSTATUS => open,
747  RXVALID => open,
748  ----------------- Receive Ports - RX Polarity Control Ports ----------------
749  RXPOLARITY => tied_to_ground_i,
750  --------------------- Receive Ports - RX Ports for SATA --------------------
751  COMINITDET => open,
752  COMSASDET => open,
753  COMWAKEDET => open,
754  ------------- Shared Ports - Dynamic Reconfiguration Port (DRP) ------------
755  DADDR => tied_to_ground_vec_i (7 downto 0),
756  DCLK => tied_to_ground_i,
757  DEN => tied_to_ground_i,
758  DI => tied_to_ground_vec_i (15 downto 0),
759  DRDY => open,
760  DRPDO => open,
761  DWE => tied_to_ground_i,
762  -------------- Transmit Ports - 64b66b and 64b67b Gearbox Ports ------------
763  TXGEARBOXREADY => open,
764  TXHEADER => tied_to_ground_vec_i (2 downto 0),
765  TXSEQUENCE => tied_to_ground_vec_i (6 downto 0),
766  TXSTARTSEQ => tied_to_ground_i,
767  ---------------- Transmit Ports - 8b10b Encoder Control Ports --------------
768  TXBYPASS8B10B => tied_to_ground_vec_i (3 downto 0),
769  TXCHARDISPMODE => tied_to_ground_vec_i (3 downto 0),
770  TXCHARDISPVAL => tied_to_ground_vec_i (3 downto 0),
771  TXCHARISK => tied_to_ground_vec_i (3 downto 0),
772  TXENC8B10BUSE => tied_to_ground_i,
773  TXKERR => open,
774  TXRUNDISP => open,
775  ------------------------- Transmit Ports - GTX Ports -----------------------
776  GTXTEST => GTXTEST,
777  MGTREFCLKFAB => open,
778  TSTCLK0 => tied_to_ground_i,
779  TSTCLK1 => tied_to_ground_i,
780  TSTIN => "11111111111111111111" ,
781  TSTOUT => open,
782  ------------------ Transmit Ports - TX Data Path interface -----------------
783  TXDATA => txdata_i,
784  TXOUTCLK => TXOUTCLK_OUT ,
785  TXOUTCLKPCS => open,
786  TXRESET => tied_to_ground_i,
787  TXUSRCLK => tied_to_ground_i,
788  TXUSRCLK2 => TXUSRCLK2_IN ,
789  ---------------- Transmit Ports - TX Driver and OOB signaling --------------
790  TXBUFDIFFCTRL => "100",
791  TXDIFFCTRL => TXDIFFCTRL_IN,
792  TXINHIBIT => tied_to_ground_i,
793  TXN => TXN_OUT,
794  TXP => TXP_OUT,
795  TXPOSTEMPHASIS => TXPOSTEMPHASIS_IN,
796  --------------- Transmit Ports - TX Driver and OOB signalling --------------
797  TXPREEMPHASIS => TXPREEMPHASIS_IN,
798  ----------- Transmit Ports - TX Elastic Buffer and Phase Alignment ---------
799  TXBUFSTATUS => open,
800  -------- Transmit Ports - TX Elastic Buffer and Phase Alignment Ports ------
801  TXDLYALIGNDISABLE => tied_to_vcc_i,
802  TXDLYALIGNMONENB => tied_to_ground_i,
803  TXDLYALIGNMONITOR => open,
804  TXDLYALIGNOVERRIDE => tied_to_ground_i,
805  TXDLYALIGNRESET => tied_to_ground_i,
806  TXDLYALIGNUPDSW => tied_to_vcc_i,
807  TXENPMAPHASEALIGN => tied_to_ground_i,
808  TXPMASETPHASE => tied_to_ground_i,
809  ----------------------- Transmit Ports - TX PLL Ports ----------------------
810  GREFCLKTX => tied_to_ground_i,
811  GTXTXRESET => local_gtx_reset,
812  MGTREFCLKTX => MGTREFCLK_IN ,
813  NORTHREFCLKTX => tied_to_ground_vec_i (1 downto 0),
814  PERFCLKTX => tied_to_ground_i,
815  PLLTXRESET => tied_to_ground_i,
816  SOUTHREFCLKTX => tied_to_ground_vec_i (1 downto 0),
817  TXPLLLKDET => TXPLLLKDET,
818  TXPLLLKDETEN => tied_to_vcc_i,
819  TXPLLPOWERDOWN => tied_to_ground_i,
820  TXPLLREFSELDY => tied_to_ground_vec_i (2 downto 0),
821  TXRATE => tied_to_ground_vec_i (1 downto 0),
822  TXRATEDONE => open,
823  TXRESETDONE => TXRESETDONE_OUT,
824  --------------------- Transmit Ports - TX PRBS Generator -------------------
825  TXENPRBSTST => tied_to_ground_vec_i (2 downto 0),
826  TXPRBSFORCEERR => tied_to_ground_i,
827  -------------------- Transmit Ports - TX Polarity Control ------------------
828  TXPOLARITY => tied_to_ground_i,
829  ----------------- Transmit Ports - TX Ports for PCI Express ----------------
830  TXDEEMPH => tied_to_ground_i,
831  TXDETECTRX => tied_to_ground_i,
832  TXELECIDLE => tied_to_ground_i,
833  TXMARGIN => tied_to_ground_vec_i (2 downto 0),
834  TXPDOWNASYNCH => tied_to_ground_i,
835  TXSWING => tied_to_ground_i,
836  --------------------- Transmit Ports - TX Ports for SATA -------------------
837  COMFINISH => open,
838  TXCOMINIT => tied_to_ground_i,
839  TXCOMSAS => tied_to_ground_i,
840  TXCOMWAKE => tied_to_ground_i
841 
842  );
843 
844 
845 
846 end RTL;
847 
std_logic_vector (12 downto 0) GTXTEST
Definition: SFP_TXRX.vhd:122
std_logic rxrec_pll_locked
Definition: SFP_TXRX.vhd:146
std_logic_vector (31 downto 0) rxdata_i
Definition: SFP_TXRX.vhd:130
std_logic TXOUTCLK_OUT
Definition: SFP_TXRX.vhd:109
std_logic_vector (1 downto 0) TXPOWERDOWN_IN
Definition: SFP_TXRX.vhd:101
out DFETAP2MONITORstd_logic_vector (4 downto 0)
Definition: SFP_TXRX.vhd:64
std_logic PLLLKDET
Definition: SFP_TXRX.vhd:119
std_logic_vector (31 downto 0) txdata_i
Definition: SFP_TXRX.vhd:134
sfp_clk_manager rxrecclk_irxrecclk_i
Definition: SFP_TXRX.vhd:278
in DFETAP4std_logic_vector (3 downto 0)
Definition: SFP_TXRX.vhd:67
out TXN_OUTstd_logic
Definition: SFP_TXRX.vhd:44
unsigned (10 downto 0) double_reset_counter_next
Definition: SFP_TXRX.vhd:127
in TXDIFFCTRL_INstd_logic_vector (3 downto 0)
Definition: SFP_TXRX.vhd:54
del_lengthinteger :=2
Definition: Delay.vhd:20
std_logic PLLLKDET_r
Definition: SFP_TXRX.vhd:120
std_logic TXRESETDONE_OUT
Definition: SFP_TXRX.vhd:114
in TXPREEMPHASIS_INstd_logic_vector (3 downto 0)
Definition: SFP_TXRX.vhd:52
out TXP_OUTstd_logic
Definition: SFP_TXRX.vhd:45
out DFECLKDLYADJMONstd_logic_vector (5 downto 0)
Definition: SFP_TXRX.vhd:57
std_logic txrec_pll_locked
Definition: SFP_TXRX.vhd:147
in clk120_instd_logic
Definition: SFP_TXRX.vhd:49
std_logic RXRESET_IN
Definition: SFP_TXRX.vhd:105
out delayed_outstd_logic
Definition: Delay.vhd:23
out GTXTEST_diagstd_logic
Definition: SFP_TXRX.vhd:41
in undelayed_instd_logic
Definition: Delay.vhd:22
std_logic TXUSRCLK2_IN
Definition: SFP_TXRX.vhd:111
std_logic RXRECCLK_OUT
Definition: SFP_TXRX.vhd:104
std_logic clk120_sig
Definition: SFP_TXRX.vhd:137
in gtx_resetstd_logic
Definition: SFP_TXRX.vhd:34
unsigned (10 downto 0) double_reset_counter
Definition: SFP_TXRX.vhd:126
in DFETAP3std_logic_vector (3 downto 0)
Definition: SFP_TXRX.vhd:65
out DFEEYEDACMONstd_logic_vector (4 downto 0)
Definition: SFP_TXRX.vhd:59
std_logic RXPLLLKDET
Definition: SFP_TXRX.vhd:117
in DFEDLYOVRDstd_logic
Definition: SFP_TXRX.vhd:58
_library_ ieeeieee
Definition: rx_sync.vhd:67
in DFECLKDLYADJstd_logic_vector (5 downto 0)
Definition: SFP_TXRX.vhd:56
in RXN_INstd_logic
Definition: SFP_TXRX.vhd:42
in TXPOSTEMPHASIS_INstd_logic_vector (4 downto 0)
Definition: SFP_TXRX.vhd:53
std_logic tied_to_ground_i
Definition: SFP_TXRX.vhd:140
std_logic_vector (1 downto 0) MGTREFCLK_IN
Definition: SFP_TXRX.vhd:144
directionstd_logic
Definition: SFP_TXRX.vhd:24
sfp_clk_manager txrecclk_itxrecclk_i
Definition: SFP_TXRX.vhd:334
std_logic TXRESET_IN
Definition: SFP_TXRX.vhd:110
out clk120_outstd_logic
Definition: SFP_TXRX.vhd:47
out DFETAP3MONITORstd_logic_vector (3 downto 0)
Definition: SFP_TXRX.vhd:66
out GTX_RX_READY_OUTstd_logic
Definition: SFP_TXRX.vhd:37
in DFETAP1std_logic_vector (4 downto 0)
Definition: SFP_TXRX.vhd:61
gtxe1 gtxe1_igtxe1_i
Definition: SFP_TXRX.vhd:409
_library_ UNISIMUNISIM
Definition: rx_sync.vhd:70
std_logic TXPLLLKDET
Definition: SFP_TXRX.vhd:118
in clk40_instd_logic
Definition: SFP_TXRX.vhd:48
out DFETAP4MONITORstd_logic_vector (3 downto 0)
Definition: SFP_TXRX.vhd:68
std_logic_vector (7 downto 0) TXDATA_IN
Definition: SFP_TXRX.vhd:108
std_logic local_pll_lock
Definition: SFP_TXRX.vhd:86
std_logic GTXTEST_DOUBLE_RESET_BIT
Definition: SFP_TXRX.vhd:123
std_logic RXUSRCLK2_IN
Definition: SFP_TXRX.vhd:106
in RXEQMIX_INstd_logic_vector (2 downto 0)
Definition: SFP_TXRX.vhd:55
std_logic RXRESETDONE_OUT
Definition: SFP_TXRX.vhd:115
in indatastd_logic_vector (7 downto 0)
Definition: SFP_TXRX.vhd:50
in clkstd_logic
Definition: Delay.vhd:24
out odatastd_logic_vector (7 downto 0)
Definition: SFP_TXRX.vhd:51
out GTX_TX_READY_OUTstd_logic
Definition: SFP_TXRX.vhd:36
std_logic_vector (63 downto 0) tied_to_ground_vec_i
Definition: SFP_TXRX.vhd:141
std_logic tied_to_vcc_i
Definition: SFP_TXRX.vhd:142
out DFETAP1MONITORstd_logic_vector (4 downto 0)
Definition: SFP_TXRX.vhd:62
in DFETAP2std_logic_vector (4 downto 0)
Definition: SFP_TXRX.vhd:63
std_logic_vector (7 downto 0) RXDATA_OUT
Definition: SFP_TXRX.vhd:103
out PLLLKDET_diagstd_logic
Definition: SFP_TXRX.vhd:38
std_logic local_gtx_reset
Definition: SFP_TXRX.vhd:87
clock_sourcestd_logic
Definition: SFP_TXRX.vhd:27
Definition: Delay.vhd:18
out DFESENSCALstd_logic_vector (2 downto 0)
Definition: SFP_TXRX.vhd:60
in MGTREFCLKstd_logic
Definition: SFP_TXRX.vhd:33
std_logic_vector (1 downto 0) RXPOWERDOWN_IN
Definition: SFP_TXRX.vhd:100
std_logic PLLLKDET_rr
Definition: SFP_TXRX.vhd:120
out clk40_outstd_logic
Definition: SFP_TXRX.vhd:46
in DFETAPOVRDstd_logic
Definition: SFP_TXRX.vhd:69
std_logic TXRXRESET
Definition: SFP_TXRX.vhd:124
in RXP_INstd_logic
Definition: SFP_TXRX.vhd:43
std_logic clk40_sig
Definition: SFP_TXRX.vhd:136
std_logic local_mmcm_reset
Definition: SFP_TXRX.vhd:84