[lowrisc-dev] Nexys debug communication
Dr Jonathan Kimmitt
jrrk2 at cam.ac.uk
Sun Jun 18 08:44:19 BST 2017
Vivado keeps coming up as a bottleneck. Have you considered the no Vivado solution, making use of the SVF conversion facilities of 2016.x onwards Vivado? That way one C program could look after the JTAG aspect as well as any second port that was available. I have extracted the relevant code from OPENOCD and it looks straightforward to add custom code for whatever purpose. Of course any code that makes decisions on the basis of JTAG values read out will impact performance (but not configuration time which is about 4s for a nexys4ddr).
I have been using this for a few weeks without physically connecting Vivado to a board, and it seems OK. You can even talk to multiple boards simultaneously from one PC.
Sent from my iPhone
> On 18 Jun 2017, at 07:15, Stefan Wallentowitz <stefan at wallentowitz.de> wrote:
>> On 17.06.2017 23:13, Peter Stuge wrote:
>> Stefan Wallentowitz wrote:
>>>> FT245 async mode yields 10-12 MByte/s throughput so it's slower than
>>>> sync, but it is reliable, and having a single connection to the board
>>>> for both programming and debugging would be convenient. As would not
>>>> needing to buy a separate interface board. :)
>>> Yes, that would be very desirable.
>> Ok - so that's still usable throughput? Then we should give this a go.
>> Another question up front is portability requirement. Obviously the
>> more portable the better, but just how important are Windows and macOS
>> in this equation? Both of them make things more complicated, but I think
>> there is still a solution to be had. (Is there Vivado for macOS at all?)
> To me personally it doesn't matter at all and I think for the lowRISC
> project it is of very minor priority, so we can ignore that for now.
>>>> I am happy to write software to make debug communication over channel A
>>>> work in parallell with Vivado JTAG if there is interest. I can't do the
>>>> FPGA side FT245-style async interface however, so someone would have to
>>>> help me with that part. It seems to me that we could finish it in a
>>>> single day if we worked together.
>>> That would be awesome. I have limited bandwidth currently, but I think
>>> we can work it out between Cambridge and Munich to assist with the glip
>>> hardware side.
>> Great! I don't have an actual Nexys at the moment, and the first
>> thing to investigate would be whether Vivado cares about channel A.
>> For that I would like to ask for some help. I've attached a small
>> program claim.c, which uses libusb to claim one interface on an
>> attached device and then pauses. Build and run it on a Linux system.
> Thanks! I can try it today, but it seems you forgot the attachment or it
> did not make it to the list. Please send it to me directly.
>>> That was indeed the case when I used Vivado. When channel A is used
>>> for serial communication, I couldn't use the ICE-JTAG.
>> How did you use channel A? Through libftdi, /dev/ttyUSB0 or another way?
> Via /dev/ttyUSB0
>> I wonder what exactly Vivado tries to do in USB terms to access the JTAG.
> Unfortunately this whole stuff is pretty closed. But it is my
> understanding it tries to claim to claim the entire device.
>> The claim.c program will provide some information, but even if it
>> fails we can still look a little bit closer. Then I'd either use
>> strace or write a preload .so to see exactly what it tries to do.
> Great, I am happy to do this with you.
>>>> Unlike previous FTDI products, the FT600 actually uses USB very well.
>>>> FTDI drivers are irrelevant, we would just use our own software,
>>>> which I would also be happy to write. The required effort is low.
>>> This would be highly appreciated. I have one of those for testing, too.
>>> I am happy to coordinate the hardware side again here. The FIFO
>>> interface at least in the spec seems simpler than in the FX3.
>> Sounds good. Which of the two FMC boards do you have? 16 or 32 bit?
> I only have the 16 bit, can't remember why I didn't get the 32 bit..
>>>> requirements, or wishlist
>>> The more the better ;)
>> Sure. :) I wanted to ask if the 10-12 MByte/s with FT2232H would be at all
> Yes, definitely! It would always be great to provide a decent
> self-contained solution, where people don't need to buy extra hardware
> for using lowRISC at good quality. A factor 10 improvement on the
> on-board FT chip is definitely something useful to "the average user".
More information about the lowrisc-dev