Provide a streaming read, base on code from Micah Dowty
authorUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Mon, 31 May 2010 13:46:55 +0000 (15:46 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 9 Jun 2010 16:27:48 +0000 (18:27 +0200)
commit40da63b1f8924d2c4d1e34d137dc7d12b5b1c643
tree299df3eba7d1158bea1028a6a89d860f5e837449
parent9965050222905eecc664baf168f71a2b632cae2a
Provide a streaming read, base on code from Micah Dowty

Hello,

with appended code and a revised verilog code, I can reliable read blocks of
16 Bytes of date generated about each Microsecond, like running for about
500 seconds:

8 errors of 375293955 blocks (2.131662e-08), 9 (2.398120e-08) blocks skipped

From time to time some one or two blocks are skipped, which is something to
expect, as I only have about 128 byte of additional FIFO beside the FT2232H
internal fifo. First test showed that a larger FIFO lead to some more skips,
either by some flaw in my logic or some strange behaviour of the FT2232H
chip.

Writing the generated data to disk leads to skips for several to several ten
microseconds each several to several seconds. Probably the BLK (big kernel
lock) hits here.

The patch only adds some definition to ftdi.h and the additional file
ftdi_stream.c, with Micah Dowty okay to dual license his code. so I hope it
is okay to apply. Should the verilog code be inclided in libftdi too?
examples/CMakeLists.txt
examples/stream_test.c [new file with mode: 0644]
src/CMakeLists.txt
src/Makefile.am
src/ftdi.h
src/ftdi_stream.c [new file with mode: 0644]