802.11 Reference Design
Using the 802.11 Reference Design: UART
The 802.11 Reference Design hardware implements two MicroBlaze cores, CPU High and CPU Low. Both CPUs have UART cores attached to their peripheral buses. The UARTs act as STDIN and STDOUT for programs running in the CPUs. Every MAC application in the reference design prints boot and debug info the UART. Each application also implements some control via UART input. The pre-application specifics are described below.
You can use the UART in your custom C code by calling xil_printf(). However keep in mind the UART is slow and xil_printf is a blocking call. Printing frequent or long messages will slow down your application, possibly affecting MAC state. Use the UART sparingly, and avoid runtime debug messages whenever possible.
Use of the UART in CPU Low should be avoided whenever possible. Fast execution of code in CPU Low is critical to operation of the DCF MAC; blocking calls to xil_printf() in timing-critical sections of the CPU Low code can break normal Tx/Rx operation.
UART Mux
The WARP v3 board has one UART-USB transceiver. Refer to the USB-UART Howto for instructions on setting up your PC to use the USB-UART interface.
The 802.11 Reference Design implements a 2:1 mux which allows either CPU's UART to use the UART-USB connection. The mux is controlled by the right-most switch on the user IO DIP switch. Set the switch high (up) to select the CPU High UART, low to select the CPU Low UART. The UART mux responds immediately. You can safely change the UART selection at runtime.
The UART mux is implemented in Verilog; the source is in the repository.
WLAN MAC High Framework Output
On boot the MAC High Framework prints status messages as it initializes various hardware and software resources:
------------------------ DRAM SODIMM Detected Tx Queue of 3413 placed in DRAM: using 13652 kB Initializing Event log (1044664320 bytes) at 0xC1BBB000 BSS Info list (len 768) placed in DRAM: using 60 kB 1 Eth Tx BDs placed in BRAM: using 64 B 239 Eth Rx BDs placed in BRAM: using 14 kB ------------------------ WARPNet v2.1.0 WLAN EXP v1.0.0 (compiled Oct 22 2014 13:49:16) ETH B MAC Address: 40:D8:55:04:21:4B ETH B IP Address: 10.0.0.0 (1000 Mbps) Configuring ETH B for AXI FIFO mode with 1514 byte buffers (1 receive, 1 send) Listening on UDP ports 9500 (unicast) and 9750 (broadcast) Not waiting for Ethernet link. Current status is: not ready. Make sure link is ready before using WARPNet. End WARPNet WLAN Exp initialization
These messages include initialization of the DRAM contents (with Tx queues, BSS Info entries and Ethernet DMA buffer descriptors) and the wlan_exp framework.
MAC Application UART Usage
Following initialization of the MAC High Framework, each MAC application uses the UART differently: