Abstract:
Method and apparatus for operating a CRC in a parallel, quasi parallel or serial fashion. The device allows all the bits in a word to be read and loaded into the cyclic redundancy checker (CRC) register in one clock cycle putting it in sync with the rest of the system. The CRC consists of a set of logic gates for converting a parallel input signal to a converted parallel input signal that is the equivalent of the conversion performed on the serial data input into the prior art cyclic redundancy checkers. The bits of the converted parallel input signal are then combined in another set of logic gates to provide the CRC output.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates, in general, to cyclic redundancy checkers (CRC), and more particularly, to quasi parallel cyclic redundancy checkers. 
     2. Description of Prior Art 
     A conventional CRC is used to check the stored program in a device upon startup. All the instructions in the program are output one word at a time to a multiplexer, which breaks each word down and transmits one bit at a time to the CRC. This process requires that a second clock be used to trigger the serial output of data bytes from the multiplexer to the CRC, since the bits must be transmitted to the CRC eight times, in an eight bit word, faster than the words are transmitted to the multiplexer. Often this process requires that the transmission of the word to the multiplexer be slowed in order to transmit all of one word serially to the CRC before the next word is input to the multiplexer. The CRC register itself contains 16 D-type flip-flop shift registers (Q 0  -Q 15 ) where the data is input one bit at a time. As the data is input the bit is combined with several of the previous bits in a cascade of exclusive-OR gates to produce the bit that is stored in the register. Once the entire program has been entered, one bit at a time, a reference word, or words, is entered that, if the program was correct, should clear the registers. If the registers are not cleared this indicates there was an error in the program. 
     This type of CRC has a number of problems. Often the CRC&#39;s are used in systems that have very long complicated programs. Reading one bit per clock pulse takes a great deal of time and reduces the overall efficiency of the device requiring the use of such a circuit. 
     Another problem arises in the standard parallel transmission of data. Since data is most often transmitted in parallel, this parallel transmission must be converted into a serial transmission before it can be run through the present type of CRC. 
     Still another problem arises in the need of a separate clock to operate the transmission of data from the multiplexer to the CRC. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is an object of the present invention to provide an improved apparatus and method for implementing a CRC to various systems. 
     Another object of the present invention is to allow the addition of a CRC to existing systems without requiring modification of the existing system&#39;s timing or the addition of asynchronous clocks. 
     Still another object of the present invention is to provide a CRC that can replace existing CRCs in a unit without requiring modification of the existing device using the CRC. 
     Yet another object of the present invention is to use a parallel or quasi parallel input in addition to a serial input. 
     Yet another object of the present invention is to reduce the time necessary for the CRC to operate. 
     The above and other objects and advantages of the present invention are provided by a particular embodiment of the present invention which comprises an apparatus and method for operating a CRC with a parallel rather than a serial data bus. The eight bits of a word, for an eight bit word, are input simultaneously through a series of complex, interconnected excusive-OR gates so the resulting bits stored in the register are the same as if they had been serially input as in the prior CRCs. This allows the present invention to be substituted in a system that has already been manufactured without the need of additional modification. These eight bits are then stored in a first set of eight flip-flops until the next word is transmitted at which time the first set of eight bits is transferred to a second set of eight flip-flops. When reading eight bits at a time this eliminates the need for any asynchronous clock and will allow the system to operate in a more efficient manner. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a schematic diagram of a prior art CRC circuit; 
     FIG. 2 is a chart of CRC register states of a serial CRC as a function of the clock; 
     FIG. 3 is a schematic diagram of an eight-bit CRC embodying the present invention; 
     FIG. 4 is a chart of CRC register states of a CRC reading eight bits per clock pulse as a function of the clock; 
     FIG. 5 is a chart of CRC register states of a CRC reading two bits per clock pulse as a function of the clock; 
     FIG. 6 is a schematic diagram of a four-bit CRC embodying the present invention; and 
     FIG. 7 is a chart of CRC register states of a CRC reading four bits per clock pulse as a function of the clock. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     A typical prior art CRC, generally designated 10, is illustrated in FIG. 1. The standard operation consists of a word being transferred in parallel from a register, or memory, 11 to a multiplexer 12. Multiplexer 12 is driven by a modulo eight counter 13 which is clocked by a source (not shown) which provides eight clock edges per word adapted to be connected to a terminal 14. One bit per clock pulse is transmitted to a dual input exclusive-OR gate 16 of CRC 10 where it is modulo two summed with the output from a dual input exclusive-OR gate 17. The output of gate 17 is produced by the input of Q 0  from a 16 bit shift register 18 and the output of a dual input exclusive-OR gate 19. The output of gate 19 is produced by the input of Q 13  and Q 15  of shift register 18. The output of gate 16 is then input to shift register 18 where it is stored in Q 0 . Shift register 18 is operated by the clock (not shown) adapted to be connected to terminal 14 to input the incoming bits and shift the presently stored bits from flip-flop Q 0  to flip-flop Q 15 . A typical CRC unit requires M clock pulses to load M bits of data. The cycle is initiated by a reset signal, applied to a terminal 22, transmitted to modulo eight counter 13 and register 18. 
     Referring to FIG. 2 the initial states (C 0  -C 15 ) of flip-flops Q 0  -Q 15  of register 18 are shown prior to the first clock pulse. The word being input into the CRC is illustrated as B 0  -B 7 . The input, D, to register 18 is represented by a register input Z-S for CRC input B 0  -B 7  respectively. Register input Z-S is entered into the Q 0  flip-flop and is determined by the equation: 
     
         D=C.sub.15 ⊕C.sub.13 ⊕C.sub.0 ⊕B.sub.N 
    
     where C 15 , C 13  and C 0  are the states of flip-flops Q 15 , Q 13  and Q 0 , respectively, and B N  is the current data bit being entered. 
     As illustrated in the graph it would require eight clock pulses (Ck 1  -Ck 8 ) to move the first input, Z, from Q 0  to Q 7 . 
     The present invention reduces the number of clock pulses required to transfer data from the register, or memory, to the CRC register. Referring now to FIG. 3 a preferred embodiment of the present invention is shown which will load eight bits per clock pulse. CRC register 24 is reset prior to the reception of data by a reset signal connected to a node 34. Bits B 7  -B 0  of a word are input to a first battery of dual input exclusive-OR gates 26-33. The output from the first battery of exclusive-OR gates 26-33 is input into a second battery of exclusive-OR gates 35-42. The output from the second battery of exclusive-OR gates 35-42 is then input into a third battery of exclusive-OR gates 44-51. Exclusive-OR gates 26-33; 35-42; and 44-31 may be generally described as a conversion means for converting a parallel input of the CRC. The output from the third battery of exclusive-OR gates 44-51 is the input S-Z to a CRC register 24 carried on a set of lines 53-60. The CRC register 24 is divided into two sets of flip-flops, a first set 62-69 and a second set 71-78. Inputs S-Z, on lines 53-60, are input to the first set of flip-flops 62-69 on a first clock pulse of a clock connected to a node 43 and then shifted into the second set of flip-flops 71-78 on a second clock pulse. Flip-flop 62-69 and 71-78 may be generally described as a register means. The outputs from the first set 62-69 and second set 71-78 of flip-flops are inverted and combined in a set of quad input AND gates 80-83 with their outputs being combined in a quad input AND gate 84. AND gates 80-84 may be generally described as combining means. The output of gate 84 is a CRC signal. 
     More particularly FIG. 3 shows B 0  being input to exclusive-OR gate 33 where it is ORed with the output from flip-flop 62. The output from exclusive-OR gate 33 is input into exclusive-OR gate 42 where it is ORed with the output from flip-flop 76. The output from exclusive-OR gate 42 is input into exclusive-OR gate 51 where it is ORed with the output from flip-flop 78. The output from exclusive-OR gate 51 is carried along line 60 to flip-flop 69, which is the equivalent of the Z input illustrated in FIG. 2. 
     Bit B 1  is input to exclusive-OR gate 32 where it is ORed with the output from flip-flop 75. The output from exclusive-OR gate 32 is input into exclusive-OR gate 41 where it is ORed with the output from flip-flop 77. The output from exclusive-OR gate 41 is input into exclusive-OR gate 50 where it is ORed with the output of exclusive-OR gate 51. The output from exclusive-OR gate 50 is then transmitted along line 59 to flip-flop 68, which is the equivalent of the Y input illustrated in FIG. 2. 
     Bit B 2  is input into exclusive-OR gate 31 where it is ORed with the output from flip-flop 74. The output from exclusive-OR gate 31 is then input into exclusive-OR gate 40 where it is ORed with the output from flip-flop 76. The output from exclusive-OR gate 40 is input into exclusive-OR gate 49 where it is ORed with the output from exclusive-OR gate 50. The output from exclusive-OR gate 49 is then transmitted along line 58 to flip-flop 67, which is the equivalent of the X input illustrated in FIG. 2. 
     Bit B 3  is input into exclusive-OR gate 30 where it is ORed with the output from flip-flop 73. The output from exclusive-OR gate 30 is then input into exclusive-OR gate 39 where it is ORed with the output from flip-flop 75. The output from exclusive-OR gate 39 is then input into exclusive-OR gate 48 where it is ORed with the output from exclusive-OR gate 49. The output from exclusive-OR gate 48 is transmitted along line 57 to flip-flop 66, which is equivalent to the W input illustrated in FIG. 2. 
     Bit B 4  is input to exclusive-OR gate 29 where it is ORed with the output from flip-flop 72. The output from exclusive-OR gate 29 is then input into exclusive-OR gate 38 where it is ORed with the output from flip-flop 74. The output from exclusive-OR gate 38 is then input into exclusive-OR gate 47 where it is ORed with the output from exclusive-OR gate 48. The output from exclusive-OR gate 47 is then output along line 56 to flip-flop 65, which is the equivalent to the V input illustrated in FIG. 2. 
     Bit B 5  is input into exclusive-OR gate 28 where it is ORed with the output from flip-flop 71. The output from exclusive-OR gate 28 is then input into exclusive-OR gate 37 where it is ORed with the output from flip-flop 73. The output from exclusive-OR gate 37 is then input into exclusive-OR gate 46 where it is ORed with the output from exclusive-OR gate 47. The output from exclusive-OR gate 46 is then transmitted along line 55 to flip-flop 64, which is the equivalent to the U input illustrated in FIG. 2. 
     Bit B 6  is input into exclusive-OR gate 27 where it is ORed with the output of flip-flop 69. The output of exclusive-OR gate 27 is input into exclusive-OR gate 36 where it is ORed with the output from flip-flop 72. The output from exclusive-OR gate 36 is then input into exclusive-OR gate 45 where it is ORed with the output of exclusive-OR gate 46. The output of exclusive-OR gate 45 is then output along line 54 to flip-flop 63, which is the equivalent to the T input illustrated in FIG. 2. 
     Bit B 7  is input into exclusive-OR gate 26 where it is ORed with the output from flip-flop 68. The output from exclusive-OR gate 26 is then input into exclusive-OR gate 35 where it is ORed with the output from flip-flop 71. The output from exclusive-OR gate 71 is then input into exclusive-OR gate 44 where it is ORed with the output from exclusive-OR gate 45. The output from exclusive-OR gate 44 is then transmitted along line 53 to flip-flop 62 which is the equivalent to the S input illustrated in FIG. 2. 
     On a first clock pulse the signals on lines 53-60 (S-Z) are transferred into flip-flops 62-69 (Q 0  -Q 7 ), respectively, of CRC register 24. On the next clock pulse the signals S-Z are shifted from flip-flops 62-69 to flip-flops 71-78 (Q 8  -Q 15 ). 
     The outputs from flip-flops 62, 63, 71 and 72 (Q 0 , Q 1 , Q 8  and Q 9 ) are transmitted to AND gate 80 where the signals are inverted before entering. The outputs from flip-flops 64, 65, 73 and 74 (Q 2 , Q 3 , Q 10  and Q 11 ) are transmitted to AND gate 81 where the signals are inverted before entering. The outputs from flip-flops 66, 67, 75 and 76 (Q 4 , Q 5 , Q 12  and Q 13 ) are transmitted to AND gate 82 where the signals are inverted before entering. The outputs from flip-flops 68, 69, 77 and 78 (Q 6 , Q 7 , Q 14  and Q 15 ) are transmitted to AND gate 83 where the signals are inverted before entering. 
     The outputs from AND gates 80-83 are coupled to AND gate 84 where the signals are ANDed to produce the CRC signal. 
     In FIG. 4 a chart of the CRC register states is shown for reading eight bits per clock as described in FIG. 3 above. Word B 7  -B 0  is converted into signals S 0  -Z 0  and input into flip-flops 62-69 (Q 0  -Q 7 ) of register 24 on the first clock pulse. This word is then shifted into flip-flops 71-78 (Q 8  -Q 15 ) on the next clock pulse at the same time a new word (S 1  -Z 1 ) is loaded into flip-flops 62-69 (Q 0  -Q 7 ). 
     Referring now to FIG. 5 a chart of a CRC register is shown for reading two bits per clock pulse. FIG. 3 could be easily modified to read two bits per clock pulse. This will be more apparent after FIG. 6. Reading two bits per clock pulse requires four clock pulses to move input B 0  (Z) from the input of flip-flop Q 1  to flip-flop Q 7 . On the first clock pulse two bits Y and Z are input into registers Q 0  and Q 1 . On the second pulse two new bits W and X are input into registers Q 0  and Q 1 , respectively, and bits Y and Z are transferred to registers Q 2  and Q 3 , respectively. This process of inputting two bits at a time is continued until the entire word is read in. While this process requires more time than that described in FIG. 3 it is faster than the standard serial input form which would require eight clock pulses, see FIG. 1. 
     Referring to FIG. 6 a schematic diagram of a four-bit CRC embodying the present invention is illustrated. The four-bit circuit consists of a set of multiplexers 86-89 controlled by a flip-flop 91 which is triggered by an asynchronous clock connected to a node 104. The signals passing through multiplexer 86-89 proceed through a set of exclusive-OR gates 92-103 to CRC register 90 carried on a set of lines 105-108. The CRC register 90 is divided into four sets of flip-flops; a first set 110-113, and second set 114-117, a third set 118-121 and a fourth set 122-125. The signals from flip-flops 110-125 are inverted and processed through a set of AND gates 80-83 with their outputs being ANDed in an AND gate 84, in the same fashion illustrated in the 8-bit schematic FIG. 3. 
     More particularly FIG. 6 shows an 8-bit word B 0  -B 7  being input to multiplexers 86-89. Bits B 3  -B 0  are coupled to the IN0 input of multiplexers 86-89, respectively, and bits B 7  -B 4  are coupled to the IN1 input of multiplexers 86-89, respectively. A clock signal triggers flip-flop 91 causing an output which is connected to input A of multiplexers 86-89 thereby causing inputs IN0 and IN1 to open alternatively, which results in the transmitting of B 0  -B 3  and B 4  -B 7  alternatively. Prior to receiving data CRC register 90 is reset by a reset signal coupled to a node 104. 
     The output from multiplexer 89 is input into exclusive-OR gate 95 where it is ORed with the output from flip-flop 123. The output from exclusive-OR gate 95 is input into exclusive-OR gate 99 where it is ORed with the output from flip-flop 110. The output from exclusive-OR gate 99 is input into exclusive-OR gate 103 where it is ORed with the output from flip-flop 125. The output from exclusive-OR gate 103 is then input to flip-flop 113 of CRC register 90. 
     The output from muliplexer 88 is input to exclusive-OR gate 94 where it is ORed with the output from flip-flop 122. The output from exclusive-OR gate 94 is then input to exclusive-OR 98 where it is ORed with the output from flip-flop 124. The output from exclusive-OR gate 98 is then input to exclusive-OR 102 where it is ORed with the output from exclusive-OR 103. The output from exclusive-OR 102 is then input to flip-flop 112 of CRC 90. 
     The output from multiplexer 87 is input to exclusive-OR 93 where it is ORed with the output from flip-flop 121. The output from exclusive-OR gate 93 is then input to exclusive-OR gate 97 where it is ORed with the output from flip-flop 123. The output from exclusive-OR gate 97 is then input to exclusive-OR gate 101 where it is ORed with the output from exclusive-OR gate 102. The output from exclusive-OR gate 101 is then input to flip-flop 111 of CRC register 90. 
     The output from multiplexer 86 is input to exclusive-OR gate 92 where it is ORed with the output from flip-flop 120. The output from exclusive-OR gate 92 is then input to exclusive-OR gate 96 where it is ORed with the output from flip-flop 122. The output from exclusive-OR gate 96 is then input to exclusive-OR gate 100 where it is ORed with the output from exclusive-OR 101. The output from exclusive-OR gate 100 is then input to flip-flop 110 of CRC 90. 
     Exclusive-OR gates 100-103 transmit signals (W-Z) to flip-flops 110-113, respectively. On a first clock pulse signals W-Z, derived from inputs B 3  -B 0 , are transferred into flip-flops 110-113, respectively, of register 90. On the next clock pulse signals W-Z are transferred into flip-flops 114-117, respectively, and new signals S-V derived from inputs B 7  -B 4 , are transferred into flip-flops 110-113. 
     The outputs from flip-flops 110-125 are inverted and connected to AND gates 80-83. The outputs from AND gates 80-83 are connected to AND gate 84 to produce a CRC signal. 
     Referring to FIG. 7, a chart of the CRC register for the four-bit CRC of FIG. 6 is illustrated. Reading four bits per clock pulse requires two clock pulses to move input B 0  (Z) from the input of flip-flop Q 3  to flip-flop Q 7 . 
     Thus, it is apparent that there has been provided, in accordance with the invention, a device and method that fully satisfies the objects, aims, and advantages set forth above. 
     It has been shown that the present invention provides an apparatus and method of implementing a CRC to system without requiring additional circuitry or modification. It has further been shown that the CRC apparatus, containing a register of N length, is capable of processing M bits of data in K clock cycles where N&gt;M&gt;K. 
     Although specific logic circuit devices and circuit elements have been set forth in the specification, it is to be specifically understood that alternate logic elements and circuit elements having similar electrical characteristics may be substituted therefor. 
     While a preferred embodiment of the present invention has been disclosed and described, it will be obvious to those skilled in the art that various modifications and substitutions may be made without departing from the spirit and scope of the invention, and it is therefore aimed in the following claims to claim all such modifications.