Imported Upstream version 3.2.2
[debian/gnuradio] / gr-gpio / src / fpga / include / common_config_bottom.vh
1 // -*- verilog -*-
2 //
3 //  USRP - Universal Software Radio Peripheral
4 //
5 //  Copyright (C) 2006,2007 Matt Ettus
6 //  Copyright (C) 2008 Corgan Enterprises LLC
7 //
8 //  This program is free software; you can redistribute it and/or modify
9 //  it under the terms of the GNU General Public License as published by
10 //  the Free Software Foundation; either version 2 of the License, or
11 //  (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 //  GNU General Public License for more details.
17 //
18 //  You should have received a copy of the GNU General Public License
19 //  along with this program; if not, write to the Free Software
20 //  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
21 //
22
23 // ====================================================================
24 //         This is the common tail for standard configuation
25 // ====================================================================
26 // 
27 //                  >>>> DO NOT EDIT BELOW HERE <<<<
28 //
29 // N.B., *all* the remainder of the code should be conditionalized
30 // only in terms of:
31 //
32 //  TX_ON, TX_EN_0, TX_EN_1, TX_EN_2, TX_EN_3, TX_CAP_NCHAN, TX_CAP_HB,
33 //  RX_ON, RX_EN_0, RX_EN_1, RX_EN_2, RX_EN_3, RX_CAP_NCHAN, RX_CAP_HB,
34 //  RX_NCO_ON, RX_CIC_ON
35 // ====================================================================
36
37 `ifdef TX_ON
38
39  `ifdef TX_SINGLE
40   `define TX_EN_0
41   `ifdef TX_DIG_ON
42     `define TX_EN_DIG_0
43     `define TX_CAP_DIG   1
44   `endif
45   `define TX_CAP_NCHAN 3'd1
46  `endif
47
48  `ifdef TX_DUAL
49   `define TX_EN_0
50   `define TX_EN_1
51   `define TX_CAP_NCHAN 3'd2
52   `ifdef TX_DIG_ON
53     `define TX_EN_DIG_0
54     `define TX_EN_DIG_1
55     `define TX_CAP_DIG   1
56   `endif
57  `endif
58
59  `ifdef TX_QUAD
60   `define TX_EN_0
61   `define TX_EN_1
62   `define TX_EN_2
63   `define TX_EN_3
64   `ifdef TX_DIG_ON
65     `define TX_EN_DIG_0
66     `define TX_EN_DIG_1
67     `define TX_CAP_DIG   1
68   `endif
69   `define TX_CAP_NCHAN 3'd4
70  `endif
71
72  `ifdef TX_HB_ON
73   `define TX_CAP_HB   1
74  `else
75   `define TX_CAP_HB   0
76  `endif
77
78 `else   // !ifdef TX_ON
79
80  `define TX_CAP_NCHAN 3'd0
81  `define TX_CAP_HB 0
82
83 `endif // !ifdef TX_ON
84
85 // --------------------------------------------------------------------
86
87 `ifdef RX_ON
88
89  `ifdef RX_SINGLE
90   `define RX_EN_0
91   `define RX_CAP_NCHAN 3'd1
92   `ifdef RX_DIG_ON
93     `define RX_EN_DIG_0
94     `define RX_CAP_DIG   1
95   `endif
96  `endif
97
98  `ifdef RX_DUAL
99   `define RX_EN_0
100   `define RX_EN_1
101   `define RX_CAP_NCHAN 3'd2
102   `ifdef RX_DIG_ON
103     `define RX_EN_DIG_0
104     `define RX_EN_DIG_1
105     `define RX_CAP_DIG   1
106   `endif
107  `endif
108
109  `ifdef RX_QUAD
110   `define RX_EN_0
111   `define RX_EN_1
112   `define RX_EN_2
113   `define RX_EN_3
114   `define RX_CAP_NCHAN 3'd4
115   `ifdef RX_DIG_ON
116     `define RX_EN_DIG_0
117     `define RX_EN_DIG_1
118     `define RX_CAP_DIG   1
119   `endif
120  `endif
121
122  `ifdef RX_HB_ON
123   `define RX_CAP_HB   1
124  `else
125   `define RX_CAP_HB   0
126  `endif
127
128 `else   // !ifdef RX_ON
129
130  `define RX_CAP_NCHAN 3'd0
131  `define RX_CAP_HB 0
132
133 `endif // !ifdef RX_ON