Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Issue with 245 Fifo sync mode

  1. #1
    Join Date
    Oct 2017
    Posts
    3
    Rep Power
    1

    Default Issue with 245 Fifo sync mode

    Dear All,

    I am actually working on a communication chain between a FPGA and a FT2232H chip. So, the goal is to send a file from PC to FPGA, store it in a FIFO memory and then receive the sent data to PC.


    I am using the 245 fifo sync mode.

    All is working fine, expect that I rarely have a lose of one byte that appears randomly.

    So for example, when I send a packet of 512byte, i received well the 512byte but when I repeat this operations 200 times, I noticed that sometimes I only receive 511 byte and when I check where happens the lost byte, it happens randomly. And when I send a packet of 65.536 byte, again sometimes, I only received 65 535 byte.

    The strange thing is that when a lose occurs, this is always one byte.

    Can anyone help out me there to solve this problem ?

    Attached you will find my VHDL code.

    Thank you for your help !
    Attached Files Attached Files

  2. #2
    Tricky is offline Moderator **Forum Master**
    Join Date
    Oct 2008
    Posts
    5,695
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    Do you have timing specs for the design? are they correct? Does the design meet timing?
    Are all the signals in your design synchronous to "clk"? if they are not, have they been synchronised correctly?

    Your description sounds like a timing problem.

  3. #3
    Join Date
    Oct 2017
    Posts
    3
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    Thank you for your answer.

    I checked and, yes, all the timing specs are met and all the signals are synchronized to the clock (60 MHz) delivered by the FT2232H chip.

    From what I have observed, the lost byte does not occur in the FPGA side. Indeed, when a lose occurs, this lose is not detected in the FPGA. All the sequence of data leave the FPGA correctly.

    So, the problem can come from the fact that the FT2232H chip tells that he can receive a byte (his fifo is not full) but this is not true in this case I dont know how to resolve this. But the problem can come from somewhere else.

  4. #4
    Tricky is offline Moderator **Forum Master**
    Join Date
    Oct 2008
    Posts
    5,695
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    It could still be a timing problem. Do you need to set any input/output delays on your IOs to compensate for trace delays?

  5. #5
    Join Date
    Jun 2009
    Posts
    235
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    What OS are you using on the PC side?

  6. #6
    Join Date
    Oct 2017
    Posts
    3
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    Quote Originally Posted by gj_leeson View Post
    What OS are you using on the PC side?
    Windows seven 64bits

  7. #7
    Join Date
    Jun 2009
    Posts
    235
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    OK, I once (years ago) had a problem with the Linux driver for this part. I've successfully used the part with Win7-46bit. Nevertheless one thing you could try is monitoring, RXF#, TXF#, RD#, WR# with a high speed scope for glitches. This is not an easy measurement as the glitch, if one exists, will be very low duty cycle.

  8. #8
    Join Date
    Mar 2012
    Posts
    382
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    Do you monitor RXF on falling edge of clock?

    See

    http://electro-logic.blogspot.it/201...elocita_1.html

    And let us know

    Quote Originally Posted by SayanER View Post
    Dear All,

    I am actually working on a communication chain between a FPGA and a FT2232H chip. So, the goal is to send a file from PC to FPGA, store it in a FIFO memory and then receive the sent data to PC.


    I am using the 245 fifo sync mode.

    All is working fine, expect that I rarely have a lose of one byte that appears randomly.

    So for example, when I send a packet of 512byte, i received well the 512byte but when I repeat this operations 200 times, I noticed that sometimes I only receive 511 byte and when I check where happens the lost byte, it happens randomly. And when I send a packet of 65.536 byte, again sometimes, I only received 65 535 byte.

    The strange thing is that when a lose occurs, this is always one byte.

    Can anyone help out me there to solve this problem ?

    Attached you will find my VHDL code.

    Thank you for your help !

  9. #9
    Join Date
    Jun 2009
    Posts
    235
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    I believe what I saw (years ago) was a situation in which RXF (or TXF) was in a high state, then it momentarily glitched low when it should have remained high. This created problems with the state machine in the FPGA.

  10. #10
    Tricky is offline Moderator **Forum Master**
    Join Date
    Oct 2008
    Posts
    5,695
    Rep Power
    1

    Default Re: Issue with 245 Fifo sync mode

    Quote Originally Posted by gj_leeson View Post
    I believe what I saw (years ago) was a situation in which RXF (or TXF) was in a high state, then it momentarily glitched low when it should have remained high. This created problems with the state machine in the FPGA.
    This would indicate a timing or design problem. Glitches would not be getting to your sm logic. This would imply poor synchronisation.

Similar Threads

  1. FT2232H in Sync FIFO Mode - TXE# stuck high
    By Alexis_B in forum General Altera Discussion
    Replies: 17
    Last Post: August 28th, 2016, 11:43 PM
  2. FTDI FT2232H Sync FIFO + FPGA
    By Stylopath in forum General Altera Discussion
    Replies: 14
    Last Post: May 2nd, 2016, 07:12 AM
  3. Using FT2232H in Sync FIFO mode for streaming out data
    By chensx2012 in forum General Altera Discussion
    Replies: 0
    Last Post: April 30th, 2015, 02:03 AM
  4. sync issue
    By odedidush in forum VHDL
    Replies: 0
    Last Post: October 13th, 2013, 10:11 AM
  5. how to sync data out from dq_dqs in half_rate mode
    By tommychen in forum FPGA, Hardcopy, and CPLD Discussion
    Replies: 0
    Last Post: April 14th, 2011, 01:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •