Overview of HDL Reference Designs
mastermaster branch is kept synchronized with the latest release. Branches containing dev in their name are development branches and should be used with caution.repository·master·Indexed 23 days ago
https://github.com/nuand/bladerfComplete source code for programming and interacting with bladeRF platforms. Includes FPGA HDL, FX3 firmware for the Cypress FX3 USB 3.0 controller, and host-side C libraries and utilities. Provides detailed instructions for building FX3 firmware on Linux and Windows, debugging NIOS II software via GDB and Eclipse, and implementing FPGA reference designs.
master branch is kept synchronized with the latest release. Branches containing dev in their name are development branches and should be used with caution.The host/utilities directory contains several standalone applications built on top of libbladeRF. These tools are designed for development, debugging, and specific hardware tasks:
The libbladeRF library provides an intuitive interface for interacting with bladeRF hardware and general radio systems. Key capabilities include:
bladerf-micro platform. It is intended to demonstrate basic transmission capabilities using the FPGA and Nios processor.The repository is organized into the following functional areas:
firmware_common: Source and header files common between firmware and host software.fx3_firmware: Firmware for the Cypress FX3 USB controller.hdl: All HDL code associated with the Altera Cyclone IV FPGA.host: Host-side libraries, drivers, utilities, and samples.The bladeRF FX3 firmware is compiled for the Cypress FX3 USB 3.0 Superspeed controller. The controller manages three primary interfaces:
The bladeRF project uses two distinct versioning systems: one for individual components and one for the project as a whole.
Components follow Semantic Versioning 2.0.0 (major.minor.patch[-extra]). This describes changes to a component's primary interface:
The project-wide version is based on the release date using the format YYYY.MM[-rcN].
YYYY: Four-digit year.MM: Two-digit month.-rcN: Release-candidate suffix (indicates a beta version).Users and package maintainers should primarily focus on the project-wide version rather than individual component versions.
To avoid manually loading the FPGA bitstream every time the device is powered on, use one of two mechanisms:
libbladeRF can find and load them automatically when opening a device handle. The files should be named hostedx40.rbf or hostedx115.rbf depending on your hardware variant.bladeRF-cli program. This allows the FPGA to be autoloaded without a host machine.Once in interactive mode, you can use several categories of commands:
help lists top-level commands; help <cmd> provides details for a specific command.peek and poke for setting/reading registers.set and print for high-level tasks like frequency, bandwidth, sample rate, and gains.rx and tx for background data transmission and reception.run <script> to execute a script from within the interactive session.rx wait or tx wait to ensure data transfers complete before a script exits.The HDL repository is organized into two main directories:
fpga/: Contains source HDL in the form of IP blocks or platform-specific top levels.quartus/: Contains specific files for Quartus Prime project creation and building.Top-Level Design:
The project uses a single bladerf.vhd top level to define a VHDL entity called bladerf. This entity defines the pin assignments, IO levels, and directionality for the FPGA.
Architectures (Revisions): Instead of creating entirely new projects, the build system uses Quartus Prime 'Revisions' to implement different architectures. This allows a base design (top level, part, and pins) to be duplicated and modified for specific use cases. Currently supported architectures include:
| Architecture | Description |
|---|---|
hosted | Listens for commands from the USB connection to perform operations or send/receive RF. |
atsc_tx | ATSC transmitter - Reads 4-bit ATSC symbols via USB and performs pilot insertion, filtering, and baseband shift. |
The bladeRF program executes on a NIOS II soft processor within the FPGA. It handles control and configuration requests from the host via the FX3 UART. Requests and responses are transmitted in 16-byte packets. The first byte is a 'magic' value indicating the packet format type.
Common packet formats include:
pkt_8x8 (Magic 0x41): 8-bit address, 8-bit data.pkt_8x16 (Magic 0x42): 8-bit address, 16-bit data.pkt_8x32 (Magic 0x43): 8-bit address, 32-bit data.pkt_8x64 (Magic 0x44): 8-bit address, 64-bit data.pkt_32x32 (Magic 0x4b): 32-bit address, 32-bit data.pkt_retune (Magic 0x54)pkt_legacy (Magic 0x4e)Detailed descriptions of these formats are located in the pkt_*.h files in the fpga_common/include directory.
bladeRF_Simulink.m MATLAB System Object. This object acts as a wrapper that exposes the bladeRF.m functionality to the Simulink environment.