United States Patent m
Myran
[54] ERROR DETECTION FOR PARALLEL DATA TRANSFER BETWEEN A PROCESSOR AND A PERD?HERAL DEVICE BY COMPARING REGISGERS STORING A SUM OF VALUES IN BYTES OF DATA TRANSFERRED
[75] Inventor: Mark Myran, Ann Arbor, Mich.
[73] Assignee: Conner Peripherals, Inc., San Jose, Calif.
[21] Appl. No.: 15,784
[22] Filed: Feb. 10,1993
[51] Int. CI.6 G06F 11/00; G06F 11/30
[52] U.S. CI 395/182.16; 395/185.05;
371/53; 371/37.6; 371/37.7
[58] Field of Search 371/53, 37.6, 37.7,
371/30; 395/182.16, 185.04, 185.05, 185.07,
185.09
[56] References Cited
U.S. PATENT DOCUMENTS
4,148,098 4/1979 McCreight et al 364/200
4,413,339 11/1983 Riggle et al 371/37
4,451,884 5/1984 Heath et al 364/200
II llll lllllllllll'nilllllllllllllllllllTllllilllilll
US005506958A [ii] Patent Number: 5,506,958 [45] Date of Patent: Apr. 9,1996
4,864,652 9/1989 Austin et al 455/617
5,058,110 10/1991 Beach et al 370/85.6
FOREIGN PATENT DOCUMENTS
2234093 6/1989 United Kingdom.
Primary Examiner—Hoa T. Nguyen
Attorney, Agent, or Firm—Fliesler, Dubb, Meyer & Lovejoy
[57] ABSTRACT
A method and apparatus for performing error detection on data transfer through a parallel interface port at a substantially increased data transfer rate with a minimum of handshaking. Blocks of data are transferred between a sending device and a receiving device, and each of the respective devices maintains a checksum. Each checksum comprises an initial value, and added to that value is the value of each data byte transferred through the parallel port interface. After a block of data bytes has been transferred, the checksum maintained by the sending device and the receiving device are compared. If the checksums are equal, no error is assumed to have occurred during the data transfer. If the checksums are not equal, an error is assumed to have occurred during the data transfer, and the data is retransferred with the previously transferred block discarded.
6 Claims, 1 Drawing Sheet
![[merged small][merged small][merged small][graphic][merged small][merged small][subsumed][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][graphic][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small]](http://www.google.com/patents?id=PiElAAAAEBAJ&ie=ISO-8859-1&output=text&pg=PA1&img=1&zoom=3&hl=en&q=7181427&cds=1&sig=ACfU3U3weaQrSZwy4G-2MgMqm79Tom4oqA&edge=0&edge=stretch&ci=254,681,484,667)
1
ERROR DETECTION FOR PARALLEL DATA TRANSFER BETWEEN A PROCESSOR AND A PERIPHERAL DEVICE BY COMPARING REGISGERS STORING A SUM OF VALUES
IN BYTES OF DATA TRANSFERRED 5
This invention is directed to a method and apparatus for error detection of data transferred through a parallel port of a computer system. More specifically, this invention is directed to a method and apparatus for detecting errors in 10 data transferred through a parallel port of a computer system where the parallel port data transfer protocol has been modified to include only minimal handshaking in order to increase the data transfer rate.
15
BACKGROUND OF THE INVENTION
In a great majority of the computer systems in use today there are normally a variety of ports which enable the user to connect any number of external devices to the main unit 20 of the computer. Such devices include printers, modems, floppy disk or tape drives, and mice or other pointing devices to name just a few of a great number of external devices which may be interconnected to computer systems. The interface ports to which these devices connect transfer 25 data to the peripheral device generally in one of two manners, serial or parallel data transfer.
In a serial data transfer, the actual data is transferred from the sending device to the receiving device one data bit at a 3Q time. While the serial data transfer interconnection may include a number of control lines, there remains only one data transfer line over which the data is sent in a bit-by-bit manner. In a parallel data transfer, more than one data bit is transferred simultaneously over a plurality of data lines. The 35 number of data bits transferred simultaneously varies depending on the type of interface port and the design of the peripheral device. An entire data byte, or a number of data bytes, may be transferred simultaneously in such a system. Generally, control signals are exchanged between the send- 4Q ing and receiving devices over control lines which are part of the parallel interface connection and prepare the devices for the forthcoming data transfer.
To further describe a parallel port arrangement, a printer (for example) and the computer system to which it attaches 45 often communicate via standard parallel port communications protocol. Such protocol generally includes handshaking between the computer system and the printing device in order to ensure that the sending and receiving devices are prepared for the forthcoming data transfer. The parallel data 50 transfer protocol comprises the sending device informing the receiving device that it is prepared to send the forthcoming data byte. The receiving device responds when it has accepted the data byte. Using such a communications protocol is extremely useful in insuring that the data byte or 55 bytes to be transferred is not transmitted until the sending and the receiving devices are both prepared to carry out their respective rolls in the data transfer. While parallel port data transfer protocol does insure a substantially high degree of integrity in the data transfer, the data transfer rate is sub- go stantially slower in a number of parallel port implementations.
When the parallel port of a computer system is used to interface the computer to a device such as a printer, the data rate at which the parallel port operates is normally greater 65 than the speed at which the printing device will operate, so that the limiting factor in the data transfer rate is the speed
2
of the printer and not the data transfer rate inherent to the parallel interface protocol. However, because of the number and variety of external devices which may be interconnected to the computer system, the data transfer rate realizable using standard parallel port interface protocol may often be the limiting factor in the data transfer rate between the computer system and the external device. For example, mass storage devices such as tape backups and hard drives are generally designed for operation internally within the computer system's main unit, where a controller board interconnects the device directly to the computer bus, and the devices operate at a transfer rate much higher than that realizable using standard parallel port communications protocol. Mass storage devices, however, are now more frequently packaged as external devices in order to allow portability between computer systems. Such portability would be desirable to the user who would want to backup a number of computer systems using only one tape drive device transportable between computer systems and connectable to an external data port. This would alleviate the need to provide a backup device at each and every computer system for users having greater than one computer system.
By modifying the communications protocol which directs data transfer through a parallel port, the parallel port data transfer rate may be greatly increased. The increase in data transfer rate results from reducing the amount of handshaking occurring between the sending and receiving device resulting in a greater amount of time being devoted to transferring data rather than performing handshaking operations. A typical scheme known in the art for increasing the data transfer rate through a parallel port during a write operation from the computer to an external device comprises having the external device monitor the data lines for a change in any of the lines to indicate that a new data byte has been transferred. Additionally, a control line is monitored to determine if two identical bytes have been transferred as is indicated when the control line toggles. When the computer system reads a data byte from an external device, the computer determines generally how long it takes for the data to become stable on the lines and enters a short delay loop before reading each individual data byte.
The above described method of data transfer is quite effective in increasing the overall data transfer rate, but provides no method by which the user can insure the integrity of the data transferred. Whereas in a standard parallel interface, a substantially high data transfer integrity results because it is predetermined that both the sending and receiving devices are prepared for the data transfer, the high speed parallel port interface method does not correspondingly ensure that both the sending and receiving transfer devices are prepared because handshaking is greatly reduced. Thus, the integrity of the data transfer is called into question.
SUMMARY OF THE INVENTION
This invention is directed to a method and apparatus for performing error detection on data transferred through a parallel interface port at a substantially increased data transfer rate with a minimum of handshaking. When a block of data is to be transferred via a parallel port interface from a sending device unit to a receiving device at an increased data rate, a first checkvalue is initialized and stored in one of the devices. Similarly, a second checkvalue stored in the other device is initialized by the parallel interface unit to a value equivalent to the first checkvalue. Data is then transferred from the sending device through the parallel port. As each
data byte is transferred through the parallel port, the checkvalue associated with the sending device is modified in accordance with the value of the data byte transferred. Similarly, the checkvalue associated with the receiving device is modified in accordance with value of the data byte transferred. At the conclusion of the transfer of a predetermined number of data bytes, the checkvalues are compared. If the checkvalues are identical, data is transferred from temporary to permanent memory if the receiving device is a peripheral controller or is left resident if the receiving device is the computer main unit. If the checkvalues are not identical, the previously transferred block of data is retransferred from the sending to the receiving device.
Further objects, features and advantages of the invention will become apparent from a consideration of the following description and the appended claims when taken in connection with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 depicts a block diagram of the parallel port interface error checking circuit.
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 depicts a block diagram of the fast parallel port error checking circuit 10. The system includes a computer 12, a printer 14, and a peripheral controller 16, which represents any of a number of external device controllers such as backup tape drives, floppy disk drives, or hard drives. Computer 12 includes parallel port interface 18 which provides an interconnection to printer 14 and peripheral controller 16. Parallel interface 18 includes data lines 20, status lines 22, and control lines 24. Data lines 20 connect to printer 14 and peripheral controller 16 through bi-directional transceiver 26. Status lines 22 are input to parallel interface 18 from status logic 28 through output buffer 30. Parallel interface 18 outputs signals on control lines 24 to control logic 32 through input buffer 34. Similarly, data lines 20 are input to printer 14 through output buffer 36; status signals are output from printer 14 on control lines 22 to status logic 28 through input buffer 38; and control signals are input to printer 14 from control logic 32 over control lines 24 through output buffer 40. It should be noted from the outset that while in the implementation described herein the parallel port interfaces to printer 14 and peripheral controller 16, herein is disclosed only one possible implementation of a high speed parallel port interface with error checking. Several options exist with respect to the presence or absence of printer 14 as well as peripheral controller 16, including multiple devices of each.
In the general operation of fast parallel port data transfer circuit 10, computer 12 and the peripheral controller 16 transfer data through a first-in-first-out (FIFO) memory which is implemented using a dynamic random access memory (DRAM) embodied herein as FIFO DRAM 42. Thus, in a transfer from computer 12 to peripheral controller 16, computer 12 outputs data through parallel interface 18, filling FIFO DRAM 42. When FIFO DRAM 42 is full (128 k bytes in this particular embodiment, but FIFO DRAM 42 may vary in size and need not be full depending on the particular implementation), the contents of FIFO DRAM42 are then read by peripheral controller 16 via direct memory access (DMA) and transferred to the peripheral device storage media. In order for data to be read and transferred from an external device (not shown) by peripheral controller
16 and transferred to computer 12, the substantially opposite sequence of events occurs. Thus, data is read from the storage media managed by peripheral control 16, and a DMA transfer fills FIFO DRAM 42. Once the transfer from peripheral controller 16 to FIFO DRAM 42 has begun, the contents of FIFO DRAM 42 are then transferred to the memory of computer 12 via parallel port 18. Because a number of peripheral controllers operate on 1 k byte segments, computer 12 does not read FIFO DRAM 42 until 1 k bytes have been written. Other implementations do not require that lk bytes be written before computer 12 reads FIFO DRAM 42. Note that the transfer between computer 12 and FIFO DRAM 42 or vice versa occurs through bi-directional transceiver 44, and the transfer from peripheral controller 16 and FIFO DRAM 42 or vice versa occurs through bi-directional transceiver 46. Control of FIFO DRAM 42 is effectuated through strobe logic 48, which generates control signals row address strobe (RAS) and column address stobe (CAS), and multiplexer 64 which multiplexes the memory address to be written to within FIFO DRAM 42.
Because the data transfer between computer 12 and peripheral device 16 described herein is intended to occur with a minimal amount of handshaking in order to maximize the data transfer rate, this invention implements error checking to ensure the integrity of the data transferred between computer 12 and FIFO DRAM 42 through parallel port 18. Note that data transfers between FIFO DRAM42 and peripheral controller 16 are assumed to be highly accurate, as that transfer is a DMA transfer and the probability of error is very low.
In order to insure the integrity of data transferred between computer 12 and FIFO DRAM 42, an error checking facility is employed. Specific to this embodiment, a checksum value 50 is determined by computer 12 and a second checksum value is determined by interface circuit 10 using checksum registers 52a and 52k Checksum register 52b stores the most significant byte and checksum register 52a stores the least significant byte of the checksum value. Checksum value 50 and checksum registers 52a-b are calculated by starting from an initial value, generally zero, and adding to that existing value the value of every data byte transferred between computer 12 and FIFO DRAM 42. A checksum is calculated in the embodiment described herein for every 1 k bytes transferred. After a predetermined number of data bytes have been transferred (1 k bytes in this embodiment), the values of checksum 50 and checksum registers S2a-b are compared to determine if they are equal. If the values are equal, an accurate data transfer between computer 18 and FIFO DRAM 42 is assumed to have occurred, and if the values are unequal, an inaccurate transfer between computer 12 and FIFO DRAM 42 is assumed to have occurred. If the checksum values are not equal, the block of data is transferred again and the previously transferred block is discarded. The system may be designed in such a way that after a predetermined number of inaccurate data transfers, the data transfer rate may be reduced or more handshaking may be employed to increase the accuracy of the data transfer. Such optional methods of data transfer are determined by the user according to system requirements and specifications. Because a number of data transfer modes are available, control status register 54 is used to store the current data transfer mode and status of the system. Also, note that register 56 is an identification register which stores the revision level of the fast parallel port error checking circuit 10. The method of error checking described herein is implemented through the use of checksum values computed for a
« PreviousContinue » |