WO2006096250A2 - Single-cycle low-power cpu architecture - Google Patents
Single-cycle low-power cpu architecture Download PDFInfo
- Publication number
- WO2006096250A2 WO2006096250A2 PCT/US2006/002552 US2006002552W WO2006096250A2 WO 2006096250 A2 WO2006096250 A2 WO 2006096250A2 US 2006002552 W US2006002552 W US 2006002552W WO 2006096250 A2 WO2006096250 A2 WO 2006096250A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- address
- instruction
- register
- ram
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/3012—Organisation of register space, e.g. banked or distributed register file
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3818—Decoding for concurrent execution
- G06F9/382—Pipelined decoding, e.g. using predecoding
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3824—Operand accessing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3824—Operand accessing
- G06F9/3826—Bypassing or forwarding of data results, e.g. locally between pipeline stages or within a pipeline stage
Definitions
- the present invention is related to integrated circuits. More specifically, the present invention is an apparatus and method for a microcontroller architecture which implements an instruction pipeline to speed program execution and reduce power consumption.
- Raising the system clock frequency is an often- used method for improving the computational performance of a central processing unit (CPU) within a microprocessor or microcontroller. It is appreciated by those skilled in the art that the typical power (P) consumed by a CPU depends upon the total CPU gate capacitance (C) , the power supply voltage (V) , and the system clock frequency (f) according to the formula:
- the power consumption can be reduced by lowering C, V, or f.
- the on-chip capacitance (C) is established by the quantity of gates required to implement a design. Established designs are usually optimized in terms of minimizing the gate count needed to realize the required logic, and typically offer little opportunity for improvement.
- the operating voltage (V) is limited by process technology and associated operating characteristics of transistors built upon that technology.
- the system clock frequency (f) often provides the best opportunity for improvement. By reducing the number of clock cycles required to complete an instruction, the system clock frequency can be lowered to reduce power while maintaining computational throughput. Alternately, the system clock frequency can be maintained and a higher rate of computation can be performed for a given power expenditure. In either case, the energy required per computation is reduced.
- the present invention is an apparatus and method for an instruction pipeline in a CPU.
- the present invention is incorporated into a microcontroller which operates on the MCS-51 instruction set with 16-bit addresses and 8- bit data.
- Microcontrollers which utilize the MCS-51 instruction set are known by skilled artisans as 8051 microcontrollers.
- a block diagram of an 8051 microcontroller as known in the prior art has an internal bus providing a common path for communication between a read-only memory (ROM) , a random access memory (RAM) , and an arithmetic logic unit (ALU) .
- An address register (AR) , an accumulator register (ACC) , a temporary register (TMP) , a data pointer register (DPTR) and a stack pointer register (SP) are each attached to the internal data bus .
- the typical 8051 microcontroller known in the prior art requires three system clock cycles to fetch a single byte instruction from read-only memory (ROM) to an instruction register (IR) .
- the present invention reduces the single-byte instruction fetch to a single system clock cycle.
- the instructions in the MCS51 instruction set are one, two, or three bytes in length. In prior-art 8051 microcontrollers, the instruction fetch operations can therefore require up to nine system clock cycles:
- a single cycle per byte fetch is enabled by means of a 16 -bit address arithmetic unit (AAU) coupled to a program counter (PC) and a dedicated increment/decrement unit coupled to a stack pointer (SP) .
- the program counter (PC) is continually incremented by a value of "1" with each instruction byte fetched in order to maintain the instruction pipeline, but the stack pointer (SP) can be independently pushed or popped to enable servicing interrupts.
- a random access memory (RAM) is used to preserve the program counter (PC) value during interrupt servicing and to restore the program counter (PC) value upon return from the interrupt subroutine.
- a dedicated buffer preserves the correct return address during interrupt or software calls for pushing onto the RAM.
- a further improvement over the prior art is implemented by utilizing separate registers to provide random access memory (RAM) read address storage and write address storage.
- the dedicated RAM write address register makes it possible to defer a write operation associated with an instruction.
- the deferred write operation enables instructions to effectively complete operation during a given system clock cycle, with the associated write operation occurring in the following system clock cycle.
- the deferred RAM write capability makes it possible to avoid stalling the instruction pipeline by a pending write operation.
- the separate RAM read address storage and RAM write address storage registers also enable a data pass-through capability in the RAM: When both registers are provided with the same RAM address, data present in a RAM data storage register is immediately made available on the RAM output, while simultaneously being written to the addressed storage area.
- the pass-through feature makes it possible for the results of a computation to be available to further processing with minimum time delay, further enabling the capabilities of the instruction pipeline.
- An instruction pre-decode path is provided from the read-only memory (ROM) to the random access memory (RAM) which is used to speed execution of register operations, bypassing the normal decode process.
- ROM read-only memory
- RAM random access memory
- a register bank forwarding path prevents the pipeline from stalling when a register operation follows a change of the active register bank in a program status word (PSW) .
- PSW program status word
- a dedicated data path is provided from the RAM data output directly to an 8 -bit data arithmetic logic unit (ALU) without an intermediate temporary storage register.
- a dedicated data path is also provided from the arithmetic logic unit (ALU) to the RAM data input register.
- the dedicated data path features provide a high-throughput path enabling data to be read from the RAM, processed, and subsequently written back to the RAM. This is an improvement over the prior art 8051 microcontrollers that utilize a single internal bus.
- the combined improvements embodied by the dedicated data paths, the instruction pre-decode and bank forwarding, and the separate RAM read and write address registers allows a complete a register increment instruction in a single system clock cycle, and a register indirect increment in two system clock cycles.
- Fig. 1 is a block diagram of an 8051 microcontroller as known in the prior art.
- Fig. 2 is an architecture block diagram of a pipeline portion of a CPU according to an exemplary embodiment of the present invention.
- Fig. 3 is a timing diagram for instruction pipelining with single-byte instructions in accordance with an exemplary embodiment of the present invention.
- Fig. 4 is a timing diagram for instruction pipelining with single-byte and two-byte instructions in accordance with an exemplary embodiment of the present invention.
- Fig. 5 is a diagram of activity within an arithmetic logic unit (ALU) when executing single-cycle instructions in accordance with an exemplary embodiment of the present invention.
- Fig. 6 is a diagram of activity within an arithmetic logic unit (ALU) when executing two-cycle instructions in accordance with an exemplary embodiment of the present invention.
- ALU arithmetic logic unit
- Fig. 7 is an exemplary architecture block diagram of an address computation portion of a CPU according to the present invention.
- Fig. 8A is an illustration of address buffer utilization in accordance with an exemplary embodiment of the present invention during regular instruction execution.
- Fig. 8B is an illustration of address buffer utilization in accordance with an exemplary embodiment of the present invention during a hardware interrupt execution.
- Fig. 8C is an illustration of address buffer utilization in accordance with an exemplary embodiment of the present invention during a software interrupt execution.
- Fig. 9 is an exemplary architecture block diagram of an instruction pre-decode and RAM access portion of a CPU according to the present invention.
- Fig. 10 is a timing diagram for a register increment instruction in accordance with an exemplary embodiment of the present invention.
- a central processing unit (CPU) pipeline architecture portion 200 comprises an arithmetic logic unit (ALU) 210 having a first data input, a second data input, and a data output.
- the arithmetic logic unit (ALU) 210 is configured to operate upon eight-bit binary numbers.
- the data output of the arithmetic logic unit (ALU) 210 is coupled to an accumulator register (ACC) 290, and to a random access memory (RAM) 270.
- the exemplary embodiment contains an address arithmetic unit (AAU) 215 having a first data input, a second data input, and a data output.
- the address arithmetic unit (AAU) 215 is configured to operate upon sixteen-bit binary numbers.
- the data output of the address arithmetic unit (AAU) 215 is coupled to a program counter (PC) 220.
- the random access memory (RAM) 270 is organized as 256x8 bits, for a total storage capacity i of 256 bytes.
- the program counter (PC) 220 is further coupled to a read-only memory (ROM) 230 and to the first data input of the address arithmetic unit (215) .
- the read-only memory (ROM) 230 is used to store the CPU program (i.e. the sequence of instructions to be executed by the CPU) .
- a program based on the MCS-51 instruction set is resident in the read-only memory (ROM) 230.
- An address value stored in the program counter (PC) 220 is used to select a specific instruction in the read-only memory (ROM) 230 to be passed to an instruction register (IR) 240.
- the instruction register (IR) 240 provides temporary storage to an instruction prior to passing the instruction to an instruction decoder 250.
- the instruction decoder 250 is coupled to the second data input of the address arithmetic unit (AAU) 215, and to the random access memory (RAM) 270.
- a function of the instruction decoder 250 is to recognize the arithmetic/logic operations required by an instruction and to pass the necessary data to the arithmetic logic unit (ALU) .
- An additional function of the instruction decoder 250 is to cause the address arithmetic unit (AAU) 215 to increment the program counter (PC) 220 when required.
- the random access memory (RAM) 270 is further coupled to a RAM address register (AR) 260.
- a RAM/ALU link 280 couples the random access memory (RAM) 270 to the second data input of the arithmetic logic unit (ALU) 210.
- the first data input of the arithmetic logic unit (ALU) 210 is coupled to the accumulator register (AGC) 290.
- the RAM/ALU link 280 provides an eight-bit dedicated data path to convey data from the random access memory (RAM) 270, that is, data from a read operation, to the arithmetic logic unit (ALU) 210.
- Microcontrollers known in the prior art which utilize the MCS-51 instruction set typically employ a shared internal bus requiring the RAM to drive data onto the bus with subsequent storage in a temporary register.
- the implementation of the RAM/ALU link 280 as a dedicated data path provides a significant improvement in the performance of Central processing unit (CPU) pipeline architecture portion 200.
- CPU Central processing unit
- Skilled artisans will recognize that data signal path directions are indicated by arrows in Fig. 2.
- additional logic blocks not shown in Fig. 2 and the figures infra, may exist and be coupled to the illustrated blocks, in order to provide the full capability of executing the
- the first exemplary timing diagram 300 comprises a first example system clock waveform 310, an n th instruction activity diagram 320, an (n+l) th instruction activity diagram 330, and an (n+2) th instruction activity diagram 340.
- Fig. 3 indicates that during a system clock interval T n , the n th instruction undergoes a fetch operation.
- the n th instruction executes.
- the (n+l) th instruction undergoes a fetch operation.
- the n th instruction has completed execution.
- the (n+l) th instruction executes and the (n+2) th instruction undergoes a fetch operation.
- the concurrency between instruction fetch and instruction execution improves an overall computational performance of the CPU and is known by skilled artisans as a two-stage pipeline.
- the operational characteristics of the two-stage pipeline when executing a combination of single-byte and two-byte instructions are introduced with reference to Fig. 4, a second exemplary timing diagram 400 for instruction pipelining with single-byte and two-byte instructions according to the present invention.
- the second exemplary timing diagram 400 comprises second example system clock waveform 410, an n th instruction activity diagram 420, an (n+l) th two-byte instruction activity diagram 430, an (n+2) th two-byte instruction activity diagram 440, and an (n+3) th instruction activity diagram 450.
- Reference to the figure shows that during a system clock interval T n , the n th instruction undergoes a fetch operation. At subsequent system clock interval T n+ i, the n th instruction executed.
- a first instruction byte of the (n+1) th two-byte instruction undergoes a fetch operation.
- the n th instruction has completed execution, and the second instruction byte of the (n+l) th two-byte instruction undergoes a fetch operation.
- the (n+l) th two-byte instruction executes, and first instruction byte of the (n+2) th two- byte instruction undergoes a fetch operation.
- the second instruction byte of the (n+2) th two-byte instruction undergoes a fetch operation.
- Single-cycle ALU operation diagram 500 comprises a single-cycle example system clock waveform 510, a single-cycle total execution time activity diagram 520, a single-cycle register operand fetch activity diagram 530, a single-cycle ALU operation execution activity diagram 540, single-cycle result write back activity diagram 550, and a single-cycle fetch next instruction activity diagram 560.
- a fetch next instruction operation spans the entire system clock interval T 1 .
- a register operand fetch and an ALU operation execute; each are active for only a portion of the system clock interval T ⁇ . Further inspection of the figure indicates that a portion of the ALU operation execute occurs concurrently with the register operand fetch operation.
- the result write back operation occurs at the beginning of the next system clock interval T 2 . The delay of the result write back operation will be explained infra. Attention is now directed to Fig.
- Two-cycle ALU operation diagram 600 comprises a two- cycle example system clock waveform 610, a two-cycle total execution time activity diagram 620, a two-cycle fetch immediate operand diagram 630, a two-cycle ALU operation execution activity diagram 640, a two-cycle result write back activity diagram 650, and a two-cycle fetch next instruction activity diagram 660. Events occur within the time span of a system clock interval T 1 and a system clock interval T 2 , which in combination corresponds to the total execution time for a two-cycle instruction.
- a fetch immediate operand instruction executes during the system clock interval T 1 and concludes at the rising clock edge of the two-cycle example system clock waveform 610 separating the system clock interval T 1 and the system clock interval T 2 .
- An ALU operation execute and a fetch next instruction operation initiate at the beginning of the system clock interval T 2 .
- the ALU operation execute concludes at a falling edge of the two-cycle example system clock waveform 610, at the approximate middle of the system clock interval T 2 .
- a result write back operation begins at the rising edge of the two-cycle example system clock waveform 610, at the beginning of the system clock interval T 3 .
- the fetch next instruction operation concludes at the rising clock edge of the two-cycle example system clock waveform 610 separating the system clock interval T 2 and the system clock interval T 3 .
- a CPU address architecture block diagram 700 comprising the address arithmetic unit (AAU) 215, the program counter 220, an address buffer 730, a first multiplexer 735, a data pointer register 740, a second multiplexer 750, a third multiplexer 755, a stack pointer 770, a stack pointer increment/decrement unit 780, and an offset register 790.
- Data paths within the CPU address architecture block diagram 700 are indicated by lines, and directions of data flow are further indicated by arrowheads .
- the second multiplexer 750 is coupled to the program counter (PC) 220, to the data pointer register 740, and to the first data input of the address arithmetic unit (AAU) 215.
- the multiplexer 750 selects one of an address value contained in the program counter 220 and an address value contained in the data pointer register 740 for operation by the address arithmetic unit (AAU) 215.
- the third multiplexer 755 is coupled to the accumulator register (ACC) 290, to a constant offset value 760, to the offset register 790, and to the second data input of the address arithmetic unit (AAU) 215.
- the third multiplexer 755 selects one of an address offset value contained in the offset register 790, an address offset value contained in the accumulator register (ACC) 290, and the constant offset value 760 for operation by the address arithmetic unit (AAU) 215.
- the constant offset value 760 is maintained at a value of one ("1"), so that the address arithmetic unit (AAU) 215 is induced to increment an instruction address value to point to a subsequent address value.
- the address arithmetic unit (AAU) 215 operates on 16-bit binary numbers with a capability of a full adder.
- the program counter (PC) 220, the address buffer 730, and the data pointer register 740 are each sixteen- bit registers.
- Microcontrollers known in the prior art which utilize the MCS-51 instruction set typically employ an 8 -bit ALU to increment a data pointer register.
- the prior art data pointer register is typically a 16-bit register. As a result, multiple operations are required in the prior art to perform the increment operation: First, a low-byte portion of an address held by the data pointer is loaded into the ALU. An increment of one is added to the address, and the result is written back to the low byte of the data pointer.
- the 16-bit arithmetic capability of the address arithmetic unit (AAU) 215 of the present invention enables the data pointer register 740 to be updated with a single operation.
- the single . operation update capability improves system operation speed and supports the instruction pipelining operations explained supra.
- the program counter (PC) 220 is updated with every instruction execution.
- the instruction pointed to by the program counter (PC) 220 is one instruction ahead of the instruction being executed. Keeping the address in the program counter (PC) 220 one instruction ahead of the instruction being executed provides a means of maintaining the instruction pipeline.
- the program counter (PC) 220 update occurs with sufficient rapidity to remain ahead of the current instruction. Since the present invention provides execution of instructions as quickly as a single system clock cycle, the program counter (PC) 220 ought to be capable of being updated in a single system clock cycle as well.
- Microcontrollers known in the prior art which utilize the MCS-51 instruction set typically have a dedicated incrementer for the program counter (PC) 220 but employ an 8 -bit ALU to compute relative branch addresses by adding an offset to the program counter (PC) 220.
- the use of an 8-bit ALU to compute the next program counter value for program branches requires multiple clock cycles, for reasons explained supra in association with the discussion of the data pointer register 740.
- AAU program counter 215 and the connection to the offset register 790 and the accumulator register (ACC) 290 through the third multiplexer 755 constitute improvements over the prior art and enable the program counter (PC) 220 updates to keep pace with the instruction execution pipeline.
- the address buffer 730 provides a means to handle interrupts and subroutine calls without disrupting increment operations of the program counter (PC) 220.
- the address buffer 730 is coupled to the first multiplexer 735 which in turn is coupled to the program counter (PC) 220 and the data output of the address arithmetic unit (AAU) 215.
- the operation and relationship of the program counter (PC) 220 and the address buffer 730 will be explained in greater detail, infra.
- the stack pointer 770 references a portion of the random access memory (RAM) 270 (Fig. 2) used as a memory stack providing access to variables that need to be accessed frequently or at high speed.
- An input of the stack pointer increment/decrement unit 780 is coupled to an output of the stack pointer 770.
- An output of the stack pointer increment/decrement unit 780 is coupled to an input of the stack pointer 770.
- the stack pointer 770 is an 8 -bit register.
- Microcontrollers known in the prior art operating with the MCS-51 instruction set utilize a single 8 -bit ALU for executing arithmetic and logic instructions and for incrementing/decrementing a stack pointer register.
- the pipeline architecture of the present invention does not permit sufficient time for the arithmetic logic unit (ALU) 210 to increment/decrement a stack pointer.
- the stack pointer increment/decrement unit 780 provides a dedicated means for modifying the address pointed to by the stack pointer 770, without an unnecessary reliance upon the capability of the arithmetic logic unit (ALU) 210, providing another improvement over the prior art .
- Usage of the program counter (PC) 220 and the address buffer 730 will now be explained with reference to Fig. 8A, Fig. 8B, and Fig. 8C. With reference to Fig.
- an illustration 'of address buffer utilization in accordance with an exemplary embodiment of the present invention during regular instruction execution comprises buffer usage example system clock waveform 810A, current instruction list 820A, a program counter (PC) 220 contents list 830A, and an address buffer 730 contents list 840A.
- system clock cycle interval T n reference to the current instruction list 820A shows that an instruction Il is executing.
- an address value A+l representing the address of next instruction 12
- the address value A representing the address of the current instruction II, is present in the address buffer 730.
- an illustration of address buffer utilization in accordance with an exemplary embodiment of the present invention during an interrupt execution comprises buffer usage example system clock waveform 810B, current instruction list 820B, a program counter (PC) 220 contents list 830B, an address buffer 730 contents list 840B, an interrupt detect event 850, and an actions summary 860B.
- system clock interval T n reference to the current instruction list 820B shows that an instruction Il executes.
- an address value A+l representing the address of an 12 instruction, is present in the program counter (PC) 220.
- the address value A representing the address of the current instruction II, is present in the address buffer 730.
- the 12 instruction represents the next instruction in the series to be executed in the absence of an interrupt event, i.e., during normal program execution.
- the interrupt detect event 850 occurs, indicating the beginning of a hardware (hardcall) interrupt.
- the previous value of the program counter (PC) 220 is transferred to the address buffer 730 so that during a system clock interval T n+1 the address buffer 730 contains the address value A+l, representing the address of the instruction 12.
- an instruction Hl representing the first cycle of the hardcall instruction, executes, as shown by the current instruction list 820B.
- the first hardcall instruction differs from the instruction 12 which otherwise executes in the absence of the interrupt detect event 850.
- the actions summary 860B provides additional detail of events occurring in the CPU during the system clock interval T n+I : A first address byte of the interrupt subroutine is loaded.
- the program counter (PC) 220 contains an address A+2 , representing the address of an instruction 13, which normally follows the instruction 12.
- the address buffer 730 contains the address A+l, as shown by the address buffer 730 contents list 840B. Thus, the address buffer 730 retains the address of the instruction 12, which is needed to resume normal program execution at the conclusion of the interrupt event .
- an instruction H2 representing the second cycle of the hardcall instruction, executes, as shown by the current instruction list 820B.
- the program counter (PC) 220 continues to be incremented by the address arithmetic unit (AAU) 215 during each system clock cycle; it therefore contains an address A+3 during the system clock interval T n+2 .
- the address buffer 730 retains the address A+l, which is needed to resume normal program execution at the conclusion of the interrupt event.
- the actions summary 860B provides additional detail of events occurring in the CPU during the system clock interval T n+2 : A second address byte of the interrupt subroutine is loaded and the stack pointer 770 is incremented:
- an instruction H3 representing the third cycle of the hardcall instruction, executes, as shown by the current instruction list 820B.
- the program counter (PC) 220 continues to be incremented by the address arithmetic unit (AAU) 215 during each system clock cycle; it therefore contains an address A+4 during the system clock interval T n+3 .
- the address buffer 730 retains the address A+l, which is needed to resume normal program execution at the conclusion of the interrupt event.
- the actions summary 860B provides additional detail of events occurring in the CPU during the system clock interval T n+3 : In particular, the stack pointer 770 is incremented:
- the address buffer 730 retains the address A+l, which is needed to resume normal program execution at the conclusion of the interrupt event.
- the actions summary 860B provides additional detail of events occurring in the CPU during the system clock interval T n+4 : A jump to a new program location (associated with the address B) occurs, and a high-byte portion of the address buffer is loaded into the current RAM location referenced (pointed to) by the stack pointer 770:
- SP indicates the RAM address referenced by the stack pointer 770 and BUFFER: 15-8 represents the eight most-significant bits (high-byte portion) of the address buffer 730 which contains address A+l .
- SP indicates the RAM address referenced by the stack pointer 770
- BUFFER: 15-8 represents the eight most-significant bits (high-byte portion) of the address buffer 730 which contains address A+l .
- an illustration of address buffer utilization in accordance with an exemplary embodiment of the present invention during a software subroutine call execution comprises buffer usage example system clock waveform 810C, current instruction list 820C, a program counter (PC) 220 contents list 830C, an address buffer 730 contents list 840C, and an actions summary 860C.
- a system clock interval T n reference to the current instruction list 820C shows that an instruction Il executes.
- an address value A+l representing the address of a call instruction Cl
- the address value A representing the address of the current instruction II
- the address buffer 730 is present.
- the previous value of the program counter (PC) 220 is transferred to the address buffer 730 so that during a system clock interval T n+ i the address buffer 730 contains the address value A+l, representing the address of an instruction Cl.
- an instruction Cl representing the first cycle of the call instruction, executes, as shown by the current instruction list 820C.
- the actions summary 860C provides additional detail of events occurring in the CPU during the system clock interval T n+I : A first address byte of the software subroutine is loaded.
- the program counter (PC) 220 contains an address A+2 , representing the address of the first address byte of the called subroutine, which normally follows the instruction Cl.
- the address buffer 730 contains the address A+l, as shown by the buffer address contents list 840C. Thus, the address buffer 730 retains the address of the current instruction Cl.
- an instruction C2 representing the second cycle of the call instruction, executes as shown by the current instruction list 820C.
- the program counter (PC) 220 continues to be incremented by the address arithmetic unit (AAU) 215 during each system clock cycle; it therefore contains an address A+3 during the system clock interval T n+2 .
- the address buffer 730 retains the address A+l.
- the actions summary 860C provides additional detail of events occurring in the CPU during the system clock interval T n+2 : A second address byte of the software subroutine is loaded and the stack pointer 770 is incremented:
- the increment value of the program counter (PC) 220 coming from the address arithmetic unit (AAU) 215 is transferred to the address buffer 730 so that during a system clock interval T n+3 the address buffer 730 contains the address value A+4 , representing the address of an instruction 12.
- 12 is the instruction after Cl which should be executed upon a return from the subroutine.
- an instruction C3 representing the third cycle of the call instruction, executes, as shown by the current instruction list 820C.
- the program counter (PC) 220 continues to be incremented by the address arithmetic unit (AAU) 215 during each system clock cycle; it therefore contains an address A+4 during the system clock interval T n+3 .
- the address buffer 730 contains the address A+4, which is needed to resume normal program execution at the conclusion of the subroutine.
- the actions summary 860C provides additional detail of events occurring in the CPU during the system clock interval T n+3 : In particular, the stack pointer 770 is incremented:
- the address buffer 730 retains the address A+4 , which is needed to resume normal program execution at the conclusion of the subroutine.
- the actions summary 860C provides additional detail of events occurring in the CPU during the system clock interval T n+4 : A jump to a new program location (associated with the address B) occurs, and a high-byte portion of the address buffer is loaded into the current RAM location referenced (pointed to) by the stack pointer 770:
- the relationship between the program counter (PC) 220 and the address buffer 730 becomes evident: Specifically, during normal program execution the program counter (PC) 220 points to the next instruction address and the address buffer 730 points to the current address value, with the program counter (PC) 220 incremented during a system clock cycle..
- the address buffer 730 updates only at the conclusion of an instruction execution when it receives the current value of the program counter (PC) 220 through the first multiplexer 735.
- the program counter (PC) 220 continually updates, and the update may occur during an instruction. Thus, the program counter (PC) 220 may point to a different address from the address pointed to by the address buffer 730 during a portion of an instruction execution cycle.
- the increment process for the program counter (PC) 220 may continue at a rate which enables it to match the execution speed of the instruction pipeline. If an interrupt occurs, the program counter (PC) 220 continues to update, but the return address from the interrupt may be trapped by the address buffer 730. A decision to execute an interrupt is therefore taken in parallel with the increment process of the program counter (PC) 220. This represents an improvement over the prior art, which typically requires additional logic to stop the increment process for a program counter and to decrement the program counter in order to restore the return address needed by the interrupt sequence. Attention is now directed to Fig.
- an exemplary instruction pre-decode and RAM addressing block diagram 900 comprising the accumulator register (ACC) 290 coupled to the first input of the arithmetic logic unit (ALU) 210.
- a multiplexer 930 selects one of a RAM output path 940A and an alternate multiplexer input
- the RAM 940B for coupling to the second input of the arithmetic logic unit (ALU) 210.
- An output of the arithmetic logic unit (ALU) 210 is coupled to a data register 950.
- the data register 950 is further coupled to the random access memory (RAM) 270.
- An output from the random access memory (RAM) 270 is coupled to the RAM output path 940A, to a RAM read address register (RAR) 960A, and to a RAM write address register (WAR) 960B.
- the RAM read address register (RAR) 960A is coupled to the random access memory (RAM) 270 and to the RAM write address register (WAR) 960B, which is further coupled to the random access memory (RAM) 270.
- a program status word (PSW) register 970 and its input 990 are coupled to an RAR multiplexer 935 which in turn is coupled to the RAM read address register (RAR) 960A.
- An output from the read-only memory (ROM) 230 is coupled to the instruction register (IR) 240.
- the instruction register (IR) 240 is further coupled to the instruction decoder 250.
- An address pre-decode path 980 couples the output of the read-only memory (ROM) 230 to the RAM read address register (RAR) 960A.
- the combination of the RAM output path 940A, the multiplexer 930 and the arithmetic logic unit (ALU) 210 represent an improvement over the prior art. Skilled artisans will appreciate that a temporary storage register is typically implemented between the multiplexer 930 and the arithmetic logic unit (ALU) 210 to support an internal bus architecture. As a result, the prior art process of transferring data from a random access memory to an ALU requires an intermediate step of storing the data in the temporary storage register before the data are passed to the ALU. The intermediate step of storing data in the temporary register requires a minimum of one system clock cycle added as overhead to the processing time.
- the RAM output path 940A of the present invention provides a means of passing data directly from the random access memory (RAM) 270 to the arithmetic logic unit (ALU) 210, enabling processing to occur in a single system clock cycle, with a result captured by the data register 950 in the same single system clock cycle.
- RAM random access memory
- ALU arithmetic logic unit
- address pre-decode path 980 An additional improvement over the prior art is provided by the address pre-decode path 980, which will now be explained. Certain instructions, specifically register operations, require rapid execution with minimum clock cycles to enable the speed and performance objectives which have been described supra. For example, the present invention employs the address pre-decode path 980 to enable rapid execution of the MCS-51 instructions:
- the instruction INC Rn is a register increment, and the variable n can correspond to values of 0-7.
- the portion of the opcode designated rrr represents the binary encoding corresponding to variable n.
- the instruction INC @Ri is an indirect register increment, with variable i taking possible values of 0 and 1.
- the MOV ORi, ACC instruction moves the accumulator contents into the address pointed to by register Ri, with variable i taking possible values of 0 and 1.
- All instructions read from the read-only memory (ROM) 230 are passed by the address pre-decode path 980 to the RAM read address register (RAR) 960A, which begins a speculative decode of the instruction based upon the least significant 4 bits of the instruction.
- the RAM read address register (RAR) 960A contains a small amount of decode logic, created by methods well known to those skilled in the art, to examine bits 3:0 of the opcode. If bit 3 is a one, the decode logic assumes an increment operation with register Rn, with bits 2:0 specifying the value of the register. If bits 3:1 of the opcode equal the binary- value 011, a register indirect increment is assumed, with bit 0 specifying the register.
- Every opcode is speculatively evaluated according to the method described supra and the RAM read address register (RAR) 960A is loaded accordingly.
- some opcodes do not require an immediate read from a register.
- a means is required to permit only necessary register operations to read the RAM using the pre-decoded address.
- the determination as to whether an opcode actually involves a register read operation is made by providing an additional pre-decode operation in the instruction register (IR) 240.
- the instruction register (IR) 240 contains additional logic to differentiate a RAM read operation from a RAM write operation.
- the additional logic prevents the RAM read address register (RAR) 960A from initiating a random access memory (RAM) 270 read operation unless the opcode actually requires the read operation. Avoiding the initiation of an unnecessary read operation prevents an energy-wasting step of powering up sense amplifiers and related circuits (not shown) in the random access memory (RAM) 270.
- the 8051 microcontroller architecture provides four register banks, each having eight registers.
- a means is necessary to provide the RAM address register (AR) 260 (Fig. 2) with knowledge as to which of four possible register banks contains the register target of an instruction.
- Register bank information is provided by the program status word (PSW) register 970 to the RAM read address register (RAR) 960A.
- PSW program status word
- RAR RAM read address register
- bits 4:3 of a program status word, stored in the program status word (PSW) register 970 are concatenated with bits 3:0 from the opcode to provide the RAM read address register (RAR) 960A with an address target in the random access memory (RAM) 270.
- the RAR multiplexer 935 is provided to forward the new value of the PSW from the PSW input 990 to the address pre- decode path 980, bypassing the old value in the program status word (PSW) register 970.
- the registers shown in Fig. 9, specifically the instruction register 240, the instruction decoder 250, the accumulator register (ACC) 290, the data register 950, the RAM read address register (RAR) 960A, the RAM write address register (WAR) 960B, and the program status word (PSW) register 970, are implemented with master-slave positive-edge trigger flip-flops.
- a register increment timing diagram 1000 in accordance with an exemplary embodiment of the present invention which comprises register increment example system clock waveform 1010, register increment example current instruction (INSTR) list 1020, register increment example program counter (PC) 220 contents list 1030, RAM read address register (RAR) 960A contents diagram 1040, RAM write address register (WAR) 960B contents diagram 1050, RAM data out (DOUT) contents diagram 1060, RAM data in (DIN) contents diagram 1070, arithmetic logic unit (ALU) 210 contents list 1080, and an instruction example summary 1090.
- register increment example system clock waveform 1010 register increment example current instruction (INSTR) list 1020
- RAM read address register (RAR) 960A contents diagram 1040 RAM write address register (WAR) 960B contents diagram 1050
- RAM data out (DOUT) contents diagram 1060 RAM data in (DIN) contents diagram 1070
- ALU arithmetic logic unit
- the system executes a generic instruction (indicated by an asterisk in the instruction example summary 1090) ; the generic instruction is associated with an address A-I and is designated as 1-1 by the register increment example current instruction (INSTR) list 1020.
- Reference to the register increment example program counter (PC) 220 contents list 1030 shows that an address AO, associated with a first register direct increment instruction (INC RO) is present in the program counter (PC) 220 during the system clock interval T n , in accordance to the operation of the instruction pipeline described supra.
- the initial value of register RO is assumed to be two.
- the program counter (PC) 220 contains an address Al of the next instruction (also INC RO for this example) .
- the RAM read address register (RAR) 960A contains zero, shown by the RAM read address register (RAR) 960A contents diagram 1040. The value zero is the target register address, and is loaded into the RAM read address register (RAR) 960A by means of the address pre-decode path 980, avoiding the delay of progressing through the instruction decoder 250.
- the data at the register target address (the value 2) are available at the random access memory (RAM) 270 output, indicated by the RAM data out (DOUT) contents diagram 1060.
- the value is incremented by the arithmetic logic unit (ALU) 210 before the conclusion of the system clock interval T n+I , giving a value of three as indicated by the arithmetic logic unit (ALU) 210 contents list 1080.
- the ALU output (the value three) is passed to the data register 950, as indicated by the RAM data in (DIN) contents diagram 1070.
- the RAM write address register (WAR) 960B contains an address value of zero, loaded to enable a write-back of the result from execution of the first register direct increment instruction (INC RO) .
- a second register direct increment instruction 1+1 executes, as shown by the register increment example current instruction (INSTR) list 1020.
- the RAM read address register (RAR) 960A contains zero, shown by the RAM read address register (RAR) 960A contents diagram 1040. Because the RAM read address register (RAR) 960A and the RAM write address register (WAR) 960B point to the same address (0) , a data pass-through occurs in the random access memory (RAM) 270, causing the value three to be propagated to the RAM output with minimal delay, as shown by the RAM data out (DOUT) contents diagram 1060. The value three is incremented by the arithmetic logic unit (ALU) 210 to a value four, as shown by the arithmetic logic unit (ALU) 210 contents list 1080, with the result available before conclusion of the system clock interval T n+2 . Thus, two direct .register increment operations are completed in the span of two system clock cycles. As discussed supra, a write-back of the value four completes in a subsequent system clock interval T n+3 (not shown) .
- ALU arithmetic logic unit
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
- Advance Control (AREA)
Abstract
Description
Claims
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| AU2006221114A AU2006221114A1 (en) | 2005-03-04 | 2006-01-25 | Single-cycle low-power CPU architecture |
| DE112006000514T DE112006000514T5 (en) | 2005-03-04 | 2006-01-25 | Single cycle, low power CPU architecture |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US11/071,966 | 2005-03-04 | ||
| US11/071,966 US20060200650A1 (en) | 2005-03-04 | 2005-03-04 | Single-cycle low-power CPU architecture |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| WO2006096250A2 true WO2006096250A2 (en) | 2006-09-14 |
| WO2006096250A3 WO2006096250A3 (en) | 2007-08-16 |
Family
ID=36945387
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2006/002552 Ceased WO2006096250A2 (en) | 2005-03-04 | 2006-01-25 | Single-cycle low-power cpu architecture |
Country Status (6)
| Country | Link |
|---|---|
| US (2) | US20060200650A1 (en) |
| CN (1) | CN101133390A (en) |
| AU (1) | AU2006221114A1 (en) |
| DE (1) | DE112006000514T5 (en) |
| TW (1) | TW200703103A (en) |
| WO (1) | WO2006096250A2 (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060200650A1 (en) * | 2005-03-04 | 2006-09-07 | Froemming Benjamin F | Single-cycle low-power CPU architecture |
| US7797516B2 (en) * | 2007-03-16 | 2010-09-14 | Atmel Corporation | Microcontroller with low-cost digital signal processing extensions |
| US8370606B2 (en) | 2007-03-16 | 2013-02-05 | Atmel Corporation | Switching data pointers based on context |
| TW200849088A (en) * | 2007-06-12 | 2008-12-16 | Holtek Semiconductor Inc | Power-saving data processor |
| JP5300428B2 (en) * | 2008-11-13 | 2013-09-25 | ルネサスエレクトロニクス株式会社 | Arithmetic apparatus and arithmetic processing method |
| US9405534B2 (en) * | 2013-01-21 | 2016-08-02 | Tom Yap | Compound complex instruction set computer (CCISC) processor architecture |
| CN112348180A (en) * | 2020-11-27 | 2021-02-09 | Oppo广东移动通信有限公司 | Data processing device and configuration method, neural network processor, chip and equipment |
Family Cites Families (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5165039A (en) * | 1986-03-28 | 1992-11-17 | Texas Instruments Incorporated | Register file for bit slice processor with simultaneous accessing of plural memory array cells |
| US5193205A (en) * | 1988-03-01 | 1993-03-09 | Mitsubishi Denki Kabushiki Kaisha | Pipeline processor, with return address stack storing only pre-return processed address for judging validity and correction of unprocessed address |
| JPH05113929A (en) * | 1991-10-22 | 1993-05-07 | Mitsubishi Electric Corp | Micro computer |
| JP3184096B2 (en) * | 1995-08-31 | 2001-07-09 | 株式会社東芝 | Semiconductor storage device |
| JPH1091443A (en) * | 1996-05-22 | 1998-04-10 | Seiko Epson Corp | Information processing circuit, microcomputer and electronic equipment |
| US6262936B1 (en) * | 1998-03-13 | 2001-07-17 | Cypress Semiconductor Corp. | Random access memory having independent read port and write port and process for writing to and reading from the same |
| JP3344316B2 (en) * | 1998-05-01 | 2002-11-11 | ヤマハ株式会社 | Digital signal processing device and signal processing system |
| US6345353B2 (en) * | 1999-07-20 | 2002-02-05 | Microchip Technology Incorporated | Stack pointer with post increment/decrement allowing selection from parallel read/write address outputs |
| US6262396B1 (en) * | 2000-03-07 | 2001-07-17 | Hatco Corporation | Oven device for rapid heating of food items |
| GB2417111B (en) * | 2002-04-22 | 2006-08-16 | Micron Technology Inc | Providing a register file memory with local addressing in a SIMD parallel processor |
| TW200416598A (en) * | 2003-02-24 | 2004-09-01 | Weltrend Semiconductor Inc | Method for increasing the instruction execution speed of single chip microcomputer |
| US20060200650A1 (en) * | 2005-03-04 | 2006-09-07 | Froemming Benjamin F | Single-cycle low-power CPU architecture |
-
2005
- 2005-03-04 US US11/071,966 patent/US20060200650A1/en not_active Abandoned
-
2006
- 2006-01-25 CN CNA2006800071570A patent/CN101133390A/en active Pending
- 2006-01-25 DE DE112006000514T patent/DE112006000514T5/en not_active Withdrawn
- 2006-01-25 WO PCT/US2006/002552 patent/WO2006096250A2/en not_active Ceased
- 2006-01-25 AU AU2006221114A patent/AU2006221114A1/en not_active Abandoned
- 2006-03-01 TW TW095106763A patent/TW200703103A/en unknown
-
2009
- 2009-08-27 US US12/549,328 patent/US20090319760A1/en not_active Abandoned
Also Published As
| Publication number | Publication date |
|---|---|
| TW200703103A (en) | 2007-01-16 |
| CN101133390A (en) | 2008-02-27 |
| AU2006221114A1 (en) | 2006-09-14 |
| WO2006096250A3 (en) | 2007-08-16 |
| US20060200650A1 (en) | 2006-09-07 |
| US20090319760A1 (en) | 2009-12-24 |
| DE112006000514T5 (en) | 2008-01-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5774709A (en) | Enhanced branch delay slot handling with single exception program counter | |
| CN101228506B (en) | Method and apparatus for predicting branch instructions | |
| US5604878A (en) | Method and apparatus for avoiding writeback conflicts between execution units sharing a common writeback path | |
| US20090319760A1 (en) | Single-cycle low power cpu architecture | |
| EP1849061A2 (en) | Unaligned memory access prediction | |
| KR20040016829A (en) | Exception handling in a pipelined processor | |
| CN1189816C (en) | Data processing system with branch control and method thereof | |
| JP2002512399A (en) | RISC processor with context switch register set accessible by external coprocessor | |
| US8473727B2 (en) | History based pipelined branch prediction | |
| EP2220556B1 (en) | A method and a system for accelerating procedure return sequences | |
| US20040064684A1 (en) | System and method for selectively updating pointers used in conditionally executed load/store with update instructions | |
| KR20090042303A (en) | Association of cached branch information with the final granularity of branch instructions in a variable-length instruction set | |
| US5941984A (en) | Data processing device | |
| EP0992889A1 (en) | Interrupt processing during iterative instruction execution | |
| US5835746A (en) | Method and apparatus for fetching and issuing dual-word or multiple instructions in a data processing system | |
| EP0992888B1 (en) | Method and apparatus for iterative instruction execution | |
| JPH07120284B2 (en) | Data processing device | |
| US20220308888A1 (en) | Method for reducing lost cycles after branch misprediction in a multi-thread microprocessor | |
| US5802360A (en) | Digital microprocessor device having dnamically selectable instruction execution intervals | |
| US6044460A (en) | System and method for PC-relative address generation in a microprocessor with a pipeline architecture | |
| US5729727A (en) | Pipelined processor which reduces branch instruction interlocks by compensating for misaligned branch instructions | |
| JP3182591B2 (en) | Microprocessor | |
| HK1120122A (en) | Single-cycle low-power cpu architecture | |
| US20220308887A1 (en) | Mitigation of branch misprediction penalty in a hardware multi-thread microprocessor | |
| US8255672B2 (en) | Single instruction decode circuit for decoding instruction from memory and instructions from an instruction generation circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 200680007157.0 Country of ref document: CN |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
| DPE1 | Request for preliminary examination filed after expiration of 19th month from priority date (pct application filed from 20040101) | ||
| WWE | Wipo information: entry into national phase |
Ref document number: 2006221114 Country of ref document: AU |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 1286/MUMNP/2007 Country of ref document: IN |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 1120060005146 Country of ref document: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2006221114 Country of ref document: AU Date of ref document: 20060125 Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: RU |
|
| RET | De translation (de og part 6b) |
Ref document number: 112006000514 Country of ref document: DE Date of ref document: 20080110 Kind code of ref document: P |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 06719418 Country of ref document: EP Kind code of ref document: A2 |