Quantcast

FT2232H Synchroneous FIFO mode

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FT2232H Synchroneous FIFO mode

Uwe Bonnes
Hello,

I have a board with a FT2232H and a Xilinx XC3S200A. Let me report some
findings and problems.
- The FT2232H timing with the supplied 60 MHz clock and the 11 ns seconds
Setup and 0 ns hold timing is tough. Be sure to route the clock to an FPGa
global clock input ping and write the code so that data and write can use the
registers in the output pad, clocked by the 60 MHz clock
- if you don't use an DCM the data and write output need to be fast and
strong, or you won't meet the timing
- I programmed the FPGA to send out some ascii pattern as fast as
possible. The first and last 5 characters is a consecutive number, the rest
constant
- the appended libftdi programm reads quite fast (16...24 MByte/sec), but
scrambles data blocks (probably 512 byte blocks )
> examples/sync_fifo -n 1000 -o test
Read 16384000 bytes in  0.873 s, 18770543 bytes / sec
> cut -b 6-99 test | sort | uniq -c
      1 !"
      1 0
      1 01!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV...
      1 !"#$%&'()*+,-./01234}~21484
      1 !"#$%&'()*+,-./0123456789:;<=0123456789:;<=>?@ABCDEFGHIJ...
      ...
- the appended libftd2xx program runs without error on windows, but with
only 6 to 9 MByte/sec speed
> cut -b 6-99 t1 | s
ort | uniq -c
      1 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW
 618263 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX...
      1 MNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~00348

- the same libftd2xx program run on Linux crashed inside libftd2xx
when I read "to many" datablocks
> ./a.out -n 1000 -o test
Should be in SYNC FIFO mode now
Speicherschutzverletzung (== SIGSEG)

- slowing down the FPGA in putting bytes into the FIFO didn't stop the libftdi
  program from scrambling datablock.

I use libftdi git-head, Linux64 on AMDx2 6400 and the Windows machine has XP
and a Pentium M 1700.

Any idea how I can stop libftdi from scrambling data blocks.

I will try to write a pure libusb(1) solution meanwhile.

Bye
--
Uwe Bonnes                [hidden email]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT2232H Synchroneous FIFO mode

Thomas Jarosch
Hello Uwe,

On Tuesday, 2. February 2010 15:36:33 Uwe Bonnes wrote:
> I use libftdi git-head, Linux64 on AMDx2 6400 and the Windows machine has
>  XP and a Pentium M 1700.
>
> Any idea how I can stop libftdi from scrambling data blocks.
>
> I will try to write a pure libusb(1) solution meanwhile.

You could also try libftdi for libusb-1.0 as a starter.

Get it here:
git clone git://developer.intra2net.com/libftdi-1.0

or

http://developer.intra2net.com/git/?p=libftdi-1.0

Cheers,
Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT2232H Synchroneous FIFO mode

Uwe Bonnes
>>>>> "Thomas" == Thomas Jarosch <[hidden email]> writes:

    Thomas> Hello Uwe, On Tuesday, 2. February 2010 15:36:33 Uwe Bonnes
    Thomas> wrote:
    >> I use libftdi git-head, Linux64 on AMDx2 6400 and the Windows machine
    >> has XP and a Pentium M 1700.
    >>
    >> Any idea how I can stop libftdi from scrambling data blocks.
    >>
    >> I will try to write a pure libusb(1) solution meanwhile.

    Thomas> You could also try libftdi for libusb-1.0 as a starter.

    Thomas> Get it here: git clone git://developer.intra2net.com/libftdi-1.0

    Thomas> or

    Thomas> http://developer.intra2net.com/git/?p=libftdi-1.0

Two observations:
- block scrambling also happens with libftdi-1.0, speed seems similar
- libftdi-1 needs ftdi-sio unloaded

--
Uwe Bonnes                [hidden email]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT2232H Synchroneous FIFO mode

Thomas Jarosch
On Tuesday, 2. February 2010 16:54:15 Uwe Bonnes wrote:

> >>>>> "Thomas" == Thomas Jarosch <[hidden email]> writes:
>
>     Thomas> Hello Uwe, On Tuesday, 2. February 2010 15:36:33 Uwe Bonnes
>
>     Thomas> wrote:
>     >> I use libftdi git-head, Linux64 on AMDx2 6400 and the Windows
>     >> machine has XP and a Pentium M 1700.
>     >>
>     >> Any idea how I can stop libftdi from scrambling data blocks.
>     >>
>     >> I will try to write a pure libusb(1) solution meanwhile.
>
>     Thomas> You could also try libftdi for libusb-1.0 as a starter.
>
>     Thomas> Get it here: git clone
>  git://developer.intra2net.com/libftdi-1.0
>
>     Thomas> or
>
>     Thomas> http://developer.intra2net.com/git/?p=libftdi-1.0
>
> Two observations:
> - block scrambling also happens with libftdi-1.0, speed seems similar

Ok. I would add code to ftdi_read_data() to write the -raw- data
into a file, including the status bytes. The status bytes can
be filtered later, this would be really close to a pure libusb solution.

btw: Thanks for the libusb1 search patch

Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...