Alcaic Research and technology, not iambic verse.

17Sep/097

Virtualbox and the Xilinx USB Platform cable

Recently, I have been playing around with the ML-505 platform from Xilinx. One thing that kept biting me (a Mac user) is how the USB platform cable did not seem to work inside the Windows and Linux virtual machines (since Xilinx does not support Mac OS X).

If you google for the problem, you'll find many similar problems, and many that suggest plugging and re-plugging your device. Since this worked, I looked a bit closer at the problem and now have a solution that does not require this (for a Windows guest, at least).

The problem is that the USB cable changes its identity (its PRODUCT ID, more properly), from 0x000f to 0x0008 after its firmware has been loaded, causing the connection to the virtual machine to drop. The solution is to put in two capture filters, one with each ID.

Hope this helps someone. I'll keep you posted on the Linux case - but you might want to look at

Update: I can confirm that Linux works as well, but I did have to do the plug/replug routine that has be documented elesewhere (i.e. unplug from one USB port and plug into the other). Nonetheless, happy camper. Update to update: well, the routine is no longer necessary - it seem to work directly if the cable is plugged in at guest boot time.

Update 2: The virutalization of my windows guest is horrible compare to the one for linux. The speed difference is amazing.

Update 3: This is what I use before I start xps_sdk: source /opt/Xilinx/11.1/settings32.sh; export LD_PRELOAD=~/XL_USB/usb-driver/libusb-driver.so; export XIL_IMPACT_USE_LIBUSB=0

Update 4: In response to Ryan's comment (see below), here is my full setup - note the addition of specific vendor and product match strings.

Filters:

Shows the USB filters configured.

Shows the USB filters configured.

Filter for unconfigured device (no firmware):

Filter for unconfigured device.

Filter for unconfigured device.

Filter post-configuration:

Filter after firmware upload.

Filter after firmware upload.

Comments (7) Trackbacks (0)
  1. Do you have any additional info you can post about how you got it to work?

    I’m using a Spartan-3e with snow leopard as the host and with xp sp3 or ubuntu 9.10 as the guest. In either case I get the same error.

    The Spartan3e initial production ID seems to be 000d
    Product ID: 0x000d
    Vendor ID: 0x03fd (Xilinx Inc.)
    Version: 0.00
    Speed: Up to 480 Mb/sec
    Location ID: 0×26200000
    Current Available (mA): 500
    Current Required (mA): Unknown (Device has not been configured)

    The device is initially listed as “available.” After having VirtualBox try to capture the device it switches to 0008, assumes the name of XILINX and the green led illuminates on the board next to the usb port (I assume this means the firmware has loaded/usb port is active)

    Product ID: 0×0008
    Vendor ID: 0x03fd (Xilinx Inc.)
    Version: 0.00
    Speed: Up to 480 Mb/sec
    Manufacturer: XILINX
    Location ID: 0×26200000
    Current Available (mA): 500
    Current Required (mA): 74

    At which point the device is listed as “busy.” If I attempt to capture the new XILINX device it will become listed as “captured” however it is not accessible and is not listed with the typical check-mark next to it. Eventually it will return to the ‘busy’ state.

    An additional attempt to capture it while listed as ‘captured’ will throw up an error:
    Failed to attach the USB device XILINX to the virtual machine Winblows.
    USB device ‘XILINX XILINX’ with UUID {92f01e3d-9a76-4c0a-b7fc-f1f2df8b6d57} is busy with a previous request. Please try again later.

    Result Code:
    NS_ERROR_INVALID_ARG (0×80070057)
    Component:
    HostUSBDevice
    Interface:
    IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a}
    Callee:
    IConsole {0a51994b-cbc6-4686-94eb-d4e4023280e2}

    I tried the steps you outlined above by setting up two capture filters for each ID but no luck. I have even tried only one capture filter at a time, I have tried countless permutations of plugging the device in, unplugging it, turning it on and off with the VM running and not etc. etc. Not once have I gotten either xp or ubuntu VM to recognize the device is plugged in.

    Any details you could list about how you got your card to work would be GREATLY appreciated!

  2. Hi Ryan,
    Yes, there is a specific step you have to set for the filter config. I’ll check tomorrow on my other machine and get back to you in a next comment. (or in the main text)

  3. You nailed it! Thanks for this piece of info.

  4. FWIW, I noticed that the env variable shown in update #3 above is missing the underscores. It seems they are rendered as enabling/disabling italics, instead of showing up as underscores (the underscores are there in the http://rmdir.de/~michael/xilinx/ link shown above).

  5. fixed – markdown problem.

  6. VERY useful info, thanks.
    From my part, I wanted to share that this didn’t work out-of-the-box for a Platform Cable USB II, used in a Win7-on-Win7 virtualbox config. Guessing that the PID of my initial usbDevice would not be 0x000f, I just used one filter, where I removed the VID field. As such, it auto-captures ALL xilinx devices connected.
    As such, my filter specifies just the first 2 fields, with following values: “XILINX” and “03fd”.

    Note: I still need to plug the cable in a new USB port, so the drivers have the chance to be reloaded on the guest. Alternatively, if you already screwed up all your USB ports, I guess you could remove the driver for the first usbDevice. Not been there, though.

  7. Hi All.
    Please tell me, how to connect the USB in Win Xp on VirtualBox based in Win 7.
    IMPACT send – ” WARNING:iMPACT:923 – Can not find cable, check cable setup !”
    ISE ver.10.1


Leave a comment

No trackbacks yet.