no-OS
parameters.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef _PARAMETERS_H_
34 #define _PARAMETERS_H_
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include "app_config.h"
40 #ifdef ALTERA_PLATFORM
41 #include "system.h"
42 #else
43 #include "xparameters.h"
44 #endif
45 
46 /******************************************************************************/
47 /********************** Macros and Constants Definitions **********************/
48 /******************************************************************************/
49 #ifdef ALTERA_PLATFORM
50 #define GPIO_OFFSET 0
51 
52 #define ADRV_RESETB GPIO_OFFSET + 52
53 #define ADRV_SYSREF_REQ GPIO_OFFSET + 58
54 #define CLK_RESETB GPIO_OFFSET + 59
55 
56 #define RX_A10_FPLL_BASEADDR ADRV9009_RX_JESD204_LINK_PLL_RECONFIG_BASE
57 #define TX_A10_FPLL_BASEADDR ADRV9009_TX_JESD204_LINK_PLL_RECONFIG_BASE
58 #define RX_OS_A10_FPLL_BASEADDR ADRV9009_RX_OS_JESD204_LINK_PLL_RECONFIG_BASE
59 
60 #define RX_JESD_BASEADDR ADRV9009_RX_JESD204_LINK_RECONFIG_BASE
61 #define TX_JESD_BASEADDR ADRV9009_TX_JESD204_LINK_RECONFIG_BASE
62 #define RX_OS_JESD_BASEADDR ADRV9009_RX_OS_JESD204_LINK_RECONFIG_BASE
63 
64 #define RX_XCVR_BASEADDR ADRV9009_RX_JESD204_LINK_MANAGEMENT_BASE
65 #define TX_XCVR_BASEADDR ADRV9009_TX_JESD204_LINK_MANAGEMENT_BASE
66 #define RX_OS_XCVR_BASEADDR ADRV9009_RX_OS_JESD204_LINK_MANAGEMENT_BASE
67 
68 #define RX_ADXCFG_0_BASEADDR AVL_ADXCFG_0_RCFG_S1_BASE
69 #define RX_ADXCFG_1_BASEADDR AVL_ADXCFG_1_RCFG_S1_BASE
70 #define TX_ADXCFG_0_BASEADDR AVL_ADXCFG_0_RCFG_S0_BASE
71 #define TX_ADXCFG_1_BASEADDR AVL_ADXCFG_1_RCFG_S0_BASE
72 #define TX_ADXCFG_2_BASEADDR AVL_ADXCFG_2_RCFG_S0_BASE
73 #define TX_ADXCFG_3_BASEADDR AVL_ADXCFG_3_RCFG_S0_BASE
74 #define RX_OS_ADXCFG_0_BASEADDR AVL_ADXCFG_2_RCFG_S1_BASE
75 #define RX_OS_ADXCFG_1_BASEADDR AVL_ADXCFG_3_RCFG_S1_BASE
76 
77 #define TX_PLL_BASEADDR ADRV9009_TX_JESD204_LANE_PLL_RECONFIG_BASE
78 
79 #define RX_CORE_BASEADDR AXI_ADRV9009_BASE
80 #define TX_CORE_BASEADDR AXI_ADRV9009_BASE + 0x4000
81 #define RX_OS_CORE_BASEADDR AXI_ADRV9009_BASE + 0x8000
82 
83 #define RX_DMA_BASEADDR AXI_ADRV9009_RX_DMA_BASE
84 #define TX_DMA_BASEADDR AXI_ADRV9009_TX_DMA_BASE
85 
86 #define DDR_MEM_BASEADDR SYS_DDR3_CNTRL_ARCH_BASE
87 #define ADC_DDR_BASEADDR SYS_DDR3_CNTRL_ARCH_BASE + 0x800000
88 #define DAC_DDR_BASEADDR SYS_DDR3_CNTRL_ARCH_BASE + 0xA000000
89 
90 #define GPIO_BASEADDR SYS_GPIO_OUT_BASE
91 
92 #define SPI_BASEADDR SYS_SPI_BASE
93 #else
94 #ifdef PLATFORM_ZYNQMP
95 #define GPIO_DEVICE_ID XPAR_PSU_GPIO_0_DEVICE_ID
96 #else
97 #ifdef PLATFORM_MB
98 #define GPIO_DEVICE_ID XPAR_AXI_GPIO_DEVICE_ID
99 #else
100 #define GPIO_DEVICE_ID XPAR_PS7_GPIO_0_DEVICE_ID
101 #endif
102 #endif
103 
104 #if defined(ZU11EG) // ZU11EG
105 #define ADRV_CS 0 // Talise A
106 #define ADRV_B_CS 1 // Talise B
107 #define CLK_CS 2 // Clock chip placed on the som
108 #define CAR_CLK_CS 3 // Clock chip placed on the carrier
109 
110 // Transceiver A
111 #define TRX_A_RESETB_GPIO 130
112 #define TRX_A_TEST_GPIO 131
113 #define TRX_A_RX1_ENABLE_GPIO 132
114 #define TRX_A_RX2_ENABLE_GPIO 133
115 #define TRX_A_TX1_ENABLE_GPIO 134
116 #define TRX_A_TX2_ENABLE_GPIO 135
117 
118 // Transceiver B
119 #define TRX_B_RESETB_GPIO 156
120 #define TRX_B_TEST_GPIO 157
121 #define TRX_B_RX1_ENABLE_GPIO 158
122 #define TRX_B_RX2_ENABLE_GPIO 159
123 #define TRX_B_TX1_ENABLE_GPIO 160
124 #define TRX_B_TX2_ENABLE_GPIO 161
125 
126 #define SYSREF_REQ_GPIO 167
127 #define CLK_RESETB_GPIO 162
128 #define DAC_FIFO_BYPASS_GPIO 168
129 #define CAR_CLK_RESETB_GPIO 101
130 
131 #elif defined(FMCOMMS8_ZCU102)
132 
133 #define ADRV_CS 0 // Talise A
134 #define ADRV_B_CS 1 // Talise B
135 #define CLK_CS 2 // Clock chip placed on the som
136 #define CAR_CLK_CS 3 // Clock chip placed on the carrier
137 
138 // Transceiver A
139 #define TRX_A_RESETB_GPIO 120
140 #define TRX_A_TEST_GPIO 131
141 #define TRX_A_RX1_ENABLE_GPIO 121
142 #define TRX_A_RX2_ENABLE_GPIO 122
143 #define TRX_A_TX1_ENABLE_GPIO 123
144 #define TRX_A_TX2_ENABLE_GPIO 124
145 
146 // Transceiver B
147 #define TRX_B_RESETB_GPIO 135
148 #define TRX_B_TEST_GPIO 157
149 #define TRX_B_RX1_ENABLE_GPIO 136
150 #define TRX_B_RX2_ENABLE_GPIO 137
151 #define TRX_B_TX1_ENABLE_GPIO 138
152 #define TRX_B_TX2_ENABLE_GPIO 139
153 
154 #define SYSREF_REQ_GPIO 167
155 #define CLK_RESETB_GPIO 162
156 #define DAC_FIFO_BYPASS_GPIO 168
157 #define CAR_CLK_RESETB_GPIO 101
158 
159 #else
160 
161 #define CLK_CS 0
162 #define ADRV_CS 1
163 
164 #ifdef XPS_BOARD_ZCU102 // ZCU102
165 #define TRX_A_RESETB_GPIO 130
166 #define SYSREF_REQ_GPIO 136
167 #define CLK_RESETB_GPIO 137
168 #define DAC_FIFO_BYPASS_GPIO 138
169 #else // ZC706
170 #if defined PLATFORM_MB
171 #define TRX_A_RESETB_GPIO 52
172 #define SYSREF_REQ_GPIO 58
173 #define CLK_RESETB_GPIO 59
174 #define DAC_FIFO_BYPASS_GPIO 60
175 #else
176 #define TRX_A_RESETB_GPIO 106
177 #define SYSREF_REQ_GPIO 112
178 #define CLK_RESETB_GPIO 113
179 #define DAC_FIFO_BYPASS_GPIO 114
180 #endif
181 #endif
182 #endif
183 
184 #if defined(ZU11EG)
185 // axi_clkgen is not used with the adrv9009 som.
186 #elif defined(FMCOMMS8_ZCU102)
187 // axi_clkgen is not used with the fmcomms8.
188 #else
189 #define RX_CLKGEN_BASEADDR XPAR_AXI_ADRV9009_RX_CLKGEN_BASEADDR
190 #define TX_CLKGEN_BASEADDR XPAR_AXI_ADRV9009_TX_CLKGEN_BASEADDR
191 #define RX_OS_CLKGEN_BASEADDR XPAR_AXI_ADRV9009_RX_OS_CLKGEN_BASEADDR
192 #endif
193 
194 #if defined(ZU11EG)
195 #define RX_JESD_BASEADDR XPAR_AXI_ADRV9009_SOM_RX_JESD_RX_AXI_BASEADDR
196 #define TX_JESD_BASEADDR XPAR_AXI_ADRV9009_SOM_TX_JESD_TX_AXI_BASEADDR
197 #define RX_OS_JESD_BASEADDR XPAR_AXI_ADRV9009_SOM_OBS_JESD_RX_AXI_BASEADDR
198 #elif defined(FMCOMMS8_ZCU102)
199 #define RX_JESD_BASEADDR XPAR_AXI_ADRV9009_FMC_RX_JESD_RX_AXI_BASEADDR
200 #define TX_JESD_BASEADDR XPAR_AXI_ADRV9009_FMC_TX_JESD_TX_AXI_BASEADDR
201 #define RX_OS_JESD_BASEADDR XPAR_AXI_ADRV9009_FMC_OBS_JESD_RX_AXI_BASEADDR
202 #else
203 #define RX_JESD_BASEADDR XPAR_AXI_ADRV9009_RX_JESD_RX_AXI_BASEADDR
204 #define TX_JESD_BASEADDR XPAR_AXI_ADRV9009_TX_JESD_TX_AXI_BASEADDR
205 #define RX_OS_JESD_BASEADDR XPAR_AXI_ADRV9009_RX_OS_JESD_RX_AXI_BASEADDR
206 #endif
207 
208 #if defined(ZU11EG)
209 #define RX_XCVR_BASEADDR XPAR_AXI_ADRV9009_SOM_RX_XCVR_BASEADDR
210 #define TX_XCVR_BASEADDR XPAR_AXI_ADRV9009_SOM_TX_XCVR_BASEADDR
211 #define RX_OS_XCVR_BASEADDR XPAR_AXI_ADRV9009_SOM_OBS_XCVR_BASEADDR
212 #elif defined(FMCOMMS8_ZCU102)
213 #define RX_XCVR_BASEADDR XPAR_AXI_ADRV9009_FMC_RX_XCVR_BASEADDR
214 #define TX_XCVR_BASEADDR XPAR_AXI_ADRV9009_FMC_TX_XCVR_BASEADDR
215 #define RX_OS_XCVR_BASEADDR XPAR_AXI_ADRV9009_FMC_OBS_XCVR_BASEADDR
216 #else
217 #define RX_XCVR_BASEADDR XPAR_AXI_ADRV9009_RX_XCVR_BASEADDR
218 #define TX_XCVR_BASEADDR XPAR_AXI_ADRV9009_TX_XCVR_BASEADDR
219 #define RX_OS_XCVR_BASEADDR XPAR_AXI_ADRV9009_RX_OS_XCVR_BASEADDR
220 #endif
221 
222 #ifdef XPAR_AXI_ADRV9009_CORE_BASEADDR
223 #define RX_CORE_BASEADDR XPAR_AXI_ADRV9009_CORE_BASEADDR
224 #define TX_CORE_BASEADDR XPAR_AXI_ADRV9009_CORE_BASEADDR + 0x4000
225 #define RX_OS_CORE_BASEADDR XPAR_AXI_ADRV9009_CORE_BASEADDR + 0x8000
226 #else
227 #if defined(ZU11EG)
228 #define RX_CORE_BASEADDR XPAR_RX_ADRV9009_SOM_TPL_CORE_ADC_TPL_CORE_BASEADDR
229 #define TX_CORE_BASEADDR XPAR_TX_ADRV9009_SOM_TPL_CORE_DAC_TPL_CORE_BASEADDR
230 #define RX_OS_CORE_BASEADDR XPAR_OBS_ADRV9009_SOM_TPL_CORE_ADC_TPL_CORE_BASEADDR
231 #elif defined(FMCOMMS8_ZCU102)
232 #define RX_CORE_BASEADDR XPAR_RX_ADRV9009_FMC_TPL_CORE_ADC_TPL_CORE_BASEADDR
233 #define TX_CORE_BASEADDR XPAR_TX_ADRV9009_FMC_TPL_CORE_DAC_TPL_CORE_BASEADDR
234 #define RX_OS_CORE_BASEADDR XPAR_OBS_ADRV9009_FMC_TPL_CORE_ADC_TPL_CORE_BASEADDR
235 #else
236 #define RX_CORE_BASEADDR XPAR_RX_ADRV9009_TPL_CORE_ADC_TPL_CORE_BASEADDR
237 #define TX_CORE_BASEADDR XPAR_TX_ADRV9009_TPL_CORE_DAC_TPL_CORE_BASEADDR
238 #define RX_OS_CORE_BASEADDR XPAR_RX_OS_ADRV9009_TPL_CORE_ADC_TPL_CORE_BASEADDR
239 #endif // #if defined(ZU11EG)
240 #endif // #ifdef XPAR_AXI_ADRV9009_CORE_BASEADDR
241 
242 #if defined(ZU11EG)
243 #define RX_DMA_BASEADDR XPAR_AXI_ADRV9009_SOM_RX_DMA_BASEADDR
244 #define TX_DMA_BASEADDR XPAR_AXI_ADRV9009_SOM_TX_DMA_BASEADDR
245 #define RX_OS_DMA_BASEADDR XPAR_AXI_ADRV9009_SOM_OBS_DMA_BASEADDR
246 #elif defined(FMCOMMS8_ZCU102)
247 #define RX_DMA_BASEADDR XPAR_AXI_ADRV9009_FMC_RX_DMA_BASEADDR
248 #define TX_DMA_BASEADDR XPAR_AXI_ADRV9009_FMC_TX_DMA_BASEADDR
249 #else
250 #define RX_DMA_BASEADDR XPAR_AXI_ADRV9009_RX_DMA_BASEADDR
251 #define TX_DMA_BASEADDR XPAR_AXI_ADRV9009_TX_DMA_BASEADDR
252 #define RX_OS_DMA_BASEADDR XPAR_AXI_ADRV9009_RX_OS_DMA_BASEADDR
253 #endif
254 
255 #ifdef PLATFORM_MB
256 #define DDR_MEM_BASEADDR XPAR_AXI_DDR_CNTRL_C0_DDR4_MEMORY_MAP_BASEADDR
257 #else
258 #define DDR_MEM_BASEADDR XPAR_DDR_MEM_BASEADDR
259 #endif
260 #define ADC_DDR_BASEADDR DDR_MEM_BASEADDR + 0x800000
261 #define DAC_DDR_BASEADDR DDR_MEM_BASEADDR + 0xA000000
262 
263 #ifndef PLATFORM_MB
264 #define UART_DEVICE_ID XPAR_XUARTPS_0_DEVICE_ID
265 #define UART_BAUDRATE 921600
266 #else
267 #define UART_DEVICE_ID XPAR_AXI_UART_DEVICE_ID
268 #define UART_BAUDRATE 115200
269 #endif
270 
271 #ifdef XPS_BOARD_ZCU102
272 #define UART_IRQ_ID XPAR_XUARTPS_0_INTR
273 #else
274 #ifndef PLATFORM_MB
275 #define UART_IRQ_ID XPAR_XUARTPS_1_INTR
276 #else
277 #define UART_IRQ_ID XPAR_AXI_INTC_AXI_UART_INTERRUPT_INTR
278 #endif
279 #endif
280 #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
281 #endif
282 
283 #endif
284