Thank you very much for your reply.
I have a bad problem with FT232H which is very similar to FT2232H, but only 1 channel instead of 2.
I have a data loss every 510 bit (tested on Win7 and Win8.1) and more in other cases.
In sw I use this code with C# .NET library (v1.0.14.0) to read data
Pseudocode:
OpenBySerialNumber("FTXE2X2D");
SetBitMode(0xFF, FTD2XX_NET.FTDI.FT_BIT_MODES.FT_BIT_MODE_RESET);
Thread.Sleep(10);
SetBitMode(0xFF, FTD2XX_NET.FTDI.FT_BIT_MODES.FT_BIT_MODE_SYNC_FIFO);
Purge(FTD2XX_NET.FTDI.FT_PURGE.FT_PURGE_RX)
--Cycle
Read(dataBuffer, 1024, ref numBytesRead);
--End cycle
Close();
*Data loss even with SetFlowControl(FTD2XX_NET.FTDI.FT_FLOW_CONTROL.FT_FLOW_RTS_CTS, 0, 0);
I have tried to change buffer size (1024 in pseudocode) with other values. If buffer size is 1 no errors, in other case I have a lot of errors (about 0.016% data loss with buffer = 1024 bytes)
Timing of FT232H are:
http://imagizer.imageshack.us/v2/xq90/13/7cmg.png In VHDL I have this simple code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity ft232h_tx is
port
(
FT_CLK : in std_logic; -- 60 MHz FT232H clock
nTXE : in std_logic; -- Can TX
nRXF : in std_logic; -- Can RX
nRD : out std_logic; -- Read
nSIWU : out std_logic; -- Send Immediate / WakeUp
nOE : out std_logic; -- Output enable
nWR : out std_logic; -- FIFO Buffer Write Enable
ADBUS : out std_logic_vector(7 downto 0) -- Bidirectional FIFO data
);
end entity;
architecture rtl of ft232h_tx is
signal counter : unsigned (7 downto 0) := "00000000";
begin
-- don't read
nOE <= '1';
nSIWU <= '1';
nRD <= '1';
process(FT_CLK, nTXE)
variable state : std_logic := '0';
begin
if (rising_edge(FT_CLK)) then
if(nTXE = '0') then
if(state = '1') then
nWR <= '0';
-- last data not valid if nTXE goes LOW
ADBUS <= std_logic_vector(counter);
counter <= counter + 1;
end if;
state := '1';
else
nWR <= '1';
state := '0';
end if;
end if;
end process;
end rtl;
That is a simply counter that continuously count up to 255 and so send 0,1,2..,254,255,0,1,2...,254,255 to pc
and in SDC file I have set these constraints:
create_clock -name "FT_CLK" -period 16.67ns
set_input_delay -clock { FT_CLK } -min 9ns nTXE
set_input_delay -clock { FT_CLK } -max 0ns nTXE
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns }]
set_output_delay -max -clock "FT_CLK" 7.500ns
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns }]
set_output_delay -min -clock "FT_CLK" 0ns
With signaltap I have take this screenshot:
http://imagizer.imageshack.us/v2/xq90/30/e0pc.png (
https://imageshack.com/i/0ue0pcp)
But I can not find the error.. :(