VLAN stripping allows the TEMAC core to remove a VLAN tag in select Ethernet frames as they pass through the AXI Ethernet Subsystem in either the transmit or receive direction.
One VLAN tag is removed:
- Non-VLAN frames are not changed.
- VLAN tagged frames have the outer VLAN tag removed and the TEMAC core does not check to see how many VLAN tags it already has (if there are four tags, the core makes it three).
When VLAN stripping is enabled at build time with the appropriate parameter, a field in the Reset and Address Filter Register is used to select one of three VLAN stripping modes.
- Do not strip tags from any frames.
- Strip one tag from all VLAN tagged frames.
- Strip one tag only from select VLAN tagged frames based on VID value.
The third mode requires a method for specifying which tagged frames should be stripped. The TEMAC Receive Configuration Word 0 Register and Receive VLAN Data Table are used for this purpose. A 1 in the strip enable field for a TPID value indicates that frame should have its VLAN tag stripped.
Again, transmit In-Band FCS mode is not allowed and receive FCS stripping is required when using VLAN stripping because the FCS field value would not be correct for the frame with the VLAN tag removed. Although receive stripping is enabled, any padding, if present, is not stripped due to the TYPE/LENGTH field of the receive frame containing a VLAN tag rather than a length value.