Lab 11.11 - Contention probe between host IIO capture and gpreg burst control¶
Lab 11.11 - Contention probe between host IIO capture and gpreg burst control¶
Goal¶
Determine whether the current course overlay can support host-side iio_readdev capture and PS-side gpreg burst control at the same time, or whether those two operations interfere with each other.
Engineering question¶
Is the current blocker a missing RF signal, or a deeper contention between the Linux IIO capture path and direct
devmemaccess to the course gpreg block?
Script¶
| File | Purpose |
|---|---|
blocks/block_11_integrated_sdr_project/python/lab_11_11_iio_gpreg_contention_probe.py |
runs standalone and overlapping capture scenarios, snapshots axi_ad9361_adc_dma, and records which side fails under overlap |
Minimum scenario set¶
The probe should include three scenarios:
- standalone
iio_readdevcapture; - short overlapping capture with a near-immediate burst trigger;
- longer overlapping capture with a later burst trigger.
That is enough to separate:
- "IIO never works";
- "gpreg never works";
- "both work alone but interfere under overlap."
Example run¶
python blocks/block_11_integrated_sdr_project/python/lab_11_11_iio_gpreg_contention_probe.py \
--ssh-host 192.168.40.1 \
--ssh-user root \
--ssh-password analog \
--iio-uri ip:192.168.40.1 \
--json-out docs/assets/lab111_iio_gpreg_contention_probe_live.json
Report contract¶
The JSON report should capture:
- AD9361 state before and after the probe;
- one
axi_ad9361_adc_dmaregister snapshot before and after each scenario; - standalone capture result;
- overlapping capture result;
- overlapping burst-helper result;
- the last
dmesglines after each scenario.
Interpretation¶
If standalone capture succeeds but overlapping scenarios fail asymmetrically, the course should treat that as a structural integration problem, not as a BER-tuning problem.
Typical outcomes:
- capture succeeds, burst fails with
Bus error; - burst succeeds, capture fails with refill timeout;
- both succeed only when not overlapping.
Those outcomes point toward an integration or arbitration issue around the live PL design, not toward ordinary RX gain or START_OFFSET tuning.
Current live note¶
Live follow-up on 2026-06-21 split the problem into two separate layers:
- disabling the
axi_gpreg_bpskclock-monitor input removed the earlier overlap-timeBus erroron0x79040004; - the same rebuilt overlay still disturbed the Linux RX capture stack when it was hot-loaded through
fpga_manageron an already running system; - after that hot reload,
gpregaccess recovered but standaloneiio_readdevcaptures returned refill timeoutUnknown error (110); - a manual U-Boot
fpga loadof the same bitstream before Linux boot proved that the older “remove DAC DMA from PL” overlay panics the kernel inaxi_dmac_probe(), so the stock Linux device tree still expects that TX DMA path to exist in hardware; - attempting to recover the RX DMA path with Linux platform-driver
unbind/bindcaused a kernel oops indma_channel_rebalance().
Second live follow-up on 2026-06-23 narrowed the failure mode further:
- the corrected word-swapped
bridge_txrx_muxpayload was hot-loaded again from the stock-shell baseline throughfpga_manager; - the host still saw the three-device IIO context (
ad9361-phy,cf-ad9361-dds-core-lpc,cf-ad9361-lpc) after the reload; axi_gpregalso became readable again and the burst helper repeated the knowndone + timeout,tx_valid_count = 2376,rx_valid_count = 0,received_bits = 0result;- however, a short timed
iio_readdevcapture still returned refill timeoutUnknown error (110)with zero samples; - a compact safe-power RF sweep over multiple
START_OFFSET, RX-gain, and TX-attenuation combinations still produced no RX-side activity.
Third live follow-up on 2026-06-23 removed the last remaining stock-shell ambiguity:
- the dedicated comparison helper
blocks/block_11_integrated_sdr_project/python/lab_11_13_stock_vs_runtime_rx_compare.pyverified that a fresh stock shell still supports both a direct hostlibiio Buffer.refill()capture and a shortiio_readdevcapture before any overlay reload; - the same helper then hot-loaded the corrected payload through
fpga_manager, confirmedaxi_gpregreadback again, and reproduced the same runtime failure on both host RX paths:libiiofailed withOSError: [Errno 110] host unreachableandiio_readdevfailed with refill timeoutUnknown error (110); - the same comparison also showed
cf-ad9361-dds-core-lpcchanging fromsync_start_enable = armon the stock shell tosync_start_enable = disarmafter the runtime reload.
Practical consequence: the blocker is now narrower than "runtime reload breaks everything". The stock shell baseline is healthy, the current runtime image keeps fpga_manager, axi_gpreg, and basic IIO enumeration alive, but the RX DMA / refill path still does not deliver usable samples and the bridge still sees no RX-valid traffic. Do not use live fpga_manager reload plus driver rebinding as the normal course workflow until the board has been revalidated after a clean boot.
Engineering conclusion template¶
Standalone IIO capture ______.
Short overlap caused ______.
Long overlap caused ______.
The next step is to inspect ______ before doing more BER sweeps.