3 watermarking, Watermarking, Headroom watermark – Maxim Integrated 78Q8430 Software Driver User Manual
Page 28: Pause watermark level

78Q8430 Software Driver Development Guidelines
UG_8430_004
STEP 13: Read the transmit status from TPSR.
Reading the TPSR reads status words from the top of a 128 word deep FIFO. If the status words for
transmitted frames are not read from the FIFO, it eventually fills to capacity at which time any new
status words are dropped while the FIFO retains the old ones.
The software driver should retain the buffer memory containing the transmitted frame until the transmit
status for that frame has been received. The status can be associated with the buffer that contains its
data using the Packet ID assigned in the PCWR, which is also contained in the status. Once the TPSR
Done bit is set and the transmit status is known to be good, the driver can safely de-allocate the buffer
memory. In this way, if there was a problem during transmission and the status is not good, the driver
can resubmit the frame if needed.
The procedure described above assumes that the MAC transmitter has been enabled and is not halted
and that the MAC has been properly configured via the MCR.
The transmit status for a frame will not be available until the transmission completes. The driver may
need to have provisions to recover the status at a later time.
5.3 Watermarking
The Headroom, PAUSE, and Interrupt watermarks, accessed by WMVR, are used to manage memory
usage based on the size of the free memory pool. The three watermark levels affect each other. Refer to
the “Watermarking” section of the 78Q8430 Data Sheet for more information on this feature.
5.3.1 Headroom
Watermark
The Headroom watermark specifies the number of free memory BLOCKS below which the MAC receiver
is halted. WMVR contains three different watermark values. Change only the Headroom watermark
value while keeping the values of the other two unchanged. This is accomplished using a read-modify-
write operation. Use the following procedure to set the Headroom watermark.
STEP 1: Read the WMVR value.
STEP 2: Clear only the Headroom field in the WMVR value.
This can be done using a bit-wise AND operator.
STEP 3: Set the value of the Headroom field in the WMVR value.
This can be done using a bit-wise OR operator. The watermark value needs to be shifted to make it
line up with the position of the Headroom field in the WMVR value.
STEP 4: Write the new value to WMVR.
5.3.2 PAUSE Watermark Level
The PAUSE watermark specifies the minimum number of free memory BLOCKS that triggers the
automatic transmission of the PAUSE frame. Refer to Section
for more information on the transmit
PAUSE operation. Use the following procedure to set the PAUSE watermark level.
STEP 1: Read the WMVR value.
WMVR contains three different watermark values. Change only the PAUSE watermark value while
keeping the values of the other two unchanged. This is accomplished using a
read-modify-write operation.
STEP 2: Clear only the PAUSE field of the WMVR value.
This can be done with the use of a bit-wise AND operator.
28
Rev.
1.0