= MAC Layer Development on WARP = Within the Xilinx Virtex-II Pro lies two PowerPC 405 processors. Currently, we use only one of these cores. The PPC has two primary functions in our system: Peripheral control and MAC-level processing. === Peripheral Control === The commercial and custom peripherals that make up the designs need C-code drivers to wrap around register reads and writes. For our systems, these tasks are divided between the peripheral drivers and an additional layer of abstraction called [http://warp.rice.edu/WARP_API/warpphy_8c.html WARPPHY]. === MAC-level Processing === Above the control sublayer is the processing necessary to give the system MAC-level behavior like exponential backoffs and carrier-sensing. These tasks are divided between the user-level MAC code (such as [wiki:CSMAMAC CSMA MAC]) and a MAC framework called [http://warp.rice.edu/WARP_API/warpmac_8c.html WARPMAC]. [[Image(GettingStarted/MAC/files:sysdiagram.jpg, align=center)]] == What we provide == In general, user-level MAC algorithms are connected to the underlying hardware via [http://warp.rice.edu/WARP_API/warpmac_8c.html WARPMAC], which provides MAC feature commonalities to the user. For derivatives of common random-access algorithms, the user may not need to modify any of the underlying layers. However, for more clean-slate designs, additional hardware functionality may be required. The [wiki:WARPMAC WARPMAC] framework and [http://warp.rice.edu/WARP_API/warpphy_8c.html WARPPHY] interface were designed with this in mind. Modification of these sublayers to support additional features is welcome. The relationship between user-level MAC algorithms and the WARP platform support is described in more detail in [wiki:Asilomar2006_WARPMAC our publication]. == Requirements for MAC == To use the existing infrastructure as-is, the MAC layer must be random-access. That being said, scheduled-access MAC algorithms are very possible and have had some success already on WARP. The primary example of a MAC layer that is well-matched to the underlying infrastructure is [wiki:CSMAMAC CSMAMAC], our carrier-sensing random-access MAC layer. Derivatives of this MAC are found in the lab exercises. == Exercises == * [attachment:wiki:Workshops/Rice_2007March/Files:WARP_WorkshopExercise_4_noMAC.pdf?format=raw Building a Simple "MAC"] (0.1MB PDF) [wiki:Workshops/Rice_2007March/MacLabs Lab Files] * [attachment:wiki:Workshops/Rice_2007March/Files:WARP_WorkshopExercise_5_UniMAC.pdf?format=raw Building a Unidirectional MAC] (1.4MB PDF) [wiki:Workshops/Rice_2007March/MacLabs Lab Files] * [attachment:wiki:Workshops/Rice_2007March/Files:WARP_WorkshopExercise_6_lemmingMAC.pdf?format=raw Building a Channel-Hopping MAC] (1.3MB PDF) [wiki:Workshops/Rice_2007March/MacLabs Lab Files] == Reference Design == The primary [wiki:OFDMReferenceDesign reference design] uses an [wiki:OFDM OFDM PHY] and [wiki:CSMAMAC CSMA MAC].