SURF  1.0
AxiLtc2270Core.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : AxiLtc2270Core.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2014-04-21
5 -- Last update: 2014-04-21
6 -------------------------------------------------------------------------------
7 -- Description: AXI-Lite interface to LTC2270 ADC IC
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.numeric_std.all;
21 
22 use work.StdRtlPkg.all;
23 use work.AxiLitePkg.all;
24 use work.AxiLtc2270Pkg.all;
25 
26 --! @see entity
27  --! @ingroup devices_Linear_lct2270
28 entity AxiLtc2270Core is
29  generic (
30  TPD_G : time := 1 ns;
31  DMODE_INIT_G : slv(1 downto 0) := "00";
32  DELAY_INIT_G : Slv5VectorArray(0 to 1, 0 to 7) := (others => (others => (others => '0')));
33  IODELAY_GROUP_G : string := "AXI_LTC2270_IODELAY_GRP";
34  STATUS_CNT_WIDTH_G : natural range 1 to 32 := 32;
35  AXI_CLK_FREQ_G : real := 200.0E+6; -- units of Hz
37  port (
38  -- ADC Ports
42  -- ADC signals (axiClk domain)
43  adcValid : out slv(0 to 1);
44  adcData : out Slv16Array(0 to 1); --2's complement
45  -- AXI-Lite Register Interface (axiClk domain)
50  -- Clocks and Resets
51  axiClk : in sl;
52  axiRst : in sl;
53  adcClk : in sl; -- up to 20 MHz
55 end AxiLtc2270Core;
56 
57 architecture mapping of AxiLtc2270Core is
58 
61 
62 begin
63 
66 
67  AxiLtc2270Reg_Inst : entity work.AxiLtc2270Reg
68  generic map(
69  TPD_G => TPD_G,
75  port map(
76  -- ADC Ports
77  adcCs => adcOut.cs,
78  adcSck => adcOut.sck,
79  adcSdi => adcOut.sdi,
80  adcSdo => adcInOut.sdo,
81  adcPar => adcOut.par,
82  -- AXI-Lite Register Interface
87  -- Register Inputs/Outputs (Mixed Domain)
88  status => status,
89  config => config,
90  -- Clocks and Resets
91  axiClk => axiClk,
92  axiRst => axiRst,
93  refclk200MHz => refclk200MHz);
94 
95  AxiLtc2270Deser_Inst : entity work.AxiLtc2270Deser
96  generic map(
97  TPD_G => TPD_G,
100  port map (
101  -- ADC Ports
102  clkInP => adcIn.clkP,
103  clkInN => adcIn.clkN,
104  clkOutP => adcOut.clkP,
105  clkOutN => adcOut.clkN,
106  dataP => adcIn.dataP,
107  dataN => adcIn.dataN,
108  orP => adcIn.orP,
109  orN => adcIn.orN,
110  -- ADC Data Interface (axiClk domain)
111  adcValid => status.adcValid,
112  adcData => status.adcData,
113  -- Register Interface (axiClk domain)
114  dmode => config.dmode,
115  -- Register Interface (refclk200MHz domain)
116  delayin => config.delayin,
117  delayOut => status.delayOut,
118  -- Clocks and Resets
119  axiClk => axiClk,
120  axiRst => axiRst,
121  adcClk => adcClk,
123 
124 end mapping;
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
AXI_CLK_FREQ_Greal := 200.0E+6
inout adcInOutAxiLtc2270InOutType
DELAY_INIT_GSlv5VectorArray ( 0 to 1, 0 to 7):=( others =>( others =>( others => '0')))
IODELAY_GROUP_Gstring := "AXI_LTC2270_IODELAY_GRP"
in delayinAxiLtc2270DelayInType
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
out axiReadSlaveAxiLiteReadSlaveType
out adcValidslv( 0 to 1)
out adcValidslv( 0 to 1)
out configAxiLtc2270ConfigType
DELAY_INIT_GSlv5VectorArray ( 0 to 1, 0 to 7):=( others =>( others =>( others => '0')))
out delayOutAxiLtc2270DelayOutType
out adcOutAxiLtc2270OutType
out axiWriteSlaveAxiLiteWriteSlaveType
DMODE_INIT_Gslv( 1 downto 0) := "00"
out axiWriteSlaveAxiLiteWriteSlaveType
_library_ ieeeieee
in dataNSlv8Array( 0 to 1)
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
Definition: AxiLitePkg.vhd:36
TPD_Gtime := 1 ns
in dataPSlv8Array( 0 to 1)
DELAY_INIT_GSlv5VectorArray ( 0 to 1, 0 to 7):=( others =>( others =>( others => '0')))
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
STATUS_CNT_WIDTH_Gnatural range 1 to 32:= 32
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
out adcDataSlv16Array( 0 to 1)
inout adcSdosl
AxiLtc2270StatusType status
in dmodeslv( 1 downto 0)
in axiReadMasterAxiLiteReadMasterType
in statusAxiLtc2270StatusType
array(natural range <> ) of slv( 15 downto 0) Slv16Array
Definition: StdRtlPkg.vhd:395
in axiWriteMasterAxiLiteWriteMasterType
AxiLiteReadSlaveType
Definition: AxiLitePkg.vhd:85
in axiWriteMasterAxiLiteWriteMasterType
AxiLtc2270ConfigType config
AXI_CLK_FREQ_Greal := 200.0E+6
in adcInAxiLtc2270InType
DMODE_INIT_Gslv( 1 downto 0) := "00"
STATUS_CNT_WIDTH_Gnatural range 1 to 32:= 32
array(natural range <> ,natural range <> ) of slv( 4 downto 0) Slv5VectorArray
Definition: StdRtlPkg.vhd:664
in axiReadMasterAxiLiteReadMasterType
out adcDataSlv16Array( 0 to 1)
TPD_Gtime := 1 ns
out axiReadSlaveAxiLiteReadSlaveType
TPD_Gtime := 1 ns
std_logic_vector slv
Definition: StdRtlPkg.vhd:29
IODELAY_GROUP_Gstring := "AXI_LTC2270_IODELAY_GRP"