Virtual Local Area Network (VLAN) frames are used to segregate Ethernet traffic within a larger physical LAN. VLAN frames are created by inserting a 4-byte VLAN TAG field in an Ethernet frame where the 2-byte Type/Length field would normally occur which extends the overall frame by four bytes. The VLAN TAG field is further broken down into additional fields as shown in the following figure.
The TEMAC core provides basic VLAN support that can be enabled or disabled independent of Extended VLAN Support. This basic support recognizes VLAN frames that have a TPID value of 0x8100. When basic VLAN function is enabled, the TEMAC core allows good VLAN frames with this TPID value to be processed for validation and address filtering rather than being dropped. However, some applications require using a TPID value other than 0x8100, or have multiple VLAN tags within one frame (referred to as double tagging, triple tagging). Additionally, some common operations are performed on VLAN frames that can be offloaded from software to hardware to reduce processor utilization. Some of these tasks, translation, stripping, and auto tagging, are available when the extended VLAN support is included in the TEMAC core at build-time by setting the C_TXVLAN_* and C_RXVLAN_* parameters.
The extended VLAN functions are available individually and independently between the transmit and receive paths. To use the extended VLAN functions, the circuitry must be included at build time by setting the appropriate parameters and the functions must be enabled at runtime by setting the New Functions enable bit (bit 11) of the Reset and Address Filter Register.