Multiple issues with VIA VL805 donor — Code 10 on Windows 10
Description
Board: CaptainDMA_35T (XC7A35T-484)
- Vivado: 2023.2
- PCILeechGen: latest main branch
- Donor device: VIA VL805 USB 3.0 xHCI Host Controller
- VID/DID:
1106:3483 - Class:
0C0330(xHCI)
- VID/DID:
Problem
After generating firmware with a VIA VL805 donor and flashing it to the board, the device appears in Windows 10 Device Manager as "USB xHCI Compliant Host Controller" with Code 10 error (0000000A — IRQL_NOT_LESS_OR_EQUAL). The device fails to start even after full power cycle.
Issues Found During Investigation
1. Duplicate file placed in wrong directory
The build script places a patched pcileech_tlps128_bar_controller.sv inside the src/ folder alongside the original one from pcileech-fpga. This causes Vivado to report duplicate design units:
[filemgmt 20-1318] Duplicate Design Unit 'pcileech_bar_impl_loopaddr()' found in library 'xil_defaultlib'
Duplicate found at line 1 of file ".../src/pcileech_bar_impl_loopaddr.sv"
Duplicate found at line 726 of file ".../src/pcileech_tlps128_bar_controller.sv"
The generated bar_controller.sv already contains all submodules inlined, but the original separate files remain in src/ causing conflicts. The project cannot synthesize until the original pcileech_tlps128_bar_controller.sv is manually removed from src/.
2. Multi-driven net in generated pcileech_tlps128_bar_controller.sv
The signal bar0_spill_valid is assigned in two separate always @(posedge clk) blocks simultaneously — the spill FSM block (lines ~159–181) and the buffer FSM block (lines ~265+). This causes a hard synthesis error:
[Synth 8-6859] multi-driven net on pin Q with 1st driver pin '...bar0_spill_valid_reg/Q'
[Synth 8-6859] multi-driven net on pin Q with 2nd driver pin 'GND'
Note: there is even a comment in the buffer FSM block saying "bar0_spill_valid is reset by the spill always block above", yet the assignment is still generated there.
3. BAR0 type changed from 64-bit to 32-bit
The VIA VL805 donor has a 64-bit prefetchable BAR0 (original value: FC600004, where the 04 indicates 64-bit memory space). The scrubber converts it to a 32-bit BAR with a 4KB size mask (FFFFF000), as visible in scrub_diff_report.txt:
[010] FC600004 -> FFFFF000 - clamp BAR0 to 4 KB (type=32-bit)
The generated firmware also has no 64-bit BAR support — device_config.sv only defines BAR0_SIZE = 4096 with no 64-bit flag, and pcileech_bar_impl_device.sv contains no 64-bit BAR logic. Windows driver reads the BAR type from config space and the mismatch between the original 64-bit donor and the emulated 32-bit BAR may contribute to the Code 10 error.
Hardware ID
PCI\VEN_1106&DEV_3483&SUBSYS_34831106&REV_01
Error Type
Code 10 (device cannot start)
Device Context File
Windows Event Log
## Windows Event Log (Kernel-PnP)
Device failed to start:
PCI\VEN_1106&DEV_3483&SUBSYS_34831106&REV_01\6&1aefe097&0&0028000A
Driver name: usbxhci.inf
Class GUID: {36fc9e60-c465-11cf-8056-444553540000}
Service: USBXHCI
Lower filters: (none)
Upper filters: (none)
Problem: 0xA (Code 10 - device cannot start)
Problem status: 0xC0000001 (STATUS_UNSUCCESSFUL - The requested operation was unsuccessful)
Device Manager Error Details
Device Manager Error
This device cannot start. (Code 10) An invalid parameter was passed to a service or function.
Terminal Output