- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm running my FX3 chip in conjunction with a cyclone FPGA, using the SlaveFIFO firmware. When i try and use the BulkOutEndPt.Xferdata to write data to my FPGA it seems to work fine most of the time. However if the number of words written is specified as 128,256,512,1024... ect then the DMA flag to begin my FPGA FIFO state machine, doesn't trigger. Its also worth noting that, if i then proceed to do a read, the 512 (or other specified length) write will happen then the DMA flag is triggered.
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ricky,
Please refer to the following article to understand under which circumstances data from USB(coming from Host) does not get committed to GPIF:
Data sent from Host over USB is not Committed to GPIF configured as Slave FIFO in FX3 – KBA223338
If your buffer size is 16384, then sending 128, 512, 256 <1024 will cause the buffer to be committed to GPIF in 3.0 and you should see the Flag indicating that the data is present (not empty)
But if you send 1024/2048/.. <16384, it will not commit since it is a multiple of 1024 and less than 16384.
Where as in case of 2.0, if your buffer size is 16384,
On sending 128, 256 < 512 will cause commit to GPIF. But on sending multiple of 512 and < 16384 will not cause commit to GPIF thereby the Flag status remains empty.
- Are you aware of the above?
- Are you measuring the Flag voltage after connecting the FPGA or you are connecting the FX3 pins directly without connecting FPGA?
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is your buffer size and number of buffers associated with the USB to GPIF DMA Channel?
Confirm whether you are operating th device in USB 3.0 and USB 2.0?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have it connected as USB 3.0, so the buffer size is 1024 and for both U_to_P/P_to_U my number of buffers is 4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well.
Now tell what is wroking scenario and not working scenario with example step by step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So basically I'm just using the Slave FIFO to run data transfer to and from my FPGA.
Working:
When I send out a data packet that is not of any of the above mentioned sizes. The DMA flagd (CTL 😎 to signal data to be recieved by the FPGA, goes High. My FPGA sees this and runs the internal program then returns data as I would expect.
Not Working:
When I try and transfer out data of the above mentioned sizes (128, 256, 512, 1024... ect), the DMA flagd (CTL 😎 does not go High, hence my FIFO system does not start. I would also add that if I transfer another packet after (lets say 127 or 129 words), this data is added to the previous packet (any of the non-working ones) and transferred out as a whole. For example if I were to attempt to send 128, which wouldn't work then send 127, the total for that transfer would be 255 words.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also just to add a correction, the DMA Buffer size is 1024 * 16, so 16384 all up. And that when I transfer the 128 out through my BulkOutEndPt.XferData, the bResult is returned as true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the Flag D here? Is this a Dedicated flag or water mark flag?
Can you please share the GPIF II Project to know this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please attach other project files in the GPIF project to view the state machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ricky,
Please refer to the following article to understand under which circumstances data from USB(coming from Host) does not get committed to GPIF:
Data sent from Host over USB is not Committed to GPIF configured as Slave FIFO in FX3 – KBA223338
If your buffer size is 16384, then sending 128, 512, 256 <1024 will cause the buffer to be committed to GPIF in 3.0 and you should see the Flag indicating that the data is present (not empty)
But if you send 1024/2048/.. <16384, it will not commit since it is a multiple of 1024 and less than 16384.
Where as in case of 2.0, if your buffer size is 16384,
On sending 128, 256 < 512 will cause commit to GPIF. But on sending multiple of 512 and < 16384 will not cause commit to GPIF thereby the Flag status remains empty.
- Are you aware of the above?
- Are you measuring the Flag voltage after connecting the FPGA or you are connecting the FX3 pins directly without connecting FPGA?
Regards,
Hemanth