FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits

DE3 USB Data Transfer

Altera_Forum
Honored Contributor II
1,006 Views

Hi, 

 

I want to transfer data from a DE3 development board to my PC via USB.  

 

Does anyone know a very simple and quick way to implement this? 

 

 

At first I just thought of modifying the demonstration projects from the CD, but they all make use of the SOPC builder and NIOS II. Since I'm not familiar with these tools, I would really like to avoid them. Furthermore, in order to run the demos, a batch file is required. I also wouldn't want to make a batch file for my project. I realize that maybe this batch file is not needed to run the demo, but the manual only shows how to run the demo with the batch. So would there be a simple way to do this with VHDL only? Or would it be worth it to learn NIOS II and go with it? My USB protocol would be very simple: I just want to transfer data from the ADCs to my PC at a fixed baud rate.  

 

And just as a background for my case: 

I'm migrating my project from a DE2 board to a Terasic DE3. For the DE2, we implemented a very simple data transfer protocol via the RS232 interface. But now I have to modify my project since the DE3 only has USB interfaces. 

 

Any help or hints would be greatly appreciated. :) 

 

Thanks!
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
279 Views

Hi cb2010, 

 

Since USB protocol is very compicated, it is much better to use software to control the USB controller on DE3: ISP1761. You can find source codes written in C in the demo project. Please visit the "software" folder in the project of usb-device, and hack main.c. It is worth learning NIOS II and SOPC builder. 

 

I also have to use USB for high-speed data transfer between DE3 and a host PC, but software execution by NIOS II processor limits the data-transfer speed... For now, only 25KB/s (!) is available when s host PC reads/writes to DE3. Moreover, SOPC with NIOS II using moderate size of on-chip memory consumes some logics and BRAMs. I also want to avoid SOPC and NIOS II for just communicating the host PC if possible. It woud be much better if we can use a "hard-wired" ISP1761 contoller written in HDL. But I gave up develpping such a controller because the USB and the usage of ISP1761 is too complicated for hawdware implementation. 

 

Is there anybody who can have an example code for high-speed data-transfer between DE3 and PC via USB? 

 

Mickycat
0 Kudos
Altera_Forum
Honored Contributor II
279 Views

Maybe you can try port uclinux on your development board so that the development on the USB data communication would be easier. Then you can just write a linux driver for the communication. 

 

I did that. And it is easier. More or less.... :p
0 Kudos
Altera_Forum
Honored Contributor II
279 Views

 

--- Quote Start ---  

Maybe you can try port uclinux on your development board so that the development on the USB data communication would be easier. Then you can just write a linux driver for the communication. 

 

I did that. And it is easier. More or less.... :p 

--- Quote End ---  

 

 

Hi mannuar, 

 

Thanks to your post. 

In my case, we dont want to use external memory such as sdram for SOPC. And the onchip memory should be made as small as we can because I just use SOPC for USB I/F.  

 

The SOPC running the USB firmware occupies only 96KB now without OS. This is not so bad, however I am not satisfied with the USB speed.  

 

Is there anyone who can success on using USB 2.0 and bandwidth of hundreds MB/s between DE3 and a host PC? 

 

I appreciate any help! 

 

Micky
0 Kudos
Reply