Closed jonnykl closed 3 years ago
Hi
Thanks for the report on this. For the write, I don't think the bulk transfer code took the address into account. The reason you see that at 48 bytes is because that's when we switch from USB control transfers to USB bulk transfers. I've made a new firmware (0.53) that I think fixes this, though I'm not sure since I don't think we have a CW305 bitstream that accepts writes that long. If you don't mind uploading your bitstream, I can test this for you.
For the FPGA programming speed, you're probably right regarding the programming speed. I think when I merged all the SAM3U code bases together, we ended up using the CWLite programming speed instead of the faster CW305 one. Firmware 0.52 and newer has the ability to set the fpga programming speed. This now defaults to 10MHz, so if you upgrade again you should see a big speedup.
Alex
Thanks for the report on this. For the write, I don't think the bulk transfer code took the address into account. The reason you see that at 48 bytes is because that's when we switch from USB control transfers to USB bulk transfers. I've made a new firmware (0.53) that I think fixes this, though I'm not sure since I don't think we have a CW305 bitstream that accepts writes that long. If you don't mind uploading your bitstream, I can test this for you.
Thanks, seems to work now!
But there is one more thing I noticed: fpga_write
returns the written data for payloads shorter than 48 bytes. In the other case it returns the number of written bytes. Though the documentation does not specify what is returned, no one would expect this behaviour ...
For the FPGA programming speed, you're probably right regarding the programming speed. I think when I merged all the SAM3U code bases together, we ended up using the CWLite programming speed instead of the faster CW305 one. Firmware 0.52 and newer has the ability to set the fpga programming speed. This now defaults to 10MHz, so if you upgrade again you should see a big speedup.
Yes it's now fast again.
Good to hear it works!
But there is one more thing I noticed:
fpga_write
returns the written data for payloads shorter than 48 bytes. In the other case it returns the number of written bytes. Though the documentation does not specify what is returned, no one would expect this behaviour ...
I'll get this fixed up so that it returns None
. Let us know if you find any other functions that don't specify a return value and return something other than None.
Alex
fpga_write()
is not working for me when using payloads longer than 47 bytes.Used version: develop branch, latest commit (15ff86cbede5d7ab5ce9595021c827c02e70c48d) SAM3U FW version after
upgrade_firmware()
: 0.51On the FPGA a part of the address space is mapped to a memory, so I should be able to read the data previously written. This works fine when writing 47 bytes (or less) but stops working when trying to write 48 or more bytes. This seems to trigger a single write operation:
Side note: I also noticed that the FPGA was programmed much faster before using the develop branch (SAM3U FW version 0.32).