Hello guys,
this is me again...I'm still working at this problem and didn't found a solution :-(. I just builded up a new project, with just the fresh fx2_cores, ucf file form reference design, fifos, dcms and a connection from rx_fifo to tx_fifo. So the system should receive the same data as sent to fpga (it is very close to the reference). But even this is not working. I receive not the same bytes as I sent, but always the same trash:
in: various 4 bytes --> out: d f0 ad ba
this is my loop function in c++
void Loop(unsigned int handle)
{
byte * data_in;
data_in = new byte [4]; //allocate memory
byte * data_out;
data_out = new byte [4]; //allocate memory
int error;
int packetlen;
data_in[0] = 0xFF;
data_in[1] = 0xFF;
data_in[2] = 0xFF;
data_in[3] = 0xFF;
packetlen = 4;
if (error=TE0300_SetData(handle, data_in, 4, PI_EP8))
{
printf("ERROR SetData: %d\n", error);
}
if (error = TE0300_GetData(handle, data_out, &packetlen, PI_EP6,TIMEOUT_MS))
{
printf("ERROR GetData: %d\n", error);
}
printf("1: %x --> %x \n", data_in[0], data_out[0]);
printf("2: %x --> %x \n", data_in[1], data_out[1]);
printf("3: %x --> %x \n", data_in[2], data_out[2]);
printf("4: %x --> %x \n", data_in[3], data_out[3]);
delete data_in;
delete data_out;
}
I uploaded my minimum design: I ask you friendly to have a short look over it, please. It would really really help me. I absolutly don't know how to proceed.
http://www.4shared.com/zip/1F3uZLGg/fx2_engine.html
some more information:
I'm using this firmware:
http://www.trenz-electronic.de/fileadmin/docs/Trenz_Electronic/TE-USB-Suite/firmware/version_3/TE_USB_FX2-v03.00.iicand this driver:
http://www.trenz-electronic.de/fileadmin/docs/Trenz_Electronic/TE-USB-Suite/drivers/version_2/TE03xx-USB_32-64.zipin addition: here is an very detailed instruction what I've done
-create new project
-add fx2_core.vhd and fx2_core.ucf (from latest reference design)
-add libraries proc_common_v3_00_a and xps_fx2_v1_50_a
-add dcm_sys with clkin 125 Mhz and clkfx 100 Mhz
-add dcm_usb with clkin 24 Mhz and clkfx 48 Mhz
-change parameter C_RX_FIFO_KBYTE = 2 to have rx fifo
-add tx_fifo: independent clocks, block ram, first-word-fall-through, write_width: 32, read_width: 8, write_depth: 8192, flags, write_data_count: 13
-add rx_fifo: independent clocks, block ram, first-word-fall-through, write_width: 8, read_width: 32, write_depth: 4096, flags, read_data_count: 10
-create system.vhd: adding all components, instantiating all components, connecting FIFO_IN_din with FIFO_OUT_dout
Many thanks in advance
best regards GH