1 ------------------------------------------------------------------------------- 2 -- File : AxiLtc2270Deser.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-04-21 5 -- Last update: 2015-01-20 6 ------------------------------------------------------------------------------- 7 -- Description: ADC DDR Deserializer 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 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
20 use ieee.std_logic_unsigned.
all;
21 use ieee.std_logic_arith.
all;
27 use unisim.vcomponents.
all;
30 --! @ingroup devices_Linear_lct2270 46 -- ADC Data Interface (axiClk domain) 49 -- Register Interface (axiClk domain) 51 -- Register Interface (refclk200MHz domain) 65 signal dmux : slv(1 downto 0);
75 attribute IODELAY_GROUP : ;
113 IDELAYCTRL_Inst : IDELAYCTRL
115 RDY => delayOut.rdy,
-- 1-bit output: Ready output 116 REFCLK => refClk200MHz,
-- 1-bit input: Reference clock input 117 RST => delayIn.rst
);
-- 1-bit input: Active high reset input 120 for ch in 0 to 1 generate 122 for i in 0 to 7 generate 130 -- ADC Data (clk domain) 133 Q1 => adcDataPs
(ch
)(i
),
134 Q2 => adcDataNs
(ch
)(i
),
135 -- IO_Delay (refClk200MHz domain) 143 end generate GEN_DAT;
148 if rising_edge(adcClock) then 149 adcDataP(ch) <= adcDataPs(ch) after TPD_G;
150 adcDataN(ch) <= adcDataNs(ch) after TPD_G;
151 adcDataNd(ch) <= adcDataN(ch) after TPD_G;
152 if dmux(ch) = '0' then 153 adcDmuxA(ch) <= adcDataNd(ch) after TPD_G;
154 adcDmuxB(ch) <= adcDataP(ch) after TPD_G;
156 adcDmuxA(ch) <= adcDataP(ch) after TPD_G;
157 adcDmuxB(ch) <= adcDataN(ch) after TPD_G;
159 for i in 7 downto 0 loop 160 data(ch)(2*i+1) <= adcDmuxB(ch)(i) after TPD_G;
161 data(ch)(2*i) <= adcDmuxA(ch)(i) after TPD_G;
170 -- Asynchronous Reset 172 --Write Ports (wr_clk domain) 175 --Read Ports (rd_clk domain)
IODELAY_GROUP_Gstring := "AXI_LTC2270_IODELAY_GRP"
in delayinAxiLtc2270DelayInType
in dinslv( DATA_WIDTH_G- 1 downto 0)
out delayOutDataslv( 4 downto 0)
DELAY_INIT_Gslv( 4 downto 0) :=( others => '0')
in dataInslv( WIDTH_G- 1 downto 0)
out delayOutAxiLtc2270DelayOutType
out doutslv( DATA_WIDTH_G- 1 downto 0)
Slv5VectorArray ( 0 to 1, 0 to 7) data
in dataNSlv8Array( 0 to 1)
in dataPSlv8Array( 0 to 1)
DELAY_INIT_GSlv5VectorArray ( 0 to 1, 0 to 7):=( others =>( others =>( others => '0')))
out dataOutslv( WIDTH_G- 1 downto 0)
array(natural range <> ) of slv( 15 downto 0) Slv16Array
IODELAY_GROUP_Gstring := "AXI_LTC2270_IODELAY_GRP"
array(natural range <> ,natural range <> ) of slv( 4 downto 0) Slv5VectorArray
out adcDataSlv16Array( 0 to 1)
array(natural range <> ) of slv( 7 downto 0) Slv8Array
in delayInDataslv( 4 downto 0)
DATA_WIDTH_Ginteger range 1 to ( 2** 24):= 16