Abstract:
A two-bus, two instruction type, pipelined microprocessor having a control means which orders application of instruction and data addresses to a memory and further interleaves instructions and data on a single bus to achieve maximum efficiency in operation.

Description:
BACKGROUND OF THE INVENTION 
     The subject invention pertains to microprocessors, and particularly microprocessors used in signal processing where operations must be performed in real time at tremendously high rates, on the order of millions of operations per second. The subject invention pertains to a microprocessor architecture method and apparatus for operating at rates over two million operations per second. 
     A microprocessor configured according to the preferred embodiment employs two instructions types: those which do and those which do not require external memory fetch. Those instructions requiring no external memory fetch will be referred to as Type I instructions, while those requiring data to be fetched from external memory will be referred to as Type II instructions. Generally, Type II instructions are comprised of two parts: one part being the Operand-Fetch rule, the other being the Operation rule. A verbalization of a Type I instruction might be, for example, &#34;Complement the Accumulator,&#34; while a verbalization of a Type II instruction might be, for example, &#34;Fetch the contents of memory being pointed to by index register R 3  and add this number to the accumulator.&#34; 
     As alluded to, a very important measure of microprocessor performance, especially for signal processors, is the number of operations per second that can be performed. In order to maximize the number of operations per second, it is desirable to achieve maximum exploitation of each clock cycle as microprocessor operation. A well-known technique for more efficiently using each microprocessor cycle is so-called &#34;pipelining&#34; whereby one or more subsequent instructions are fetched before the execution of the first is completed. 
     It is also desirable to use few buses in the microprocessor architecture in order to reduce the number of input-output pins, simplify external memory and allow a von Neumann architecture wherein instruction and data memory may share the same devices. 
     The subject invention finds particular application in a microprocessor employing Type I and Type II instructions, pipelining and two buses--an address bus and instruction-data bus. In such a machine, the different types of instructions and delays involved lead to difficulties with organization of processing operations and thus to resultant waste of precious computing time, detracting from the number of operations per second which can be accomplished. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is an object of the invention to enhance the computing power of microprocessors; 
     It is a further object to achieve synchronization of operation flow in a machine involving several different types of instructions so as to optimally utilize microprocessor cycles. 
     It is a more particular object of the invention to enhance the efficiency of a microprocessor employing a pipelined, two instruction type, two bus architecture. 
     These and other objects and advantages are accomplished according to the invention by provision of a means which controls the order of application of instruction and operand addresses to a memory and times the provision of the resultant instructions and operands to the arithmetic section in such a way that no available time slots on the memory address bus are unused. 
     The apparatus is organized such that the operand for instruction N, if required, is fetched immediately after the fetch of instruction N+K, where K is determined by the pipeline delay of the processor, and such that an instruction is fetched immediately after each operand fetch. In the preferred embodiment, this method is applied in a processor having a single memory, a single memory address bus, and a single bus for transferring the results of both operand and instruction fetches to the arithmetic and control sections. The control section in turn implements the address method by selecting the address sequence and coordinating application of instructions and operands to the arithmetic section. 
     Several advantages are achieved by the invention. First, instructions and data can be interleaved on the same bus. During every cycle a useful memory fetch is performed. Maximum flexibility in instruction encoding is allowed. The execution rate of instructions is as nearly uniform as possible. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a block diagram of the preferred embodiment of the invention. 
     FIG. 2A illustrates the interleaving of instructions, data, and addresses and relative timing of appearance thereof on the address bus and instruction data bus of the preferred embodiment. 
     FIG. 2B illustrates the operation of the IRS-1.5 signal which serves as bus arbitrator. 
     FIG. 2C illustrates the timing of decoder inputs relative to other operations of FIG. 2. 
     FIG. 2D illustrates the timing of appearance of addresses at points in the structure of FIG. 1 and relative data address request and control states. 
     FIG. 2E illustrates timing and positioning of instruction register contents, execution register contents, X register contents, and the related signal. 
     FIG. 3 is a typical program segment useful in illustrating the preferred embodiment. 
     FIG. 4 is a state diagram and truth table illustrating operation of the state sequencer of the preferred embodiment. 
     FIG. 5 is a logic diagram of the state sequencer. 
     FIG. 6 shows illustrative instruction formats. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The microprocessor structure of the preferred embodiment is shown in FIG. 1. As shown, this microprocessor employs two buses, a memory address bus 11 and an instruction/data bus 13. 
     The memory address bus 11 provides addresses, via an address register 17, to a memory 19. In response, the memory 19 outputs data and instructions to the instruction/data bus 13, via a memory output register 23. 
     A program counter and stack 15 provides program addresses to the address bus 11 over a program address bus (PAB) 12. A control line 30 to the program counter controls jumps, subroutine calls and returns. 
     In response to an address from the program counter and stack 15, the memory 19 may output a Type I or Type II instruction through the memory output register 23, over the instruction/data bus 13, to an input register 25. From the input register 25, the instruction is applied to an address instruction decoder 29 and is entered into an instruction register 27. 
     The address instruction decoder 29 decodes the operand-fetch portion of the instruction and applies the decoded output over a data address control line 31 to a data address generator 33. The data address generator 33 outputs a data address on the data address bus (DAB) 10 to an elastic buffer 35 which may store one data address for later application to the memory 19. The data address generator 33 preferably employs the technique of indirect addressing known in the art. The preferred embodiment employs four index registers each of which may generate an address. The address instruction decoder 29 selects the appropriate index register. In operation, the instruction under consideration may contain a command to read an index register and a displacement field. The address in the indicated index register is then read onto the data address bus 10 and concurrently its contents are incremented or decremented in accordance with the contents of the displacement field. 
     Some operand fetch rules may require performance of a write to memory operation. In this case the WRITE signal 60, via address register 17, conditions the memory 19 to write the data existing the accumulation register(s) 43 to the memory 19 via a register 62. This same data will appear on the instruction/data bus 13 in the same manner as the result of a read cycle. 
     Other address generation techniques are known and usable, and the invention is not limited to a specific technique. 
     As alluded above, an instruction on the instruction/data bus 13 is also placed in the instruction register 27 for eventual execution by the microprocessor. Execution is accomplished by conventional circuitry including an execution register 36, an operation decoder 37, a register 39, an arithmetic logic unit (ALU) 41, an accumulator 43 and a data register 44. The operation decoder 37 decodes the instruction and supplies the decoded output to the execution register 36. The data register 44 stores a data word which is required for execution of the command contained in the execution register 36. The loading of the data register 44 is controlled by an IRSO signal 53. The other data input to the ALU 41 is the output of the accumulator 43, transferred on a lead 47. 
     The arithmetic section may employ more than one accumulator and preferably has two. Thus, the &#34;A&#34; input to the ALU 41 may come from either the first or second accumulator. Preferably, an instruction is provided which will allow the output of either accumulator to be put back in memory 19. The ALU 41 itself typically involves several units of pipeline delay. As will be taught below, data in the preferred embodiment is timed to arrive at the B input of the ALU 41 simultaneously with the arrival of the appropriate command in register 39. 
     Practical delays associated with the decoder 29 and associated combinatorial logic of the microprocessor dictate 11/2 cycles for interpretation of the operand fetch rule and generation of the address of the operand. This minimum decoder delay is illustrated in FIG. 2A where it is shown that address AD o  appears on the address bus 11/2 cycles after instruction I o  appears on the I/D bus 13 (and hence at the input of the input buffer 25 of the address instruction decoder 29). In addition, and also as illustrated in FIG. 2A, 11/2 cycles are required for the memory to return the data, given the address. The total time, three cycles, is consistent with the preferred logic family, NMOS LSI, and constitutes the &#34;pipeline delay&#34; of the preferred embodiment. This logic type also dictates the maximum rate of the system operating clock. 
     Prior to discussion of the preferred technique for interleaving instructions and data, it should also be noted that several registers described above function as &#34;framing&#34; registers. Such registers do not store, but rather provide a suitable delay and, in addition, shape up and sharpen the signals transferred through them. The framing registers in FIG. 1 are the address register 17, the memory output register 23, the input buffer 25, the execution register 36, and the register 39 at the output of the operation decoder 37. 
     According to the invention, optimum interleaving of instruction addresses and data addresses on the address bus 11 and instructions and data on the instruction/data bus 13 is accomplished by means of a DOB (data on bus) generator 45. As shown, the DOB generator 45 receives an input from the address instruction decoder 29. This is the DAR (data address request) signal which occurs concurrently with production of a data address by the data address generator 33. The DAR signal on line 47 indicates whether the decoded instruction entails a data fetch or not. 
     The DOB generator 45 supplies five control signals on respective lines 49, 50, 51, 52, 53. The first control signal DAB BUF LOAD, line 49, determines when the DAB buffer 35 is to be loaded from the data address bus (DAB) 10. 
     The second, third and fourth control signals 50, 51, 52 are supplied to a selector gate 14 which selects the output to be supplied to the memory address register 17 over the memory address bus 11. The control signal PAB SELECT on line 50 determines whether a program address from the program address bus, (PAB) 12 is gated to the address register 17. It also increments the program counter 15. The control signal on the DAB SELECT line 51 determines whether the output of the data address generator is outputted to the address register 17. The control signal DAB BUF SEL, line 52, determines whether the output of the DAB Buffer 38 is outputted to the address register 17. Thus, the control signals 50 and 51 provide the &#34;elasticity&#34; of the buffer. Also, when the DOB generator causes a data address out, it inhibits the program counter 15. 
     The fifth control signal line 53 supplies the IRSO signal to the instruction register 27 and the data register 44. When the control signal IRSO is true, the instuction register 27 will be shifted. When the control signal IRSO is false, the data register 44 will be loaded. 
     The function of the DOB generator 45 is to generate the micro-timing slots (IRS signal), to serve as a bus arbitrator for the DAB, DAB Buffer and PAB Buses and to increment the program counter FIG. 4 shows the state. Map for all possible DOB states and the required conditions for movement from state to state. 
     As mentioned earlier, instructions may be classified into two types: 
     A. Those that fetch an operand; i.e., create a data slot. (Type II) 
     B. Those that do not fetch an operand; i.e., do not create a data slot. (Type I) 
     The rules for interleaving the data slots and instruction fetches are: 
     1. The data slot for instruction N, if required, is created immediately after the fetch of Instruction N+2. 
     2. An instruction fetch immediately follows every data slot. 
     The DOB generator 45 selects either a data address or an instruction address. The result of the fetch will be available as an input to the address instruction decoder 29 three bus cycles later. This is due to the Pipeline structure (hardware delays) of the system. 
     As previously stated, the address instruction decoder 29 supplies the DOB generator 45 with a control signal called DAR (Data Address Request). In response to a Type II instruction, this signal DAR will be true, and in response to a Type I instruction it will be false. 
     The following discussion of the DOB generator operation is reflected in the truth table of FIG. 4 and FIGS. 2A to 2E. The table of FIG. 4 illustrates the current state of the processor and the state entered upon changing of DAR. DAR equal to &#34;x&#34; indicates a state which is entered and directly passed through. In addition, the truth table of FIG. 4 indicates the values of the control signals outputted by the DOB generator 45 in each state, and hence the origin of the address supplied to the memory 19. The following discussion begins with the processor in state 14, which is the state the processor enters in response to an externally triggered reset. The processor will remain in state 14 as along as no Type II instructions are decoded (DAR=0). 
     During this state 14 the signal PAB Select equals &#34;1&#34;. The program counter C, 15 is incremented, and its contents are routed to the memory address bus 11. The IRS-1.5 signal will be true, indicating an instruction is on the instruction/data bus 13. The IRS 1.5 signal is a most important one since it establishes the instruction and data slots for the other microprocessor circuits. If in state 14 goes to &#34;1&#34;, indicating the address/instruction decoder 29 was presented with a Type II instruction requiring a data fetch, DAR=1, the DAB bus 10 is enabled and its contents are transferred to the memory address bus 11 directly. At the same time the P.C. counter 15 is inhibited from incrementing. The IRS 1.5 signal goes low, and the DOB generator 45 enters State 6. 
     In State 6, the P.C. counter 15 is incremented. If DAR=0, the contents of the P.C. 15 are put on the memory address bus 11. The IRS 1.5 signal goes high, and the DOB generator 45 enters State 10. If DAR=1, the contents of the P.C. 15 are put on the memory address bus 11, IRS 1.5 is high, the DAB buffer 38 is loaded with the contents of the DAB bus 10. The DOB generator 45 enters State 11. 
     In State 10, the P.C. 15 is incremented. If DAR=0, the contents of the P.C. are put on the Address Bus, IRS 1.5 is high and the DOB generator 45 enters State 12. If DAR=1, the contents of P.C. 15 are put on the memory address bus 11, IRS 1.5 is high, the DAB buffer 38 is loaded from the DAB bus 10, and the DOB generator 45 enters State 13. 
     In State 11, the P.C. 15 is inhibited from counting. If DAR=0, the contents of the DAB buffer 38 are put on the memory address bus 11, IRS 1.5 stays high, and the DOB generator 45 enters State 4. If DAR=1, the contents of the DAB buffer 38 are put on the memory address bus 11 followed by the loading of the register with new information contained on the DAB bus. The IRS 1.5 signal is high, and the DOB generator 45 enters State 5. 
     For states 4, 5, 12 and 13, the address/instruction decoder 29 is inactive because data was on the I/D bus 13, known because IRS +0.5 is low as shown in FIG. 2. 
     In State 4, the P.C. 15 is incremented and its contents are put on the memory address bus 11. IRS 1.5 is low, indicating data is present on the instruction/data bus 13. The DOB generator 45 enters State 10. 
     In State 5, the P.C. 15 is incremented and its contents are put on the memory address bus 11. The DAB buffer 38 is loaded with the contents of the DAB bus 10. IRS 1.5 is low, and the DOB generator enters State 11. 
     In State 13, the P.C. 15 is inhibited from counting. The contents of the DAB buffer 38 are put on the memory address bus 11. IRS 1.5 is high and the DOB generator 45 enters State 6. 
     In State 12, the P.C. 15 is incremented, and its contents are put on the memory address bus 11. IRS 1.5 is high and the DOB generators 45 enters State 14. 
     Thus, the functions of the DOB generator 45 are to generate the micro-timing slots (IRS signal), to serve as a bus arbitrator for the DAB, DAB Buffer and PAB buses and to increment the program counter 15. 
     A logic implementation of the DOB generator 45 is shown in FIG. 5. It includes a number of inverters 55, 56, 57, 58; a number of AND gates 60, 61, 62, 63, 64; a number of NOR gates 67, 68, 69, 70; and four D flip-flops 73, 74, 75, 76; interconnected as shown. The flip-flop outputs are respectively Q 1 , Q 2 , Q 3  and Q 4 , which appear in the truth table of FIG. 4. The input to the DOB generator 45 is DAR, and the outputs generated include IRS-1.5, and control signals DAB BUF LOAD; DAB BUF SELECT, PAB SELECT/PC INCREMENT; and DAB SELECT. The function of this circuit is illustrated by the DOB generator truth table of FIG. 4, and the state sequence diagram. 
     At this juncture, some points with respect to the IRS signal may be summarized. This signal is employed to indicate to various units of FIG. 1 whether a data word (operand) or instruction word is present. Due to propagation delays, various delayed versions of the IRS signal are used such as IRS+0.5 and IRSO. 
     To illustrate further, the DOB logic generates the signal IRS x -1.5 as shown in FIG. 5. As shown in FIG. 2, IRS -1.5 is aligned with the output on the memory address bus 11. When an instruction is on the memory address bus 11, IRS -1.5 is high; when a data address AD is present, IRS -1.5 is low. 
     As the signal Bus +0.5 of FIG. 2C indicates, the input to the address instruction decoder 29 receives the contents outputted onto the instruction/data bus 13 one-half cycle after that output occurs, and two cycles after the address appears on the memory address bus 11. Therefore, the IRS -1.5 signal is delayed two cycles to produce the signal IRS +0.5 in order to properly indicate to the address instruction decoder 29 whether its input is an instruction or data entity. As explained herein, the address-instruction decoder 29 is disabled by data arrival. 
     It will also be observed from the nomenclature employed that the signal IRSO is IRS x -1.5 delayed by 1.5 cycles. As illustrated in FIG. 1, IRSO is provided by the DOB generator 53 of FIG. 1 to the instruction register 27. As indicated by FIG. 2E, IRSO is further delayed such that IRS +0.5 is used to control the actual shifting operations of register 27. The overall consideration is to properly align a signal indicating instruction or data arrival at the decoder 29, or at the instruction register 27 or XREG 45, as illustrated in FIG. 2E. The subject IRS delays of the preferred embodiment are associated with the timing constraints of the preferred NMOS logic. Those skilled in the art will readily recognize other adaptations in accordance with the invention. 
     An example of operation will now be presented with reference to FIG. 2 and FIG. 3. We assume the previous history of the machine was such that three instructions in a row will be fetched from the memory 19, each of which requires a data fetch. FIG. 3 shows a segment of a routine which requires such a series of instructions. 
     In FIG. 2, I 0 , I 1 , I 2  each require a data slot. I 0  is decoded as quickly as possible and the address AD 0  for the data slot required by I 0  is placed on the DAB 10, and thence to the memory address bus 11 as quickly as possible. Note that the combination of the memory delay and minimum decoder delay requires three clock cycles between the time zero, the time the address for I 0  is on the memory address bus 11, until the time AD 0  appears on the bus. I 1  reaches the I/D bus 13 adjacent to I 0 , but according to the operating rule for the DOB generator 45, the Address &#34;3&#34; for I 3  was placed on the address bus prior to placing AD 1 , the address for the data for I 1 , on the address bus 11. This results in 4 units of delay between I 1  being on the I/D bus 13 and I 1  &#39;s data, D 1 , being on the I/D bus 13. Similarly, I 2  &#39; s data D 2  does not go onto the I/D bus 13 until after I 4  is fetched, and this results in 5 units of delay between the time when I 2  is on the I/D bus 13 and when D 2  is on the I/D bus 13. 
     Meanwhile, the instructions I 0 , I 1 , I 2  go into the instruction register 27 under control of the IRSO signal (shown in FIG. 2E). When a data slot is generated, IRSO goes low, so there will be no shift when a data slot is appearing on the I/D bus 13. Thus, instruction I 0  reaches the execution register 36 1/2 clock cycle before the data D 0  is mapped into the data register 44. (This is seen in FIG. 2E on lines EXEC REG and X REG). Then the decoder output C(I 0 ) is supplied to the ALU 41 at the same time as D 0  via the framing register 39. 
     FIGS. 2D and 2A show the action of the elastic buffer 35 in conjunction with the DOB generator 45. This is particularly seen by comparing the DAB bus output &#34;DAB&#34; to the I/D bus 13. AD 0  appears on the DAB bus 10 one cycle after I 0  appears on the I/D bus 13. AD 1  appears on the DAB bus 10 one clock cycle after I 1  appears on the I/D bus 13 and is buffered by the elastic buffer 35 in its data address buffer 38. Concurrently with this buffering, the address of instruction 3 is placed on the address bus. The buffer&#39;s action is seen, since not until after &#34;3&#34; on the address bus does AD 1   appear on the address bus. Thus, AD 1  was stepped from the data address generator 33 to the DAB buffer to the 38 memory address bus 11. 
     The data address AD 2  is delayed in the DAB buffer 38 (FIG. 2D) longer to permit both AD 1  and &#34;4&#34; to appear on the memory address bus 11. Address AD 2  can remain in the buffer 38 for 2 cycles because of D 0  &#39;s arrival in the data register 44. That is, the arrival of D 0  disables the decoder 29 by the action of IRS +0.5. Hence, no new data address can be generated. 
     FIG. 3 shows a series of instructions resulting in the patterns shown in FIG. 2. In FIG. 3, the symbol &#34;;1&#34; indicates that a data slot is associated with the instruction appearing immediately above the symbol. The first instruction, I 0 , is a &#34;Read at Register 1&#34; or RR1 instruction which requires a data fetch, combined with a &#34;move positive to A 0  &#34; or &#34;MVP&#34; operation. The second instruction I 1  is a RR1-1 and Add to A 0 . (Notice that I 0  includes a +1 which is an increment for the index register so that the next fetch at this register would be from the next higher memory location.) The third instruction I 2  is a &#34;Read Register 3&#34; RR3 and &#34;move positive to A 1  &#34;. The fourth instruction I 3  is a &#34;Jump&#34;. Instruction I 4  gives the destination of the jump. It will be noted that the Valid +0.5 signal (FIG. 2) goes low, indicative of the fact that I 4 , the jump address, is not a valid instruction, i.e., one requiring decoding. Instruction I 5  is a &#34;Write at Register 1&#34; instruction. Since the second instruction I 1  contained a decrement (-1), we would have repointed register 1 back to the first memory location, i.e., the location read by the first RR1 instruction. 
     Because of delays through the machine, the PC 15 is not affected by the Jump until instruction I 4 , the destination of the Jump, appears on the I/D bus 13. Therefore, instruction I 5  will still be fetched from the old value of the PC 15. When I 4  appears on the I/D bus 13, the PC 15 is modified so that the next fetch is for instruction I 80  from memory location 80. The &#34;jump&#34; and &#34;PC equals&#34; instructions at addresses 3 and 4 require no data slot. Therefore, by the action of the DOB generator 45, a stream of 3 instructions in a row without any intervening data slot occurs after address AD 2 . The &#34;Write at Register 1&#34; instruction I 5  results in the address AD 5  being inserted 3 slots after the address &#34;5&#34; is on memory address bus 11. (See FIG. 2) Because of operation of the DOB generator 45, the instructions are operated on as uniformly as possible, while maintaining D 2  available for several slots. 
     The ALU 41 may have operations longer than a single cycle. The IRSO and nature of the instruction register 27 can be used to inhibit second execution of IR3. One can achieve elasticity by using the delay of the I register 27. 
     FIG. 6 shows illustrative instruction formats. FIG. 6A is a Type II instruction. The particular one illustrated is an indirect read. The first segment of the instruction indicates the type of data fetch. The second segment indicates the displacement to be added to the index register contents. The third segment gives the index register designation. These three segments constitute the Operand-Fetch rule. The fourth segment gives the Operation to be performed. 
     FIG. 6B shows an illustrative Type I instruction. The first bit segment indicates that a particular register&#39;s contents are to be used as an operand. Note that a register fetch does not require a bus cycle. The second segment indicates the identity of the register, and the third segment indicates an operation to be performed. For example, this instruction might say &#34;take the contents of a register and add it to the contents of the accummulator.&#34; An advantage of the particular architecture of the invention is that there is flexibility in use of the bit positions of instructions, i.e., there are no rigid requirements to the instruction formats. 
     Those skilled in the art will recognize that the preferred embodiment described above is subject to numerous modifications and adaptations. Therefore, it is to be understood that, within the scope of the appended claims, the invention may be practiced other than as specifically described herein.