FIFO Write problem with 128,256,512... words

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth

View solution in original post

0 Likes
10 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

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?

0 Likes
Anonymous
Not applicable

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.

0 Likes

Well.

Now tell what is wroking scenario and not working scenario with example step by step.

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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.

0 Likes

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?

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

In this case Flag D is the watermark flag, however the dedicated flag for that DMA transaction, Flag C, still wont go high for the aforementioned transfers.

See the attached GPIF project

0 Likes

Please attach other project files in the GPIF project to view the state machine.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Sorry, I've attached them all this time.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth
0 Likes