SURF  1.0
AxiLtc2270Reg.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : AxiLtc2270Reg.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2014-04-21
5 -- Last update: 2015-01-13
6 -------------------------------------------------------------------------------
7 -- Description: AXI-Lite Register Access Module
8 -------------------------------------------------------------------------------
9 -- This file is part of 'SLAC Firmware Standard Library'.
10 -- It is subject to the license terms in the LICENSE.txt file found in the
11 -- top-level directory of this distribution and at:
12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
13 -- No part of 'SLAC Firmware Standard Library', including this file,
14 -- may be copied, modified, propagated, or distributed except according to
15 -- the terms contained in the LICENSE.txt file.
16 -------------------------------------------------------------------------------
17 
18 library ieee;
19 use ieee.std_logic_1164.all;
20 use ieee.std_logic_unsigned.all;
21 use ieee.std_logic_arith.all;
22 
23 use work.StdRtlPkg.all;
24 use work.AxiLitePkg.all;
25 use work.AxiLtc2270Pkg.all;
26 
27 library unisim;
28 use unisim.vcomponents.all;
29 
30 --! @see entity
31  --! @ingroup devices_Linear_lct2270
32 entity AxiLtc2270Reg is
33  generic (
34  TPD_G : time := 1 ns;
35  DMODE_INIT_G : slv(1 downto 0) := "00";
36  DELAY_INIT_G : Slv5VectorArray(0 to 1, 0 to 7) := (others => (others => (others => '0')));
37  STATUS_CNT_WIDTH_G : natural range 1 to 32 := 32;
38  AXI_CLK_FREQ_G : real := 200.0E+6; -- units of Hz
40  port (
41  -- ADC Ports
42  adcCs : out sl;
43  adcSck : out sl;
44  adcSdi : out sl;
45  adcSdo : inout sl;
46  adcPar : out sl;
47  -- AXI-Lite Register Interface (axiClk domain)
52  -- Register Inputs/Outputs (axiClk domain)
54  config : out AxiLtc2270ConfigType;
55  -- Global Signals
56  axiClk : in sl;
57  axiRst : in sl;
58  refClk200MHz : in sl);
59 end AxiLtc2270Reg;
60 
61 architecture rtl of AxiLtc2270Reg is
62 
63  constant HALF_SCLK_C : natural := getTimeRatio(AXI_CLK_FREQ_G, 8.0E+06);
64  constant TIMEOUT_1S_C : natural := getTimeRatio(AXI_CLK_FREQ_G, 1.0E+00);
65 
66  type StateType is (
67  IDLE_S,
68  SCK_LOW_S,
69  SCK_HIGH_S);
70 
71  type RegType is record
72  debug : sl;
73  cntRst : sl;
74  csL : sl;
75  sck : sl;
76  sdi : sl;
77  serReg : slv(15 downto 0);
78  pntr : slv(3 downto 0);
79  cnt : natural range 0 to HALF_SCLK_C;
80  timer : natural range 0 to TIMEOUT_1S_C;
81  smplCnt : Slv3Array(0 to 1);
82  armed : slv(1 downto 0);
83  adcSmpl : Slv16VectorArray(0 to 1, 0 to 7);
84  regOut : AxiLtc2270ConfigType;
85  state : StateType;
88  end record RegType;
89 
90  constant REG_INIT_C : RegType := (
91  '0',
92  '0',
93  '1',
94  '1',
95  '1',
96  (others => '0'),
97  (others => '0'),
98  0,
99  0,
100  (others => (others => '0')),
101  (others => '0'),
102  (others => (others => (others => '0'))),
104  IDLE_S,
107 
108  signal r : RegType := REG_INIT_C;
109  signal rin : RegType;
110 
113 
114  signal cntRst,
115  sdo : sl;
116 
117 begin
118 
119  adcPar <= not(r.debug);
120  adcCs <= '0' when (r.debug = '0') else r.csL; -- '0' = Clock Duty Cycle Stabilizer Off
121  adcSck <= '1' when (r.debug = '0') else r.sck; -- '1' = Double Data Rate LVDS Output Mode
122  adcSdi <= '0' when (r.debug = '0') else r.sdi; -- '0' = Normal Operation
123 
124  IOBUF_INST : IOBUF
125  port map (
126  O => sdo, -- Buffer output
127  IO => adcSdo, -- Buffer inout port (connect directly to top-level port)
128  I => '0', -- Buffer input
129  T => r.debug); -- 3-state enable input, high=input, low=output
130 
131  -------------------------------
132  -- Configuration Register
133  -------------------------------
134  comb : process (axiReadMaster, axiRst, axiWriteMaster, r, regIn, sdo) is
135  variable i : integer;
136  variable v : RegType;
137  variable axiStatus : AxiLiteStatusType;
138  variable axiWriteResp : slv(1 downto 0);
139  variable axiReadResp : slv(1 downto 0);
140  begin
141  -- Latch the current value
142  v := r;
143 
144  -- Determine the transaction type
146 
147  -- Reset strobe signals
148  v.regOut.delayIn.load := '0';
149  v.regOut.delayIn.rst := '0';
150  v.cntRst := '0';
151 
152  -- Increment the counter
153  v.timer := r.timer + 1;
154  -- Check the timer for 1 second timeout
155  if r.timer = TIMEOUT_1S_C then
156  -- Reset the counter
157  v.timer := 0;
158  -- Set the flag
159  v.armed := (others => '1');
160  end if;
161 
162  -- Process for collecting 8 consecutive samples after each 1 second timeout
163  for i in 0 to 1 loop
164  -- Check the armed and valid flag
165  if (r.armed(i) = '1') and (regIn.adcValid(i) = '1') then
166  -- Latch the value
167  v.adcSmpl(i, conv_integer(r.smplCnt(i))) := regIn.adcData(i);
168  -- Increment the counter
169  v.smplCnt(i) := r.smplCnt(i) + 1;
170  -- Check the counter value
171  if r.smplCnt(i) = 7 then
172  -- Reset the counter
173  v.smplCnt(i) := (others => '0');
174  -- Reset the flag
175  v.armed(i) := '0';
176  end if;
177  end if;
178  end loop;
179 
180  if (axiStatus.writeEnable = '1') and (r.state = IDLE_S) then
181  -- Check for an out of 32 bit aligned address
182  axiWriteResp := ite(axiWriteMaster.awaddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_ERROR_RESP_G);
183  if (axiWriteMaster.awaddr(9 downto 2) < 5) and (r.debug = '1') then
184  v.serReg(15) := '0'; -- Write
185  v.serReg(14 downto 13) := "00";
186  v.serReg(12 downto 8) := axiWriteMaster.awaddr(6 downto 2);
187  v.serReg(7 downto 0) := axiWriteMaster.wdata(7 downto 0);
188  v.state := SCK_LOW_S;
189  else
190  -- Decode address and perform write
191  case (axiWriteMaster.awaddr(9 downto 2)) is
192  when x"80" =>
193  v.regOut.delayIn.load := '1';
194  v.regOut.delayIn.rst := '1';
195  v.regOut.delayIn.data(0, 0) := axiWriteMaster.wdata(4 downto 0);
196  when x"81" =>
197  v.regOut.delayIn.load := '1';
198  v.regOut.delayIn.rst := '1';
199  v.regOut.delayIn.data(0, 1) := axiWriteMaster.wdata(4 downto 0);
200  when x"82" =>
201  v.regOut.delayIn.load := '1';
202  v.regOut.delayIn.rst := '1';
203  v.regOut.delayIn.data(0, 2) := axiWriteMaster.wdata(4 downto 0);
204  when x"83" =>
205  v.regOut.delayIn.load := '1';
206  v.regOut.delayIn.rst := '1';
207  v.regOut.delayIn.data(0, 3) := axiWriteMaster.wdata(4 downto 0);
208  when x"84" =>
209  v.regOut.delayIn.load := '1';
210  v.regOut.delayIn.rst := '1';
211  v.regOut.delayIn.data(0, 4) := axiWriteMaster.wdata(4 downto 0);
212  when x"85" =>
213  v.regOut.delayIn.load := '1';
214  v.regOut.delayIn.rst := '1';
215  v.regOut.delayIn.data(0, 5) := axiWriteMaster.wdata(4 downto 0);
216  when x"86" =>
217  v.regOut.delayIn.load := '1';
218  v.regOut.delayIn.rst := '1';
219  v.regOut.delayIn.data(0, 6) := axiWriteMaster.wdata(4 downto 0);
220  when x"87" =>
221  v.regOut.delayIn.load := '1';
222  v.regOut.delayIn.rst := '1';
223  v.regOut.delayIn.data(0, 7) := axiWriteMaster.wdata(4 downto 0);
224  when x"88" =>
225  v.regOut.delayIn.load := '1';
226  v.regOut.delayIn.rst := '1';
227  v.regOut.delayIn.data(1, 0) := axiWriteMaster.wdata(4 downto 0);
228  when x"89" =>
229  v.regOut.delayIn.load := '1';
230  v.regOut.delayIn.rst := '1';
231  v.regOut.delayIn.data(1, 1) := axiWriteMaster.wdata(4 downto 0);
232  when x"8A" =>
233  v.regOut.delayIn.load := '1';
234  v.regOut.delayIn.rst := '1';
235  v.regOut.delayIn.data(1, 2) := axiWriteMaster.wdata(4 downto 0);
236  when x"8B" =>
237  v.regOut.delayIn.load := '1';
238  v.regOut.delayIn.rst := '1';
239  v.regOut.delayIn.data(1, 3) := axiWriteMaster.wdata(4 downto 0);
240  when x"8C" =>
241  v.regOut.delayIn.load := '1';
242  v.regOut.delayIn.rst := '1';
243  v.regOut.delayIn.data(1, 4) := axiWriteMaster.wdata(4 downto 0);
244  when x"8D" =>
245  v.regOut.delayIn.load := '1';
246  v.regOut.delayIn.rst := '1';
247  v.regOut.delayIn.data(1, 5) := axiWriteMaster.wdata(4 downto 0);
248  when x"8E" =>
249  v.regOut.delayIn.load := '1';
250  v.regOut.delayIn.rst := '1';
251  v.regOut.delayIn.data(1, 6) := axiWriteMaster.wdata(4 downto 0);
252  when x"8F" =>
253  v.regOut.delayIn.load := '1';
254  v.regOut.delayIn.rst := '1';
255  v.regOut.delayIn.data(1, 7) := axiWriteMaster.wdata(4 downto 0);
256  when x"90" =>
257  v.regOut.dmode := axiWriteMaster.wdata(1 downto 0);
258  when x"A0" =>
259  v.debug := axiWriteMaster.wdata(0);
260  when x"FF" =>
261  v.cntRst := '1';
262  when others =>
263  axiWriteResp := AXI_ERROR_RESP_G;
264  end case;
265  -- Send AXI response
266  axiSlaveWriteResponse(v.axiWriteSlave, axiWriteResp);
267  end if;
268  elsif (axiStatus.readEnable = '1') and (r.state = IDLE_S) then
269  -- Check for an out of 32 bit aligned address
270  axiReadResp := ite(axiReadMaster.araddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_ERROR_RESP_G);
271  -- Reset the register
272  v.axiReadSlave.rdata := (others => '0');
273  if (axiReadMaster.araddr(9 downto 2) < 5) then
274  v.serReg(15) := '1'; -- Read
275  v.serReg(14 downto 13) := "00";
276  v.serReg(12 downto 8) := axiReadMaster.araddr(6 downto 2);
277  v.serReg(7 downto 0) := (others => '0');
278  v.state := SCK_LOW_S;
279  else
280  -- Decode address and assign read data
281  case (axiReadMaster.araddr(9 downto 2)) is
282  when x"60" =>
283  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 0);
284  when x"61" =>
285  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 1);
286  when x"62" =>
287  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 2);
288  when x"63" =>
289  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 3);
290  when x"64" =>
291  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 4);
292  when x"65" =>
293  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 5);
294  when x"66" =>
295  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 6);
296  when x"67" =>
297  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(0, 7);
298  when x"68" =>
299  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 0);
300  when x"69" =>
301  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 1);
302  when x"6A" =>
303  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 2);
304  when x"6B" =>
305  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 3);
306  when x"6C" =>
307  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 4);
308  when x"6D" =>
309  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 5);
310  when x"6E" =>
311  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 6);
312  when x"6F" =>
313  v.axiReadSlave.rdata(15 downto 0) := r.adcSmpl(1, 7);
314  when x"7F" =>
315  v.axiReadSlave.rdata(0) := regIn.delayOut.rdy;
316  when x"80" =>
317  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 0);
318  when x"81" =>
319  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 1);
320  when x"82" =>
321  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 2);
322  when x"83" =>
323  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 3);
324  when x"84" =>
325  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 4);
326  when x"85" =>
327  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 5);
328  when x"86" =>
329  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 6);
330  when x"87" =>
331  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(0, 7);
332  when x"88" =>
333  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 0);
334  when x"89" =>
335  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 1);
336  when x"8A" =>
337  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 2);
338  when x"8B" =>
339  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 3);
340  when x"8C" =>
341  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 4);
342  when x"8D" =>
343  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 5);
344  when x"8E" =>
345  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 6);
346  when x"8F" =>
347  v.axiReadSlave.rdata(4 downto 0) := regIn.delayOut.data(1, 7);
348  when x"90" =>
349  v.axiReadSlave.rdata(1 downto 0) := r.regOut.dmode;
350  when x"A0" =>
351  v.axiReadSlave.rdata(0) := r.debug;
352  when others =>
353  axiReadResp := AXI_ERROR_RESP_G;
354  end case;
355  -- Send Axi Response
356  axiSlaveReadResponse(v.axiReadSlave, axiReadResp);
357  end if;
358  end if;
359 
360  -- State Machine
361  case (r.state) is
362  ----------------------------------------------------------------------
363  when IDLE_S =>
364  v.csL := '1';
365  v.sck := '0';
366  ----------------------------------------------------------------------
367  when SCK_LOW_S =>
368  v.csL := '0';
369  v.sck := '0';
370  v.sdi := r.serReg(conv_integer(15-r.pntr));
371  v.cnt := r.cnt + 1;
372  if r.cnt = HALF_SCLK_C then
373  v.cnt := 0;
374  if r.pntr > 7 then
375  v.axiReadSlave.rdata(conv_integer(15-r.pntr)) := sdo;
376  end if;
377  -- Next State
378  v.state := SCK_HIGH_S;
379  end if;
380  ----------------------------------------------------------------------
381  when SCK_HIGH_S =>
382  v.sck := '1';
383  v.cnt := r.cnt + 1;
384  if r.cnt = HALF_SCLK_C then
385  v.cnt := 0;
386  v.pntr := r.pntr + 1;
387  if r.pntr = 15 then
388  v.pntr := (others => '0');
389  -- Check if we need to perform a read or write reponse
390  if r.serReg(15) = '0' then
391  axiSlaveWriteResponse(v.axiWriteSlave);
392  else
393  axiSlaveReadResponse(v.axiReadSlave);
394  end if;
395  -- Next State
396  v.state := IDLE_S;
397  else
398  -- Next State
399  v.state := SCK_LOW_S;
400  end if;
401  end if;
402  ----------------------------------------------------------------------
403  end case;
404 
405  -- Synchronous Reset
406  if axiRst = '1' then
407  v := REG_INIT_C;
408  v.regOut.delayIn.load := '1';
409  v.regOut.delayIn.rst := '1';
410  v.regOut.delayIn.data := DELAY_INIT_G;
411  v.regOut.dmode := DMODE_INIT_G;
412  end if;
413 
414  -- Register the variable for next clock cycle
415  rin <= v;
416 
417  -- Outputs
420 
421  regOut <= r.regOut;
422  cntRst <= r.cntRst;
423 
424  end process comb;
425 
426  seq : process (axiClk) is
427  begin
428  if rising_edge(axiClk) then
429  r <= rin after TPD_G;
430  end if;
431  end process seq;
432 
433  -------------------------------
434  -- Synchronization: Outputs
435  -------------------------------
436  config.dmode <= regOut.dmode;
437 
438  GEN_CH_CONFIG :
439  for ch in 0 to 1 generate
440  GEN_DAT_CONFIG :
441  for i in 0 to 7 generate
442  SyncOut_delayIn_data : entity work.SynchronizerFifo
443  generic map (
444  TPD_G => TPD_G,
445  DATA_WIDTH_G => 5)
446  port map (
447  wr_clk => axiClk,
448  din => regOut.delayIn.data(ch, i),
449  rd_clk => refClk200MHz,
450  dout => config.delayIn.data(ch, i));
451  end generate GEN_DAT_CONFIG;
452  end generate GEN_CH_CONFIG;
453 
454  SyncOut_delayIn_load : entity work.RstSync
455  generic map (
456  TPD_G => TPD_G,
457  RELEASE_DELAY_G => 32)
458  port map (
459  clk => refClk200MHz,
460  asyncRst => regOut.delayIn.load,
461  syncRst => config.delayIn.load);
462 
463  SyncOut_delayIn_rst : entity work.RstSync
464  generic map (
465  TPD_G => TPD_G,
466  RELEASE_DELAY_G => 16)
467  port map (
468  clk => refClk200MHz,
469  asyncRst => regOut.delayIn.rst,
470  syncRst => config.delayIn.rst);
471 
472  -------------------------------
473  -- Synchronization: Inputs
474  -------------------------------
475  regIn.adcData <= status.adcData;
476  regIn.adcValid <= status.adcValid;
477 
478  SyncIn_delayOut_rdy : entity work.Synchronizer
479  generic map (
480  TPD_G => TPD_G)
481  port map (
482  clk => axiClk,
483  dataIn => status.delayOut.rdy,
484  dataOut => regIn.delayOut.rdy);
485 
486  GEN_CH_STATUS :
487  for ch in 0 to 1 generate
488  GEN_DAT_STATUS :
489  for i in 0 to 7 generate
490  SyncIn_delayOut_data : entity work.SynchronizerFifo
491  generic map (
492  TPD_G => TPD_G,
493  DATA_WIDTH_G => 5)
494  port map (
495  wr_clk => refClk200MHz,
496  din => status.delayOut.data(ch, i),
497  rd_clk => axiClk,
498  dout => regIn.delayOut.data(ch, i));
499  end generate GEN_DAT_STATUS;
500  end generate GEN_CH_STATUS;
501 
502 end rtl;
DELAY_INIT_GSlv5VectorArray ( 0 to 1, 0 to 7):=( others =>( others =>( others => '0')))
array(natural range <> ) of slv( 2 downto 0) Slv3Array
Definition: StdRtlPkg.vhd:408
AxiLtc2270ConfigType :=(( others => '0'), AXI_LTC2270_DELAY_IN_INIT_C) AXI_LTC2270_CONFIG_INIT_C
out syncRstsl
Definition: RstSync.vhd:36
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
in dinslv( DATA_WIDTH_G- 1 downto 0)
out axiReadSlaveAxiLiteReadSlaveType
slv( 31 downto 0) rdata
Definition: AxiLitePkg.vhd:89
Slv16Array( 0 to 1) adcData
AxiLtc2270DelayInType delayIn
in asyncRstsl
Definition: RstSync.vhd:35
_library_ ieeeieee
slv( 31 downto 0) wdata
Definition: AxiLitePkg.vhd:117
out dataOutsl
out doutslv( DATA_WIDTH_G- 1 downto 0)
in clksl
Definition: RstSync.vhd:34
AxiLiteStatusType axiStatus
Definition: AxiLitePkg.vhd:183
Slv5VectorArray ( 0 to 1, 0 to 7) data
out axiWriteSlaveAxiLiteWriteSlaveType
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
Definition: AxiLitePkg.vhd:36
RELEASE_DELAY_Ginteger range 3 to positive'high:= 3
Definition: RstSync.vhd:31
slv( 1 downto 0) adcValid
TPD_Gtime := 1 ns
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
AxiLtc2270StatusType :=(( others => '0'),( others => x"0000"), AXI_LTC2270_DELAY_OUT_INIT_C) AXI_LTC2270_STATUS_INIT_C
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
inout adcSdosl
AxiLtc2270DelayOutType delayOut
slv( 31 downto 0) awaddr
Definition: AxiLitePkg.vhd:113
TPD_Gtime := 1 ns
Definition: RstSync.vhd:27
TPD_Gtime := 1 ns
in axiReadMasterAxiLiteReadMasterType
slv( 1 downto 0) dmode
AxiLiteReadSlaveType :=(arready => '0',rdata =>( others => '0'),rresp =>( others => '0'),rvalid => '0') AXI_LITE_READ_SLAVE_INIT_C
Definition: AxiLitePkg.vhd:95
in statusAxiLtc2270StatusType
AxiLiteReadSlaveType
Definition: AxiLitePkg.vhd:85
in axiWriteMasterAxiLiteWriteMasterType
AXI_CLK_FREQ_Greal := 200.0E+6
slv( 1 downto 0) := "00" AXI_RESP_OK_C
Definition: AxiLitePkg.vhd:31
DMODE_INIT_Gslv( 1 downto 0) := "00"
STATUS_CNT_WIDTH_Gnatural range 1 to 32:= 32
slv( 31 downto 0) araddr
Definition: AxiLitePkg.vhd:61
array(natural range <> ,natural range <> ) of slv( 4 downto 0) Slv5VectorArray
Definition: StdRtlPkg.vhd:664
AxiLiteWriteSlaveType :=(awready => '0',wready => '0',bresp =>( others => '0'),bvalid => '0') AXI_LITE_WRITE_SLAVE_INIT_C
Definition: AxiLitePkg.vhd:156
array(natural range <> ,natural range <> ) of slv( 15 downto 0) Slv16VectorArray
Definition: StdRtlPkg.vhd:653
DATA_WIDTH_Ginteger range 1 to ( 2** 24):= 16
std_logic_vector slv
Definition: StdRtlPkg.vhd:29