Xilinx Ethernet Network Client 101 - Page 1
Forum section: electronics / general

author: petersanch
author_rank: Regular Contributor
timestamp: March 17, 2021, 11:16:47 am
content: Hello All,I want to make a network client using Xilinx Artix 7 or Spartan 6 series FPGA. The goal is to transmit a buffer from FPGA memory to the server periodically. The PC will host a UDP server at a fixed IP address and port and listen for the data.There are multiple ethernet IPs in Vivado and ISE. Are any of them good for this purpose?Can this task be done without a soft core processor on the FPGA?Are there any simple examples to get started with something like this?Cheers!

author: asmi
author_rank: Super Contributor
timestamp: March 17, 2021, 02:19:25 pm
content: I don't know what's included in ISE, but in Vivado there are basically two Ethernet IPs - the one for 10/100 Mbps, another is TriMAC for 10/100/1000 Mbps. There are also IPs for 10G and above, but I haven't personally used them, so I can't say much except for the fact that they are also paid IP. Only first of those is free to use, another requires a license for production use (trial versions stop working after some time). A choice of IP to use depends on the hardware on your board, so you can't mix & match them as you like, because each standard uses different protocol to talk to the PHY chip. So essentially you pre-select which IP you will have to use when you purchase or design a board.It's also possible to not use any of those cores at all, and design your own core instead. It's not a very complex task, because MAC doesn't actually do all that much in the OSI model, though it does require studying 802.3 standard to understand the role of MAC in the IP stack. It's supposed to assemble packets, calculate a checksum and send it off to PHY chip via one of PHY protocols (MII/RMII/GMII/RGMII/SGMII/QSGMII), also receive packets, check the checksum, optionally see if it's addressed to your host, and then pass it along to a higher layer. Typically this core is either going to use it's own internal buffers for sending and receiving packets (like EthernetLite), or stream packets via some kind of streaming protocol, with these stream typically utilizing DMA IP to actually read from/write to the memory (this is how TriMAC IP works).As for whether it's possible to implement it without a softcore - of course it is, but I think that utilizing a Microblaze softcore is the easiest and fastest way to get the project off the ground.

author: Morgan127
author_rank: Contributor
timestamp: March 17, 2021, 03:47:01 pm
content: The fastest and easiest to do this is to use a core fromhttps://www.fpga-cores.com/.Both Spartan and Artix are supported.No processor is needed and it is a simple AXI stream interface. As a bonus you get programming and logic analyzer over ethernet also.I recommend you to use Artix and Vivado and not Spartan 6 and ISE.You can have a look at this examplehttps://www.fpga-cores.com/tutorials/ethernet-on-arty-a7-board/You can download everything.

author: petersanch
author_rank: Regular Contributor
timestamp: March 18, 2021, 07:18:26 am
content: Quote from: asmi on March 17, 2021, 02:19:25 pmIs the purpose of the soft core to take care of the TCP/IP stack?Quote from: Morgan127 on March 17, 2021, 03:47:01 pmCheers. Does Vivado/Artix handle networking better than Spartan 6/ISE?

author: Morgan127
author_rank: Contributor
timestamp: March 18, 2021, 08:42:29 am
content: Quote from: petersanch on March 18, 2021, 07:18:26 amNo Spartan 6 handles networking without problem. I recommend Vivado and Artix (or Spartan7) because ISE is no longer supported by Xilinx and if you start with FPGA I think you should start with the latest tools.You can not use Spartan-6 with Vivado.And it looks like FPGA-Cores also going in this direction. Their latesthttps://www.fpga-cores.com/cores/fc1004_rgmii/']RGMII/Gigabit Ethernet core is not released for ISE/Spartan.Cheers!

author: petersanch
author_rank: Regular Contributor
timestamp: March 18, 2021, 11:18:06 am
content: Quote from: Morgan127 on March 18, 2021, 08:42:29 amThanksAny recommendations on the external ethernet PHY chip? Does the FPGA-Cores core or the Xilinx TriMAC(TEMAC) core work with any PHY chip as long as a supported bandwidth is chosen in the core? My understanding is there are configuration registers inside the PHY chips that might be different from chip to chip.

author: Morgan127
author_rank: Contributor
timestamp: March 18, 2021, 12:22:52 pm
content: Quote from: petersanch on March 18, 2021, 11:18:06 amIf you don't need more than 100Mbps I recommend you to use a PHY with RMII interface. I think any will work.Typically you don't need to set the internal registers.I have used KSZ8081RNB in several project and it works great. Single supply and integrated termination resistors.1Gbps/RGMII PHYs are more complicated. More supply rails and needs trim clock phases etc.