eFEX firmware  1.7.3
ATLAS l1-calo - electron and tau feature extraction firmware for eFEX boards

Back to eFEX documentation
aurora_hub2.vhd
1 ----------------------------------------------------------------------------------
2 -- Company:STFC
3 -- Engineer: Mohammed Siyad
4 --
5 -- Create Date: 14.11.2018 18:38:21
6 -- Design Name:
7 -- Module Name: efex_aurora - Behavioral
8 -- Project Name:
9 -- Target Devices:
10 -- Tool Versions:
11 -- Description:
12 --
13 -- Dependencies:
14 --
15 -- Revision:
16 -- Revision 0.01 - File Created
17 -- Additional Comments:
18 --
19 ----------------------------------------------------------------------------------
20 
21 
22 library IEEE;
23 use IEEE.STD_LOGIC_1164.ALL;
24 use IEEE.NUMERIC_STD.ALL;
25 LIBRARY infrastructure_lib;
26 USE infrastructure_lib.all;
27 
28 
29 entity aurora_hub2 is
30  Port (
31  -- TX Stream Interface
32  s_axi_tx_tdata : in std_logic_vector(63 downto 0);
33  s_axi_tx_tvalid : in std_logic;
34  s_axi_tx_tready : out std_logic;
35  s_axi_tx_tkeep : in std_logic_vector(7 downto 0);
36  s_axi_tx_tlast : in std_logic;
37  -- User Flow Control TX Interface
38  s_axi_ufc_tx_req : in std_logic;
39  s_axi_ufc_tx_ms : in std_logic_vector(2 downto 0);
40  s_axi_ufc_tx_ack : out std_logic;
41  -- V7 Serial I/O
42  txp : out std_logic_vector(0 to 3);
43  txn : out std_logic_vector(0 to 3);
44  -- GT Reference Clock Interface
45 
46  gt_refclk1_p : in std_logic;
47  gt_refclk1_n : in std_logic;
48  -- gt control
49  aurora_gt0_txctrl :in std_logic_vector( 23 downto 0);
50  aurora_gt1_txctrl :in std_logic_vector( 23 downto 0);
51  aurora_gt2_txctrl :in std_logic_vector( 23 downto 0);
52  aurora_gt3_txctrl :in std_logic_vector( 23 downto 0);
53  -- Error Detection Interface
54  tx_hard_err : out std_logic;
55  -- Status
56  tx_channel_up : out std_logic;
57  tx_lane_up : out std_logic_vector(0 to 3);
58  -- System Interface
59  user_clk_out : out std_logic;
60  sys_reset_out : out std_logic;
61  tx_lock : out std_logic;
62  init_clk : in std_logic;
63  init_clk_out : out std_logic;
64  pll_not_locked : out std_logic;
65  tx_resetdone : out std_logic;
66  link_reset : in std_logic
67 
68 
69 
70  );
71 end aurora_hub2;
72 
73 architecture Behavioral of aurora_hub2 is
74 signal tx_system_reset_i,gt_reset_i: std_logic;
75 
76 begin
77 
78 
79 reset_timer : entity infrastructure_lib.aurora_reset
80  port map
81  (
82  init_clk => init_clk,
83  BTN0 => link_reset,
84  rst_sw => '0',
85  tx_reset => tx_system_reset_i,
86  tx_GTReset => gt_reset_i ,
87  rx_reset => open,
88  rx_GTReset => open
89  );
90 
91 aurora_core: entity infrastructure_lib.aurora_wrapper_hub2
92  Port map
93  (
94  -- TX Stream Interface
95  s_axi_tx_tdata => s_axi_tx_tdata ,
96  s_axi_tx_tvalid => s_axi_tx_tvalid ,
97  s_axi_tx_tready => s_axi_tx_tready ,
98  s_axi_tx_tkeep => s_axi_tx_tkeep ,
99  s_axi_tx_tlast => s_axi_tx_tlast ,
100  -- User Flow Control TX Interface
101  s_axi_ufc_tx_req => s_axi_ufc_tx_req,
102  s_axi_ufc_tx_ms => s_axi_ufc_tx_ms ,
103  s_axi_ufc_tx_ack => s_axi_ufc_tx_ack,
104  -- V7 Serial I/O
105  txp => txp ,
106  txn => txn ,
107  -- GT Reference Clock Interface
108  gt_refclk1_p => gt_refclk1_p,
109  gt_refclk1_n => gt_refclk1_n,
110  -- gt control
111  aurora_gt0_txctrl => aurora_gt0_txctrl ,
112  aurora_gt1_txctrl => aurora_gt1_txctrl ,
113  aurora_gt2_txctrl => aurora_gt2_txctrl ,
114  aurora_gt3_txctrl => aurora_gt3_txctrl ,
115  -- Error Detection Interface
116  tx_hard_err => tx_hard_err ,
117  -- Status
118  tx_channel_up => tx_channel_up,
119  tx_lane_up => tx_lane_up ,
120  -- System Interface
121  user_clk_out => user_clk_out ,
122  sys_reset_out => sys_reset_out ,
123  gt_reset => gt_reset_i ,
124  tx_system_reset => tx_system_reset_i ,
125  tx_lock => tx_lock ,
126  init_clk => init_clk ,
127  init_clk_out => init_clk_out ,
128  pll_not_locked => pll_not_locked ,
129  tx_resetdone => tx_resetdone
130 
131 );
132 
133 
134 
135 end Behavioral;