Belle II KLM Scint Firmware  1
tx_ll.vhd
1 -- (c) Copyright 2008 Xilinx, Inc. All rights reserved.
2 --
3 -- This file contains confidential and proprietary information
4 -- of Xilinx, Inc. and is protected under U.S. and
5 -- international copyright and other intellectual property
6 -- laws.
7 --
8 -- DISCLAIMER
9 -- This disclaimer is not a license and does not grant any
10 -- rights to the materials distributed herewith. Except as
11 -- otherwise provided in a valid license issued to you by
12 -- Xilinx, and to the maximum extent permitted by applicable
13 -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
14 -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
15 -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
16 -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
17 -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
18 -- (2) Xilinx shall not be liable (whether in contract or tort,
19 -- including negligence, or under any other theory of
20 -- liability) for any loss or damage of any kind or nature
21 -- related to, arising under or in connection with these
22 -- materials, including for any direct, or any indirect,
23 -- special, incidental, or consequential loss or damage
24 -- (including loss of data, profits, goodwill, or any type of
25 -- loss or damage suffered as a result of any action brought
26 -- by a third party) even if such damage or loss was
27 -- reasonably foreseeable or Xilinx had been advised of the
28 -- possibility of the same.
29 --
30 -- CRITICAL APPLICATIONS
31 -- Xilinx products are not designed or intended to be fail-
32 -- safe, or for use in any application requiring fail-safe
33 -- performance, such as life-support or safety devices or
34 -- systems, Class III medical devices, nuclear facilities,
35 -- applications related to the deployment of airbags, or any
36 -- other applications that could lead to death, personal
37 -- injury, or severe property or environmental damage
38 -- (individually and collectively, "Critical
39 -- Applications"). Customer assumes the sole risk and
40 -- liability of any use of Xilinx products in Critical
41 -- Applications, subject only to applicable laws and
42 -- regulations governing limitations on product liability.
43 --
44 -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
45 -- PART OF THIS FILE AT ALL TIMES.
46 --
47 --
48 
49 --
50 -- TX_LL
51 --
52 --
53 -- Description: The TX_LL module converts user data from the LocalLink interface
54 -- to Aurora Data, then sends it to the Aurora Channel for transmission.
55 -- It also handles NFC and UFC messages.
56 --
57 -- This module supports 1 2-byte lane designs
58 --
59 
60 library IEEE;
61 use IEEE.STD_LOGIC_1164.all;
62 
63 entity TX_LL is
64 port(
65  -- LocalLink PDU Interface
66  TX_D : in std_logic_vector(0 to 15);
67  TX_REM : in std_logic;
68  TX_SRC_RDY_N : in std_logic;
69  TX_SOF_N : in std_logic;
70  TX_EOF_N : in std_logic;
71  TX_DST_RDY_N : out std_logic;
72  -- Clock Compensation Interface
73  WARN_CC : in std_logic;
74  DO_CC : in std_logic;
75  -- Global Logic Interface
76  CHANNEL_UP : in std_logic;
77  -- Aurora Lane Interface
78  GEN_SCP : out std_logic;
79  GEN_ECP : out std_logic;
80  TX_PE_DATA_V : out std_logic;
81  GEN_PAD : out std_logic;
82  TX_PE_DATA : out std_logic_vector(0 to 15);
83  GEN_CC : out std_logic;
84  -- System Interface
85  USER_CLK : in std_logic);
86 end TX_LL;
87 
88 architecture MAPPED of TX_LL is
89 
90 -- External Register Declarations --
91 
92  signal TX_DST_RDY_N_Buffer : std_logic;
93  signal GEN_SCP_Buffer : std_logic;
94  signal GEN_ECP_Buffer : std_logic;
95  signal TX_PE_DATA_V_Buffer : std_logic;
96  signal GEN_PAD_Buffer : std_logic;
97  signal TX_PE_DATA_Buffer : std_logic_vector(0 to 15);
98  signal GEN_CC_Buffer : std_logic;
99 
100 -- Wire Declarations --
101 
102  signal halt_c_i : std_logic;
103  signal tx_dst_rdy_n_i : std_logic;
104 
105 -- Component Declarations --
106 
107  component TX_LL_DATAPATH
108 
109  port (
110 
111  -- LocalLink PDU Interface
112 
113  TX_D : in std_logic_vector(0 to 15);
114  TX_REM : in std_logic;
115  TX_SRC_RDY_N : in std_logic;
116  TX_SOF_N : in std_logic;
117  TX_EOF_N : in std_logic;
118 
119  -- Aurora Lane Interface
120 
121  TX_PE_DATA_V : out std_logic;
122  GEN_PAD : out std_logic;
123  TX_PE_DATA : out std_logic_vector(0 to 15);
124 
125  -- TX_LL Control Module Interface
126 
127  HALT_C : in std_logic;
128  TX_DST_RDY_N : in std_logic;
129 
130  -- System Interface
131 
132  CHANNEL_UP : in std_logic;
133  USER_CLK : in std_logic
134 
135  );
136 
137  end component;
138 
139 
140  component TX_LL_CONTROL
141 
142  port (
143 
144  -- LocalLink PDU Interface
145 
146  TX_SRC_RDY_N : in std_logic;
147  TX_SOF_N : in std_logic;
148  TX_EOF_N : in std_logic;
149  TX_DST_RDY_N : out std_logic;
150 
151  -- Clock Compensation Interface
152  DO_CC : in std_logic;
153 
154  -- Global Logic Interface
155 
156  CHANNEL_UP : in std_logic;
157 
158  -- TX_LL Control Module Interface
159 
160  HALT_C : out std_logic;
161 
162  -- Aurora Lane Interface
163 
164  GEN_SCP : out std_logic;
165  GEN_ECP : out std_logic;
166  GEN_CC : out std_logic;
167 
168  -- System Interface
169 
170  USER_CLK : in std_logic
171 
172  );
173 
174  end component;
175 
176 begin
177 
178  TX_DST_RDY_N <= TX_DST_RDY_N_Buffer;
179  GEN_SCP <= GEN_SCP_Buffer;
180  GEN_ECP <= GEN_ECP_Buffer;
181  TX_PE_DATA_V <= TX_PE_DATA_V_Buffer;
182  GEN_PAD <= GEN_PAD_Buffer;
183  TX_PE_DATA <= TX_PE_DATA_Buffer;
184  GEN_CC <= GEN_CC_Buffer;
185 
186 -- Main Body of Code --
187 
188  -- TX_DST_RDY_N is generated by TX_LL_CONTROL and used by TX_LL_DATAPATH and
189  -- external modules to regulate incoming pdu data signals.
190 
191  TX_DST_RDY_N_Buffer <= tx_dst_rdy_n_i;
192 
193 
194  -- TX_LL_Datapath module
195 
196  tx_ll_datapath_i : TX_LL_DATAPATH
197 
198  port map (
199 
200  -- LocalLink PDU Interface
201 
202  TX_D => TX_D,
203  TX_REM => TX_REM,
204  TX_SRC_RDY_N => TX_SRC_RDY_N,
205  TX_SOF_N => TX_SOF_N,
206  TX_EOF_N => TX_EOF_N,
207 
208  -- Aurora Lane Interface
209 
210  TX_PE_DATA_V => TX_PE_DATA_V_Buffer,
211  GEN_PAD => GEN_PAD_Buffer,
212  TX_PE_DATA => TX_PE_DATA_Buffer,
213 
214  -- TX_LL Control Module Interface
215 
216  HALT_C => halt_c_i,
217  TX_DST_RDY_N => tx_dst_rdy_n_i,
218 
219  -- System Interface
220 
221  CHANNEL_UP => CHANNEL_UP,
222  USER_CLK => USER_CLK
223 
224  );
225 
226 
227  -- TX_LL_Control module
228 
229  tx_ll_control_i : TX_LL_CONTROL
230 
231  port map (
232 
233  -- LocalLink PDU Interface
234 
235  TX_SRC_RDY_N => TX_SRC_RDY_N,
236  TX_SOF_N => TX_SOF_N,
237  TX_EOF_N => TX_EOF_N,
238  TX_DST_RDY_N => tx_dst_rdy_n_i,
239 
240  -- Clock Compensation Interface
241 
242  DO_CC => DO_CC,
243 
244  -- Global Logic Interface
245 
246  CHANNEL_UP => CHANNEL_UP,
247 
248  -- TX_LL Control Module Interface
249 
250  HALT_C => halt_c_i,
251 
252  -- Aurora Lane Interface
253 
254  GEN_SCP => GEN_SCP_Buffer,
255  GEN_ECP => GEN_ECP_Buffer,
256  GEN_CC => GEN_CC_Buffer,
257 
258  -- System Interface
259 
260  USER_CLK => USER_CLK
261 
262  );
263 
264 end MAPPED;
Definition: tx_ll.vhd:63