Operation_Mode

The Operation Mode register establishes the Transmit and Receive operating modes and commands. This register should be the last CSR to be written as part of the DMA initialization.
Module Instance Base Address Register Address
emac0 0xFF700000 0xFF701018
emac1 0xFF702000 0xFF703018

Offset: 0x1018

Access: RW

Important: To prevent indeterminate system behavior, reserved areas of memory must not be accessed by software or hardware. Any area of the memory map that is not explicitly defined as a register space or accessible memory is considered reserved.
Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

Reserved

dt

RW 0x0

rsf

RW 0x0

dff

RW 0x0

Reserved

tsf

RW 0x0

ftf

RW 0x0

Reserved

ttc

RW 0x0

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

ttc

RW 0x0

st

RW 0x0

rfd

RW 0x0

rfa

RW 0x0

efc

RW 0x0

fef

RW 0x0

fuf

RW 0x0

Reserved

rtc

RW 0x0

osf

RW 0x0

sr

RW 0x0

Reserved

Operation_Mode Fields

Bit Name Description Access Reset
26 dt

When this bit is set, the MAC does not drop the frames which only have errors detected by the Receive Checksum Offload engine. Such frames do not have any errors (including FCS error) in the Ethernet frame received by the MAC but have errors only in the encapsulated payload. When this bit is reset, all error frames are dropped if the FEF bit is reset.

Value Description
0x0 All Error Frames Dropped
0x1 MAC does not drop frame with errors
RW 0x0
25 rsf

When this bit is set, the MTL reads a frame from the Rx FIFO only after the complete frame has been written to it, ignoring the RTC bits. When this bit is reset, the Rx FIFO operates in the cut-through mode, subject to the threshold specified by the RTC bits.

Value Description
0x0 Rx Fifo cut-through mode
0x1 Read Rx FIFO only after complete frame
RW 0x0
24 dff

When this bit is set, the Rx DMA does not flush any frames because of the unavailability of receive descriptors or buffers as it does normally when this bit is reset.

Value Description
0x0 Rx DMA Flushed
0x1 Rx DMA not Flushed
RW 0x0
21 tsf

When this bit is set, transmission starts when a full frame resides in the MTL Transmit FIFO. When this bit is set, the TTC values specified in Bits[16:14] are ignored. This bit should be changed only when the transmission is stopped.

Value Description
0x0 Tx Does not Start with Full Frame
0x1 Tx Start with Full Frame
RW 0x0
20 ftf

When this bit is set, the transmit FIFO controller logic is reset to its default values and thus all data in the Tx FIFO is lost or flushed. This bit is cleared internally when the flushing operation is completed. The Operation Mode register should not be written to until this bit is cleared. The data which is already accepted by the MAC transmitter is not flushed. It is scheduled for transmission and results in underflow and runt frame transmission. Note: The flush operation is complete only when the Tx FIFO is emptied of its contents and all the pending Transmit Status of the transmitted frames are accepted by the host. To complete this flush operation, the PHY transmit clock is required to be active.

Value Description
0x0 Tx FIFO Data not Flushed
0x1 TX FIFO Data Flushed
RW 0x0
16:14 ttc

These bits control the threshold level of the MTL Transmit FIFO. Transmission starts when the frame size within the MTL Transmit FIFO is larger than the threshold. In addition, full frames with a length less than the threshold are also transmitted. These bits are used only when Bit 21 (TSF) is reset.

Value Description
0x0 MTL Transmit FIFO Threshold 64
0x1 MTL Transmit FIFO Threshold 128
0x2 MTL Transmit FIFO Threshold 192
0x3 MTL Transmit FIFO Threshold 256
0x4 MTL Transmit FIFO Threshold 40
0x5 MTL Transmit FIFO Threshold 32
0x6 MTL Transmit FIFO Threshold 24
0x7 MTL Transmit FIFO Threshold 16
RW 0x0
13 st

When this bit is set, transmission is placed in the Running state, and the DMA checks the Transmit List at the current position for a frame to be transmitted. Descriptor acquisition is attempted either from the current position in the list, which is the Transmit List Base Address set by Register 4 (Transmit Descriptor List Address Register), or from the position retained when transmission was stopped previously. If the DMA does not own the current descriptor, transmission enters the Suspended state and Bit 2 (Transmit Buffer Unavailable) of Register 5 (Status Register) is set. The Start Transmission command is effective only when transmission is stopped. If the command is issued before setting Register 4 (Transmit Descriptor List Address Register), then the DMA behavior is unpredictable. When this bit is reset, the transmission process is placed in the Stopped state after completing the transmission of the current frame. The Next Descriptor position in the Transmit List is saved, and it becomes the current position when transmission is restarted. To change the list address, you need to program Register 4 (Transmit Descriptor List Address Register) with a new value when this bit is reset. The new value is considered when this bit is set again. The stop transmission command is effective only when the transmission of the current frame is complete or the transmission is in the Suspended state.

Value Description
0x0 Transmission Stopped State
0x1 Transmission in Run State
RW 0x0
12:11 rfd

These bits control the threshold (Fill-level of Rx FIFO) at which the flow control is de-asserted after activation. The de-assertion is effective only after flow control is asserted.

Value Description
0x0 Full minus 1 KB
0x1 Full minus 2 KB
0x2 Full minus 3 KB
0x3 Full minus 4 KB
RW 0x0
10:9 rfa

These bits control the threshold (Fill level of Rx FIFO) at which the flow control is activated. These values only apply to the Rx FIFO when the EFC bit is set high.

Value Description
0x0 Full minus 1 KB
0x1 Full minus 2 KB
0x2 Full minus 3 KB
0x3 Full minus 4 KB
RW 0x0
8 efc

When this bit is set, the flow control signal operation based on the fill-level of Rx FIFO is enabled. When reset, the flow control operation is disabled.

Value Description
0x0 Rx FIFO Fill Level Disabled
0x1 Rx FIFO Fill Level Enabled Ctrl
RW 0x0
7 fef

When this bit is reset, the Rx FIFO drops frames with error status (CRC error, collision error, GMII_ER, giant frame, watchdog timeout, or overflow). However, if the start byte (write) pointer of a frame is already transferred to the read controller side (in Threshold mode), then the frame is not dropped. When the FEF bit is set, all frames except runt error frames are forwarded to the DMA. If the Bit 25 (RSF) is set and the Rx FIFO overflows when a partial frame is written, then the frame is dropped irrespective of the FEF bit setting. However, if the Bit 25 (RSF) is reset and the Rx FIFO overflows when a partial frame is written, then a partial frame may be forwarded to the DMA.

Value Description
0x0 Drops Frames with error status
0x1 Forward all Frames(except runt)
RW 0x0
6 fuf

When set, the Rx FIFO forwards Undersized frames (frames with no Error and length less than 64 bytes) including pad-bytes and CRC. When reset, the Rx FIFO drops all frames of less than 64 bytes, unless a frame is already transferred because of the lower value of Receive Threshold, for example, RTC = 01.

Value Description
0x0 Drops Frames less than 64Bytes
0x1 Forward Frames with no errors
RW 0x0
4:3 rtc

These two bits control the threshold level of the MTL Receive FIFO. Transfer (request) to DMA starts when the frame size within the MTL Receive FIFO is larger than the threshold. In addition, full frames with length less than the threshold are transferred automatically. These bits are valid only when the RSF bit is zero, and are ignored when the RSF bit is set to 1.

Value Description
0x0 MTL Rcv Fifo threshold level 64
0x1 MTL Rcv Fifo threshold level 32
0x2 MTL Rcv Fifo threshold level 96
0x3 MTL Rcv Fifo threshold level 128
RW 0x0
2 osf

When this bit is set, it instructs the DMA to process the second frame of the Transmit data even before the status for the first frame is obtained.

Value Description
0x0 DMA Does Not Process second frame
0x1 DMA Processes second frame
RW 0x0
1 sr

When this bit is set, the Receive process is placed in the Running state. The DMA attempts to acquire the descriptor from the Receive list and processes the incoming frames. The descriptor acquisition is attempted from the current position in the list, which is the address set by Register 3 (Receive Descriptor List Address Register) or the position retained when the Receive process was previously stopped. If the DMA does not own the descriptor, reception is suspended and Bit 7 (Receive Buffer Unavailable) of Register 5 (Status Register) is set. The Start Receive command is effective only when the reception has stopped. If the command is issued before setting Register 3 (Receive Descriptor List Address Register), the DMA behavior is unpredictable. When this bit is cleared, the Rx DMA operation is stopped after the transfer of the current frame. The next descriptor position in the Receive list is saved and becomes the current position after the Receive process is restarted. The Stop Receive command is effective only when the Receive process is in either the Running (waiting for receive packet) or in the Suspended state.

Value Description
0x0 Rx DMA operation is stopped
0x1 Rx DMA operation is started
RW 0x0