As the data is transferred from the Link Layer device to the PHY, the
data is stored in an input queue. The queue acts as a storage buffer
and holds incoming data until it is needed by the device. Since the
frame size can be up to 1500 bytes and the device does not begin removing
data from the queue until a whole frame is available, the input queue must
be at least 1500 bytes wide. To allow for some extra room, the length of
the queue was chosen to be 1600 bytes. This allows for at least one frame
and the beginning of the next one.
The basic functionality of the input queue is to store incoming data until
a whole frame is present. The system can then begin removing the data to
process it. Since the interface is clocked at 104 MHz and the bus width
is 4 bytes, we have an incoming rate of 3228 Mbps. There is no way that
data will be removed from the queue at this rate, so an alarm is used to
ensure there is no overflow of the queue.
Since the removal of data from the queue depends on whether or not
complete frames are available, we must somehow keep track of where the
ends of the frames are located. This is accomplished with the use of a
flag queue. The flag queue is a 1600 bit queue, that is 1 bit for each
byte in the input queue. When the end of a packet is reached, the
corresponding bit in the flag queue is set to one. As data is shifted
out of the input queue, so are the bits in the flag queue. If an external
module needs to find out if an end of packet exists, it just looks to
see if the flag queue is zero. If it is, there is not a complete frame.
The input queue is actually a version of the generic queue, which is used
as a base for all queues in the system. For a description of the
overflow alarm and more information on the queue, see the
Generic Queue section.