Rights of the Government
The invention described herein may be manufactured and used by or for the Government of the United States for all governmental purposes without the payment of any royalty.
Background of the Invention
The present invention relates generally to a network interface module and method of operation, and more particularly to an interface board and software for connecting a broad range of computer systems to a real time local area network.
It was decided that a local area network (LAN) should be used to solve problems associated with coupling a mainframe computer system to cockpits, etc in real-time pilot-in-the-loop aircraft simulation. The pilots participate in these simulations in cockpits that are located throughout the facility. Other equipment necessary to the simulation is also located at a considerable distance from the mainframe system. The mainframe system must not only run the simulation program, but must also calculate all the parameters to control these cockpits and equipment. The control parameters must then be output on more than one hundred analog and digital control lines. Information from the cockpits and equipment is also gathered by inputting many other analog and digital control lines.
Several problems with this method of operation can be seen immediately. The first is that the mainframe system is performing hundreds of input/output instructions in order to control cockpits and other equipment, instead of working on the simulation program. This means that as new equipment and more sophisticated cockpits are added, there is less memory and less computing power left in the mainframe system with which to accomplish the simulation program. Also, since the cockpits and other equipment are located at a considerable distance from the mainframe system, all analog lines can pick up a noticeable amount of electrical noise. Another problem occurs when new equipment or a cockpit is added to the simulation system. This is the adding of a hundred or more control lines that must be placed between the new item and the mainframe system. A special interface may be necessary for a new piece of equipment, if it is not directly compatible with the mainframe system.
To correct some of the problems mentioned above, it was decided to place small computer systems at every cockpit and at each piece of equipment. These "smart" interfaces would offload the computations and input/output operations from the mainframe system. This would leave the mainframe system free to do more work on the simulation programs themselves. However, the mainframe system must still have some method for communicating with these "smart" interfaces. It was decided that a digital, real time, standard Local Area Network (LAN) would be employed to handle communications. This in itself presented several problems. One was that not all of the "smart" interfaces would be identical systems and many of them had no "off the shelf" interface to a LAN. Also, the "off-the-shelf" interfaces that were available were usually not meant to be used as interfaces to a real-time LAN. Because of this, the software overhead used to invoke communications was often too slow to meet the real-time requirements.
It was desirable to have a network interface module that could be easily connected to any computer and not be dependent on any one system or one type of computer bus. It would also meet all standards for transmission and reception of frames of data, and would be able to transmit and receive these frames of data fast enough to meet the real-time requirements. This meant that the software to invoke communications with the interface module had to be the bare minimum necessary to get a block of data back and forth between the "smart" interface and the mainframe system.
United States patents of interest include U.S. Pat. No. 4,280,285 to Haas, which shows in FIG. 1 an interface circuit 72 for connecting an master controller 74 to a memory 70 and computer 68. The interface is used in conjunction with an aircraft simulator 50 having a cockpit 52. The signals pass through an instructor station 76 which as described in the patent, is capable of handling up to eight cockpits. Donahue et al in U.S. Pat. No. 4,144,550 show a system with a master interface 4 for connecting a master controller 2 to a passive area controller 6 and an active area controller 12. Daly et al in U.S. Pat. No. 4,071,887 is directed to a bidirectional interface for synchronous data interchange. The patented system allows data transfer between serial data channels and the parallel bidiredctional data bus of a microprocessor. U.S. Pat. No. 3,988,716 to Anderson is concerned with an interface logic circuit which permits the transfer of information between two computers which permits the transfer of information between two computers having asynchronous clocks. Munter in U.S. Pat. No. 4,154,985 discloses an interface circuity for coupling a data signal from one digital telephone facility, operating at one data rate, to another d1gital telephone facility operating at another data bit rate. The patented interface circuit includes storage and a frequency converter. Suhonick in U.S. Pat. No. 4,549,275 shows a graphics data handling system wherein a work station cooperates with a host computer which stores a list representation of complex three dimensional structure. Schwan et al in U.S. Pat. No. 4,604,682 disclose a buffer system for interfacing a data processor to a communications system using a buffer memory for storing input and output data. However, none of these references teach how to solve the problem of providing an interface circuit for matching a real time cockpit display graphics processor to a minicomputer.
Summary of the Invention
An object of the invention is to provide interface apparatus an method of operation to implement a real-time Local Area Network.
The invention relates to a interface module and associated software for connecting a broad range of computer systems to a transceiver of a real time local area network. It connects to a host computer system that needs only to use parallel data input/output ports in order to communicate with the module. Hardware on the interface module accomplishes transmitting data to and receiving data from the local area network, all these transfers of data being via a buffer memory. The interface module is capable of transmitting and receiving serial data at a rate of ten megabits per second, can store approximately 14 kilobytes of this data internally in the buffer memory, and can then transfer the data to or from a host computer system at a rate of 16 bits every 719 nanoseconds. A graphics processor is used to drive real-time graphics displays in the cockpit of a simulator and the module of this invention interfaces the graphics processor to a minicomputer.
The interface module includes communications means including a controller unit coupled via a serial interface chip to the transceiver for transmitting information to and receiving information from the local area network.
The buffer memory has bus means comprising an address bus and data bus for parallel input of addresses and parallel input and output of data. A controller interface unit provides for two-way parallel transfer of addresses and data between the controller and the bus means. A host interface unit provides for two-way parallel transfer of addresses and data via a host line between the host computer and the bus means. Memory read and write lines are connected from the controller and also from the host interface unit to read and write control terminals of the memory.
A bus control unit includes a bistable device having a controller state and a host state. Coupling from the bistable device to the controller interface unit, to the host interface unit and to the host computer indicates the current state of the bistable device. A connection from the controller to a hold input of the bus control unit is used to set the bistable device to the controller state. A hold-acknowledge gate with inputs from the hold input and the bistable device and an output to the controller provides a hold-acknowledge signal indicating that the controller has access to the bus. A connection from the host computer to a bus request input of the bus control means is used to set the bistable device to the host state.
The controller interface unit comprises a set of address latches coupled to the controller and a set of outputs coupled to the address bus, and data buffers coupled between the controller and the data bus for parallel transfer of data in either direction, the address latches having a strobe terminal coupled to the controller for a signal from the controller to latch an address from the controller, and the data buffers having a direction-control terminal coupled to the controller for a signal from the controller to determine the direction of transfer. When the bus control unit is in the controller state the controller using signals on the memory read and write lines may selectively transfer data into and out of the buffer memory.
The host interface unit includes a set of address counter/latches having inputs coupled to the host line and a set of outputs coupled to the address bus, host data buffers coupled between the said line and the data bus for parallel transfer of data in either direction, and a set of type/direction control lines includinq a peripheral-write-address line, a peripheral-write-data line and a peripheral-read-data line. The type/direction control lines are coupled to receive signals from the host computer for controlling the host interface unit. The host data buffers have a direction-control terminal coupled to one of the type/direction control lines to determine the direction of transfer.
A synchronization unit includes a data-acknowledge circuit having a data-synchronization-strobe input coupled to the host computer and an input connected to the peripheral-read-data line. The data-acknowledge circuit is responsive either to a given signal condition at the data-synchronization-strobe input or to a change to a active condition on the peripheral-read-data line to provide a predetermined delay and then generate an acknowledge pulse on a data-acknowledge line coupled to the host computer. With an active signal on the peripheral-write-address line an address may be parallel loaded from the host line into the address counter/latches. In response to the given signal condition at the data-synchronization-strobe input and an active signal on the peripheral-write-address line, the synchronization unit generates write-enable signal on a peripheral-write-enable line. The peripheral-read-data line and the peripheral-write-enable line are coupled via host signal buffers to the memory read and write lines. When the bus control unit is in the host state the address/counter latches are enabled to supply address signals via the address bus to the memory the host data buffers are enabled for effectively coupling the host line via the host data buffers and the data bus to the memory, and the host signal buffers are enabled so that the host computer using signals on the peripheral-write-data line and peripheral-read-data lines along with the given signal condition at the data-synchronization-strobe input may selectively transfer data into and out of the buffer memory. In response to each occurrence of the given signal condition at the data-synchronization-strobe input, the address counter/latches operate as a counter to advance the address to consecutive locations in the buffer memory.
Brief Description of the Drawing
FIG. 1 is a block diagram showing a network interface board connecting a host computer to a transceiver of a local area network:
FIGS. 2 and 3 together comprise a more detailed block diagram of the network interface board;
FIG. 4 is a functional block diagram of data/address synchronization circuitry for the host interface portion of the network interface board;
FIG. 5 is a functional block diagram of the system control circuit of the network interface board;
FIG. 6 is a functional block diagram of memory address counter/latches, for the host interface portion of the network interface board;
FIG. 7 is a functional block diagram of diagnostic hardware displays for the network interface board: and
FIG. 8 is a structure chart of the host software.
Detailed Description
Referring to FIG. 1, a module for interfacing a host computer 10 to a local area network transceiver 12 is shown as a network interface board, wlth NIB used both as a reference character and hereafter as a short designation. The NIB is described in a thesis titled "Design of a Network Interface Board For a Real-Time Local Are Network" submitted by Richard Paul Benken, and Placed during the month of April, 1986 in the library at Wright State University, Dayton, Ohio. A copy of the thesis is included in the file of the application as filed, and is hereby incorporated by reference.
The local area network (LAN) to which the NIB interfaces meets Ethernet standards, and is used as a real time network. Real-time in this instance means that there will be no more than eight frames of data transmitted once every twenty milliseconds. Each of these frames will contain 500 bytes or fewer. Each NIB in the network will be responsible for receiving all eight frames. The NIB was designed for specific requirements of a flight simulation system, but is intended to be a generic controller that will interface to almost any host and work under almost any conditions.
In the following description, an asterisk is used at the end of any lead or terminal designation to indicate an active signal condition at the low logic level. On the drawing, the active low condition is shown on terminal designations by overlining, and on lead designations with an asterisk.
The NIB is centered around a controller 20, which interfaces with the transceiver 12 via a serial interface 22. All transfer of data between the controller 20 and the host computer 10 is via a buffer memory 30. The memory 30 interfaces with the controller 20 via a controller interface 32, and with the host computer 10 via a host interface 34. A clock chip and a loopback control device are shown as a block 24. The NIB also includes a bus control unit 50 and a diagnostic display 70. Two-Way 16-bit busses AD and PDA are used for the transfer of both addresses and data between the controller 20 and the interface 32, and between the host computer 10 and the interface 34 respectively. The address information is latched and supplied to the buffer memory 30 from either interface 32 or 34 via a 13-bit bus PA. The data is buffered and supplied to or from the memory 30 via a 16-bit bus PD.
The NlB is based around an INTEL Corporation chip set, as shown in FIG. 2. These chips are a type 82586 LAN controller 20, a type 82501 Ethernet Serial Interface 22, and a type 82285 Clock Generator 210 in block 24. To give a better understanding of the system, these chips will be briefly described.
The controller 20 transmits and receives frames of data to and from the LAN It receives and stores frames in the buffer memory 30. Frames to be transmitted are stored in the memory 30 by the host 10 and are removed and transmitted by the controller 20. This memory 30 is also used for the host 10 to control and communicate with the controller 20. The communication between the host 10 and the controller 20 occurs through this shared memory 30 because there is no I/O port access to the controller 20. The serial interface unit 22 takes serial data from the controller 20 and prepares it for transmission onto or reception from the LAN. It is connected directly to the oontrolled 20 and requires only an Ethernet transoeiver 12 (a line driver) to transmit and receive data to and from the Ethernet coaxial line 13. The clock chip 210 provides a special waveform clock signal necessary for the controller 20.
The buffer memory 30 must be large enough to contain eight maximum size Ethernet frames in a received frame area, one maximum size Ethernet frame in a transmit area, and a control/command area. This memory must be fast enough to allow the controller 20 to communicate with it a full speed without the insertion of wait states. This allows a maximum amount of time left over for the host to communicate with the buffer memory.
The NIB has three interfaces, (1) the controller 20 with the LAN transceiver 12, (2) the controller 20 with the buffer memory 30, and (3) the buffer memory 30 with the host computer 10.
For the first interface, the requirement is that the NIB needs only a cable to interface with an Ethernet transceiver. (The transceiver 12 is a line driver that buffers the data to and from the LAN (coaxial line).) Any necessary circuitry or components other than the Ethernet transceiver must be contained in the NIB.
The second interface, between the controller 20 and the memory 30, must allow the controller 20 to communicate with the memory 3o at its maximum rate without any insertion of wait states. This insures that a maximum amount of time is left over for the host 10 to communicate with the memory 30.
The third interface is between the host 10 and the memor 30. It should be noted once again that the host uses parallel data ports to communicate with the buffer memory. The interface should consist of 16 bi-directional data/address lines and no more than eight additional control lines. This keeps the number of data ports that the host will need to a minimum. The interface must also allow for handshaking during data and address transfers between the host and the NIB. This handshaking should inform the host or the NIB when new data or addresses are available on the data/address lines or when they have been removed from these lines and the next transfer can be started. Besides this handshaking, the host must have a means of gaining control of the memory 30 since both the host and the controller 20 use the memory. The controller 20 must always have top priority so it does not lose any frames of data being received from the network. When the host 10 tries to gain control, it must always know for certain whether or not transfers took place or if the controller 20 is blocking it off of the NIB system internal bus. Since the data/address lines are multiplexed, the NIB must be able to latch the address when it is supplied by the host.
Software is required to manipulate commands and data structures in the buffer memory 30 that the controller 20 uses. This software must accomplish three activities. The first is that of performing diagnostices that insure that the NIB is working properly. The second is that the host 10 will be able to transmit frames according to Ethernet standards onto the LAN. These frames should be able to be of varying sizes and be able to be transmitted to any or all NIBs on the LAN. Lastly, the controller 20 should be able to continuously receive frames without ever having to lose any. All frames, whether received with errors or without should be reported to the host. All software should be a bare minimum to get frames of data from one NIB of the LAN to another.
All of these requirements must be met for the NIB to be considered fully operational.
Hardware Design
As shown in FIG. 2, the controller 20 is a type 82856 chip, designated as a Local Communications Controller, which is used to manage all frames that are transmitted to or received from the Ethernet Local Area Network (LAN). Once commanded to start by the host 10, the controller will automatically receive and store in the buffer memory 30 any frame from the LAN which is addressed to this particular NIB. All other frames will be ignored. While receiving frames, the controller automatically fetches buffers from the memory 30, links them together and notifies the host that a frame or frames have been received. Any frame received will be inspected for errors, stored in the memory 30 regardless of its condition and marked as either a good or bad frame. Transmission of a frame to any other NIB system on the LAN will also be possible. The controller 20 will remove data from the memory 30 and transmit it to any other NIB system on the LAN, once commanded to do so by the host. It will also perform diagnostics on all parallel and serial channels in itself and in the serial interface 22. Checks on the integrity of the Ethernet transmission cable can also be performed. The controller 20 removes most of the time consuming activities of running a network from the host 10. The chip 20 has terminals MN/MX* and ARDY connected via resistors to +5 volts.
It should be noted that the controller 20 communicates with the host 10 onIy through the buffer memory 30 and control lines. (No direct communication with the controller 20 is possible.) All commands and data to be transmitted are stored in the memory 30 by the host and retrieved from there by the controller 20. All received data is stored in the buffer memory 30 by the controller 20 and removed by the host 10.
The unit 22 is the Ethernet Serial Interface chip type 82501. This chip along with the Ethernet transceiver (which is a line driver for the Ethernet transmission cable) is used to create the interface between the NIB and the Ethernet LAN. The chip 22 converts the controller 20 single ended inputs and outputs to differential lines. It also does the Manchester encoding and decoding which is the Ethernet standard. Lastly, this chip provides the receive and transmit clocks for the controller 20. The chips 20 and 22 are connected via seven leads 16 between terminals having the same designation on each chip, e.g. CDT*, RXD, CRS*, RXC*, TXD, RTS*, & TXC*. On the controller chip 20, a terminal C15* is connected to ground. The serial interface chip 22 has terminals X1 and X2 connected to a crystal for frequency control and via capacitors to ground. A capacitor is connected to terminals C1 and C2. Three twisted pairs forming a cable 14 connect the serial interface chip 22 to the Ethernet transceiver 12. One pair and a resistor is connected across terminals CLSN and CLSN*, one pair and a resistor is connected across terminals RCV and RCV*, and one pair is connected to terminals TRMT and TRMT* with each lead having a resistor to ground.
A third chip 210 of the Intel set is the type 82285 Clock Generator for I/O co-processors. This chip, shown as part of the block 24 in FIG. 2, provides the special system clock for the controller chip 20. Its only other job is to synchronize the reset signal for the chip 20. The chip 210 has a terminal CSYNC connected via a resistor to +5 volts a terminal F/C* to ground, and terminals X1 and X2 connected to a crystal for frequency control. Terminals PCLK & PCLKIN are connected together and to the CLK terminal of the controller chip 20. The RESET terminals of the clock chip 210 and the controller chip 20 are connected together.
Buffer Memory
The buffer memory is shown in FIG. 3 as comprising a set of chips 301 for the memory storage, a chip select section 302. and an input OR gate 303. The requirements for amount of storage and speed of operation are presented in my thesis. The memory needs to be 16 bits wide to interface with the controller chip 20. The maximum size needed is 14,262 bytes. The memory chips 301 comprise Mostek MK4118-2K.times.8 static RAM chips used in pairs to obtain the 16-bit width with a maximum of seven pairs. These chips have address input terminals, 16 data terminals, a terminal WE* for write enable, a terminal OE* for output enable, and a terminal CE* for chip select. To select one of the seven pairs of memory chips, three additional address lines need to be decoded by a chip select device 302. This decoding is accomplished by a type 74KS138 three-to-eight line decoder. This chip can also be used to deselect all memory chips when they are not being used. The chip has terminals (not shown) A, B and C for the address input. Eight output terminals Y0-Y7, of which seven are used to supply the chip select signals to the memory pairs, a terminal G1 connected to the output of a type 74LS32 OR gate 303, and terminals G2A and G2B connected to ground.
It should be noted that every user's memory requirements will not be the same, and the memory size can be from 2048 bytes up to 16,384 bytes, with chips provided in pairs.
Controller Interface
As shown in FIG. 3, the controller interface 32, between the controller 20 and the memory 30 comprises address latches 310 and data buffers 312. The address latches comprise two INTEL type 8282 tri-state latches. These chips latch the address, and can be disabled when not in use. The inputs DI are from the bus AD, and the outputs DO are to the bus pA, using eight bits on one chip and five bits on the other to provide the 13-bit address. The data buffers 312 comprise two chips INTEL type 8286 bi-directional tri-state buffers, each having their eight terminals A)-A7 (shown as A for the 16 terminals) connected to the bus AD and eight terminals B0-B7 (shown as B for the 16 terminals) connected to the bus PD, to provide the total of 16 bits. From the controller 20, control terminals ALE, DT/R* and DEN* are connected via leads shown as a line 44 to the controller interface 32, with line ALE connected to the strobe terminals STB of the address latches, and lines DT/R* and DEN* connected respectively to the terminals T and OE* of the data buffers 312. A control line BUSAV extends from the bus control unit 50 to the terminal OE* of the address latches 310. Memory write and read terminals WR* and RD* are connected via leads MWE* and MRD* of line 46 to the WE* and OE* terminals of the memory 30.
The controller 20 and its buffers for all address, data and control lines are to be disabled when not in use. The lines must only be enabled only when the controller 20 has control of the NIB system bus. The read and write control lines MWE* and MRD* coming directly from the controller 20 to the memory 30 are enabled internally to the controller 20 and need no further attention; however, the data and address buffers must be enabled by some external source. The address buffers are enabled by a line BUSAV from the bus controller 50 that is active whenever the controller 20 has taken control of the memory 30 The data buffers 312 are enabled via the line DEN* of the controller 20, which is active only when the controller puts data or expects data to be on the data lines AD0-AD15. These data buffers 310 are bi-directional and also need to be controlled directionally. This is accomplished by the DT/R* line of the controller 20, which selects the direction based on whether the controller 20 is reading or writing to memory.
Host Interface
The host interface 34 allows the host computer 10 to store commands and data in the memory 30 and also to retrieve data from the memory. The host 10 can access consecutive memory locations in the memory, without having to write a new address before every transfer This is accomplished by using address latches that act also as counters and automatically increment the memory address after each transfer. There are other control lines and signals, which are used to coordinate these transfers and help to communicate with the controller 20.
As shown in FIG. 3, the host interface 34, between the controller 20 and the host computer 10 comprises an address counter and latches unit 600, data buffers 322, a synchronization circuit 400. and a decoder 324. The address counter and latches unit is shown in FIG. 6, with its synchronization circuit 400 shown in FIG. 4. The data buffers 312 comprise two INTEL chips ty 8286 bi-directional tri-state buffers, each having their eight terminals A0-A7 (shown as A for the 16 terminals) connected to the lines of the bus pDA, and eight terminals B0-B7 (shown as B for the 16 terminals) connected to the bus PD, to provide the total of 16 bits.
The decoder block 324 provides information type/direction control lines for the host interface 34. These allow the host 10 to inform the NIB as to the type and direction of the information being transferred. The four cases possible are that the host is reading data from the memory 30, writing data to the memory, writing a memory address, or not using the memor 30 at all. These four cases are encoded onto two control lines R/W* (read/not write) and D/A* (data/not address) as set by the host. The block 324 comprises a type 74LS138 decoder chip. The two control lines R/W* and D/A* are connected to inputs A and B, with input C grounded. and outputs Y0-Y3 are used for the decoded signals on lines PWA*, PWD*, NOP and PRD* respectively (outputs Y4-Y7 unused). The terminals G1 and G2 are connected respectively to +5 volts via a resistor and to ground. The line PWA* for a write address signal is connected to the synchronization circuit 400, the address counter unit 600, and to the diagnostic display. The line PWD* for a write data signal is connected to the synchronization circuit 400 via a buffer in the address counter unit 600 to line MRD* and to the diagnostic display. The line NOP is connected to the OR gate 303 for the memory 30. The line PRD* for a write data signal is connected t the synchronization circuit 400 via a buffer in the address counter unit 600 to line MRD* and to the diagnostic display.
Synchronization of Data/Address Transfers
This section describes the handshaking circuits and operation for the synchronization of data and memory address transfers. The control lines to the host 10 include DSSTR* and DACK* (along with two others BUSR* and BUSAV*, described beloW in the "System Bus Control" section) which allow the host 10 and the NIB to know when one transfer is complete and the next is ready to start. The pulses used for this synchronization are used for generating many control signals used internally in the NIB. These signals control the entire data or address transfer process. The design is shown in FIG. 4.
The circuit includes six type 74LS32 OR gates 401-406, four type 74LS08 AND gates 411-414, a set of four type 7404 inverters 420 in tandem, two types 7505 open collector inverters 431-432, a type 74164 shift register 440, and two type 74121 "one shot" devices 451-452, along with bias and timing resistors and capacitors.
In order to synchronize a transfer when the host 10 is writing data, the host must first set the signals on the information type/direction control lines R/W* and D/A* to the write data mode. which will produce an active signal condition on line PWD*. Next, the host places tha data to be written on the bus PDA (external data/address lines) and asserts an active signal on line DSSTR*. When the data has been written into the buffer memory at the present memor address, and the address has been incremented to the next consecutive memory address, an active signal is asserted on the line DACK*. This informs the host that this transfer is complete and the next transfer can start immediately. This process must be used in conjunction with the processes for the host to gain control of the memory bus PA and PD in order to be certain the transter has occurred. The process can be repeated as long as the host wishes to write to consecutive memory locations.
The design to accomplish a write data transfer first involves producing a write pulse an a lead 461 in response to a signal on line DSSTR*. This can be done by one of two methods, depending an how a jumper J1 is connected. The first method has the connection of the jumper J1 directly from line DSSTR* to lead 461, in which case the host must provide an assertion pulse of at least 15o nanoseconds on line DSSTR*. The second method includes the "one shot" devices 451 and 452 in the circuit by connecting the jumper J1 from the output of AND gate 414 to lead 461, in which case the host need only invert the logic level on the line DSSTR* and the two devices 451 and 452 will provide a 150-nanosecond pulse. This allows more flexibility for the host in providing this control signal. Both of the devices 451 and 452 have external timing resistors and capacitors. Device 451 has input A1 connected to line DSSTR* and inputs A2 and B connected via a resistor to +5 volts, so that a negative going signal on line DSSTR* triggers generation of a pulse. Device 452 has input B connected to line DSSTR* and inputs Al and A2 connected to ground, so that a positive going signal on line DSSTR* triggers generation of a pulse. The Q* outputs of the devices 451 and 452 are connected to inputs of the AND gate 414, whose output is connected via the jumper J1 to lead 461 for the second method.
Control signals on line DACK* and other lines need to be created at the proper time for completion of a write transfer. The signal on line DACK* must never come before the entire transfer process is complete, which with worst case delays may require 429 nanoseconds. The lead 461 is coupled via AND gate 413 to the serial input of the shift register 440, which is clocked by the system clock at 8 MHz on lead PCLK. The QF output of the shift register is connected to line DACK*, with the write pulse from lead 461 delayed by at least 515 and not more than 719 nanoseconds. During this time other control signals must be generated, including signals on lines PWE* for peripheral Write Enable, and SYNC for incrementing the memory address to the next successive memory location.
A write enable pulse is created by shortening the pulse on line DSSTR* to no less than 60 and no more than 130 nanoseconds. This shortening is done so that the write transfer time is not dependent on the length of the pulse on line DSSTR* itself. The pulse shortening is accomplished by using the open collector inverter 432 with a resistor-capacitor network on its output, which is connected to one input of OR gate 404. The other input of gate 404 is directly from lead 461. The effect is that when the signal on lead 461 goes low at the beginning of a write pulse, the direct connection to gate 404 causes its output to go low. and the signal via the inverter 431 at the end of a delay produced by the R-C network causes the signal to return to the high state, thereby creating the write enable pulse on lead 462 at the output of gate 404. The lead 462 is connected as a input of OR gate 405, which also has an input from write data control line PWD*, so that when the signal o lead PWD* is low the write enable pulse is coupled to lead PWE* at the outPut of gate 405. As shown in FIG. 6, lead PWE* is connected to an input of a tri-state buffer, which is enabled whenever the host has control of the memory 30 The output from this buffer is coupled via lead MWE* to the write enable input of the memory 30 to start the write transfer. Lead 462 is also coupled via the four inverters 420 in tandem. OR gate 402, and AND gates 412 and 411 to the lead SYNC, to increment the counter/latches of circuit 600 to the next consecutive memory location. The four inverters insure that the data has been written into the memory 30 before the address begins to change. This completes a write transfer and the host will see a signal asserted on line DACK* after all this has been accomplished.
The next type of transfer that needs to be synchronized is the host writing a memory address to the NIB. For this transfer to occur, the host must first set the information type/direction control lines (at decoder 324 in FIG. 3) to the write address mode, which asserts a signal on lead PWA* (peripheral Write Address). Next, the host performs an arithmetic shift right operation on the address to be written to the counter/latches (as explained in a later section). The host then places this value on the 16-bit control line PDA (external data/address line) and a pulse on line DSSTR*. When the address has been loaded in the address/counter latches of unit 600, a pulse appears on line DACK* to acknowledge that the transfer has occurred. This process is identical to the write data transfer explained above.
The design in FIG. 4 to accomplish a write address transfer is identical to that for a write data transfer with two exceptions. The write enable pulse on lead 462 is blocked at gates 405 and 402 because the signal on the control line PWD* is at the inactive high state. Instead the signal on line PWA* is low, which enables OR gate 403 to pass the pulse from lead 462 to a Peripheral Write Address Control line PWAC*, and latch the new address in unit 600. The pulse is formed as described above for a write data transfer.
The synchronization of a read data transfer is much different from the write transfers. The host begins by setting the information type/direction control lines at decoder 324 in FIG. 3 to the read data mode, providing an active low signal on the Peripheral Read Data line PRD*. Now the host waits for the pulse on line DACK* to appear, signifying that the first word of data (at the memory location of the present address in the address unit 600) is valid on the 16-bit line PDA (external data/address line). The host must assert a pulse on line DSSTR* to read a second word of data at the next consecutive memory address. The next word of data is valid when a pulse appears on line DACK* again. This process must be used in conjunction with the processes for the host to gain control of the memory 30 in order to be certain that the transfer has occurred. These transfers can be continued as long as the host wishes to read consecutive memory locations.
The design in FIG. 4 to accomplish this read data transfer is partially the same as used in write data transfers in that a pulse from gate 413 is delayed by the shift register 440 to produce an acknowledge pulse on line DACK*. There are also many differences, the first of which occurs on the first read data transfer after the host sets the control lines to provide an active low signal on line PRD*. Usually the pulse on line DACK* is produced by delaying the pulse resulting from assertion of a signal on line DSSTR* but in this case no signal on line DSSTR* has been sent by the host. So to create a pulse on line DACK* in this instance, the signal on line PRD*, which goes low when the read data mode is initiated, is used to create a 150-nanosecond pulse on a line PRDD* at the output of OR gate 406, using a circuit with an inverter 432 and an R-C circuit like that used with gate 404. This pulse on line PRDD* is supplied via gate 413 to the shift register 440. After this first signal on line DACK* is received by the host, it can then read the word of data on line PDA. If the host wishes to read data in the next consecutive memory location, it needs only to place a signal on line DSSTR* and wait for an acknowledger pulse on line DACK*. At this point, the new word of data will be valid on line PDA. This can be continued as long as the host wishes to read data from consecutive locations in memory.
Another difference is that the pulse generated on lead 462 is supplied via gates 401 and 411 to the address clock pulse lead ACLK*, rather than being delayed via the inverters 420. The last difference is that the enable signal to the memory is from line PRD* via a buffer in unit 600 (FIG. 6) and line MRD* to the output enable input of the memory 30.
By using these methods of synchronization, the host will be able to successfully communicate with the NIB whenever it obtains control of the NIB system bus, as described in the following section.
Bus Control
The bus control circuit 50 provides two methods by which the host 10 can gain control of the NIB system bus P. The host must fight for control of this bus with the controller 20 that also uses it to communicate with the memory 30; and must gain control before starting any read or write data transfers. It should be noted that memory address transfers can be made without having control of the bus. If either of the two methods are followed, the controller 20 will always be given high priority and will never lose any data due to the fact that it cannot obtain control of the bus.
The circuit 50 is shown in FIG. 5. It comprises three type 74LS08 AND gates 510, 512 and 514; two type 74LS32 OR gates 516 and 518; two type 7404 inverters 520 and 522; and two type 7400 NAND gates 532 and 534. The NAND gates 532 and 534 have the output of each gate connected to an input of the other to form a set/reset latch for low logic levels. The "set" input is supplied via OR gate 518 having its output connected to an input S of gate 534. The "reset" input is supplied via AND gates 512 and 514 having their outputs connected to inputs of OR gate 516, whose output is coupled via the inverter 522 to an input R of gate 532. Note that the inputs of the latch at inputs S and R are both normally high, with the latch being set when the signal at S goes low, and reset when the signal at R goes low. When the latch is set with the signal on line BUSAV* low and that on line BUSAV high, then the host 10 has control of the bus. When the latch is reset with the signal on line BUSAV low and that on line BUSAV* high, then the controller 20 has control of the bus.
There are five signal lines that are used to implement the logic shown in FIG. 5 which need to be defined. The first is line BUSR* (Bus Request), connected to inputs of gates 514 and 518, which is asserted by the host 10 to signify that it desires control of the system bus P. A mate of this line is line BUSAV* (Bus Available), the output of gate 532, which tells the host that it has control of the bus. A line BUSAV at the output of gate 534 is the complement of line BUSAV* from the latch. The next is line DACK* (see the preceding section on Synchronization of Data/Address Transfers), which is optionally connected via a jumper J2 and the inverter 520 to an input of gate 512, to signal that the host's transfer is complete. The jumper J2 may connect the input of the inverter 520 to ground instead of to line DACK*. The last two lines are connected to the controller 20 and are internal to the NIB. One is line HLD (Hold), connected to inputs of gates 510, 512, 514 and 518. which means that the controller 20 requires the system bus. The other is line HLDA (Hold Acknowledge), at the output of gate 510, for a signal that the controller does indeed control the system bus. Gate 510 has its inputs connected to lines HLD and BUSAV*. The circuit in FIG. 5 implements the logic table below.
Line 1 of the table shows that if the host 10 is not requesting the bus through a signal on line BUSR*, then the controller 20 will get the bus whenever it asserts a signal on line HLD. Line 2 shows that if the controller 20 isn't requesting the bus through a signal on line HLD, then the host will get control of the bus whenever it asserts a signal on line BUSR*. Line 3 illustrates the case of the controller currently using the bus and the host requesting it, in which case the host does not receive control of the bus while the controller is using it. Line 4 shows the case of the host having control of the bus and being in the middle of a transfer (i.e., a signal on line DACK* still unasserted), in which case the controller does not get control immediately, but must wait until the end of the transfer as is illustrated by line 5 of the table. Line 5 is the case of the host and the controller requesting control of the bus, but the host is either at the end of a transfer (i.e. a signal on line DACK* is asserted) or the jumper J2 has been tied to ground. In either case, the controller receives control of the bus immediately.
The first method of bus control for the host 10 to gain control of the bus has the jumper J2 connected to the line DACK*. This method imposes many transfer timing constraints on the host. It takes advantage of the fact that the controller 20 contains an internal 16-byte queue, and uses the time during which the controller is either not using the memory 30, or when it is working strictly with its queue, for the host to be transferring data in and out of the memory 30. The host first asserts a signal on line BUSR* and then waits for a signal on line BUSAV*. Whenever both lines BUSR* AND BUSAV* are low, the host must transfer data at the rate one transfer every three microseconds. If this rate cannot be maintained, the host must unassert the signal on line BUSR* or risk having the controller 20 losing frames of received data. As long as this rate is maintained, the controller 20 can, without losing data, take control of the NIB system. During the assertion of a low signal on line DACK*, as shown on lines four and five of the table. Before continuing with a transfer, the host 10 must check for a low signal on line BUSAV*, which is done on the tailing edge of the signal on line DACK*. When the host is completely finished with all transfers, the signal on line BUSR* must be unasserted within three microseconds.
The second method of bus control for the host 10 to gain control of the bus has the jumper J2 connected to ground. With this method, the host does not try to insure that as each individual transfer is accomplished it is accepted by the memory 30, but checks to see if a number of the transfers were accepted or not. If the transfers were not accepted, the host knows that the entire block of transfers must be completed again. With the jumper J2 grounded, the controller 20 can take control of the bus at any time, and line four of the table is not a valid case. In using this second method, the host first asserts a low signal on line BUSR* for at least 50 nanoseconds, and unasserts it before doing anything else. The host then checks line BUSAV*, and if the signal is high it continues these first two steps until it goes low. As soon as the signal goes low, the host 10 can transfer a block of data using only the control lines DSSTR* AND DACK*, and does not need to check line BUSAV* in the middle of making a block of transfers. At the end of the block of transfers, the host will inspect line BUSAV*. If the signal is low then all transfers are complete and correct, but if it is high then all transfers must be considered incorrect, because the controller 20 has gained control of the bus sometime during the transfer. The S-R latch of the bus con-rol circuit 50 holds the signal on line BUSAV* high. Since there is no way to know which memory locations were affected, the entire block of transfers, including writing the starting address, must be repeated as soon as the signal on line BUSAV* goes low.
By using either of the two methods of bus control, the host will be able to successfully communicate with the memory 30. The user should choose a method which takes into consideration all aspects of the particular host and LAN being used.
External Data/Address Lines
As shown in FIG. 3, the 16-bit external address/data line PDA is connected from the host computer 10 to the data buffers 322, and to the address counter and latches unit 600. The data buffers 322 comprise two type 8286 bi-directional tri-state buffers. These chips are disabled by a high signal on line BUSAV* at terminal OE* whenever the host does not control the memory 30. Their direction is controlled via lead PRD*, with a low signal while the host is reading and a high signal while writing.
Buffer Memory Address Counter/Latches
The memory address/counter unit 600, shown in FIG. 6, comprises four type 74S169 counter/latch devices 611-614, and three type 8T95 tri-state buffers 621-623. The devices 611-614 are used to latch a memory address and to increment that address to the next consecutive memory location at the completion of each transfer. The sixteen leads PDAO-PDA15 of line PDA are connected in groups of four to the inputs A-D of these devices. The high-speed version is used to achieve the required minimum rate of one transfer every 800 nanoseconds. Line PWA* is connected to the input LD of each of the devices 611-614 for parallel loading of an address.
The latches are connected to provide an auto-incrementing counter, using a series of high-speed OR and AND gates to cascade the chips together. These gates are necessary in order for the counter/latches to pass the Ripple Carry Out (RCO) between them and also allow all of them to be loaded in parallel with an address. There are three type 74LS32 OR gates 631-633, and three type 74LS08 AND gates 641-643. A type 7400 NAND gate 630 is used as an inverter with an input from lead PWA* and an output connected to inputs of each of the three OR gates 631-633. Lead PWAC* is connected to an input of each of the three AND gates 641-643. The OR gate 631 has an input from terminal RCO of device 611 and an output to an input of the AND gate 641, whose output is connected to the input CK of device 612. In like manner, the gates 632 and 642 are connected between terminal RCO of device 612 and the terminal CK of device 613, and gates 633 and 643 are connected between these terminals of devices 613 and 614.
The outputs Q.sub.A -Q.sub.D of the three counter/latch chips 611-613 are connected the inputs I1-I6 of the two buffer chips 621 and 622, and the output Q.sub.A of the chip 614 is connected to the input I1 of buffer chip 623, for the thirteen bits of an address. The ouputs Y1-Y6 of each of the two buffers 621 and 622, and the output Y1 of buffer 623 are connected to the address bus PA. Whenever the host has control of the memory 30, the buffers are enabled by a low signal on line BUSAV*, which is connected to the terminal DIS1,2 of each of the buffers 621-623.
The auto-incrementing of the address is accomplished by supplying a pulse on lead ACLK from the synchronization circuit 400 to the clock input CK of the first counter/latch 611, causing the counter comprising devices 611-614 to be incremented by one. The fact that the counter is incremented only by one creates a problem, however. Since this buffer memory is 16 bits wide, the memory address must be incremented by two because each transfer involves two bytes. In order to take care of this problem, the host must do one arithmetic shift right (putting a zero in the most significant bit) to the memory address before it is loaded into the address counter/latches. Now, when the counter/latches are auto-incremented by one it has the effect of incrementing the memory address by two. The least significant bit is not used to address the memory 30. This conversion of shifting right an address before writing it to the counter/latches must be accomplished for every address.
Using this method of writing addresses leaves two open address lines PDA14 and PDA15 on the most significant counter/latch chip 614, which are used as internal control lines. The outputs Q.sub.C and Q.sub.D of the chip 614 are connected directly to leads PA15 and PA16 without buffering. The inputs I2 and I3 of the buffer 623 are used for the leads PWE* and PRD*, with the outputs Y2 and Y3 connected to leads MWE* and MRD*.
Since the address lines PDA14 and PDA15 are used for special purposes, the highest address that is used for the memory 30 is 3FFEH (the H signifies a hexadecimal number). No higher address should be written to the counter/latches 611-614 unless using the special functions. Note that this address in binary form is 11 1111 1111 111x, which after shifting right appears on leads PDA12-PDAO of the line PDA, and lines PA13-PA1 of the bus PA, with the x indicating a lead PAO that is not needed.
Channel Attention Control Line
The line PA16 in FIG. 6 is the Channel Attention control line, which as shown in FlG. 2, is connected to terminal CA of the controller chip 20. This line is pulsed by the host to signal the controller that it has placed commands or data in the memory 30. The controller 20 responds by inspecting the memory and accomplishing any commands which the host has placed there. This is the only method for the host to directly affect the controller. A pulse on line PA16 is sent using the unused address line PDA15 to the counter/latch 614. It is asserted by writing 1000H as an address (which after shifting right is 1000 0000 0000 0000 on line PDA). Immediately after writing this address, some other address between 0000 and 3FFEH must be written to the counter/latches 611-614. This will pulse the Channel Attention control line PA16.
Loopback Control Line
The line PA15 in FIG. 6 is the Loopback control line, which as shown in FIG. 2, is connected to the clock terminal CK of a type 74109 J-K flip-flop 220 in block 24. The Q* output of the flip-flop is connected to terminal LPBCK* of the serial interface chip 22. Line PA15 is used to put the serial interface 22 into its diagnostic loopback mode. In this mode the interface chip 22 immediately echoes back an frame of data transmitted to it by the controller 20. This allows the host 10 to insure that the serial interface 22 is operating properly. In order to assert the loopback line, the address 8000H (which after shifting right is 0100 0000 0000 0000 on line PDA), is written to the counter/latches 611-614 followed by writing some other address between 0000 and 3FFEH. To unassert the line, the same procedure is followed a second time. The loopback is automatically initialized to the non-loopback mode by reset signal to the CLR input of the flip flop 220. The flip-flop is connected in its toggle mode. The first time that the address 8000H is written and removed on line PDA, the flip-flop 220 will toggle to the loopback mode. If this address is written and removed a second time, the flip-flop will toggle to the non-loopback mode. This toggling of the flip-flop can continue indefinitely.
Interrupt Control Line
As shown in FIGS. 1 and 2, a terminal INT of the controller chip 20 is coupled via a type 7400 NAND gate 21 used as an inverter, and via a line INT* to the host computer 10. This line is the means by which the controller 20 can signal the host 10 that it requires the host's attention. The controller asserts a low signal on line INT* upon command completion, reception of frames and during initialization. The host clears it by writing the proper data in the memory 30 and pulsing the Channel Attention control line PA16.
Reset Control Line
As shown in FIGS. 1 and 2, a line RESET* is connected from the host 10 to a type 74LS OR gate 201 used as a buffer in the block 24, and thence to input RES* of the clock chip 210, and also to the input CLR of the flip flop 220. Its first purpose is to bring the controller 20 to a predetermined state so that it can be initialized. After the host 10 pulses the line RESET* low for at least 650 nanoseconds, the controller will internally ready itself for initialization. Then the host must write the proper initialization data into the memory 30, and then pulse the Channel Attention control line PA16. The second purpose of the reset control line is to set the serial interface 22 to its non-loopback mode by clearing the flip-flop 220. Note that the clock chip 210 is the clock generator for the controller 20, but it also synchronizes the reset pulse and applies it to the input terminal RESET of the controller 20.
Diagnostic Hardware
The diagnostic display 70 shown in FIG. 7 is necessary for the user to insure proper operation of the host interface 34. This hardware is used no real-time and must be visually inspected by the user. In includes a hexadecimal display 710 connected via the peripheral address display line PAD to the outputs of the counter/latches 611-614, and LED's (light-emitting diodes) 711-715 coupled to selected control lines. The address display is used by writing a memory address to the counter/latches 611-614 and insuring that it was properly latched. The user can then pulse line DSSTR* and insure that the address is being properly incremented. The LED's 711-715 all have their cathodes connected via resistors to ground. The LED's 711, 712 and 713 have their anodes connected via resistors to +5 volts, and also via type 7405 inverters 721, 722 and 723 respectively to lines PWA*. PWD and PRD*. The LED 714 is conneced via a Type 74LS08 AND connected used as a buffer to the Channel Attention control line PA16, and the LED 715 is connected to the loopback line LPBCK. The LED' s will light whenever signals are asserted on the corresponding control lines. The user should, on a non real-time basis, assert each line one by one and visually inspect the LED for proper operation. If the user couples this inspection along with software diagnostics, any problem with the system can be readily identified.
Software Design
This section will describe the design of the software that the host will use to control the NIB. This software will implement a real-time Ethernet LAN along with diagnostics to check the entire system.
Since the software is based upon the INTEL 82586, a description of how it works will first be given. Following this description will be a complete explanation of the software necessary to control it.
Controller Operations
This section will give a description of the manner in which the 82586 (controller 20) operates. Since this describes the inner workings of a patented INTEL chip, this information must come directly from the INTEL 82586 Reference Manual, rewritten to contain only information pertinent to this project, with permission from the INTEL Corporation.
The 82586 controls all communication to and from the Ethernet LAN. It is controlled by the host using the NIB buffer memory to communicate with it. The 82586 is internally broken into two independent controllers; the command unit and the receive unit. The command unit accomplishes commands that the host places in the buffer memory. It also transmits all data onto the Ethernet LAN. The receive unit processes and stores all incoming frames of data from the Ethernet LAN that are addressed to this particular NIB. It insures that only frames addressed to this NIB are stored in the buffer memory. For the host and the 82586 to communicate through the buffer memory, this memory is broken into data structures. These data structures allow the host and the 82586 to keep straight what areas are used for control and transmit data, and what areas are used for received data. These data structures can be seen in FIG. 17. An explanation of these and how the host and 82586 manipulate them follows.
System Control Block (Scb)
The system control block (SCB) is a portion of memory that the 82586 and the host share in order to communicate. The host can place commands here and then assert the channel attention control line. This will signal the 82586 to inspect the system control block and retrieve all the given commands. These commands control the operation of the command unit, the receive unit and acknowledge interrupts from the 82586. The control of the command unit and receive unit are merely a matter of telling them to start. Once started, the command unit fetches commands from the command block list (CBL) and does all the commands in the list one at a time until the end of the list is found. The receive unit, when started, will receive frames of data and store them in the receive frame area until it runs out of buffers to store them in. The 82586 will set its "interrupt" (INT*) line after accomplishing all commands in the command block list or after receiving a frame.
Command Unit Operation
Control of the 82586, except for reception of frames, is accomplished through the command unit. The system control block (SCB) contains the address of the command block list (CBL). This is a linked list of command blocks (CB) that the host wants the 82586 to accomplish. The 82586 will execute these commands one at a time until it finds the command block marked as the end of the list. When the 82586 finishes a particular command block, it will mark it as completed and also as to whether it was completed successfully or not. The 82586 will interrupt the host when the command block list is completed. There are a variety of commands that can be accomplished by the 82586, including transmission of buffers.
Action Commands
These are commands that can be linked together in the command block list (CBL):
1. Individual Address Set Up
This command allows this 82586 to be given a specific address so that another 82586 can communicate specifically with this one. This address will also be inserted into outgoing data frames by this 82586 so that others will know where the frame originated.
2. Configure
This command is used to change the operating parameters that the 82586 will work with. The chip defaults to Ethernet standards. This command must be used to implement diagnostics using internal or external loopback. Loopback allows frames to be immediately sent back to the 82586 after being transmitted.
3. Multicast Address Set Up
This command gives the 82586 an address that will allow it to accept a frame that is sent out from another 82586 with a multicast address as its destination. A multicast address allows several NIB's to receive the same frame of data. This address will not cancel the individual address. Also, broadcast addresses are still possible. These allow a frame of data to be sent to all NIB's on the network.
4. Transmit
This command allows the transmission of a frame of data to any other 82586 whose address is known. The command consists of the destination address, the type of data that this frame contains and a pointer to the first transmit buffer descriptor (TBD). This transmit buffer descriptor is associated with one transmit data buffer (TDB). The transmit data buffer will be fetched and transmitted by the 82586 to form a frame. This frame along with address and type information is transmitted onto the LAN.
5. Time Domain Reflectometer (TDR)
This command performs a test of the Ethernet cable itself, by transmitting a frame and examining the response. This command will respond with: no problem, transceiver problem (frame never made it past the Ethernet transceiver) open found on the cable or short found on the cable.
6. Diagnose Command
This command tests all internal counters and timers of the 82586. It will respond with a pass/fail message.
Receive Unit Operation
Reception of frames is accomplished through a receive unit which is independent of the command unit. The system control block (SCB) contains the address to the receive frame area. This address then links the receive unit to a receive frame area. This link points to the first receive frame descriptor (RFD). which is associated on a one-to-one basis with a received frame. In turn, this receive frame descriptor (RFD) has a link to a receive buffer descriptor (RBD). Each receive buffer descriptor is associated with one and only one receive data buffer (RDB) which is where the actual frame of data will be stored. These receive data buffers can be of varying lengths to fit the user's needs. The 82586 will link as many receive buffer descriptors (and thereby the associated receive data buffers) to a receive frame descriptor as it takes to store an incoming frame of data. This allows the user to make the data buffers less than the maximum size of a frame. By making these buffers smaller, more efficient use of memory can be accomplished. This efficiency comes into play when frames of varying sizes are being received, allowing smaller frames to be located in only one of two buffers and larger frames in many buffers.
The receive unit itself can be in one of two states: no resources, and ready. The host can control and read the status of the receive unit through the system control block (SCB). During normal operations, the receive unit should be in the ready state. If it is in the no resources state, then frames cannot be received and will be lost. The no resources state is reached when the host has not emptied buffers fast enough to keep up with the amount of incoming data. When a frame is received, the 82586 will assert the INT* control line and set flags in the system control block status word signifying a frame has been received.
When a frame has been received, the host must inspect the first receive frame descriptor to determine if it has been used to receive a frame. If this receive frame descriptor has been used (this is determined by inspecting the receive frame descriptor status word), then the link to the first receive buffer descriptor must be recovered. This receive buffer descriptor contains a link to the used receive data buffer along with a count of how many bytes of valid data are in the buffer. This receive data buffer's valid data must now be read. The receive buffer descriptor must also be inspected for the end of file bit, that signifies if there is another buffer descriptor (and therefore another data buffer) associated with this frame. If this receive buffer descriptor is not the last one involved with this frame, then the host must retrieve the link to the next receive buffer descriptor. But before moving on to the next buffer descriptor, the first word of this receive buffer descriptor must be cleared to make this buffer descriptor (and its associated data buffer) free for use by the receive unit. This is useful because the link of the last receive buffer descriptor in the system has the address of the first receive buffer descriptor in the system, and this forms a cyclic list. This procedure for processing receive buffer descriptors and their associated receive data buffers is repeated until all data buffers associated with this receive frame descriptor have been read. At this time, receive frame descriptor can be cleared to free this descriptor for use with another incoming frame. As with the receive buffer descriptors, the receive frame descriptors are also chained together to form a cyclic list. The current receive frame descriptor contains the link address to the next receive frame descriptor. This next descriptor should be checked to see if it was used for a second frame. If this receive frame descriptor contains a second frame of data, this entire procedure should be repeated again. When an unused receive frame descriptor is used as the head of the list of frame descriptors the next time the 82586 receives a frame.
Now that the reader has a thorough understanding of what the 82586 and the host must do to transmit and receive frames, the software that will be run inside the host to control the 82586 can be explained.
Memory Map
The software for this system works primarily by manipulating the data structures that were explained in the previous section. To access these data structures, the host must know where they are located in NIB buffer memory. This section will give an example of where they may be located, although (with one exception) they may be located anywhere the user chooses. The memory map in the Table is an example of possible choices for these locations. It is based on a 14-kilobyte buffer memory, 8 maximum size Ethernet frame receive frame area, and one maximum size frame Ethernet transmit frame area.
Several items about the memory map deserve further explanations. The first item is that the system configuration pointer (SCP) must be located beginning at 3FF6H. The next is that transmit data buffers (TDB) and receive data buffers (RDB) are always located immediately following their respective transmit and receive buffer descriptors (TBD and RBD). There are no other restrictions on the memory map.
Now that the user knows where all of the data structures in the NIB buffer memory are located, the software to manipulate these can be explained.
Structure of Host Software
This section uses a software design tool called a "structure chart" to help the reader visualize the structure of the software used to control the 82586. The software is run inside the host computer and is broken into eight subroutines or procedures that are shown in FIG. 8. The procedures themselves are shown as boxes. The boxes, or procedures, are connected by lines that denote what procedure called them. The procedures above call the procedures linked below them. The uppermost procedure 802, real-time communications is called by the main program running inside the host that wishes to communicate with other hosts through the Ethernet LAN. The name located outside of the boxes in FIG. 8 are parameters that are passed into or out of the procedure under them. The direction of these parameters is indicated by the arrow they are written next to.
The structure chart should be used as a "road map" that will help the reader understand how each of the software procedures found in the following sections are used.
Pseudocode Software Procedure
This section formulates all necessary software procedures to implement an Ethernet LAN. The procedures allow transmission and reception of frames and performs a complete set of diagnostics.
The pseudocode procedures in this section are not written in any particular language, but are similar to Pascal. They should be used by the reader as a structured design of the software needed to control the NIB. They can be easily translated into any language that the host machine uses. Several of the commands used in these procedures are hardware-dependent on the NIB. By following the procedures outlined in the hardware design section, these commands are easy to use. However, a brief overview of these instructions will be given here.
1. RESETNIB--This instruction is used to bring the NIB system to a predetermined state. It is accomplished by:
(a) Asserting the RESET* control line for at least 650 nanoseconds.
2. CHECKNIBINTERRUPT--This instruction is used to determine if the INT* control is asserted or not. It is accomplished by:
(a) Inspecting the INT* control line.
(b) Setting the variable INTERRUPT-FLAG to true if INT* was asserted and to false otherwise.
3. CA--This instruction is used to assert the channel attention (CA) line of the 82586. This line informs the 82586 that it should inspect NIB buffer memory because the host has stored commands or data there for it. It is accomplished by:
(a) Writing the address 10000H to the NIB buffer memory address counter/latches 600.
(b) Writing any other address between 0000 and 3FFEH to the NIB buffer memory address counter/latches.
4. PULSELOOPBACK--This instruction is used to set or clear the 82501 loopback flip-flop 220. The first time this instruction is executed it puts the 82501 into its diagnostic loopback mode. The second time, it puts the 82501 back into its normal mode. The process of toggling between normal and loopback mode can be continued indefinitely. It is accomplished by:
(a) Writing the address 8000H to the NIB buffer memory address counter/latches 600.
(b) Writing any other address between 0000 and 3FFEH to the NIB buffer memory address counter/latches.
5. WRITE--This instruction is used to transfer from the host data to certain memory locations in the NIB buffer memory. The data and the addresses it is to be sent to are immediately following the WRITE instruction. It is accomplished by:
(a) Writing the starting address where the host wants to write into the NIB buffer memory address counter/latches.
(b) Gaining control of the NIB system bus using the bus control lines (BUSR* and BUSAV*).
(c) Setting the information type/direction control lines R/W* and D/A* to write data mode.
(d) Making transfers using the bus control lines (BUSR* and BUSAV* and the data synchronization lines (DSSTR* and DACK*). If all data is not going to consecutive memory locations, this process must be repeated from the first step on for all of the non-consecutive memory locations. Y
(e) Releasing control of the NIB system bus.
(f) Setting the information type/direction control lines (R/W* and D/A*) to the not using buffer memory (NOP) mode.
6. READ--This instruction is used to transfer data from certain memory locations in the NIB buffer memory to the host. The addresses that are to be read immediately following the READ instruction. It is accomplished similarly to the WRITE instruction, except that this instruction reads instead of writes from NIB buffer memory. The data that is read must be stored somewhere in the host memory. This data will be referred to in the pseudocode procedures. The convention used in the procedures is that if a word of data is read from NIB buffer memory address locations SCB+2, then the data is stored in a host variable denoted by quotes (i.e.. "SCB+2").
If the user requires more detail about any of these instructions, the hardware design sections should be referenced.
Before listing the actual pseudocode procedures, several conventions that are used in these procedures should be explained.
1. Anything inside of parentheses-asterisk pairs is only a comment (i.e. (*Comment*)), and is not an instruction.
2. Any address inside of quotes (i.e., "SCB+2") refers to the data that was last read (using a READ instruction) from that location. An address not inside quotes refers to that actual NIB buffer memory address.
3. An "H" following any number means that that number is hexadecimal.
4. An "X" inside of a number means that this part of the number is inconsequential. For example, OAXXXH means that the host should be concerned about only the most significant byte of this hexadecimal number.
The following are the actual pseudocode procedures (or subroutines) that implement a real-time local area network. FIG. 8 should be used as a visual aid when reviewing this software.