Deep Learning HDL Workflow “Data size mismatch” after deployment – Possible device tree / AXI DMA configuration issue (ZCU111)
Afficher commentaires plus anciens
Hello,
I am working with Deep Learning HDL Toolbox on a custom reference design
with the Xilinx ZCU111 RFSoC board. I am able to successfully compile the network,
but I am encountering a deployment error.
Setup: - Board: ZCU111 RFSoC - Interface: PS GEM Ethernet - Reference design:
Custom (based on AXI-Stream DDR Memory Access : 3-AXIM) - Tool versions:
Vivado 2024.1, MATLAB (Deep Learning HDL Toolbox)
Workflow: I compile and deploy the network using: 1. compile(hW) 2.
deploy(hW) 3. predict(…)
Problem: The FPGA is programmed successfully, and the system reboots
correctly: - SSH connection is restored - Ping works
However, during deployment/predict, I get the following error on MATLAB:
Connection to the bitstream is no longer valid caused by error: Data
size mismatch.
Observations: - Bitstream programming is completed successfully - Device
tree is loaded and system boots - The error happens after deployment,
during runtime communication with FPGA.
Device Tree Concern: I suspect that the issue may be related to my device
tree definitions, especially: - dlprocessor IP - AXI stream to
memory-mapped interface (AXIS2AXIM / AXI2SMM) - DMA nodes (MM2S / S2MM)
Possible causes: Incorrect child node definitions
Questions: 1. What are the common causes of “Data size mismatch” in Deep
Learning HDL deployments? 2. Can this error be caused by incorrect
device tree configuration ? 3. Are there specific DTB
requirements for dlprocessor, AXIS2AXIM, and DMA nodes? 4. How can I
verify MATLAB runtime correctly binds to DTB nodes?
Also is there any official or working example of devicetree_dlhdl.dtb for:
- Deep Learning HDL Toolbox
- AXI-Stream DDR Memory Access (3-AXIM) reference design
- ZCU111 (or similar Zynq UltraScale+ platforms)
I am especially interested in correct definitions for:
- dlprocessor
- AXIS2AXIM / AXI2SMM
- DMA nodes (MM2S / S2MM)
- mathworks-specific properties (mwipcore, channels, etc.)
If anyone has a working DTB or can point to an example (documentation, repo, or generated output), it would be very helpful.
Thanks!
Réponses (2)
Ritam
le 16 Avr 2026 à 4:43
0 votes
Some of the common causes of “Data Mismatch” in Deep Learning HDL deployments are likely:
- Stream data width / packing mismatch: If your AXI DMA / AXIS2AXIM path is 64-bit on one side and 32-bit on the other, or if the MathWorks stream channel is described with the wrong “data-format”, the host can write N bytes but the receive side observes a different number of bytes and throws “size mismatch”.
- DMA configuration mismatch: If your DT describes DMA as simple mode but hardware is SG (or vice versa), the driver may “probe” but runtime transfers behave incorrectly.
- “Sample count register” / transfer length register mismatch: MathWorks’ streaming/IIO channel model commonly uses a sample-count register (or equivalent) to describe how much to transfer per trigger. If the DT points to the wrong register offset (or the IP changed), the host programs one length while hardware reads another, hence mismatch.
- Wrong base addresses in DT vs Vivado Address Editor: If reg = <base size> is wrong for mwipcore / dlprocessor / DMA, you can still see devices show up, but reads/writes hit the wrong registers, leading to invalid length/format programming.
- Cache/DDR coherency assumptions: Less common for a clean “data size mismatch” message (more often you see corrupted outputs), but if your AXIS2AXIM path relies on ACP/HP port assumptions and the Linux mapping is not coherent, you can see partial transfers and “short reads/writes”.
You may find the below documentations helpful:
- Deploy and Verify Modulation Classification on RFSoC Devices - MATLAB & Simulink
- Get Started with Deep Learning FPGA Deployment on Xilinx ZCU102 SoC - MATLAB & Simulink
If the above resources do not help you, I would recommend you reach out to MathWorks Technical Support through https://www.mathworks.com/company/aboutus/contact_us.html.
Ismail Sercan
le 18 Avr 2026 à 8:31
Modifié(e) : Ismail Sercan
le 18 Avr 2026 à 19:00
0 votes
Catégories
En savoir plus sur Time Series and Sequence Data Networks dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!