How xilinx/wireless-xorif works
Project type and purpose
• This is an embedded‐software IP driver and demo application project for Xilinx’s ORAN Radio Interface IP. It provides:
• A C driver library (libxorif) using LibMetal for register‐level access to the FPGA IP.
• A kernel‐space PTP timer module (xlnx‐ptp‐timer).
• A CLI/configuration application (xorif‐app) in C and Python demos.
• Top‐level build & deploy flows (Vivado, PetaLinux, Yocto recipes).
File structure
• Top‐level directories:
• doc: Doxygen‐generated HTML & design docs
• scripts: Vivado / PetaLinux build and deployment scripts
• src: source for three subcomponents: libxorif, xlnx‐ptp‐timer, xorif‐app (plus helper scripts)
• xsa: hardware definition (XSA/HDF) for Vivado
• yocto‐recipes: PetaLinux/Yocto recipes for packaging library, app, scripts
Main components
a. Hardware layer
• ORAN Radio IF IP (FPGA IP core)
• CPU subsystem (Zynq PS or Versal) running Linux
b. Kernel layer
• xlnx‐ptp‐timer kernel module (for PTP timestamping)
• Device trees (from yocto/recipes‐bsp/device‐tree)
c. Userspace libraries & applications
• C driver library (libxorif + pylibxorif Python bindings)
• CLI App (xorif‐app server & client)
• Python demos (fhi_example, ocp_example)
d. Build & deployment
• Vivado flow (scripts/xil_vivado_*.tcl) → hardware bitstream + XSA
• PetaLinux flow (scripts/runvp*.bash) → Linux image including kernel modules
• Yocto recipes (under yocto‐recipes) → Debian/RPM packages or rootfs
Relationships & interactions
• The build scripts invoke Vivado to generate the hardware definition (XSA).
• PetaLinux/Yocto consume XSA to build kernel + rootfs + device tree, include xlnx‐ptp‐timer.
• On target boot, device tree loads kernel modules.
• libxorif uses LibMetal to map FPGA registers (MMIO) and read/write control registers.
• xorif‐app (C) calls libxorif API; Python demos use pylibxorif wrappers.
• Scripts/utilities automate configuration, testing, and validation.
Architectural patterns & design principles
• Layered separation: hardware IP ←→ kernel module ←→ userspace C library ←→ applications/demos
• Modularity: independent subprojects (lib, app, kernel module) with own Makefiles & tests
• Reuse & extensibility: Python bindings, test suites, Yocto recipes for packaging
Final checklist
• Components: ORAN IP, Zynq PS, xlnx‐ptp‐timer, libxorif, pylibxorif, xorif‐app, demos, build scripts, Yocto.
• Interfaces: Vivado→XSA, XSA→Yocto, OS→Kernel Module, App→LibMetal/MMIO.
• Tech/Framework: LibMetal, Doxygen, Make, Yocto, PetaLinux, Vivado.