SURF  1.0
AxiDac7654Core.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : AxiDac7654Core.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2014-09-23
5 -- Last update: 2014-09-25
6 -------------------------------------------------------------------------------
7 -- Description: AXI-Lite interface to DAC7654 DAC 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 
21 use work.StdRtlPkg.all;
22 use work.AxiLitePkg.all;
23 use work.AxiDac7654Pkg.all;
24 
25 --! @see entity
26  --! @ingroup devices_Ti_dac7654
27 entity AxiDac7654Core is
28  generic (
29  TPD_G : time := 1 ns;
30  AXI_CLK_FREQ_G : real := 125.0E+6; -- units of Hz
31  STATUS_CNT_WIDTH_G : natural range 1 to 32 := 32;
33  port (
34  -- DAC Ports
37  -- AXI-Lite Register Interface (axiClk domain)
38  axiClk : in sl;
39  axiRst : in sl;
44 end AxiDac7654Core;
45 
46 architecture mapping of AxiDac7654Core is
47 
50 
51 begin
52 
53  AxiDac7654Reg_Inst : entity work.AxiDac7654Reg
54  generic map(
55  TPD_G => TPD_G,
58  port map(
59  -- AXI-Lite Register Interface
60  axiClk => axiClk,
61  axiRst => axiRst,
66  -- Register Inputs/Outputs
67  status => status,
68  config => config);
69 
70  AxiDac7654Spi_Inst : entity work.AxiDac7654Spi
71  generic map(
72  TPD_G => TPD_G,
74  port map (
75  -- Parallel interface
76  spiIn => config.spi,
77  spiOut => status.spi,
78  --DAC I/O ports
79  dacCs => dacOut.cs,
80  dacSck => dacOut.sck,
81  dacSdi => dacOut.sdi,
82  dacSdo => dacIn.sdo,
83  dacLoad => dacOut.load,
84  dacLdac => dacOut.ldac,
85  dacRst => dacOut.rst,
86  --Global Signals
87  axiClk => axiClk,
88  axiRst => axiRst);
89 
90 end mapping;
in axiWriteMasterAxiLiteWriteMasterType
AXI_CLK_FREQ_Greal := 125.0E+6
in axiReadMasterAxiLiteReadMasterType
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
STATUS_CNT_WIDTH_Gnatural range 1 to 32:= 32
out dacOutAxiDac7654OutType
AxiDac7654StatusType status
_library_ ieeeieee
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
Definition: AxiLitePkg.vhd:36
in spiInAxiDac7654SpiInType
in dacInAxiDac7654InType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
TPD_Gtime := 1 ns
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
AxiDac7654ConfigType config
out spiOutAxiDac7654SpiOutType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
AXI_CLK_FREQ_Greal := 125.0E+6
in axiReadMasterAxiLiteReadMasterType
AxiLiteReadSlaveType
Definition: AxiLitePkg.vhd:85
TPD_Gtime := 1 ns
out axiReadSlaveAxiLiteReadSlaveType
TPD_Gtime := 1 ns
out axiWriteSlaveAxiLiteWriteSlaveType
out configAxiDac7654ConfigType
out axiWriteSlaveAxiLiteWriteSlaveType
STATUS_CNT_WIDTH_Gnatural range 1 to 32:= 32
in axiWriteMasterAxiLiteWriteMasterType
in statusAxiDac7654StatusType
out axiReadSlaveAxiLiteReadSlaveType
std_logic_vector slv
Definition: StdRtlPkg.vhd:29