Reduced hardware network adapter and communication method
The present invention provides a network interface adapter for connecting a client computer to a computer network that includes a reduced hardware media access controller (MAC) coupled through a physical interface (PHY) to the network physical link. A significant portion of the MAC functionality is implemented as software within the processor of the host client computer. The hardware portion of the preferred MAC implementation provides memory for buffering communications between the PHY and the client computer. The preferred hardware aspects of a MAC in accordance with the present invention also includes a register interface for register-driven communications between the hardware portion of the MAC and the software portions of the MAC implemented within the client computer. By implementing most of the MAC functionality in software within the host computer, the preferred MAC provides lower cost, lower power consumption, and generally greater flexibility.
Latest Patents:
1. Field of the Invention
The present invention relates to adapters, interfaces and connections between a computer and a network. As a specific example, the present invention is described in terms of an adapter and a communication method between a computer and a computer network that functions in accordance with an industry standard protocol such as IEEE 802.3 or one of its extensions.
2. Description of the Related Art
The present invention generally relates to an adapter for use in connecting a computer, referred to here as a client computer, to a network. The invention will be described and explained with reference to a particular implementation designed for one of the most common network configurations presently in use, commonly known as an Ethernet™ network. This type of network more generally includes those networks that implement the IEEE 802.3 standard, or one of the variations, modifications or improvements on that standard. For simplicity, all of these networks are referenced together as an IEEE 802.3 network, although that designation is not necessarily precise. The networks referenced here provide a framework for understanding the present invention, as do the adapters or network interface controllers that have been developed for those networks.
Client computers of a local area network are often connected together over a common physical link such as coaxial cable, unshielded twisted pairs of wires or shielded twisted pairs of wires. Information is transmitted by client computers onto the physical link in units of frames having one of a number of protocol-defined data structures and a quantity of data ranging from that of a minimum frame length and that of a maximum frame length. The IEEE 802.3 protocol in its simplest form allows only one client computer to transmit information over any distinct physical link at one time. If two client computers provide data to the physical link at the same time, or sufficiently close in time as to create interference between two message signals, the data are corrupted and must be discarded. Such an event is referred to as a collision and must be detected by the client computers. IEEE 802.3 networks use carrier sense multiple access/collision detection (CSMA/CD) to govern access to the physical link. Before a client computer transmits a message to the physical link, it detects whether a carrier signal is present on the physical link. If a carrier signal is present on the physical link, the client computer waits before transmitting the message until no carrier signal is present and the physical link is available.
Once a client computer determines that the physical link is available, the client computer transmits the message to the physical link and onto the network. The client computer monitors the physical link to detect any collision that might occur while it transmits the message over the physical link. The transmitting computer continues to monitor for collisions after transmission during a subsequent message in progress period of time in which the transmitting computer is waiting for the message to reach its destination. Should the client computer detect a collision, the client computer continues transmitting a signal, sometimes referred to as a jam sequence, until the transmission continues for at least a period of time corresponding to a minimum frame length. The client computer then pauses for a predetermined, random amount of time and attempts to gain access to the physical link to once again transmit the data. Each of the client computers attempting to access the physical link executes a similar backoff algorithm, but with different, randomly assigned waiting times so that a single client computer gains access to the physical link, with others of the waiting computers gaining access to the network successively.
Information is typically organized into frames for transmission over an Ethernet™ or other type of CSMA/CD network.
The framing of information for these networks includes both the destination address and the source address for the message. The destination address may be a single target computer (unicast), a group of computers (multicast) or all computers on the network (broadcast). The source address is the particular transmitting computer. Ethernet™ frames include a type field identifying the protocol of an upper layer application to receive the message. This field is not present in frames for the IEEE 802.3 network and is replaced by a length field that specifies the number of bytes of data in the message. Both frame structures provide a data field of arbitrary length within a range of possible lengths, followed by a frame check sequence (FCS), which is a four-byte cyclic redundancy check value. The FCS is created by the sending computer and is recalculated by the receiving device to check for damaged frames.
Client computers communicating frames of data over a CSMA/CD network use a network interface controller to perform carrier sense, collision detection, and other aspects of data transmission and receive control. Control of data transmission includes generating the frame format and calculating the FCS byte. Data receive control includes the detection of a frame, examining the destination address to determine if the message is intended for that computer, and performing a CRC or other frame check procedure to determine if the frame is valid. Other forms of analysis may be performed on the frame or may have to be performed when there is an error in the frame of data or in the receive operation. For example, information may have to be retransmitted if an error is detected during transmission. All of this processing is conventionally known and performed in typical adapters or controllers that link client computers to a local area CSMA/CD network.
The network interface controller is implemented as an integrated circuit, such as an application specific integrated circuit (ASIC). An example of one configuration of Ethernet controller in an ASIC, described in U.S. Pat. No. 5,872,920, is illustrated schematically in
A controller 50, which may be a microcontroller or other type of processor, is typically provided as a core within the ASIC 10 to control the transmit and receive operations using appropriate transmit control 52 and receive control 54 programs or state machines. These programs handle the various data control operations required for transmitting and receiving data from a CSMA/CD network including, for example, handling error conditions for a collision on the physical medium and retransmitting corrupted data as necessary. Most all of the functionality desired to implement applicable standards, such as IEEE 802.3, is implemented within the controller 50. Data coming in and out of the controller 50 are buffered by a transmit FIFO 56 and a receive FIFO 58. Communications with the host computer, including the provision of data to the bus 20 of the host computer, are managed by the host interface 60. Provisions are made to update the host interface 60 by rewriting or updating a data set or program stored within the EEPROM 62. Further details of these circuits and the functionality they implement are described in U.S. Pat. No. 5,872,920, which is hereby incorporated by reference.
It should be appreciated that, while the network interface controller of
Considerable effort has been made to increase the functionality provided within integrated circuit network interface controllers such as the ASIC 10 illustrated in
Preferred embodiments of the present invention provide a simplified controller that is better adapted to a low-cost, network-compatible computer. By providing a relatively simple interface structure and by implementing more of the network interface control functionality within a processor on the host computer, such preferred embodiments of the invention provide a low cost, highly flexible solution for a network interface.
An aspect of the present invention provides a computer communications system having a transmit buffer coupled to at least one transmit data line. The transmit buffer receives data from a host computer and temporarily store the data before transmitting the data over the transmit data line to a physical link of a data network. A receive buffer is coupled to at least one receive data line, the receive buffer adapted to receive data from a physical link of a data network over the receive data line and temporarily store the data before providing the data to a computer. An array of communication registers is also provided. The array includes a data register coupled to the receive buffer, wherein repeated reads from the data register causes data to be read from the receive buffer. The array further includes a status register for storing data identifying a collision of data on the physical link of the network, where the status register is readable from the host computer. The status register also includes at least one bit signifying an interrupt state in at least one of a read and a write operation.
Another aspect of the invention provides a computer communications system comprising a media access controller including a receive buffer coupled to receive data from a data network and temporarily store the data before providing the data to a host computer. The media access controller has communication registers including a data register coupled to the receive buffer, wherein repeated reads from the data register reads data from the receive buffer. The communication registers provide a status register storing at least one interrupt bit. The interrupt bit is set to indicate the presence of data received from the data network and destined for the host computer and the interrupt bit is readable by the host computer to indicate the presence of data to be read.
Still another aspect of the invention provides a computer communications system comprising a media access controller including a plurality of communication registers. The communication registers preferably include a data register coupled to the receive buffer, wherein repeated reads from the data register read data received from the data network. A status register stores at least one interrupt bit, the interrupt bit set to indicate the presence of data received from the data network and destined for the host computer, the interrupt bit readable by the host computer. A media independent interface register stores at least one signal for controlling operation of PHY circuitry coupled to the media access controller, wherein signals from the host computer are passed from the media independent interface register to control PHY circuitry as data are read from the data network. A byte-count register stores a value indicative of the number of bytes stored in the media access controller for transfer to the host computer, where the byte count register is decremented as data are read from the media access controller.
BRIEF DESCRIPTION OF THE DRAWINGSThese and other aspects of the present invention are better understood by reference to the following description that references and includes the following figures.
Communication between a computer and a network is conventionally conducted through a network interface controller (NIC) or adapter. Preferred embodiments of the present invention provide a reduced hardware implementation of a network interface controller. Implementations of preferred aspects of an adapter in accordance with the invention may provide computers with network interface connections that are lower in cost and consume less power than conventional controllers. Aspects of the present invention make it possible to implement adapters in a manner that is far easier to modify to accommodate changes in technology or to provide solutions for unusual or specialized applications.
Particularly preferred embodiments of the present invention provide a reduced hardware MAC with a significant portion of the MAC functionality implemented as software within the host client computer. Most preferably, the MAC functionality embodied within the client computer is implemented as software within a processor of the client computer and most preferably the MAC functionality is implemented within the main processor of a personal computer type of architecture. The hardware portion of the preferred MAC implementation provides memory for buffering communications between the PHY and the client computer. The preferred hardware aspects of a MAC in accordance with the present invention also includes a register interface for register-driven communications between the hardware portion of the MAC and the software portions of the MAC implemented within the client computer. By implementing most of the MAC functionality in software within the host computer, the preferred MAC provides lower cost, lower power consumption, and generally greater flexibility.
Aspects of the present invention can provide an interface between a client or other computer and a network such as a local area network functioning in accordance with any of the defined IEEE 802.3 protocols. Other related aspects of the present invention provide a method of communicating information to, from or between a computer and one or more other computers through an IEEE 802.3 network. The term IEEE 802.3 is used broadly here to generally encompass CSMA/CD networks including presently planned variations including gigabit Ethernet™ and other variations that might be developed later. Aspects of the invention are believed to have advantages in interfacing to and communicating with other types of networks using other types of protocols. Many of the examples and explanations provided here are set forth in terms of communicating with an IEEE 802.3 network, both because of the familiarity of these networks and because of the present prominence of IEEE 802.3 and Ethernet™ networks. The specific applications used to illustrate the invention are not, however, intended to limit the scope of the invention.
Similarly, illustrations of the present invention are made within the framework of presently available and used IEEE 802.3 protocols. More advanced implementations of IEEE 802.3 and successors to IEEE 802.3 will be developed and brought to market in the future. Many aspects of the present invention are expected to have advantages when applied to such networks, as well.
The PHY 72 is generally adapted to a particular network protocol or definition. As such, aspects of the PHY 72 may vary significantly, but in a well-known and understood manner, between different applications of the architecture of
The next higher level of the network model illustrated in
MAC functionality may include a number of different aspects of communications. For example, data from the network might be provided by PHY 72 in 4-bit parallel format. The MAC preferably reformats that 4-bit parallel data into bytes or words appropriate for the client computer, for example, 8-bit bytes or 32-bit words. Other aspects of communication that might be included in the MAC are address recognition, frame recognition, frame analysis, and detection of and management of collisions or other forms of network errors. As discussed in the background and illustrated in
Preferred implementations of the present invention provide a simplified MAC, at least from a circuitry point of view. In most implementations, embodiments of the present invention will include a simplified hardware MAC and a complementary software MAC preferably within a host processor that will, in combination, provide much if not more of the functionality performed by the MAC illustrated in
Still referring to
The next two lines illustrated in
The next line illustrated in
In the illustrated embodiment, the bus register interface 80 stores data in units of 8-bit bytes. Data provided to and from the PHY 72 are organized as four parallel bits. It is consequently desirable to reformat the 4-bit data from the PHY into 8-bit data within an appropriately configured register 84. Register 84 is shown as a 4-8 bit parallel shift register. The output from register 84 is provided to a receive buffer 86, which buffers data received from the physical link before it is read out into the client computer through the bus register interface 80. Data from the client computer are provided in 8-bit bytes to a transmit buffer 88 that buffers the data before providing it to register 90, which formats the 8-bit data into successive 4-bit data items and provides the data items to the PHY 72.
The receive buffer 86 and transmit buffer 88 are preferably FIFOs (first in, first out memories) of a size appropriate to accommodate latency within the client computer. Because servicing of the adapter illustrated in
At least portions of the client computer's operating system 114 and portions of the software aspects 116 of the MAC are expected to be available in memory 112 as information is transmitted to and received from the physical link of the network 102. The illustrated memory 112 may be partially within the processor 108 and partially within an array of DRAM or other, less volatile memory including, for example, on a disk drive or in flash or other solid state memory. In other implementations, the illustrated memory 112 might be entirely inside or outside of the processor 108. Regardless of the particular memory implementation, the software aspects of the MAC 116 preferably communicate through the operating system 114 within the processor 108 to the hardware aspects of the MAC by addressing the communication registers 80 within the MAC 106.
The communication registers within the bus register interface 80 are addressed using a preferred register address scheme. In the embodiment illustrated in part in
It should be noted that the data received from the network might include erroneous data or might include proper frame data. As such, it is generally undesirable to rely on the transferred data itself to indicate whether additional data remains to be received from the network.
When the MAC software 116 is reading the adapter, the command/status register (
The MAC software 116 controls much of the operation of the adapter 79. Generally, the MAC software can be viewed as including a lower level piece that handles interrupts and data transfer and an upper level piece that performs more sophisticated, but less immediate operations. Receive operations are interrupt driven and the interrupts are handled by the lower level facility of the MAC software 116. When the operating system 114 receives an interrupt from the adapter 79, the operating system calls the lower level facility of the MAC software.
The lower level facility reads the command/status register to clear the interrupt pending bit. If there are data present, the lower level facility begins a loop to first check the byte count in the byte count register (
The data read out by the lower level facility is stored in a buffer within the processor or in DRAM. Further processing is necessary in accordance with the frame definition and other processing relevant to the IEEE 802.3 or other protocol by which the network is organized and communications proceed. For example, processing of the data packet for an IEEE 802.3 network might include the processor 108 detecting a frame preamble, checking the frame length to determine if the frame is of a valid length. The processor evaluates the frame using the FCS data to evaluate whether the frame is valid. For example, if the FCS data is CRC data, then a polynomial division is performed on the data using the protocol defined check polynomial to determine if the data are valid. All of these functions are performed by an upper level facility of the MAC software 116. The MAC software also may perform filtering to detect whether the address of the packet is relevant to the host client computer.
The MAC software further tracks the network statistics in accordance with network protocols. Statistics include the number of frames successfully transmitted and the frequencies with which erroneous frames are transmitted. These statistics are made available to network management software, such as software in accordance with a simple network management protocol.
The operation of writing data to the network is also a cooperation between the MAC software 116 and the adapter 79. Data to be provided to the network is formatted by the upper level facility of the MAC software into appropriate frames and the upper level facility calculates the FCS data, such as appropriate cyclic redundancy check (CRC) data, and appends the FCS data to the frame. The frames of data are passed to the lower level facility of the MAC software, which writes the data to the data register and thus to the transmit FIFO 88 of the adapter. The low-level portion of the MAC software 116 monitors the adapter during to ensure that data are transferred safely from the buffer FIFO 88 to the network. For example, the low-level facility checks the FIFO to see if the FIFO is full and cannot receive additional data or if the FIFO has been completely emptied (an underflow condition). The low-level facility further monitors the COL bit of the command/status register to determine if there has been a collision.
The upper levels of the MAC software 116 perform the well-known functions of an Ethernet™ or IEEE 802.3 network. These functions are conventionally implemented as software or state machines within the processor of a conventional network interface controller. As such, it is well within the ordinary skill in this art to implement these functions in the microprocessor or other processor of the host client computer. These aspects of the invention will therefore not be further described here.
Installation of an adapter in accordance with the present invention would proceed by installing the reduced hardware MAC, for example within a PCMCIA card that also includes PHY circuitry appropriate to the target network. Driver software is installed to the host computer in a manner that the MAC software is available to be accessed by the operating system of the host computer.
Certain variations of the design discussed here will be apparent to those of ordinary skill in the art. For example, the reduced hardware MAC illustrated in
Those of ordinary skill in the art will appreciate that a number of variations and modifications might be made to the particular embodiments described herein without varying from the basic teachings of the present invention. As such, the scope of the present invention is not to be limited to the particular embodiments described herein. Rather, the scope of the invention is to be determined from the claims, which follow.
Claims
1-17. (canceled)
18. A system comprising:
- a hardware media access controller, the hardware media access controller including a memory to buffer data transferred between a physical interface to a network and a computer, and the hardware media access controller including a register interface; and
- a memory storing media access control software that if executed by a processor of the computer causes the processor to perform one or more media access control communications functions.
19. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to perform one or more IEEE 802.3 functions.
20. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to perform one or more network interface control functions.
21. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to detect an error condition.
22. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to perform an error handling function.
23. The system of claim 22, wherein the software comprises software that if executed by the processor causes the processor to perform the error handling function by performing a backoff algorithm.
24. The system of claim 22, wherein the software comprises software that if executed by the processor causes the processor to perform the error handling function by flushing the memory of the hardware media access controller of data.
25. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to handle interrupts and data transfer.
26. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to process a data packet including detecting a frame preamble, and checking a length of a frame.
27. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to evaluate a frame using frame check sequence data.
28. The system of claim 27, wherein the software comprises software that if executed by the processor causes the processor to evaluate the frame using the frame check sequence data by performing a polynomial division using a protocol defined check polynomial.
29. The system of claim 18, wherein the software comprises software that if executed by the processor causes the processor to perform filtering to detect whether an address of a packet is relevant to the computer.
30. The system of claim 18, wherein the memory comprises a memory of the computer.
31. The system of claim 18, wherein a size of the memory is based on a typical latency delay of the computer.
32. A system comprising:
- a computer including a processor, a DRAM memory, and a bus;
- an adapter including, a physical interface to couple to a network, and a hardware media access controller coupled to the physical interface and to the bus, the hardware media access controller including a memory to buffer data that is transferred between the physical interface and the computer, and the hardware media access controller including a register interface; and
- media access control software stored within the DRAM memory that if executed by the processor of the computer causes the processor to perform one or more media access control communications functions.
33. The system of claim 32, wherein the software comprises software that if executed by the processor causes the processor to perform one or more IEEE 802.3 functions.
34. The system of claim 32, wherein the software comprises software that if executed by the processor causes the processor to perform one or more network interface control functions.
35. The system of claim 32, wherein the software comprises software that if executed by the processor causes the processor to detect an error condition and perform an error handling function.
36. The system of claim 32, wherein the software comprises software that if executed by the processor causes the processor to process a data packet including detecting a frame preamble, and checking a length of a frame.
37. The system of claim 32, wherein the software comprises software that if executed by the processor causes the processor to evaluate a frame using frame check sequence data.
38. A memory storing media access control software that if executed by a processor of a computer causes the processor to:
- perform one or more media access control communications functions.
39. The memory of claim 38, wherein the software comprises software that if executed by the processor causes the processor to perform one or more IEEE 802.3 functions.
40. The memory of claim 38, wherein the software comprises software that if executed by the processor causes the processor to perform one or more network interface control functions.
41. The memory of claim 38, wherein the software comprises software that if executed by the processor causes the processor to detect an error condition and perform an error handling function.
42. The memory of claim 38, wherein the software comprises software that if executed by the processor causes the processor to process a data packet including detecting a frame preamble, and checking a length of a frame.
43. The memory of claim 38, wherein the software comprises software that if executed by the processor causes the processor to evaluate a frame using frame check sequence data.
44. A method comprising:
- installing a card in a computer, the card including a physical interface to a network and a hardware media access controller; and
- installing media access control software within a memory of the computer, the media access control software including software that if executed results in a processor of the computer performing one or more media access control communications functions.
45. The method of claim 44, wherein said installing the software comprises installing software that if executed results in the processor evaluating a frame using frame check sequence data.
Type: Application
Filed: Apr 6, 2006
Publication Date: Aug 17, 2006
Applicant:
Inventors: Michael Conley (Thousand Oaks, CA), Eric Henderson (Salt Lake City, UT)
Application Number: 11/399,628
International Classification: G06F 15/16 (20060101);