How the scope works

A map of the Rigol DHO800/DHO900 hardware: what the parts are, how a signal travels through them, and how the logic analyser and the generator fit in.

The big picture

The scope is built around two chips. An FPGA handles everything that has to happen at sample speed: it takes the ADC data, watches for the trigger, fills the memory and runs the generator. An RK3399 processor, six cores and about 4 GB of memory, the same class of chip as in a tablet, runs Linux with the screen, the keys, the network and the mathematics.

The two meet over PCIe. The processor sets the FPGA up through registers, tells it to record, and later reads the finished record. It never sees samples as they arrive.

analog sampleslogic analyser linesgenerator signalsample clockcontrol eventsset-up buses
CH1 to CH4BNC inputsLA portD0 to D15GI / GOBNC output4 x RT1642analog front end:gain, offset,filterRT8847IQADC, 8 cores,12 bitLMX2582sample clockComparatorsthreshold per podOutput stageDAC, amplitude and offset, relays,attenuators, supply switch1.25 GHzFPGA side: Zynq XC7Z015, DDR memory, QSPI flashAcquisition (SPU)lanes, sample rateSample memoryDDR, raw 12-bitADC codesRead pathgain, compression,interpolationTrigger (TPU)comparators, events,time conditionsControl (SCU)run, stop,record, playPCIe endpointXDMALA captureone 16-bit wordper sampleGenerator (DDS)wave RAM, phaseaccumulatorRegister bus (BAR1)every block here is set up through32-bit registersQSPI flash + boot monitorholds the FPGA images; the processoronly says which one to start28 lanesADC SPIsamplesfiresrecord / playwordsD0 to D15RK3399 processorLinux 6.12oos-ui: screen, SCPI,web remote, math,decodersDisplay7 inch, 1024 x 600TouchI2CPanel MCUkeys, knobs, LEDs, powerEthernet100 MbitUSB hostfront portSD cardthe whole systemPCIex2AFE bus: SPI driven by GPIO, one chip select per channelGPIO: output stage relays and supply; 3-wire bus to the LMX2582SPI1
The whole scope. Signals run left to right; the generator runs right to left. The FPGA does everything that has to keep up with the sample clock. The processor only sets up, reads finished records and draws them.

One analog channel

The front end (one RT1642 per channel) makes any input fit the ADC: it selects the coupling and an input path, sets the gain for the V/div, adds the offset with its own DAC, and limits the bandwidth. It is set over a slow serial bus, so changing V/div takes real time.

The ADC turns the four front ends into 12-bit numbers and sends them to the FPGA on 28 serial lanes. The timing of each lane is measured at every start, because at these speeds every path differs a little.

BNCsignal inFront endcoupling, attenuator,gain, offset DAC,filterADC8 cores, 12 bit,1.25 GHz clockSPUaligns 28 lanes,sets sample rateDDR memoryraw 12-bit codes,up to 125 M pointsRead pathgain and offset,to 16-bit wordsPCIeinto the processor'smemoryoos-uivolts, measurements,pictureanalog until the ADC, then 12-bit codes, stored as they are16-bit words on the way out: 7500 codes per division around 32768
One channel. The memory holds what the ADC delivered. The digital gain and offset correction comes only on the way out, when a record is read.

Why the sample rate depends on the channels

1 channelCH1CH1CH1CH1CH1CH1CH1CH11.25 GSa/s, 125 M points2 channelsCH1CH2CH1CH2CH1CH2CH1CH2625 MSa/s each, 62.5 M points3 or 4 channelsCH1CH2CH3CH4CH1CH2CH3CH4312.5 MSa/s each, 31.25 M pointscore 0 to core 7
The ADC has eight cores. With one channel they all sample it in turn, which is what gives 1.25 GSa/s. More channels share the cores, so the rate and the memory per channel fall. Two channels take the even and the odd cores, whichever two they are. Three channels run as four, with one slot unused.

Acquisition: record, then play

The memory works like a tape loop. While armed, samples run in and the oldest fall out, so the part before the trigger is always there. When the trigger fires, the FPGA keeps recording for the post-trigger part and stops. Only then can the processor have the record played to it.

pre-trigger partpost-trigger parttriggersample memory, one recordPlay to PCIe1Arm2Fill3Trigger4Finish5Stop6Play7Readset up, recordsamples run in,older ones roll outthe TPU firespost-triggerpoints, done flagthe record enginestopsmemory to read pathprocessor takes it,re-armsevery record is one full cycle, also in RUN; a batch records many frames first and plays them in one read
Recording and reading never happen at the same time. The memory cannot be played while it records, so each record costs a full stop and arm cycle. That cycle, not the ADC, limits the waveform rate: in one test with a 1 kHz signal about 30 records per second as single frames, about 800 in batches.

The read path sits between the memory and PCIe. For a live picture it thins out a long record by a factor or stretches a short one by interpolation, so that the transfer stays small. For a full record it is set to pass everything through unchanged. Its settings have to match the read exactly: the FPGA sends a fixed number of points per frame, and a frame that cannot fill it never ends.

In roll and scan mode this changes: at slow time bases the FPGA streams chunks continuously, and the processor builds the moving picture from them.

Trigger

The trigger unit decides when a record is complete. It is built from simple parts that combine into all the trigger types:

PartWhat it does
ComparatorsTwo per analog channel, level A and level B, which is how window and slope triggers get two levels. LA lines use the pod comparators instead. The EXT input, where a model has one, has its own.
Events A and BEach picks comparators, an edge and a pattern over all channels and LA lines (high, low, don't care, combined by AND, OR, NOR).
Time conditionsGreater than, less than, inside, outside, timeout. Time ticks are 1.6 ns and 6.4 ns.
Holdoff and autoHoldoff blocks the next trigger for a time. Auto fires by itself when nothing else does, so the screen keeps moving.

Protocol triggers go a step further in software: the hardware fires on a line, and OOS looks for the wanted field in the decoded record.

Logic analyser

The optional PLA2216 probe adds 16 digital lines. A comparator turns each line into 0 or 1 against the threshold of its pod, and the FPGA packs them into one 16-bit word per sample.

The LA shares the memory with the analog channels, which is why switching it on costs depth. With a channel shown, the analog rate is halved as well.

PLA2216 probe2 pods,8 lines eachComparatorsone threshold per pod,up to +-15 V16-bit wordbit n = Dn, alwaysall 16 linesSample memoryown part of eachsegment, depth fallsSecond readafter the analogread of the recordoos-uilanes, decoders,CSV, SCPITrigger (TPU)D lines as sourcesThreshold DACset by one registerProbe detectone GPIO line, no IDAnalog samplesup to 625 MSa/swith analog shown:312.5 MSa/s
The logic analyser. There is no per-line switch: with the LA on, all 16 lines are recorded and the choice of lines is only a display matter. Analog and LA words are never mixed: they arrive in separate reads, or in roll mode as separate chunks marked in their header.
Analog channelsMax. depth per channel, LA offMax. depth per channel, LA on
1125 M31.25 M
262.5 M12.5 M
3 or 431.25 M10 M

Generator

The generator of the S models is a direct digital synthesiser in the FPGA. A phase counter steps through a table at a fixed clock; the size of the step sets the frequency. Software fills the table with the wanted shape, so the hardware does not know sine from square.

In the FPGA, clock 156.25 MHz (ADC clock / 8)Phase accumulator56-bit incrementsets the frequencyWave RAM8192 samples, 16 bit:sine, square, ramp, arb ...Modulation RAM4096 entries:AM, FM, PMphasemodulatesLevel wordsamplitude and offset,16 bit eachDACwave to voltageRelays, attenuators-10 dB, -20 dB, x10, -20 dB,set by 5 GPIO linesGI / GOBNC outputone value per clockSupply switchone GPIO line, on onlywhile the output is onpowers the output stage
The generator. Every wave shape is only a different table in the same RAM; only noise uses a fixed phase step. Software picks the relay gear from amplitude and offset, and corrects levels with the factory calibration. There is no sweep, burst or sync output in hardware: the Bode plot sets one frequency after the other.

OOS limits the output to: sine, noise and DC up to 60 MHz, square 15 MHz, pulse 2 MHz, ramp 150 kHz, arbitrary 10 MHz. The output is switched on in a fixed order: relays safe, supply on, relay code, then the FPGA.

Clocks

One PLL chip, the TI LMX2582, makes the 1.25 GHz sample clock. Almost everything with a time in it follows from that number.

ClockValueUsed by
ADC clock1.25 GHzADC; the expected count of a self-check in the FPGA
ADC / 8156.25 MHz, 6.4 nsgenerator, roll stream, trigger time ticks
ADC / 2 assumed625 MHz, 1.6 nsfine trigger time ticks
ADC / 20 assumed62.5 MHzsample rate divider below 62.5 MSa/s

Start-up

Stock loaderreads the card,starts LinuxLinux, rcSsays BOOT to theFPGA over SPI1FPGA loadsfixed wait, 10 s,from QSPI flashPCIe upregisters andstream reachableSample clock46 words to theLMX2582Front ends4 x RT1642, trimand calibrationADC + SPU104 words, eye scanof 28 lanesChecksDDR, clock count,first RUNoos-ui already shows the start-up screen; the network comes up in the background
The start, about 15 to 20 s by estimate. The FPGA needs its 10 s no matter what, so the rest of the system starts in parallel. Only after PCIe is up can the processor reach any FPGA register.

After a power cut the FPGA, the ADC and the front ends know nothing. OOS brings all of them up by itself; the stock system does not have to run first. Calibration values come from the factory files on the card, which OOS only reads, or from its own self-calibration.

Who talks to whom

LinkBetweenCarriesMore
PCIe Gen2 x2 (XDMA)RK3399, FPGAregisters and recordsfpga-boot.md
SPI1RK3399, FPGA boot monitorwhich image to startfpga-image.md
SPI by GPIO, about 100 kHzRK3399, 4 x RT1642front end settingsafe-spi.md
SPI master in the FPGAFPGA, ADCADC set-upadc-spu-init.md
3-wire by GPIORK3399, LMX2582clock table, write onlypll.md
GPIORK3399, generator output stagerelays, supplyafg.md
UART0, 1.5 MbaudRK3399, panel MCUkeys, knobs, LEDs, powerfrontpanel.md
I2C, GPIORK3399, touch, FRAM, fan, beeperthe rest of the boardboard.md, gpio-map.md

What differs between models

All DHO800 and DHO900 models run the same software. They differ in what is fitted, and models.md has the full table.

DHO800DHO900S models (DHO914S, DHO924S)
Channels2 or 444
Logic analyser portnoyesyes
Generatornonoyes
EXT trigger inputDHO802, DHO812nono

How sure is this

This page summarises the documents in docs/, which say for each statement how it is known. In short:

PartState
Start-up, analog acquisition, trigger, roll and scan, generator sineseen on a DHO924S
LA word format and rateseen on a DHO924S under the stock system
LA under OOS, generator modulation and noisetests on the host only
All other modelsnever run

All of this is known from the software side: the device tree, the registers and how the hardware answers. The part numbers of the ADC and the front ends come from there too and have not yet been read off the chips. The inside of the front ends and of the generator output stage is drawn only as far as the software can see it.