I intend to send data packets from my PC to a Virtex-5 board over ethernet cable. I found three ways to achieve this -- 1. Use the Microblaze processor core, using the EDK and SDK tools. (However, It will use a lot of device resources) 2. Instantiate the Temac Core. 3. Build own LUT-based implementation to send the packets. (resource efficient, but required to build your own block )

I am going for the Temac core based approach, but could not find much documentation/projects in this area. I have a server running on my PC, and am using a socket connection to send packets over ethenet. How do I know the MAC address of the board? And once the Temac core is instantiated, will all the data processing be done by it? I intend to use TCP/IP communication, but UDP/IP is also fine. I don't have much experience handling Xilinx cores, and maybe wrong at some stage. Please help!!!


I've used the TEMAC core directly instanciated in logic so I can probably give you some thoughts and answers.


Firstly, Xilinx provides a whole host of documents for each of it's IP cores. They also keep documents for different versions of the core, so be careful to pick the right document. A search of the Xilinx support documents came up with this collection of documents:

Xilinx TEMAC Documentation

The main document that you will want to look at is the user manual. It is VERY detailed and should have everything you need to use the core in a project. Saying that, it can be quite hard to work through and fine the information you want.

I'm basing this on v4.5 of the core, I think that's the most recent direct instanciation version (not AXI bus). What cores you can use will depend on how up-to-date your ISE version is, but they don't change of the basics between versions.

The TEMAC v4.5 user manual is at http://www.xilinx.com/support/documentation/ip_documentation/tri_mode_eth_mac_ug138.pdf


The TEMAC core requires a licence to use. An evaluation licence is free and fully functional, but it stops working after a while

The core can be tested in the target device for a limited time before timing out (ceasing to function) at which time it can be reactivated by reconfiguring the device.

On the Spartan-6 device I used the core on with a 50 MHz clock the core functioned for about 8 hours, but there's no documentation on exactly how the timeout works.

I would get a quote for a licence before you do too much work with the core, it does cost quite a bit of money!


There's a block diagram of the core on page 52 of the document.

TEMAC architecture

This shows you what the TEMAC does in Ethernet jargon, but basically the core interfaces between the user logic and the Ethernet PHY (which drives the actual line signals) on a packet-by-packet basis.

The key to most of your questions is how the "client interface" works. This is the interface to your logic and is well described. Take a look at that chapter to see what the input and output data from the interface is like.


To answer your specific questions:

How do I know the MAC address of the board?

The TEMAC takes in the MAC address you give it and uses that, so you'll have to provide it from somewhere. Many development boards provide a MAC address EEPROM chip which has a unique address stored in it for you to read and use. If you don't have a MAC address available on the board itself, you can hard code one, but beware that this is kind of against the rules and could possibly cause a problem if another device on your network happens to have that address. One fairly elegant solution is to find an old Ethernet device that you don't use any more and just use it's address for testing.

And once the Temac core is instantiated, will all the data processing be done by it?

No, not really. The receiver and transmitter interfaces work at an individual Ethernet packet level, so your logic must provide individual packets. This is layer 2 on the OSI model. You'll have to create other logic or use another core to handle any higher-level protocols that you want to use (such as TCP or UDP).

I've used this core to make a system work, including writing my own modules to interface with the client interface, and am happy to answer any other questions. Unfortunately my code is owned by the company I work for, but I can talk about it in general.

  • \$\begingroup\$ Hey! Thanks for the reply. I found that custom-LUT based design can't be used, since the Ethernet communication takes place via a PHY chip. So, I am stuck with the Temac Core. I have been trying to implement the example designs (specifically the address swap module) provided with the v4.5 Temac Core on a Virtex-5 board, but with no success. Do I have to tweak with this example design too, or should it work just like that? I also found that the board is not responding to a ping from my PC (only the PC and board are in the network, so there is no address conflict). Am I going wrong somewhere? \$\endgroup\$ – mac93 Sep 16 '13 at 16:49
  • \$\begingroup\$ I'll have a look at that example tonight and see if I can see what might be lacking, a couple of questions: - Do you prefer to use VHDL or Verilog? - Does the example on its own build without errors? - How are you verifying that the design is or isn't working? Wireshark? The "ping" command uses a high-level protocol on top of Ethernet, so it won't work with that example as it's still working in simple Ethernet packets (see wikipedia) \$\endgroup\$ – Xcodo Sep 17 '13 at 13:04
  • \$\begingroup\$ I am using Verilog, and yes the example design builds without any errors and the simulation gives some waveforms too. Yes, I am using 'WireShark' on the PC end. Thanks for the reply! \$\endgroup\$ – mac93 Sep 18 '13 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.