Skip to content

Std. Core: Output Port Lookup (Learning Switch)

Salvator Galea edited this page Jul 12, 2021 · 1 revision

Name

switch_output_port_lookup

Version

v1.0.0

Author

Original version for nf10:

Muhammad Shahbaz

Modified by:

Gianni Antichi

Modified for NetFPGA-SUME by:

Noa Zilberman

Type

IP core (HW)

Location

lib/hw/std/cores/switch_output_port_lookup_v1_0_1/

Interface Types

AXI4-Stream

AXI-Lite

Busses

S_AXIS: Slave AXI4-Stream bus, Variable width

M_AXIS: Master AXI4-Stream bus, Variable width

Parameters

C_M_AXIS_DATA_WIDTH: Data width of the master AXI4-Stream data bus.

C_S_AXIS_DATA_WIDTH: Data width of the slave AXI4-Stream data bus.

C_M_AXIS_TUSER_WIDTH: Data width of the master TUSER bus.

C_S_AXIS_TUSER_WIDTH: Data width of the slave TUSER bus.

SRC_PORT_POS: Source Port Position in the TUSER Field (note this is currently hardcoded in submodules)

DST_PORT_POS: DestinationPort Position in the TUSER Field (note this is currently hardcoded in submodules)

NUM_OUTPUT_QUEUES: Number of output queues.

C_BASEADDR: Base address value of the core.

C_HIGHADDR: High address value of the core.

Register map

This module uses register infrastructure Ver 1.00, please refer to here for more details.

0x0 : ID - Block ID

0x4 : VERSION - Block Version

0x8 : Reset - Clear counters [0], reset registers [4] and reset tables [8]

0xC : FLIP - Returns the negative value of a written register

0x10: DEBUG - Debug register, returns the written value plus a preconfigured value

0x14 : COUNTERIN - Total number of incoming packets

0x18: COUNTEROUT - Total number of outgoing packets

0x1C: LUTHIT - Total number of lookup table hits

0x20: LUTMISS - Total number of lookup table misses

Description

The function of this block is to set the destination port meta data field for all packets. In the Learning Switch each packet that arrives first goes through an Ethernet parser. The parser extracts the source and destination MAC and the source port from the packet. The fields are next looked up in the CAM, implementing a lookup table (LUT). If the results is a hit, the packet is sent to the destination ports indicated by the lookup (except for the source port), if the result is a miss, the destination ports are set to broadcast to all output ports (except for the source port). If the source MAC is not in the LUT, it is learned for future lookups.

Clone this wiki locally