Abstract:
A single bit recycling microprocessor which performs sequential and combinational logic equations. The microprocessor has exclusive input and output instructions and performs three basic logic operations, two of which are performed concurrently on each data input. The processor substitutes read only memory (ROM) for a network of logic gates, multiplexers, decoders, flip-flops and counters. The simulation of J-K flip-flops is accomplished by a tandem operation of two R-S flip-flops.

Description:
BACKGROUND OF THE INVENTION 
     Considerable work has been done on optimization and mechanization of the combinational and sequential logic design, but so far, none of the current methods have found a broad industrial application. Therefore, it is the purpose of this invention to provide a means broadly applicable for automation and optimization of the logic design process. 
     To lower the cost of logic controllers, some Large Scale Integrated(LSI) circuits, such as Programmable Logic Arrays, have been developed. Most of these chips, however, do not provide for sequential logic circuits. Therefore, it is another purpose of this invention to provide for a versatile type of chip, capable of providing combinational and sequential logic circuits. 
     The aforementioned Programmable Logic Arrays do not use the chip area as efficiently as Read Only Memories (ROM). Therefore, it is still another purpose of this invention to provide the logic circuits on highly efficient ROM chip structures. 
     The standard microprocessors have a plurality of instructions, to allow for a broad scope of applications. This, however, makes the instruction word and consequently the size of the required ROM less than optimal for any one particular application. Therefore, it is yet another purpose of this invention to provide for optimal usage of ROM memory in logic applications by providing an optimal logic operations instruction set. 
     Standard microprocessors process all input data serially, which results in a slow processing speed. To speed up the operation, a parallel fed microprocessor could be added, but at a considerable increase in hardware. Therefore, it is still another purpose of this invention to provide for a simple serially fed parallel microprocessor interface to achieve the required processing speed. 
     At present, the microprocessors require numerous external chips which lower the system reliability and increase the system cost. Therefore, it is yet another purpose of this invention to lower the system cost and to increase its reliability by including on the microprocessor chip most of its associated hardware. 
     The present microprocessors require numerous external devices, which cannot take the full advantage of the future high density LSI technologies. And still another purpose of this invention therefore is to provide for future technologies by providing a self-contained logic microprocessor, having exclusively the I/O select and the data input and output pins. 
     SUMMARY OF THE INVENTION 
     The microprocessor processes the logic equation of the type: 
     
         F.sub.0 = (X.sub.1 X.sub.2 X.sub.3 +X.sub.2 +X.sub.4)X.sub.5 X.sub.6 X.sub.7 
    
     by breaking the equation into a set of separate NAND and OR logic operations and performing these basic logic operations in a predetermined order. The microprocessor has built in hardware which performs automatically and concurrently the NAND and OR logic operations on the sequentially fetched input data. The output instruction which follows a sequence of the associated input instructions selects to the output either the NAND or OR logic operation on the previously fetched input data. The above logic equation is processed by performing the logic operations represented by the following equations: 
     
         F.sub.1 = X.sub.1 X.sub.2 X.sub.3                          ( 1) 
    
     
         f.sub.2 = f.sub.1 +x.sub.2 +x.sub.4                        ( 2) 
    
     
         f.sub.0 = f.sub.2 x.sub.5 x.sub.6 x.sub.7                  ( 3) 
    
     since all terms on the right hand side of the equations (1) through (3) are the input data, and all terms on the left hand side of these equations are the output data, the microprocessor needs only the data input and data output instructions. These data input and data output instructions are provided by the first bit of the instruction word. To provide for higher efficiency of the microprocessor, a second instruction bit specifies the data itself. The second bit selects on the input either the &#34;true&#34; or &#34;not&#34; logic value of the input data, and it selects on the output either the NAND or OR logic function of the input data. The remaining bits of the instruction word directly address the input and output data. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is an electronic block diagram illustrating the preferred embodiment of the subject invention; 
     FIG. 2 is illustrative of the instruction word format; 
     FIG. 3 specifies operation codes of the basic logic instructions; 
     FIG. 4 is a block diagram of the write only memory utilized by the subject invention; 
     FIG. 5 is illustrative of the expanded logic instructions set; and 
     FIG. 6 discloses a timing diagram helpful in understanding the operation of the subject invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Discussing the preferred embodiment with reference to FIG. 1, the microprocessor is comprised of a clock generator 10, address register 11, read only memory (ROM) 12, instruction decoder 13, input data controller 14, NAND logic operator 15, OR logic operator 16, dual input selector 17, output data controller 18 and input/output data storage 19. 
     The address register 11 is preferably a free-running counter driven by the clock generator 10 and used for addressing consecutive ROM 12 memory locations which store the logic operation instructions. Upon addressing the last instruction word in the ROM memory 12, the address register 11 overflows or resets; and the process of addressing and executing the consecutive ROM memory 12 locations continues, thus providing for a continuous and repetitious processing of input data. 
     The ROM 12 stores instruction words 20 of the format shown in FIG. 2. The instruction word 20 comprises an operation code 21 including bits B 0  B 1  and address code 22 including bits B 2  through B 7 . The two instruction bits B 0  and B 1  of the operation code 21 provide for four basic microprocessor instructions which are listed in FIG. 3. The bit B 0  specifies whether the instruction 20 is fetching an input data or outputting a result of logic operation. Since it was arbitrarily assumed in FIG. 3 that B 0  =1 fetches an input data and B 0  =0 outputs a result of logic operation, an instruction with B 0  =1 is called the input instruction and an instruction with B 0  =0 is called the output instruction. 
     The instruction decoder 13 decodes the instruction word 20 (FIG. 2) out of ROM 12, and executes the specified logic operation out of the ROM 12 by means of control lines 23, 24, 25 and 26. Such apparatus is well known to those skilled in the art. The control lines 23 and 24 are responsive to the instruction bits B 0  and B 1 , respectively. If the control line 23 is at a logic &#34;one&#34; data state, it enables the logic operators 15 and 16 to be responsive to their input data. If the control line 23 is at a logic &#34;zero&#34; data state, it enables the I/O data storage 19 to store the output of either the logic operator 15 or 16, as further specified by the control line 24. The input data controller which may be implemented by a TI SN 74157 IC module, for example, selects either &#34;true&#34; or &#34;not&#34; value of serially fed input data X 1 , X 2  . . . on order from a signal applied from the decoder 13 on control line 24. The data controller&#39;s 14 outputs either the &#34;true&#34; or &#34;not&#34; logic value (FIG. 3) of its input data signal applied via line 27. The control line 24 from the decoder 13 also selects by means of the selector 17 comprised of a TI SN 74157 module, for example, either of the logic operators&#39; 15 or 16 output. The concurrent selection of the input data 27 and the respective outputs of the logic operators 15 and 16 by the control line 24 is allowed because the input data 27 is processed by the logic operators 15 and 16 only if bit B 0  =1 and the logic operators&#39; 15 and 16 are stored in the I/O data storage 19 only if the bit B 0  =0. 
     If thelogic operators 15 and 16 are both reset, then the first &#34;zero&#34; logic input data state sets the output of logic operator 15 to logic &#34;one&#34;, and the first &#34;one&#34; logic input data state sets the output of logic operator 16 to logic &#34;one&#34;. As a result, the logic operators 15 and 16 perform the NAND and OR logic operations, respectively. 
     The output data controller 18 which may also be implemented by a TI SN 74157 module is responsive to the output of selector 17 and it provides under control signal on line 25 from the decoder 13 either the selector 17 output or remains at a &#34;zero&#34; level meaning that it does nothing. 
     The I/O data storage 19 includes a random access memory (RAM) 28, input data multiplexer 29 which, for example, may be implemented by a TI SN 74151, and output decoder 30. The outputs of the RAM memory 28 and multiplexer 29 are provided under control of address lines 31 being responsive to the address code 22. Since the multiplexer 29 operates as an extension of the RAM memory 28, therefore the outputs of the RAM memory 28 and multiplexer 29 are tied together providing input data signal line 27. The inputs to the multiplexer 29 are outputs of external devices 32-1 . . . 32-n, or external multiplexers 33-1 . . . 33-i also configured from TI SN 74151 modules, for example, operating as extensions of the multiplexer 29. The RAM memory 28 stores the results of processing of the auxiliary logic equations (1) and (2) provided by the logic operators 15 and 16 via the selector 17 and output data controller 18. The result of the final equation (3) is provided to a selected one of a plurality of output devices 34-1 . . . 34-n via one of the device decoders 35-1 . . . 35-i, output decoder 30, controller 18 and selector 17. However, if the above mentioned final equation (3) is used as an output term for another higher order equations, then the equation (3) is both stored in the RAM memory 28 and fed to one of the output devices 34-1 . . . 34-n. 
     The output decoder 30 is of the Texas Instruments Inc. SN 7442 type or equivalent, and it is responsive to the high order address lines 31. A device decoder e.g. 35-1 is enabled by the output 40-1 of the decoder 30 and it operates as an extension of the output decoder 30 by responding to the lower order address lines 31. The device decoder 35-1 is preferably a write only memory type of device described with reference to FIG. 4. The write only memory 35-1 is comprised of decoder 38, and memory cells 39-1 . . . 39-i. The decoder 38 is responsive to the lower order address lines 31 and it is enabled by the signal line 40-1 being a decoded signal of the higher order address lines 31. The decoder 38 output signal line 41-1 selects a memory cell 39-1 to be responsive to the write memory signal line 26 provided by the instruction decoder 13 shown in FIG. 1. The signal line 26 writes into the memory cell 39-1 the data on the signal line 36. 
     Having described the basic microprocessor hardware a specific reference is now made to the processing of the logic equations (1), (2) and (3). To perform the logic equation (1), the ROM 12 stores four instructions. The first instruction fetches an external variable X 1  via one of the multiplexers e.g. 33-1 and multiplexer 29 and provides its &#34;true&#34; logic level on the input of the logic operators 15 and 16. The second and third instructions fetch the variables X 2  and X 3  and present them consecutively on the input of the logic operators 15 and 16. If any of the fetched variables X 1 , X 2  or X 3  is a logic &#34;zero&#34; signal, the logic operators 15 output goes to logic &#34;one&#34; level. If any of the fetched variables X 1 , X 2  or X 3  is a logic &#34;one&#34; level, the logic operators 16 output goes to logic &#34;one&#34; level. The fourth instruction selects on the output of the selector 17 the NAND logic operators&#39;s 15 output, and stores this selected logic signal in the RAM memory 28 under control of the write signal 23 at the location F 2  specified by the signal lines 31. Following the writing into the RAM memory 28, the aforementioned fourth instruction resets the NAND and OR logic operators 15 and 16 to their initial state. 
     To perform the logic equation (2) a fifth instruction fetches from the RAM memory 28 the data F 1  stored under control of the fourth instruction, inverts its logic level by operating on input data controller 14, and presents this inverted logic signal on the input of the logic controller 15 and 16. The instructions sixth and seventh fetch the external variables X 2  and X 4 , and provide their &#34;true&#34; logic levels on the logic operators&#39; 15 and 16 input. The eighth instruction stores the OR logic operator&#39;s 16 output in RAM memory 28 at a location F 2  specified by the signal lines 31. The ninth instruction fetches the F 2  data from the RAM memory 28 and presents on the logic operators&#39; 15 and 16 input its inverted logic level. The tenth, eleventh and twelfth instructions provide to the logic operators 15 and 16 the external variables X 5 , X 6 , X 7 , respectively. The thirteenth instruction selects an output device e.g. 34-1 by means of the decoders 30 and e.g. 35-1 and provides it with the logic level of the NAND logic operator&#39;s 15 output. Should the decoder 35-1 be a write only memory type of device, a memory cell e.g. 39-1 connected to the device e.g. 34-1 stores the logic operator&#39;s 15 output. 
     If the microprocessor has a NAND or NOR logic operator, a one bit operation code is sufficient to perform any logic equation, because every input data can be inverted if necessary by the NAND or NOR operator and every logic equation can be represented by a NAND or NOR set of basic logic equations. A microprocessor with one operation code bit, however, requires two additional instruction words to fetch a &#34;not&#34; logic value of the input data. Such a microprocessor also requires the logic equation to be represented by a much larger set of basic logic equations if only one basic logic operator, such as NAND or NOR, is provided by the microprocessor. 
     The logic microprocessor has three basic types of instructions shown in FIG. 5: the copy or Boolean instruction, the set, and the reset instruction. The copy instruction transfers the selector&#39;s 17 data output on data line 42 to the RAM memory 28 without any modification by the data controller 18. The set and reset instructions are used to simulate the R-S flip-flops in RAM memory 28. If a set instruction is executed, and the line 42 has a logic &#34;one&#34; data state the condition for setting the R-S flip-flop is satisfied. The instruction decoder 13 which is responsive to the signal on line 42 writes, by means of the line 23 a logic &#34;one&#34; data state into the RAM memory 28 location, simulating a setting of a R-S flip-flop. However, if the line 42 has a logic &#34;zero&#34; data state during execution of the set instruction, the condition for setting of the R-S flip-flop is not satisfied; and the decoder 13 being responsive to the signal line 42 does not produce a write pulse on the signal line 23. 
     If a reset instruction is executed and the signal line 42 has a logic &#34;one&#34; data state the condition for resetting the R-S flip-flop is satisfied, the decoder 13 writes a logic &#34;zero&#34; data state, provided by the data controller 18 under control of line 25, into the RAM memory 28. However, if the line 42 has a logic &#34;zero&#34; data state, indicating that the condition for reset is not satisfied, the decoder 13 does not produce a write pulse on line 23. 
     Should there be employed a convention that a logic &#34;zero&#34; data state on the signal line 42 indicates a satisfied R-S flip-flop reset condition, the data controller 18 could be removed from the microprocessor&#39;s hardware, and signal line 42 could be directly connected to the signal line 36. 
     The instruction decoder 13 can decode the set, reset and copy instructions either from the address code 22 of the instruction word 20 or by means of two additional bits, assigned conditionally to the operation code 21. 
     The instruction decoding from the address code 22 of the instruction word 20 can be provided by means of a comparison with two address references provided within the decoder 13. If the address code 22 of an output instruction is smaller than the first address reference, a set instruction is decoded. If the address code 22 of an output instruction 20 is larger than the absolute value of the complement of the first address reference, a reset instruction is decoded. If the address code 22 of an output instruction 20 is larger than the first address reference and smaller than the second address reference, a copy instruction is decoded. If the address code 22 of an output instruction 20 is larger than the second address reference but smaller than the absolute value of the complement of the first address reference, an output device 42 is selected. 
     If the address code 22 of an input instruction 20 is smaller than the aforementioned second address reference, the input data is fetched from the RAM memory 28. However, if the address code 22 of an input instruction 20 is larger than the second address reference, the input data is provided from external devices via multiplexer 29 being a part of the I/O data storage 19. 
     It is preferable, however, that the microprocessor uses an instruction word 20 with a variable length of its operation code 21. The operation of such instruction word is now explained in reference to FIG. 5. The input instructions 20 require only two operation code bits: B 0  and B 1 . The remaining bits B 2  through B 7  are the address code 22 of the instruction word 20. The output instructions are divided into the copy instructions and the set/reset instructions. The copy output instructions require a three bit operation code comprising bits B 0 , B 1  and B 2  with the remaining bits B 3  through B 7  addressing the locations of the output data. The set/reset output instructions require a four bit operation code, and the remaining bits of the instruction word 20 address the locations of the simulated R-S flip-flops. 
     The decoding of the output instructions from the address code of the instruction word requires more hardware than the decoding from the operation code. It has, however, better flexibility in addressing the RAM memory 28, input devices 31-1 . . . 32-n and output devices 34-1 . . . 34-n. 
     As mentioned earlier, the J-K flip-flops are simulated by a tandem operation of two R-S flip-flops. The operation of such tandems is now explained in reference to FIG. 6. The waveform 43 represents clock pulse train P provided on the signal line 27 either by an input device 32-1 . . . or by a simulated R-S flip-flop in the RAM memory 28. The waveforms 44 and 45 represent logic levels of two R-S flip-flops, A 1  and A 2 , working in a tandem. The R-S flip-flops A 1  and A 2  are simulated in two locations within the Nx1 bit RAM memory 28. The flip-flop A 1  is set by logic function A 2  P, and flip-flop A 2  is set by A 1  P. The flip-flop A 1  is reset by A 2  P, and the flip-flop A 2  is reset by A 1  P. As a result of this tandem operation, the R-S flip-flops A 1  and A 2  change their states only in response to the clock P 43 transitions, as shown in FIG. 6. 
     The counter is built with J-K flip-flops. The FIG. 6 also shows two additional tandems of R-S flip-flops, B and C. The tandem B is built with R-S flip-flops B 1  and B 2  and is represented by the waveforms 46 and 47. The tandem C is built with R-S flip-flops C 1  and C 2  and is represented by the waveforms 48 and 49. The tandems B and C operate similarly to the tandem A, built with flip-flops A 1  and A 2 , except that they are responsive to the output of the preceding J-K flip-flop instead of the clock waveform 43. As a result, the flip-flop B 1  is set by A 1  A 2  B 2 , and the flip-flop B 2  is set by A 1  A 2  B 1 . The flip-flop B 1  is reset by A 1  A 2  B 2 , and the flip-flop B 2  is reset by A 1  A 2  B 1 . Similarly, flip-flop C 1  is set by B 1  B 2  C 2 , and flip-flop C 2  is set by B 1  B 2  C 1 . The flip-flop C 1  is reset by B 1  B 2  C 2 , and the flip-flop C 2  is reset by B 1  B 2  C 1 . 
     Since the aforementioned J-K flip-flops form a chain of J-K flip-flops in which each preceding J-K flip-flop provides a clock for the succeeding J-K flip-flop, they form a three stage counter. 
     There can be various modifications to the set and reset conditions of R-S flip-flops, however, the tandem operation of the R-S flip-flops is the necessary condition to simulate the J-K flip-flops. 
     The microprocessor 50 can be packaged in several ways. The preferable form is by way of an integrated circuit which includes all the microprocessor hardware 50 shown in FIG. 1. During programming of the ROM memory 12, the signal line 52 is activated and it provides for storing the externally provided instruction words 20 in the ROM memory 12. The instruction words 20 are provided on signal lines 53. The countup signal line 54 advances the address register 11 which addresses the consecutive ROM memory 12 locations to allow for programming of each of the ROM memory 12 locations. The reset signal line 55 provides initialization of the chip, which includes setting to logic zero all of R-S flip-flop locations in the RAM memory 28. 
     There can be several modifications to the hardware presented in FIG. 1. The most apparent modification is to use an AND operator instead of the NAND operator 15. However, since the purpose of this disclosure is to provide an illustrative description of the invention, no attempt is made to describe all of the microprocessor variations which fall within the spirit and scope of the invention. 
     Having thus described what is at present considered to be the preferred embodiment of the subject invention;