Author Topic: Gigabit Ethernet Example code  (Read 1683 times)

0 Members and 1 Guest are viewing this topic.

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Gigabit Ethernet Example code
« on: January 17, 2020, 12:38:49 pm »
Hi,
I'm kinda newbie into the FPGA world, I have done some basic stuff like USART, SPI etc..Now I want to use a Gigabit Ethernet core on spartan 6. I have found this one in opencores.org
https://opencores.org/projects/ethernet_tri_mode

I want to know if there is any example for this one or any other open core one, what PHY should I use (or I just can use any GMII PHY I can find)? any Example or path to learn this thing would be highly appreciated.
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2812
  • Country: nz
Re: Gigabit Ethernet Example code
« Reply #1 on: January 18, 2020, 12:05:04 am »
I wrote this for the PHY on the Digilent Nexys Video:

https://github.com/hamsternz/FPGA_GigabitTx
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 
The following users thanked this post: SiliconWizard

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Re: Gigabit Ethernet Example code
« Reply #2 on: January 18, 2020, 07:17:06 am »
Thanks for sharing! :-+ Does it use the https://opencores.org/projects/ethernet_tri_mode core?
« Last Edit: January 18, 2020, 07:19:06 am by ali_asadzadeh »
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2812
  • Country: nz
Re: Gigabit Ethernet Example code
« Reply #3 on: January 18, 2020, 07:48:43 am »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline laugensalm

  • Regular Contributor
  • *
  • Posts: 129
  • Country: ch
Re: Gigabit Ethernet Example code
« Reply #4 on: January 18, 2020, 06:34:25 pm »
I'd throw in that one:

https://github.com/yol/ethernet_mac/

It's VHDL though. But generic enough to run on Xilinx/Lattice, etc.

There are also some more exotic implementations using Forth driven stack machines, like this one:
https://excamera.com/files/j1.pdf. Some inspiration you might also get from the Lattice EVDK reference Gbit streaming reference design.

If you're used to standard uC DMA approaches, you can get a pretty good performance with the above core plus a DMA auto buffer packet FIFO, as described here: https://section5.ch/index.php/2017/05/10/dma-autobuffering-techniques/.
With the GMII interface you're on the safe side with plenty of matching PHYs, only RGMII was found to be a bit tricky with regard to DDR capable I/O. So if you're routing your own board, you might want to cross check with existing refdesigns.
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Re: Gigabit Ethernet Example code
« Reply #5 on: January 18, 2020, 07:21:43 pm »
Thanks for sharing, I want to test and see some UPD or TCP packet sending and receiving too.
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf