If you look at the block diagram of almost any SDR, you would see the same boxes: RF front end, ADC/DAC, an FPGA, a link to the host, and software on top. But two systems with the same diagram can do completely different jobs. One can only record spectrum. Another runs a full LTE base station. A third answers a Wi-Fi frame within 16 us. The difference is not in the boxes. It is in which box does which job, and that depends on the application.
In this note, I want to go through how the work is split between the RF hardware, the FPGA, the transport and the host software. The question I keep in mind is simple: what does the application need to do, and how fast does it have to react to what it receives ?
- Executive Summary
- What is actually being split ?
- What decides where a function should run ?
- Receive-only and transmit-only applications
- Scheduled two-way systems: LTE and NR
- Immediate-response protocols: Wi-Fi and Bluetooth
- Sensing, radar and coherent multi-channel systems
- What should each layer provide ?
- Reference
Executive Summary
Following table shows the typical split for each type of application. The second column is the one to read first, because it drives the rest of the row.
Application type | Shortest reaction it must make | Where the PHY runs | Where the timing-critical part runs | What the host does |
|---|---|---|---|---|
Spectrum monitoring, recording, offline analysis | None. It only listens | Host, or later offline | Nothing timing-critical. FPGA does tuning, decimation and timestamps | Capture, store, analyze |
Transmit-only waveform generation, playback | None to a peer. Bursts start on schedule | Host, prepared in advance | FPGA timed TX and burst gating | Build waveforms ahead of time |
Scheduled two-way systems (LTE / NR base station, UE emulator) | Milliseconds, chosen by the scheduler (LTE FDD HARQ 4 ms, NR K1 / K2 in slots) | Host | Host pipeline running ahead of the radio, FPGA keeps time | Full PHY, MAC and upper layers |
Immediate-response protocols (Wi-Fi, connected BLE) | Fixed by the standard: 16 us SIFS (5 GHz Wi-Fi), 150 us (BLE) | FPGA or a dedicated controller | Lower MAC next to the radio: ACK, CCA, backoff | Upper MAC, management, configuration |
Closed-loop sensing (radar, real-time tracking) | Set by the control loop, often per pulse | Split. Front processing near the radio | FPGA for pulse timing and fast front processing | Detection, tracking, control decisions |
Coherent multi-channel (MIMO, direction finding, arrays) | Not a reaction but an alignment requirement | Either | Clock and PPS distribution, FPGA alignment of channels | Calibration and array processing |
What is actually being split ?
Before we talk about where a function should run, let's agree on the places it can run. An SDR is a chain, and every sample travels the whole chain twice: once in on receive, once out on transmit. Each layer in that chain can do some of the work, and each layer adds some delay.
Figure 1 shows the layers as I think about them. The left column is the layer. The right column is the work that typically sits there. Not every SDR has every layer. An RTL-SDR dongle has almost nothing between the converter and the USB link, while a Zynq board puts an FPGA and an ARM processor on the same chip.
Figure 1. Five layers can carry the work. The higher the layer, the more flexible it is and the further it sits from the antenna in time.
RF front end : PA, LNA, switch or duplexer and filters. It decides how much of the radio's own transmit leaks into its own receiver. See RF Front End.Transceiver and converters : the RF chip and ADC / DAC. This layer sets whether the TX and RX chains run at the same time (FDD) or take turns (TDD). That choice matters for how fast a radio can turn around.FPGA : always does the digital front end and keeps the sample clock. Whether it also runs PHY or MAC functions depends on the product, and on whether the user can change it. See Digital Front End.Driver and transport : moves samples between the card and host memory in blocks. Block size and ring depth set both the delay and the tolerance to host hiccups. See Memory and Buffering.Host software : the most flexible place, and the slowest to react. See Where the Processing Runs for the CPU, GPU and FPGA trade-off.
What decides where a function should run ?
Then you may ask: why not put everything in the FPGA, where timing is deterministic ? Or why not put everything on the host, where changing the code is easy ? Both answers are "it depends", but there is one number that decides more than any other. I call it the reaction deadline.
The reaction deadline is the time between an event the radio observes and the moment the radio must put its reaction on air. A spectrum analyzer has no reaction at all. An LTE base station must send HARQ feedback a few milliseconds after the data. A Wi-Fi station must start its ACK 16 us after the end of the frame. Each layer in Figure 1 has a floor on how fast it can react, and the function has to live in a layer whose floor is below the deadline.
Figure 2 puts these deadlines on one time axis. The axis is logarithmic, because the interesting values spread over four decades.
Figure 2. Wi-Fi and connected BLE deadlines fall in the range where only logic next to the radio is safe. LTE feedback sits comfortably in the host range, which is why a host-based base station is possible.
- The
red marks are deadlines fixed by a standard. The protocol does not let you move them. - The
green mark is a deadline the network schedules. In LTE FDD it is fixed at 4 ms, and in NR the gNB chooses it per transmission. - The
dashed marks are measured on a host-based Wi-Fi port over a PCIe SDR. The RX block size sets only when samples become available. The ACK path includes decoding, scheduling jitter and the TX write-ahead, and it lands near 4 ms. - The
grey zone is not a fixed boundary. With a radio interface built for very low latency, host software can reach into it. With a streaming interface built for cellular, it cannot.
The reaction deadline is not the only factor, but it is the one that cannot be fixed later. The other factors are easier to trade:
Throughput : how many samples per second must be processed. A wide channel or many antennas can push the work into the FPGA or a GPU even when there is no deadline at all.Determinism : whether the worst case matters more than the average. A deadline missed once per minute is fine for monitoring and fatal for a protocol ACK.Cost of change : host code changes in minutes. FPGA logic needs synthesis, timing closure and validation, and sometimes the vendor does not let you change it at all.Access : an FPGA on the product sheet helps only if its design can be modified. A closed streaming image is fixed, whatever chip it runs on.
Receive-only and transmit-only applications
The easiest applications are the ones that never have to react to what they receive. In these, the host can do almost everything, and the main job of the hardware is to deliver samples without gaps or to play them out on time. Most hobby and lab SDR use falls into this group.
Spectrum monitoring, recording and offline analysis
A receive-only application has no reaction deadline, so latency almost disappears from the design. What remains is continuity and bandwidth. A gap in the stream is invisible in the waterfall but can break a decoder or a measurement, so the sample counters and timestamps matter more than the delay.
In this case, the FPGA usually does only the digital front end: tuning, decimation and timestamping. The host does the rest, and it can even do it later from a recording. The questions to ask are about sustained rates. Can the transport carry the sample rate in the sample format we need, for hours ? Can the disk write it ? Does the driver report overflows instead of silently joining the stream ?
Check continuity, not speed. Count samples and check timestamps over a long capture.Budget the transport and storage. A CF32 stream at 30.72 Msps is 245.76 MB/s per channel before any overhead.
Signal generation and playback
A transmit-only application has a schedule but no peer to answer. So the host can prepare the waveform well in advance, and the only timing requirement is that the samples are in the radio before their air time. The FPGA turns that into accurate air timing with a timed TX command or a timestamp on each burst.
Two things are easy to miss here. The first is underflow: if the host is late, the radio has nothing to send, and depending on the implementation it may send zeros, repeat old samples or stop. The second is what the transmitter does between bursts. An idle transmitter can still leak the carrier, and a blanking method that only gates the amplifier may leave old samples in the buffer. I will come back to both in the last section, because they turned out to matter a lot in a real test.
Check what an underflow does. Zeros, repeated samples and a stopped stream look very different at the receiver.Check the idle transmitter. Carrier leakage and stale samples between bursts are part of the waveform.
Scheduled two-way systems: LTE and NR
An LTE or NR base station is a two-way system, and it has to react to what it receives. So why can it run on a host at all ? The answer is in who sets the deadline. In LTE and NR, the network schedules almost every transmission in advance, and it also chooses how long the feedback may take.
Let's take HARQ as the example. In LTE FDD, UE sends HARQ ACK/NACK 4 ms after the PDSCH. That is a fixed value, but 4 ms is a long time for a host pipeline. In NR it is even more flexible. The DCI carries K1, the delay in slots from PDSCH to HARQ feedback, and the uplink grant carries K2, the delay to PUSCH. The gNB chooses these values, so it can choose values that cover its own processing time. When the numerology gets higher, the slot gets shorter, but the gNB can simply schedule more slots ahead. The job gets bigger, but not more urgent.
So the typical split is: the host runs the whole PHY, MAC and upper layers, and it runs ahead of the radio by a fixed lead. The FPGA keeps the sample clock and plays out each timestamped slot on time. The transport has to keep the pipeline fed. For details of the loop itself, see The Real-Time Loop.
What should we consider for this type of application ?
Lead time budget : the time between receiving a slot and transmitting a slot that depends on it has to cover transport, decoding, scheduling and encoding, with margin for the worst case.Throughput per core : channel decoding is usually the expensive part, and wide NR carriers or higher numerology multiply it. This is a core count problem, not a latency problem.A late slot policy : the host will sometimes be late. The stack needs a defined behaviour, such as dropping the slot, rather than transmitting stale data.Bandwidth of the hardware : FR2 carriers are wider than what a typical AD9361-class transceiver can capture, so FR2 needs a wider transceiver and an mmWave converter. The host-based split itself does not change.
Immediate-response protocols: Wi-Fi and Bluetooth
Now let's look at the hard case. In Wi-Fi, the receiver of a unicast frame must start its ACK 16 us after the end of the frame (SIFS at 5 GHz; 10 us at 2.4 GHz). In a BLE connection, the peripheral must start its reply 150 us after the central's packet. These values are fixed by the standard. Unlike LTE and NR, nobody can schedule them later.
Then you may ask why the host cannot simply prepare the ACK in advance. It can prepare the waveform, because an ACK is short and almost fixed. But it cannot decide to send it until it knows that the frame was addressed to it and that the FCS was correct. That decision is available only at the end of the frame, and the reply must start 16 us later. Every layer between the antenna and the host decision has to fit into those 16 us, and so does every layer on the way back.
This is why openwifi puts the time-critical part of the MAC in the FPGA. Its Linux driver configures the FPGA and exchanges whole frames with it. The FPGA receives the frame, checks the FCS, sends the ACK, runs carrier sensing and backoff, and only then tells the driver what happened. I think "host-controlled but FPGA-timed" is the best short description of it. Figure 3 compares this split with two others.
Figure 3. The same transceiver sits at the bottom of the first two columns. What decides the ACK timing is the layer that holds the ACK decision, not the RF chip.
- The
left column is openwifi. The FPGA holds the ACK decision, so the host never has to react in microseconds. - The
middle column is a host-based Wi-Fi port over a PCIe SDR with a closed streaming FPGA. It keeps the Linux side of openwifi, but the ACK decision moved to the host. Over a direct cable between two such radios, it completed the WPA handshake, but only because both ends waited 30 ms for each ACK instead of about 50 us. - The
right column is an LTE / NR host stack on similar streaming hardware. It works because its deadlines are scheduled in milliseconds.
So what can a host-only Wi-Fi or Bluetooth implementation do ? It can receive frames from standard devices, because decoding needs no immediate reply. It can transmit to a standard device and find that device's ACK later in the timestamped stream. It can exchange frames with another node that uses the same relaxed timing. What it cannot do is acknowledge a standard device's frame on time, so that device retries, lowers its rate and may give up on the link.
Is there any host-based system that met the Wi-Fi deadline ? The Sora research system (NSDI 2009) did, from a multi-core PC. My understanding is that it worked because three conditions held together: dedicated CPU cores that are never descheduled, responses precomputed before the frame ended, and its own radio board with very small buffers. A streaming SDR that needs TX samples written well ahead of air time fails the third condition, and no amount of host tuning can fix that.
Put the ACK decision next to the radio. For Wi-Fi and connected BLE, that means FPGA or controller logic, not host software.Check FPGA access before buying. A closed streaming image cannot be given a lower MAC, whatever RF chip it drives.Bluetooth has a second problem. Classic hops 1600 times per second over 79 MHz, so retuning speed and capture bandwidth matter as much as reply timing.
Sensing, radar and coherent multi-channel systems
Not every demanding application is a communication protocol. Radar, channel sounding and multi-antenna measurement put the pressure on different places. Some of them need very precise timing between transmit and receive, and some of them need several channels to agree with each other. Neither is the same as a protocol deadline.
Let's take a simple pulsed radar as the first example. The transmit pulse and the receive window must line up to the sample, because the delay between them is the range. That alignment is easy for an FPGA and very hard for a host. So the pulse timing and the receive gating sit in the FPGA. Often the first processing steps, such as matched filtering and range gating, sit there too. Detection, tracking and display can run on the host, because a decision that takes a few milliseconds is still useful.
Closed-loop systems are the case to watch. If the next transmission depends on the last measurement, then the loop has a reaction deadline, and we are back to Figure 2. A slow beam tracking loop can close on the host. A loop that must react within one pulse cannot.
Coherent multi-channel systems are different again. MIMO, direction finding and beamforming need the channels to share a sample clock, a common time origin and, for some uses, a stable relative phase. These are three separate requirements. A shared 10 MHz reference gives frequency agreement but not a common time origin. A PPS gives the time origin but not phase coherence. Phase coherence usually needs a shared LO or a calibration step. See Synchronization for the details.
One more thing showed up in a two-radio test on a PCIe SDR. Starting the second card with a transmit channel configured interrupted the receive stream of the card that was already running, every time and in either order. Starting it receive-only did not. So multiple radios on one host need their startup order tested too, not only their clocks.
Ask whether the loop is closed. An open measurement can run anywhere. A closed loop has a deadline.Specify the type of synchronization. Frequency, time origin and phase are separate requirements with separate solutions.Test multi-radio startup. One device starting can disturb another that is already streaming.
What should each layer provide ?
Once we know the application type and its reaction deadline, the split tells us what to check in each layer. Following table is the checklist I would use. The last column comes from a host-based Wi-Fi port over a PCIe SDR, where each of these problems was found the hard way.
Layer | What to check | Why it matters | What went wrong in a real test |
|---|---|---|---|
RF front end | TX to RX isolation, idle carrier leakage, port mapping | A radio's own transmitter is the strongest signal its receiver will see | An idle transmitter leaked a carrier a few kHz off center. Its constant periodicity kept the peer's OFDM preamble detector firing, until a narrow DC notch removed it |
Transceiver | FDD or TDD use of the chains, RX recovery after TX | Sets the turnaround floor of the radio itself | RX kept running through the radio's own TX, so the RF chip was not the limit. Receiver sensitivity right after TX was not measured |
FPGA | Timed TX, burst gating, what blanking does, whether the design can be changed | Decides whether any lower MAC can live next to the radio | The idle blanking left old samples in the buffer, and old frames went on air again. One request was decoded 31 times. Writing explicit zeros fixed it |
Driver and transport | Block size, ring depth, overflow and underflow reporting, multi-device behaviour | Sets the delay, and the tolerance to host scheduling jitter | 256-sample blocks left about 1 ms of buffering. A 1.2 ms host stall lost samples. 2048-sample blocks absorbed a 9 ms stall |
Host software | Worst-case scheduling gaps, CPU per channel, idle behaviour of every thread | The largest and least deterministic delay in the chain | TX loop gaps reached about 1.9 ms. A receive thread that spun while idle cost a full core per radio |
I think the most useful habit from that test was counting each message twice: how many times the sender transmitted it, and how many times the peer decoded it. A sender's own log proves only that it transmitted. When the peer decoded a frame more often than it was sent, the problem was not link quality at all, but replayed samples. The Hardware Selection Guide has the staged qualification test this checklist feeds into.
One more point about sample rate, because it comes up often. A higher sample rate does not make any of these delays shorter. Buffer units on such hardware are usually defined in time, so a higher rate only puts more samples in each unit, and the host has more data to move. For a 20 MHz Wi-Fi channel, the extra rate is just oversampling.
Check every layer against the deadline. The slowest layer in the reaction path decides, not the fastest.Count sends and decodes per message. The gap between the two columns is often the finding.
Reference
- openwifi : Linux driver and FPGA lower MAC split (driver, xpu, openofdm modules)