Apparatus and method in a network interface device for determining data availability in a random access memory
AssigneeAdvanced Micro Devices, Inc.
InventorsPo-Shen Lai, Autumn J. Niu
Life of this patent
Estimating the term…
Abstract
A network interface device includes a random access memory used as a transmit and receive buffer for transmission and reception of data between a host computer bus and a packet switched network. The network interface device includes a memory controller that determines whether a complete frame is stored in the random access memory and also determines an amount of data available to be read from the oldest received frame. A host CPU is able to access this information and determine whether to read the data or read the data at a later time.
Claims6
A network interface device, comprising:
- a random access memory configured to store a plurality of frames, each frame including a frame track field including at least an end of frame address and end of frame bit;
- a control device configured to determine an amount of data from an oldest received frame of the plurality of frames available to be read and to determine whether at least one complete frame is stored in the random access memory;
- a register configured to store information representing said amount of data available to be read, and
- a frame status register configured to store the frame track field for the oldest received frame, wherein the control device comprises:
- a write controller configured to write data to the random access memory using a write pointer register, wherein the contents of the write pointer register are incremented as the data is written,
- a read controller configured to read data stored in the random access memory using a read pointer register, wherein the contents of the read pointer register are incremented as the data is read, and
- a counter for determining the number of bytes of data from the oldest received frame that are available to be read, and
- the counter is configured to subtract the contents of the read pointer register from the end of frame address for the oldest received frame when one or more complete frames are stored in the random access memory.
In a network interface device that stores data frame, a method of determining data availability comprising:
- receiving a plurality of data frames, each frame including a frame track field including at least an end of frame address and end of frame bit;
- storing the plurality of data frames into a random access memory, the storing including
- writing data to the random access memory,
- incrementing a write pointer as data is written,
- reading data from the random access memory, and
- incrementing a read pointer as data is read;
- generating a value representing a number of bytes of data from an oldest received frame of the plurality of frames available to be read and storing the value in a programmable register;
- storing the frame track field four the oldest received frame in a frame status register;
- determining whether at least one complete frame is stored in the random access memory;
- storing, in the programmable register, data indicating whether at least one complete frame is stored in the random access memory;
- and
- subtracting a value of the read pointer from the end of frame address for the oldest frame stored in the random access memory when the data stored in the programmable register indicates that one or more complete frames are stored in the random access memory.
Dependencies are inferred from the claim text.