Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1174 Discussions

TCP/IP on Altera DE2 How to??

Altera_Forum
Honored Contributor II
1,444 Views

Hello, I have been battling with this problem for quite some time so any help will be appreciated! Basically, I am trying to create possibility of communication between Host PC and DE2 via Ethernet for transferring small amounts of data there and back. When the Host PC sends data, DE2 starts working on something based on that data and then sends results back to the Host PC. I have tried all of the following: 

 

1) downgrade to different Quartus Editions, so that I could get DE2_Web Demo to work and lwIP in NIOS 

-doesnt work because Nios IDE 6.0 is only evaluation and doesnt contain uC RTOS and the other editions have problems opening/running this demo 

 

2) the obvious solution of trying Simple Socket Server demo, but obviously I cannot add lan91c111 component in SOPC, because DE2 has the DM9000A chip... 

 

3) added the DM9000A IP that I found in the examples, but that doesnt work with InterNiche stack 

 

4) tried to add Avalon OpenCores Ehternet Mac which should work with InterNiche stack, but I have no idea how to connect the in and out pins to this component in Quartus 

 

5) I was able to get the DE2_Net to run, but that only sends raw packets and I dont know how I could receive/send and work with them on the Host PC side 

 

I have been battling with this problem for forever so any kind of help would be extremely appreciated. I feel like I have tried to search and do almost everything possible and I am still nowhere in the progress and it is absolutely frustrating.  

 

Thanks for any comments and help!!
0 Kudos
14 Replies
Altera_Forum
Honored Contributor II
580 Views

Micrium has the TCP/IP Stack (http://www.micrium.com/php/download.php?file=micrium-uc-tcp-ip.exe) and the DM9000A driver (http://www.micrium.com/php/download.php?file=micrium_nic_dm9000a.zip). By a simple registration (http://www.micrium.com/php/register.php), you can download the source code for a 45 days evaluation. I suggest you work with the TERASIS_DM9000A from DE2_NET demonstration. It could take a while but with good results. You can use the uC/OS-II downloading it from Micrium.

0 Kudos
Altera_Forum
Honored Contributor II
580 Views

Thanks so much for the quick reply! 

 

So if I got it right, these are the steps: 

1) take the Terrassic DM9000A component from DE2_Net and include it in the SOPC builder (this is what I have done when I saw Ethernet transmit something with DE2_net example) 

2) use the Micrium drivers for Nios 2 IDE to use with DM9000A (and not the standard drivers) 

3) Install Micrium TCP/IP and try to build around that 

 

Questions: 

1) Does the Micrium TCP/IP provide some examples? (I am about to install it now) 

2) Which version of Quartus+Nios would you recommend to use?  

 

Again, thanks so much for your help!
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

First read the NIC-Manual in order to integrate the API privided by Micrium with the API in DM9000A.C of terasic Example. This should be only writing following functions using the ones provided in DM9000A.C. 

 

void NetBSP_NIC_HW_Init (void) 

void NetBSP_DlyU (CPU_INT16U us) 

void NetBSP_DlyM (CPU_INT16U ms)  

void NetBSP_IntInit(void)  

void NetBSP_IntClr (void) 

 

void NetNIC_WrReg_8(CPU_INT08U reg, CPU_INT08U data)  

CPU_INT08U NetNIC_RdReg_8(CPU_INT08U reg)  

void NetNIC_WrIx_8(CPU_INT08U ix) 

CPU_INT08U NetNIC_RdData_8(void)  

void NetNIC_WrData_8(CPU_INT08U data)  

NetNIC_WrData_16(CPU_INT16U data)  

 

I suggest use a Nios II EDS version with the uC/OS-II in order to make easier the integration with the Nios II port.
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

Thanks, I will try to get into it, but it looks like too big of a mountain to climb at this point. It seems like a lot of trouble for just simple sending of few bytes of data there and back. I wish there were some examples of a similar system...

0 Kudos
Altera_Forum
Honored Contributor II
580 Views

mmmmm, you've ever used uClinux?. If you did, this is a good option. The web has a lot of examples about using linux sockets. This could be helpful in that case http://www.nioswiki.com/operatingsystems/uclinux/ethernet

0 Kudos
Altera_Forum
Honored Contributor II
580 Views

Unfortunately, I have never used uClinux and hence I am little afraid of going down that road (I saw those quides and I am keeping that as a last solution). Since this morning, I was toying with the idea of sending just raw data packets over Ethernet as it is outlined in the DE2_NET demo. I was wondering if this would be a viable option and if there could be a code on the Host PC side that would send and receive raw Ethernet packets as well, or if this would be just way too complicated again. Thanks a lot for all your help!!

0 Kudos
Altera_Forum
Honored Contributor II
580 Views

So, if you only need raw ethernet packets, this could help you (Only Windows) 

http://www.osix.net/modules/article/?id=824
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

I think that should help, hopefully it will provide all that I need. I will keep my fingers crossed and hopefully I can get something working soon :-)

0 Kudos
Altera_Forum
Honored Contributor II
580 Views

have you figure out your problem? 

actually I have the same problem with you now!
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

Hi buddy, 

I got a literature about DM9000A and LwIp, 

if you still have the problem I can sent the pdf literature to you. 

and you must got my email 

 

cheers
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

Hi realei, 

I have a same problem like this.Could you share this literature to us. 

my email is emperorsoldier@yahoo.com 

I wonder can nichesatck (or LwIP) compatible with DM9000A. 

I`m so confuse.. 

Pls help !!!
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

Hi,  

 

I got the same problem as well, just wonder why altera no provide the driver for DM9000A and need to use the third party driver. Seem altera no support thier product nither NIOS II nor DE2 much. I spend a lot time to search for the information about ethernet of the DE2 board but get nothing.  

 

Can you please send me the litera as well? my email is ctkhai@hotmail.com 

thank you
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

Hi realei, 

I have a same problem .Could you share this literature to me. 

my email is qinchuan12345@163.com 

I use lpc2292 control DM9000A directly. 

Now ,I can read and write the register,but I don't know how to send and recv upd data. 

Pls help !!! 

Thanks 

qinchuan
0 Kudos
Altera_Forum
Honored Contributor II
580 Views

hi guy,  

i think we should read the VoIP project follow the link below.I am working on my project with the same problem here. I think this project contain our solution. 

 

http://www1.cs.columbia.edu/~sedwards/classes/2009/4840/
0 Kudos
Reply