MICROCOMPUTER HAVING A HIGHSPEED OPERATION MODE AND A LOW-SPEED OPERATION MODE

Abstract: A microcomputer has an instruction memory and a high-speed sense amplifier and can selectively operate according to a high-speed operation mode and to a low-speed operation mode. The high-speed sense amplifier is activated in a full time or with a large duty rate in the high-speed operation mode and is activated with a short duty rate in the low-speed operation mode.

Description: BACKGROUND OF THE INVENTION The present invention relates to a microcomputer having a high-speed operation mode and a low-speed operation mode, and particularly to a microcomputer having a high-speed sense amplifier to read an instruction out of an instruction memory. In general, a high frequency oscillator is used to apply a high frequency clock to a microcomputer in the high-speed operation mode, while a low frequency oscillator is used in the low-speed operation mode (see JP-A-58-107 930). In order to increase the operation speed of a microcomputer, not only the instruction execution speed but also an instruction reading speed must be increased. To increase the instruction reading speed, a high-speed sense amplifier, such as a current mirror type sense amplifier, will be required as a memory reading circuit. Since the sense amplifier of this type is driven by a large amount of current, a large amount of power is consumed. In the high-speed operation mode, an instruction reading cycle becomes short because the instruction execution speed is increased and because the high frequency clock is used. However, an instruction reading period can not be shortened less than a period that will be determined by characteristics of the sense amplifier and a memory to make sure an instruction fetch into a central processing unit (CPU). Thus, it will be required in the high-speed operation mode to use such a sense amplifier that is activated in a full time or with a large duty rate. On the other hand, when the low frequency oscillator is connected to the microcomputer in the low-speed operation mode, a low power consumption is required. In this case, a low frequency clock is applied to the microcomputer. However, a large amount of power is consumed by the above sense amplifier because it is activated with the same duty rate as that in the high-speed operation mode. To avoid the power consumption of the sense amplifier a low-power sense amplifier is required. However, since a microcomputer having the low-power sense amplifier has to be newly developed, a long development term and a design change are necessary. SUMMARY OF THE INVENTION It is an object of the present invention to provide a microcomputer having a high-speed operation mode and a low-speed operation mode with a low power consumption. It is another object of the present invention to provide a microcomputer having a high-speed sense amplifier which can be activated with a low power in a low-speed operation mode. These objects are achieved by a microcomputer as defined in claim 1; the dependent claims are related to further developments of the invention. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 illustrates a block diagram of one embodiment of the present invention; Fig. 2 illustrates a timing chart of Fig. 1 in a high-speed operation mode. Fig. 3 illustrates a timing chart of Fig. 1 in a low-speed operation mode; Fig. 4 illustrates a block diagram of another embodiment of the present invention; Fig. 5 illustrates a circuit diagram of a sense amplifier used in the present invention; Fig. 6 illustrates a circuit diagram of an enable signal generating circuit used in the present invention; Fig. 7 illustrates a timing chart of th e sense amplifier shown in Fig. 5 in a high-speed operation mode; and Fig. 8 illustrates a timing chart of the sense amplifier shown in Fig. 5 in a low-speed operation mode. DESCRIPTION OF THE PREFERRED EMBODIMENTS A detailed description of the present invention will be given by the reference of the accompanied drawings. Fig. 1 illustrates a block diagram of a memory 106 and a reading circuit 107 in a microcomputer. Each of instruction cycles of the microcomputer consists of ⊘1, ⊘2, ⊘3 and ⊘4 states. An instruction in a read only memory (ROM) 106 is read thereof in the ⊘4 state of a previous instruction cycle and the ⊘1 state of a succeeding instruction cycle and is executed in the ⊘2 to ⊘4 state in the above succeeding instruction cycle. The reading circuit has a high-speed sense amplifier 107. An enable signal 104 is used in the present invention to activate the sense amplifier 107. The enable signal 104 is generated from an enable signal generating circuit 103 which receives a mode designating signal 101 and a reading control signal 102. The mode designating signal becomes "H" under a high-speed operation mode and becomes "L" under a low-speed operation mode. The reading control signal 102 becomes "H" in the ⊘4 and ⊘1 states and becomes "L" in the ⊘2 and ⊘3 states. Each of the states ⊘1 to ⊘4 is determined by one cycle of a clock applied to the microcomputer. In the high-speed operation mode shown in Fig. 2, the mode designating signal 101 becomes "H". An address 105 is applied to the ROM 106 from the ⊘2 state in a previous cycle until the ⊘1 state in a succeeding cycle according to an instruction prefetch architecture. In this mode the enable signal 104 is always "H" in spite of the reading control signal 102. Consequently, the sense amplifier 107 is always activated, so that an instruction 108 designated by the corresponding address 105 is read out of the ROM 106 via the sense amplifier 107. Since the enable signal 104 is fixed at "H" during the high-speed operation mode, each of instructions corresponding to addresses is sequentially read out of the ROM 106 and is sent to an instruction decoder in a CPU (not shown). On the other hand, in the low-speed operation mode, a low-frequency clock is applied to the microcomputer, and therefore a period of each state is enlarged as shown in Fig. 3. In this mode, the mode designating signal 101 becomes "L", so that the reading control signal 102 is applied to the sense amplifier 107 as the enable signal 104. Consequently, the sense amplifier 107 is activated only the ⊘4 and ⊘1 states through the address 105 is applied to the ROM in the ⊘2 to ⊘1 states. Since the high-speed sense amplifier 107 is used, an instruction is surely read out of the ROM 106 in the short period of time (⊘4 and ⊘1). According to this embodiment, power consumption of the sense amplifier 107 can be avoided in the ⊘2 and ⊘3 states of each cycle in the low-speed operation mode. Fig. 4 is a block diagram of another embodiment of the present invention. In this embodiment two divider circuit 410 and 411 are provided and have a different dividing ratio with each other. The divider circuit 410 receives a low-frequency clock ⊘L and applies a divided clock 402 to a enable signal generating circuit 403. While, the divider circuit 411 receives a high-frequency clock ⊘H and applies a divided clock 409 to the generating circuit 403. The mode designating signal 101 selects either one of the divided clocks 402 and 409. When the mode designating signal 101 is "H", the divided clock 409 is selected and is applied to the sense amplifier 107 as the enable signal 104. On the other hand, when the mode designating signal 101 is "L", the divided clock 402 is applied to the sense amplifier 107 as the enable signal 104. According to this embodiment, the high-frequency cl ock ⊘H is divided into the clock 409 with a large duty rate, while the low-frequency clock ⊘L is divided into the clock 402 with a short duty rate. Therefore, the sense amplifier 107 is activated with the large duty rate in the high-speed operation mode and is activated with the short duty rate in the low-speed operation mode. Fig. 5 is a circuit diagram of the ROM 106 and the sense amplifier 107 according to the preferred embodiment of the present invention. It should be noted that only one bit line and the corresponding sense amplifier is illustrated. A bit line of the ROM 106 contains cells programmed according to an instruction code. Each cell is turned on by the corresponding word signal. The ROM 106 further contains a dummy line having dummy cells equal to the word signals in number. The dummy cells are always turned on by V DD voltage. The sense amplifier 107 has a current mirror type sense amplifier SA1 connected to the bit line and SA2 connected to the dummy line. These sense amplifiers SA1 and SA2 consist of a complementally MOS circuit with a P channel MOS FET (P-FET) and an N channel MOS FET (N-FET). The sense amplifier SA1 has five N-FETs Q₁, Q₂, Q₅, Q₇ and Q₈ and five P-FETS Q₃, Q₄, Q₆, Q₉ and Q₁₀. The sense amplifier SA2 has five N-FETs Q′₁, Q′₂, Q′₅, Q′₇ and Q′₈ and five P-FETs Q′₃, Q′₄, Q′₆, Q′₉ and Q′₁₀. The enable signal 104 is applied to gates of Q₁, Q′₁, Q4₄ and Q′₄. The inverted enable signal 104′ is applied to gates of Q′₈, Q₁₀ and Q′₁₀. Q₁, Q′₁, Q₄, Q′₄, Q₁₀, Q′₁₀ and Q′₇ are provided to activate the sense amplifiers SA1 and SA2 by the enable signal 104. In this embodiment, the sense amplifier SA2 is used as a reference voltage generating circuit, and the dummy line and dummy cells are used as a dummy current source. Since a source of N-FET Q′₅ and a gate of N-FET Q′₂ is connected to an output of the dummy line, the N-FET Q′₂ acts as an inverter. As a result, a potential at a node N₂ is equal to a threshold voltage of the N-FET Q′₂, so that a current i is frown to the dummy line. At this state the same current i is frown to the P-FET Q′₆. Since the P-FET Q′₆ and P-FET Q′₉ are a current mirror circuit, a current i′ (i′ = gm of Q′₉/gm of Q′₆ x i) is frown to the P-FET Q′₉ and is further frown to the N-FETs Q′₈ and Q′₇. Further, since the N-FET Q₈ whose gate is applied an output of the SA2 and the N-FET Q′₈ are a current mirror circuit, a current i″ (i″ gm of Q₈/gm of Q′₈ x i′) is frown to the N-FET Q₈. At this time, when all cells of the bit line are turned on, the current i is frown to the bit line. It should be noted that gm of Q₆ is equal to that of Q′₆ and that gm of Q₉ is equal to that of Q′₉. As a result, the current i′ is frown to the P-FET Q₉, and therefore a voltage of a node N1 becomes "H". Since the node N1 is connected to a gate of a C MOS inverter circuit Q₁₁ and Q₁₂, the N-FET Q₁₁ is turned on. Thus, an output "H" is derived from the ROM 106. On the other hand, if at least one of cells on the bit line is turned off, the current i is not frown to the N-FET Q₅, and therefore the P-FET Q₆ is turned off. Consequently, the node N1 become "L (V SS )", and the P-FET Q₁₂ is turned on. Thus, an output "L" is derived from the ROM 106. As described above, the current mirror type sense amplifier is driven by a current mode and requires no precharge time, so that it can drive an ROM output (instruction) at high speed. However, a large amount of current is required. In the present invention, the enable signal 104 is used to reduce the power consumption of the sense amplifier. The enable signal 104 is generated by a generating circuit shown in Fig. 6. In this embodiment, "H" is set in a mode register 84 in the high-speed operation mode, while "L" is set therein in the low-speed operation mode. The mode designating signal 101 is outputted from the mode register 84 and is transferred to an NOR gate 64 via three latch circuits 83, 68 and 67. These latch circuits are provided to control an application timing to the NOR gate 64. That is, the mode designating signal 101 is latched into the first latch circuit 83 in the ⊘4 state which is assigned to a write operation of the mode designating signal 101 an is latched into the second latch circuit 68 in the ⊘2 state. This latch circuit 68 is used to protect a noise which arrives at the write operation. Thereafter the mode designating signal 101 is latched into the third latch circuit 67 which controls a timing when the low-frequency clock ⊘L is changed to the high-frequency clock ⊘H, and vice versa. The timing is determined by three cascaded flip-flops F1 to F3. First and third flip-flops F1 and F3 consist of two AND gates (70, 71 and 78, 79) and two NOR gates (72, 73 and 80, 81), respectively. The second flip-flop F2 consists of two OR gates 74, 75 and two NAND gates 76 and 77. When the low-frequency oscillator is connected to the microcomputer, the low-frequency clock ⊘L (32 KHz) is applied to the AND gate 71 and the clock inverted by an inverter 69 is applied to the AND gate 70. While the high-frequency clock ⊘H (4 MHz) is applied to the AND gates 70, 71, 78, 79 and the OR gates 74, 75 in common, when the high-frequency oscillator is connected to the microcomputer. Thus, the timing signal 85 synchronized with a falling edge of each clock is applied to the third latch circuit 67 via an NOR gate 82. The mode designating signal 101′ is applied to the NOR gate 64 in synchronous with the timing signal 85. The NOR gate 64 and an NOR gate 65 are connected with each other in accordance with a flip-flop manner. This flip-flop is set by either the mode designating signal 101′ or an output of an NOR gate 66. The NOR gate 66 receives the low-frequency clock ⊘L (32 kHz) and ⊘ 4 signal and the read control signal 102 which is activated from a falling edge of the ⊘L clock in the ⊘4 state till a rising edge of ⊘1 signal. In the high-speed operation mode, the mode designating signal 101′ is "H", and therefore the flip-flop is set regardless of the read control signal 102 and outputs "L" signal to an NOR gate 62. If a stop signal (STOP) and a halt signal (HALT) which are generated when a operation of the microcomputer should be stopped are not present, the enable signal 104 becomes "L" (active lebel) because the output "H" of the NOR gate 62 is inverted by an inverter 63. In response to the enable signal 104, the P-FETs Q₄ and Q′₄ are turned on, so that both the N-FETs Q₅ and Q′₅ are turned on to couple the bit line and the dummy line to the sense amplifiers SA1 and SA2, respectively. Thus, the sense amplifier 107 is always activated in the high-speed operation mode as shown in Fig. 7. On the other hand, when the low-speed operation mode is required, the mode designating signal 101′ becomes "L". As a result, the flip-flop (64 and 65) is set only when the ⊘L and ⊘ 4 are both "L" and is reset by ⊘1 signal shown in Fig. 8. Therefore, the sense amplifier 107 is activated only when the ⊘L and ⊘ 4 are both "L". In the remaining period, the enable signal 104 becomes "H", and therefore, the N-FETs Q₁ and Q′₁ are turned on while the P-FETs Q₄ and Q′₄ are turned off. Thus, the N-FETs Q₅ and Q′₅ are both turned off. Consequently, the P-FETs Q₆ and Q′₆ are discoupled from the bit line and the dummy line, respectively. At this period, no power is consumed because a current path is cut off. In Figs. 7 and 8, each of state signals ⊘1 to ⊘4 is produced on a basis of the clock and is used to control timing o f one machine (instruction) cycle. In the low-speed operation of the embodiment, an instruction is read out of the ROM in a period T and is fetched into a CPU in ⊘1 state. The CPU executes the fetched instruction in the ⊘2 to ⊘4 states. Further, in the ⊘4 state, a next instruction is read out of the ROM according to an instruction prefetch architecture. Turning to Fig. 6, when either the stop signal or the halt signal becomes "H", the enable signal 104 becomes "H", and therefore, the sense amplifier 107 is inactivated.

Claims: A microcomputer operative in a high-speed mode and in a low-speed mode characterized in that it comprises a memory (106) storing a plurality of instructions and a reading circuit (107) coupled to said memory for reading an instruction out of said memory, and that said microcomputer further comprises a control circuit (101-104; 402, 403, 409, 410, 411; 60-68, 70-84) coupled to said reading circuit (107) for activating said reading circuit (107) with a first duty rate when said high-speed mode is designated and for activating said reading circuit (107) with a second duty rate that is smaller than said first duty rate when said low-speed mode is designated, such that said reading circuit (107) is continuously or intermittently activated in said high-speed mode, depending upon a duty rate of 100% or less respectively, and said reading circuit (107) is intermittently activated in said low-speed mode. The microcomputer as claimed in claim 1, characterized in that said control circuit (103) includes a gate circuit (64) receiving a mode designating signal (101) designating one of said high-speed and low-speed modes and a reading control signal (102) having a predetermined duty rate and generating an enable signal (104), a first logic level of said enable signal (104) activating said reading circuit (107) and a second logic level of said enable signal (104) deactivating said reading circuit (107), said gate circuit (64) maintaining said enable signal (104) at said first logic level irrespective of said reading control signal (102) when said mode designating signal (101) designates said high-speed mode and changing said enable signal (104) between said first and second logic levels in accordance with said reading control signal when said mode designating signal (101) designates said low-speed mode. The microcomputer as claimed in claim 1, characterized in that control circuit includes first means (411) for producing a first signal (409) having said first duty rate of a first value smaller that 100%, second means (410) for producing a second signal (402) having said second duty rate of a second value smaller than said first value and third means (403) for receiving said first and second signals (409 and 402) and a mode designating signal (101) and for producing said enable signal (104) for activating said reading circuit (107), said third means (403) selecting and outputting said first signal (409) as said enable signal (104) when said mode designating signal (101) designates said high-speed mode and selecting and outputting said second signal (402) as said enable signal (104) when said mode designating signal (101) designates said low-speed mode. The microcomputer as claimed in claim 2 or 3, characterized in that the reading circuit (107) includes a current mirror type sense amplifier (SA1) and a switching circuit (Q1, Q4, Q5, Q10) for electrically connecting a bit line of said memory (106) to said current mirror type sense amplifier in response to said enable signal (104).

Inventors: NAKAMURA, MICHIYA C/O NEC CORPORATION
Applicants: NEC CORPORATION
Application year: 1987
Main classification: G06F1
IPC codes: G11C7, G06F15, G11C16, G06F1, G11C17