FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - Petar

Pages: [1]
1
Discussion - Drivers / FT601Q Linux FT_ReadPipe unexpected behavior
« on: February 12, 2021, 09:15:23 PM »
Hi all,

I made custom hardware using FT601Q and Spartan6 FPGA. I started development on Linux Mint 19.3 Cinnamon.
After making simple HDL code for FIFO 245 mode I started with streamer.cpp as a starting point.
At the beginning all was good... I changed the streamer.cpp code, so I could run just one FT_WritePipe and one FT_ReadPipe....
I was looking what is going on between the FPGA and FT601Q by using Xilinx chip-scope....
In the FPGA there is a 4kB buffer that I wanted first to write to it and later to read (loopback) and check if the read data are the same as write data....

Than I notice that when I write 4kB to FPGA and after that read from FPGA 4kB, that I am getting the same data but shifted by 4 bytes....
Than I realized (using chip-scope) that during reading at the last 32b word I made a mistake and I drive the BE (byte enable) with all zeros "0000" instead of all ones "1111".

So I was happy, I have just to fix my bug in the HDL and all will be good...

But I haven't realized that my problems only begins.

After fixing the HDL code to FPGA drive all ones at the byte enable during active data phase, FT_ReadPipe didn't work at all.
When I call FT_WritePipe and after that FT_ReadPipe, at the chip-scope I only saw FT_WritePipe consequences and no FT_ReadPipe consequences at signals between the FPGA and FT601Q...
After that I notice that when I only open the FT_Create without any other command that I see bunch of FT_ReadPipe consequences... (like something in the driver realize FT_ReadPipe from previous code run).
I also notice that what ever number I put as a BUFFER_LEN at the FT_ReadPipe, it always reads 4096 bytes, so it is no matter if I put 1024 or 4096 it always reads 4096 bytes.

After lot of time I switch to Windows 10 in order to see if the behavior is the same.

At windows I was using "FT600DataLoopbackDemoApp_v1.3.0.2" and also monitoring signals between the FPGA and the FT601Q.

At windows all works fine, so when I put BUFFER_LEN to 1024 I can see that FT_ReadPipe reads 1024 bytes.

At windows data that is written in the FPGA are the same as data read from FPGA and at the chip-scope I can see both FT_WritePipe and FT_ReadPipe consequences.

Can somebody help me.

Thanks

PS. I am making something that should work both on Windows and Linux.  Sorry for my English.

Pages: [1]