Modules of Rx Ethernet MAC :

 

1. Rx State Machine  

Function :
Controls receive process

The process starts when rx_dv asserted, that indicates packet data is coming to receive MAC, then it activates SFD Detector. After SFD is detected, the frame is holded in buffer, and delivered to FIFO. Meanwhile, destination address field and CRC field are being checked. At the end of reception the Rx State Machine marks the packet received by setting the appropriate bits in the receive status signals (rx_status[15:0]).

2. Rx Buffer 

Signal Type Description
rx_data [3:0] in data (nibble)transferred from MII
data [3:0] out data (nibble)transferred from buffer to FIFO
data_tap [3:0] out data (nibble)transferred from buffer to SFD detector and AML
data_en in enable signal from rx state machine to open the buffer and lets data[3:0] delivered to FIFO
rx_clk in clock signals from MII
reset_n in active low signals that initializes the receive MAC function

Function :
Holds the frame being received, before they transferred to FIFO.

It lets data_tap[3:0] delivered to SFD detector and AML all time, and delivered data_tap[3:0] when data_en is active (after SFD detected). This makes frame decapsulated.

3. SFD Detector  

Signal Type Description
SFD_start_detect in a single clock signals gives instruction to SFD detector to begin to detect the SFD
data [3:0] in data (nibble) transferred from MII
SFD_detected out this signal indicates that SFD has detected.
rx_clk in clock signals from MII
reset_n in active low signals that initializes the receive MAC function

Function :
Detects Start Frame Delimiter (SFD) that indicates the start of frame to be received.

It is activated by SFD_start_check signal from Rx State Machine that launched after rx_dv asserted. When the SFD detected, SFD Detector launches SFD_detected.

4. Address Matching Logic (AML)  

Signal Type Description
eth_address [47:0] in ethernet address
SFD_detected in signal from SFD detector, means: be ready to check the destination address
data_tap [3:0] in nibbles from buffer (destination address)
address_match out TRUE: destination address and ethernet address are matched
FALSE: destination address and ethernet address are not matched
multicast out the receive packet is multicast packet
broadcast out the receive packet is broadcast packet
rx_clk in clock signals from MII
reset_n in active low signals that initializes the receive MAC function
Function :
Compares the destination address of the received packet to ethernet address.

The AML is organized to hold six-byte address entries.

5. FCS Checker

Signal Type Description
FCS_start_check in instruction for FCS checker to begin to calculate the CRC of the receive data
data [3:0] in data (nibble) transferred from buffer to FIFO
crc_ok out indicates CRC calculation and FCS-check are finished;
TRUE: no error
FALSE: there is error
rx_clk in clock signals from MII
reset_n in active low signals that initializes the receive MAC function

Function :
Computes a CRC across the decapsulated frame to find the 'magic number' (0xC704DD7B).

 

Rx Eth MAC
Eth MAC

written by: Mahmud G