BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
270
Section 9: Ethernet MACs
Document
1250_1125-UM100CB-R
P
ROTOCOL
E
NGINE
C
ONFIGURATION
The basic encapsulation parameters are set in the
mac_frame_cfg
register. This allows configuring of the
inter-frame gap, maximum backoff time, slot size, minimum frame size and maximum frame size. This must be
programmed to the correct values for IEEE 802.3 operation at 10 Mbp/s and 100 Mbp/s. For gigabit operation
the slot_size is automatically increased to 512 byte times (rather than 512 bit times) but software must half the
IFG values; none of the other parameters should be altered. In networks configured to use jumbo packets the
maximum frame size should be increased to match the rest of the network. Parameters should only be altered
while the protocol engine is held in reset. Care must be used when altering the values from their standard ones,
typically all endpoints on the network must be configured similarly. A detailed description of each of the
parameters is given in the register description in
The effective slot size is adjusted by adding a 10 bit signed offset in bit times to the 512 bit times or 512 byte
times selected by the data rate. The offset adjusts the MAC timing to take account of the number of cycles of
latency through the PHY and back. Typically the field will be a small positive number.
The lfsr_seed is the only parameter in the
mac_frame_cfg
register that can be altered at any time and that
can be altered without violating the 802.3 standard. Whenever it is written the value written sets the lowest
eight bits of the linear feedback shift register that generates the pseudo-random backoff following a collision.
The rest of the protocol engine configuration is done in the
mac_cfg
register. For Ethernet operation the
bypass_sel bit must be clear. The ss_en bit must always be set unless the part is being run in a test mode.
Ethernet packets are recovered into a byte stream before being put into the 64 bit wide receive FIFO, and data
is read in 64 bit chunks from the transmit FIFO and converted to a byte stream before it is sent. The system
endian configuration is used to correctly order the bytes so that the first byte on the wire is at the lowest memory
location.
The flow control portion of the protocol engine must also be programmed with the flow control mechanism and
for full-duplex links the number of slot times to request the peer to pause transmission. These are set in the
mac_cfg
register in the fc_cmd and tx_pause_cnt fields.
Control of the movement of data between the transmit and receive FIFOs and the protocol engine is also done
in the
mac_cfg
register. These settings are discussed in the transmit and receive sections below.
Errors generated in the interface are signalled in the
mac_status
register. Bits in this register are set when an
error is detected and also reflect the interrupt state from the DMA engines. Whenever the register is read the
error bits are cleared. There is a mask register
mac_int_mask
associated with the status register. If both the
mask and status bits are set for any of the error conditions or DMA channels then the MAC interrupt is raised.
Reading the
mac_status
register will clear the error bits, but the DMA channels must also be serviced before
the interrupt is removed.
I
NTERFACE
TO
PHY
The interface to the PHY is done through the standard GMII/MII interface. This provides an 8 bit path each
direction for gigabit operation and a 4 bit path for 100 Mbp/s or 10 Mbp/s operation. The PHY does the
appropriate encoding for the link for transmission, and will deserialize the incoming data. The PHY reports
carrier sense, collision and code violation to the protocol engine.
In most cases software will interrogate the PHY to discover the link speed and duplex settings. These are
obtained either from auto-negotiation or based on the PHY capabilities. The settings must be used to configure
the
mac_cfg
register.