source: ReferenceDesigns/w3_802.11/c/wlan_w3_high/include/w3_high.h

Last change on this file was 6319, checked in by chunter, 5 years ago

1.8.0 release wlan-mac-se

File size: 3.7 KB
Line 
1#ifndef W3_PLATFORM_HIGH_H_
2#define W3_PLATFORM_HIGH_H_
3
4/*********************************************************************
5 * Mapping macros from xparameters.h
6 *
7 * The BSP generates xparameters.h to define macros for hardware-specific
8 * parameters, including peripheral memory addresses, peripheral IDs,
9 * interrupt IDs, etc.
10 *
11 * The macros below map the BSP-generated macros ("XPAR_...") to the
12 * hardware-agnostic names used by the 802.11 Ref Design C code. Each
13 * platform must implement this mapping in wlan_platform_common.h.
14 *
15 **********************************************************************/
16
17// On-chip Aux BRAM
18#define AUX_BRAM_BASEADDR       XPAR_MB_HIGH_AUX_BRAM_CTRL_S_AXI_BASEADDR
19#define AUX_BRAM_HIGHADDR       XPAR_MB_HIGH_AUX_BRAM_CTRL_S_AXI_HIGHADDR
20#define AUX_BRAM_SIZE           CALC_MEM_SIZE(AUX_BRAM_BASEADDR, AUX_BRAM_HIGHADDR)
21
22// Aux BRAM set aside for w3 platform usage
23#define AUX_BRAM_ETH_BD_MEM_SIZE    (240 * 64)
24
25/********************************************************************
26 * Portal Ethernet Aux. Space
27 *
28 * Space is set aside for the use of wlan_platform's Ethernet
29 * implementation
30 ********************************************************************/
31#define PORTAL_ETH_BD_MEM_BASEADDR         (AUX_BRAM_HIGHADDR - AUX_BRAM_ETH_BD_MEM_SIZE + 1)
32#define PORTAL_ETH_BD_MEM_SIZE          AUX_BRAM_ETH_BD_MEM_SIZE
33
34// Off-chip DRAM
35#define DRAM_BASEADDR           XPAR_DDR3_SODIMM_S_AXI_BASEADDR
36#define DRAM_HIGHADDR           XPAR_DDR3_SODIMM_S_AXI_HIGHADDR
37#define DRAM_SIZE               CALC_MEM_SIZE(DRAM_BASEADDR,DRAM_HIGHADDR)
38
39// DRAM set aside for w3 platform usage
40#define DRAM_ETH_BD_MEM_SIZE    (15 * 64)
41
42/********************************************************************
43 * wlan_exp Ethernet DRAM Space
44 *
45 * Space is set aside for the use of wlan_platform's Ethernet
46 * implementation
47 ********************************************************************/
48// There is a bug deep within Xil_DCacheFlushRange that prevents us from using
49//  the 0xFFFFFFFF address in an Ethernet buffer descriptor. Instead, we will
50//  reserve platform usage of DRAM at the base address of DRAM
51#define WLAN_EXP_ETH_BD_MEM_BASEADDR    DRAM_BASEADDR
52#define WLAN_EXP_ETH_BD_MEM_SIZE        DRAM_ETH_BD_MEM_SIZE
53#define WLAN_EXP_ETH_BD_MEM_HIGHADDR    CALC_MEM_HIGH_ADDR(WLAN_EXP_ETH_BD_MEM_BASEADDR, WLAN_EXP_ETH_BD_MEM_SIZE)
54
55//---------------------------------------
56// Peripherals accessible by CPU High
57//  Each core has a device ID (used by Xilinx drivers to initialize config structs)
58//  Cores that generate interrupts have interrupt IDs (identifies interrupt source for connecting ISRs)
59
60// Interrupt controller
61#define PLATFORM_DEV_ID_INTC                 XPAR_INTC_0_DEVICE_ID              ///< XParameters rename of interrupt controller device ID
62
63// GPIO for user I/O inputs
64#define PLATFORM_DEV_ID_USRIO_GPIO           XPAR_MB_HIGH_SW_GPIO_DEVICE_ID     ///< XParameters rename of device ID of GPIO
65#define PLATFORM_INT_ID_USRIO_GPIO           XPAR_INTC_0_GPIO_0_VEC_ID          ///< XParameters rename of GPIO interrupt ID
66
67// Timer
68#define PLATFORM_DEV_ID_TIMER                XPAR_TMRCTR_0_DEVICE_ID
69#define TIMER_FREQ_HZ                        XPAR_TMRCTR_0_CLOCK_FREQ_HZ
70#define PLATFORM_INT_ID_TIMER                XPAR_INTC_0_TMRCTR_0_VEC_ID        ///< XParameters rename of timer interrupt ID
71
72// Central DMA (CMDA)
73#define PLATFORM_DEV_ID_CDMA                 XPAR_AXI_CDMA_0_DEVICE_ID
74
75// Mailbox Interrupt
76#define PLATFORM_INT_ID_MAILBOX              XPAR_INTC_0_MBOX_0_VEC_ID
77
78// wlan_exp Ethernet ID
79#define WLAN_EXP_ETH_MAC_ID                  ETH_B_MAC_DEVICE_ID
80#define WLAN_EXP_ETH_DMA_ID                  ETH_B_DMA_DEVICE_ID
81
82// Timer
83#define TIMER_DUR_US                    64
84
85#endif /* W3_PLATFORM_HIGH_H_ */
Note: See TracBrowser for help on using the repository browser.