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

WORKING: DE2-115 Simple Socket Server

Altera_Forum
Honored Contributor II
9,711 Views

Hi, 

 

It seems difficult to get help on these forums so I want to pass on what i learnt for others. I've struggled to learn FPGAs over the past few weeks and I have finally got a simple socket server working for the DE2-115. I'll quickly post my findings so someone else can take this and learn from it and not have to struggle on their own as i did. 

 

procedure 

 

 

I'll make this brief:
  1. I used updated versions for everything as of 4/4/11. 10.1 Sp1. 

  2. Download and install the Knowledge base update to prevent nios from crashing. 

    http://www.altera.com/support/kdb/solutions/rd12222010_317.html 

  3. Take the Quartus DE2_115 webserver example for Enet0 RGMII that comes on the CD and use quartus flash programmer to program. 

  4. Get this PDF and follow its instructions "http://www.altera.com/literature/tt/tt_nios2_tcpip.pdf?gsa_pos=1&wt.oss_r=1&wt.oss=simple socket server example nios edition socket server example nios edition" NOTE it includes the spaces (wierd). do everything the same except the part mentioned in my next step. 

  5. Instead of copying the files from the tutorial.zip; copy the ones that i have attached to this post. (the .c and .h files including the eeprom folder) 

  6. This example will now work as explained in the pdf. 

explanation 

  • The original example code in the tutorial does not have the correct method for gettig the MAC address on the DE2-115. I have deleted the majority of the original MAC code and replaced it with code i got from the DE2-115 webserver example. This includes the flashgetoffset function. 

  • The LED_PIO_BASE in the original is an invalid for the DE2-115. I replaced it with the LEDG (green leds), you could replace it with red if you wished. This has been done by modifying the led.c file. 

Sorry for the quick rush post, but i truly hope this helps someone. We should all try to help each other and I hope over the coming months that someone does the same for me with any problems i get in the future. 

 

Any questions just ask
0 Kudos
66 Replies
Altera_Forum
Honored Contributor II
398 Views

Has anyone managed to get the SSS working on DE2-115 board? I'm using Quartus 16.1, I've read all the posts, I've used everyone's method to adapt the design to the DE2-115 board, watched youtube videos on what to change in the software... I get to the 'Created "simple socket server" task (Prio: 4)' in the Nios II Console window, but unable to ping or telnet. I've tried crossover cables, non-crossover cables, connecting directly to a pc, connecting to a network switch (which goes back to my router), manually setting the IP address, using DHCP (which doesn't work, my IP gets 0.0.0.0), manually setting MAC address, mods to get it to assign a MAC address (from the c code or via eeprom)... 

 

My network switch is a managed switch, and I can see the TX counter incrementing, but RX counter doesn't increment. I've tried changing the clock frequency c3 to 2.5MHz, 25MHz, 125MHz... 

 

Nothing seems to work. Would prefer not to have to go back to a previous version of Quartus, but I guess that's the next step unless someone has a suggestion? The last version of Quartus that seemed to work was 13. 

 

 

As a follow on, if I ever do get this working, I need to add to the design a 2nd ethernet port (there are 2 on the DE2-115 board), and do simple layer 2 bridging between ports (and not sure how that is done or if it's already included in the OS/or IP stack used in the example). 

 

Any help is appreciated...
0 Kudos
Altera_Forum
Honored Contributor II
398 Views

I am not a software guy - but I ran in the debugger, and it stops on OSTimeSet(0); in iniche_init.c line 117. Under the variables tab, it shows error_code is 180. 

 

Can anyone help me interpret this? 

Thanks
0 Kudos
Apara
Beginner
389 Views

Hi,

Thank you for your post. 

I believe it will help many like me.

Can you tell me what is the mac address of De2-115? n where it was mentioned in your  "DE2_simple_socket...Zip"?

Because in your folder no, network utility file .

It was not in simple _socket

Waiting for your answer

Thanks

0 Kudos
Apara
Beginner
383 Views

@Apara_0-1624648069088.png

 

Altera_Forum
Honored Contributor 
 
I am getting this error while build the file, Please help me
 
build error.png
0 Kudos
Reply