no-OS
parameters.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef APP_PARAMETERS_H_
34 #define APP_PARAMETERS_H_
35 
36 #include <xparameters.h>
37 
38 /******************************************************************************/
39 /********************** Macros and Constants Definitions **********************/
40 /******************************************************************************/
41 #define UART_BAUDRATE 115200
42 
43 #ifdef XPS_BOARD_ZCU102
44 #define GPIO_OFFSET 78
45 #else
46 #define GPIO_OFFSET 0
47 #endif
48 
49 #define PHY_CS 0
50 
51 #ifdef QUAD_MXFE
52 #define ADF4371_CS 0
53 #define HMC7043_CS 4
54 
55 #define PHY_RESET (GPIO_OFFSET + 41)
56 
57 #define ADRF5020_CTRL_GPIO (GPIO_OFFSET + 34)
58 #define AD9081_GPIO_0_MUX (GPIO_OFFSET + 44)
59 
60 #define GPIO_2_DEVICE_ID XPAR_AXI_GPIO_2_DEVICE_ID
61 #define SPI_2_DEVICE_ID XPAR_AXI_SPI_2_DEVICE_ID
62 
63 #else
64 #define PHY_RESET (GPIO_OFFSET + 55)
65 #endif
66 
67 #if defined(PLATFORM_MB)
68 #define GPIO_DEVICE_ID XPAR_AXI_GPIO_DEVICE_ID
69 #define PHY_SPI_DEVICE_ID XPAR_AXI_SPI_DEVICE_ID
70 #define CLK_SPI_DEVICE_ID XPAR_AXI_SPI_DEVICE_ID
71 #define UART_DEVICE_ID XPAR_AXI_UART_DEVICE_ID
72 #define UART_IRQ_ID XPAR_AXI_INTC_AXI_UART_INTERRUPT_INTR
73 #define INTC_DEVICE_ID XPAR_INTC_SINGLE_DEVICE_ID
74 #define DDR_CNTRL_BASEADDR XPAR_AXI_DDR_CNTRL_BASEADDR
75 #define CLK_CS 1
76 #elif defined(PLATFORM_ZYNQMP)
77 #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
78 #define GPIO_DEVICE_ID XPAR_PSU_GPIO_0_DEVICE_ID
79 #define PHY_SPI_DEVICE_ID XPAR_PSU_SPI_0_DEVICE_ID
80 #define CLK_SPI_DEVICE_ID XPAR_PSU_SPI_1_DEVICE_ID
81 #define UART_DEVICE_ID XPAR_XUARTPS_0_DEVICE_ID
82 #define UART_IRQ_ID XPAR_XUARTPS_0_INTR
83 #define DDR_CNTRL_BASEADDR XPAR_PSU_DDRC_0_BASEADDR
84 #define CLK_CS 0
85 #else
86 #error Unsupported platform.
87 #endif
88 
89 #define RX_JESD_BASEADDR XPAR_AXI_MXFE_RX_JESD_RX_AXI_BASEADDR
90 #define TX_JESD_BASEADDR XPAR_AXI_MXFE_TX_JESD_TX_AXI_BASEADDR
91 
92 #ifdef XPAR_AXI_MXFE_RX_XCVR_BASEADDR
93 #define RX_XCVR_BASEADDR XPAR_AXI_MXFE_RX_XCVR_BASEADDR
94 #endif
95 #ifdef XPAR_AXI_MXFE_TX_XCVR_BASEADDR
96 #define TX_XCVR_BASEADDR XPAR_AXI_MXFE_TX_XCVR_BASEADDR
97 #endif
98 
99 #ifdef XPAR_RX_MXFE_TPL_CORE_ADC_TPL_CORE_BASEADDR
100 #define RX_CORE_BASEADDR XPAR_RX_MXFE_TPL_CORE_ADC_TPL_CORE_BASEADDR
101 #else
102 #define RX_CORE_BASEADDR XPAR_RX_MXFE_TPL_CORE_TPL_CORE_BASEADDR
103 #endif
104 #ifdef XPAR_TX_MXFE_TPL_CORE_DAC_TPL_CORE_BASEADDR
105 #define TX_CORE_BASEADDR XPAR_TX_MXFE_TPL_CORE_DAC_TPL_CORE_BASEADDR
106 #else
107 #define TX_CORE_BASEADDR XPAR_TX_MXFE_TPL_CORE_TPL_CORE_BASEADDR
108 #endif
109 
110 #define RX_DMA_BASEADDR XPAR_AXI_MXFE_RX_DMA_BASEADDR
111 #define TX_DMA_BASEADDR XPAR_AXI_MXFE_TX_DMA_BASEADDR
112 
113 #ifdef IIO_SUPPORT
114 
115 #define MAX_DAC_BUF_SAMPLES 10000000 //1MB
116 #define MAX_ADC_BUF_SAMPLES 10000000 //1MB
117 
118 #endif
119 
120 #endif