English
Language : 

LAN9353 Datasheet, PDF (209/523 Pages) Microchip Technology – Interfaces at up to 200Mbps via Turbo MII
LAN9353
The following procedure should be followed in order to add, delete and modify the ALR entries:
1. Write the Switch Engine ALR Write Data 0 Register (SWE_ALR_WR_DAT_0) and the Switch Engine ALR Write
Data 1 Register (SWE_ALR_WR_DAT_1) with the desired MAC address and control bits.
An entry can be deleted by setting the Valid bit to 0.
2. Set the Make Entry bit in the Switch Engine ALR Command Register (SWE_ALR_CMD).
3. Poll the Operation Pending bit in the Switch Engine ALR Command Status Register (SWE_ALR_CMD_STS) until
it is cleared.
READ ENTRIES
The ALR contains a search engine that is used by the host to read the MAC Address Table. This engine is accessed by
using the Switch Engine ALR Command Register (SWE_ALR_CMD), the Switch Engine ALR Command Status Regis-
ter (SWE_ALR_CMD_STS), Switch Engine ALR Read Data 0 Register (SWE_ALR_RD_DAT_0) and the Switch Engine
ALR Read Data 1 Register (SWE_ALR_RD_DAT_1).
Note: The entries read are not necessarily in the same order as they were learned or manually added.
The following procedure should be followed in order to read the ALR entries:
1. Set the Get First Entry bit in the Switch Engine ALR Command Register (SWE_ALR_CMD).
2. Poll the Operation Pending bit in the Switch Engine ALR Command Status Register (SWE_ALR_CMD_STS) until
it is cleared.
3. If the Valid bit in the Switch Engine ALR Read Data 0 Register (SWE_ALR_RD_DAT_0) is set, then the entry is
valid and the data from the Switch Engine ALR Read Data 0 Register (SWE_ALR_RD_DAT_0) and the Switch
Engine ALR Read Data 1 Register (SWE_ALR_RD_DAT_1) can be stored.
4. If the End of Table bit in the Switch Engine ALR Read Data 0 Register (SWE_ALR_RD_DAT_0) is set, then exit.
5. Set the Get Next Entry bit in the Switch Engine ALR Command Register (SWE_ALR_CMD).
6. Go to step 3.
10.3.2 FORWARDING RULES
Upon ingress, packets are filtered or forwarded based on the following rules:
• If the destination port equals the source port (local traffic), the packet is filtered. (This rule is for a destination MAC
address which is found in the ALR table and the ALR result indicates a single destination port.)
• If the source port is in the Disabled state, via the Switch Engine Port State Register (SWE_PORT_STATE), the
packet is filtered.
• If the source port is in the Learning or Listening / Blocking state, via the Switch Engine Port State Register
(SWE_PORT_STATE), the packet is filtered (unless the Spanning Tree Port State Override is in effect).
• If the packet is a multicast packet and it is identified as a IGMP or MLD packet and IGMP/MLD monitoring is
enabled (respectively), via the Switch Engine Global Ingress Configuration Register (SWE_GLOBAL_IN-
GRSS_CFG), the packet is redirected to the IGMP/MLD monitor port(s). This check is not done on special tagged
packets from the host CPU port when an ALR lookup is not requested. Refer to Section 10.3.10.1, "Packets from
the Host CPU," on page 220 for additional information.
• If the destination port is in the disabled state, via the Switch Engine Port State Register (SWE_PORT_STATE), the
packet is filtered. (This rule is for a destination MAC address which is found in the ALR table and the ALR result
indicates a single destination port. When there are multiple destination ports or when the MAC address is not
found, the packet is sent to only those ports that are in the Forwarding state. This rule is also suppressed if ALR
Result Override is enabled.
• If the destination port is in the Learning or Listening / Blocking state, via the Switch Engine Port State Register
(SWE_PORT_STATE), the packet is filtered (unless the Spanning Tree Port State Override is in effect). (This rule
is for a destination MAC address which is found in the ALR table and the ALR result indicates a single destination
port. When there are multiple destination ports or when the MAC address is not found, the packet is sent to only
those ports that are in the Forwarding state. This rule is also suppressed if ALR Result Override is enabled.)
• If the Age 0/Filter bit for the Destination Address is set in the ALR table, the packet is filtered.
• If the packet has a unicast destination MAC address which is not found in the ALR table and the Drop Unknown
field in the Switch Engine Global Ingress Configuration Register (SWE_GLOBAL_INGRSS_CFG) is set, the
packet is filtered.
• If the packet has a multicast destination MAC address which is not found in the ALR table and the Filter Multicast
field in the Switch Engine Global Ingress Configuration Register (SWE_GLOBAL_INGRSS_CFG) is set, the
packet is filtered.
 2015 Microchip Technology Inc.
DS00001925A-page 209