1. First checks
- The driver (sources in the GAASH project:
XdmaVideoAPI,HTGDriver,XDMACore) is a Windows driver: it finds the card through the Windows device list (WMI) and opens it through the Xilinx XDMA kernel driver. Open Device Manager and check that the XDMA card is listed without a yellow warning mark. - Read the start-up log. A healthy start prints, in this order:
XDMA Driver: Frame dimensions <h>x<w>x<bpp> stream '<stream>',XDMA device found, the firmware version (FW Version: <a>.<b>, FW Version Date: <d>/<m>/<y>), the power-up test (Test Pass), the register values (FrameSYNC: External,ImageWidth ...,ImageHeight ...,FSyncDelay ...) andStart Streaming. The first line that is missing is where the problem is. - Check the values in the driver section against the fields in the streams manual (XDMA Driver):
FrameWidth,FrameHeight,BPP,FrameRateUs,FrameSyncDelayMs,SyncSource,DeviceIndex. - Check the block counters in DIPanel or System Layout. The driver also exposes frame counters (written, pending, FC sync, HW sync) through the same panels in the GAASH project.
2. Message reference
<stream> is the stream name from streams.json.
| Message | Cause | What to do |
|---|---|---|
XDMA Driver: Frame size Error in '~/setups/streams.json' stream '<stream>' (error) | FrameWidth, FrameHeight or BPP is 0 or missing. | Set all three. The frame size in bytes is FrameHeight × FrameWidth × BPP and it is the size of the stream's block. |
XDMA Driver: Frame dimensions <h>x<w>x<bpp> stream '<stream>' (info) | Confirmation of the values read. Note the order: height, width, bytes per pixel. | Check them against the camera / FPGA video format. |
XDMA Driver: Error loading SyncRate from '~/setups/streams.json' stream '<stream>' (error) | FrameRateUs is 0 or missing. | Set the frame interval in microseconds (200000 = 5 frames per second, 16667 = 60). |
XDMA Driver: Error loading '<function>' function from HTGDriver (error; <function> is one of HTG_Init, HTG_StreamOnce, HTG_GetCounters, HTG_LoadFrame, HTG_Start, HTG_Stop, HTG_GetVersion, HTG_GetStatus, HTG_SendSwSync, HTG_Close) | The driver binds the HTG entry points when the simulation is reset. A null entry point means the HTG driver part is not linked in or not complete in this build. | Rebuild the project completely (clean build) so the HTG driver sources and the XDMA video driver come from the same version. Check that the project registers XDMADriver and includes the HTG driver files. |
XDMA Hardware device not found. (error) | No XDMA device was found, or fewer devices than the DeviceIndex (index starts at 0). The driver is then disabled (device index set to -1). | See section 3. |
Test Failed: XOR result = 0x<hex> (after Writing Test Out: 0xABCDCAFE / Reading Test In: 0x<value>) | The power-up self test writes a pattern into a test register of the FPGA and reads it back. The value read differs: the PCIe link works but the FPGA design does not answer correctly (wrong firmware, wrong userBaseAddress, FPGA not configured). The XOR value shows which bits differ. | Load the correct bit file, power-cycle the PC (cold start) after programming the FPGA, check userBaseAddress. Reading 0xFFFFFFFF usually means the card does not answer at all (link lost). |
FrameSYNC: Undefined | The sync source register holds a value other than 0 (internal) and 1 (external). | Check SyncSource (Internal, External, Sim) and the firmware version. |
Stream '<stream>': block '<block>': timing <N>us > system minor frame <M>us; data may be lost. (warning) | A numeric framePerMS is longer than the minor frame. | Use -1 for input blocks (every minor frame) and 0 to disable; for an output block use the frame interval of the video. See the note on framePerMS. |
3. "XDMA Hardware device not found"
The driver asks Windows for the installed devices of the XDMA type (WMI query), then opens, for each, the device paths user (register access), h2c_0..3 (host to card DMA channels) and c2h_0..3 (card to host). The count of devices found must be greater than DeviceIndex.
| Cause | How to recognize it | Fix |
|---|---|---|
| XDMA kernel driver not installed (Xilinx / HTG driver package) | Device Manager shows an “PCI Device” / “Other devices” entry with a warning mark, or no entry. | Install the XDMA driver supplied with the card (signed driver for your Windows version); reboot. |
| Card not seen on the PCIe bus | No entry in Device Manager at all, also not under “Unknown device”. | Reseat the card, try another slot, check the power cables, check the BIOS PCIe settings. After programming the FPGA, restart (cold boot) so Windows enumerates it again. |
Wrong DeviceIndex | One card present, DeviceIndex is 1 or higher. | Use 0 for the first card. |
| Device opened by another program | The device paths are opened for exclusive access (no sharing). A second CoreEngine, a Xilinx test utility or the vendor application holds them. | Close the other program. Note that failing to open a path is not reported by its own message — the result is a later failure of the test or of streaming. |
| The device GUID does not match the driver | The device path is built with the GUID {74c7e4a9-6d5d-4a70-bc0d-20691dff9e9d} that is fixed in the source of the core; a different XDMA driver build uses another interface GUID and its paths cannot be opened. The DeviceGuid field of the configuration is read, but the path builder uses the fixed value. | Use the XDMA driver version for which the program was built, or change the GUID in the source and rebuild. |
| Running on Linux / without Windows device APIs | The XDMA driver uses WMI and Win32 file APIs. | Run on Windows. |
4. Configuration traps
- Frame size and block size: the block of the stream has to be
FrameHeight × FrameWidth × BPPbytes. The driver sets the maximum message size of the stream to this value. A block of another size produces distorted or shifted images. BPPis bytes per pixel (2 = 16-bit): the line width written to the card isFrameWidth × BPP, and the line width is expected by the FPGA in multiples of 32 bytes (the driver writes width divided by 32). Use widths whose byte size is a multiple of 32 (640 × 2 = 1280 = 40 × 32 is correct).AddMetadata:"Yes"(any case) adds one extra line to the transferred frame. The FPGA frame height is thenFrameHeight + 1; the receiver has to expect that line.SyncSource:External(frame sync from the FPGA input),Internal(timer atFrameRateUs) orSim(software sync sent by the simulation). The field is only evaluated whenStreamingModeis present in the section (the source tests the wrong field name); always include both fields. A missingSyncSourcewithStreamingModepresent is read without a check and can stop the load; any other text leaves the default.StreamingMode: the value is read and stored, butOnInitalways starts the card with dynamic streaming enabled.Externalsync with no sync pulse: frames are never released. Test withInternalto isolate the camera / sync cable.- Hex strings (
userBaseAddress,DDR_BASE) are read as strings; keep them in the form"0x00020000".
5. Other problems
| Symptom | Cause | Fix |
|---|---|---|
| No video / frames not shown by the receiver | SyncSource External without a signal, or the FPGA waits for frame sync; frames pending in the hardware. | Try Internal; check the sync cable; check the counters (written / pending / sync). The driver sends a software sync at start to release stuck frames. |
| Image shifted, wrong colours or stripes | Wrong FrameWidth / BPP; metadata line not expected; byte order. | Compare the dimensions in the Frame dimensions log line with the receiver; check AddMetadata. |
Frame rate lower than FrameRateUs says | The block is not written every frame (framePerMS larger than the frame time) or the simulation minor frame is slow. | Make the block rate equal to or faster than the frame interval; check minor frame time in System Layout. |
| Works after a PC restart, not after stopping and starting the simulation | The previous run left streaming active or handles open. | The driver stops streaming when it initializes; if the previous process was killed (crash), close it fully, or disable and enable the device in Device Manager, or restart the PC. |
| Intermittent errors / link lost | PCIe slot power or riser problem, system sleep / PCIe power saving, overheating FPGA. | Disable PCIe link power management in the power plan and BIOS; check cooling and power. |
Use the stream hooks to inspect frames before they are sent, and System Layout for the live counters of the blocks.