JP2003216268A - Circuit and method for selecting clock - Google Patents

Circuit and method for selecting clock

Info

Publication number
JP2003216268A
JP2003216268A JP2002018484A JP2002018484A JP2003216268A JP 2003216268 A JP2003216268 A JP 2003216268A JP 2002018484 A JP2002018484 A JP 2002018484A JP 2002018484 A JP2002018484 A JP 2002018484A JP 2003216268 A JP2003216268 A JP 2003216268A
Authority
JP
Japan
Prior art keywords
clock
divided
signal
output
selection
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.)
Withdrawn
Application number
JP2002018484A
Other languages
Japanese (ja)
Inventor
Takahiro Shimogama
孝裕 下釜
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.)
Renesas Micro Systems Co Ltd
Original Assignee
Renesas Micro Systems 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 Renesas Micro Systems Co Ltd filed Critical Renesas Micro Systems Co Ltd
Priority to JP2002018484A priority Critical patent/JP2003216268A/en
Publication of JP2003216268A publication Critical patent/JP2003216268A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a circuit for quickly switching a synchronous clock that is now outputted to a selected clock without generating clock switching noise. <P>SOLUTION: A clock selection circuit has an output selection signal generation circuit 3 and an output selection circuit 4. Respective signal lines are connected such that a basic clock signal CK1, frequency division clock signals CK2 to CK4 generated by a frequency dividing circuit 2 and a clock selection signal SEL are inputted to the output selection signal generation circuit 3. In an output port of the output selection signal generation circuit 3, a signal line (2-bit) of an output selection signal OUTSEL is connected to an input port of the output selection circuit 4, and the basic clock CK1 and the frequency division clocks CK2, CK3 and CK4 are respectively inputted to the other input ports. If a value of the clock selection signal SEL changes, the output clock selection signal OUTSEL is changed when phases of frequency division clocks selected on the basis of the current output clock and clock selection signal are uniform. <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はクロック選択回路お
よびクロック選択方法に係わり、特に現在出力中の分周
クロックから選択信号で選択したクロックへ切り替える
ときの切替え速度を改善したクロック選択回路およびク
ロック選択方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a clock selection circuit and a clock selection method, and more particularly to a clock selection circuit and a clock selection circuit which have an improved switching speed when switching from a divided clock currently being output to a clock selected by a selection signal. Regarding the method.

【0002】[0002]

【従来の技術】近年、半導体素子の微細化技術の進展に
伴い、その半導体素子で構成するLSIも大規模化して
いる。特にこれらの素子を集積したRAMを内蔵したマ
イクロコンピュータも種々開発され、これらのマイクロ
コンピュータを内蔵した携帯機器の普及も著しい。これ
らの機器は電池を内蔵して電源としているので、電池の
動作時間を長くするために動作周波数を低くすることが
要請されている。
2. Description of the Related Art In recent years, with the progress of miniaturization technology of semiconductor elements, LSIs made up of the semiconductor elements have become large in scale. In particular, various microcomputers incorporating a RAM in which these elements are integrated have been developed, and portable devices incorporating these microcomputers are remarkably spread. Since these devices use a battery as a power source, it is required to lower the operating frequency in order to prolong the operating time of the battery.

【0003】この要請に応えるための一例が、特開20
00−293261号公報に記載されている。同公報に
記載の動作クロック周波数切換回路では、マイクロコン
ピュータの動作クロック周波数を動的に、かつノイズの
発生を回避して切替える技術が提案されている。
An example for responding to this request is Japanese Patent Laid-Open No.
No. 00-293261. In the operation clock frequency switching circuit described in the publication, there is proposed a technology for dynamically switching the operation clock frequency of the microcomputer while avoiding generation of noise.

【0004】すなわち、同公報記載の動作クロック周波
数切換回路の回路図を示した図10およびその動作説明
用のタイミングチャートを示した図11を併せて参照す
ると、選択信号Sが2分周クロックの選択を指示してい
る場合は、選択信号Sの値がデコード装置201により
デコードされ、デコード信号o1のみがアクティブとな
る。ここで、デコード信号o1は3ビットのうち最下位
ビット、o2は第2ビット、o3は第3ビットを表し、
001で2分周クロック,010は4分周クロック,1
00は8分周クロックを指示する。
That is, referring also to FIG. 10 showing a circuit diagram of the operation clock frequency switching circuit described in the publication and FIG. 11 showing a timing chart for explaining the operation thereof, the selection signal S is a halved clock. When the selection is instructed, the value of the selection signal S is decoded by the decoding device 201, and only the decode signal o1 becomes active. Here, the decoded signal o1 represents the least significant bit among the 3 bits, o2 represents the second bit, o3 represents the third bit,
001 is a divided clock by 2, 010 is a divided clock by 4, 1
00 designates a clock divided by eight.

【0005】デコード信号o1は動作クロック信号CO
に同期してラッチされ、デコード信号p1がアクティブ
となる。選択回路202ではデコード信号p1〜p3に
対応したFF204〜FF206の出力のうちひとつが
選択され信号r1として出力される。信号r1は反転回
路203により反転され、信号r2として出力される。
The decode signal o1 is the operation clock signal CO
Latched in synchronism with, the decode signal p1 becomes active. In the selection circuit 202, one of the outputs of FF204 to FF206 corresponding to the decoded signals p1 to p3 is selected and output as the signal r1. The signal r1 is inverted by the inverting circuit 203 and output as the signal r2.

【0006】すなわち、2分周クロック選択時(S=0
1)は、反転信号r2の信号レベルの変化が1クロック
期間の論理レベルのハイレベルと1クロック期間の論理
レベルのロウレベルが出力される。そして選択信号Sが
4分周クロックを選択すると(S=10)、反転信号r
2の信号レベルの変化が2クロック毎となることで、4
分周クロックが出力される。
That is, when the divided-by-2 clock is selected (S = 0
In 1), a change in the signal level of the inverted signal r2 is output as a high level of a logic level in one clock period and a low level of a logic level in one clock period. When the select signal S selects the clock divided by 4 (S = 10), the inverted signal r
Since the signal level of 2 changes every 2 clocks, 4
The divided clock is output.

【0007】また、他の公知の技術として、マイクロコ
ンピュータの動作クロック周波数を動的にかつノイズの
発生を回避して切替える技術が提案されている。
As another known technique, there has been proposed a technique for dynamically switching the operating clock frequency of a microcomputer while avoiding the generation of noise.

【0008】クロック選択回路の他の従来例のブロック
図を示した図12、そのブロック図内の出力選択信号生
成回路の回路図を示した図13およびクロック選択回路
の動作説明用のタイミングチャートを示した図14を合
わせて参照すると、分周回路306で分周された分周ク
ロックCK2〜CK4のすべての位相がロウレベル期間
の時、出力信号選択回路307においてNOR回路31
0から出力される切替え有効信号CHTRGがアクティ
ブとなり、FF311に保持されたクロック選択信号S
ELがセレクタ312で選択され、FF313を介して
出力クロック選択信号OUTSELに伝播される。そし
て出力クロック選択信号OUTSELによりデコード回
路308およびAND回路301〜304で出力クロッ
クが選択され、OR回路305から出力される。
FIG. 12 showing a block diagram of another conventional example of the clock selection circuit, FIG. 13 showing a circuit diagram of the output selection signal generating circuit in the block diagram and a timing chart for explaining the operation of the clock selection circuit. Referring also to FIG. 14 shown, when all phases of the divided clocks CK2 to CK4 divided by the divider circuit 306 are in the low level period, the NOR circuit 31 in the output signal selection circuit 307.
The switching enable signal CHTRG output from 0 becomes active, and the clock selection signal S held in the FF 311
EL is selected by the selector 312 and propagated to the output clock selection signal OUTSEL via the FF 313. Then, an output clock is selected by the decode circuit 308 and AND circuits 301 to 304 by the output clock selection signal OUTSEL, and output from the OR circuit 305.

【0009】[0009]

【発明が解決しようとする課題】しかし、上述した従来
の技術では以下のような問題点があった。例えば、分周
の切替えを、2分周から6分周に切替える(切替え段を
飛ばす)場合、直接切替えると図15に示すようになっ
てしまい、クロックの切替えが出来ない。すなわち、図
12ではラッチ回路207の出力信号の有効な信号がp
1からp3に切り替わった場合は、FF204出力q1
から同相のFF206出力q3が選択されるため、つま
り、図11に示したようにラッチ回路207の出力信号
が切り替わった後に、出力信号r1が同一レベルの信号
幅を延ばすことができないために、正常にクロックの切
替を行うことができない。
However, the above-mentioned conventional technique has the following problems. For example, when the frequency division is switched from 2 frequency division to 6 frequency division (the switching stage is skipped), if the direct switching is performed, the result is as shown in FIG. 15, and the clock cannot be switched. That is, in FIG. 12, the effective signal of the output signal of the latch circuit 207 is p.
When switching from 1 to p3, FF204 output q1
To select the in-phase FF206 output q3, that is, because the output signal r1 cannot extend the signal width of the same level after the output signal of the latch circuit 207 is switched as shown in FIG. It is not possible to switch the clock.

【0010】そこで2分周クロックから4分周クロック
に切替え、4分周クロックから6分周クロックに切替え
るというように1段ずつクロックを切替えていく必要が
ある。
Therefore, it is necessary to switch the clocks one by one, such as switching from the divided-by-2 clock to the divided-by-4 clock and switching from the divided-by-4 clock to the divided-by-6 clock.

【0011】その結果、最大分周クロックから最小分周
クロックに切替わるまで、1段ずつクロックを変化させ
ていかなければならないため、分周段数が多ければ多い
ほどクロック切替えに多大な時間を費やしてしまうとい
う欠点がある。
As a result, the clock must be changed step by step until the maximum divided clock is switched to the minimum divided clock. Therefore, the larger the number of divided stages, the more time is required for the clock switching. There is a drawback that it will end up.

【0012】一方、前述した他の従来例の場合、以下の
ような問題点があった。
On the other hand, the other conventional examples described above have the following problems.

【0013】分周クロックのすべての位相が揃った場合
に出力選択信号を切替えているので、クロックを切替え
る周期が最大分周クロックに依存してしまうという欠点
がある。
Since the output selection signal is switched when all phases of the divided clock are aligned, there is a drawback that the cycle for switching the clock depends on the maximum divided clock.

【0014】具体的には、2分周から32分周までの分
周クロックを切替える選択回路の場合、切替えタイミン
グは32クロック毎にしか発生しないということにな
る。これでは2分周から4分周へ切替える場合などクロ
ック切替えの反応が悪くなってしまう。
Specifically, in the case of the selection circuit for switching the divided clocks from 2 to 32, the switching timing is generated only every 32 clocks. With this, the reaction of the clock switching becomes worse, such as when switching from 2 division to 4 division.

【0015】このように従来例の技術ではクロック選択
信号を切替えてから出力クロックが切替わるまでの応答
時間が遅いという欠点があった。このため、低消費電力
と待機時の低消費電力状態から素早く高速処理に移行す
る時間応答性を高めることに対応できない。
As described above, the conventional technique has a drawback that the response time from switching the clock selection signal to switching the output clock is slow. For this reason, it is not possible to deal with the enhancement of the time responsiveness in which the low power consumption and the low power consumption state in the standby state are quickly shifted to the high speed processing.

【0016】本発明の目的は、上述した従来の欠点に鑑
みなされたものであり、同期クロックを切替える場合
に、速やかにかつクロック切替えノイズを発生させずに
現在の出力クロックから選択信号により選択されたクロ
ックへ切替える回路を提供することにある。
The object of the present invention has been made in view of the above-mentioned conventional drawbacks, and when the synchronous clock is switched, it is selected by the selection signal from the present output clock promptly and without generating clock switching noise. It is to provide a circuit for switching to a different clock.

【0017】[0017]

【課題を解決するための手段】本発明のクロック選択回
路は、基本クロックと、その基本クロックに同期した複
数の分周クロックを生成する分周手段と、前記基本クロ
ックおよび複数の前記分周クロックから任意のクロック
を選択出力するクロック選択手段とを備え、前記選択手
段は、出力中の前記分周クロックおよび選択信号により
選ばれて切替わるべき前記分周クロックのみを監視し、
その監視中の2つのクロックの位相比較の結果が一致し
たときに、出力中のクロックに代わり前記ロック選択手
段で選択されたクロックを出力する機能を有することを
特徴とする。
A clock selection circuit according to the present invention comprises a basic clock, a frequency dividing means for generating a plurality of frequency-divided clocks synchronized with the basic clock, the basic clock and a plurality of the frequency-divided clocks. A clock selecting means for selectively outputting an arbitrary clock from, the selecting means monitors only the divided clock to be selected and switched by the divided clock and a selection signal being output,
It is characterized in that it has a function of outputting the clock selected by the lock selecting means instead of the clock being output when the results of phase comparison of the two clocks being monitored match.

【0018】本発明のクロック選択回路の他の特徴は、
それぞれ異なる分周クロック群に対応させた複数ビット
の選択信号を保持手段で保持し、前記選択信号の前記複
数ビットの組み合わせが切替わる前に選択されていた分
周クロックと前記選択信号で新たに選択された切替わり
後の分周クロックとの2つの分周クロックについてのみ
位相比較を行い、これら2つの分周クロックの位相が揃
ったときにアクティブとなる切替え有効信号に応答して
前記選択信号の指示する値に対応するクロックを、前記
基本クロックおよび前記分周クロック群から選択出力す
るクロック選択手段を有することにある。
Another feature of the clock selection circuit of the present invention is that
A plurality of bits of selection signals respectively corresponding to different divided clock groups are held by holding means, and the divided clocks and the selection signals newly selected before the combination of the plurality of bits of the selection signals are changed. The phase comparison is performed only for the two divided clocks with the selected divided clock after the switching, and the selection signal is generated in response to the switching valid signal that becomes active when the phases of these two divided clocks are aligned. Is provided with clock selection means for selecting and outputting the clock corresponding to the value instructed from the basic clock and the divided clock group.

【0019】また、前記位相比較の機能をもつ前記クロ
ック選択手段における選択対象クロックに前記基本クロ
ックが含まれる。
Further, the basic clock is included in the clocks to be selected in the clock selecting means having the function of phase comparison.

【0020】さらに、前記位相比較の機能をもつ前記ク
ロック選択手段が、前記保持手段で保持された前記選択
信号の指示する値をデコードして得られた値で前記基本
クロックを選択する機能も有する。
Further, the clock selection means having the function of phase comparison also has a function of selecting the basic clock with a value obtained by decoding the value indicated by the selection signal held by the holding means. .

【0021】さらにまた、前記保持手段で保持された前
記選択信号と前記切替え有効信号との値が等しくないと
きにのみ、前記基本クロックおよび前記分周クロック群
から選択出力する機能を有することができる。
Furthermore, it is possible to have a function of selectively outputting from the basic clock and the divided clock group only when the values of the selection signal held by the holding means and the switching valid signal are not equal. .

【0022】本発明のクロック選択回路の又他の特徴
は、基本クロックと、その基本クロックに同期した複数
の分周クロックを生成する分周手段と、前記基本クロッ
クおよび複数の前記分周クロックから任意のクロックを
選択出力するクロック選択手段とを備え、前記クロック
選択手段は前記基本クロックおよびクロック選択信号を
入力するとともに、出力中の前記分周クロックとクロッ
ク選択信号で指示された分周クロックとの位相が一致す
ると一致したことを通知する切替え有効信号を生成する
出力選択信号生成手段と、前記切替え有効信号に応答し
て前記クロック選択信号の指示する値に対応するクロッ
クを、前記基本クロックおよび前記分周クロックから選
択出力する出力選択手段とを有することにある。
Another feature of the clock selection circuit of the present invention is that a basic clock, a frequency dividing means for generating a plurality of frequency-divided clocks synchronized with the basic clock, and the basic clock and a plurality of the frequency-divided clocks. A clock selecting means for selectively outputting an arbitrary clock, wherein the clock selecting means inputs the basic clock and the clock selecting signal, and outputs the divided clock and the divided clock instructed by the clock selecting signal. Output selection signal generating means for generating a switching valid signal for notifying that the phases match, and a clock corresponding to the value instructed by the clock selection signal in response to the switching valid signal, the basic clock and And output selection means for selectively outputting from the divided clock.

【0023】また、前記出力選択信号生成手段は、前記
クロック選択信号を基本クロックの立ち上りでラッチす
る第1の記憶手段と、複数の前記分周クロックのうち前
記クロック選択信号で指定するクロックに対応した1つ
のクロックをアクティブとするか、または全ての前記分
周クロックを非アクティブにする第1のデコード手段お
よび第2のデコード手段と、前記第1のデコード手段お
よび前記第2のデコード手段の前記クロック選択信号で
指定するクロックをアクティブにする信号の論理和手段
と、その論理和手段の出力のうちアクティブな信号に基
づいて対応する1つの分周クロックを有効とし、有効な
分周クロックがすべて論理レベルのロウレベルのときア
クティブとなる前記切替え有効信号を出力する位相一致
手段と、前記切替え有効信号がアクティブのとき前記第
1の記憶手段にラッチされた値を選択するセレクタ手段
と、前記基本クロックの立ち下がりタイミングで前記セ
レクタ手段により選択された信号をラッチし出力クロッ
ク選択信号として出力する第2の記憶手段とで構成する
ことができる。
The output selection signal generating means corresponds to the first storage means for latching the clock selection signal at the rising edge of the basic clock and the clock specified by the clock selection signal among the plurality of divided clocks. The first decoding means and the second decoding means for activating one of the divided clocks or deactivating all the divided clocks, and the first decoding means and the second decoding means. A logical sum means for a signal that activates the clock specified by the clock selection signal and one corresponding divided clock based on the active signal among the outputs of the logical sum means are made effective, and all the effective divided clocks are Phase matching means for outputting the switching enable signal that becomes active when the logical level is low, and the switching Selector means for selecting a value latched in the first storage means when a valid signal is active, and a signal selected by the selector means at the falling timing of the basic clock and output as an output clock selection signal. It can be configured with the second storage means.

【0024】さらに、前記第1のデコード手段は、前記
第1の記憶手段でラッチされた値をデコードし、複数の
前記分周クロックのいずれかに対応した1つの信号のみ
をアクティブとするか、全てを非アクティブとした複数
のデコード信号を生成する構成を有し、前記第2のデコ
ード手段は、前記出力クロック選択信号をデコードし、
複数の前記分周クロックのいずれかに対応した1つの信
号のみをアクティブとするか全てを非アクティブとした
複数のデコード信号を生成する構成を有することができ
る。
Further, the first decoding means decodes the value latched by the first storage means and activates only one signal corresponding to any of the plurality of divided clocks. And a configuration for generating a plurality of decode signals in which all are inactive, wherein the second decoding means decodes the output clock selection signal,
It is possible to have a configuration in which only one signal corresponding to any of the plurality of divided clocks is activated or a plurality of decoded signals in which all are inactive are generated.

【0025】さらにまた、前記出力選択手段は、第3の
デコード手段と、複数の論理積手段と1つの論理和手段
による組み合わせ回路で構成され、前記第3のデコード
手段は前記出力クロック選択信号をデコードし、前記基
本クロックおよび複数の前記分周クロックのいずれかに
対応した複数のデコード信号を生成し、前記論理積手段
には前記基本クロックおよび複数の前記分周クロックが
それぞれ入力されるとともに、前記複数のデコード信号
も入力される構成を有する。
Furthermore, the output selecting means is composed of a third decoding means and a combinational circuit composed of a plurality of logical product means and one logical sum means, and the third decoding means outputs the output clock selection signal. Decodes to generate a plurality of decode signals corresponding to one of the basic clock and the plurality of divided clocks, and the logical product means receives the basic clock and the plurality of divided clocks, respectively, The plurality of decode signals are also input.

【0026】また、1個の前記基本クロックおよびn−
1(nは整数)個の前記分周クロックからなるn個の同
期クロックに対応した前記クロック選択手段の前記出力
選択信号生成手段回路であり、前記クロック選択信号と
前記出力クロック選択信号はn個にデコード可能な任意
のビット幅を有し、前記第1のデコード手段および前記
第2のデコード手段はそれぞれn−1本のデコード信号
を出力し、前記デコード論理和手段はn−1本の出力信
号を出力し、前記位相一致手段はn−1本の分周クロッ
クおよび前記デコード論理和手段の出力信号を入力する
構成を備え、n−1個の分周クロックに対応する機能を
有することもできる。
Also, one basic clock and n-
The output selection signal generating means circuit of the clock selection means corresponding to n synchronization clocks composed of 1 (n is an integer) of the divided clocks, and the clock selection signal and the output clock selection signal are n pieces. Has an arbitrary bit width capable of being decoded, each of the first decoding means and the second decoding means outputs n-1 decode signals, and the decode OR means outputs n-1 outputs. A signal is output, and the phase matching means is provided with a configuration for inputting n-1 frequency-divided clocks and the output signal of the decode logical sum means, and may have a function corresponding to n-1 frequency-divided clocks. it can.

【0027】さらに、前記クロック選択手段は、前記分
周クロックのうち第2および第4の分周クロックがとも
に論理レベルのハイレベル期間のときに前記切替え有効
信号がアクティブとなり、前記切替え有効信号がアクテ
ィブ期間でかつ前記基本クロックの立ち下がりタイミン
グでクロックの切替えが行われる機能を有する。
Further, the clock selecting means activates the switching enable signal when the second and fourth divided clocks of the divided clocks are both in the high level period of the logic level, and the switching enable signal is It has a function of switching clocks in the active period and at the falling timing of the basic clock.

【0028】さらにまた、前記位相一致手段は、前記デ
コード論理和手段の複数出力を入力する複数の論理積手
段と前記複数の分周クロックを2組ずつの組み合わせで
入力する複数の2入力排他的否定論理和手段と、複数の
前記論理積手段の出力それぞれに対応する複数の前記2
入力排他的否定論理和手段の出力を入力とする複数の論
理積手段と、これら複数の論理積手段の出力を入力とす
る論理和手段とで構成することができる。
Furthermore, the phase matching means is a plurality of two-input exclusive inputs for inputting a plurality of logical product means for inputting a plurality of outputs of the decoding logical sum means and a plurality of divided clocks for each pair of the divided clocks. A negative OR means and a plurality of the two corresponding to the outputs of the plurality of AND means, respectively.
It can be constituted by a plurality of logical product means having the outputs of the input exclusive-NOR means as inputs and a logical sum means having the outputs of the plurality of logical product means as inputs.

【0029】また、前記クロック選択手段は、前記比較
対象クロックの位相がハイレベル期間でもロウレベル期
間でもどちらかにそろった場合に前記切替え有効信号が
アクティブとなる機能を有する。
Further, the clock selecting means has a function of activating the switching enable signal when the phase of the comparison target clock is in either the high level period or the low level period.

【0030】本発明のクロック選択方法は、基本クロッ
クと、その基本クロックに同期した複数の分周クロック
を生成する分周手段と、前記分周手段から任意のクロッ
クを選択するクロック選択手段とを備え、前記クロック
選択手段により、出力中の分周クロックおよび選択信号
により選ばれて切替わるべき分周クロックのみを監視
し、監視中の2つの分周クロックの位相比較の結果が一
致したときに、出力中の分周クロックに代わり前記ロッ
ク選択手段で選択された分周クロックを出力することを
特徴とする。
The clock selection method of the present invention comprises a basic clock, a frequency dividing means for generating a plurality of frequency divided clocks synchronized with the basic clock, and a clock selecting means for selecting an arbitrary clock from the frequency dividing means. The clock selection means monitors only the frequency-divided clock being output and the frequency-divided clock to be selected and switched by the selection signal, and when the results of phase comparison of the two frequency-divided clocks being monitored match. , The divided clock selected by the lock selection means is output instead of the divided clock being output.

【0031】本発明のクロック選択方法の他の特徴は、
それぞれ異なる分周クロック群に対応させた複数ビット
の選択信号を保持手段で保持し、前記選択信号の前記複
数ビットの組み合わせが切替わる前に選択されていた分
周クロックと前記選択信号で新たに選択された切替わり
後の分周クロックとの2つの分周クロックについて位相
比較を行い、これら2つの分周クロックの位相が揃った
ときにアクティブとなる切替え有効信号により前記基本
クロックおよび前記分周クロック群から任意のクロック
を選択手段で選択出力することにある。
Another feature of the clock selection method of the present invention is that
A plurality of bits of selection signals respectively corresponding to different divided clock groups are held by holding means, and the divided clocks and the selection signals newly selected before the combination of the plurality of bits of the selection signals are changed. Phase comparison is performed on the two divided clocks with the selected divided clock after switching, and the basic clock and the divided clock are generated by a switching valid signal that becomes active when the phases of these two divided clocks are aligned. It is to select and output an arbitrary clock from the clock group by the selecting means.

【0032】また、前記保持手段で保持された前記選択
信号と前記切替え有効信号との値が等しくないときにの
み、前記基本クロックおよび前記分周クロック群から選
択出力することもできる。
Further, it is possible to selectively output from the basic clock and the divided clock group only when the values of the selection signal held by the holding means and the switching valid signal are not equal.

【0033】さらに、前記位相比較の機能をもつ前記ク
ロック選択手段が選択対象クロックの1つとして前記基
本クロックを選択することもできる。
Further, the clock selecting means having the function of phase comparison can select the basic clock as one of the selection target clocks.

【0034】さらにまた、前記位相比較の機能をもつ前
記クロック選択手段により、前記保持手段で保持された
前記選択信号の指示する値をデコードして得られた値で
前記基本クロックを選択することができる。
Furthermore, the basic clock can be selected by a value obtained by decoding the value indicated by the selection signal held by the holding means by the clock selecting means having the function of phase comparison. it can.

【0035】[0035]

【発明の実施の形態】まず、本発明の概要を述べると、
マイクロコンピュータにおいて複数の同期クロックから
1つのクロックを選択する場合、現在出力されているク
ロックと選択信号が変化し次に選択されるべきクロック
との2つのクロックの位相に着目し、位相が揃ったとき
にクロックの切替え信号を発生する回路を設けたことが
特徴である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, the outline of the present invention will be described.
When selecting one clock from a plurality of synchronous clocks in a microcomputer, paying attention to the phases of two clocks, the currently output clock and the clock to be selected next when the selection signal changes, the phases are aligned. A feature is that a circuit for generating a clock switching signal is provided at times.

【0036】すなわち、本発明の第1の実施の形態にお
けるクロック選択回路のブロック図を示した図1、その
出力選択信号生成回路の回路図を示した図2を参照する
と、例えば、クロック選択信号SEL(信号線上の\2
で示す数値はビット幅を意味している)を切替えると、
クロック選択信号SELはフリップフロップFF5にお
いて基本クロックCK1の立ち上りでラッチされる。
That is, referring to FIG. 1 showing a block diagram of the clock selection circuit in the first embodiment of the present invention and FIG. 2 showing a circuit diagram of the output selection signal generation circuit thereof, for example, the clock selection signal SEL (\ 2 on the signal line
The numerical value shown by means the bit width)
The clock selection signal SEL is latched in the flip-flop FF5 at the rising edge of the basic clock CK1.

【0037】FF5でラッチされた信号は第1のデコー
ド回路8でデコードされ、分周クロックCK2〜CK4
に対応したデコード信号b1〜b3のうち1つがアクテ
ィブとなるか、すべてが非アクティブとなる。
The signal latched by FF5 is decoded by the first decoding circuit 8, and the divided clocks CK2 to CK4 are decoded.
One of the decode signals b1 to b3 corresponding to is active or all are inactive.

【0038】また、出力クロック選択信号OUTSEL
は第2のデコード回路9でデコードされ、分周クロック
CK2〜CK4に対応したデコード信号c1〜c3のう
ち1つがアクティブとなるか、すべてが非アクティブと
なる。
The output clock selection signal OUTSEL
Is decoded by the second decoding circuit 9, and one of the decode signals c1 to c3 corresponding to the divided clocks CK2 to CK4 becomes active or all become inactive.

【0039】第1のデコード回路8のデコード信号b1
〜b3と第2のデコード回路9のデコード信号c1〜c
3は、デコード論理和(OR)回路10で分周クロック
CK2〜CK4に対応したそれぞれのデコード信号の論
理和をとり信号d1〜d3を出力している。
Decode signal b1 of the first decode circuit 8
To b3 and the decode signals c1 to c of the second decode circuit 9
Reference numeral 3 denotes a decode logical sum (OR) circuit 10 which takes the logical sum of the respective decode signals corresponding to the divided clocks CK2 to CK4 and outputs signals d1 to d3.

【0040】位相一致回路11では、デコードOR回路
10の出力信号d1〜d3に対応した分周クロックのう
ちアクティブなクロックについて位相比較を行う。
The phase matching circuit 11 compares the phases of the active clocks among the divided clocks corresponding to the output signals d1 to d3 of the decode OR circuit 10.

【0041】つまり、選択信号SELが切替わる前に選
択されていた分周クロックと選択信号SELにより新し
く選択された分周クロックの2つのクロックについて位
相比較をおこなう。そして2つのクロックの位相が揃っ
たときに切替え有効信号CHTRGがアクティブとな
り、セレクタ7においてFF5によりラッチされた信号
が選択される。
That is, the phase comparison is performed on the two clocks, the divided clock that was selected before the selection signal SEL was switched and the divided clock that was newly selected by the selection signal SEL. Then, when the phases of the two clocks are aligned, the switching valid signal CHTRG becomes active, and the selector 7 selects the signal latched by the FF 5.

【0042】切替え有効信号CHTRGがアクティブ中
に基本クロックCK1の立ち下がりが発生するとFF6
によりセレクタ7の出力がラッチされ、出力クロック選
択信号OUTSELとして出力される。
When the fall of the basic clock CK1 occurs while the switching enable signal CHTRG is active, FF6
Thus, the output of the selector 7 is latched and output as the output clock selection signal OUTSEL.

【0043】図1の出力選択回路4は、基本クロックC
K1と分周クロックCK2〜CK4のうち出力クロック
選択信号OUTSELの値に対応するクロックを出力ク
ロックCLKOUTとして出力する。
The output selection circuit 4 shown in FIG.
A clock corresponding to the value of the output clock selection signal OUTSEL among the K1 and the divided clocks CK2 to CK4 is output as the output clock CLKOUT.

【0044】従って、クロック選択信号を切替える前の
クロックと切替えた後のクロックとの位相が一致したと
きにクロックを切替えるので、従来のよう1段ずつ分周
クロックを切替えたり、クロックの切替えタイミングが
最大分周クロックに依存しないため、クロックを速やか
に、かつノイズの発生を押さえて切替えることが出来る
ものである。
Therefore, since the clocks are switched when the phases of the clock before the switching of the clock selection signal and the clock after the switching coincide with each other, the divided clocks can be switched step by step or the clock switching timing can be changed as in the conventional case. Since it does not depend on the maximum frequency-divided clock, the clock can be switched swiftly and suppressing generation of noise.

【0045】次に、本発明の第1の実施の形態を図面を
参照しながら詳細に説明する。
Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

【0046】図1において、クロック選択回路1は、本
発明による出力選択信号生成回路3および出力選択回路
4を有する。
In FIG. 1, the clock selection circuit 1 has an output selection signal generation circuit 3 and an output selection circuit 4 according to the present invention.

【0047】基本クロック信号CK1と分周回路2によ
って生成された分周クロック信号CK2〜CK4および
クロック選択信号SELは出力選択信号生成回路4に入
力されるようにそれぞれの信号線が接続されている。
The basic clock signal CK1, the divided clock signals CK2 to CK4 generated by the frequency dividing circuit 2 and the clock selection signal SEL are connected to respective signal lines so as to be input to the output selection signal generation circuit 4. .

【0048】出力選択信号生成回路4の出力端は出力選
択信号OUTSELの信号線(2ビット)が出力選択回
路4の入力端に接続され、さらに他の入力端には基本ク
ロックCK1と分周クロックCK2,CK3,CK4が
それぞれ入力されている。
At the output end of the output selection signal generation circuit 4, the signal line (2 bits) of the output selection signal OUTSEL is connected to the input end of the output selection circuit 4, and at the other input end, the basic clock CK1 and the divided clock. CK2, CK3 and CK4 are input respectively.

【0049】クロック選択信号SELの値が変化する
と、現在の出力クロックとクロック選択信号により選択
された分周クロックの位相が揃っているときに、出力ク
ロック選択信号OUTSELを変化させる。
When the value of the clock selection signal SEL changes, the output clock selection signal OUTSEL is changed when the phases of the current output clock and the divided clock selected by the clock selection signal are aligned.

【0050】出力選択信号生成回路3の出力はクロック
選択回路4に与えられ、出力クロック選択信号OUTS
ELの値に応じて基本クロックCK1または分周クロッ
クCK2〜CK4を出力クロック信号CLKOUTに出
力する。
The output of the output selection signal generation circuit 3 is given to the clock selection circuit 4, and the output clock selection signal OUTS is output.
The basic clock CK1 or the divided clocks CK2 to CK4 are output to the output clock signal CLKOUT according to the value of EL.

【0051】一方、図2を参照すると、図1における出
力選択信号生成回路3は、クロック選択信号SELを基
本クロックCK1の立ち上りでラッチするFF5と、F
F5からクロック選択信号SELを入力し、当核指定ク
ロックに対応した1つの信号をアクティブとするか、全
てを非アクティブとする第1のデコード回路8と、後述
する出力クロック選択信号OUTSELを入力し、当核
出力中の当該指定クロックに対応した1つの信号をアク
ティブとするか、全てを非アクティブとする第2のデコ
ード回路9と、第1のデコード回路8の当核指定クロッ
クb1〜b3と第2のデコード回路9の当核指定クロッ
クc1〜c3との対応する2つの信号のアクティブ時の
論理和、例えばb1とc1との論理和をとるOR10
1,b2とc2の論理和をとるOR102,b3とc3
との論理和をとるOR103をそれぞれ有するデコード
OR回路10と、デコードOR回路10の出力d1とク
ロックCK2との論理積をとるAND111、出力d2
とクロックCK3との論理積をとるAND112、出力
d3とクロックCK4との論理積をとるAND113
と、これらAND111〜113の否定論理和をとるN
OR114とを有し、d1〜d3のうちアクティブな信
号に基づいて分周クロックを有効とし、有効な分周クロ
ックがすべてロウレベルのときアクティブとなる切替え
有効信号CHTRGを出力する位相一致回路11と、切
替え有効信号CHTRGがアクティブのときFF5でラ
ッチされた信号を選択するセレクタ7と、基本クロック
CK1の立ち下がりでセレクタ7により選択された信号
をラッチし、前述した出力クロック選択信号を出力する
FF6とで構成されている。
On the other hand, referring to FIG. 2, the output selection signal generation circuit 3 in FIG. 1 includes an FF5 that latches the clock selection signal SEL at the rising edge of the basic clock CK1, and an F
The clock selection signal SEL is input from F5 and one signal corresponding to the designated clock of the nucleus is activated, or the first decoding circuit 8 that deactivates all the signals and the output clock selection signal OUTSEL described later are input. , A second decoding circuit 9 which activates one signal corresponding to the designated clock in the core output or makes all of the signals inactive, and the core designated clocks b1 to b3 of the first decode circuit 8. An OR10 that takes the logical sum of two signals corresponding to the core designated clocks c1 to c3 of the second decoding circuit 9 when active, for example, the logical sum of b1 and c1.
OR 102, b3 and c3 that take the logical sum of 1, b2 and c2
A decoding OR circuit 10 each having an OR 103 that takes the logical sum of AND, an AND 111 that takes the logical product of the output d1 of the decoding OR circuit 10 and the clock CK2, and an output d2
AND112 which takes the logical product of the clock CK3 and AND113 which takes the logical product of the output d3 and the clock CK4
And N taking the NOR of these AND111-113
A phase matching circuit 11 that has an OR 114 and that makes the divided clock valid based on an active signal of d1 to d3, and that outputs a switching valid signal CHTRG that becomes active when all the effective divided clocks are at a low level; A selector 7 that selects the signal latched by the FF 5 when the switching enable signal CHTRG is active, and an FF 6 that latches the signal selected by the selector 7 at the falling edge of the basic clock CK1 and outputs the above-described output clock selection signal. It is composed of.

【0052】上述した構成において、第1のデコード回
路8はFF5でラッチされた信号をデコードし、2分周
クロックCK2、4分周クロックCK3、8分周クロッ
クCK4のいずれかに対応した1つの信号のみをアクテ
ィブとするか、すべてを非アクティブとした3つのデコ
ード信号b1〜b3を生成する。
In the above-mentioned structure, the first decoding circuit 8 decodes the signal latched by the FF5 and outputs one signal corresponding to any one of the frequency-divided clock CK2, the frequency-divided clock CK3, and the frequency-divided clock CK4. Three decode signals b1 to b3 are generated in which only the signals are active or all are inactive.

【0053】第2のデコード回路9は出力クロック選択
信号OUTSELをデコードし、2分周クロックCK
2、4分周クロックCK3、8分周クロックCK4のい
ずれかに対応した1つの信号のみをアクティブとするか
すべてを非アクティブとした3つのデコード信号c1〜
c3を生成する。
The second decoding circuit 9 decodes the output clock selection signal OUTSEL, and divides it by two to generate a clock CK.
Three decoded signals c1 to 1 that make only one signal corresponding to any of the 2/4 clock CK3 and the 8 clock CK4 active or all inactive
Generate c3.

【0054】これらのデコード信号b1〜b3とc1〜
c3はデコードOR回路10へ入力される。デコードO
R回路10はデコード回路8、9のそれぞれのデコード
信号b1〜b3とc1〜c3とをそれぞれ1対1でOR
回路へ入力させ信号d1〜d3を出力する。
These decode signals b1 to b3 and c1 to
c3 is input to the decode OR circuit 10. Decode O
The R circuit 10 ORs the decode signals b1 to b3 and c1 to c3 of the decode circuits 8 and 9 with a one-to-one relationship.
The signals are input to the circuit and the signals d1 to d3 are output.

【0055】位相一致回路11は信号d1〜d3により
選択された分周クロックCK2〜CK4の位相が揃った
ときに位相一致信号CHTRG信号をアクティブとす
る。セレクタ7において位相一致信号CHTRGがアク
ティブのときにクロックFF5でラッチされた信号が選
択され、基本クロックCK1の立ち下がりでFF6にラ
ッチされる。FF6の出力の出力クロック選択信号OU
TSELは出力選択回路4に入力される。
The phase matching circuit 11 activates the phase matching signal CHTRG signal when the phases of the divided clocks CK2 to CK4 selected by the signals d1 to d3 are aligned. The signal latched by the clock FF5 is selected by the selector 7 when the phase matching signal CHTRG is active, and is latched by the FF6 at the falling edge of the basic clock CK1. Output clock selection signal OU of the output of FF6
TSEL is input to the output selection circuit 4.

【0056】図1の出力選択回路4の回路図を示した図
3を参照すると、第3のデコード回路46と、4つのA
ND回路41〜44と1つのOR回路45により構成さ
れている。デコード回路46は出力クロック選択信号O
UTSELをデコードし、基本クロックCK1、2分周
クロックCK2、4分周クロックCK3、8分周クロッ
クCK4のいずれかに対応したデコード信号e1〜e4
を生成する。
Referring to FIG. 3, which shows a circuit diagram of the output selection circuit 4 of FIG. 1, a third decoding circuit 46 and four A's are provided.
It is composed of ND circuits 41 to 44 and one OR circuit 45. The decode circuit 46 outputs the output clock selection signal O
UTSEL is decoded and decoded signals e1 to e4 corresponding to any one of the basic clock CK1, the divided clock CK2, the divided clock CK3, the divided clock CK4
To generate.

【0057】AND回路41〜44には基本クロックC
K1と3つ分周クロックCK2〜CK4がそれぞれ入力
されるとともに、デコード信号e1〜e4をも入力され
る。
A basic clock C is applied to the AND circuits 41 to 44.
K1 and the three divided clocks CK2 to CK4 are input, respectively, and the decode signals e1 to e4 are also input.

【0058】すなわちAND回路41には基本クロック
CK1とともにデコード信号e1が入力される。また、
AND回路42には2分周クロックCK2とともにデコ
ード信号e2が入力され、AND回路43には4分周ク
ロックCK3とともにデコード信号e3が入力される。
That is, the decode signal e1 is input to the AND circuit 41 together with the basic clock CK1. Also,
The AND circuit 42 receives the decode signal e2 together with the divide-by-2 clock CK2, and the AND circuit 43 receives the decode signal e3 together with the divide-by-four clock CK3.

【0059】さらに、AND回路44には8分周クロッ
クCK4とともにデコード信号e4が入力される。そし
て、各AND回路41〜44の出力はOR回路45に入
力される。OR回路45の出力が出力クロック信号CL
KOUTとなる。
Further, the decode signal e4 is input to the AND circuit 44 together with the divided-by-8 clock CK4. Then, the outputs of the AND circuits 41 to 44 are input to the OR circuit 45. The output of the OR circuit 45 is the output clock signal CL
It becomes KOUT.

【0060】図2のデコード回路8、9、図3のデコー
ド回路46は、当業者にとってよく知られており、また
本発明とは直接関係しないので、ここでの詳細な構成は
省略する。
The decoding circuits 8 and 9 of FIG. 2 and the decoding circuit 46 of FIG. 3 are well known to those skilled in the art, and since they are not directly related to the present invention, a detailed configuration thereof will be omitted here.

【0061】以下、本実施の形態の動作を説明する。ま
ず、2分周クロックから8分周クロックに切替える場合
の動作を説明する。第1の実施の形態の動作説明用のタ
イミングチャートを示した図4を参照すると、初期状態
の時刻T0の時点ではクロック選択信号SELは分周数
「2」を示す「01」が選択されており、第1のデコー
ド回路8と第2のデコード回路9ともに2分周クロック
に対応した信号b1、c1がアクティブになっている。
なお、ここでも、クロック選択信号SELは、2分周を
01、4分周を10、8分周を11で指示する。
The operation of this embodiment will be described below. First, the operation when switching from the divided-by-2 clock to the divided-by-8 clock will be described. Referring to FIG. 4, which shows a timing chart for explaining the operation of the first embodiment, at the time T0 in the initial state, the clock selection signal SEL is “01” indicating the frequency division number “2”. Therefore, in both the first decoding circuit 8 and the second decoding circuit 9, the signals b1 and c1 corresponding to the divided-by-two clock are active.
In this case as well, the clock selection signal SEL indicates 01 for 4 frequency division, 10 for 4 frequency division, and 11 for 8 frequency division.

【0062】信号b1、c1がアクティブで他のデコー
ド信号は非アクティブであり、切替え有効信号CHTR
Gがアクティブとなるのは2分周クロックがロウレベル
期間のときとなる。
The signals b1 and c1 are active, the other decode signals are inactive, and the switching enable signal CHTR
G becomes active when the divided-by-2 clock is in the low level period.

【0063】このとき、FF5のラッチ信号と出力クロ
ック選択信号OUTSELの値とが等しいときはクロッ
クの切替えは発生しない。
At this time, when the latch signal of the FF 5 and the value of the output clock selection signal OUTSEL are equal to each other, clock switching does not occur.

【0064】そして時刻T1の時点では、クロック選択
信号SELが分周数「8」を示す「11」に切替わる。
この時点ではまだ出力クロックCLKOUTは2分周ク
ロックが出力されている。
At time T1, the clock selection signal SEL is switched to "11" indicating the frequency division number "8".
At this point, the output clock CLKOUT is still a frequency-divided clock.

【0065】時刻T2の時点で基本クロックCK1の立
ち上りでクロック選択信号SELはFF5でラッチさ
れ、第1のデコード回路8の出力が変化する。
At time T2, the clock selection signal SEL is latched by the FF5 at the rise of the basic clock CK1 and the output of the first decoding circuit 8 changes.

【0066】すなわち、b1が非アクティブとなりb3
がアクティブとなる。また、第2のデコード回路9では
2分周クロックに対応した信号、すなわちc1がアクテ
ィブのままである。そしてデコードOR回路10により
d1とd3がアクティブ、すなわち位相一致回路では2
分周クロックCK2と8分周クロックCK4が位相比較
の対象となる。この時点でも出力クロックは2分周クロ
ックのままである。
That is, b1 becomes inactive and b3
Becomes active. Further, in the second decoding circuit 9, the signal corresponding to the divided-by-2 clock, that is, c1 remains active. Then, the decode OR circuit 10 activates d1 and d3, that is, 2 in the phase matching circuit.
The divided clock CK2 and the divided-by-8 clock CK4 are targets for phase comparison. Even at this time, the output clock is still a divide-by-2 clock.

【0067】T3の時点で2分周クロックCK2と8分
周クロックCK4の信号レベルがともにロウレベルにな
ったとき切替え有効信号CHTRGがアクティブとなり
セレクタ7によりFF6でラッチされた信号が選択され
る。
When the signal levels of the divided-by-2 clock CK2 and the divided-by-8 clock CK4 both become low at time T3, the switching valid signal CHTRG becomes active and the selector 7 selects the signal latched by the FF6.

【0068】そしてT4の時点で切替え有効信号CHT
RGのアクティブ期間中の基本クロックCK1の立ち下
がりでFF6によりラッチされ、出力クロック選択信号
OUTSELが分周「2」を示す「01」から分周
「8」を示す「11」に切替わる。出力選択回路4では
出力選択信号が分周「8」なので8分周クロックCK4
が選択され、出力クロックから基本クロックの8分周ク
ロックが出力される。
Then, at time T4, the switching effective signal CHT
At the fall of the basic clock CK1 during the active period of RG, it is latched by the FF6, and the output clock selection signal OUTSEL is switched from "01" indicating the frequency division "2" to "11" indicating the frequency division "8". In the output selection circuit 4, since the output selection signal is the frequency division "8", the frequency-divided clock CK4
Is selected, and the basic clock divided by 8 is output from the output clock.

【0069】上述した第1の実施の形態では、位相比較
回路内で現在の出力クロックとクロック選択信号とによ
り選択されたクロックのみの位相比較を行い、クロック
の切替えを行っているので、比較対象外のクロックによ
らず、2つのクロックの位相が一致したときすぐに出力
クロックを切替えることができる。
In the above-described first embodiment, the phase comparison circuit compares the phases of only the clocks selected by the current output clock and the clock selection signal and switches the clocks. The output clock can be switched immediately when the phases of the two clocks match, regardless of the external clock.

【0070】従って、クロック切替えの応答速度を向上
することができる。
Therefore, the response speed of clock switching can be improved.

【0071】さらには、本実施の形態では、分周信号だ
けでなく基本クロックをも出力クロックとして使用でき
るので、マイクロコンピュータの動作周波数を幅広く使
用することが出来る。
Furthermore, in this embodiment, not only the frequency-divided signal but also the basic clock can be used as the output clock, so that the operating frequency of the microcomputer can be widely used.

【0072】次に、本発明の第2の実施の形態を説明す
る。第2の実施の形態のブロック図を示した図5を参照
すると、1個の基本クロックCK1は第1の実施の形態
と同様であるが、n−1(nは整数)個の分周クロック
との計n個の同期クロックに対応したクロック選択回路
の出力選択信号生成回路を有することが第1の実施の形
態と異なる。
Next, a second embodiment of the present invention will be described. Referring to FIG. 5 showing the block diagram of the second embodiment, one basic clock CK1 is the same as that of the first embodiment, but n−1 (n is an integer) frequency-divided clocks. The present embodiment differs from the first embodiment in having an output selection signal generation circuit of a clock selection circuit corresponding to a total of n synchronous clocks.

【0073】クロック選択信号SELと出力クロック選
択信号OUTSELはn個にデコード可能な任意のビッ
ト幅を持ち、第1のデコード回路80と第2のデコード
回路90はn−1本のデコード信号b1〜bn−1とc
1〜cn−1を出力しデコードOR回路100はn−1
本の出力信号d1〜dn−1を出力する。
The clock selection signal SEL and the output clock selection signal OUTSEL have an arbitrary bit width capable of being decoded into n pieces, and the first decoding circuit 80 and the second decoding circuit 90 have n-1 decoding signals b1 to b1. bn-1 and c
1 to cn-1 and the decode OR circuit 100 outputs n-1
The book output signals d1 to dn-1 are output.

【0074】また、位相一致回路110はn−1本の分
周クロックとデコードOR回路100の出力信号d1〜
dn−1を入力する。このような構成にすることでいく
つもの分周クロックに対応することが可能である。
Further, the phase matching circuit 110 outputs n-1 divided clocks and the output signals d1 to d1 of the decode OR circuit 100.
Enter dn-1. With such a configuration, it is possible to support many divided clocks.

【0075】動作を説明すると、図1〜5を併せて参照
すると、ここでも初期状態の時刻T0の時点ではクロッ
ク選択信号SELは分周数「2」を示す「01」が選択
されており、第1のデコード回路8と第2のデコード回
路9ともに2分周クロックに対応した信号b1、c1が
アクティブになっている。
To explain the operation, referring also to FIGS. 1 to 5, here again, at the time T0 in the initial state, the clock selection signal SEL is selected to be "01" indicating the frequency division number "2", In both the first decoding circuit 8 and the second decoding circuit 9, the signals b1 and c1 corresponding to the divided-by-2 clock are active.

【0076】信号b1、c1がアクティブで他のデコー
ド信号b2〜bn−1、c2〜cn−1は非アクティブ
であり、切替え有効信号CHTRGがアクティブとなる
のは2分周クロックがロウレベル期間のときとなる。
The signals b1 and c1 are active, the other decode signals b2 to bn-1 and c2 to cn-1 are inactive, and the switching valid signal CHTRG becomes active when the divide-by-2 clock is in the low level period. Becomes

【0077】こここでも、FF5のラッチ信号と出力ク
ロック選択信号OUTSELの値とが等しいときはクロ
ックの切替えは発生しない。
Also here, when the latch signal of the FF 5 and the value of the output clock selection signal OUTSEL are equal, the clock switching does not occur.

【0078】そして時刻T1の時点では、クロック選択
信号SELが分周数「8」を示す「11」に切替わる。
この時点ではまだ出力クロックCLKOUTは2分周ク
ロックが出力されている。
At time T1, the clock selection signal SEL switches to "11" indicating the frequency division number "8".
At this point, the output clock CLKOUT is still a frequency-divided clock.

【0079】時刻T2の時点で基本クロックCK1の立
ち上りでクロック選択信号SELはFF5でラッチさ
れ、第1のデコード回路80の出力b1が変化する。
At time T2, the clock selection signal SEL is latched by the FF5 at the rise of the basic clock CK1 and the output b1 of the first decoding circuit 80 changes.

【0080】すなわち、b1が非アクティブとなりb3
がアクティブとなる。また、第2のデコード回路90で
は2分周クロックに対応した信号、すなわちc1がアク
ティブのままである。そしてデコードOR回路100に
よりd1とd3がアクティブ、それ以外のd2,d4〜
dn−1は非アクティブである。すなわち位相一致回路
110では2分周クロックCK2と8分周クロックCK
4が位相比較の対象となる。この時点でも出力クロック
は2分周クロックのままである。
That is, b1 becomes inactive and b3
Becomes active. In the second decoding circuit 90, the signal corresponding to the divided-by-two clock, that is, c1 remains active. Then, the decode OR circuit 100 activates d1 and d3, and the other d2 and d4 ...
dn-1 is inactive. That is, in the phase matching circuit 110, the divided-by-2 clock CK2 and the divided-by-8 clock CK
4 is the target of phase comparison. Even at this time, the output clock is still a divide-by-2 clock.

【0081】T3の時点で2分周クロックCK2と8分
周クロックCK4の信号レベルがともにロウレベルにな
ったとき切替え有効信号CHTRGがアクティブとなり
セレクタ7によりFF6でラッチされた信号が選択され
る。
When the signal levels of the divided-by-2 clock CK2 and the divided-by-8 clock CK4 both become low level at time T3, the switching valid signal CHTRG becomes active and the selector 7 selects the signal latched by the FF6.

【0082】そしてT4の時点で切替え有効信号CHT
RGのアクティブ期間中の基本クロックCK1の立ち下
がりでFF6によりラッチされ、出力クロック選択信号
OUTSELが分周「2」を示す「01」から分周
「8」を示す「11」に切替わる。出力選択回路4では
出力選択信号が分周「8」なので8分周クロックCK4
が選択され、出力クロックから基本クロックの8分周ク
ロックが出力される。
Then, at time T4, the switching effective signal CHT
At the fall of the basic clock CK1 during the active period of RG, it is latched by the FF6, and the output clock selection signal OUTSEL is switched from "01" indicating the frequency division "2" to "11" indicating the frequency division "8". In the output selection circuit 4, since the output selection signal is the frequency division "8", the frequency-divided clock CK4
Is selected, and the basic clock divided by 8 is output from the output clock.

【0083】上述の説明では第1のデコード回路80の
デコード信号をb1,b3、第2のデコード回路のデコ
ード信号c1,c3、デコードOR回路100の出力信
号d1,d3を例としているが、b1〜bn−1,c1
〜cn−1、d1〜dn−1のそれぞれ対応する信号で
も同様である。
In the above description, the decode signals of the first decode circuit 80 are b1 and b3, the decode signals c1 and c3 of the second decode circuit, and the output signals d1 and d3 of the decode OR circuit 100 are examples. ~ Bn-1, c1
The same applies to the signals corresponding to .about.cn-1 and d1 to dn-1.

【0084】上述した第2の実施の形態でも、位相比較
回路内で現在の出力クロックとクロック選択信号とによ
り選択されたクロックのみの位相比較を行い、クロック
の切替えを行っているので、比較対象外のクロックによ
らず、2つのクロックの位相が一致したときすぐに出力
クロックを切替えることができ、クロック切替えの応答
速度を向上することができる。
Also in the above-described second embodiment, since the phase comparison of only the clocks selected by the current output clock and the clock selection signal in the phase comparison circuit is performed and the clocks are switched, the comparison target is made. The output clock can be switched immediately when the phases of the two clocks match, regardless of the external clock, and the response speed of clock switching can be improved.

【0085】さらには、分周信号だけでなく基本クロッ
クをも出力クロックとして使用できるので、マイクロコ
ンピュータの動作周波数を幅広く使用することが出来
る。
Furthermore, since not only the frequency-divided signal but also the basic clock can be used as the output clock, the operating frequency of the microcomputer can be widely used.

【0086】次に、第3の実施の形態を説明する。第3
の実施の形態の位相一致回路の回路図を示した図6およ
び位相一致回路12を用いた第3の実施の形態の動作説
明用のタイミングチャートを示した図7とを併せて参照
すると、本実施の形態では位相一致回路で比較対象クロ
ックがすべてハイレベル期間のときに切替え有効信号C
HTRGがアクティブになる構成にすることができるこ
とを示している。
Next, a third embodiment will be described. Third
Referring to FIG. 6 showing the circuit diagram of the phase matching circuit of the embodiment of the present invention and FIG. 7 showing the timing chart for explaining the operation of the third embodiment using the phase matching circuit 12, In the embodiment, when the comparison target clocks are all in the high level period in the phase matching circuit, the switching effective signal C
It shows that the HTRG can be configured to be active.

【0087】この位相一致回路12は、信号d1〜d3
を極性反転するINV回路121〜123と信号d1〜
d3の極性反転信号と分周クロックCK2〜CK4とを
それぞれ1つずつ入力とするOR回路124〜126
と、OR回路124〜126の出力を入力とするAND
回路127とで構成される。
The phase matching circuit 12 outputs signals d1 to d3.
INV circuits 121 to 123 and signals d1 to
The OR circuits 124 to 126 which receive the polarity inversion signal of d3 and the divided clocks CK2 to CK4, respectively.
AND with the outputs of the OR circuits 124 to 126 as inputs
And a circuit 127.

【0088】図1〜3、図6および第3の実施の形態の
動作説明用のタイミングチャートを示した図7を併せて
参照すると、ここでも初期状態の時点ではクロック選択
信号SELは分周数「2」を示す「01」が選択されて
おり、第1のデコード回路8と第2のデコード回路9と
もに2分周クロックに対応した信号b1、c1がアクテ
ィブになっている。
Referring also to FIGS. 1 to 3 and 6 and FIG. 7 showing a timing chart for explaining the operation of the third embodiment, the clock selection signal SEL is also the frequency division number at the initial state. "01" indicating "2" is selected, and the signals b1 and c1 corresponding to the divided-by-2 clock are active in both the first decoding circuit 8 and the second decoding circuit 9.

【0089】信号b1、c1がアクティブで他のデコー
ド信号は非アクティブであり、切替え有効信号CHTR
Gがアクティブとなるのは2分周クロックがハイレベル
期間のときとなる。
The signals b1 and c1 are active, the other decode signals are inactive, and the switching enable signal CHTR
G becomes active when the divided-by-2 clock is in the high level period.

【0090】前述したように、FF5のラッチ信号と出
力クロック選択信号OUTSELの値とが等しいときは
クロックの切替えは発生しない。
As described above, when the latch signal of the FF5 and the value of the output clock selection signal OUTSEL are equal, the clock switching does not occur.

【0091】そしてクロック選択信号SELが「2」か
ら「8」に切り替わる時点では、まだ出力クロックCL
KOUTは2分周クロックが出力されている。
At the time when the clock selection signal SEL is switched from "2" to "8", the output clock CL is still present.
A clock divided by two is output to KOUT.

【0092】クロック選択信号SELが「2」から
「8」に切り替わった時点の次の基本クロックCK1の
立ち上りでクロック選択信号SELはFF5でラッチさ
れ、第1のデコード回路8の出力が変化する。
At the next rise of the basic clock CK1 at the time when the clock selection signal SEL switches from "2" to "8", the clock selection signal SEL is latched by the FF5 and the output of the first decoding circuit 8 changes.

【0093】すなわち、b1が非アクティブとなりb3
がアクティブとなる。また、第2のデコード回路9では
2分周クロックに対応した信号、すなわちc1がアクテ
ィブのままである。そしてデコードOR回路10により
d1とd3がアクティブ、すなわち位相一致回路では2
分周クロックCK2と8分周クロックCK4が位相比較
の対象となる。この時点でも出力クロックは2分周クロ
ックのままである。
That is, b1 becomes inactive and b3
Becomes active. Further, in the second decoding circuit 9, the signal corresponding to the divided-by-2 clock, that is, c1 remains active. Then, the decode OR circuit 10 activates d1 and d3, that is, 2 in the phase matching circuit.
The divided clock CK2 and the divided-by-8 clock CK4 are targets for phase comparison. Even at this time, the output clock is still a divide-by-2 clock.

【0094】T5の時点で2分周クロックCK2と8分
周クロックCK4の信号レベルがともにハイレベルにな
ったとき切替え有効信号CHTRGがアクティブとなり
セレクタ7によりFF6でラッチされた信号が選択され
る。
At T5, when the signal levels of the divided-by-2 clock CK2 and the divided-by-8 clock CK4 both become high level, the switching valid signal CHTRG becomes active and the selector 7 selects the signal latched by the FF6.

【0095】図7に示すように、分周クロックCK2お
よびCK4がともにハイレベル期間のときに切替え有効
信号CHTRGがアクティブとなり、セレクタ7により
FF6でラッチされた信号が選択される。切替え有効信
号CHTRGがアクティブ期間の基本クロックCK1の
立ち下がりである時刻T5でクロックの切替えが行われ
る。
As shown in FIG. 7, when the divided clocks CK2 and CK4 are both in the high level period, the switching valid signal CHTRG becomes active, and the selector 7 selects the signal latched by the FF6. Clock switching is performed at time T5 when the switching valid signal CHTRG is the fall of the basic clock CK1 in the active period.

【0096】すなわち、切替え有効信号CHTRGがア
クティブ期間の基本クロックCK1の立ち下がりである
時刻T5でFF6によりラッチされ、出力クロック選択
信号OUTSELが分周「2」を示す「01」から分周
「8」を示す「11」に切替わる。出力選択回路4では
出力選択信号が分周「8」なので8分周クロックCK4
が選択され、出力クロックから基本クロックの8分周ク
ロックが出力される。
That is, the switching enable signal CHTRG is latched by the FF6 at the time T5 when the basic clock CK1 falls during the active period, and the output clock selection signal OUTSEL is divided from "01" indicating "2" to "8". Is switched to "11" indicating "." In the output selection circuit 4, since the output selection signal is the frequency division "8", the frequency-divided clock CK4
Is selected, and the basic clock divided by 8 is output from the output clock.

【0097】上述した第3の実施の形態でも、位相比較
回路内で現在の出力クロックとクロック選択信号とによ
り選択されたクロックのみの位相比較を行い、クロック
の切替えを行っているので、比較対象外のクロックによ
らず、2つのクロックの位相が一致したときすぐに出力
クロックを切替えることができ、クロック切替えの応答
速度を向上することができる。
Also in the third embodiment described above, the phase comparison is performed in the phase comparison circuit only for the clocks selected by the current output clock and the clock selection signal, and the clocks are switched. The output clock can be switched immediately when the phases of the two clocks match, regardless of the external clock, and the response speed of clock switching can be improved.

【0098】さらには、分周信号だけでなく基本クロッ
クをも出力クロックとして使用できるので、マイクロコ
ンピュータの動作周波数を幅広く使用することが出来
る。
Furthermore, since not only the frequency-divided signal but also the basic clock can be used as the output clock, the operating frequency of the microcomputer can be widely used.

【0099】次に、第4の実施の形態を説明する。Next, a fourth embodiment will be described.

【0100】第4の実施の形態における位相一致回路1
3の回路図を示した図13と位相一致回路13を用いた
第4の実施の形態の動作説明用タイミングチャートを示
した図9とを併せて参照すると、本実施の形態では、位
相一致回路13で比較対象クロックの位相がハイレベル
期間でもロウレベル期間でも、どちらかに揃った場合に
切替え有効信号CHTRGがアクティブとなる構成を示
している。
Phase matching circuit 1 in the fourth embodiment
Referring to FIG. 13 showing the circuit diagram of FIG. 3 and FIG. 9 showing the timing chart for explaining the operation of the fourth embodiment using the phase matching circuit 13, in the present embodiment, the phase matching circuit is shown. 13 shows a configuration in which the switching enable signal CHTRG becomes active when the phases of the comparison target clocks are aligned in either the high level period or the low level period.

【0101】図8において、位相一致回路13は、信号
d1とd2、d2とd3、d3とd1をそれぞれ入力と
するAND回路131〜133と、分周クロックCK2
とCK3、CK3とCK4、CK4とCK2とをそれぞ
れ入力とするEX−NOR回路135〜137と、AN
D回路131〜133の出力とEX−NOR回路135
〜137の出力とを入力とするAND回路138〜14
0と、AND回路138〜140の出力を入力とするO
R回路141とで構成される。
In FIG. 8, the phase matching circuit 13 includes AND circuits 131 to 133 which receive signals d1 and d2, d2 and d3, d3 and d1, respectively, and a divided clock CK2.
And CK3, CK3 and CK4, CK4 and CK2 as inputs, and EX-NOR circuits 135 to 137, and AN
Outputs of D circuits 131 to 133 and EX-NOR circuit 135
AND circuits 138 to 14 which receive the outputs of
0 and the inputs of the outputs of the AND circuits 138 to 140
And an R circuit 141.

【0102】図1〜3、図8および第4の実施の形態の
動作説明用のタイミングチャートを示した図9を併せて
参照すると、ここでも初期状態の時点ではクロック選択
信号SELは分周数「2」を示す「01」が選択されて
おり、第1のデコード回路8と第2のデコード回路9と
もに2分周クロックに対応した信号b1、c1がアクテ
ィブになっている。
Referring also to FIGS. 1 to 3 and 8 and FIG. 9 showing a timing chart for explaining the operation of the fourth embodiment, the clock selection signal SEL is the frequency division number also in the initial state. "01" indicating "2" is selected, and the signals b1 and c1 corresponding to the divided-by-2 clock are active in both the first decoding circuit 8 and the second decoding circuit 9.

【0103】信号b1、c1がアクティブで他のデコー
ド信号は非アクティブであり、切替え有効信号CHTR
Gがアクティブとなるのは2分周クロックがロウレベル
期間のときとなる。
The signals b1 and c1 are active, the other decode signals are inactive, and the switching enable signal CHTR
G becomes active when the divided-by-2 clock is in the low level period.

【0104】前述したように、FF5のラッチ信号と出
力クロック選択信号OUTSELの値とが等しいときは
クロックの切替えは発生しない。
As described above, when the latch signal of FF5 and the value of the output clock selection signal OUTSEL are equal, the clock switching does not occur.

【0105】そしてクロック選択信号SELが分周数
「2」から「8」を示す「11」に切替わる時点ではま
だ出力クロックCLKOUTは2分周クロックが出力さ
れている。
Then, when the clock selection signal SEL is switched from the frequency division number "2" to "11" indicating "8", the output clock CLKOUT is still the frequency-divided clock 2.

【0106】クロック選択信号SELが「2」から
「8」に切り替わった時点で基本クロックCK1の立ち
上りでクロック選択信号SELはFF5でラッチされ、
第1のデコード回路8の出力が変化する。
When the clock selection signal SEL switches from "2" to "8", the clock selection signal SEL is latched by the FF5 at the rise of the basic clock CK1.
The output of the first decoding circuit 8 changes.

【0107】すなわち、b1が非アクティブとなりb3
がアクティブとなる。また、第2のデコード回路9では
2分周クロックに対応した信号、すなわちc1がアクテ
ィブのままである。そしてデコードOR回路10により
d1とd3がアクティブ、すなわち位相一致回路では2
分周クロックCK2と8分周クロックCK4が位相比較
の対象となる。この時点でも出力クロックは2分周クロ
ックのままである。
That is, b1 becomes inactive and b3
Becomes active. Further, in the second decoding circuit 9, the signal corresponding to the divided-by-2 clock, that is, c1 remains active. Then, the decode OR circuit 10 activates d1 and d3, that is, 2 in the phase matching circuit.
The divided clock CK2 and the divided-by-8 clock CK4 are targets for phase comparison. Even at this time, the output clock is still a divide-by-2 clock.

【0108】T6の時点で2分周クロックCK2と8分
周クロックCK4の信号レベルがともにロウレベルにな
ったとき切替え有効信号CHTRGがアクティブとなり
セレクタ7によりFF6でラッチされた信号が選択され
る。
When the signal levels of the divided-by-2 clock CK2 and the divided-by-8 clock CK4 both become low at time T6, the switching valid signal CHTRG becomes active and the selector 7 selects the signal latched by the FF6.

【0109】分周クロックCK2とCK4の位相が揃っ
た場合、図9ではT6の時点で分周クロックがロウレベ
ルで信号レベルが一致し、T7の時点でクロックの切替
えが行われる。
When the phases of the divided clocks CK2 and CK4 are aligned, the divided clocks are low level and the signal levels match at time T6 in FIG. 9, and the clocks are switched at time T7.

【0110】すなわち、切替え有効信号CHTRGがア
クティブ期間の基本クロックCK1の立ち下がりである
時刻T7でFF6によりラッチされ、出力クロック選択
信号OUTSELが分周「2」を示す「01」から分周
「8」を示す「11」に切替わる。出力選択回路4では
出力選択信号が分周「8」なので8分周クロックCK4
が選択され、出力クロックCLKOUTから基本クロッ
クの8分周クロックが出力される。
That is, the switching enable signal CHTRG is latched by the FF6 at the time T7 when the basic clock CK1 falls during the active period, and the output clock selection signal OUTSEL changes from "01" indicating the frequency division "2" to "8". Is switched to "11" indicating "." In the output selection circuit 4, since the output selection signal is the frequency division "8", the frequency-divided clock CK4
Is selected and the basic clock divided by 8 is output from the output clock CLKOUT.

【0111】上述した第4の実施の形態でも、位相比較
回路内で現在の出力クロックとクロック選択信号とによ
り選択されたクロックのみの位相比較を行い、クロック
の切替えを行っているので、比較対象外のクロックによ
らず、2つのクロックの位相が一致したときすぐに出力
クロックを切替えることができ、クロック切替えの応答
速度を向上することができる。
Also in the above-described fourth embodiment, since the phase comparison of only the clocks selected by the current output clock and the clock selection signal in the phase comparison circuit is performed and the clocks are switched, the comparison target is made. The output clock can be switched immediately when the phases of the two clocks match, regardless of the external clock, and the response speed of clock switching can be improved.

【0112】さらには、分周信号だけでなく基本クロッ
クをも出力クロックとして使用できるので、マイクロコ
ンピュータの動作周波数を幅広く使用することが出来
る。
Furthermore, since not only the frequency-divided signal but also the basic clock can be used as the output clock, the operating frequency of the microcomputer can be widely used.

【0113】[0113]

【発明の効果】上述したように、本発明のクロック選択
回路およびクロック選択方法は、位相比較回路内で現在
の出力クロックとクロック選択信号により選択されたク
ロックのみの位相比較を行い、クロックの切替えを行っ
ているので、比較対象外のクロックによらず、2つのク
ロックの位相が一致したときすぐに出力クロックを切替
えることができるので、クロック切替えの応答速度を向
上することができる。
As described above, according to the clock selection circuit and the clock selection method of the present invention, the phase comparison circuit performs the phase comparison only between the current output clock and the clock selected by the clock selection signal, and switches the clock. Since the output clock is switched, the output clock can be switched immediately when the phases of the two clocks match each other regardless of the clocks that are not compared, so that the response speed of clock switching can be improved.

【0114】また、基本クロックをも出力クロックとし
て使用できるのでマイクロコンピュータの動作周波数を
幅広く使用することができる。
Since the basic clock can also be used as the output clock, the operating frequency of the microcomputer can be widely used.

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

【図1】本発明の第1の実施形態のブロック図である。FIG. 1 is a block diagram of a first embodiment of the present invention.

【図2】図1の出力選択信号生成回路3の回路図であ
る。
FIG. 2 is a circuit diagram of an output selection signal generation circuit 3 of FIG.

【図3】図1の出力選択回路4の回路図ある。3 is a circuit diagram of an output selection circuit 4 of FIG.

【図4】第1の実施の形態の動作説明用のタイミングチ
ャートである。
FIG. 4 is a timing chart for explaining the operation of the first embodiment.

【図5】第2の実施の形態のブロック図である。FIG. 5 is a block diagram of a second embodiment.

【図6】第3の実施の形態の位相一致回路12の回路図
である。
FIG. 6 is a circuit diagram of a phase matching circuit 12 according to a third embodiment.

【図7】第3の実施の形態の動作説明用のタイミングチ
ャートである。
FIG. 7 is a timing chart for explaining the operation of the third embodiment.

【図8】第4の実施の形態の位相一致回路13の回路図
である。
FIG. 8 is a circuit diagram of a phase matching circuit 13 according to a fourth embodiment.

【図9】第4の実施の形態の動作説明用のタイミングチ
ャートである。
FIG. 9 is a timing chart for explaining the operation of the fourth embodiment.

【図10】従来の動作クロック周波数切換回路の回路図
である。
FIG. 10 is a circuit diagram of a conventional operation clock frequency switching circuit.

【図11】図10の動作説明用のタイミングチャートで
ある。
11 is a timing chart for explaining the operation of FIG.

【図12】クロック選択回路の他の従来例のブロック図
である。
FIG. 12 is a block diagram of another conventional example of a clock selection circuit.

【図13】図13の出力選択信号生成回路の回路図であ
る。
13 is a circuit diagram of the output selection signal generation circuit of FIG.

【図14】図13のクロック選択回路の動作説明用タイ
ミングチャートである。
14 is a timing chart for explaining the operation of the clock selection circuit of FIG.

【図15】図10の従来例において2分周から6分周に
切替える場合のタイミングチャートである。
FIG. 15 is a timing chart when switching from 2 division to 6 division in the conventional example of FIG.

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

1 選択回路 2,306 分周回路 3,307 出力選択信号生成回路 4 出力選択回路 5,6,204,205,206,311,313
FF7 セレクタ 8,80 第1のデコード回路 9,90 第2のデコード回路 10,100 デコードOR回路 11,12,13,110 位相一致回路 121,122,123 INV回路 124,125,126,141,305 OR回路 127,131,132,133,138,139,1
40,301,302,303,304 AND回路 135,136,137 EX−NOR回路 201,308 デコード回路 202 選択回路 207 ラッチ回路 310 NOR回路
1 selection circuit 2, 306 frequency division circuit 3, 307 output selection signal generation circuit 4 output selection circuit 5, 6, 204, 205, 206, 311, 313
FF7 Selector 8, 80 First decoding circuit 9, 90 Second decoding circuit 10, 100 Decoding OR circuit 11, 12, 13, 110 Phase matching circuit 121, 122, 123 INV circuit 124, 125, 126, 141, 305 OR circuits 127, 131, 132, 133, 138, 139, 1
40, 301, 302, 303, 304 AND circuits 135, 136, 137 EX-NOR circuits 201, 308 Decoding circuit 202 Selection circuit 207 Latch circuit 310 NOR circuit

Claims (18)

【特許請求の範囲】[Claims] 【請求項1】 基本クロックと、その基本クロックに同
期した複数の分周クロックを生成する分周手段と、前記
基本クロックおよび複数の前記分周クロックから任意の
クロックを選択出力するクロック選択手段とを備え、前
記クロック選択手段は、出力中の前記分周クロックおよ
び選択信号により選ばれて切替わるべき前記分周クロッ
クのみを監視し、その監視中の2つのクロックの位相比
較の結果が一致したときに、出力中のクロックに代わり
ク前記ロック選択手段で選択されたクロックを出力する
機能を有することを特徴とするクロック選択回路。
1. A basic clock, a frequency dividing means for generating a plurality of frequency-divided clocks synchronized with the basic clock, and a clock selecting means for selectively outputting an arbitrary clock from the basic clock and the plurality of frequency-divided clocks. The clock selection means monitors only the divided clock that is being output and the divided clock that should be selected and switched by the selection signal, and the results of phase comparison of the two clocks that are being monitored match. Sometimes, a clock selection circuit having a function of outputting the clock selected by the lock selection means instead of the clock being output.
【請求項2】 それぞれ異なる分周クロック群に対応さ
せた複数ビットの選択信号を保持手段で保持し、前記選
択信号の前記複数ビットの組み合わせが切替わる前に選
択されていた分周クロックと前記選択信号で新たに選択
された切替わり後の分周クロックとの2つの分周クロッ
クについてのみ位相比較を行い、これら2つの分周クロ
ックの位相が揃ったときにアクティブとなる切替え有効
信号に応答して前記選択信号の指示する値に対応するク
ロックを、前記基本クロックおよび前記分周クロック群
から選択出力するクロック選択手段を有することを特徴
とするクロック選択回路。
2. A plurality of bits of selection signals respectively corresponding to different divided clock groups are held by holding means, and the divided clocks selected before the combination of the plurality of bits of the selection signals are switched and the divided clocks. Phase comparison is performed only for the two divided clocks with the divided clock after switching, which is newly selected by the selection signal, and responds to the switching valid signal that becomes active when the phases of these two divided clocks are aligned. The clock selection circuit further comprises clock selection means for selectively outputting the clock corresponding to the value indicated by the selection signal from the basic clock and the divided clock group.
【請求項3】 前記位相比較の機能をもつ前記クロック
選択手段における選択対象クロックに前記基本クロック
が含まれる請求項1または2記載のクロック選択回路。
3. The clock selection circuit according to claim 1, wherein the selection target clock in the clock selection means having the phase comparison function includes the basic clock.
【請求項4】 前記位相比較の機能をもつ前記クロック
選択手段が、前記保持手段で保持された前記選択信号の
指示する値をデコードして得られた値で前記基本クロッ
クを選択する機能も有する請求項2記載のクロック選択
回路。
4. The clock selecting means having the function of phase comparison also has a function of selecting the basic clock with a value obtained by decoding a value indicated by the selection signal held by the holding means. The clock selection circuit according to claim 2.
【請求項5】 前記保持手段で保持された前記選択信号
と前記切替え有効信号との値が等しくないときにのみ、
前記基本クロックおよび前記分周クロック群から選択出
力する機能を有する請求項3記載のクロック選択回路。
5. Only when the values of the selection signal and the switching valid signal held by the holding means are not equal to each other,
4. The clock selection circuit according to claim 3, which has a function of selectively outputting from the basic clock and the divided clock group.
【請求項6】 基本クロックと、その基本クロックに同
期した複数の分周クロックを生成する分周手段と、前記
基本クロックおよび複数の前記分周クロックから任意の
クロックを選択出力するクロック選択手段とを備え、前
記クロック選択手段は前記基本クロックおよびクロック
選択信号を入力するとともに、出力中の前記分周クロッ
クとクロック選択信号で指示された分周クロックとの位
相が一致すると一致したことを通知する切替え有効信号
を生成する出力選択信号生成手段と、前記切替え有効信
号に応答して前記クロック選択信号の指示する値に対応
するクロックを、前記基本クロックおよび前記分周クロ
ックから選択出力する出力選択手段とを有することを特
徴とするクロック選択回路。
6. A basic clock, frequency dividing means for generating a plurality of divided clocks synchronized with the basic clock, and clock selecting means for selecting and outputting an arbitrary clock from the basic clock and the plurality of divided clocks. The clock selection means inputs the basic clock and the clock selection signal and notifies that the phases of the divided clock being output and the divided clock instructed by the clock selection signal match when they match. Output selection signal generating means for generating a switching valid signal, and output selecting means for selectively outputting a clock corresponding to a value indicated by the clock selection signal from the basic clock and the divided clock in response to the switching valid signal. And a clock selection circuit.
【請求項7】 前記出力選択信号生成手段は、前記クロ
ック選択信号を基本クロックの立ち上りでラッチする第
1の記憶手段と、複数の前記分周クロックのうち前記ク
ロック選択信号で指定するクロックに対応した1つのク
ロックをアクティブとするか、または全ての前記分周ク
ロックを非アクティブにする第1のデコード手段および
第2のデコード手段と、前記第1のデコード手段および
前記第2のデコード手段の前記クロック選択信号で指定
するクロックをアクティブにする信号の論理和手段と、
その論理和手段の出力のうちアクティブな信号に基づい
て対応する1つの分周クロックを有効とし、有効な分周
クロックがすべて論理レベルのロウレベルのときアクテ
ィブとなる前記切替え有効信号を出力する位相一致手段
と、前記切替え有効信号がアクティブのとき前記第1の
記憶手段にラッチされた値を選択するセレクタ手段と、
前記基本クロックの立ち下がりタイミングで前記セレク
タ手段により選択された信号をラッチし出力クロック選
択信号として出力する第2の記憶手段とで構成する請求
項6記載のクロック選択回路。
7. The output selection signal generation means corresponds to a first storage means for latching the clock selection signal at a rising edge of a basic clock and a clock designated by the clock selection signal among a plurality of the divided clocks. A first decoding means and a second decoding means for activating one of the divided clocks or deactivating all of the divided clocks, and the first decoding means and the second decoding means. AND means of the signal that activates the clock specified by the clock selection signal,
A phase matching circuit that validates a corresponding one of the divided clocks based on an active signal among the outputs of the logical sum means, and outputs the switching valid signal that becomes active when all the valid divided clocks are at the low level of the logical level. Means and selector means for selecting the value latched in the first storage means when the switching enable signal is active;
7. The clock selection circuit according to claim 6, further comprising: second storage means for latching the signal selected by the selector means at the falling timing of the basic clock and outputting it as an output clock selection signal.
【請求項8】 前記第1のデコード手段は、前記第1の
記憶手段でラッチされた値をデコードし、複数の前記分
周クロックのいずれかに対応した1つの信号のみをアク
ティブとするか、全てを非アクティブとした複数のデコ
ード信号を生成する構成を有し、前記第2のデコード手
段は、前記出力クロック選択信号をデコードし、複数の
前記分周クロックのいずれかに対応した1つの信号のみ
をアクティブとするか全てを非アクティブとした複数の
デコード信号を生成する構成を有する請求項7記載のク
ロック選択回路。
8. The first decoding means decodes the value latched by the first storage means and activates only one signal corresponding to any one of the plurality of divided clocks, The second decoding means decodes the output clock selection signal and outputs one signal corresponding to any one of the plurality of divided clocks. 8. The clock selection circuit according to claim 7, wherein the clock selection circuit is configured to generate a plurality of decode signals in which only all of them are active or all of them are inactive.
【請求項9】 前記出力選択手段は、第3のデコード手
段と、複数の論理積手段と1つの論理和手段による組み
合わせ回路で構成され、前記第3のデコード手段は前記
出力クロック選択信号をデコードし、前記基本クロック
および複数の前記分周クロックのいずれかに対応した複
数のデコード信号を生成し、前記論理積手段には前記基
本クロックおよび複数の前記分周クロックがそれぞれ入
力されるとともに、前記複数のデコード信号も入力され
る構成を有する請求項7記載のクロック選択回路。
9. The output selection means is composed of a third decoding means and a combinational circuit composed of a plurality of logical product means and one logical sum means, and the third decoding means decodes the output clock selection signal. A plurality of decode signals corresponding to the basic clock and a plurality of the divided clocks are generated, and the logical product means receives the basic clock and the plurality of divided clocks, respectively, and 8. The clock selection circuit according to claim 7, having a configuration in which a plurality of decode signals are also input.
【請求項10】 1個の前記基本クロックおよびn−1
(nは整数)個の前記分周クロックからなるn個の同期
クロックに対応した前記クロック選択手段の前記出力選
択信号生成手段回路であり、前記クロック選択信号と前
記出力クロック選択信号はn個にデコード可能な任意の
ビット幅を有し、前記第1のデコード手段および前記第
2のデコード手段はそれぞれn−1本のデコード信号を
出力し、前記デコード論理和手段はn−1本の出力信号
を出力し、前記位相一致手段はn−1本の分周クロック
および前記デコード論理和手段の出力信号を入力する構
成を備え、n−1個の分周クロックに対応する機能を有
する請求項7記載のクロック選択回路。
10. One said basic clock and n-1.
(N is an integer) The output selection signal generating means circuit of the clock selection means corresponding to n synchronous clocks composed of the divided clocks, and the clock selection signal and the output clock selection signal are n. The first decoding means and the second decoding means each output n-1 decoded signals, and the decoding logical sum means has n-1 output signals. 7. The phase matching means is configured to input n-1 frequency-divided clocks and the output signal of the decoding logical sum means, and has a function corresponding to n-1 frequency-divided clocks. The described clock selection circuit.
【請求項11】 前記クロック選択手段は、前記分周ク
ロックのうち第2および第4の分周クロックがともに論
理レベルのハイレベル期間のときに前記切替え有効信号
がアクティブとなり、前記切替え有効信号がアクティブ
期間でかつ前記基本クロックの立ち下がりタイミングで
クロックの切替えが行われる機能を有する請求項10記
載のクロック選択回路。
11. The clock selecting means activates the switching valid signal when both the second and fourth divided clocks of the divided clock are in a high level period of a logical level, and the switching valid signal is 11. The clock selection circuit according to claim 10, which has a function of switching clocks during an active period and at a falling timing of the basic clock.
【請求項12】 前記位相一致手段は、前記デコード論
理和手段の複数出力を入力する複数の論理積手段と前記
複数の分周クロックを2組ずつの組み合わせで入力する
複数の2入力排他的否定論理和手段と、複数の前記論理
積手段の出力それぞれに対応する複数の前記2入力排他
的否定論理和手段の出力を入力とする複数の論理積手段
と、これら複数の論理積手段の出力を入力とする論理和
手段とで構成する請求項7記載のクロック選択回路。
12. The phase matching means inputs a plurality of logical product means for inputting a plurality of outputs of the decoding logical sum means and a plurality of two-input exclusive negations for inputting the plurality of divided clocks in a combination of two sets each. A logical sum means, a plurality of logical product means having inputs of outputs of the plurality of two-input exclusive-NOR means corresponding to outputs of the plurality of logical product means, and outputs of the plurality of logical product means. 8. The clock selection circuit according to claim 7, which is configured by a logical sum means for inputting.
【請求項13】 前記クロック選択手段は、前記比較対
象クロックの位相がハイレベル期間でもロウレベル期間
でもどちらかにそろった場合に前記切替え有効信号がア
クティブとなる機能を有する請求項12記載のクロック
選択回路。
13. The clock selection device according to claim 12, wherein the clock selection means has a function of activating the switching enable signal when the phase of the comparison target clock is aligned in either a high level period or a low level period. circuit.
【請求項14】 基本クロックと、その基本クロックに
同期した複数の分周クロックを生成する分周手段と、前
記分周手段から任意のクロックを選択するクロック選択
手段とを備え、前記クロック選択手段により、出力中の
分周クロックおよび選択信号により選ばれて切替わるべ
き分周クロックのみを監視し、その監視中の2つの分周
クロックの位相比較の結果が一致したときに、出力中の
分周クロックに代わり前記ロック選択手段で選択された
分周クロックを出力することを特徴とするクロック選択
方法。
14. A clock selecting means comprising: a basic clock; a frequency dividing means for generating a plurality of frequency-divided clocks synchronized with the basic clock; and a clock selecting means for selecting an arbitrary clock from the frequency dividing means. Monitor only the frequency-divided clock being output and the frequency-divided clock that should be selected and switched by the selection signal. A clock selection method, wherein the divided clock selected by the lock selection means is output instead of the divided clock.
【請求項15】 それぞれ異なる分周クロック群に対応
させた複数ビットの選択信号を保持手段で保持し、前記
選択信号の前記複数ビットの組み合わせが切替わる前に
選択されていた分周クロックと前記選択信号で新たに選
択された切替わり後の分周クロックとの2つの分周クロ
ックについて位相比較を行い、これら2つの分周クロッ
クの位相が揃ったときにアクティブとなる切替え有効信
号により前記基本クロックおよび前記分周クロック群か
ら任意のクロックを選択手段で選択出力することを特徴
とするクロック選択方法。
15. A holding unit holds a selection signal of a plurality of bits respectively corresponding to different divided clock groups, and the divided clock selected before the combination of the plurality of bits of the selection signal is switched and the divided clock. Phase comparison is performed on the two divided clocks with the divided clock after the switching newly selected by the selection signal, and the switching effective signal that becomes active when the phases of these two divided clocks are aligned causes the above-mentioned basic A clock selecting method characterized in that an arbitrary clock is selected and output from a clock and the divided clock group by a selecting means.
【請求項16】 前記保持手段で保持された前記選択信
号と前記切替え有効信号との値が等しくないときにの
み、前記基本クロックおよび前記分周クロック群から選
択出力する請求項15記載のクロック選択方法。
16. The clock selection according to claim 15, wherein the basic clock and the divided clock group are selectively output only when the selection signal held by the holding means and the switching valid signal are not equal in value. Method.
【請求項17】 前記位相比較の機能をもつ前記クロッ
ク選択手段が選択対象クロックの1つとして前記基本ク
ロックも選択する請求項14または15記載のクロック
選択方法。
17. The clock selection method according to claim 14, wherein the clock selection means having the function of phase comparison also selects the basic clock as one of the selection target clocks.
【請求項18】 前記位相比較の機能をもつ前記クロッ
ク選択手段により、前記保持手段で保持された前記選択
信号の指示する値をデコードして得られた値で前記基本
クロックを選択する請求項15記載のクロック選択方
法。
18. The basic clock is selected by a value obtained by decoding a value designated by the selection signal held by the holding means by the clock selecting means having the function of phase comparison. The clock selection method described.
JP2002018484A 2002-01-28 2002-01-28 Circuit and method for selecting clock Withdrawn JP2003216268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002018484A JP2003216268A (en) 2002-01-28 2002-01-28 Circuit and method for selecting clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002018484A JP2003216268A (en) 2002-01-28 2002-01-28 Circuit and method for selecting clock

Publications (1)

Publication Number Publication Date
JP2003216268A true JP2003216268A (en) 2003-07-31

Family

ID=27653814

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002018484A Withdrawn JP2003216268A (en) 2002-01-28 2002-01-28 Circuit and method for selecting clock

Country Status (1)

Country Link
JP (1) JP2003216268A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100351732C (en) * 2004-10-29 2007-11-28 国际商业机器公司 Method and device for switching frequency associating with main clock
JP2010282399A (en) * 2009-06-04 2010-12-16 Renesas Electronics Corp Clock switch circuit
JP2011233140A (en) * 2010-04-08 2011-11-17 Canon Inc Control device for reducing consumption power and noise
WO2012168533A1 (en) * 2011-06-09 2012-12-13 Nokia Corporation Apparatus for glitchless clock divider with fast clock change and method thereof
US9275711B2 (en) 2013-12-30 2016-03-01 Samsung Electronics Co., Ltd. Command processing circuit, memory device and memory system including the same
CN109254617A (en) * 2017-07-14 2019-01-22 华为技术有限公司 Clock signal generation method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100351732C (en) * 2004-10-29 2007-11-28 国际商业机器公司 Method and device for switching frequency associating with main clock
US7724059B2 (en) * 2004-10-29 2010-05-25 International Business Machines Corporation Clock scaling circuit
JP2010282399A (en) * 2009-06-04 2010-12-16 Renesas Electronics Corp Clock switch circuit
JP2011233140A (en) * 2010-04-08 2011-11-17 Canon Inc Control device for reducing consumption power and noise
WO2012168533A1 (en) * 2011-06-09 2012-12-13 Nokia Corporation Apparatus for glitchless clock divider with fast clock change and method thereof
US9275711B2 (en) 2013-12-30 2016-03-01 Samsung Electronics Co., Ltd. Command processing circuit, memory device and memory system including the same
CN109254617A (en) * 2017-07-14 2019-01-22 华为技术有限公司 Clock signal generation method and device
CN109254617B (en) * 2017-07-14 2020-11-06 华为技术有限公司 Clock signal generating method and device

Similar Documents

Publication Publication Date Title
CN105162457B (en) High-speed frequency divider and the phase-locked loop for using high-speed frequency divider
US7245168B2 (en) Clock selection circuit and digital processing system for reducing glitches
TWI502894B (en) Low power variable delay circuit
JP2008545320A (en) Programmable divider with other bits
CN110308763B (en) Multi-clock circuit and method for generating target clock based on same
US8471607B1 (en) High-speed frequency divider architecture
JP5097573B2 (en) Frequency divider circuit
JP3604323B2 (en) Clock switching circuit
KR20160042496A (en) Duty cycle error detection device and duty cycle correction device having the same
US8253449B2 (en) Clock switch circuit and clock switch method of the same
US6550013B1 (en) Memory clock generator and method therefor
JPH09167083A (en) Division circuit for parallel processing
JP2003216268A (en) Circuit and method for selecting clock
JP2002182777A (en) Clock switching circuit
JP4560039B2 (en) Quadrature clock divider
JP2004056717A (en) Semiconductor device, system board and multi-phase clock generating circuit
US10749530B1 (en) Programmable divider with glitch-free load circuit
US6441666B1 (en) System and method for generating clock signals
US8850256B2 (en) Communication circuit and communication method
KR100278271B1 (en) A clock frequency divider
CN113504809A (en) Dynamic switching method, device and system of multi-channel clock
JP3178459B2 (en) Operation clock frequency switching circuit
CN115632656A (en) Phase-locked loop capable of outputting multiple phases and multiple frequencies
JP3145988B2 (en) Data S / P conversion circuit
JP2003223237A (en) Clock switching circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050405