JPH06259264A - Clock control circuit - Google Patents

Clock control circuit

Info

Publication number
JPH06259264A
JPH06259264A JP5075111A JP7511193A JPH06259264A JP H06259264 A JPH06259264 A JP H06259264A JP 5075111 A JP5075111 A JP 5075111A JP 7511193 A JP7511193 A JP 7511193A JP H06259264 A JPH06259264 A JP H06259264A
Authority
JP
Japan
Prior art keywords
signal
interrupt
clock
circuit
speed
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.)
Pending
Application number
JP5075111A
Other languages
Japanese (ja)
Inventor
Terukuni Kubo
輝訓 久保
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5075111A priority Critical patent/JPH06259264A/en
Publication of JPH06259264A publication Critical patent/JPH06259264A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide the clock control circuit which can omit an operation (program) for reloading a clock control register before interruption processing and can respond even to the plural and various kinds of interruption processing as well. CONSTITUTION:This circuit is provided with a flip-flop circuit 12 for inputting an interruption request signal 10 outputted from an interruption control circuit 3 and a processing completion time-control signal outputted from a CPU (central processing unit) 1 and for outputting an interruption generate signal for a clock selecting circuit 5 to select a high-speed clock signal from the input of the interruption request signal 10 to the input of the processing completion time control signal.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、マイクロコンピュー
タ装置のクロック制御回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a clock control circuit for a microcomputer device.

【0002】[0002]

【従来の技術】図6は従来のマイクロコンピュータ装置
のクロック制御回路を示すブロック構成図であり、図に
おいて、1は中央処理装置(以下、CPUと言う)、2
はCPU1を動作させるプログラムを記憶したメモリ、
3は割り込み信号の入力に応じてCPU1に割り込み処
理をさせる割り込み制御回路、4はメモリ2に記憶され
たプログラムの内容に応じてクロックの速度を設定する
クロック制御レジスタ、5はクロック制御レジスタ4で
設定されたクロックの速度に応じてクロックの速度を選
択し、内部クロック信号として出力するクロック選択回
路であり、図では高速クロックと低速クロックの2種類
のクロックが選択できる。6は外部に対してデータを入
出力する入出力回路、7はCPU1より出力される制御
信号、8はデータバス、9は内部クロック信号で、この
内部クロック信号9はクロック選択回路5より、上記C
PU1,メモリ2,割り込み制御回路3,クロック制御
レジスタ4および入出力回路6にそれぞれ出力されてい
る。10は割り込み制御回路3がCPU1に対して割り
込みをかける時出力される割り込み要求信号、11はC
PU1が割り込み制御回路3を制御するための制御信号
である。
2. Description of the Related Art FIG. 6 is a block diagram showing a clock control circuit of a conventional microcomputer apparatus. In the figure, 1 is a central processing unit (hereinafter referred to as CPU), and 2
Is a memory storing a program for operating the CPU 1,
Reference numeral 3 is an interrupt control circuit that causes the CPU 1 to perform interrupt processing in response to an interrupt signal input, 4 is a clock control register that sets the speed of the clock according to the contents of the program stored in the memory 2, and 5 is a clock control register 4. This is a clock selection circuit that selects the clock speed according to the set clock speed and outputs it as an internal clock signal. In the figure, two types of clocks, a high speed clock and a low speed clock, can be selected. Reference numeral 6 is an input / output circuit for inputting / outputting data to / from the outside, 7 is a control signal output from the CPU 1, 8 is a data bus, 9 is an internal clock signal, and the internal clock signal 9 is supplied from the clock selection circuit 5 to C
It is output to each of the PU 1, the memory 2, the interrupt control circuit 3, the clock control register 4, and the input / output circuit 6. Reference numeral 10 is an interrupt request signal output when the interrupt control circuit 3 interrupts the CPU 1, 11 is C
PU1 is a control signal for controlling the interrupt control circuit 3.

【0003】次に動作について説明する。CPU1はク
ロック選択回路5より出力される内部クロック信号9に
同期して、メモリ2に記憶されているプログラムを順次
実行していく。クロック選択回路5には高速クロックと
低速クロックとが入力されており、クロック制御レジス
タ4よりの選択信号により高速クロックと低速クロック
とを切り換えて内部クロック信号9として出力してい
る。クロック制御レジスタ4はCPU1からの制御信号
7とデータバス8とにより書き込まれ、高速クロックと
低速クロックとのどちらを用いるかは、メモリ2に格納
されているプログラムの内容に応じてCPU1が設定す
る。
Next, the operation will be described. The CPU 1 sequentially executes the programs stored in the memory 2 in synchronization with the internal clock signal 9 output from the clock selection circuit 5. The high-speed clock and the low-speed clock are input to the clock selection circuit 5, and the high-speed clock and the low-speed clock are switched by the selection signal from the clock control register 4 and output as the internal clock signal 9. The clock control register 4 is written by the control signal 7 from the CPU 1 and the data bus 8, and which of the high-speed clock and the low-speed clock is used is set by the CPU 1 according to the contents of the program stored in the memory 2. .

【0004】割り込み制御回路3は割り込み信号が発生
した場合に、割り込み要求信号10をCPU1に対して
出力したり、また、CPU1が割り込み要求信号10を
受付可能になるまで割り込み信号を保持したり、逆に、
割り込み信号をキャンセルしたり、割り込み要求信号1
0をCPU1に送るのを禁止したりすることができる。
このような、割り込み制御回路3の動作の設定はクロッ
ク制御レジスタ4と同様にCPU1が行う。割り込み信
号が発生すると割り込み制御回路3はCPU1に対して
割り込み要求信号10を出力し、CPU1はメモリ2に
あらかじめプログラムされた内容に応じて割り込み処理
を実行する。割り込み処理が完了するとCPU1は制御
信号11としての処理完了時制御信号を割り込み制御回
路3に出力し、次の割り込み信号の受け付けができるよ
うに割り込み制御回路3を設定する。
The interrupt control circuit 3 outputs an interrupt request signal 10 to the CPU 1 when an interrupt signal is generated, holds the interrupt signal until the CPU 1 can accept the interrupt request signal 10, vice versa,
Interrupt signal is canceled or interrupt request signal 1
It is possible to prohibit sending 0 to the CPU 1.
The CPU 1 sets the operation of the interrupt control circuit 3 as described above, like the clock control register 4. When the interrupt signal is generated, the interrupt control circuit 3 outputs the interrupt request signal 10 to the CPU 1, and the CPU 1 executes the interrupt process according to the contents programmed in the memory 2 in advance. When the interrupt processing is completed, the CPU 1 outputs a processing completion control signal as the control signal 11 to the interrupt control circuit 3, and sets the interrupt control circuit 3 so that the next interrupt signal can be accepted.

【0005】ところで、通常ユーザーは消費電力を少な
くするため、高速の処理が必要でない時は低速クロック
を用い、高速処理が必要である時や、割り込みが発生し
た場合の処理などは高速クロックを用いるようにプログ
ラムを作成する。割り込みが発生した場合に高速クロッ
クに切り換え、割り込み処理が完了した後に低速クロッ
クに戻すようなプログラムを作成した場合、図7に示す
ようなフローチャートとなる。図7に示すように、消費
電力を少なくするために、割り込み発生後の処理やその
他の処理など直接マイクロコンピュータ装置の動作に関
係する処理以外に、クロックを切り換えるための間接的
な処理が必要となっている。
In order to reduce power consumption, a normal user uses a low-speed clock when high-speed processing is not necessary, and uses a high-speed clock when high-speed processing is necessary or when an interrupt occurs. To create a program. When a program is created that switches to the high-speed clock when an interrupt occurs and returns to the low-speed clock after the interrupt processing is completed, the flowchart is as shown in FIG. 7. As shown in FIG. 7, in order to reduce power consumption, indirect processing for switching clocks is necessary in addition to processing directly related to the operation of the microcomputer device, such as processing after the occurrence of an interrupt and other processing. Has become.

【0006】[0006]

【発明が解決しようとする課題】従来のクロック制御回
路は以上のように構成されているので、それぞれの割り
込み信号に対応したクロックを選択するためには、図7
に示すように、クロック制御レジスタ4の内容を書き換
えなければならず、メモリ2に記憶されるプログラムが
長くなってしまう。また、クロックが切り換わった後に
割り込み処理が開始されるので、割り込み処理に対する
マイクロコンピュータ装置の応答が遅くなるなどの問題
点があった。
Since the conventional clock control circuit is constructed as described above, in order to select the clock corresponding to each interrupt signal, FIG.
As shown in, the contents of the clock control register 4 must be rewritten, and the program stored in the memory 2 becomes long. Further, since the interrupt process is started after the clock is switched, there is a problem that the response of the microcomputer device to the interrupt process is delayed.

【0007】この発明は上記のような問題点を解消する
ためになされたもので、割り込み処理の前に、クロック
制御レジスタを書き換える動作(プログラム)を省略で
きると共に、複数の多様な割り込み処理に対しても高速
に応答できるクロック制御回路を得ることを目的とす
る。
The present invention has been made in order to solve the above problems. It is possible to omit the operation (program) for rewriting the clock control register before the interrupt processing, and to cope with a plurality of various interrupt processing. Even if it is, it aims at obtaining the clock control circuit which can respond at high speed.

【0008】[0008]

【課題を解決するための手段】請求項1の発明に係るク
ロック制御回路は、割り込み制御回路から出力される割
り込み要求信号および中央処理装置から出力される処理
完了時制御信号を入力し、その割り込み要求信号を入力
してから処理完了時制御信号を入力するまでの間、クロ
ック選択回路に高速のクロック信号を選択させる割り込
み発生信号を出力するフリップフロップ回路を備えたも
のである。
A clock control circuit according to a first aspect of the present invention inputs an interrupt request signal output from an interrupt control circuit and a control signal at the time of completion of processing output from a central processing unit, and interrupts the interrupt. A flip-flop circuit that outputs an interrupt generation signal that causes the clock selection circuit to select a high-speed clock signal is provided between the input of the request signal and the input of the processing completion control signal.

【0009】請求項2の発明に係るクロック制御回路
は、複数の割り込み信号の中で選択された割り込み選択
信号をデコードし、あらかじめ指定された高速または低
速の内部クロック信号の速度に応じて信号出力するデコ
ード回路と、割り込み制御回路から出力される割り込み
要求信号および中央処理装置から出力される処理完了時
制御信号を入力し、その割り込み要求信号を入力してか
ら処理完了時制御信号を入力するまでの間、割り込み発
生信号を出力するフリップフロップ回路と、デコード回
路の信号出力を入力すると共にフリップフロップ回路の
割り込み発生信号を入力しそのデコード回路の信号出力
に高速の内部クロック信号が指定され、かつフリップフ
ロップ回路の割り込み発生信号が発生している間、クロ
ック選択回路に高速のクロック信号を選択させる選択信
号を出力するクロック制御信号選択回路とを備えたもの
である。
A clock control circuit according to a second aspect of the present invention decodes an interrupt selection signal selected from a plurality of interrupt signals, and outputs a signal according to a speed of a high-speed or low-speed internal clock signal designated in advance. Input the interrupt request signal output from the decode circuit and the interrupt control circuit and the processing completion control signal output from the central processing unit, and from the input of the interrupt request signal to the processing completion control signal During this period, the flip-flop circuit that outputs the interrupt generation signal and the signal output of the decode circuit are input, and the interrupt generation signal of the flip-flop circuit is input and the high-speed internal clock signal is specified for the signal output of the decode circuit, and High-speed clock selection circuit while the interrupt generation signal of the flip-flop circuit is generated It is obtained by a clock control signal selection circuit for outputting a selection signal for selecting a clock signal.

【0010】請求項3の発明に係るクロック制御回路
は、複数の割り込み信号の中で選択された割り込み選択
信号をデコードし、あらかじめ指定された内部クロック
信号の速度に応じて信号出力するデコード回路と、割り
込み制御回路から出力される割り込み要求信号および中
央処理装置から出力される処理完了時制御信号を入力
し、その割り込み要求信号を入力してから処理完了時制
御信号を入力するまでの間、割り込み発生信号を出力す
るフリップフロップ回路と、デコード回路の信号出力を
入力すると共にフリップフロップ回路の割り込み発生信
号を入力しそのフリップフロップ回路の割り込み発生信
号が発生している間、そのデコード回路の信号出力に応
じて上記クロック選択回路にクロック信号を選択させる
選択信号を出力するクロック制御信号選択回路とを備え
たものである。
According to a third aspect of the present invention, there is provided a clock control circuit, which decodes an interrupt selection signal selected from a plurality of interrupt signals, and outputs the signal in accordance with a speed of an internal clock signal designated in advance. , The interrupt request signal output from the interrupt control circuit and the processing completion control signal output from the central processing unit are input, and an interrupt occurs between the input of the interrupt request signal and the processing completion control signal. The signal output of the decode circuit while the flip-flop circuit that outputs the generated signal and the signal output of the decode circuit are input and the interrupt generation signal of the flip-flop circuit is input and the interrupt generation signal of the flip-flop circuit is generated The clock selection circuit outputs a selection signal for selecting the clock signal according to the Tsu is that a click control signal selection circuit.

【0011】[0011]

【作用】請求項1の発明におけるフリップフロップ回路
は、割り込み制御回路から割り込み処理発生時に出力さ
れる割り込み要求信号と、中央処理装置から割り込み処
理終了時に出力される処理完了時制御信号とを入力し、
その割り込み要求信号を入力してから処理完了時制御信
号を入力するまでの間、クロック選択回路に高速のクロ
ック信号を選択させる割り込み発生信号を出力する。し
たがって、割り込み処理が発生しても、割り込み処理の
前にクロック制御レジスタを書き換える動作を省略可能
にする。
According to the first aspect of the present invention, a flip-flop circuit receives an interrupt request signal output from an interrupt control circuit when an interrupt process occurs and a process completion control signal output from a central processing unit when an interrupt process ends. ,
From the input of the interrupt request signal to the input of the processing completion control signal, the clock selection circuit outputs an interrupt generation signal for selecting a high-speed clock signal. Therefore, even if the interrupt processing occurs, the operation of rewriting the clock control register before the interrupt processing can be omitted.

【0012】請求項2の発明におけるクロック制御回路
は、デコード回路により、複数の割り込み信号の中で選
択された割り込み選択信号をデコードし、あらかじめ高
速または低速に指定された内部クロック信号の速度に応
じてクロック制御信号選択回路に信号出力する。また、
フリップフロップ回路は、割り込み制御回路から割り込
み処理発生時に出力される割り込み要求信号と、中央処
理装置から割り込み処理終了時に出力される処理完了時
制御信号とを入力し、その割り込み要求信号を入力して
から処理完了時制御信号を入力するまでの間、割り込み
発生信号をクロック制御信号選択回路に出力する。さら
に、クロック制御信号選択回路は、そのデコード回路の
信号出力に高速の内部クロック信号が指定され、かつフ
リップフロップ回路の割り込み発生信号が発生している
間、クロック選択回路に高速のクロック信号を選択させ
る選択信号を出力する。したがって、特定の割り込み信
号についてのみ、内部クロック信号を高速クロックに切
り換えることを可能にすると共に、割り込み処理が発生
しても、割り込み処理の前にクロック制御レジスタを書
き換える動作を省略可能にする。
According to another aspect of the clock control circuit of the present invention, the decode circuit decodes the interrupt selection signal selected from the plurality of interrupt signals, and decodes the interrupt selection signal according to the speed of the internal clock signal designated in advance as high speed or low speed. And outputs the signal to the clock control signal selection circuit. Also,
The flip-flop circuit inputs an interrupt request signal output from the interrupt control circuit when an interrupt process occurs and a process completion control signal output from the central processing unit at the end of the interrupt process, and inputs the interrupt request signal. The interrupt generation signal is output to the clock control signal selection circuit from the time until the processing completion control signal is input. Further, the clock control signal selection circuit selects the high-speed clock signal to the clock selection circuit while the high-speed internal clock signal is specified for the signal output of the decoding circuit and the interrupt generation signal of the flip-flop circuit is generated. Output a selection signal. Therefore, it is possible to switch the internal clock signal to the high-speed clock only for a specific interrupt signal, and even if the interrupt processing occurs, the operation of rewriting the clock control register before the interrupt processing can be omitted.

【0013】請求項3の発明におけるクロック制御回路
は、デコード回路により、複数の割り込み信号の中で選
択された割り込み選択信号をデコードし、あらかじめ指
定された内部クロック信号の速度に応じてクロック制御
信号選択回路に信号出力する。また、フリップフロップ
回路は、割り込み制御回路から割り込み処理発生時に出
力される割り込み要求信号と、中央処理装置から割り込
み処理終了時に出力される処理完了時制御信号とを入力
し、その割り込み要求信号を入力してから処理完了時制
御信号を入力するまでの間、割り込み発生信号をクロッ
ク制御信号選択回路に出力する。さらに、クロック制御
信号選択回路は、そのフリップフロップ回路の割り込み
発生信号が発生している間、そのデコード回路の信号出
力に応じてクロック選択回路にクロック信号を選択させ
る選択信号を出力する。したがって、割り込み選択信号
に応じて内部クロック信号の速度を切り換えることを可
能にすると共に、割り込み処理が発生しても、割り込み
処理の前にクロック制御レジスタを書き換える動作を省
略可能にする。
According to another aspect of the clock control circuit of the present invention, the decode circuit decodes the interrupt selection signal selected from the plurality of interrupt signals, and the clock control signal is generated according to the speed of the internal clock signal designated in advance. The signal is output to the selection circuit. Further, the flip-flop circuit inputs an interrupt request signal output from the interrupt control circuit when an interrupt process occurs and a process completion control signal output from the central processing unit at the end of the interrupt process, and inputs the interrupt request signal. After that, the interrupt generation signal is output to the clock control signal selection circuit from the time when the processing completion control signal is input. Further, the clock control signal selection circuit outputs a selection signal for causing the clock selection circuit to select the clock signal according to the signal output of the decoding circuit while the interrupt generation signal of the flip-flop circuit is being generated. Therefore, the speed of the internal clock signal can be switched according to the interrupt selection signal, and even if the interrupt processing occurs, the operation of rewriting the clock control register before the interrupt processing can be omitted.

【0014】[0014]

【実施例】【Example】

実施例1.以下、この発明の一実施例を図について説明
する。図1は請求項1の発明の一実施例によるクロック
制御回路を示すブロック構成図であり、図において、1
はCPU(中央処理装置)、2はCPU1を動作させる
プログラムを記憶したメモリ(記憶手段)、3は割り込
み信号の入力に応じてCPU1に割り込み処理をさせる
割り込み制御回路、4はメモリ2に記憶されたプログラ
ムの内容に応じてクロックの速度を設定するクロック制
御レジスタ、5はクロック制御レジスタ4で設定された
クロックの速度に応じて内部クロック信号9の速度を選
択して出力するクロック選択回路、6は外部に対してデ
ータを入出力する入出力回路、7はCPU1より出力さ
れる制御信号、8はデータバス、9は内部クロック信号
で、この内部クロック信号9はクロック選択回路5よ
り、上記CPU1,メモリ2,割り込み制御回路3,ク
ロック制御レジスタ4および入出力回路6にそれぞれ出
力されている。10は割り込み制御回路3がCPU1に
対して割り込みをかける時出力される割り込み要求信
号、11はCPU1が割り込み制御回路3を制御するた
めの制御信号である。ここまでの構成は従来の技術と同
様の構成である。
Example 1. An embodiment of the present invention will be described below with reference to the drawings. 1 is a block diagram showing a clock control circuit according to an embodiment of the present invention. In FIG.
Is a CPU (central processing unit), 2 is a memory (storage means) that stores a program for operating the CPU 1, 3 is an interrupt control circuit that causes the CPU 1 to perform interrupt processing in response to the input of an interrupt signal, and 4 is stored in the memory 2. A clock control register 5 for setting the speed of the clock according to the contents of the program, a clock selection circuit 5 for selecting and outputting the speed of the internal clock signal 9 according to the speed of the clock set by the clock control register 4, 6 Is an input / output circuit for inputting / outputting data to / from the outside, 7 is a control signal output from the CPU 1, 8 is a data bus, 9 is an internal clock signal, and the internal clock signal 9 is supplied from the clock selection circuit 5 to the CPU 1 , Memory 2, interrupt control circuit 3, clock control register 4, and input / output circuit 6. Reference numeral 10 is an interrupt request signal output when the interrupt control circuit 3 interrupts the CPU 1, and 11 is a control signal for the CPU 1 to control the interrupt control circuit 3. The configuration up to this point is similar to the conventional technique.

【0015】12は割り込み制御回路3からCPU1に
出力される割り込み要求信号10がセット入力(S)に
接続され、CPU1から割り込み制御回路3に出力され
る制御信号11の1つの動作である処理完了時制御信号
がリセット入力(R)に接続され、出力(Q)がOR回
路13に接続されたセットリセットフリップフロップ
(フリップフロップ回路)、13はそのセットリセット
フリップフロップ12の出力(Q)とクロック制御レジ
スタ4の出力とを入力しクロック選択回路5に出力する
OR回路である。なお、上記クロック選択回路5はOR
回路13からの入力が高電位レベルの時高速クロックを
発生し、低電位レベルの時低速クロックを発生するよう
に構成されている。
An interrupt request signal 10 output from the interrupt control circuit 3 to the CPU 1 is connected to a set input (S) 12, and one of the control signals 11 output from the CPU 1 to the interrupt control circuit 3 is an operation completion. Set control flip-flop (flip-flop circuit) whose time control signal is connected to the reset input (R) and whose output (Q) is connected to the OR circuit 13, and 13 is the output (Q) of the set-reset flip-flop 12 and the clock It is an OR circuit which inputs the output of the control register 4 and outputs it to the clock selection circuit 5. The clock selection circuit 5 is ORed.
A high-speed clock is generated when the input from the circuit 13 is at a high potential level, and a low-speed clock is generated when the input is at a low potential level.

【0016】次に動作について説明する。割り込み信号
が割り込み制御回路3に入力されると、割り込み制御回
路3は割り込み禁止状態でない限り、CPU1に対して
割り込み要求信号10を出力する。この割り込み要求信
号10はCPU1以外に、セットリセットフリップフロ
ップ12のセット入力(S)に出力されているので、割
り込み要求信号10によりセットリセットフリップフロ
ップ12はセット状態となり、出力Qは低電位レベル
(以下、‘L’と言う)より、高電位レベル(以下、
‘H’と言う)となる。この信号を割り込み発生信号と
してOR回路13に出力する。次に、クロック選択回路
5はOR回路13からの割り込み発生信号がが‘L’の
場合に低速クロックを、‘H‘の場合に高速クロックを
出力するように動作するので、OR回路13の出力が
‘H’になると高速クロックを選択する。以上の動作を
まとめると、クロック制御レジスタ4の出力が‘L’に
設定されている場合に、割り込み処理が発生し、割り込
み要求信号10がCPU1に入力されることにより、そ
の割り込み要求信号10に連動して内部クロック信号9
が高速クロックに切り換わることとなる。
Next, the operation will be described. When the interrupt signal is input to the interrupt control circuit 3, the interrupt control circuit 3 outputs the interrupt request signal 10 to the CPU 1 unless it is in the interrupt disabled state. Since the interrupt request signal 10 is output to the set input (S) of the set / reset flip-flop 12 in addition to the CPU 1, the interrupt / reset signal 10 sets the set / reset flip-flop 12 to the set state, and the output Q has a low potential level ( Hereinafter, a higher potential level (hereinafter referred to as “L”)
"H"). This signal is output to the OR circuit 13 as an interrupt generation signal. Next, the clock selection circuit 5 operates so as to output the low-speed clock when the interrupt generation signal from the OR circuit 13 is “L”, and outputs the high-speed clock when the interrupt generation signal is “H”. Becomes high, the high speed clock is selected. Summarizing the above operation, when the output of the clock control register 4 is set to “L”, the interrupt processing occurs and the interrupt request signal 10 is input to the CPU 1, so that the interrupt request signal 10 is changed. Internal clock signal 9
Will be switched to the high-speed clock.

【0017】次に、割り込み処理が完了した場合、CP
U1は処理完了時制御信号を割り込み制御回路3に出力
する。また、この処理完了時制御信号によりセットリセ
ットフリップフロップ12はリセット状態となり出力Q
は‘L’になる。セットリセットフリップフロップ12
の出力Qが‘L’になると、上記割り込み処理発生時と
は逆になり、クロック制御レジスタ4の出力が‘L’で
あるならば、OR回路13の出力は‘L’となり、内部
クロック信号9が低速クロックに切り換わる。
Next, when the interrupt processing is completed, the CP
U1 outputs a control signal upon completion of processing to the interrupt control circuit 3. Further, the control signal upon completion of this process causes the set / reset flip-flop 12 to be in a reset state and output Q
Becomes'L '. Set reset flip-flop 12
When the output Q of the above becomes "L", it is the reverse of the time when the interrupt processing occurs, and when the output of the clock control register 4 is "L", the output of the OR circuit 13 becomes "L" and the internal clock signal 9 switches to the low speed clock.

【0018】従来の技術のフローチャートに示した動作
と同じ動作を実行した場合のフローチャートを図2に示
す。図に示すように、間接的な処理であるクロック制御
レジスタ4の書き換えが不要となり、この実施例では、
割り込みに対するマイクロコンピュータ装置の応答が速
くなる効果がある。
FIG. 2 shows a flowchart when the same operation as the operation shown in the flowchart of the prior art is executed. As shown in the figure, it is not necessary to rewrite the clock control register 4, which is an indirect process. In this embodiment,
This has the effect of speeding up the response of the microcomputer device to the interrupt.

【0019】実施例2.上記実施例1では、割り込み処
理が発生した場合、必ず内部クロック信号9が高速クロ
ックに切り換わるように構成していたが、割り込み信号
が複数ある場合に、ある特定の割り込み信号についての
み、内部クロック信号9が高速クロックに切り換わるよ
うに構成してもよい。図3は請求項2の発明の一実施例
によるクロック制御回路を示すブロック構成図であり、
図において、1〜13は上記実施例1と同様の構成であ
る。
Example 2. In the first embodiment described above, the internal clock signal 9 is always switched to the high-speed clock when the interrupt processing occurs. However, when there are a plurality of interrupt signals, only the internal clock signal of a specific interrupt signal is changed. The signal 9 may be configured to switch to the high speed clock. FIG. 3 is a block diagram showing a clock control circuit according to an embodiment of the present invention.
In the figure, 1 to 13 have the same configuration as that of the first embodiment.

【0020】14は複数の割り込み信号のうちどの割り
込み処理が発生しているのかをCPU1に出力する割り
込み選択信号、15はその割り込み選択信号14をデコ
ードし、高速クロックを必要とする割り込みが発生して
いる時のみOR回路13に‘H’出力するデコード回路
である。16はクロック制御レジスタ4の出力とOR回
路13の出力のどちらをクロック選択回路5に出力する
かを切り換えるクロック制御信号選択回路である。この
クロック制御信号選択回路16はセットリセットフリッ
プフロップ12の割り込み発生信号を入力し、そのセッ
トリセットフリップフロップ12より割り込み発生信号
が発生している間にOR回路13より‘H’出力された
場合に、クロック選択回路5に高速のクロック信号を選
択させるように構成されている。
Reference numeral 14 is an interrupt selection signal for outputting to the CPU 1 which interrupt processing is occurring among a plurality of interrupt signals, and 15 is for decoding the interrupt selection signal 14 to generate an interrupt requiring a high-speed clock. It is a decoding circuit that outputs'H 'to the OR circuit 13 only when Reference numeral 16 is a clock control signal selection circuit that switches between the output of the clock control register 4 and the output of the OR circuit 13 to the clock selection circuit 5. The clock control signal selection circuit 16 inputs the interrupt generation signal of the set / reset flip-flop 12 and outputs “H” from the OR circuit 13 while the interrupt generation signal is generated from the set / reset flip-flop 12. The clock selection circuit 5 is configured to select a high-speed clock signal.

【0021】次に動作について説明する。この実施例2
では、デコード回路15とOR回路13とで高速クロッ
クを必要とする割り込み信号を選択し、実施例1と同
様、割り込み処理が実行されている期間だけ、セットリ
セットフリップフロップ12の出力Qが‘H’となり、
この‘H’出力によりクロック制御信号選択回路16が
OR回路13の出力を選択するので、内部クロック信号
9は高速クロックとなる。したがって、特定の割り込み
信号についてのみ、内部クロック信号9を高速クロック
に切り換えることができる効果がある。
Next, the operation will be described. This Example 2
Then, the decode circuit 15 and the OR circuit 13 select an interrupt signal requiring a high-speed clock, and the output Q of the set / reset flip-flop 12 is'H 'only during the period in which the interrupt process is executed, as in the first embodiment. 'Becomes
The'H 'output causes the clock control signal selection circuit 16 to select the output of the OR circuit 13, so that the internal clock signal 9 becomes a high-speed clock. Therefore, the internal clock signal 9 can be switched to the high-speed clock only for the specific interrupt signal.

【0022】実施例3.上記実施例2では、2種類の高
速クロックと低速クロックとが切り換わるように構成し
ていたが、3種類以上のクロックにも適応できるように
構成してもよい。図4は請求項3の発明の一実施例によ
るクロック制御回路を示すブロック構成図であり、図に
おいて、1〜14,16は上記実施例2と同様の構成で
ある。17は実施例2のデコード回路15を発展させた
ものであり、各割り込み信号に応じたクロックを選択す
るために、それぞれのクロックに対応したデコード出力
を複数組持っており、各組の出力をOR回路13で論理
和をとり、クロック制御信号選択回路16に入力してい
る。動作としては、1つの割り込み処理が発生した場
合、その割り込み処理に対応しているクロックがどれか
をデコード回路17とOR回路13により選択し実施例
2と同様、割り込み処理が実行されている期間、クロッ
ク制御信号選択回路16がOR回路13の出力を選択
し、必要としているクロックに内部クロック信号9が切
り換わるものである。
Example 3. In the second embodiment, the two types of high-speed clocks and the low-speed clocks are configured to be switched, but it may be configured to be applicable to three or more types of clocks. FIG. 4 is a block configuration diagram showing a clock control circuit according to an embodiment of the invention of claim 3, and in the figure, 1 to 14 and 16 have the same configuration as that of the second embodiment. Reference numeral 17 is an expansion of the decoding circuit 15 of the second embodiment, which has a plurality of decode outputs corresponding to respective clocks in order to select a clock corresponding to each interrupt signal. The OR circuit 13 takes the logical sum and inputs it to the clock control signal selection circuit 16. As an operation, when one interrupt process occurs, a clock corresponding to the interrupt process is selected by the decode circuit 17 and the OR circuit 13 and the interrupt process is executed as in the second embodiment. The clock control signal selection circuit 16 selects the output of the OR circuit 13, and the internal clock signal 9 is switched to the required clock.

【0023】実施例4.上記実施例1〜3では、CPU
1および各制御レジスタ等の動作に使用した内部クロッ
ク信号9について本発明を適応したものを示したが、タ
イマー回路、シリアルI/O回路、A/D変換回路等の
他の周辺回路用のクロックに本発明を適応してもよい。
図5は請求項1の発明の他の実施例によるクロック制御
回路を示すブロック構成図であり、図において、1〜1
2は上記実施例1と同様の構成である。18はタイマ回
路であり、このタイマ回路18はクロック選択回路5b
より出力された内部クロック信号9bにより動作してい
る。このように、実施例1のクロック選択回路5により
発生した内部クロック信号9を、他の周辺回路に適応し
ても、通常は消費電力を低減するため低速クロックを入
力し、割り込みが発生した時に上記周辺回路を高速クロ
ックで動作させることができる。
Example 4. In the above Examples 1 to 3, the CPU
1 and the internal clock signal 9 used for the operation of each control register and the like to which the present invention is applied, the clocks for other peripheral circuits such as a timer circuit, a serial I / O circuit, and an A / D conversion circuit are shown. The present invention may be applied to.
FIG. 5 is a block diagram showing a clock control circuit according to another embodiment of the present invention.
2 has the same structure as that of the first embodiment. Reference numeral 18 denotes a timer circuit, which is a clock selection circuit 5b.
It operates by the internal clock signal 9b output from Thus, even if the internal clock signal 9 generated by the clock selection circuit 5 of the first embodiment is applied to other peripheral circuits, a low-speed clock is normally input to reduce power consumption, and when an interrupt occurs. The peripheral circuits can be operated with a high speed clock.

【0024】また、実施例3では、CPU1および各制
御レジスタ等の動作に使用した内部クロック信号9につ
いて3種類以上のクロックが適応できる構成を示した
が、この場合であっても、図4に示すように周辺回路1
9に対して3種類以上のクロックを適応してもよい。ま
た、最低速のクロックとして、固定した信号、つまりク
ロックが入力されない状態を選択することとしてもよ
い。
Further, in the third embodiment, a configuration is shown in which three or more kinds of clocks can be applied to the internal clock signal 9 used for the operation of the CPU 1 and each control register, but even in this case, FIG. Peripheral circuit 1 as shown
You may apply three or more types of clocks to 9. A fixed signal, that is, a state in which no clock is input, may be selected as the slowest clock.

【0025】[0025]

【発明の効果】以上のように、請求項1の発明によれ
ば、割り込み要求信号を入力してから処理完了時制御信
号を入力するまでの間、クロック選択回路に高速のクロ
ック信号を選択させる割り込み発生信号を出力するフリ
ップフロップ回路を備えるように構成したので、割り込
み処理が発生しても、割り込み処理の前にクロック制御
レジスタを書き換える動作を省略することができ、高速
に応答することができるクロック制御回路が得られる効
果がある。
As described above, according to the first aspect of the invention, the clock selection circuit is caused to select the high-speed clock signal from the input of the interrupt request signal to the input of the processing completion control signal. Since the flip-flop circuit that outputs the interrupt generation signal is provided, even if an interrupt process occurs, the operation of rewriting the clock control register before the interrupt process can be omitted and a high-speed response can be achieved. The clock control circuit can be obtained.

【0026】請求項2の発明によれば、割り込み選択信
号をデコードし、指定された内部クロック信号の速度に
応じて信号出力するデコード回路と、割り込み要求信号
を入力してから処理完了時制御信号を入力するまでの
間、割り込み発生信号を出力するフリップフロップ回路
と、そのデコード回路の信号出力に高速の内部クロック
信号が指定され、かつフリップフロップ回路の割り込み
発生信号が発生している間、クロック選択回路に高速の
クロック信号を選択させる選択信号を出力するクロック
制御信号選択回路とを備えるように構成したので、特定
の割り込み信号についてのみ、内部クロック信号を高速
クロックに切り換えることができると共に、割り込み処
理が発生しても、割り込み処理の前にクロック制御レジ
スタを書き換える動作を省略することができ、高速に応
答することができるクロック制御回路が得られる効果が
ある。
According to the invention of claim 2, a decoding circuit for decoding the interrupt selection signal and outputting the signal in accordance with the speed of the designated internal clock signal, and a control signal upon completion of processing after inputting the interrupt request signal Until a high-speed internal clock signal is specified for the flip-flop circuit that outputs the interrupt generation signal and the decode circuit signal output, and the clock signal is generated while the interrupt generation signal of the flip-flop circuit is generated, Since it is configured to include a clock control signal selection circuit that outputs a selection signal that causes the selection circuit to select a high-speed clock signal, the internal clock signal can be switched to the high-speed clock only for a specific interrupt signal, and the interrupt signal is generated. Even if processing occurs, it is possible to rewrite the clock control register before interrupt processing. It can be omitted, the effect of clock control circuitry capable of response is obtained at high speed.

【0027】請求項3の発明によれば、割り込み選択信
号をデコードし、指定された内部クロック信号の速度に
応じて信号出力するデコード回路と、割り込み要求信号
を入力してから処理完了時制御信号を入力するまでの
間、割り込み発生信号を出力するフリップフロップ回路
と、そのフリップフロップ回路の割り込み発生信号が発
生している間、そのデコード回路の信号出力に応じてク
ロック選択回路にクロック信号を選択させる選択信号を
出力するクロック制御信号選択回路とを備えるように構
成したので、割り込み選択信号に応じて内部クロック信
号の速度を切り換えることができると共に、割り込み処
理の前にクロック制御レジスタを書き換える動作を省略
することができ、高速に応答することができるクロック
制御回路が得られる効果がある。
According to the invention of claim 3, a decode circuit for decoding the interrupt selection signal and outputting the signal in accordance with the speed of the designated internal clock signal, and a control signal at the time of processing completion after inputting the interrupt request signal Until a signal is input, a flip-flop circuit that outputs an interrupt generation signal and, while the interrupt generation signal of the flip-flop circuit is generated, selects a clock signal in the clock selection circuit according to the signal output of the decode circuit Since it is configured to include a clock control signal selection circuit that outputs a selection signal to enable, the speed of the internal clock signal can be switched according to the interrupt selection signal, and the operation of rewriting the clock control register before interrupt processing can be performed. A clock control circuit that can be omitted and can respond at high speed is obtained. There is a result.

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

【図1】請求項1の発明の一実施例によるクロック制御
回路を示すブロック構成図である。
FIG. 1 is a block diagram showing a clock control circuit according to an embodiment of the present invention.

【図2】請求項1の発明の割り込み処理発生時のCPU
の動作を示すフローチャートである。
FIG. 2 is a CPU when interrupt processing occurs according to the invention of claim 1;
3 is a flowchart showing the operation of FIG.

【図3】請求項2の発明の一実施例によるクロック制御
回路を示すブロック構成図である。
FIG. 3 is a block diagram showing a clock control circuit according to an embodiment of the present invention.

【図4】請求項3の発明の一実施例によるクロック制御
回路を示すブロック構成図である。
FIG. 4 is a block diagram showing a clock control circuit according to an embodiment of the present invention.

【図5】請求項1の発明の他の実施例によるクロック制
御回路を示すブロック構成図である。
FIG. 5 is a block diagram showing a clock control circuit according to another embodiment of the present invention.

【図6】従来のクロック制御回路を示すブロック構成図
である。
FIG. 6 is a block diagram showing a conventional clock control circuit.

【図7】従来の割り込み処理発生時のCPUの動作を示
すフローチャートである。
FIG. 7 is a flowchart showing the operation of the CPU when a conventional interrupt process occurs.

【符号の説明】[Explanation of symbols]

1 CPU(中央処理装置) 2 メモリ(記憶手段) 3 割り込み制御回路 4 クロック制御レジスタ 5 クロック選択回路 9 内部クロック信号 10 割り込み要求信号 12 セットリセットフリップフロップ(フリップフロ
ップ回路) 14 割り込み選択信号 15,17 デコード回路 16 クロック制御信号選択回路
1 CPU (Central Processing Unit) 2 Memory (Storage Unit) 3 Interrupt Control Circuit 4 Clock Control Register 5 Clock Selection Circuit 9 Internal Clock Signal 10 Interrupt Request Signal 12 Set Reset Flip-Flop (Flip-Flop Circuit) 14 Interrupt Selection Signals 15, 17 Decode circuit 16 Clock control signal selection circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置を動作させるプログラムを
記憶した記憶手段と、割り込み信号の入力に応じて割り
込み要求信号を上記中央処理装置に出力しその中央処理
装置に割り込み処理をさせる割り込み制御回路と、上記
記憶手段に記憶されたプログラムの内容に応じてクロッ
クの速度を設定するクロック制御レジスタと、そのクロ
ック制御レジスタで設定されたクロックの速度に応じて
内部クロック信号の速度を選択して出力するクロック選
択回路と、上記割り込み制御回路から出力される割り込
み要求信号および上記中央処理装置から出力される処理
完了時制御信号を入力し、その割り込み要求信号を入力
してから処理完了時制御信号を入力するまでの間、上記
クロック選択回路に高速のクロック信号を選択させる割
り込み発生信号を出力するフリップフロップ回路とを備
えたクロック制御回路。
1. Storage means for storing a program for operating a central processing unit, and an interrupt control circuit for outputting an interrupt request signal to the central processing unit in response to input of an interrupt signal to cause the central processing unit to perform interrupt processing. , A clock control register for setting the speed of the clock according to the contents of the program stored in the storage means, and selecting and outputting the speed of the internal clock signal according to the speed of the clock set by the clock control register A clock selection circuit, an interrupt request signal output from the interrupt control circuit, and a processing completion control signal output from the central processing unit are input, the interrupt request signal is input, and then the processing completion control signal is input. Until then, it outputs an interrupt generation signal that causes the clock selection circuit to select a high-speed clock signal. A clock control circuit having a flip-flop circuit for inputting power.
【請求項2】 中央処理装置を動作させるプログラムを
記憶した記憶手段と、複数の割り込み信号を入力し割り
込み要求信号と共にその複数の割り込み信号の中で選択
された割り込み選択信号を上記中央処理装置に出力し、
その中央処理装置に割り込み処理をさせる割り込み制御
回路と、上記記憶手段に記憶されたプログラムの内容に
応じてクロックの速度を設定するクロック制御レジスタ
と、そのクロック制御レジスタで設定されたクロックの
速度に応じて内部クロック信号の速度を選択して出力す
るクロック選択回路と、上記割り込み制御回路から出力
される割り込み選択信号をデコードしあらかじめ指定さ
れた高速または低速の内部クロック信号の速度に応じて
信号出力するデコード回路と、上記割り込み制御回路か
ら出力される割り込み要求信号および上記中央処理装置
から出力される処理完了時制御信号を入力し、その割り
込み要求信号を入力してから処理完了時制御信号を入力
するまでの間、割り込み発生信号を出力するフリップフ
ロップ回路と、上記デコード回路の信号出力を入力する
と共に上記フリップフロップ回路の割り込み発生信号を
入力しそのデコード回路の信号出力に高速の内部クロッ
ク信号が指定され、かつ上記フリップフロップ回路の割
り込み発生信号が発生している間、上記クロック選択回
路に高速のクロック信号を選択させる選択信号を出力す
るクロック制御信号選択回路とを備えたクロック制御回
路。
2. A storage means for storing a program for operating a central processing unit, and a plurality of interrupt signals input to the central processing unit together with an interrupt request signal and an interrupt selection signal selected from the plurality of interrupt signals. Output,
An interrupt control circuit for causing the central processing unit to perform an interrupt process, a clock control register for setting a clock speed according to the contents of the program stored in the storage means, and a clock speed set by the clock control register. A clock selection circuit that selects and outputs the speed of the internal clock signal in response to it, and decodes the interrupt selection signal that is output from the interrupt control circuit, and outputs a signal according to the speed of the high-speed or low-speed internal clock signal specified in advance. A decoding circuit, an interrupt request signal output from the interrupt control circuit, and a processing completion control signal output from the central processing unit, the interrupt request signal is input, and then the processing completion control signal is input. Until that time, a flip-flop circuit that outputs an interrupt The signal output of the decode circuit is input, the interrupt generation signal of the flip-flop circuit is input, a high-speed internal clock signal is specified for the signal output of the decode circuit, and the interrupt generation signal of the flip-flop circuit is generated. And a clock control signal selection circuit that outputs a selection signal that causes the clock selection circuit to select a high-speed clock signal.
【請求項3】 中央処理装置を動作させるプログラムを
記憶した記憶手段と、複数の割り込み信号を入力し割り
込み要求信号と共にその複数の割り込み信号の中で選択
された割り込み選択信号を上記中央処理装置に出力しそ
の中央処理装置に割り込み処理をさせる割り込み制御回
路と、上記記憶手段に記憶されたプログラムの内容に応
じてクロックの速度を設定するクロック制御レジスタ
と、そのクロック制御レジスタで設定されたクロックの
速度に応じて内部クロック信号の速度を選択して出力す
るクロック選択回路と、上記割り込み制御回路から出力
される割り込み選択信号をデコードしあらかじめ指定さ
れた内部クロック信号の速度に応じて信号出力するデコ
ード回路と、上記割り込み制御回路から出力される割り
込み要求信号および上記中央処理装置から出力される処
理完了時制御信号を入力し、その割り込み要求信号を入
力してから処理完了時制御信号を入力するまでの間、割
り込み発生信号を出力するフリップフロップ回路と、上
記デコード回路の信号出力を入力すると共に上記フリッ
プフロップ回路の割り込み発生信号を入力しそのフリッ
プフロップ回路の割り込み発生信号が発生している間、
上記デコード回路の信号出力に応じて上記クロック選択
回路にクロック信号を選択させる選択信号を出力するク
ロック制御信号選択回路とを備えたクロック制御回路。
3. A storage unit storing a program for operating a central processing unit, and a plurality of interrupt signals input to the central processing unit together with an interrupt request signal and an interrupt selection signal selected from the plurality of interrupt signals. An interrupt control circuit for outputting and causing the central processing unit to perform an interrupt process, a clock control register for setting the speed of the clock according to the contents of the program stored in the storage means, and a clock for the clock set by the clock control register. A clock selection circuit that selects and outputs the speed of the internal clock signal according to the speed, and a decode that decodes the interrupt selection signal output from the interrupt control circuit and outputs the signal according to the speed of the internal clock signal specified in advance. Circuit and the interrupt request signal output from the above interrupt control circuit A flip-flop circuit that outputs an interrupt generation signal from the input of the processing completion control signal output from the central processing unit to the input of the interrupt request signal to the input of the processing completion control signal; While the signal output of the decode circuit is input and the interrupt generation signal of the flip-flop circuit is input and the interrupt generation signal of the flip-flop circuit is generated,
A clock control circuit, comprising: a clock control signal selection circuit that outputs a selection signal that causes the clock selection circuit to select a clock signal according to the signal output of the decoding circuit.
JP5075111A 1993-03-10 1993-03-10 Clock control circuit Pending JPH06259264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5075111A JPH06259264A (en) 1993-03-10 1993-03-10 Clock control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5075111A JPH06259264A (en) 1993-03-10 1993-03-10 Clock control circuit

Publications (1)

Publication Number Publication Date
JPH06259264A true JPH06259264A (en) 1994-09-16

Family

ID=13566744

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5075111A Pending JPH06259264A (en) 1993-03-10 1993-03-10 Clock control circuit

Country Status (1)

Country Link
JP (1) JPH06259264A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08241145A (en) * 1995-03-02 1996-09-17 Nec Corp Power consumption reduction system of data processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08241145A (en) * 1995-03-02 1996-09-17 Nec Corp Power consumption reduction system of data processor

Similar Documents

Publication Publication Date Title
US5983014A (en) Power management system that one of plurality of peripheral signals is selectably routed to main pad clock node during a test mode
JPS63301339A (en) Computer device
JPH0612863A (en) Dual port dram
JPH05108195A (en) Portable computer
JP2993466B2 (en) Information processing device
JP2003044303A (en) Computer system
JPH06259264A (en) Clock control circuit
JPH1153339A (en) Microcomputer provided with pulse output function
JPH11306074A (en) Information processor
JP2626125B2 (en) Microcomputer
JP3597548B2 (en) Digital signal processor
JPH11259356A (en) Initializing device
JPH04255028A (en) Microprocessor
JPH05173676A (en) Disk power source control system
KR100230184B1 (en) Memory table look-up device and method
JP2000029508A (en) Programmable controller
JPH1049248A (en) Microcomputer
JPH026996A (en) Display device
JPH09325935A (en) Bus switching circuit
JPS62248043A (en) Memory switching circuit for fetching microcomputer instruction
JPH03257608A (en) Microcomputer
JPH0683986A (en) Single chip microcomputer
JPH04287421A (en) Start circuit for a/d converter or d/a converter
JPH06187287A (en) Bus control system
JPH1173168A (en) Display control device