JPH11242529A - Clock controller - Google Patents

Clock controller

Info

Publication number
JPH11242529A
JPH11242529A JP10043364A JP4336498A JPH11242529A JP H11242529 A JPH11242529 A JP H11242529A JP 10043364 A JP10043364 A JP 10043364A JP 4336498 A JP4336498 A JP 4336498A JP H11242529 A JPH11242529 A JP H11242529A
Authority
JP
Japan
Prior art keywords
clock
selector
signal
output
control device
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
JP10043364A
Other languages
Japanese (ja)
Inventor
Kazuya Taniguchi
一哉 谷口
Kazuya Takamatsu
和也 高松
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP10043364A priority Critical patent/JPH11242529A/en
Publication of JPH11242529A publication Critical patent/JPH11242529A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To directly switch two system clocks and to shorten this switching time by holding the output of a selector of the preceding stage and also delaying switching of selectors when a clock switching signal is inputted. SOLUTION: The switching signal which is inputted to a clock selection terminal 3 and varied from 1 to 0 is inputted to a 1st delay circuit 6, a signal holding circuit 7 and a 2nd delay circuit 10 respectively. As the value of the signal of a selector 4 is 1 with a clock 0 under such conditions, the circuit 7 holds 1. Meanwhile, a selector 8 outputs 1 of the clock 0. Then a clock switching signal is inputted to a 2nd selector control circuit 9 via the circuit 10, and the input of the selector 8 is switched to the output of the circuit 7. Under such conditions, the output of the selector 4 is 1 and the output of the circuit 7 is also 1. As a result, the clocks which are outputted from the selector 8 via a noise elimination circuit 12 can be switched with no occurrence of any hazard.

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 device incorporated in a semiconductor integrated circuit such as a microcomputer (hereinafter referred to as "microcomputer") to control supply of a system clock of the semiconductor integrated circuit.

【0002】[0002]

【従来の技術】図2は従来のクロック制御装置の構成図
である。クロック制御装置は、二つの独立したクロック
を入力する入力端子21、22、入力した二つのクロッ
クを選択するクロック切り替え信号を入力するクロック
選択端子23、二つの入力されたクロックを切り替える
セレクタ24、クロック切り替え信号によって、セレク
タ24を制御する第1のセレクタ制御回路25、セレク
タ24の出力側から出力されるクロックと電源電圧レベ
ルの固定信号とを切り替えるセレクタ26、セレクタ2
4から出力されたクロックの発振安定時間を計測し、ク
ロックと同期した信号をつくるカウンタ27、カウンタ
27の信号や、クロック選択端子23から入力されたク
ロック切り替え信号によってセレクタ26を制御する第
2のセレクタ制御回路28、セレクタ26の出力側に接
続されている出力端子29を備えている。
2. Description of the Related Art FIG. 2 is a block diagram of a conventional clock control device. The clock control device includes input terminals 21 and 22 for inputting two independent clocks, a clock selection terminal 23 for inputting a clock switching signal for selecting the two input clocks, a selector 24 for switching between the two input clocks, A first selector control circuit 25 for controlling the selector 24 by a switching signal; a selector 26 for switching between a clock output from the output side of the selector 24 and a fixed signal of the power supply voltage level;
4. A counter 27 that measures the oscillation stabilization time of the clock output from the counter 4 and generates a signal synchronized with the clock, and controls the selector 26 according to the signal of the counter 27 and the clock switching signal input from the clock selection terminal 23. The selector control circuit 28 includes an output terminal 29 connected to the output side of the selector 26.

【0003】図3は、上述した従来のクロック制御装置
の一動作例として、マイコンのシステムクロックをクロ
ック0(例えば32KHZ)からクロック1(例えば20MHZ)
へ切り替える時のタイミング図を示す。図2の装置は、
以下の5つの条件で動作するとする。
FIG. 3 shows an example of the operation of the above-mentioned conventional clock control device in which the microcomputer system clock is changed from clock 0 (for example, 32 KHz) to clock 1 (for example, 20 MHz).
FIG. 6 shows a timing chart when switching to the mode. The device of FIG.
It is assumed that the operation is performed under the following five conditions.

【0004】1.クロック選択端子23から入力される
クロック切り替え信号が1から0へ変化したとき、クロ
ック0からクロック1へ変化するものとする。
[0004] 1. It is assumed that when the clock switching signal input from the clock selection terminal 23 changes from 1 to 0, the clock changes from clock 0 to clock 1.

【0005】2.クロック切り替え信号はクロック0に
同期するものとする。
[0005] 2. The clock switching signal is synchronized with clock 0.

【0006】3.セレクタ24は、第1のセレクタ制御
回路25からの信号が0から1に変化したとき、クロッ
ク0からクロック1へ変化するものとする。
[0006] 3. The selector 24 is assumed to change from clock 0 to clock 1 when the signal from the first selector control circuit 25 changes from 0 to 1.

【0007】4.セレクタ26は、第2のセレクタ制御
回路28からの信号が0から1に変化したとき、セレク
タ24から出力されたクロックから、電源電圧レベルの
固定信号に切り替え、第2のセレクタ制御回路28から
の信号が1から0に変化したとき、電源電圧レベルの固
定信号から、セレクタ24から出力されたクロックへ切
り替える。
[0007] 4. When the signal from the second selector control circuit 28 changes from 0 to 1, the selector 26 switches from the clock output from the selector 24 to a fixed signal of the power supply voltage level, and outputs the signal from the second selector control circuit 28. When the signal changes from 1 to 0, the signal is switched from the fixed signal of the power supply voltage level to the clock output from the selector 24.

【0008】5.第1のセレクタ制御回路25、第2の
セレクタ制御回路28の初期出力は0であるとする。
[0008] 5. It is assumed that the initial outputs of the first selector control circuit 25 and the second selector control circuit 28 are 0.

【0009】図3のように、1から0へ変化するクロッ
ク切り替え信号が入力されると、第1のセレクタ制御回
路25の出力信号が0から1へ、第2のセレクタ制御回
路28の出力信号が0から1へ変化する。そのため、上
記3.、4.の条件により、セレクタ24の出力はクロ
ック0からクロック1に切り替えられる。
As shown in FIG. 3, when a clock switching signal that changes from 1 to 0 is input, the output signal of the first selector control circuit 25 changes from 0 to 1 and the output signal of the second selector control circuit 28 changes. Changes from 0 to 1. Therefore, 3. 4. The output of the selector 24 is switched from clock 0 to clock 1 according to the condition (1).

【0010】また、セレクタ26の出力はセレクタ24
の出力のクロックから電源電圧レベルの固定信号に切り
替えられる。セレクタ24の出力はクロック0とクロッ
ク1とが同期していないため、Bのようなクロック0でも
クロック1でもない幅が不定の波形(以下ハザードとい
う)が出力される。
The output of the selector 26 is
Is switched to the fixed signal of the power supply voltage level. Since the output of the selector 24 is not synchronized with the clock 0 and the clock 1, a waveform having an indefinite width such as B which is neither the clock 0 nor the clock 1 (hereinafter referred to as a hazard) is output.

【0011】しかし、セレクタ26の出力にはハザード
は発生しない。なぜなら、第2のセレクタ制御回路28
の出力信号がクロック0の立ち上がりに同期しており、
セレクタ26の入力は1から1への信号変化のためであ
る。したがって、Aでの切り替え時、出力端子29のハ
ザードは発生しない。
However, no hazard is generated at the output of the selector 26. Because the second selector control circuit 28
Output signal is synchronized with the rising edge of clock 0,
The input of the selector 26 is for a signal change from 1 to 1. Therefore, at the time of switching at A, the hazard of the output terminal 29 does not occur.

【0012】次に、クロック1に同期した信号をカウン
タ27でつくり、第2のセレクタ制御回路28に信号を
送る。カウンタ27で作る信号はクロック1の立ち上が
りに同期しており、Bのようなハザードに同期しないよ
うに2〜3クロックをカウントした後に出力される。C
のタイミングで出力されたカウンタ27の信号をうけ、
第2のセレクタ制御回路28はセレクタ26に1から0
へ変化する信号を送る。
Next, a signal synchronized with the clock 1 is generated by the counter 27, and the signal is sent to the second selector control circuit 28. The signal generated by the counter 27 is synchronized with the rising edge of the clock 1 and is output after counting two or three clocks so as not to be synchronized with a hazard such as B. C
Receiving the signal of the counter 27 output at the timing of
The second selector control circuit 28 supplies the selector 26 with 1 to 0
To change the signal.

【0013】そのため上記4.の条件により、セレクタ
26は電源電圧固定信号からセレクタ24の出力のクロ
ックであるクロック1に切り替わる。Cのタイミングは
クロック1の立ち上がりに同期しており、セレクタ26
の入力は1から1への信号変化のため、セレクタ26の
出力にハザードは発生しない。
[0013] Therefore, the above 4. The selector 26 switches from the power supply voltage fixed signal to the clock 1 that is the output clock of the selector 24 according to the condition (1). The timing of C is synchronized with the rise of clock 1 and the selector 26
Is a signal change from 1 to 1, no hazard is generated at the output of the selector 26.

【0014】したがって、Cの切り替え時にも出力端子
29にハザードは発生しない。しかし、従来のクロック
制御装置ではクロック切り替え信号が切り替える前のク
ロックに同期していないと、切り替える時にハザードを
発生してしまうことが予想される。
Therefore, no hazard is generated at the output terminal 29 even when C is switched. However, in the conventional clock control device, if the clock switching signal is not synchronized with the clock before the switching, a hazard is expected to be generated at the time of the switching.

【0015】図4にクロック0に非同期で、システムク
ロックをクロック0からクロック1へ切り替える場合の
タイミング図を示す。Aのタイミングで、1から0へ変
化するクロック切り替え信号が入力されると、第1のセ
レクタ制御回路25の出力信号が0から1へ、第2のセ
レクタ制御回路28の出力信号が0から1へ変化する。
FIG. 4 shows a timing chart when the system clock is switched from clock 0 to clock 1 asynchronously with clock 0. When a clock switching signal that changes from 1 to 0 is input at the timing A, the output signal of the first selector control circuit 25 changes from 0 to 1 and the output signal of the second selector control circuit 28 changes from 0 to 1 Changes to

【0016】そのため、上記3.、4.の条件により、
セレクタ24の出力はクロック0からクロック1に、セレ
クタ26の出力はセレクタ24の出力のクロックから電
源電圧レベルの固定信号に切り替えられる。この場合、
セレクタ26出力はBのようなハザードを発生する。
Therefore, the above-mentioned 3. 4. According to the conditions of
The output of the selector 24 is switched from clock 0 to clock 1, and the output of the selector 26 is switched from the clock of the output of the selector 24 to a fixed signal of the power supply voltage level. in this case,
The output of the selector 26 generates a hazard such as B.

【0017】これは、第2のセレクタ制御回路28の出
力信号がクロック0の立ち上がりに同期していないた
め、クロック0の0の信号が出力され、Aのタイミング
で0から1へ信号変化するためである。
This is because the output signal of the second selector control circuit 28 is not synchronized with the rising edge of the clock 0, the signal of the clock 0 is output, and the signal changes from 0 to 1 at the timing of A. It is.

【0018】このように従来のクロック制御装置ではク
ロック切り替え信号が切り替える前のクロック(図4の
場合クロック0)に同期していないと、切り替える時に
ハザードを発生してしまう。そのため、従来のクロック
制御装置では、非同期のクロック切り替え信号によるシ
ステムクロック切り替えはできなかった。
As described above, in the conventional clock control apparatus, if the clock switching signal is not synchronized with the clock before switching (clock 0 in FIG. 4), a hazard is generated at the time of switching. Therefore, in the conventional clock control device, the system clock cannot be switched by the asynchronous clock switching signal.

【0019】すなわち、従来のクロック制御装置では、
クロック切り替え信号はシステムクロックに同期させる
必要があった。例えば、システムクロックに同期して動
作しているCPU等でクロック切り替えの命令を実行す
ることによってクロック切り替え信号を生成し、システ
ムクロックを切り替えていた。
That is, in the conventional clock control device,
The clock switching signal had to be synchronized with the system clock. For example, a CPU or the like operating in synchronization with a system clock executes a clock switching instruction to generate a clock switching signal and switch the system clock.

【0020】そこで、割り込み等の非同期の信号でシス
テムクロックを切り替えたい場合、従来のクロック制御
装置では一度CPUに割り込みを発生させ、CPUでシ
ステムクロック切り替えの処理を行うことで実現してい
た。以上のようなCPUによるシステムクロック切り替
えの場合、低速クロックから高速クロックに切り替える
ときCPUの動作が介在し、かつCPUの実行は低速ク
ロックで行われるため、システムクロック切り替えに非
常に時間がかかるという欠点を有する。
Therefore, when it is desired to switch the system clock with an asynchronous signal such as an interrupt, the conventional clock control device has realized this by causing an interrupt to the CPU once and performing the process of switching the system clock by the CPU. In the case of switching the system clock by the CPU as described above, when switching from the low-speed clock to the high-speed clock, the operation of the CPU intervenes, and the execution of the CPU is performed at the low-speed clock. Having.

【0021】また、従来の回路では以下のような問題点
がある。従来のクロック制御装置を内蔵したマイコンを
携帯電話等の通信機器で使用した場合を考える。携帯電
話等の通信機器アプリケーションでは、待機中、低消費
電力化のため低速クロックでマイコンを動作させ、通話
時は高速動作が必要なため高速クロックによる処理をお
こなっている。このような応用時に、待機中の低速クロ
ックから通話時の高速クロックへ切り替える場合、従来
のクロック制御装置を用いたマイコンでは以下の実行シ
ーケンスになる。
The conventional circuit has the following problems. Consider a case where a microcomputer incorporating a conventional clock control device is used in a communication device such as a mobile phone. In a communication device application such as a mobile phone, a microcomputer is operated with a low-speed clock during standby to reduce power consumption, and high-speed operation is required during a call, so processing is performed with a high-speed clock. When switching from the low-speed clock during standby to the high-speed clock during communication in such an application, the following execution sequence is performed by the microcomputer using the conventional clock control device.

【0022】1.低速クロックで待機中プログラムを実
行中、通信が始まったことを知らせる非同期信号がマイ
コンに入力される。
1. During execution of the waiting program by the low-speed clock, an asynchronous signal indicating that communication has started is input to the microcomputer.

【0023】2.その入力によって、低速のクロックで
クロック切り替えのプログラムを実行する。
2. According to the input, a clock switching program is executed with a low-speed clock.

【0024】3.同期化のため、高速クロックを2〜3
サイクル停止させる。
3. High-speed clock is 2-3 for synchronization.
Stop the cycle.

【0025】4.切り替わった後、高速クロックで通話
用処理のプログラムを実行する。
4. After the switching, the program for the call processing is executed by the high-speed clock.

【0026】上記シーケンスでは、上記2.のシーケン
スが低速クロックによるプログラムを実行するため処理
に時間がかかり、2.のシーケンス実行中に受信データ
が入ってくる可能性がある。
In the above sequence, the above 2. The sequence of (1) executes a program using a low-speed clock, so that processing takes time. During the execution of this sequence.

【0027】すなわち、従来のクロック制御装置を用い
たマイコンでは、待機中の低速クロックから高速クロッ
クへの切り替えるとき、受信データの最初の部分を失う
場合がある。このような誤動作を防ぐため、従来のクロ
ック制御装置を持ったマイコンで携帯電話等のアプリケ
ーションを実現する場合、低速クロックから高速クロッ
クへ切り替える回路を外部に持つ必要があり、アプリケ
ーションの回路を複雑にしていた。
That is, in the microcomputer using the conventional clock control device, when switching from the standby low-speed clock to the high-speed clock, the first part of the received data may be lost. In order to prevent such a malfunction, if an application such as a mobile phone is realized by a microcomputer having a conventional clock control device, it is necessary to have an external circuit for switching from a low-speed clock to a high-speed clock, which complicates the application circuit. I was

【0028】[0028]

【発明が解決しようとする課題】したがって、本発明の
目的は、マイコンに供給される二つのシステムクロック
を、非同期信号によってダイレクトに切り替え、切り替
え時間の短いクロック制御装置を提供することである。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a clock control device in which two system clocks supplied to a microcomputer are directly switched by an asynchronous signal, and the switching time is short.

【0029】[0029]

【課題を解決するための手段】上記目的を達成するため
に、本発明はクロック切り替えのセレクタが直列に接続
され、前段のセレクタでクロックを切り替え、後段のセ
レクタで固定信号と前段のセレクタの出力とを切り替え
るクロック制御装置において、固定信号を生成するため
の、クロック切り替え信号が入力されたとき前段のセレ
クタの出力を保持する信号保持回路を有し、信号保持、
後段セレクタ切り替え、前段セレクタ切り替えをシーケ
ンシャルに行うためのディレイ回路を持つように構成し
ている。
In order to achieve the above object, according to the present invention, a clock switching selector is connected in series, a clock is switched by a preceding-stage selector, and a fixed signal and an output of the preceding-stage selector are switched by a following-stage selector. In the clock control device that switches between and, a signal holding circuit that holds the output of the previous-stage selector when a clock switching signal is input for generating a fixed signal,
It is configured to have a delay circuit for sequentially switching the subsequent-stage selector and the preceding-stage selector.

【0030】[0030]

【発明の実施の形態】図1は本発明の第1の実施例のク
ロック制御装置の基本構成図を示す図である。クロック
制御装置は、二つの独立したクロックを入力する端子
1、2、入力した二つのクロックを選択するクロック切
り替え信号を入力するクロック選択端子3、二つの入力
されたクロックを切り替えるセレクタ4、セレクタ4を
制御する第1のセレクタ制御回路5、クロック選択端子
3から入力されたクロック切り替え信号を遅らせ、第1
のセレクタ制御回路5に信号を送る第1のディレイ回路
6、セレクタ4から出力されたクロックを、クロック選
択端子3から入力されたクロック切り替え信号によって
保持する信号保持回路7、信号保持回路7とセレクタ4
から出力された信号を切り替えるセレクタ8、セレクタ
8を制御する第2のセレクタ制御回路9、クロック選択
端子3から入力されたクロック切り替え信号を遅らせ第
2のセレクタ制御回路9に信号を送る、第1のディレイ
回路6よりディレイ値の小さい第2のディレイ回路1
0、セレクタ4から出力されたクロックと同期をした信
号を生成し、第2のセレクタ制御回路9に信号を送る同
期回路11、セレクタ8の出力信号に乗るノイズを除去
するためのノイズ除去回路12、ノイズ除去回路12の
出力に接続された、クロック制御装置の出力端子13を
備えている。
FIG. 1 is a diagram showing a basic configuration diagram of a clock control device according to a first embodiment of the present invention. The clock control device includes terminals 1 and 2 for inputting two independent clocks, a clock selection terminal 3 for inputting a clock switching signal for selecting the two input clocks, a selector 4 for switching the two input clocks, and a selector 4 The first selector control circuit 5 for controlling the clock switching signal input from the clock selection terminal 3
A first delay circuit 6 for sending a signal to the selector control circuit 5, a signal holding circuit 7 for holding a clock output from the selector 4 by a clock switching signal input from a clock selection terminal 3, a signal holding circuit 7, and a selector 4
A selector 8 for switching the signal output from the second selector, a second selector control circuit 9 for controlling the selector 8, a clock switching signal input from the clock selection terminal 3 to delay the signal, and send a signal to the second selector control circuit 9, Second delay circuit 1 having a smaller delay value than the delay circuit 6 of FIG.
0, a synchronizing circuit 11 that generates a signal synchronized with the clock output from the selector 4 and sends the signal to the second selector control circuit 9, and a noise removing circuit 12 for removing noise on the output signal of the selector 8 And an output terminal 13 of the clock control device connected to the output of the noise elimination circuit 12.

【0031】図5、図6、図7に本発明の一実施例とし
て、クロック制御装置が、マイコンのシステムクロック
をクロック0からクロック1へ切り替える時のタイミン
グ図を示す。なお、図6は図5のa−a’部分の拡大
図、図7はクロック切り替え信号が図5、図6と違うタ
イミングで入ったときの図5のa−a’部分に相当する
部分の拡大図である。図1の装置は、以下の4つの条件
で動作するとする。
FIGS. 5, 6, and 7 show timing diagrams when the clock control device switches the system clock of the microcomputer from clock 0 to clock 1 as an embodiment of the present invention. FIG. 6 is an enlarged view of an aa 'portion of FIG. 5, and FIG. 7 is an enlarged view of a portion corresponding to the aa' portion of FIG. 5 when the clock switching signal enters at a timing different from that of FIGS. It is an enlarged view. It is assumed that the apparatus of FIG. 1 operates under the following four conditions.

【0032】1.クロック選択端子3から入力されるク
ロック切り替え信号が1から0へ変化したとき、クロッ
ク0からクロック1へ変化するものとする。
1. It is assumed that when the clock switching signal input from the clock selection terminal 3 changes from 1 to 0, the clock changes from clock 0 to clock 1.

【0033】2.セレクタ4は、第1のセレクタ制御回
路5からの信号が0から1に変化したとき、クロック0
からクロック1へ変化するものとする。
2. When the signal from the first selector control circuit 5 changes from 0 to 1, the selector 4 outputs the clock 0
From clock 1 to clock 1.

【0034】3.セレクタ8は、第2のセレクタ制御回
路9からの信号が0から1に変化したとき、セレクタ4
から出力されたクロックから信号保持回路7の出力信号
に切り替え、第2のセレクタ制御回路9からの信号が1
から0に変化したとき、信号保持回路7の出力信号から
セレクタ4から出力されたクロックへ切り替える。
3. When the signal from the second selector control circuit 9 changes from 0 to 1, the selector 8
Is switched to the output signal of the signal holding circuit 7 and the signal from the second selector control circuit 9 becomes 1
Is changed from 0 to 0, the output signal of the signal holding circuit 7 is switched to the clock output from the selector 4.

【0035】4.第1のセレクタ制御回路5、第2のセ
レクタ制御回路9の初期出力は0であるとする。
4. It is assumed that the initial outputs of the first selector control circuit 5 and the second selector control circuit 9 are 0.

【0036】クロック選択端子3に入力された切り替え
信号が1から0へ変化した信号は、第1のディレイ回路
6、信号保持回路7、第2のディレイ回路10に入力さ
れる。信号保持回路7はセレクタ4の出力信号を保持す
る(図5a−a’、図6、A点および図7、A点)。
The signal in which the switching signal input to the clock selection terminal 3 changes from 1 to 0 is input to the first delay circuit 6, the signal holding circuit 7, and the second delay circuit 10. The signal holding circuit 7 holds the output signal of the selector 4 (FIG. 5 a-a ′, FIG. 6, point A and FIG. 7, point A).

【0037】図5および図6の場合、セレクタ4の信号
はクロック0で値は1であるから、信号保持回路7は1
を保持する。また、このときはセレクタ8が切り替わっ
ておらず、セレクタ8の出力はクロック0の1を出力し
ている。
5 and 6, the signal of the selector 4 is clock 0 and the value is 1, so that the signal holding circuit 7
Hold. At this time, the selector 8 is not switched, and the output of the selector 8 outputs 1 of the clock 0.

【0038】その後、クロック切り替え信号は第1のデ
ィレイ回路10を通して第2のセレクタ制御回路9に入
力される。第2のセレクタ制御回路9は、第2のディレ
イ回路10からうけた信号によって、セレクタ8の入力
をセレクタ4の出力であるクロック0から信号保持回路
7の出力に切り替える。
Thereafter, the clock switching signal is input to the second selector control circuit 9 through the first delay circuit 10. The second selector control circuit 9 switches the input of the selector 8 from the clock 0 which is the output of the selector 4 to the output of the signal holding circuit 7 according to the signal received from the second delay circuit 10.

【0039】このとき、セレクタ4の出力は1であり信
号保持回路7の出力も1であるため、セレクタ8の切り
替えによるハザードは発生しない。したがって、セレク
タ8の出力からノイズ除去回路12を通ってクロック制
御装置の出力に出力されたクロックに、ハザードは発生
しない(図5a−a’および図6、B点)。
At this time, since the output of the selector 4 is 1 and the output of the signal holding circuit 7 is 1, no hazard is generated by switching the selector 8. Therefore, no hazard occurs in the clock output from the output of the selector 8 to the output of the clock control device through the noise removal circuit 12 (points B in FIG. 5A-a ′ and FIG. 6).

【0040】図7のA点に示すようなタイミングでクロ
ック切り替え信号が入ってきた場合、セレクタ8の切り
替えの瞬間セレクタ4の出力が0に変化し、第1ディレ
イ回路6によるディレイ幅程度のハザードが出る可能性
がある(図7、B点)。しかし、このハザードは数ns以
下であり、セレクタ出力8に接続されているノイズ除去
回路12で除去することが可能である。よって、図7の
例の場合でも、クロック制御装置の出力に出力されたク
ロックにハザードは発生しない。
When the clock switching signal comes in at the timing shown at point A in FIG. 7, the output of the selector 4 changes to 0 at the moment of switching of the selector 8, and the hazard of about the delay width by the first delay circuit 6 is generated. (Point B in FIG. 7). However, this hazard is less than several ns, and can be removed by the noise removal circuit 12 connected to the selector output 8. Therefore, even in the case of the example of FIG. 7, no hazard occurs in the clock output to the output of the clock control device.

【0041】その後、セレクタ切り替え信号は、第1デ
ィレイ回路6を通して第1セレクタ制御回路4に入力さ
れる。ここでセレクタ4の出力はクロック0からクロッ
ク1へ切り替わる(図5a−a’、図6 C点、および
図7 C点)。このとき、セレクタ8は信号保持回路7
の出力を選択されているため、1のままである。
Thereafter, the selector switching signal is input to the first selector control circuit 4 through the first delay circuit 6. Here, the output of the selector 4 switches from the clock 0 to the clock 1 (FIG. 5a-a ', points C and C in FIG. 6). At this time, the selector 8 is connected to the signal holding circuit 7.
Remains at 1 because the output has been selected.

【0042】セレクタ4の出力がクロック0からクロッ
ク1へ切り替わると、カウンタ11は数クロック後、ク
ロック1に同期がした信号を作る。この時の時間は、セ
レクタ4による切り替え時に発生するハザードをセレク
タ8の出力に出さないためのものであるから、セレクタ
4の出力のクロックの2〜3クロック分で十分である。
When the output of the selector 4 switches from the clock 0 to the clock 1, the counter 11 generates a signal synchronized with the clock 1 several clocks later. The time at this time is to prevent a hazard generated at the time of switching by the selector 4 from being output to the output of the selector 8. Therefore, two to three clocks of the output clock of the selector 4 are sufficient.

【0043】カウンタ11が出力した同期信号を受け、
第2セレクタ制御信号9はセレクタ8の入力を信号保持
回路7の出力からセレクタ4の出力であるクロック1に
切り替える。このとき、セレクタ8に入力されるセレク
タ切り替え信号はクロック1と同期しているため、切り
替え時にハザードは発生しない(図5、b点)。
Upon receiving the synchronization signal output from the counter 11,
The second selector control signal 9 switches the input of the selector 8 from the output of the signal holding circuit 7 to the clock 1 which is the output of the selector 4. At this time, since the selector switching signal input to the selector 8 is synchronized with the clock 1, no hazard occurs at the time of switching (point b in FIG. 5).

【0044】以上の動作によって、出力端子13にハザ
ードを発生させず、カウンタ11による2〜3クロック
分でシステムクロックを切り替えることができる。
By the above operation, the system clock can be switched by two to three clocks by the counter 11 without generating a hazard at the output terminal 13.

【0045】次に図8に本発明の第2の実施例を示す。
図8において図1に示す第1の実施例と同一箇所には同
一符号を付して説明を省略する。図8の割り込み信号を
入力する割り込み入力端子14、割り込み信号を受け、
CPUに割り込みベクタや割り込み要求を出力する割り
込み制御回路15を備えている。
Next, FIG. 8 shows a second embodiment of the present invention.
In FIG. 8, the same parts as those in the first embodiment shown in FIG. An interrupt input terminal 14 for receiving the interrupt signal shown in FIG.
An interrupt control circuit 15 for outputting an interrupt vector and an interrupt request to the CPU is provided.

【0046】この場合、割り込みを入力すると、第1の
実施例で説明したとおりシステムクロックが切り替わ
る。切り替わると同時に割り込み処理を行う。
In this case, when an interrupt is input, the system clock is switched as described in the first embodiment. Interrupt processing is performed at the same time as switching.

【0047】第2の実施例で携帯電話等の通信機器に用
いれば、以下のシーケンスになる。
If the second embodiment is used for a communication device such as a mobile phone, the following sequence is obtained.

【0048】1.低速クロックで待機中プログラムを実
行中、通信が始まったことを知らせる非同期信号が、割
り込みとしてマイコンに入力される。
1. During execution of the waiting program at the low-speed clock, an asynchronous signal indicating that communication has started is input to the microcomputer as an interrupt.

【0049】2.その入力によって、低速のクロックを
高速クロックに切り替える。同期化のため、高速クロッ
クを2〜3サイクル停止させる。
2. The input switches the low-speed clock to the high-speed clock. The high-speed clock is stopped for a few cycles for synchronization.

【0050】3.切り替わった高速クロックで通話用処
理のプログラムを実行する。
3. The call processing program is executed with the switched high-speed clock.

【0051】従来のクロック制御装置と違い、クロック
切り替えにともなう低速クロックによるプログラム実行
はない。同期化のためのクロック2〜3サイクル停止と
割り込み処理によるベクタ処理を行えば、すぐに通話用
のプログラムを実行することができる。
Unlike the conventional clock control device, there is no program execution by the low-speed clock accompanying the clock switching. By stopping the clock for two or three cycles for synchronization and performing vector processing by interrupt processing, it is possible to immediately execute a communication program.

【0052】しかも、同期化とベクタ処理は高速クロッ
クで行われるため、短時間で行うことができる。第2の
実施例を用いれば、携帯電話等、低速クロックによる動
作から素早く高速クロックによる動作に切り替える必要
があるアプリケーションを、複雑な外部回路を設けるこ
となく、実現できる。
Moreover, since the synchronization and the vector processing are performed by the high-speed clock, the processing can be performed in a short time. By using the second embodiment, it is possible to realize an application, such as a mobile phone, that needs to quickly switch from operation using a low-speed clock to operation using a high-speed clock without providing a complicated external circuit.

【0053】[0053]

【発明の効果】本発明によれば、マイコンに供給される
二つのシステムクロックを、非同期信号によってダイレ
クトに切り替え、切り替え時間の短いクロック制御装置
を提供できる。本発明を内蔵したマイコンを、携帯電話
等、低速クロックによる動作から、素早く高速クロック
による動作に切り替える必要があるアプリケーションに
用いれば、複雑な外部回路を設けることなく、アプリケ
ーションを実現できる。
According to the present invention, it is possible to provide a clock control device in which two system clocks supplied to a microcomputer are directly switched by an asynchronous signal and the switching time is short. If a microcomputer incorporating the present invention is used in an application such as a mobile phone which needs to quickly switch from operation using a low-speed clock to operation using a high-speed clock, the application can be realized without providing a complicated external circuit.

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

【図1】本発明の第1の実施例を示すクロック制御装置
の回路構成図である。
FIG. 1 is a circuit configuration diagram of a clock control device according to a first embodiment of the present invention.

【図2】従来のクロック制御装置の回路構成図である。FIG. 2 is a circuit configuration diagram of a conventional clock control device.

【図3】従来のクロック制御装置の動作を示す第1のタ
イミング図である。
FIG. 3 is a first timing chart showing the operation of the conventional clock control device.

【図4】従来のクロック制御装置の動作を示す第2のタ
イミング図である。
FIG. 4 is a second timing chart showing the operation of the conventional clock control device.

【図5】本発明の一実施例の動作を示す第1のタイミン
グ図である。
FIG. 5 is a first timing chart showing the operation of one embodiment of the present invention.

【図6】本発明の一実施例の動作を示す第2のタイミン
グ図である。
FIG. 6 is a second timing chart showing the operation of one embodiment of the present invention.

【図7】本発明の一実施例の動作を示す第三のタイミン
グ図である。
FIG. 7 is a third timing chart showing the operation of one embodiment of the present invention.

【図8】本発明の第2の実施例を示すクロック制御装置
の回路構成図である。
FIG. 8 is a circuit configuration diagram of a clock control device according to a second embodiment of the present invention.

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

1…クロック入力端子、2…クロック入力端子、3…ク
ロック選択端子、4…セレクタ、5…第1のセレクタ制
御回路、6…第1のディレイ回路、7…信号保持回路、
8…セレクタ、9…第2のセレクタ制御回路、10…第
2のディレイ回路、11…カウンタ、12…ノイズ除去
回路、13…クロック制御装置出力端子。
DESCRIPTION OF SYMBOLS 1 ... Clock input terminal, 2 ... Clock input terminal, 3 ... Clock selection terminal, 4 ... Selector, 5 ... First selector control circuit, 6 ... First delay circuit, 7 ... Signal holding circuit,
8 selector, 9 second selector control circuit, 10 second delay circuit, 11 counter, 12 noise removal circuit, 13 clock control device output terminal.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 二つの独立したクロックを入力する端子
と、前記二つのクロックの一方を選択するためクロック
切り替え信号を入力するクロック選択端子と、前記クロ
ック切り替え信号に応じて前記二つのクロックを切り替
える第1のセレクタと、前記第1のセレクタを制御する
第1のセレクタ制御装置と、固定信号と前記第1のセレ
クタから出力されたクロックを切り替える第2のセレク
タと、前記第2のセレクタを制御する第2のセレクタ制
御回路と、前記第1のセレクタから出力されたクロック
と同期をした信号を生成し、前記第2のセレクタ制御装
置に信号を送るカウンタからなるクロック制御装置にお
いて、前記クロック選択端子に入力されたクロック切り
替え信号を所定のディレイ値だけ遅らせ、前記第1のセ
レクタ制御装置に信号を送る第1のディレイ装置と、前
記クロック切り替え信号を所定のディレイ値だけ遅ら
せ、前記第2のセレクタ制御装置に送る第2のディレイ
回路と、前記第1のセレクタから出力されたクロック
を、前記クロック選択端子から入力されたクロック切り
替え信号によって保持する信号保持装置とを備え、前記
第1のディレイ装置のディレイ値は、前記第2のディレ
イ装置のディレイ値より大きく設定され、前記第2のセ
レクタは前記第2のセレクタ制御装置の出力信号に応じ
て前記信号保持装置の出力である固定信号と前記第1の
セレクタの出力を選択することを特徴とするクロック制
御装置。
1. A terminal for inputting two independent clocks, a clock selection terminal for inputting a clock switching signal for selecting one of the two clocks, and switching between the two clocks according to the clock switching signal. A first selector, a first selector control device for controlling the first selector, a second selector for switching between a fixed signal and a clock output from the first selector, and controlling the second selector A second selector control circuit that generates a signal synchronized with a clock output from the first selector and sends a signal to the second selector control device. The clock switching signal input to the terminal is delayed by a predetermined delay value and transmitted to the first selector control device. A first delay device for transmitting a clock signal, a second delay circuit for delaying the clock switching signal by a predetermined delay value and transmitting the clock switching signal to the second selector control device, and a clock output from the first selector. A signal holding device that holds the clock switching signal input from the clock selection terminal, wherein a delay value of the first delay device is set to be larger than a delay value of the second delay device; A clock control device, wherein a selector selects a fixed signal, which is an output of the signal holding device, and an output of the first selector according to an output signal of the second selector control device.
【請求項2】 請求項1に記載したクロック制御装置に
おいて、前記クロック選択端子が割り込み端子に接続さ
れていることを特徴とするクロック制御装置。
2. The clock control device according to claim 1, wherein said clock selection terminal is connected to an interrupt terminal.
【請求項3】 請求項1に記載したクロック制御装置に
おいて、前記第2のセレクタの出力側にノイズ除去装置
を設け、前記第2のセレクタの出力信号に乗るノイズを
除去するクロック制御装置。
3. The clock control device according to claim 1, wherein a noise removal device is provided on an output side of said second selector, and a noise on an output signal of said second selector is removed.
【請求項4】 二つの独立したクロックを入力する端子
と、前記二つのクロックを一方を選択するためクロック
切り替え信号を入力するクロック選択端子と、前記クロ
ック切り替え信号に応じて前記二つのクロックを切り替
える第1のセレクタと、前記第1のセレクタを制御する
第1のセレクタ制御装置と、固定信号と前記第1のセレ
クタから出力されたクロックを切り替える第2のセレク
タと、前記第2のセレクタを制御する第2のセレクタ制
御回路と、前記第1のセレクタから出力されたクロック
と同期をした信号を生成し、前記第2のセレクタ制御装
置に信号を送るカウンタからなるクロック制御装置にお
いて、前記クロック選択端子に入力されたクロック切り
替え信号を所定のディレイ値だけ遅らせ、前記第1のセ
レクタ制御装置に信号を送る第1のディレイ装置と、前
記クロック切り替え信号を所定のディレイ値だけ遅ら
せ、前記第2のセレクタ制御装置に送る第2のディレイ
回路と、前記第1のセレクタから出力されたクロック
を、前記クロック選択端子から入力されたクロック切り
替え信号によって保持する信号保持装置と、前記クロッ
ク選択端子に接続された割り込み端子と、前記第2のセ
レクタの出力側に設けたノイズ除去装置とを備え、前記
第1のディレイ装置のディレイ値は、前記第2のディレ
イ装置のディレイ値より大きく設定され、前記第2のセ
レクタは前記第2のセレクタ制御装置の出力信号に応じ
て前記信号保持装置の出力である固定信号と前記第1の
セレクタの出力を選択することを特徴とするクロック制
御装置。
4. A terminal for inputting two independent clocks, a clock selection terminal for inputting a clock switching signal for selecting one of the two clocks, and switching between the two clocks according to the clock switching signal. A first selector, a first selector control device for controlling the first selector, a second selector for switching between a fixed signal and a clock output from the first selector, and controlling the second selector A second selector control circuit for generating a signal synchronized with a clock output from the first selector and a counter for sending a signal to the second selector control device. The clock switching signal input to the terminal is delayed by a predetermined delay value and transmitted to the first selector control device. A first delay device for transmitting a clock signal, a second delay circuit for delaying the clock switching signal by a predetermined delay value, and transmitting the clock signal to the second selector control device, and a clock output from the first selector. A signal holding device that holds a clock switching signal input from the clock selection terminal, an interrupt terminal connected to the clock selection terminal, and a noise removal device provided on an output side of the second selector, The delay value of the first delay device is set to be larger than the delay value of the second delay device, and the second selector receives the output of the signal holding device according to the output signal of the second selector control device. A clock control device for selecting a certain fixed signal and an output of the first selector.
JP10043364A 1998-02-25 1998-02-25 Clock controller Pending JPH11242529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10043364A JPH11242529A (en) 1998-02-25 1998-02-25 Clock controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10043364A JPH11242529A (en) 1998-02-25 1998-02-25 Clock controller

Publications (1)

Publication Number Publication Date
JPH11242529A true JPH11242529A (en) 1999-09-07

Family

ID=12661807

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10043364A Pending JPH11242529A (en) 1998-02-25 1998-02-25 Clock controller

Country Status (1)

Country Link
JP (1) JPH11242529A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7586337B2 (en) 2006-08-30 2009-09-08 Oki Semiconductor Co., Ltd. Circuit for switching between two clock signals independently of the frequency of the clock signals
JP2011180736A (en) * 2010-02-26 2011-09-15 Renesas Electronics Corp Clock control signal generation circuit, clock selector and data processing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7586337B2 (en) 2006-08-30 2009-09-08 Oki Semiconductor Co., Ltd. Circuit for switching between two clock signals independently of the frequency of the clock signals
JP2011180736A (en) * 2010-02-26 2011-09-15 Renesas Electronics Corp Clock control signal generation circuit, clock selector and data processing device

Similar Documents

Publication Publication Date Title
US6600345B1 (en) Glitch free clock select switch
KR100301720B1 (en) Clock control device and method
US5155840A (en) Single-chip mircocomputer with clock-signal switching function which can disable a high-speed oscillator to reduce power consumption
JP5317356B2 (en) Clock control signal generation circuit, clock selector, and information processing apparatus
US6163851A (en) Data processor
JP4870292B2 (en) Information processing device capable of interrupt processing
JP5808097B2 (en) Semiconductor device and reset control method in semiconductor device
JPH10154021A (en) Clock switching device and clock switching method
JPH11242529A (en) Clock controller
JP3148445B2 (en) Multiplexer circuit
JPH076155A (en) Single chip microcomputer
JPH1019984A (en) Testing method and testing equipment of semiconductor device
KR100557607B1 (en) Clock generating device
US6715017B2 (en) Interruption signal generating apparatus
JPS60251418A (en) Operating frequency switching control circuit of arithmetic unit
WO2018066255A1 (en) Integrated circuit device
JPH03265016A (en) Clock switching circuit
JP2730148B2 (en) Control start pulse generation circuit
JP2004094325A (en) Semiconductor integrated circuit device
JP2002278645A (en) Integrated circuit
JP2004013799A (en) Clock switching system
JP2000066708A (en) Programmable controller
JP2002131383A (en) Semiconductor integrated circuit and its inspection method
JP2000222238A (en) In-circuit emulator and in-circuit emulation method
JP2003032232A (en) Clock extraction circuit