JPH0149968B2 - - Google Patents

Info

Publication number
JPH0149968B2
JPH0149968B2 JP56212900A JP21290081A JPH0149968B2 JP H0149968 B2 JPH0149968 B2 JP H0149968B2 JP 56212900 A JP56212900 A JP 56212900A JP 21290081 A JP21290081 A JP 21290081A JP H0149968 B2 JPH0149968 B2 JP H0149968B2
Authority
JP
Japan
Prior art keywords
interrupt
halt
stop
instruction
flag
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.)
Expired
Application number
JP56212900A
Other languages
Japanese (ja)
Other versions
JPS58114242A (en
Inventor
Toshiaki Suzuki
Takashi Sakao
Hiromitsu Chihara
Eijiro Toyoda
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP56212900A priority Critical patent/JPS58114242A/en
Publication of JPS58114242A publication Critical patent/JPS58114242A/en
Publication of JPH0149968B2 publication Critical patent/JPH0149968B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/30079Pipeline control instructions, e.g. multicycle NOP

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Executing Machine-Instructions (AREA)
  • Microcomputers (AREA)

Description

【発明の詳細な説明】 本発明はコンピユータの停止制御方法に関する
ものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a computer stop control method.

近年、電子機器の省エネルギー対策の一環とし
て、マイクロコンピユータLSIにおいても低消費
電力化のためのいくつかの方法が試みられてい
る。その中の一つとして、マイクロコンピユータ
LSIをCMOSで構成し、動作状態に応じてCPUへ
のクロツク供給を停止するHALT/STOPモー
ドを設ける方法が知られている。ここでHALT
モードは、割込検知部などのHALTモードを解
除するための特定回路を除くCPU各部へのクロ
ツクパルス供給を一時停止制御するものであり、
STOPモードは、クロツク発生を停止し、CPU
全てに対するクロツク供給を停止制御するもので
ある。
In recent years, as part of efforts to save energy in electronic devices, several methods have been attempted to reduce power consumption in microcomputer LSIs. One of them is the microcomputer.
A known method is to configure an LSI with CMOS and provide a HALT/STOP mode in which the clock supply to the CPU is stopped depending on the operating state. HALT here
The mode is to temporarily stop the supply of clock pulses to each part of the CPU except for specific circuits such as the interrupt detection part to cancel HALT mode.
STOP mode stops clock generation and
This control stops the clock supply to all the clocks.

従来の停止制御方法を、第1図のブロツク図を
用いて説明する。
A conventional stop control method will be explained using the block diagram of FIG.

第1図は命令デコーダの要部を示しており、1
および5がそれぞれR−Sフリツプフロツプ
(RS−FF)で構成されたHALTフラグおよび
STOPフラグである。2は割込検出信号とリセツ
ト信号によつてHALTフラグをリセツトするた
めのORゲード、3は外部割込入力端子4からの
割込要求を検出するための割込検出回路である。
Figure 1 shows the main parts of the instruction decoder.
and 5 are the HALT flag and
This is the STOP flag. 2 is an OR gate for resetting the HALT flag using an interrupt detection signal and a reset signal, and 3 is an interrupt detection circuit for detecting an interrupt request from an external interrupt input terminal 4.

通常モード時には、CPUの動作開始とともに
リセツト信号が能動状態となり、HALTフラグ
1、STOPフラグ5共にリセツトされており、ク
ロツク発生器(図示せず)からのクロツクは
CPU内各部に供給されている。
In normal mode, the reset signal becomes active when the CPU starts operating, HALT flag 1 and STOP flag 5 are both reset, and the clock from the clock generator (not shown) is activated.
Supplied to various parts within the CPU.

プログラムの割込許可命令によつて割込許可フ
ラグ(図示せず)が能動状態となり、外部割込入
力端子4を通して割込要求が検出され得る状態と
なつた後でプログラムのHALT命令が解読され
ると、HALTフラグ1を構成するRS−FFのセツ
ト端子に印加されるHALT信号が能動レベルに
なり、このHALT信号によつて、クロツクパル
ス発生器からCPU各部へのクロツクパルスの供
給を禁止するゲート回路(図示せず)が制御さ
れ、割込検出回路3を除くCPU各部へのクロツ
クパルス供給が停止され、各部の状態は保持され
る。
After the interrupt enable flag (not shown) is activated by the program's interrupt enable instruction and an interrupt request can be detected through the external interrupt input terminal 4, the program's HALT instruction is decoded. Then, the HALT signal applied to the set terminal of RS-FF that constitutes HALT flag 1 becomes active level, and this HALT signal causes a gate circuit to inhibit the supply of clock pulses from the clock pulse generator to each part of the CPU. (not shown), the supply of clock pulses to each part of the CPU except the interrupt detection circuit 3 is stopped, and the state of each part is maintained.

HALTモードになつている時も、割込検出回
路3は能動状態にあり、CPU外部で割込要因が
発生し外部割込入力端子4に割込要求信号が加わ
つたときには、HALTモードを解除するために
割込検出信号を発生する。HALTフラグ1のリ
セツト端子にはORゲート2の出力が加えられて
おり、HALTモードは、前述の割込要求の検出
時とリセツト制御端子(図示せず)から、CPU
のリセツトを要求するリセツト信号が出された時
に解除される構成となつている。
Even when in HALT mode, the interrupt detection circuit 3 remains active, and when an interrupt factor occurs outside the CPU and an interrupt request signal is applied to the external interrupt input terminal 4, the HALT mode is released. An interrupt detection signal is generated for this purpose. The output of OR gate 2 is applied to the reset terminal of HALT flag 1, and in HALT mode, when the aforementioned interrupt request is detected and from the reset control terminal (not shown), the CPU
The configuration is such that the reset signal is released when a reset signal requesting a reset is issued.

一方STOPモードは、プログラムによるSTOP
命令によりRS−FFで構成されるSTOPフラグ5
がセツトされることによつて設定される。STOP
信号が能動レベルになると、クロツク発生が停止
され、CPUの内部状態が保持されたままで全て
の回路動作が停止する。STOPモードの解除は、
リセツト制御端子に能動信号を印加することによ
るCPUのリセツトによつてのみ行なわれる。
On the other hand, STOP mode is a programmatic STOP mode.
STOP flag 5 configured as RS-FF by instruction
is set. STOP
When the signal goes to an active level, clock generation is stopped and all circuit operations are stopped while the internal state of the CPU is maintained. To cancel STOP mode,
This is accomplished only by resetting the CPU by applying an active signal to the reset control terminal.

従来は、以上のように、HALT/STOPモー
ドを設けることによつて各部の動体を停止させ、
省電力化を実現しているが、これらのモードを実
行するための命令数が増加し、命令をデコードす
るためのハードウエアの構成がそれに伴い複雑に
なるとともに、HALT/STOPモード機能のな
い従来機種との間にプログラムでの互換性がな
く、ハードウエア・ソフトウエア開発サポート・
ツールが複雑になるという問題があつた。
Conventionally, as described above, by providing a HALT/STOP mode, the moving body of each part is stopped,
Although this technology saves power, the number of instructions required to execute these modes increases, and the hardware configuration for decoding the instructions becomes more complex. There is no program compatibility between the models and the hardware/software development support/
The problem was that the tools were complicated.

したがつて、本発明は、これらの問題を解決す
ることを目的とするものでHALT/STOPモー
ドへの移行を、ともに割込待機命令(Wait
Interrupt)によつて行ない、いずれのモードに
移行するかは、割込許可フラグの制御命令、即ち
割込許可命令(Interrupt Enable)と全割込禁止
命令(Interrupt Disable al)によつて決定する
コンピユータの停止制御方法を提案するものであ
る。以下、実施例を用いて本発明を説明する。
Therefore, the present invention aims to solve these problems, and the transition to HALT/STOP mode is performed using an interrupt wait instruction (Wait
Which mode the computer enters is determined by the control instructions for the interrupt enable flag, that is, the interrupt enable instruction (Interrupt Enable) and the all interrupt disable instruction (Interrupt Disable al). This paper proposes a stop control method. The present invention will be explained below using Examples.

割り込み待機命令(WI命令)は、命令実行を
一次停止させるための命令です。命令実行の再開
は、割り込み要求が発生するか又はリセツトが入
力される事により行われます。
The interrupt wait instruction (WI instruction) is an instruction that temporarily halts instruction execution. Instruction execution is resumed when an interrupt request is generated or a reset signal is input.

割込許可命令は、割込要因が発生したときに割
込受理を許可するための命令です。
The interrupt enable instruction is an instruction that enables interrupt acceptance when an interrupt factor occurs.

全割込禁止命令は、割込要因が発生しても全て
の割り込みを禁止するための命令であり、命令実
行の再開は、リセツトが入力される事によりのみ
行われます。
The all interrupt disable instruction is an instruction that disables all interrupts even if an interrupt factor occurs, and instruction execution can only be resumed by inputting a reset signal.

STOPモードとHALTモードへの移行制御は、
割込許可命令/全割込禁止命令と割り込み待機命
令の組み合せで指定します。
The transition control to STOP mode and HALT mode is
Specify by a combination of interrupt enable instruction/all interrupt disable instruction and interrupt wait instruction.

HALTモードへの移行は、割込許可命令を実
行した直後に割り込み待機命令を実行します。
To enter HALT mode, execute an interrupt wait instruction immediately after executing an interrupt enable instruction.

STOPモードへの移行は、全割込禁止命令を実
行した直後に割り込み待機命令を実行します。
To enter STOP mode, execute the interrupt wait instruction immediately after executing the all interrupt disable instruction.

すなわち、割込待機命令を実行するときにいず
れかの割り込みが許可されていれば、割り込みに
よる命令実行再開が可能なのでHALTモードに
移行し、割込待機命令を実行するときに全割り込
みが禁止されていれば、割り込みによる命令実行
再開ができないのでSTOPモードに移行させま
す。
In other words, if any interrupt is enabled when an interrupt wait instruction is executed, instruction execution can be resumed by the interrupt, so the system enters HALT mode, and all interrupts are disabled when the interrupt wait instruction is executed. If it is, it will not be possible to resume instruction execution using an interrupt, so move to STOP mode.

第2図は、本発明によるコンピユータ停止制御
方法を実施したマイクロコンピユータのHALT、
STOP制御回路の要部を示している。図中11お
よび15は、それぞれ第1図と同様RS−FFで構
成されたHALTフラグおよびSTOPフラグであ
り、12はORゲート、13は割込検出回路、1
4は外部割込入力端子、16はAND回路、17
はSTOP検出回路である。
FIG. 2 shows HALT and HALT of a microcomputer implementing the computer stop control method according to the present invention.
This shows the main parts of the STOP control circuit. In the figure, 11 and 15 are a HALT flag and a STOP flag respectively composed of RS-FF as in FIG. 1, 12 is an OR gate, 13 is an interrupt detection circuit, and 1
4 is an external interrupt input terminal, 16 is an AND circuit, 17
is the STOP detection circuit.

通常モードでの動作、およびHALT、STOP
モードを解除する動作は、第1図の従来例と同様
に行なわれる。即ち、HALTフラグ11のリセ
ツト入力端子に接続されたOR回路12の一方の
入力端子と、STOPフラグ15のリセツト入力端
子に加えられるリセツト信号が能動化されること
によつて通常動作モードに移行する。HALTモ
ードは、又、割込要求が割込検出回路13によつ
て検出されたときも解除される。
Operation in normal mode, HALT, STOP
The operation for canceling the mode is performed in the same manner as in the conventional example shown in FIG. That is, by activating the reset signal applied to one input terminal of the OR circuit 12 connected to the reset input terminal of the HALT flag 11 and the reset input terminal of the STOP flag 15, a transition to the normal operation mode is made. . The HALT mode is also released when an interrupt request is detected by the interrupt detection circuit 13.

通常動作モードからHALTモードへ移行する
時には、まずHALTモードへ移行させる前処理
としてプログラムによる割込許可フラグ(図示せ
ず)をセツトするための割込許可命令を実行し、
外部割込入力端子14を通して割込要求が入力さ
れ得る状態にし、続いての割込待機命令を実行す
ることによつて割込待機信号(WI信号)を能動
状態にし、HALTフラグ11をセツトする。こ
れによりHALT信号が能動状態になり、第1図
と同様、割込検出回路13などHALTモードを
解除するのに必要な特定回路を除く回路へのクロ
ツク供給を停止する。WI信号は、STOPフラグ
15のセツト入力端子に接続されたANDゲート
16の一方の入力端子にも供給されているが、
ANDゲート16の他方の入力端子はSTOP検出
回路17の出力端子に接続されており、STOP検
出回路17の出力は、割込禁止命令が実行された
ときにのみ能動レベルとなるため、STOPフラグ
15はリセツト状態のままである。
When transitioning from normal operation mode to HALT mode, first, as preprocessing for transitioning to HALT mode, a program executes an interrupt enable instruction to set an interrupt enable flag (not shown).
A state is made in which an interrupt request can be input through the external interrupt input terminal 14, and the interrupt wait signal (WI signal) is made active by executing the subsequent interrupt wait instruction, and the HALT flag 11 is set. . As a result, the HALT signal becomes active, and as in FIG. 1, the clock supply to circuits other than the specific circuits necessary to release the HALT mode, such as the interrupt detection circuit 13, is stopped. The WI signal is also supplied to one input terminal of the AND gate 16 connected to the set input terminal of the STOP flag 15.
The other input terminal of the AND gate 16 is connected to the output terminal of the STOP detection circuit 17, and since the output of the STOP detection circuit 17 becomes an active level only when an interrupt disable instruction is executed, the STOP flag 15 remains in the reset state.

次に、通常動作モードからSTOPモードへ移行
する時には、まずSTOPモードに移行させるため
の前処理として、全ての割込みを禁止するための
割込許可フラグをリセツトする割込禁止命令を実
行する。これにより割込入力端子14への割込要
求印加は禁止されるとともに、STOP検出回路1
7の出力が能動レベルになる。この状態で、割込
待機命令が実行されると、HALTフラグ11と
ともにSTOPフラグ15がセツトされ、STOP信
号が能動レベルとなることによつて、第1図と同
様、クロツク発生で停止制御される。ここでは、
HALT信号も同時に能動レベルとなるが、
STOP信号によつてクロツク発生が停止されてい
るので、実質的には何の変化もない。
Next, when transitioning from the normal operation mode to the STOP mode, first, as preprocessing for transitioning to the STOP mode, an interrupt disable instruction is executed to reset the interrupt enable flag for disabling all interrupts. As a result, the application of an interrupt request to the interrupt input terminal 14 is prohibited, and the STOP detection circuit 1
7 output becomes active level. When the interrupt standby instruction is executed in this state, the STOP flag 15 is set together with the HALT flag 11, and the STOP signal goes to the active level, so that the stop control is performed by clock generation as in Fig. 1. . here,
The HALT signal also becomes active level at the same time,
Since clock generation is stopped by the STOP signal, there is virtually no change.

本実施例における割込許可命令、割込待機命令
および全割込禁止命令は、いずれもHALT/
STOPモードを有しない従来のマイクロコンピユ
ータで用いられている命令と同一であり、その組
合わせによつてHALT、STOPの各モードへの
移行制御を行うところに本発明の特徴がある。即
ち、従来例で述べたように、HALT/STOPモ
ードを付加することによつて、それぞれのモード
へ移行するために別の命令を用意し、かつそれら
の命令をデコードするデコーダを設ける必要がな
いため、ハードウエアの構成が複雑にならない。
また、マイクロコンピユータのハードウエア、ソ
フトウエアの開発サポートツールがHALT/
STOPモードを有しない従来のものと共用できる
利点がある。
In this embodiment, the interrupt enable instruction, interrupt wait instruction, and all interrupt disable instruction are all HALT/
The present invention is characterized by the fact that these instructions are the same as those used in conventional microcomputers that do not have a STOP mode, and the combination of these instructions controls transition to HALT and STOP modes. That is, as described in the conventional example, by adding the HALT/STOP mode, there is no need to prepare separate instructions for transitioning to each mode and to provide a decoder to decode those instructions. Therefore, the hardware configuration does not become complicated.
In addition, the development support tools for microcomputer hardware and software are HALT/
It has the advantage that it can be used in common with conventional models that do not have a STOP mode.

以上の説明から明らかなように、本発明による
コンピユータの停止制御方法は、割込許可命令を
実行した後の割込待機命令の実行によつて
HALTモードへ移行させ、全割込禁止命令を実
行した後の割込待機命令の実行によつてSTOPモ
ードへ移行させることが可能となり、HALT/
STOPモードを有しない従来の機種との間でのソ
フトウエアの共用化が可能となる等の優れた効果
を有するものである。
As is clear from the above explanation, the computer stop control method according to the present invention is achieved by executing an interrupt wait instruction after executing an interrupt enable instruction.
It is possible to transition to HALT mode and execute the interrupt wait instruction after executing the all interrupt disable instruction to transition to STOP mode.
This has excellent effects such as making it possible to share software with conventional models that do not have a STOP mode.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は従来のコンピユータ停止制御方法を示
すブロツク図、第2図は本発明によるコンピユー
タ停止制御方法を適用した装置の要部ブロツク図
である。 11…HALTフラグ、12…ORゲート、13
…割込検出回路、14…割込入力端子、15…
STOPフラグ、16…ANDゲート、17…
STOP検出回路。
FIG. 1 is a block diagram showing a conventional computer stop control method, and FIG. 2 is a main part block diagram of a device to which the computer stop control method according to the present invention is applied. 11...HALT flag, 12...OR gate, 13
...Interrupt detection circuit, 14...Interrupt input terminal, 15...
STOP flag, 16...AND gate, 17...
STOP detection circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 HALTモードを解除する回路を除くCPU各
部へのクロツク供給を一時停止制御するHALT
フラグのセツト入力側に、割込待機命令の実行に
より能動となる信号を加えるとともに、クロツク
発生を停止制御するSTOPフラグのセツト入力側
に、全割込禁止命令の実行によつて能動となる信
号と前記割込待機命令の実行によつて能動となる
信号との論理積からなる信号を加え、前記割込待
機命令の実行によつてHALTフラグ又はSTOP
フラグがセツトされることを特徴とするコンピユ
ータの停止制御方法。
1 HALT, which temporarily stops clock supply to each part of the CPU except for the circuit that cancels HALT mode
A signal that becomes active when the interrupt wait instruction is executed is added to the set input side of the flag, and a signal that becomes active when the interrupt disable instruction is executed is added to the set input side of the STOP flag that controls clock generation. and a signal that becomes active upon execution of the interrupt standby instruction, and the HALT flag or STOP is set as
A computer stop control method characterized in that a flag is set.
JP56212900A 1981-12-28 1981-12-28 Stop controlling method of computer Granted JPS58114242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56212900A JPS58114242A (en) 1981-12-28 1981-12-28 Stop controlling method of computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56212900A JPS58114242A (en) 1981-12-28 1981-12-28 Stop controlling method of computer

Publications (2)

Publication Number Publication Date
JPS58114242A JPS58114242A (en) 1983-07-07
JPH0149968B2 true JPH0149968B2 (en) 1989-10-26

Family

ID=16630129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56212900A Granted JPS58114242A (en) 1981-12-28 1981-12-28 Stop controlling method of computer

Country Status (1)

Country Link
JP (1) JPS58114242A (en)

Also Published As

Publication number Publication date
JPS58114242A (en) 1983-07-07

Similar Documents

Publication Publication Date Title
US4780843A (en) Wait mode power reduction system and method for data processor
US5842028A (en) Method for waking up an integrated circuit from low power mode
JP3678759B2 (en) Apparatus for generating an interrupt and method for generating an interrupt
JPH0149968B2 (en)
JPH0756774A (en) Watching timer
JP3913991B2 (en) Microcomputer and computer system
JPS60124734A (en) Interruption processing circuit to cpu
JPS62205441A (en) Microcomputer
JPH07244595A (en) Process switch controller and process controlling method
JPS622684Y2 (en)
JPH0411895B2 (en)
JPH07104800B2 (en) Program evaluation device
JP2870083B2 (en) Microcomputer with built-in watchdog timer
JP2705311B2 (en) Microcomputer
JPS61245242A (en) Interruption input device
JP3489174B2 (en) Semiconductor integrated circuit
JP2867617B2 (en) Standby circuit
JPH0581079A (en) Software runaway preventing system
JP2755205B2 (en) Low power consumption method for data processing equipment
JPH01223521A (en) Large scale integrated circuit
JPH10340208A (en) Microprocessor
JPH0326112A (en) Integrated circuit device
JPS6362013B2 (en)
JPS6073722A (en) Control circuit of timer output
JPH03148731A (en) Single chip microcomputer