Re: [fpgalink-users] usb bulk write failed

270 views
Skip to first unread message

Chris McClelland

unread,
Jun 19, 2012, 8:01:43 PM6/19/12
to fpgalin...@googlegroups.com
Hi Giovanni,

My theory is that the VMware USB emulation introduces a bit of latency
which causes the write to timeout. I have only tested on VirtualBox and
Parallels so I can't be sure. I built a version of the library with a
longer timeout for you to test. You can download it from here:

http://www.swaton.ukfsn.org/temp/giovanni_1.tar.bz2

Please try it like this (or use linux.i686 if your Linux VM is 32-bit):

wotan$ tar jxf giovanni_1.tar.bz2
wotan$ cd flcli/
wotan$ ./linux.x86_64/rel/flcli -i 1443:0005 -v 1443:0005 -x
ex_cksum_nexys2-1200_vhdl.csvf -p -s
Attempting to open connection to FPGALink device 1443:0005...
Loading firmware into 1443:0005...
Awaiting renumeration......
Attempting to open connection to FPGLink device 1443:0005 again...
Connecting USB power to FPGA...
The FPGALink device at 1443:0005 scanned its JTAG chain, yielding:
0x21C2E093
0xF5046093
Playing "ex_cksum_nexys2-1200_vhdl.csvf" into the JTAG chain on FPGALink
device 1443:0005...
wotan$ ./linux.x86_64/rel/flcli -v 1443:0005 -c
Attempting to open connection to FPGALink device 1443:0005...

Entering CommFPGA command-line mode:
> w0 12
> q



On 20/06/12 00:24, Giovanni G wrote:
> I'm trying to use FPGALink from binaries on a Digilent Nexys 2 1200k.
> These are my steps:
> 1. turn on my Nexys
>
> 2. flcli -i 1443:0005 -v 1443:0005 -x
> gen_csvf/ex_cksum_nexys2-1200_vhdl.csvf -p -s
>
> 3. flcli -v 1443:0005 -c
> And i obtain:
>
> Entering CommFPGA command-line mode:
> > w1 12
> flWriteChannel(): flWrite(): usb_bulk_write() failed returnCode -110:
> No error
>
> I'm using Ubuntu 10.04 with Vmware.
> --
> You received this message because you are subscribed to the Google
> Groups "FPGALink Users" group, which is for discussions about FPGALink
> (http://www.makestuff.eu/wordpress/?page_id=1400).
> To post to this group, send email to fpgalin...@googlegroups.com
> To unsubscribe from this group, send email to
> fpgalink-user...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/fpgalink-users?hl=en

Giovanni G

unread,
Jun 19, 2012, 8:51:12 PM6/19/12
to fpgalin...@googlegroups.com
Great!Now it works... so what's about the problem?Do I have to do,set anything If i wanna to create a new C application?
> To post to this group, send email to fpgalink-users@googlegroups.com
> To unsubscribe from this group, send email to
> fpgalink-users+unsubscribe@googlegroups.com

Chris McClelland

unread,
Jun 19, 2012, 9:25:28 PM6/19/12
to fpgalin...@googlegroups.com
No, the change I made was in the library itself (libfpgalink.so). I will apply the changes to GitHub and put them in the next release, which will be in the next day or two. Until then you can continue using the modified libfpgalink.so; you do not need to change any application code.

If you're interested, the problem was the short (100ms) timeout here:

https://github.com/makestuff/libfpgalink/blob/master/libfpgalink.c#L207

...and almost certainly also here:

https://github.com/makestuff/libfpgalink/blob/master/libfpgalink.c#L272

Chris
To post to this group, send email to fpgalin...@googlegroups.com

To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages