Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: westrice on November 05, 2011, 09:52:55 PM

Title: TE0320 USB communication
Post by: westrice on November 05, 2011, 09:52:55 PM
Greetings Forum,

I'm going to buy the TE0320 module with the Spartan-3A DSP. I'm willing to use the cypress usb controller to make the interface FPGA <-> PC and I've read the application note where an architecture is instantiated with Microblaze to achieve this. It's is reasonable and/or possible to do it without a microprocessor, i.e. using some IP cores and making a custom data path in HDL? I don't need high transfer rates, something like 25Kbyte/s would do the thing. Feel free to ask me more details.

Best Regards.
Title: Re: TE0320 USB communication
Post by: Ales Gorkic on November 07, 2011, 11:25:20 AM
Hi Westrice,

If you want to make a design without microblaze in ISE then do the following:
1. Take vhdl files from pcores for xps_fx2 and xps_i2c_slave from the _core.vhdl below. Ths means that you leave the xps_fx2.vhd, user_logic.vhd and xps_i2c_slave.
2. Then read the documentation for both cores that you understand the register setup. To send the commands you use i2c_slave with 3x32bit registers. For high speed data transmission use the fx2 core with FIFO interface.
3. Assemble the design and use the pinout from the data/system.ucf from the microblaze design.

Use the Chipscope to debug the design if you acces to it.

I hope it will work.

Best regards,

Ales
Title: Re: TE0320 USB communication
Post by: westrice on November 07, 2011, 10:36:23 PM
Dear Ales Gorkic,

"1. Take vhdl files from pcores for xps_fx2 and xps_i2c_slave from the _core.vhdl below. Ths means that you leave the xps_fx2.vhd, user_logic.vhd and xps_i2c_slave."

Where exactly is below? Where are the files?

Thank you for your attention.
Title: Re: TE0320 USB communication
Post by: Ales Gorkic on November 08, 2011, 12:52:46 AM
Hi westrice,

I forgot, that at the xps_fx2 core the whole functionality is in the fx2_core.vhd and there is nothing below it (no submodules).
But in the case of the xps_i2c_slave there are several submodules.

Regards,

Ales
Title: Re: TE0320 USB communication
Post by: westrice on November 09, 2011, 12:41:55 AM
Dear Ales Gorkic,

I assume the latest versions of the cores are located here
https://github.com/Trenz-Electronic/
There's any documentation up to date? I found this for older versions
http://www.trenz-electronic.de/download/d0/Optomotive/d1/intellectual%20property.html

Best Regards.
Title: Re: TE0320 USB communication
Post by: Thorsten Trenz on November 09, 2011, 03:36:23 PM
Dear westrice,
Documentation for the cores, you'll find in the doc folder of the core. For example the XPS_FX2 has his docs here:
https://github.com/Trenz-Electronic/TE-EDK-IP/tree/master/MyProcessorIPLib/pcores/xps_fx2_v1_30_a/doc

best regards
Thorsten Trenz

Title: Re: TE0320 USB communication
Post by: westrice on November 10, 2011, 05:23:15 PM
"To send the commands you use i2c_slave with 3x32bit registers. For high speed data transmission use the fx2 core with FIFO interface"

What commands are sent to i2c_slave? control signals for usb transfers? Do I really need both cores? I'm still figuring how the architecture works..

Best Regards.
Title: Re: TE0320 USB communication
Post by: Oleksandr Kiyenko on November 11, 2011, 03:54:15 PM
Hi westrice,
You can build system without i2c, but in this case you need to control flow by data. Mean using some
protocol to wrap data packets.
If you going to build minimal system you need:
1) take from xps_fx2 core fx2_core.vhd
2) generate by coregen 2 FIFOs for RX and TX buffers to use in fx2_core.vhd
3) connect
Reg_in_0(31) to tx FIFO reset signal logic
Reg_in_0(31) to tx FIFO reset signal logic
Reg_in_0(26 to 27) - select EP you going to use
4) write logic which will write to tx FIFO and read from rx FIFO data wrapped by your custom protocol
5) write software which will control flow from PC side (you can find API usage example)

Regard,
Alexander Kienko
Title: Re: TE0320 USB communication
Post by: Antti Lukats on November 15, 2011, 01:25:46 PM
Quote from: westrice on November 05, 2011, 09:52:55 PM
Greetings Forum,

I'm going to buy the TE0320 module with the Spartan-3A DSP. I'm willing to use the cypress usb controller to make the interface FPGA <-> PC and I've read the application note where an architecture is instantiated with Microblaze to achieve this. It's is reasonable and/or possible to do it without a microprocessor, i.e. using some IP cores and making a custom data path in HDL? I don't need high transfer rates, something like 25Kbyte/s would do the thing. Feel free to ask me more details.

Best Regards.

there is ready to use FX2 firmware available from cypress to get it working as USB CDC type serial port. The firmware needs to be modified to not use hardware uart but the GPIF to talk to the FPGA.

Unfortunatly this app note and supplementary zip archive is not online at cypress, you need to open a webcase and ask for them. We just did it, and recompiled the firmware and test the usb uart on FX2 really works.

Antti




Title: Re: TE0320 USB communication
Post by: westrice on January 08, 2012, 04:32:17 AM
Hi forum,

Does anybody have information related to the 6x32bits registers in the fx2_i2c_core? The core datasheet lacks information in that matter. I know that the core only writes/reads the registers in/from the i2c serial data line, I searched for the registers information in the cypress ez-usb TRmanual but I have no clue on how the firmware works.. so I don't know really what I'm looking for.

Thanks.
Title: Re: TE0320 USB communication
Post by: Hengist on April 11, 2014, 06:30:37 PM
The release of the third generation Trenz Electronic USB FX2 Suite made this post obsolete. Please access current documentation and resources here: TE USB FX2 Suite (https://wiki.trenz-electronic.de/display/TEUSB/).