Debian Codegraph @

hdl/fpga/platforms/bladerf-micro/vhdl/bladerf.vhd

raw
1 -- Copyright (c) 2013 Nuand LLC
2 --
3 -- Permission is hereby granted, free of charge, to any person obtaining a copy
4 -- of this software and associated documentation files (the "Software"), to deal
5 -- in the Software without restriction, including without limitation the rights
6 -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 -- copies of the Software, and to permit persons to whom the Software is
8 -- furnished to do so, subject to the following conditions:
9 --
10 -- The above copyright notice and this permission notice shall be included in
11 -- all copies or substantial portions of the Software.
12 --
13 -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 -- THE SOFTWARE.
20
21 library ieee ;
22 use ieee.std_logic_1164.all ;
23 use ieee.numeric_std.all ;
24 use ieee.math_real.all ;
25 use ieee.math_complex.all ;
26
27 entity bladerf is
28 port (
29 -- Main 38.4MHz system clock (3.3 V)
30 c5_clock2 : in std_logic ;
31
32 -- SI53304 clock controls (3.3 V)
33 si_clock_sel : out std_logic := '0';
34 c5_clock2_oe : out std_logic := '0';
35 ufl_clock_oe : out std_logic := '0';
36 exp_clock_oe : out std_logic := '0';
37
38 -- VCTCXO DAC (3.3 V)
39 dac_sclk : out std_logic := '0' ;
40 dac_sdi : out std_logic := '0' ;
41 dac_csn : out std_logic := '1' ;
42
43 -- LEDs (3.3 V)
44 led : buffer std_logic_vector(3 downto 1) := (others =>'0') ;
45
46 -- Power supply sync (2.5 V)
47 ps_sync_1p1 : out std_logic := '0';
48 ps_sync_1p8 : out std_logic := '0';
49
50 -- INA219 power monitor (3.3 V)
51 pwr_sda : inout std_logic := 'Z';
52 pwr_scl : out std_logic := 'Z';
53
54 -- TPS2115A power mux status
55 pwr_status : in std_logic;
56
57 -- AD9361 RX Interface (2.5 V, LVDS)
58 adi_rx_clock : in std_logic ;
59 adi_rx_data : in std_logic_vector(5 downto 0) ;
60 adi_rx_frame : in std_logic ;
61
62 -- RX RF Switching (3.3 V)
63 adi_rx_spdt1_v : out std_logic_vector(2 downto 1) ;
64 adi_rx_spdt2_v : out std_logic_vector(2 downto 1) ;
65
66 -- RX Bias-T Enable
67 rx_bias_en : out std_logic := '0';
68
69 -- AD9361 TX Interface (2.5 V, LVDS)
70 adi_tx_clock : out std_logic ;
71 adi_tx_data : out std_logic_vector(5 downto 0) ;
72 adi_tx_frame : out std_logic ;
73
74 -- TX RF Switching (3.3 V)
75 adi_tx_spdt1_v : out std_logic_vector(2 downto 1) ;
76 adi_tx_spdt2_v : out std_logic_vector(2 downto 1) ;
77
78 -- TX Bias-T Enable
79 tx_bias_en : out std_logic := '0';
80
81 -- AD9361 SPI Interface (2.5 V)
82 adi_spi_sclk : buffer std_logic := '0' ;
83 adi_spi_csn : out std_logic := '1' ;
84 adi_spi_sdi : out std_logic := '0' ;
85 adi_spi_sdo : in std_logic := '0' ;
86
87 -- AD9361 Control Interface (2.5 V)
88 adi_reset_n : buffer std_logic ;
89 adi_enable : out std_logic;
90 adi_txnrx : out std_logic := '0';
91 adi_en_agc : out std_logic := '0';
92 adi_ctrl_in : out std_logic_vector(3 downto 0) := (others => '0');
93 adi_ctrl_out : in std_logic_vector(7 downto 0);
94 adi_sync_in : out std_logic := '0';
95
96 -- ADF4002 SPI Interface (3.3 V)
97 adf_sclk : out std_logic := '0' ;
98 adf_csn : out std_logic := '1' ;
99 adf_sdi : out std_logic := '0' ;
100 adf_ce : out std_logic := '0';
101 adf_muxout : in std_logic;
102
103 -- FX3 GPIF Interface - VIO1/2/3 (1.8 V)
104 fx3_pclk : in std_logic ;
105 fx3_gpif : inout std_logic_vector(31 downto 0) ;
106 fx3_ctl : inout std_logic_vector(12 downto 0) ;
107
108 -- FX3 UART/Flash Interface - VIO4 (3.3 V)
109 fx3_uart_rxd : out std_logic ;
110 fx3_uart_txd : in std_logic ;
111 fx3_uart_cts : out std_logic ;
112
113 -- Expansion Interface (3.3 V / 2.5 V / 1.8 V)
114 exp_present : in std_logic;
115 exp_clock_req : in std_logic;
116 exp_i2c_sda : inout std_logic;
117 exp_i2c_scl : inout std_logic;
118 exp_gpio : inout std_logic_vector(31 downto 0);
119
120 -- Mini expansion interface (3.3 V / 2.5 V / 1.8 V)
121 mini_exp1 : inout std_logic := 'Z';
122 mini_exp2 : inout std_logic := 'Z';
123
124 -- Hardware revision resistors (3.3 V / 2.5 V / 1.8 V)
125 hw_rev : in std_logic_vector(1 downto 0)
126
127 ) ;
128 end entity ; -- bladerf
129 --TODO: explain revisions