Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

WORKING: DE2-115 Simple Socket Server

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

66 Replies