FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6359 Discussions

Triple Speed Ethernet: MAC Address Insertion

Altera_Forum
Honored Contributor II
1,434 Views

Hi, 

 

I'm working on a project which needs a communication between Cyclone III and PC through the Ethernet connection. In this TSE MegaCore user guide, page 4-4, section "Address Insertion", it is said "By default, the MAC function retains the source address received from the user application". According to this I guess the source MAC address SHOULD BE given by the user application, as part of an Ethernet frame. 

 

But just half page above there is "On the transmit path, the MAC function accepts frames from a user application and constructs Ethernet frames before forwarding them to the PHY", which suggests that the Ethernet frame SHOULD NOT BE constructed by the user. 

 

I got confused on this, searched in the forum and found this: 

 

--- Quote Start ---  

You only need to add the Ethernet frame data payload. The MAC takes care of preamble and all the ethernet media and physical layer dependent stuff. 

Anyway, it's up to you adding MAC address fields (source and destination) and if I remember correctly, you also need to shift the frame in the packet data array by a 2 byte offset. 

Regards 

--- Quote End ---  

 

So now it seems that the MAC address is OPTIONAL to be added by my application. However, the structure of an Ethernet frame seems like this: 

en.wikipedia.org/wiki/Ethernet_frame 

So now I don't understand how I can just optionally give the source MAC address coz this seems to be non-sense.:( 

 

Could any one tell me what kind of a frame should I forward to this MAC interface? Thanks.:-P
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
332 Views

You need to supply the Ethernet header with your packet payload. What the MAC adds are the preamble, start of frame delimiter, CRC and interframe gap. So there is nothing contradictory here. If you look at Wikipedia's table, what you need to give to the TSE MAC is everything between (and including) the destination MAC and the Payload.

0 Kudos
Altera_Forum
Honored Contributor II
332 Views

Thanks a lot, I had read the posts and the documentations twice more before realized that as well :-P

0 Kudos
Altera_Forum
Honored Contributor II
332 Views

And also don't forget that if you enable the "align header to 32-bit" option (I don't remember the exact name, but it is something like that) then the TSE expects 16 null padding bits before the Ethernet header. This option is used to make the software easier to write, as the IP packet is then aligned on 32 bits.

0 Kudos
Reply