JP4221239B2 - Clock wiring drive circuit - Google Patents

Clock wiring drive circuit Download PDF

Info

Publication number
JP4221239B2
JP4221239B2 JP2003106613A JP2003106613A JP4221239B2 JP 4221239 B2 JP4221239 B2 JP 4221239B2 JP 2003106613 A JP2003106613 A JP 2003106613A JP 2003106613 A JP2003106613 A JP 2003106613A JP 4221239 B2 JP4221239 B2 JP 4221239B2
Authority
JP
Japan
Prior art keywords
clock
synchronization
signal
output
rising
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003106613A
Other languages
Japanese (ja)
Other versions
JP2004310673A (en
Inventor
崎 健 司 藤
峰 祐 司 小
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.)
Toshiba Corp
Toshiba Information Systems Japan Corp
Original Assignee
Toshiba Corp
Toshiba Information Systems Japan Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Information Systems Japan Corp filed Critical Toshiba Corp
Priority to JP2003106613A priority Critical patent/JP4221239B2/en
Publication of JP2004310673A publication Critical patent/JP2004310673A/en
Application granted granted Critical
Publication of JP4221239B2 publication Critical patent/JP4221239B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、クロック配線駆動回路に係わり、特にI2CBUSのプロトコルを使用するクロック制御システムに対して好適なものに関する。
【0002】
【従来の技術】
図11に、シングルマスタで構成されたクロック制御システムを示す。マスタとしてデータ送受信の同期に用いるクロックを供給する1つのマイクロコンピュータユニット(以下、MCUという)10と、スレーブに相当する複数のデバイス20A、20B、20Cとが、シリアルクロックライン(以下、SCLという)配線と、シリアルデータ(以下、SDAという)配線とに接続されている。
【0003】
このようなシングルマスタで構成されたシステムにおいても、図12に示されたように、SCL配線、SDA配線の配線長が長い場合にはSCL配線、SDA配線と接地端子との間に負荷容量C1、C2が寄生し、またSCL配線、SDA配線と電源電圧VDD端子との間にプルアップ抵抗PR1、PR2を接続する必要があり、送受信のクロックレートが設定した本来のクロックレートより低下することがある。
【0004】
高速送受信が要求されるシステムにおいては、このようなSCL配線の負荷容量やプルアップ抵抗等が原因となってクロックの転送レートが低下することが問題となっていた。
【0005】
このような現象は、I2CBUSのプロトコルにおいて、マルチマスタで構成されたクロック制御システムに対応させたクロック同期機能が、シングルマスタで構成されたシステムにおいても同様に作用することに原因があった。
【0006】
図13に、マルチマスタで構成されたクロック制御システムを示す。このシステムでは、クロックを供給するマスタとしてMCU30のみならずデバイス40Dが存在し、スレーブに相当する複数のデバイス40A、40B、40CとSCL配線、SDA配線に接続されている。
【0007】
図14を用いて、I2CBUSプロトコルによりクロックを同期させる方式について説明する。
【0008】
ここでは、二つのマスタA、Bがクロックを供給する場合を想定している。
【0009】
(a)マスタBのクロック出力が、SCL配線の立ち下がりとタイミングを同期させる場合
a点において、マスタBから見て、自分のクロック出力より他のマスタAのクロック出力の方が早いタイミングでローに引いた場合、SCL配線はマスタAのクロック出力の影響を受けて同様に早くローに引く。マスタBはSCL配線のローへの立ち下がりを検出し、それまで行っていたハイレベルの期間のカウントをクリアしてローレベルの期間のカウントを開始する。
【0010】
(b)マスタAのクロック出力が、SCL配線の立ち上がりとタイミングを同期させる場合
b点において、マスタAから見て、ローレベルの期間が終了してハイレベルに立ち上がり、ハイレベルの期間のカウントを開始しようとしたが、他のマスタBのクロック出力の方がまだローレベルを維持している場合は、ローに引いたままのマスタBの影響を受けてSCL配線はローレベルを維持する。この場合は、マスタAは時点bからハイレベルの期間のカウントを開始せずに待機し、待ち時間とする。そして、c点になってマスタBのロー期間が終了し、ハイレベルに立ち上がり、この影響を受けてSCL配線も立ち上がると、このSCL配線のハイレベルをマスタAが検出し、マスタAはハイレベルの期間のカウントを開始する。
【0011】
図15に、従来のクロック配線駆動回路(ここでは、マスタAに相当)として動作するMCU100の回路構成を示す。
【0012】
MCU100は、CPU101とI2CBUS制御回路102とを備え、I2CBUS制御回路102は、SCL生成カウンタ103、SCL周波数設定レジスタ104、SCLドライバ105、Nチャネルトランジスタで構成された出力トランジスタ106、バッファ107、SCLサンプル回路108、SCL同期回路109、SCL立ち上がり/立ち下がり同期期間検出回路110を有している。
【0013】
そして、MCU100の外部に設けられたSCL配線に出力トランジスタ106の出力端子が接続されている。SCL配線には、電源電圧VDD端子との間にプルアップ抵抗111が接続されている。
【0014】
SCLの周波数が、CPU101が実行するプログラムによって決定されSCL周波数設定レジスタ104に書き込まれる。設定された周波数に応じて、カウント数がSCL生成カウンタ103に与えられる。
【0015】
カウンタ用クロックCLKがSCL生成カウンタ103に入力され、その出力がSCLドライバ105を介して出力トランジスタ106のゲートに入力される。SCL生成カウンタ103の出力がハイレベルのとき出力トランジスタ106がオンしてSCL配線をローレベルに低下させ、ローレベルになると出力トランジスタ106がオフし、プルアップ抵抗111によってSCL配線がハイレベルに立ち上がる。またSCL生成カウンタ103の出力は、SCL立ち上がり/立ち下がり同期期間検出回路110に入力される。
【0016】
ここで、MCU100が出力する自己のクロック、即ち図14におけるマスタAのクロックに相当するものは、出力トランジスタ106の出力端子(Nチャネルトランジスタのドレイン端子)のレベルとする。
【0017】
先ず、立ち上がり同期は次のように行われる。クロックCLKを入力されるSCLサンプル回路108に、バッファ107を介してSCL配線の信号レベルがモニタ用に入力され、クロックCLKに同期してSCL配線の信号レベルが保持され、SCL立ち上がり/立ち下がり同期期間検出回路110に入力される。これにより、SCLサンプル回路108はSCL配線の信号レベルがハイレベルに立ち上がると、クロックCLKに同期してこれを保持し、ハイレベルの信号を出力する。
【0018】
SCL立ち上がり/立ち下がり同期期間検出回路110は、SCL立ち上がり同期を行うべき期間を検出する。即ち、SCL生成カウンタ103の出力がローレベルで自己のクロックはハイレベル出力になったが、SCLサンプル回路108の出力がまだローレベルを維持している間、この期間をSCL立ち上がり同期期間であるとしてこの期間論理「1」(以下、論理「1」がハイレベルに対応する)となるSCL立ち上がり同期期間信号をSCL同期回路109に出力する。このSCL立ち上がり同期期間信号は、SCL立ち上がり同期が終了した時点、即ちSCL生成カウンタ103の出力がローレベルで自己のクロックがハイレベル出力となり、かつSCL配線をモニタするSCLサンプル回路108の出力がハイレベルに立ち上がった時点で出力されなくなる。
【0019】
SCL同期回路109は、SCL立ち上がり同期期間信号が与えられている間、カウンタ待ち信号を出力する。これにより、SCL生成カウンタ103は、ハイレベルの期間Thighのカウントを開始せずに待機する。論理「1」のSCL立ち上がり同期期間信号が与えられなくなると、SCL同期回路109はカウンタ待ち信号の出力を停止する。これにより、SCL生成カウンタ103はハイレベルの期間Thighのカウントを開始する。この間、SCL生成カウンタ103はローレベルの出力を維持し、自己のクロックはハイレベル出力を維持する。カウント値が設定された値に到達すると、SCL生成カウンタ103はその出力をハイレベルにし、自己のクロックはローレベルに立ち下がる。同時に、ローレベルの期間Tlowのカウントを開始する。
【0020】
立ち下がり同期は次のようにして行われる。SCLサンプル回路108が、SCL配線の信号レベルがローレベルに立ち下がると、クロックCLKに同期してローレベルの信号を保持し出力する。SCL立ち上がり/立ち下がり同期期間検出回路110は、SCL立ち下がり同期を行うべき期間を検出し、その間、SCL立ち下がり同期期間信号を出力する。即ち、SCL生成カウンタ103の出力がローレベルで自己のクロックはハイレベルを維持しており、ローレベルに未だ立ち下がっていないが、SCL配線をモニタするSCLサンプル回路108の出力がローレベルになると、SCL立ち下がり同期期間信号をSCL同期回路109に出力する。このSCL立ち下がり同期期間信号は、SCL生成カウンタ103の出力がハイレベルになり、自己のクロックがローレベルに立ち下がると直ちに出力されなくなる。
【0021】
SCL同期回路109は、SCL立ち下がり同期期間信号を与えられるとカウンタクリア信号をSCL生成カウンタ103に与える。SCL生成カウンタ103は、カウンタクリア信号を与えられるまではハイレベルの期間Thighのカウントを行っていたが、カウンタクリア信号を与えられるとこのカウントを停止し、ローレベルの期間Tlowのカウントを開始する。
【0022】
以下に、関連する従来技術を開示する文献を示す。
【0023】
【特許文献1】
特表2002−508645号公報
【特許文献2】
米国特許第4,689,740号
【0024】
【発明が解決しようとする課題】
従来のクロック配線駆動回路を、シングルマスタとして動作するクロック転送システムに用いると、クロックレートが低下する原因について以下に説明する。
【0025】
上述したように、シングルマスタとして動作するクロック転送システムにクロック配線駆動回路を用いる場合であっても、マルチマスタ構成のクロック転送システムを前提とするI2CBUSプロトコルによるクロック同期機能が作用する。そして、このクロック同期方式は、SCL配線のハイ期間とSCLのロー期間とを、SCL配線に寄生する負荷容量が存在しないことを前提として設計されていた。配線に寄生する容量が無負荷である場合は、図16に示されたように、SCL配線の波形が急峻に立ち上がる。このため、時点aからbまでのローレベルの期間Tlowと、時点bからcまでのハイレベルの期間Thighとを合計した周期Tcycは、ローレベルの期間Tlowのカウント数とハイレベルの期間Thighのカウント数とを合計した値に一致する。
【0026】
ところが、図17に示されたようにSCL配線の波形が立ち上がるときになまりが存在すると、時点bにおいて自己のクロックが立ち上がり、これに伴いSCL配線が上昇を開始し、時点cでハイレベルに到達したと見なすまでにSCLの立ち上がり待ち時間(ハイレベルの期間Thighのカウント待ち時間)が発生し、この待ち時間分だけクロックレートが低下することになる。即ち、周期Tcycが、時点aからbまでのローレベルの期間Tlowのカウント数と、時点cからdまでのハイレベルの期間Thighのカウント数とを合計した値に一致せず、さらに時点bからcまでのハイレベルの期間Thighのカウント待ち時間分だけ長くなる。
【0027】
例えば、設定したSCL周波数が400KHz(2500[ns])で、SCL配線の立上り待ち時間として300[ns]なまりが発生したとすると、SCL配線のハイレベル期間highのカウント開始が300[ns]待たされ、実周波数は357KHz(2500+300[ns])となる。
【0028】
上述のように、従来はSCL配線に存在する負荷容量を考慮していなかったため、シングルマスタとして動作するクロック転送システムにおいて、マルチマスタ構成のクロック転送システムにおけるクロック同期機能が作用することで、送受信のクロックレートが低下するという問題があった。
【0029】
このことは、マルチマスタ構成のクロック転送システムにおいても同様であった。即ち、マルチマスタ構成のクロック転送システムであっても、常時複数のデバイスがクロックをそれぞれ出力するのではなく、単一のデバイスのみがマスタとしてクロックを出力する期間が存在する。このような、実際にはシングルマスタ状態で動作している期間においても同様に、クロック同期機能が作用し、送受信のクロックレートが低下するという問題があった。
【0030】
本発明は上記事情に鑑み、配線に負荷容量が存在する場合にも送受信のクロックレートの低下を防止し、高速送受信を実現することが可能なクロック配線駆動回路を提供することを目的とする。
【0031】
【課題を解決するための手段】
本発明のクロック配線駆動回路は、
前記クロック配線との間で立ち上がり同期のオン又はオフを設定され、立ち上がり同期オフが設定された場合、立ち上がり同期禁止信号を出力する立ち上がり同期オン/オフ設定レジスタと、
クロックの立ち上がり期間及び立ち下がり期間をそれぞれカウントし、前記立ち上がり期間をカウントしている間ハイレベルのクロックを出力させ、前記立ち下がり期間をカウントしている間ローレベルのクロックを出力させるためのクロック出力信号を出力するクロック生成カウンタと、
前記クロック配線に接続された出力端子を有し、前記クロック出力信号を与えられて前記クロック配線を駆動する出力部と、
前記クロック配線のレベルを保持し出力するサンプル回路と、
前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルに立ち上がり前記クロック配線がローレベルを維持している時点から、前記クロック配線がその後ハイレベルに立ち上がる時点までの間、立ち上がり同期期間信号を出力する同期期間検出回路と、
前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力しないときは、前記立ち上がり同期期間信号を与えられている間、カウント待ち信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントを待機させ、前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力したときは、前記立ち上がり同期期間信号にかかわらず前記カウント待ち信号を前記クロック生成カウンタに与えず、前記クロックの立ち上がり期間のカウントを待機させない同期回路と、
を備え、これにより
立ち上がり同期オフが設定された場合は、前記クロック配線と前記出力部の前記出力端子のレベルとの間で同期をとることなくクロックを出力することを特徴とする。
【0032】
ここで前記同期期間検出回路は、前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルを維持しているが前記クロック配線がローレベルに立ち下がった時点から、前記出力端子がその後ローレベルに立ち下がる時点までの間、クロック立ち下がり同期期間信号を出力し、
前記同期回路は、前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力するか否かにかかわらず、前記クロック立ち下がり同期期間信号を与えられると、カウントクリア信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントをクリアさせ、
これにより、前記クロック生成カウンタは、前記カウントクリア信号を与えられると、ローレベルのクロックを出力させるための前記クロック出力信号を出力するように構成してもよい。
【0033】
前記同期回路は、前記同期オン/オフ設定レジスタから出力された前記立ち上がり同期禁止信号と、前記同期期間検出回路から出力された前記立ち上がり同期期間信号とを与えられる論理回路を有し、前記論理回路は、前記立ち上がり同期禁止信号が入力されず、前記立ち上がり同期期間信号が入力されている間、前記カウント待ち信号を出力することもできる。
【0034】
また本発明のクロック配線駆動回路は、
前記クロック配線との間で立ち上がり同期のオン又はオフを設定され、立ち上がり同期オフが設定された場合、立ち上がり同期禁止信号を出力する立ち上がり同期オン/オフ設定レジスタと、
クロックの立ち上がり期間及び立ち下がり期間をそれぞれカウントし、前記立ち上がり期間をカウントしている間ハイレベルのクロックを出力させ、前記立ち下がり期間をカウントしている間ローレベルのクロックを出力させるためのクロック出力信号を出力するクロック生成カウンタと、
前記クロック配線に接続された出力端子を有し、前記クロック出力信号を与えられて前記クロック配線を駆動する出力部と、
前記クロック生成カウンタから、ハイレベルのクロックを出力させるための前記クロック出力信号が出力されてから、所定の立ち上がり同期禁止期間が経過するまでの間、立ち上がり同期禁止期間信号を出力する立ち上がり同期禁止期間設定部と、
前記クロック配線のレベルを保持し出力するサンプル回路と、
前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルに立ち上がり前記クロック配線がローレベルを維持している時点から、前記クロック配線がその後ハイレベルに立ち上がる時点までの間、立ち上がり同期期間信号を出力する同期期間検出回路と、
前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力したときは、前記立ち上がり同期禁止期間設定部から前記立ち上がり同期禁止期間信号が出力されている間、立ち上がり同期禁止信号を出力する立ち上がり同期禁止信号出力部と、
前記立ち上がり同期禁止信号出力部が前記立ち上がり同期禁止信号を出力しないときは、前記クロック立ち上がり同期期間信号を与えられている間、カウント待ち信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントを待機させ、前記立ち上がり同期禁止信号出力部が前記立ち上がり同期禁止信号を出力している間、前記クロック立ち上がり同期期間信号にかかわらず前記カウント待ち信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントを強制的に待機させる同期回路と、
を備え、これにより
立ち上がり同期オフが設定された場合は、前記立ち上がり同期禁止期間が経過するまでの間、前記クロック配線と前記出力部の前記出力端子のレベルとの間で同期をとることなく立ち上がり期間のカウントを強制的に待機し、前記立ち上がり同期禁止期間が経過した後、前記クロック配線と前記出力部の前記出力端子のレベルとの間で同期をとることを特徴とする。
【0035】
ここで前記同期期間検出回路は、前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルを維持しているが前記クロック配線がローレベルに立ち下がった時点から、前記出力端子がその後ローレベルに立ち下がる時点までの間、クロック立ち下がり同期期間信号を出力し、
前記同期回路は、前記立ち上がり同期禁止信号出力部が前記立ち上がり同期禁止信号を出力するか否かにかかわらず、前記クロック立ち下がり同期期間信号を与えられると、カウントクリア信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントをクリアさせ、
これにより、前記クロック生成カウンタは、前記カウントクリア信号を与えられると、ローレベルのクロックを出力させるための前記クロック出力信号を出力するように構成してもよい。
【0036】
前記立ち上がり同期禁止期間設定部は、
前記クロック生成カウンタから出力された前記クロック出力信号を所定のタイミングで順次転送して出力する、直列に接続された複数段のフリップフロップと、
前記クロック生成カウンタから出力された前記クロック出力信号と、前記フリップフロップにより転送された後出力された前記クロック出力信号とを与えられ、前記クロック生成カウンタからハイレベルのクロックを出力させるための前記クロック出力信号が出力されてから前記立ち上がり同期禁止期間が経過するまでの間、前記立ち上がり同期禁止期間信号を出力する第1の論理回路とを有し、
前記同期回路は、
前記立ち上がり同期禁止信号出力部から出力された前記立ち上がり同期禁止信号と、前記同期期間検出回路から出力された前記立ち上がり同期期間信号とを与えられる第2の論理回路を有し、
前記第2の論理回路は、前記立ち上がり同期禁止信号が入力されている間、又は前記立ち上がり同期禁止信号が入力されず前記立ち上がり同期期間信号が入力されている間、前記カウント待ち信号を出力するように構成することもできる。
【0037】
【発明の実施の形態】
以下、本発明の実施の形態について図面を参照して説明する。
【0038】
(1)第1の実施の形態
先ず、本発明の第1の実施の形態によるクロック配線駆動回路について説明する。
【0039】
本実施の形態は、シングルマスタとして構成されたクロック転送システムにおいて使用する場合には、クロック立ち上がり同期機能を停止し、マルチマスタで構成されたクロック転送システムにおいて使用する場合は、従来と同様にクロック立ち上がり同期を行う。尚、クロック立ち下がり同期は従来と同様にいずれのシステムにおいても行う。
【0040】
本実施の形態によるクロック配線制御回路として、MCU200の構成を図1に示す。
【0041】
MCU200は、CPU201とI2CBUS制御回路202とを備え、I2CBUS制御回路202は、SCL生成カウンタ203、SCL周波数設定レジスタ204、SCLドライバ205、出力トランジスタ206、バッファ207、SCLサンプル回路208、SCL同期回路209、SCL立ち上がり/立ち下がり同期期間検出回路210、さらにSCL同期オン/オフ設定レジスタ212を有している。
【0042】
MCU200の外部に設けられたSCL配線に出力トランジスタ206の出力端子が接続されている。MCU200の出力クロックのレベルは、出力トランジスタ206の出力端子のレベルが対応する。SCL配線には、電源電圧VDD端子との間にプルアップ抵抗211が接続されている。
【0043】
先ず、SCL立上り同期機能のオン/オフは、CPU201が実行するプログラム命令によって決定される。SCL立ち上がり同期機能をオフさせる場合は、オフ命令がSCL同期オン/オフ設定レジスタ212に与えられて設定される。SCL同期オン/オフ設定レジスタ212から、論理「1」の立ち上がり同期禁止信号がSCL同期回路209に与えられる。これにより、SCL同期回路209からはカウント待ち信号が出力されなくなり、SCL生成カウンタ203はカウンタ用クロックCLKに基づいて同期することなくカウント動作を行う。SCLの周波数が、CPU201が実行するプログラムによって決定されSCL周波数設定レジスタ204に書き込まれる。設定された周波数に応じて、カウント数がSCL生成カウンタ203に与えられ、カウント動作が行われる。
【0044】
CPU201が実行するプログラム命令によりSCL立ち上がり同期機能をオンさせる場合は、オン命令がSCL同期オン/オフ設定レジスタ212に与えられて設定される。SCL同期オン/オフ設定レジスタ212から立ち上がり同期禁止信号がSCL同期回路209に出力されなくなる。これにより、SCL同期回路209からカウント待ち信号が出力される状態となる。この場合の動作は、図15を用いて説明した動作と同様である。
【0045】
カウンタ用クロックCLKがSCL生成カウンタ203に入力され、その出力がSCLドライバ205を介して出力トランジスタ206のゲートに入力され、ローレベルになるとオフして出力トランジスタ206の出力端子はハイレベルに立ち上がる。
【0046】
SCL生成カウンタ203の出力は、SCL立ち上がり/立ち下がり同期期間検出回路210に入力される。
【0047】
またクロックCLKが入力されたSCLサンプル回路208に、バッファ207を介してSCL配線の信号レベルが入力され、クロックCLKに同期して保持され、その出力がSCL立ち上がり/立ち下がり同期期間検出回路210に入力される。
【0048】
SCLサンプル回路208は、SCL配線の信号レベルがハイレベルに立ち上がると、クロックCLKに同期して保持し、ハイレベルの信号を出力する。SCL立ち上がり/立ち下がり同期期間検出回路210は、SCL生成カウンタ203の出力がローレベル(自己のクロック出力がハイレベル)になり、かつSCLサンプル回路208の出力はローレベルの間、SCL立ち上がり同期期間信号をSCL同期回路209に出力する。
【0049】
SCL同期回路209は、SCL立ち上がり同期期間信号を与えられている間、カウント待ち信号を出力する。これにより、SCL生成カウンタ203は、ハイレベルの期間Thighのカウントを開始せずに待機する。SCL同期回路209はSCL立ち上がり同期期間信号を与えられなくなると、カウンタ待ち信号の出力を停止する。これにより、SCL生成カウンタ203はハイレベルの期間Thighのカウントを開始し、カウント値が設定値に到達するまでの間ハイレベルの出力を維持する。
【0050】
SCL立ち下がりに関しては、SCL配線に負荷容量による波形のなまりは影響せず、クロックレートの低下を招くことがないので従来通りに同期を行う。
【0051】
即ち、SCLサンプル回路208は、SCL配線の信号レベルがローレベルに立ち下がると、クロックCLKに同期して保持し、ローレベルの信号を出力する。SCL立ち上がり/立ち下がり同期期間検出回路210は、SCL生成カウンタ203の出力がローレベル(自己のクロックがハイレベル)を維持しローレベルに立ち下がっていないが、SCLサンプル回路208の出力がローレベルになると、SCL立ち下がり同期期間信号をSCL同期回路209に出力する。
【0052】
SCL同期回路209は、SCL立ち下がり同期期間信号を与えられるとカウンタクリア信号をSCL生成カウンタ203に与える。SCL生成カウンタ203は、カウンタクリア信号を与えられるまではハイレベルの期間Thighのカウントを行っていたが、カウンタクリア信号を与えられるとこのカウントを停止し、ローレベルの期間Tlowのカウントを開始する。
【0053】
図2に、上記第1の実施の形態によるクロック配線制御回路の構成をより具体化した回路構成を示す。
【0054】
CPU201からチップセレクト信号CS、書き込み信号WRが出力される。SCL同期オン/オフ設定レジスタ212はフリップフロップF/F4を有し、CPU201から当該チップを選択するチップセレクト信号CSと、SCL立ち上がり同期機能をオフさせる書き込み信号WRが出力されると、論理「1」を保持して出力する。これにより、フリップフロップF/F4に立ち上がり同期禁止が設定された状態となり、論理「1」の立ち上がり同期禁止信号が出力される。立ち上がり同期機能の禁止を解除する場合は、CPU201からリセット信号RESが与えられてフリップフロップF/F4がリセットされ、論理「1」の立ち上がり同期禁止信号は出力されなくなる。
【0055】
SCL生成カウンタ203からの出力がローレベル(自己のクロックがハイレベル)になったが、SCLサンプル回路208からの出力がローレベルである場合、SCL立ち上がり/立ち下がり同期期間検出回路210からは論理「1」のSCL立ち上がり同期期間信号が出力される。
【0056】
SCL同期回路209は、AND回路AN1を有する。このAND回路AN1に、論理「1」のSCL立ち上がり同期期間信号と、SCL同期オン/オフ設定レジスタ212からの出力が反転されたものがAND回路AN1に入力される。これにより、SCL立ち上がり/立ち下がり同期期間検出回路210がSCL生成カウンタ203からハイレベルの信号が出力されかつSCLサンプル回路208がモニタしたSCL配線の信号レベルがまだローレベルにある立ち上がり同期期間を検出して論理「1」のSCL立ち上がり同期期間信号が出力され、さらに論理「1」の立ち上がり同期信号が出力されておらず、SCL同期オン/オフ設定レジスタ212からの出力が論理「0」である場合に限り、論理「1」のカウント待ち信号が出力されてSCL生成カウンタ203に与えられる。論理「1」の立ち上がり同期信号が出力されている場合は、出力トランジスタ206の出力端子からハイレベルのクロックが出力されSCL配線のレベルがまだローレベルにある立ち上がり同期期間であっても、AND回路AN1からは論理「1」のカウント待ち信号は出力されなくなる。
【0057】
SCL生成カウンタ203は、カウントアップ用に複数段直列に接続されカウンタ用クロックCLKを順次シフトしていくフリップフロップF/F1、F/F2、…、F/F3と、フリップフロップF/F1、F/F2、…、F/F3のリセット端子に出力側が接続されたNOR回路NR1とを備えている。
【0058】
NOR回路NR1は、論理「1」のカウント待ち信号が出力されている期間は、全てのフリップフロップF/F1、F/F2、…、F/F3のリセット端子に論理「0」のリセット信号を与えてリセット状態にし、カウント動作を開始させない。立ち上がり同期禁止により論理「1」のカウント待ち信号が出力されない場合は、NOR回路NR1からはフリップフロップF/F1、F/F2、…、F/F3のリセット端子に論理「0」のリセット信号が出力されなくなり、カウント動作が行われる。最終段のフリップフロップF/F3からの出力、即ちカウント値がSCL周波数設定レジスタ204に設定された値に到達すると、NOR回路NR1に論理「1」の信号が入力されて、論理「0」のリセット信号が全てのフリップフロップF/F1〜F/F3のリセット端子に入力され、カウント動作がリセットされる。
【0059】
SCL立ち下がりに関しては、上述したように同期を行う。
【0060】
SCLサンプル回路208が、SCL配線の信号レベルがローレベルに立ち下がると、クロックCLKに同期して保持し、ローレベルの信号を出力する。
【0061】
SCL立ち上がり/立ち下がり同期期間検出回路210が、SCL生成カウンタ203の出力が依然としてローレベル(自己のクロック出力がハイレベル)を維持しているが、SCLサンプル回路208の出力がローレベルに立ち下がっているとSCL立ち下がり同期期間であると判断し、論理「1」のSCL立ち下がり同期期間信号をSCL同期回路209に出力する。
【0062】
SCL同期回路209は、論理「1」のSCL立ち下がり同期期間信号を論理「1」のカウンタクリア信号としてSCL生成カウンタ203に与える。SCL生成カウンタ203は、このカウンタクリア信号を与えられるまではハイレベルの期間Thighのカウントを行っているが、カウンタクリア信号を与えられるとNOR回路NR1から論理「0」の信号がフリップフロップF/F1、F/F2、…、F/F3のリセット端子に出力され、ハイレベルの期間Thighのカウント動作がリセットされる。この後、ローレベルの期間Tlowのカウントが開始される。
【0063】
図1に示された第1の実施の形態、図2に示された第2の実施の形態によれば、立ち下がり同期を禁止することにより、次のような作用、効果を奏する。
【0064】
図3に示されたように、MCU200から出力される自己のクロックのハイレベル期間Thigh、ローレベルの期間Tlowは規格通りに900ns、1600ns、またSCL配線のレベルが時点cからdまでに立ち上がるとき最大規格値の300nsまで時間を要したとする。
【0065】
SCL配線のハイレベル期間Thigh、ローレベル期間Tlowは次のように決定される。
【0066】
先ず、SCL配線における立ち上がり時間の最大値をTrとすると、ハイレベル期間Thighのカウント数は、
(Thighのカウント数−Tr)≧Thighの最小規格 (1)
を満たすように設定する。
【0067】
また、SCL配線における立ち下がり時間の最大値をTfとすると、ローレベル期間Tlowのカウント数は、
(Tlowのカウント数−Tf)≧Tlowの最小規格 (2)
を満たすように設定する。
【0068】
例えば、SCL配線のクロックを高速モードの400kHz(周期2500ns)とする。この場合のTrの最大規格は300ns、Tfの最大規格は300ns、Tlowの最小規格は1300ns、Thighの最小規格は600nsである。
【0069】
上記(1)式より、(Thighのカウント数−300)≧600から、Thighのカウント数は900nsとして設定する。
【0070】
また上記(2)式より、(Tlowのカウント数−300)≧1300から、Tlowのカウント数は1600nsとして設定する。
【0071】
SCL配線のクロックを低速モードの100kHz(周期10000ns)とした場合は、Trの最大規格は1000ns、Tfの最大規格は300ns、Tlowの最小規格は4700ns、Thighの最小規格は4000nsである。
【0072】
上記(1)式より、(Thighのカウント数−1000)≧4000から、Thighのカウント数は5000nsとして設定する。
【0073】
また上記(2)式より、(Tlowのカウント数−300)≧4700から、Tlowのカウント数は5000nsとして設定する。
【0074】
上記第1の実施の形態によれば、図17を用いて説明した従来の回路において発生したハイレベルの期間Thighのカウント待ち時間が存在しなくなり、クロックレートの低下が防止される。
【0075】
(2)第2の実施の形態
上記第1の実施の形態によるクロック配線駆動回路は、シングルマスタで構成されたクロック転送システムにおいて使用する場合、SCL立ち上がり同期を全く行わないことで、従来と比較しクロックレートの低下を防止することができる。しかし、マルチマスタで構成されたクロック転送システムにおいて使用する場合には、SCL立ち上がり同期を全く行わないのでは複数のクロックの間で同期をとることができないので、従来通りに同期せざるを得なくなる。このため、マルチマスタ構成のシステムにおいてはクロックレートの低下を防止することはできない。
【0076】
これに対し本実施の形態は、マルチマスタで構成されたクロック転送システムにおいても、単一のデバイスのみがクロックを出力し実状としてはシングルマスタ状態で動作している期間が存在することに着目し、所定期間SCL立ち上がり同期を禁止し強制的に立ち上がり期間のカウントを禁止し、所定期間経過後立ち上がり同期を行うことで、シングルマスタ状態で動作している間はクロックレートの低下を防止し、マルチマスタ状態で動作する状態では同期動作を実現することでマルチマスタとしても支障なく動作可能とする点に特徴がある。
【0077】
本実施の形態によるクロック配線制御回路として、MCU300の構成を図4に示す。
【0078】
MCU300は、CPU301とI2CBUS制御回路302とを備え、I2CBUS制御回路302は、SCL生成カウンタ303、SCL周波数設定レジスタ304、SCLドライバ305、出力トランジスタ306、バッファ307、SCLサンプル回路308、SCL同期回路309、SCL立ち上がり/立ち下がり同期期間検出回路310、SCL同期オン/オフ設定レジスタ312、さらに立ち上がり同期禁止期間設定部313を備えている。立ち上がり同期禁止期間設定部313は、AND回路AN21、直列に接続された複数段のフリップフロップF/F21〜F/F23を有している。
【0079】
MCU300の外部に設けられたSCL配線に出力トランジスタ306の出力端子が接続されている。SCL配線には、電源電圧VDD端子との間にプルアップ抵抗311が接続されている。
【0080】
上記第1の実施の形態と同様に、SCL生成カウンタ303の出力がSCL立ち上がり/立ち下がり同期期間検出回路310に入力される。
【0081】
クロックCLKが入力されるSCLサンプル回路308に、バッファ307を介してSCL配線の信号レベルが入力され、クロックCLKに同期して保持され、その出力がSCL立ち上がり/立ち下がり同期期間検出回路310に入力される。
【0082】
SCLサンプル回路308は、SCL配線の信号レベルがハイレベルに立ち上がると、クロックCLKに同期して保持し、ハイレベルの信号を出力する。SCL立ち上がり/立ち下がり同期期間検出回路310は、SCL生成カウンタ303の出力がローレベル(自己のクロック出力がハイレベル)になり、かつSCLサンプル回路308の出力が未だローレベルにある間、SCL立ち上がり同期期間信号をSCL同期回路309に出力する。
【0083】
また、SCL立上り同期機能のオン/オフは、CPU301が実行するプログラム命令によって決定される。SCL立ち上がり同期機能を所定期間オフさせる場合は、オフ命令がSCL同期オン/オフ設定レジスタ312に与えられて設定される。SCL同期オン/オフ設定レジスタ312から論理「1」の立ち上がり同期禁止信号が出力されると、AND回路AN22の一方の入力端子に入力される。一方、SCL立ち上がり同期機能をオンさせる場合は、オン命令がSCL同期オン/オフ設定レジスタ312に与えられて設定される。SCL同期オン/オフ設定レジスタ312からは、論理「1」の立ち上がり同期禁止信号が出力されなくなる。この場合の動作は、上記第1の実施の形態におけるものと同様である。
【0084】
立ち上がり同期禁止期間設定部313において、SCL生成カウンタ303からローレベルの信号が入力されると、反転されてハイレベルの信号がAND回路AN21の一方の入力端子に入力される。
【0085】
フリップフロップF/F21〜F23に転送クロックが入力され、初段のフリップフロップF/F21に入力されたハイレベルの出力が順次転送されていく。この初段のフリップフロップF/F21から最終段のフリップフロップF/F23に到達するまでの転送時間がSCL立ち上がり同期禁止期間に対応するように、フリップフロップの段数が設定されている。
【0086】
AND回路AN21の一方の入力端子にSCL生成カウンタ303からハイレベルの信号が入力された時点では、他方の入力端子にはフリップフロップF/F23のローレベルの出力が反転されてハイレベルの信号が入力されるので、AND回路AN21からはハイレベルが出力される。これがAND回路AN22の他方の入力端子に入力され、AND回路22からはハイレベルの立ち上がり同期禁止信号が出力される。立ち上がり同期禁止期間設定部313において、SCL同期禁止期間が経過すると、フリップフロップF/F23からハイレベルの信号が出力され、AND回路AN21にローレベルとして入力されるので、AND回路AN21からはローレベルが出力され、AND回路AN22の他方の入力端子に入力される。この結果、AND回路AN22からは論理「1」の立ち上がり同期禁止信号は出力されなくなる。
【0087】
SCL同期回路309のOR回路OR11の一方の入力端子に論理「1」の立ち上がり同期禁止信号が与えられている期間中は、SCL同期回路309からカウント待ち信号が出力されて、SCL生成カウンタ303は同期動作を行うことなく強制的にカウント動作を待機した状態になる。
【0088】
立ち上がり同期禁止期間が経過し、SCL同期回路309のOR回路OR11の一方の端子に論理「1」の立ち上がり同期禁止信号が与えられなくなると、SCL立ち上がり同期機能がオンした状態となる。SCL立ち上がり/立ち下がり同期期間検出回路310から論理「1」の立ち上がり同期信号が出力されている間、OR回路OR11の一方の入力端子に入力され、カウント待ち信号が出力される。SCL立ち上がり/立ち下がり同期期間検出回路310から論理「1」の立ち上がり同期信号が出力されなくなると、OR回路OR11からはカウント待ち信号が出力されなくなる。これにより、SCL生成カウンタ303において立ち上がり期間のカウント動作が開始される。
【0089】
SCL生成カウンタ303において、ハイレベルの期間Thighのカウントが始まり、ローレベルの信号が出力されて出力トランジスタ306の出力端子はハイレベルになる。ハイレベルの期間Thighのカウントが終了すると、SCL生成カウンタ303からハイレベルが出力されて、出力トランジスタ306の出力端子はローレベルに立ち下がる。
【0090】
SCL立ち下がりに関しては、上記第1の実施の形態と同様に、SCL配線に負荷容量による波形のなまりは影響せず、クロックレートの低下を招くことがないので、従来通りに同期を行う。
【0091】
即ち、SCLサンプル回路308は、SCL配線の信号レベルがローレベルに立ち下がると、クロックCLKに同期して保持し、ローレベルの信号を出力する。SCL立ち上がり/立ち下がり同期期間検出回路310は、SCL生成カウンタ303の出力がローレベル(自己のクロックがハイレベル)を維持しローレベルに立ち下がっていないが、SCLサンプル回路308の出力がローレベルになると、SCL立ち下がり同期期間信号をSCL同期回路309に出力する。
【0092】
SCL同期回路309は、SCL立ち下がり同期期間信号を与えられるとカウンタクリア信号をSCL生成カウンタ303に与える。SCL生成カウンタ303は、カウンタクリア信号を与えられるまではハイレベルの期間Thighのカウントを行っていたが、カウンタクリア信号を与えられるとこのカウントを停止し、ローレベルの期間Tlowのカウントを開始する。
【0093】
本実施の形態に従いSCLの立ち上がり同期を、所定時間、即ちSCL立ち上がり同期禁止期間だけオフにした場合におけるハイレベルの期間Thighとローレベルの期間Tlowのカウント数について、図5を用いて説明する。ここで、SCL立ち上がり同期をオフにする期間は、立ち上がり時間の最大規格TrSであるとする。また、立ち下がり時間の最大規格をTfとする。
【0094】
SCL波形がハイレベルの期間Thighのカウント数は、
ハイレベルの期間Thighのカウント数≧Thigh幅の最小規格 (3)
とする。
【0095】
SCL波形がローレベルの期間Tlowのカウント数は、
(Tlowのカウント数−Tf)≧Tlow幅の最小規格 (4)
とする。
【0096】
第2の実施の形態において、クロック転送システムが実際にはシングルマスタ状態で動作している場合におけるハイレベルの期間Thighとローレベルの期間Tlowについて図6を用いて説明する。
【0097】
例えば、SCL配線のクロックを高速モードの400kHz(周期2500ns)とする。この場合のTrの最大規格は300ns、Tfの最大規格は300ns、Tlowの最小規格は1300ns、Thighの最小規格は600nsである。
【0098】
上記(3)式より、Thighのカウント数≧600から、Thighのカウント数は600nsとして設定する。
【0099】
また上記(4)式より、(Tlowのカウント数−300)≧1300から、Tlowのカウント数は1600nsとして設定する。
【0100】
SCL配線のクロックを低速モードの100kHz(周期10000ns)とした場合は、Trの最大規格は1000ns、Tfの最大規格は300ns、Tlowの最小規格は4700ns、Thighの最小規格は4000nsである。
【0101】
上記(3)式より、Thighのカウント数≧4000から、Thighのカウント数は4000nsとして設定する。
【0102】
また上記(4)式より、(Tlowのカウント数−300)≧4700から、Tlowのカウント数は5000nsとして設定する。
【0103】
このように、マルチマスタとして構成されたクロック転送システムにおいて、実際にはシングルマスタ状態で動作している期間では、所定期間のみSCL立ち上がり同期禁止としたことにより、本来のクロックレート(周波数400kHz、周期2500ns)を低下させることなくクロックを転送することができる。
【0104】
次に、第2の実施の形態において、クロック転送システムがマルチマスタ状態で動作している場合におけるハイレベルの期間Thighとローレベルの期間Tlowについて、図7〜図10を用いて説明する。この場合は、シングルマスタとして動作している状態とは異なり、場合によってはクロックレートは低下するが、所定の禁止期間を経過した後SCL立ち上がり同期を行うことで、マルチマスタとして支障なく動作することが可能である。
【0105】
ここでは、SCL配線のクロックを高速モードの400kHz(周期2500ns)とし、Trの最大規格は300ns、Tfの最大規格は300ns、Tlowの最小規格は1300ns、Thighの最小規格は600nsとする。
【0106】
(a) 本装置が出力するクロックと他の装置が出力するクロックとの間で、SCL周波数、ハイレベルの期間Thigh、ローレベルの期間Tlowが全て同じで、自己のクロックが他のデバイスのクロックより先に立ち上がる場合
クロックレートの低下を招くことなく同期を取るための条件は、本装置が出力するクロックと他の装置が出力するクロックとが同一周波数で、かつSCL配線のクロックの立ち上がりに要する時間が最大規格300ns以下の範囲内に収まる場合である。
【0107】
図7に示されたように、時点aでSCL(本装置)がローレベルになり、SCL配線はローレベルになる。SCL(他の装置)は立ち下がり同期の原理に従い、ハイレベルの期間Thighのカウントを中止し、この時点aからローレベルの期間Tlowのカウントを開始する。
【0108】
時点aで同期したSCL(他の装置)は、図7のSCL(他の装置:時点aで同期後)の様にTlow=1600ns、Thigh=900nsのカウントを行おうとする。
【0109】
SCL(本装置)、SCL(他の装置)はともに時点cでローレベルの期間Tlowカウント1600nsを終了する。
【0110】
時点cからSCL(他の装置)はハイレベルの期間Thigh900nsのカウントを開始する。SCL(本装置)は時点cから時点e経過後、時点eからハイレベルの期間Thighカウント600nsを開始する。
【0111】
結果、時点fでSCL(本装置)、SCL(他の装置)はともにハイレベルの期間Thighのカウントを終了する。
【0112】
仮に、SCL配線が負荷容量の影響でなまった場合(なまりの最大規格は300ns)であっても、時点cから時点eの300ns以内に納まりクロックレートが低下すること無く、同期を実現することができる。
【0113】
(b) 本装置が出力するクロックと他の装置が出力するクロックとの間で、SCL周波数、ハイレベルの期間Thigh、ローレベルの期間Tlowが全て同じで、他の装置のクロックが先に立ち上がる場合
時点aでSCL(本装置)がローレベルになり、SCL配線はローレベルになる。SCL(他の装置)は立ち下がり同期の原理に従い、ハイレベルの期間Thighのカウントを中止し、ローレベルの期間Tlowのカウントを開始する。
【0114】
時点aで同期したSCL(他の装置)は、SCL(他の装置:時点aで同期後)の様に、Tlow=1700ns、Thigh=800nsのカウントを行おうとするので、以降(他の装置)は、SCL(他の装置:時点aで同期後)で考える。
【0115】
SCL(本装置)は、時点aから時点cまで1600nsの期間ローレベルを出力する。SCL(他の装置)は、時点aから時点dまで1700nsの期間ローレベルを出力する。この結果、SCL配線は1700nsの期間ローレベルとなり、SCL(本装置)は自己のクロックが他のデバイスのクロックより先に立ち上がる場合となる。従来回路であればTrSの期間も同期期間であったが、同期禁止期間となり、SCL(本装置)は時点fより600nsのカウントを開始する。SCL(他の装置)は、時点dから800nsのカウントを開始し、最終的にどちらも時点hでハイレベルの期間Thighのカウントを終了する。
【0116】
この場合は、サイクルTcycが2500nsを維持し、クロックレートの低下を招くことなく同期が実現される。
【0117】
ここで、SCL配線が時点dから負荷容量の影響で急峻に立ち上がることができず、破線の様に、時点dから300ns、即ち時点fからさらに100ns経過した時点gまで立ち上がりに時間を要した場合を考える。この場合、時点fから時点gの期間、本装置はハイレベル期間Thighのカウント待ち状態となり、時点gから600ns経過するまでカウントする。この結果Tcycは2600nsとなり、クロックレートが低下するが、同期動作は支障なく実現することができる。この時、他の装置も時点gから800nsのカウントを開始するが、本装置が600nsでSCL配線をローレベルにする為、その時点でハイレベルの期間Thighのカウントを中止し、ローレベルの出力になる。
【0118】
(c) 本装置が出力するクロックと他の装置が出力するクロックとの間で、周波数は同一(400kHz、周期2500ns)であり、ハイレベルの期間Thigh、ローレベルの期間Tlowが異なる場合
他の装置に関しては、図8で説明した様に、時点aで立ち下がりの同期が完了したものとする。自己のクロックより、他の装置のクロックが先に立ち上がる場合は、SCL(他の装置)が時点bから時点cまでの期間、立ち上がり同期の原理に従い、ハイレベルの期間Thighのカウント待ちとなる。
【0119】
この場合、クロックレートは下がらず、また同期も支障なく行われる。
【0120】
(d) 本装置が出力するクロックと他の装置が出力するクロックとの間で、SCL周波数が異なる(他の装置が250kHz、周期4000ns)場合
SCL(本装置)は、時点cから時点dまでが、ハイレベルの期間Thighのカウント待ちとなり、時点dからハイレベルの期間Thighのカウント600nsを開始する。その結果、SCL(本装置)がローレベルに下がるのは時点fとなり、SCL配線がローレベルになる。SCL(他の装置)は、時点fでハイレベルの期間Thighのカウントを中止し、ローレベルの期間Tlowのカウントを開始する。
【0121】
この場合、クロックレートが低下するが、同期動作は支障なく実現することができる。
【0122】
上述したように、第2の実施の形態によれば、マルチマスタで構成されたクロック転送システムにおいて、単一のデバイスのみがクロックを出力しシングルマスタ状態で動作している間は、所定期間SCL立ち上がり同期を禁止することでクロックレートの低下を防止し、マルチマスタ状態で動作する間は所定期間SCL立ち上がり同期を禁止した後同期することで、クロックレートの低下が生じる場合もあるが、マルチマスタとしても支障なく同期を実現し動作可能とすることができる。
【0123】
上述した実施の形態は一例であり、本発明を限定するものではなく、特許請求の範囲内において様々に変形することが可能である。例えば、上記実施の形態における周波数やハイレベル、ローレベルの期間、またカウント待ち時間の数値はいずれも一例に過ぎない。
【0124】
【発明の効果】
以上説明したように、本発明のクロック配線駆動回路は、シングルマスタで動作するクロック転送システムでは、クロック立ち上がり同期をオフすることで、クロック配線に負荷容量が存在する場合にもクロックレートの低下を防止し、高速送受信を実現することが可能である。
【0125】
あるいは、本発明のクロック配線駆動回路は、マルチマスタで構成されたクロック転送システムにおいても、クロック立ち上がり同期をオフし所定期間ハイレベルの期間のカウント動作を強制的に待機させ、その後同期を行ってカウントを開始することで、マルチマスタ構成であっても実際にはシングルマスタで動作している状態では、クロック配線に負荷容量が存在する場合にもクロックレートの低下を防止し、マルチマスタで動作している状態では支障なく同期動作を行うことができる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態によるクロック配線駆動回路の構成を示したブロック図。
【図2】上記第1の実施の形態によるクロック配線駆動回路の構成をより具体化した回路構成を示したブロック図。
【図3】図1、図2に示されたクロック配線駆動回路におけるハイレベル期間、ローレベル期間のカウントについて示したタイムチャート。
【図4】本発明の第2の実施の形態によるクロック配線駆動回路の構成を示したブロック図。
【図5】上記第2の実施の形態によるクロック配線駆動回路におけるクロックレートを示したタイムチャート。
【図6】上記第2の実施の形態によるクロック配線駆動回路において、シングルマスタとして動作するシステムにおいて、SCL配線に負荷容量が存在する場合のクロックレートを示したタイムチャート。
【図7】上記第2の実施の形態によるクロック配線駆動回路において、マルチマスタとして動作するシステムにおいて、本装置の出力クロックと他の装置の出力クロックのSCL周波数、ハイレベルの期間、ローレベルの期間が全て同じで、本装置のクロックが他の装置のクロックより先に立ち上がる場合のクロックレートを示したタイムチャート。
【図8】上記第2の実施の形態によるクロック配線駆動回路において、マルチマスタとして動作するシステムにおいて、本装置の出力クロックと他の装置の出力クロックのSCL周波数、ハイレベルの期間、ローレベルの期間が全て同じで、本装置のクロックより他の装置のクロックが先に立ち上がる場合のクロックレートを示したタイムチャート。
【図9】上記第2の実施の形態によるクロック配線駆動回路において、マルチマスタとして動作するシステムにおいて、本装置の出力クロックと他の装置の出力クロックのSCL周波数が同一で、ハイレベルの期間、ローレベルの期間が異なる場合のクロックレートを示したタイムチャート。
【図10】上記第2の実施の形態によるクロック配線駆動回路において、マルチマスタとして動作するシステムにおいて、本装置の出力クロックと他の装置の出力クロックのSCL周波数が異なる場合のクロックレートを示したタイムチャート。
【図11】シングルマスタとして構成されたクロック転送システムの構成を示したブロック図。
【図12】シングルマスタとして構成されたクロック転送システムにおいて負荷容量が存在する場合の構成を示したブロック図。
【図13】マルチマスタとして構成されたクロック転送システムの構成を示したブロック図。
【図14】I2CBUSのクロック同期方式を説明するタイムチャート。
【図15】従来のクロック配線駆動回路の構成を示したブロック図。
【図16】配線負荷容量が存在しない場合のクロックの波形を示したタイムチャート。
【図17】配線負荷容量が存在する場合のクロックの波形とこの場合の問題を示したタイムチャート。
【符号の説明】
200、300 MCU
201、301 CPU
202、302 I2CBUS制御回路
203、303 SCL生成カウンタ
204、304 SCL周波数設定レジスタ
205、305 SCLドライバ
206、306 出力トランジスタ
207、307 バッファ
208、308 SCLサンプル回路
209、309 SCL同期回路
210、310 SCL立ち上がり/立ち下がり同期期間検出回路
211、311 プルアップ抵抗
212、312 SCL同期オン/オフ設定レジスタ
313 立ち上がり同期禁止期間設定部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a clock wiring driving circuit, and more particularly to a clock control system suitable for a clock control system using an I2CBUS protocol.
[0002]
[Prior art]
FIG. 11 shows a clock control system composed of a single master. One microcomputer unit (hereinafter referred to as MCU) 10 that supplies a clock used for synchronization of data transmission / reception as a master and a plurality of devices 20A, 20B, and 20C corresponding to slaves are serial clock lines (hereinafter referred to as SCL). It is connected to wiring and serial data (hereinafter referred to as SDA) wiring.
[0003]
Even in such a system composed of a single master, as shown in FIG. 12, when the wiring length of the SCL wiring and SDA wiring is long, the load capacitance C1 is between the SCL wiring, SDA wiring and the ground terminal. , C2 are parasitic, and pull-up resistors PR1 and PR2 must be connected between the SCL wiring and SDA wiring and the power supply voltage VDD terminal, and the transmission / reception clock rate may be lower than the set original clock rate. is there.
[0004]
In a system that requires high-speed transmission / reception, there has been a problem that the transfer rate of the clock decreases due to the load capacity of the SCL wiring, the pull-up resistance, and the like.
[0005]
Such a phenomenon is caused by the fact that the clock synchronization function corresponding to the clock control system configured by the multi-master in the I2CBUS protocol works similarly in the system configured by the single master.
[0006]
FIG. 13 shows a clock control system composed of multi-masters. In this system, not only the MCU 30 but also a device 40D exists as a master that supplies a clock, and is connected to a plurality of devices 40A, 40B, and 40C corresponding to slaves and SCL wirings and SDA wirings.
[0007]
A method of synchronizing clocks using the I2CBUS protocol will be described with reference to FIG.
[0008]
Here, it is assumed that two masters A and B supply a clock.
[0009]
(A) When the clock output of master B synchronizes the falling edge of the SCL wiring and the timing
At point a, when viewed from the master B, when the clock output of the other master A is pulled low at an earlier timing than its own clock output, the SCL wiring is affected by the influence of the clock output of the master A as early as possible. Pull to low. The master B detects the falling of the SCL wiring to low, clears the count of the high level period that has been performed so far, and starts counting of the low level period.
[0010]
(B) When the clock output of the master A synchronizes the rise of the SCL wiring and the timing
At point b, as viewed from the master A, the low level period ends and rises to a high level and an attempt is made to start counting the high level period, but the clock output of the other master B is still at the low level. If maintained, the SCL wiring is maintained at the low level due to the influence of the master B that is pulled low. In this case, the master A waits without starting counting the high level period from the time point b, and is set as a waiting time. Then, when the point C is reached, the low period of the master B ends and rises to a high level. When the SCL wiring rises due to this influence, the master A detects the high level of the SCL wiring. Start counting the period.
[0011]
FIG. 15 shows a circuit configuration of the MCU 100 that operates as a conventional clock wiring driving circuit (here, equivalent to the master A).
[0012]
The MCU 100 includes a CPU 101 and an I2CBUS control circuit 102. The I2CBUS control circuit 102 includes an SCL generation counter 103, an SCL frequency setting register 104, an SCL driver 105, an output transistor 106 including an N-channel transistor, a buffer 107, and an SCL sample. A circuit 108, an SCL synchronization circuit 109, and an SCL rising / falling synchronization period detection circuit 110.
[0013]
The output terminal of the output transistor 106 is connected to an SCL wiring provided outside the MCU 100. A pull-up resistor 111 is connected between the SCL wiring and the power supply voltage VDD terminal.
[0014]
The SCL frequency is determined by a program executed by the CPU 101 and written to the SCL frequency setting register 104. The count number is given to the SCL generation counter 103 according to the set frequency.
[0015]
The counter clock CLK is input to the SCL generation counter 103, and its output is input to the gate of the output transistor 106 via the SCL driver 105. When the output of the SCL generation counter 103 is at a high level, the output transistor 106 is turned on to lower the SCL wiring to a low level. When the output becomes a low level, the output transistor 106 is turned off and the pull-up resistor 111 causes the SCL wiring to rise to a high level. . The output of the SCL generation counter 103 is input to the SCL rising / falling synchronization period detection circuit 110.
[0016]
Here, the own clock output from the MCU 100, that is, the clock corresponding to the clock of the master A in FIG. 14, is the level of the output terminal of the output transistor 106 (the drain terminal of the N-channel transistor).
[0017]
First, rising synchronization is performed as follows. The signal level of the SCL wiring is input to the SCL sample circuit 108 to which the clock CLK is input via the buffer 107 for monitoring, the signal level of the SCL wiring is held in synchronization with the clock CLK, and the SCL rising / falling synchronization is performed. Input to the period detection circuit 110. Accordingly, when the signal level of the SCL wiring rises to a high level, the SCL sample circuit 108 holds this in synchronization with the clock CLK and outputs a high level signal.
[0018]
The SCL rising / falling synchronization period detection circuit 110 detects a period in which SCL rising synchronization should be performed. That is, the output of the SCL generation counter 103 is low level and its own clock is high level output, but this period is the SCL rising synchronization period while the output of the SCL sample circuit 108 is still maintaining low level. As a result, an SCL rising synchronization period signal which becomes the period logic “1” (hereinafter, logic “1” corresponds to the high level) is output to the SCL synchronization circuit 109. This SCL rising-synchronization period signal indicates that when the SCL rising-synchronization ends, that is, when the output of the SCL generation counter 103 is at a low level and its own clock becomes a high-level output, and the output of the SCL sample circuit 108 that monitors the SCL wiring is high. When it reaches the level, it will not be output.
[0019]
The SCL synchronization circuit 109 outputs a counter wait signal while the SCL rising synchronization period signal is given. As a result, the SCL generation counter 103 waits without starting to count the high level period Thigh. When the SCL rising synchronization period signal of logic “1” is not given, the SCL synchronization circuit 109 stops outputting the counter wait signal. As a result, the SCL generation counter 103 starts counting during the high level period Thigh. During this time, the SCL generation counter 103 maintains a low level output, and its own clock maintains a high level output. When the count value reaches the set value, the SCL generation counter 103 sets its output to the high level, and its own clock falls to the low level. At the same time, the counting of the low level period Tlow is started.
[0020]
Falling synchronization is performed as follows. When the signal level of the SCL wiring falls to a low level, the SCL sample circuit 108 holds and outputs a low level signal in synchronization with the clock CLK. The SCL rising / falling synchronization period detection circuit 110 detects a period during which SCL falling synchronization is to be performed, and outputs an SCL falling synchronization period signal during that period. That is, the output of the SCL generation counter 103 is low level and the clock of its own is maintained at high level and has not yet fallen to low level, but when the output of the SCL sample circuit 108 that monitors the SCL wiring becomes low level. , The SCL falling synchronization period signal is output to the SCL synchronization circuit 109. This SCL falling synchronization period signal is not output immediately when the output of the SCL generation counter 103 becomes high level and its own clock falls to low level.
[0021]
The SCL synchronization circuit 109 gives a counter clear signal to the SCL generation counter 103 when the SCL falling synchronization period signal is given. The SCL generation counter 103 counts the high level period Thigh until the counter clear signal is given. However, when the counter clear signal is given, the SCL generation counter 103 stops the count and starts counting the low level period Tlow. .
[0022]
The following documents disclose related prior art.
[0023]
[Patent Document 1]
Special table 2002-508645 gazette
[Patent Document 2]
U.S. Pat. No. 4,689,740
[0024]
[Problems to be solved by the invention]
The reason why the clock rate is lowered when the conventional clock wiring driving circuit is used in a clock transfer system operating as a single master will be described below.
[0025]
As described above, even when the clock wiring drive circuit is used in a clock transfer system that operates as a single master, the clock synchronization function based on the I2CBUS protocol is premised on a clock transfer system having a multi-master configuration. The clock synchronization method is designed on the assumption that there is no parasitic capacitance in the SCL wiring during the high period of the SCL wiring and the low period of the SCL. When the capacitance parasitic on the wiring is unloaded, the waveform of the SCL wiring rises steeply as shown in FIG. Therefore, the cycle Tcyc, which is the sum of the low level period Tlow from the time point a to b and the high level period Thigh from the time point b to c, is equal to the count number of the low level period Tlow and the high level period Thigh. It corresponds to the sum of the count number.
[0026]
However, if there is a round when the waveform of the SCL wiring rises as shown in FIG. 17, the own clock rises at the time point b, and the SCL wiring starts to rise, and reaches a high level at the time point c. SCL rise waiting time (count waiting time of high level period Thigh) occurs before it is considered that the clock rate is lowered. That is, the cycle Tcyc does not coincide with the sum of the count number of the low level period Tlow from the time point a to b and the count number of the high level period Thigh from the time point c to d, and further from the time point b. It becomes longer by the count waiting time of the high level period Thigh up to c.
[0027]
For example, when the set SCL frequency is 400 KHz (2500 [ns]) and 300 [ns] rounding occurs as the rise waiting time of the SCL wiring, the start of counting of the high level period high of the SCL wiring waits 300 [ns]. The actual frequency is 357 KHz (2500 + 300 [ns]).
[0028]
As described above, since the load capacity existing in the SCL wiring has not been considered in the past, in the clock transfer system operating as a single master, the clock synchronization function in the clock transfer system of the multi-master configuration acts, so that transmission / reception can be performed. There was a problem that the clock rate decreased.
[0029]
The same applies to the clock transfer system having a multi-master configuration. That is, even in a multi-master clock transfer system, there is a period in which a plurality of devices do not always output a clock, but only a single device outputs a clock as a master. Similarly, during the period of operation in the single master state, there is a problem that the clock synchronization function operates similarly and the transmission / reception clock rate decreases.
[0030]
In view of the above circumstances, an object of the present invention is to provide a clock wiring driving circuit capable of preventing a decrease in transmission / reception clock rate and realizing high-speed transmission / reception even when load capacitance exists in the wiring.
[0031]
[Means for Solving the Problems]
The clock wiring driving circuit of the present invention is
A rising synchronization on / off setting register that outputs a rising synchronization prohibition signal when rising synchronization is turned on or off with respect to the clock wiring and the rising synchronization off is set;
A clock for counting a rising period and a falling period of the clock, outputting a high level clock while counting the rising period, and outputting a low level clock while counting the falling period A clock generation counter that outputs an output signal;
An output terminal connected to the clock wiring, and an output section for driving the clock wiring given the clock output signal;
A sample circuit that holds and outputs the level of the clock wiring;
Using the output of the sample circuit and the output of the clock generation counter, from the point in time when the output terminal of the output unit rises to a high level and the clock wiring maintains a low level, the clock wiring then goes to a high level. A synchronization period detection circuit that outputs a rising synchronization period signal until the time of rising to
When the synchronization on / off setting register does not output the rising synchronization prohibition signal, a count wait signal is supplied to the clock generation counter while the rising synchronization period signal is applied, and the rising period of the clock is counted. When the synchronization on / off setting register outputs the rising synchronization prohibition signal, the count generation signal is not supplied to the clock generation counter regardless of the rising synchronization period signal, and the clock rising period A synchronization circuit that does not wait for the count;
And this
When rising synchronization off is set, a clock is output without synchronizing between the clock wiring and the level of the output terminal of the output unit.
[0032]
Here, the synchronization period detection circuit uses the output of the sample circuit and the output of the clock generation counter to maintain the output terminal of the output unit at a high level but the clock wiring to a low level. From the time when the output terminal falls to the time when the output terminal subsequently falls to a low level, a clock falling synchronization period signal is output,
The synchronization circuit provides a count clear signal to the clock generation counter when receiving the clock falling synchronization period signal regardless of whether or not the synchronization on / off setting register outputs the rising synchronization inhibition signal. And clear the count of the rising period of the clock,
Accordingly, the clock generation counter may be configured to output the clock output signal for outputting a low level clock when the count clear signal is given.
[0033]
The synchronization circuit includes a logic circuit to which the rising synchronization inhibition signal output from the synchronization on / off setting register and the rising synchronization period signal output from the synchronization period detection circuit are provided, and the logic circuit The count wait signal can be output while the rising synchronization inhibition signal is not input and the rising synchronization period signal is input.
[0034]
The clock wiring driving circuit of the present invention is
A rising synchronization on / off setting register that outputs a rising synchronization prohibition signal when rising synchronization is turned on or off with respect to the clock wiring and the rising synchronization off is set;
A clock for counting a rising period and a falling period of the clock, outputting a high level clock while counting the rising period, and outputting a low level clock while counting the falling period A clock generation counter that outputs an output signal;
An output terminal connected to the clock wiring, and an output section for driving the clock wiring given the clock output signal;
A rising synchronization inhibition period for outputting a rising synchronization inhibition period signal from when the clock output signal for outputting a high level clock is output from the clock generation counter until a predetermined rising synchronization inhibition period elapses A setting section;
A sample circuit that holds and outputs the level of the clock wiring;
Using the output of the sample circuit and the output of the clock generation counter, from the point in time when the output terminal of the output unit rises to a high level and the clock wiring maintains a low level, the clock wiring then goes to a high level. A synchronization period detection circuit that outputs a rising synchronization period signal until the time of rising to
When the synchronization on / off setting register outputs the rising synchronization inhibition signal, the rising synchronization inhibition signal is output while the rising synchronization inhibition period setting unit outputs the rising synchronization inhibition period signal. A signal output unit;
When the rising synchronization inhibition signal output unit does not output the rising synchronization inhibition signal, a count waiting signal is given to the clock generation counter while the clock rising synchronization period signal is given, and the rising period of the clock is increased. While waiting for counting, while the rising synchronization inhibition signal output unit outputs the rising synchronization inhibition signal, the count waiting signal is provided to the clock generation counter regardless of the clock rising synchronization period signal, and the clock generation counter A synchronization circuit that forcibly waits for the rising period count;
With this
When rise synchronization off is set, the rise period is forcibly counted without synchronization between the clock wiring and the level of the output terminal of the output unit until the rise synchronization inhibition period elapses. And after the rising synchronization prohibition period elapses, synchronization is established between the clock wiring and the level of the output terminal of the output unit.
[0035]
Here, the synchronization period detection circuit uses the output of the sample circuit and the output of the clock generation counter to maintain the output terminal of the output unit at a high level but the clock wiring to a low level. From the time when the output terminal falls to the time when the output terminal subsequently falls to a low level, a clock falling synchronization period signal is output,
The synchronization circuit provides a count clear signal to the clock generation counter when receiving the clock falling synchronization period signal regardless of whether the rising synchronization inhibition signal output unit outputs the rising synchronization inhibition signal or not. And clear the count of the rising period of the clock,
Accordingly, the clock generation counter may be configured to output the clock output signal for outputting a low level clock when the count clear signal is given.
[0036]
The rising synchronization prohibition period setting unit is
A plurality of flip-flops connected in series, sequentially transferring and outputting the clock output signal output from the clock generation counter at a predetermined timing;
The clock for receiving the clock output signal output from the clock generation counter and the clock output signal output after being transferred by the flip-flop and outputting a high level clock from the clock generation counter A first logic circuit that outputs the rising synchronization inhibition period signal from when an output signal is output until the rising synchronization inhibition period elapses;
The synchronization circuit includes:
A second logic circuit that is provided with the rising synchronization inhibition signal output from the rising synchronization inhibition signal output unit and the rising synchronization period signal output from the synchronization period detection circuit;
The second logic circuit outputs the count wait signal while the rising synchronization inhibition signal is input or while the rising synchronization inhibition signal is not input and the rising synchronization period signal is input. It can also be configured.
[0037]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0038]
(1) First embodiment
First, the clock wiring driving circuit according to the first embodiment of the present invention will be described.
[0039]
This embodiment stops the clock rise synchronization function when used in a clock transfer system configured as a single master, and when used in a clock transfer system configured with a multi-master, the clock is the same as in the prior art. Rise synchronization. The clock falling synchronization is performed in any system as in the conventional case.
[0040]
As a clock wiring control circuit according to this embodiment, the configuration of an MCU 200 is shown in FIG.
[0041]
The MCU 200 includes a CPU 201 and an I2CBUS control circuit 202. The I2CBUS control circuit 202 includes an SCL generation counter 203, an SCL frequency setting register 204, an SCL driver 205, an output transistor 206, a buffer 207, an SCL sample circuit 208, and an SCL synchronization circuit 209. SCL rising / falling synchronization period detection circuit 210 and SCL synchronization on / off setting register 212.
[0042]
The output terminal of the output transistor 206 is connected to the SCL wiring provided outside the MCU 200. The level of the output clock of the MCU 200 corresponds to the level of the output terminal of the output transistor 206. A pull-up resistor 211 is connected between the SCL wiring and the power supply voltage VDD terminal.
[0043]
First, on / off of the SCL rising synchronization function is determined by a program command executed by the CPU 201. In order to turn off the SCL rising synchronization function, an off command is given to the SCL synchronization on / off setting register 212 and set. From the SCL synchronization on / off setting register 212, a rising synchronization inhibition signal of logic “1” is given to the SCL synchronization circuit 209. As a result, the count waiting signal is not output from the SCL synchronization circuit 209, and the SCL generation counter 203 performs a count operation without synchronization based on the counter clock CLK. The SCL frequency is determined by a program executed by the CPU 201 and written to the SCL frequency setting register 204. In accordance with the set frequency, the count number is given to the SCL generation counter 203, and the count operation is performed.
[0044]
When the SCL rising synchronization function is turned on by a program instruction executed by the CPU 201, the on instruction is given to the SCL synchronization on / off setting register 212 and set. The rising synchronization inhibition signal is not output from the SCL synchronization on / off setting register 212 to the SCL synchronization circuit 209. As a result, the SCL synchronization circuit 209 outputs a count wait signal. The operation in this case is the same as the operation described with reference to FIG.
[0045]
The counter clock CLK is input to the SCL generation counter 203, and the output is input to the gate of the output transistor 206 via the SCL driver 205. When the counter clock CLK becomes low level, the counter clock CLK is turned off and the output terminal of the output transistor 206 rises to high level.
[0046]
The output of the SCL generation counter 203 is input to the SCL rising / falling synchronization period detection circuit 210.
[0047]
Further, the signal level of the SCL wiring is input to the SCL sample circuit 208 to which the clock CLK is input via the buffer 207 and is held in synchronization with the clock CLK, and the output is supplied to the SCL rising / falling synchronization period detection circuit 210. Entered.
[0048]
When the signal level of the SCL wiring rises to a high level, the SCL sample circuit 208 holds the signal in synchronization with the clock CLK and outputs a high level signal. The SCL rising / falling synchronization period detection circuit 210 has an SCL rising synchronization period while the output of the SCL generation counter 203 is at a low level (its own clock output is at a high level) and the output of the SCL sample circuit 208 is at a low level. The signal is output to the SCL synchronization circuit 209.
[0049]
The SCL synchronization circuit 209 outputs a count wait signal while receiving the SCL rising synchronization period signal. As a result, the SCL generation counter 203 waits without starting to count the high level period Thigh. When the SCL synchronization circuit 209 is not given the SCL rising synchronization period signal, it stops outputting the counter wait signal. As a result, the SCL generation counter 203 starts counting during the high level period Thigh and maintains the high level output until the count value reaches the set value.
[0050]
As for the SCL falling, the rounding of the waveform due to the load capacitance is not affected on the SCL wiring, and the clock rate is not lowered, so that the synchronization is performed in the conventional manner.
[0051]
That is, when the signal level of the SCL wiring falls to a low level, the SCL sample circuit 208 holds the signal in synchronization with the clock CLK and outputs a low level signal. The SCL rising / falling synchronization period detection circuit 210 maintains the output of the SCL generation counter 203 at a low level (its own clock is at a high level) and does not fall to a low level, but the output of the SCL sample circuit 208 has a low level. Then, the SCL falling synchronization period signal is output to the SCL synchronization circuit 209.
[0052]
The SCL synchronization circuit 209 gives a counter clear signal to the SCL generation counter 203 when the SCL falling synchronization period signal is given. The SCL generation counter 203 counts the high level period Thigh until the counter clear signal is given. However, when the counter clear signal is given, the SCL generation counter 203 stops the count and starts counting the low level period Tlow. .
[0053]
FIG. 2 shows a more specific circuit configuration of the configuration of the clock wiring control circuit according to the first embodiment.
[0054]
The CPU 201 outputs a chip select signal CS and a write signal WR. The SCL synchronization on / off setting register 212 includes a flip-flop F / F4. When a chip select signal CS for selecting the chip and a write signal WR for turning off the SCL rising synchronization function are output from the CPU 201, the logic “1” is output. "Is output. As a result, the rise synchronization prohibition is set in the flip-flop F / F4, and the rise synchronization inhibition signal of logic “1” is output. When canceling the prohibition of the rising synchronization function, the reset signal RES is given from the CPU 201, the flip-flop F / F4 is reset, and the rising synchronization prohibition signal of logic “1” is not output.
[0055]
When the output from the SCL generation counter 203 is at a low level (its own clock is at a high level), but the output from the SCL sample circuit 208 is at a low level, the SCL rising / falling synchronization period detection circuit 210 receives a logic. A SCL rising synchronization period signal of “1” is output.
[0056]
The SCL synchronization circuit 209 has an AND circuit AN1. A logical “1” SCL rising synchronization period signal and an inverted version of the output from the SCL synchronization on / off setting register 212 are input to the AND circuit AN1. As a result, the SCL rising / falling synchronization period detection circuit 210 detects a rising synchronization period in which a high level signal is output from the SCL generation counter 203 and the signal level of the SCL wiring monitored by the SCL sample circuit 208 is still at a low level. Thus, the SCL rising synchronization period signal of logic “1” is output, the rising synchronization signal of logic “1” is not output, and the output from the SCL synchronization on / off setting register 212 is logic “0”. Only in some cases, a count wait signal of logic “1” is output and provided to the SCL generation counter 203. When a rising synchronization signal of logic “1” is output, an AND circuit is output even during a rising synchronization period in which a high level clock is output from the output terminal of the output transistor 206 and the level of the SCL wiring is still at a low level. A count wait signal of logic “1” is not output from AN1.
[0057]
The SCL generation counter 203 is connected to a plurality of stages in series for counting up, and flip-flops F / F1, F / F2,..., F / F3, and flip-flops F / F1, F, which sequentially shift the counter clock CLK. / F2,..., And a NOR circuit NR1 whose output side is connected to the reset terminal of F / F3.
[0058]
The NOR circuit NR1 outputs a logic “0” reset signal to the reset terminals of all flip-flops F / F1, F / F2,..., F / F3 during a period when the logic “1” count waiting signal is output. To reset and do not start counting. If the count wait signal of logic “1” is not output due to the rise synchronization inhibition, a reset signal of logic “0” is output from the NOR circuit NR1 to the reset terminals of the flip-flops F / F1, F / F2,. Output is stopped and the count operation is performed. When the output from the flip-flop F / F3 at the final stage, that is, the count value reaches the value set in the SCL frequency setting register 204, a logic “1” signal is input to the NOR circuit NR1, and the logic “0” The reset signal is input to the reset terminals of all the flip-flops F / F1 to F / F3, and the count operation is reset.
[0059]
With respect to the SCL falling, synchronization is performed as described above.
[0060]
When the signal level of the SCL wiring falls to a low level, the SCL sample circuit 208 holds the signal in synchronization with the clock CLK and outputs a low level signal.
[0061]
In the SCL rising / falling synchronization period detection circuit 210, the output of the SCL generation counter 203 is still kept at a low level (its own clock output is high), but the output of the SCL sample circuit 208 falls to a low level. If so, it is determined that it is the SCL falling synchronization period, and an SCL falling synchronization period signal of logic “1” is output to the SCL synchronization circuit 209.
[0062]
The SCL synchronization circuit 209 supplies the SCL falling synchronization period signal of logic “1” to the SCL generation counter 203 as a counter clear signal of logic “1”. The SCL generation counter 203 counts for a high level period Thigh until this counter clear signal is given, but when the counter clear signal is given, a signal of logic “0” is sent from the NOR circuit NR1 to the flip-flop F / Output to the reset terminals of F1, F / F2,..., F / F3, and the count operation in the high level period Thigh is reset. Thereafter, counting of the low level period Tlow is started.
[0063]
According to the first embodiment shown in FIG. 1 and the second embodiment shown in FIG. 2, the following operations and effects are achieved by prohibiting the falling edge synchronization.
[0064]
As shown in FIG. 3, the high-level period Thigh and the low-level period Tlow of the own clock output from the MCU 200 are 900 ns and 1600 ns as specified, and the SCL wiring level rises from the time point c to d. It is assumed that time is required up to the maximum standard value of 300 ns.
[0065]
The high level period Thigh and the low level period Tlow of the SCL wiring are determined as follows.
[0066]
First, assuming that the maximum rise time in the SCL wiring is Tr, the count number of the high level period Thigh is:
(Thigh count-Tr) ≧ Thigh minimum standard (1)
Set to satisfy.
[0067]
When the maximum fall time in the SCL wiring is Tf, the count number of the low level period Tlow is
(Tlow count-Tf) ≧ Tlow minimum standard (2)
Set to satisfy.
[0068]
For example, the clock of the SCL wiring is set to 400 kHz (period 2500 ns) in the high speed mode. In this case, the maximum standard of Tr is 300 ns, the maximum standard of Tf is 300 ns, the minimum standard of Tlow is 1300 ns, and the minimum standard of Thigh is 600 ns.
[0069]
From the above equation (1), from (Thigh count number−300) ≧ 600, the Thigh count number is set to 900 ns.
[0070]
Further, from the above equation (2), from (Tlow count number−300) ≧ 1300, the Tlow count number is set to 1600 ns.
[0071]
When the clock of the SCL wiring is 100 kHz (period 10000 ns) in the low speed mode, the maximum standard of Tr is 1000 ns, the maximum standard of Tf is 300 ns, the minimum standard of Tlow is 4700 ns, and the minimum standard of Thigh is 4000 ns.
[0072]
From the above equation (1), the count number of Thigh is set to 5000 ns from (Thigh count number−1000) ≧ 4000.
[0073]
Further, from the above equation (2), from (Tlow count number−300) ≧ 4700, the Tlow count number is set to 5000 ns.
[0074]
According to the first embodiment, there is no counting waiting time of the high level period Thigh generated in the conventional circuit described with reference to FIG. 17, and the clock rate is prevented from lowering.
[0075]
(2) Second embodiment
When the clock wiring drive circuit according to the first embodiment is used in a clock transfer system composed of a single master, it does not perform SCL rising synchronization at all, thereby preventing a decrease in clock rate as compared with the prior art. Can do. However, when used in a clock transfer system composed of multi-masters, it is impossible to synchronize between a plurality of clocks without performing SCL rising synchronization at all. . For this reason, in a system with a multi-master configuration, it is impossible to prevent a decrease in clock rate.
[0076]
On the other hand, this embodiment pays attention to the fact that even in a clock transfer system composed of multi-masters, there is a period in which only a single device outputs a clock and actually operates in a single master state. The SCL rise synchronization for a predetermined period is forcibly prohibited from counting the rise period, and the rise synchronization is performed after the predetermined period has elapsed, thereby preventing a decrease in the clock rate while operating in the single master state. It is characterized in that it can operate as a multi-master without any trouble by realizing a synchronous operation in the state of operating in the master state.
[0077]
As a clock wiring control circuit according to this embodiment, the configuration of the MCU 300 is shown in FIG.
[0078]
The MCU 300 includes a CPU 301 and an I2CBUS control circuit 302. The I2CBUS control circuit 302 includes an SCL generation counter 303, an SCL frequency setting register 304, an SCL driver 305, an output transistor 306, a buffer 307, an SCL sample circuit 308, and an SCL synchronization circuit 309. , An SCL rising / falling synchronization period detection circuit 310, an SCL synchronization on / off setting register 312, and a rising synchronization prohibition period setting unit 313. The rise synchronization prohibition period setting unit 313 includes an AND circuit AN21 and a plurality of flip-flops F / F21 to F / F23 connected in series.
[0079]
An output terminal of the output transistor 306 is connected to an SCL wiring provided outside the MCU 300. A pull-up resistor 311 is connected between the SCL wiring and the power supply voltage VDD terminal.
[0080]
As in the first embodiment, the output of the SCL generation counter 303 is input to the SCL rising / falling synchronization period detection circuit 310.
[0081]
The signal level of the SCL wiring is input to the SCL sample circuit 308 to which the clock CLK is input via the buffer 307, is held in synchronization with the clock CLK, and the output is input to the SCL rising / falling synchronization period detection circuit 310. Is done.
[0082]
When the signal level of the SCL wiring rises to a high level, the SCL sample circuit 308 holds the signal in synchronization with the clock CLK and outputs a high level signal. The SCL rising / falling synchronization period detection circuit 310 rises while the output of the SCL generation counter 303 is at a low level (its own clock output is high) and the output of the SCL sample circuit 308 is still at a low level. The synchronization period signal is output to the SCL synchronization circuit 309.
[0083]
The on / off state of the SCL rising synchronization function is determined by a program instruction executed by the CPU 301. In order to turn off the SCL rising synchronization function for a predetermined period, an off command is given to the SCL synchronization on / off setting register 312 and set. When a rising synchronization inhibition signal of logic “1” is output from the SCL synchronization on / off setting register 312, it is input to one input terminal of the AND circuit AN22. On the other hand, when the SCL rising synchronization function is turned on, an on command is given to the SCL synchronization on / off setting register 312 and set. The SCL synchronization on / off setting register 312 does not output the rising synchronization inhibition signal of logic “1”. The operation in this case is the same as that in the first embodiment.
[0084]
When the rising synchronization inhibition period setting unit 313 receives a low level signal from the SCL generation counter 303, it is inverted and a high level signal is input to one input terminal of the AND circuit AN21.
[0085]
The transfer clock is input to the flip-flops F / F21 to F23, and the high-level output input to the first-stage flip-flop F / F21 is sequentially transferred. The number of flip-flops is set so that the transfer time from the first flip-flop F / F21 to the final flip-flop F / F23 corresponds to the SCL rising synchronization inhibition period.
[0086]
When a high level signal is input from the SCL generation counter 303 to one input terminal of the AND circuit AN21, the low level output of the flip-flop F / F23 is inverted and the high level signal is input to the other input terminal. Since it is input, a high level is output from the AND circuit AN21. This is input to the other input terminal of the AND circuit AN22, and a high level rising synchronization inhibition signal is output from the AND circuit 22. When the SCL synchronization inhibition period elapses in the rising synchronization inhibition period setting unit 313, a high level signal is output from the flip-flop F / F23 and is input as a low level to the AND circuit AN21. Is output to the other input terminal of the AND circuit AN22. As a result, the rise synchronization inhibition signal of logic “1” is not output from the AND circuit AN22.
[0087]
During the period when the rising edge synchronization inhibition signal of logic “1” is given to one input terminal of the OR circuit OR11 of the SCL synchronization circuit 309, the SCL generation circuit 303 outputs a count wait signal from the SCL synchronization circuit 309. The count operation is forcibly waited without performing the synchronization operation.
[0088]
When the rising synchronization inhibition period elapses and the rising synchronization inhibition signal of logic “1” is not given to one terminal of the OR circuit OR11 of the SCL synchronization circuit 309, the SCL rising synchronization function is turned on. While the SCL rising / falling synchronization period detection circuit 310 is outputting a rising synchronization signal of logic “1”, it is input to one input terminal of the OR circuit OR11 and a count wait signal is output. When the rising synchronization signal of logic “1” is not output from the SCL rising / falling synchronization period detection circuit 310, the count wait signal is not output from the OR circuit OR 11. Thereby, the SCL generation counter 303 starts the counting operation of the rising period.
[0089]
In the SCL generation counter 303, counting of the high level period Thigh starts, a low level signal is output, and the output terminal of the output transistor 306 becomes high level. When the counting of the high level period Thigh ends, the SCL generation counter 303 outputs a high level, and the output terminal of the output transistor 306 falls to a low level.
[0090]
As for the SCL fall, as in the first embodiment, the SCL wiring is not affected by the rounding of the waveform due to the load capacitance, and the clock rate is not lowered.
[0091]
That is, when the signal level of the SCL wiring falls to a low level, the SCL sample circuit 308 holds the signal in synchronization with the clock CLK and outputs a low level signal. The SCL rising / falling synchronization period detection circuit 310 maintains the output of the SCL generation counter 303 at a low level (its own clock is at a high level) and does not fall to a low level, but the output of the SCL sample circuit 308 has a low level. Then, the SCL falling synchronization period signal is output to the SCL synchronization circuit 309.
[0092]
The SCL synchronization circuit 309 gives a counter clear signal to the SCL generation counter 303 when the SCL falling synchronization period signal is given. The SCL generation counter 303 counts the high level period Thigh until the counter clear signal is given. However, when the counter clear signal is given, the SCL generation counter 303 stops the count and starts counting the low level period Tlow. .
[0093]
The count numbers of the high level period Thigh and the low level period Tlow when the SCL rising synchronization is turned off for a predetermined time, that is, the SCL rising synchronization prohibition period according to the present embodiment will be described with reference to FIG. Here, it is assumed that the period during which the SCL rise synchronization is turned off is the maximum standard TrS of the rise time. Also, let Tf be the maximum fall time standard.
[0094]
The number of counts during the period Thigh when the SCL waveform is high is
Count number of high level period Thigh ≥ minimum standard of Thigh width (3)
And
[0095]
The number of counts during the period Tlow when the SCL waveform is low is:
(Tlow count-Tf) ≧ Tlow width minimum standard (4)
And
[0096]
In the second embodiment, a high level period Thigh and a low level period Tlow when the clock transfer system is actually operating in the single master state will be described with reference to FIG.
[0097]
For example, the clock of the SCL wiring is set to 400 kHz (period 2500 ns) in the high speed mode. In this case, the maximum standard of Tr is 300 ns, the maximum standard of Tf is 300 ns, the minimum standard of Tlow is 1300 ns, and the minimum standard of Thigh is 600 ns.
[0098]
From the above equation (3), since the Thigh count number ≧ 600, the Thigh count number is set to 600 ns.
[0099]
Further, from the above equation (4), from (Tlow count number−300) ≧ 1300, the Tlow count number is set to 1600 ns.
[0100]
When the clock of the SCL wiring is 100 kHz (period 10000 ns) in the low speed mode, the maximum standard of Tr is 1000 ns, the maximum standard of Tf is 300 ns, the minimum standard of Tlow is 4700 ns, and the minimum standard of Thigh is 4000 ns.
[0101]
From the above equation (3), since the Thigh count number ≧ 4000, the Thigh count number is set to 4000 ns.
[0102]
Further, from the above equation (4), from (Tlow count number−300) ≧ 4700, the Tlow count number is set to 5000 ns.
[0103]
In this way, in the clock transfer system configured as a multi-master, the SCL rising edge synchronization prohibition is prohibited only for a predetermined period in the period of operating in the single master state, so that the original clock rate (frequency 400 kHz, period The clock can be transferred without reducing 2500 ns).
[0104]
Next, in the second embodiment, a high-level period Thigh and a low-level period Tlow when the clock transfer system operates in a multi-master state will be described with reference to FIGS. In this case, unlike the case of operating as a single master, the clock rate may be reduced in some cases, but it will operate as a multi-master without any problems by performing SCL rising synchronization after a predetermined prohibition period. Is possible.
[0105]
Here, the clock of the SCL wiring is 400 kHz (period 2500 ns) in the high speed mode, the maximum standard of Tr is 300 ns, the maximum standard of Tf is 300 ns, the minimum standard of Tlow is 1300 ns, and the minimum standard of Thigh is 600 ns.
[0106]
(A) The SCL frequency, the high-level period Thigh, and the low-level period Tlow are all the same between the clock output by this apparatus and the clock output by another apparatus, and the own clock is the clock of another device. When standing up earlier
The condition for achieving synchronization without causing a decrease in the clock rate is that the clock output by this apparatus and the clock output by another apparatus have the same frequency, and the time required for the rising of the clock of the SCL wiring is 300 ns at maximum. This is the case when it falls within the following range.
[0107]
As shown in FIG. 7, at the time point a, the SCL (this device) becomes a low level, and the SCL wiring becomes a low level. The SCL (other device) stops counting the high level period Thigh in accordance with the falling-synchronization principle, and starts counting the low level period Tlow from this time point a.
[0108]
The SCL synchronized with the time point a (another device) tries to count Tlow = 1600 ns and Thigh = 900 ns as in the SCL of FIG. 7 (other device: after synchronization at the time point a).
[0109]
Both SCL (this device) and SCL (other devices) end the low level period Tlow count 1600 ns at time point c.
[0110]
From time c, the SCL (another device) starts counting for a high level period Thigh900 ns. The SCL (this device) starts a high-level period Thigh count 600 ns from the time point e after the time point e has elapsed since the time point c.
[0111]
As a result, at the time point f, both the SCL (this device) and the SCL (other devices) finish counting the high level period Thigh.
[0112]
Even if the SCL wiring is lost due to the load capacity (the maximum standard for rounding is 300 ns), synchronization can be realized without falling within 300 ns from time point c to time point e without reducing the clock rate. it can.
[0113]
(B) The SCL frequency, the high level period Thigh, and the low level period Tlow are all the same between the clock output by this apparatus and the clock output by another apparatus, and the clocks of the other apparatuses rise first. Case
At time point a, the SCL (this device) goes to a low level, and the SCL wiring goes to a low level. The SCL (another device) stops counting the high level period Thigh and starts counting the low level period Tlow according to the falling synchronization principle.
[0114]
Since the SCL synchronized with the time point a (another device) tries to count Tlow = 1700 ns and Thigh = 800 ns like the SCL (another device: after synchronization at the time point a), the following (other device) Is considered in SCL (other devices: after synchronization at time point a).
[0115]
SCL (this device) outputs a low level for a period of 1600 ns from time point a to time point c. SCL (another device) outputs a low level for a period of 1700 ns from time point a to time point d. As a result, the SCL wiring is at a low level for a period of 1700 ns, and the SCL (this device) has its own clock rising before the clocks of other devices. In the case of the conventional circuit, the TrS period is also a synchronization period, but becomes a synchronization inhibition period, and the SCL (this device) starts counting 600 ns from the time point f. The SCL (other device) starts counting 800 ns from the time point d, and finally ends the counting of the high level period Thigh at the time point h.
[0116]
In this case, the cycle Tcyc is maintained at 2500 ns, and synchronization is realized without causing a decrease in the clock rate.
[0117]
Here, when the SCL wiring cannot rise steeply from the time point d due to the influence of the load capacitance, it takes time to rise up to the time point g after 300 ns from the time point d, that is, 100 ns after the time point f, as indicated by the broken line. think of. In this case, during the period from the time point f to the time point g, the present apparatus waits for a count of the high level period Thigh and counts until 600 ns has elapsed from the time point g. As a result, Tcyc becomes 2600 ns and the clock rate is lowered, but the synchronous operation can be realized without any trouble. At this time, other devices start counting 800 ns from time point g, but since this device sets the SCL wiring to the low level at 600 ns, the high-level period Thigh is stopped at that time and the low-level output is output. become.
[0118]
(C) The frequency is the same (400 kHz, cycle 2500 ns) between the clock output by this device and the clock output by another device, and the high level period Thigh and the low level period Tlow are different.
As for the other devices, as described in FIG. 8, it is assumed that the falling synchronization is completed at the time point a. When the clock of the other device rises earlier than its own clock, the SCL (other device) waits for the count of the high level period Thigh in accordance with the rising synchronization principle during the period from the time point b to the time point c.
[0119]
In this case, the clock rate does not decrease and synchronization is performed without any trouble.
[0120]
(D) When the SCL frequency is different between the clock output from this device and the clock output from the other device (other device is 250 kHz, cycle is 4000 ns)
The SCL (this device) waits for the count of the high level period Thigh from the time point c to the time point d, and starts counting 600 ns of the high level period Thigh from the time point d. As a result, the SCL (this device) falls to the low level at time f, and the SCL wiring goes to the low level. The SCL (another device) stops counting the high level period Thigh at the time point f and starts counting the low level period Tlow.
[0121]
In this case, the clock rate is lowered, but the synchronous operation can be realized without any trouble.
[0122]
As described above, according to the second embodiment, in the clock transfer system composed of multi-masters, only a single device outputs a clock and operates in a single master state for a predetermined period SCL. Prohibiting rising synchronization prevents the clock rate from decreasing, and while operating in the multi-master state, prohibiting SCL rising synchronization for a predetermined period and then synchronizing may cause a decrease in clock rate. However, synchronization can be realized without any trouble.
[0123]
The above-described embodiment is an example, and does not limit the present invention. Various modifications can be made within the scope of the claims. For example, the frequency, the high level, the low level period, and the numerical value of the count waiting time in the above embodiment are merely examples.
[0124]
【The invention's effect】
As described above, the clock wiring drive circuit of the present invention can reduce the clock rate even when there is a load capacity in the clock wiring by turning off clock rising synchronization in a clock transfer system operating with a single master. It is possible to prevent and realize high-speed transmission / reception.
[0125]
Alternatively, the clock wiring drive circuit according to the present invention also turns off clock rising synchronization and forcibly waits for a high level period for a predetermined period, and then performs synchronization even in a clock transfer system composed of multi-masters. By starting counting, even in a multi-master configuration, when operating with a single master, even if there is a load capacity on the clock wiring, the clock rate is prevented from dropping and operating with a multi-master. In this state, the synchronous operation can be performed without any trouble.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a clock wiring driving circuit according to a first embodiment of the present invention.
FIG. 2 is a block diagram showing a more specific circuit configuration of the clock wiring driving circuit according to the first embodiment.
FIG. 3 is a time chart showing counting of a high level period and a low level period in the clock wiring driving circuit shown in FIGS. 1 and 2;
FIG. 4 is a block diagram showing a configuration of a clock wiring driving circuit according to a second embodiment of the present invention.
FIG. 5 is a time chart showing a clock rate in the clock wiring driving circuit according to the second embodiment.
FIG. 6 is a time chart showing a clock rate when a load capacitance exists in the SCL wiring in the system operating as a single master in the clock wiring driving circuit according to the second embodiment.
7 shows a clock wiring driving circuit according to the second embodiment in which the SCL frequency, the high level period, and the low level of the output clock of the present apparatus and the output clock of another apparatus in a system that operates as a multi-master. The time chart which showed the clock rate when all the periods are the same and the clock of this apparatus rises before the clock of another apparatus.
FIG. 8 is a circuit diagram of the clock wiring drive circuit according to the second embodiment. In the system operating as a multi-master, the SCL frequency of the output clock of this device and the output clock of another device, the high level period, and the low level The time chart which showed the clock rate when all the periods are the same and the clock of another apparatus rises ahead of the clock of this apparatus.
FIG. 9 shows a clock wiring driving circuit according to the second embodiment in which the SCL frequency of the output clock of the present apparatus is the same as that of the output clock of another apparatus, and the high level period, Time chart showing the clock rate when the low level period is different.
FIG. 10 shows the clock rate when the SCL frequency of the output clock of this apparatus is different from the output clock of another apparatus in the system operating as a multi-master in the clock wiring driving circuit according to the second embodiment. Time chart.
FIG. 11 is a block diagram showing a configuration of a clock transfer system configured as a single master.
FIG. 12 is a block diagram showing a configuration when a load capacity exists in a clock transfer system configured as a single master.
FIG. 13 is a block diagram showing a configuration of a clock transfer system configured as a multi-master.
FIG. 14 is a time chart for explaining a clock synchronization method of I2CBUS.
FIG. 15 is a block diagram showing a configuration of a conventional clock wiring driving circuit.
FIG. 16 is a time chart showing a clock waveform when there is no wiring load capacitance;
FIG. 17 is a time chart showing a clock waveform and a problem in this case when a wiring load capacity exists.
[Explanation of symbols]
200, 300 MCU
201, 301 CPU
202, 302 I2CBUS control circuit
203, 303 SCL generation counter
204, 304 SCL frequency setting register
205, 305 SCL driver
206,306 Output transistor
207, 307 buffer
208, 308 SCL sample circuit
209, 309 SCL synchronization circuit
210, 310 SCL rising / falling synchronization period detection circuit
211, 311 Pull-up resistor
212, 312 SCL synchronous on / off setting register
313 Rise synchronization prohibition period setting section

Claims (6)

クロック配線を駆動する回路であって、
前記クロック配線との間で立ち上がり同期のオン又はオフを設定され、立ち上がり同期オフが設定された場合、立ち上がり同期禁止信号を出力する立ち上がり同期オン/オフ設定レジスタと、
クロックの立ち上がり期間及び立ち下がり期間をそれぞれカウントし、前記立ち上がり期間をカウントしている間ハイレベルのクロックを出力させ、前記立ち下がり期間をカウントしている間ローレベルのクロックを出力させるためのクロック出力信号を出力するクロック生成カウンタと、
前記クロック配線に接続された出力端子を有し、前記クロック出力信号を与えられて前記クロック配線を駆動する出力部と、
前記クロック配線のレベルを保持し出力するサンプル回路と、
前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルに立ち上がり前記クロック配線がローレベルを維持している時点から、前記クロック配線がその後ハイレベルに立ち上がる時点までの間、立ち上がり同期期間信号を出力する同期期間検出回路と、
前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力しないときは、前記立ち上がり同期期間信号を与えられている間、カウント待ち信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントを待機させ、前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力したときは、前記立ち上がり同期期間信号にかかわらず前記カウント待ち信号を前記クロック生成カウンタに与えず、前記クロックの立ち上がり期間のカウントを待機させない同期回路と、
を備え、これにより
立ち上がり同期オフが設定された場合は、前記クロック配線と前記出力部の前記出力端子のレベルとの間で同期をとることなくクロックを出力することを特徴とするクロック配線駆動回路。
A circuit for driving a clock wiring,
A rising synchronization on / off setting register that outputs a rising synchronization prohibition signal when rising synchronization is turned on or off with respect to the clock wiring and the rising synchronization off is set;
A clock for counting a rising period and a falling period of the clock, outputting a high level clock while counting the rising period, and outputting a low level clock while counting the falling period A clock generation counter that outputs an output signal;
An output terminal connected to the clock wiring, and an output section for driving the clock wiring given the clock output signal;
A sample circuit that holds and outputs the level of the clock wiring;
Using the output of the sample circuit and the output of the clock generation counter, from the point in time when the output terminal of the output unit rises to a high level and the clock wiring maintains a low level, the clock wiring then goes to a high level. A synchronization period detection circuit that outputs a rising synchronization period signal until the time of rising to
When the synchronization on / off setting register does not output the rising synchronization prohibition signal, a count wait signal is supplied to the clock generation counter while the rising synchronization period signal is applied, and the rising period of the clock is counted. When the synchronization on / off setting register outputs the rising synchronization prohibition signal, the count generation signal is not supplied to the clock generation counter regardless of the rising synchronization period signal, and the clock rising period A synchronization circuit that does not wait for the count;
And a clock wiring driving circuit that outputs a clock without synchronization between the clock wiring and the level of the output terminal of the output section when rising synchronization off is set thereby .
前記同期期間検出回路は、前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルを維持しているが前記クロック配線がローレベルに立ち下がった時点から、前記出力端子がその後ローレベルに立ち下がる時点までの間、クロック立ち下がり同期期間信号を出力し、
前記同期回路は、前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力するか否かにかかわらず、前記クロック立ち下がり同期期間信号を与えられると、カウントクリア信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントをクリアさせ、
これにより、前記クロック生成カウンタは、前記カウントクリア信号を与えられると、ローレベルのクロックを出力させるための前記クロック出力信号を出力することを特徴とする請求項1記載のクロック配線駆動回路。
The synchronization period detection circuit uses the output of the sample circuit and the output of the clock generation counter to maintain the output terminal of the output unit at a high level, but the clock wiring falls to a low level. From the time point to the time point when the output terminal subsequently falls to a low level, a clock falling synchronization period signal is output,
The synchronization circuit provides a count clear signal to the clock generation counter when receiving the clock falling synchronization period signal regardless of whether or not the synchronization on / off setting register outputs the rising synchronization inhibition signal. And clear the count of the rising period of the clock,
2. The clock wiring drive circuit according to claim 1, wherein the clock generation counter outputs the clock output signal for outputting a low level clock when the count clear signal is given.
前記同期回路は、前記同期オン/オフ設定レジスタから出力された前記立ち上がり同期禁止信号と、前記同期期間検出回路から出力された前記立ち上がり同期期間信号とを与えられる論理回路を有し、前記論理回路は、前記立ち上がり同期禁止信号が入力されず、前記立ち上がり同期期間信号が入力されている間、前記カウント待ち信号を出力することを特徴とする請求項1又は2記載のクロック配線駆動回路。The synchronization circuit includes a logic circuit to which the rising synchronization inhibition signal output from the synchronization on / off setting register and the rising synchronization period signal output from the synchronization period detection circuit are provided, and the logic circuit 3. The clock wiring drive circuit according to claim 1, wherein the count wait signal is output while the rising synchronization prohibition signal is not input and the rising synchronization period signal is input. クロック配線を駆動する回路であって、
前記クロック配線との間で立ち上がり同期のオン又はオフを設定され、立ち上がり同期オフが設定された場合、立ち上がり同期禁止信号を出力する立ち上がり同期オン/オフ設定レジスタと、
クロックの立ち上がり期間及び立ち下がり期間をそれぞれカウントし、前記立ち上がり期間をカウントしている間ハイレベルのクロックを出力させ、前記立ち下がり期間をカウントしている間ローレベルのクロックを出力させるためのクロック出力信号を出力するクロック生成カウンタと、
前記クロック配線に接続された出力端子を有し、前記クロック出力信号を与えられて前記クロック配線を駆動する出力部と、
前記クロック生成カウンタから、ハイレベルのクロックを出力させるための前記クロック出力信号が出力されてから、所定の立ち上がり同期禁止期間が経過するまでの間、立ち上がり同期禁止期間信号を出力する立ち上がり同期禁止期間設定部と、
前記クロック配線のレベルを保持し出力するサンプル回路と、
前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルに立ち上がり前記クロック配線がローレベルを維持している時点から、前記クロック配線がその後ハイレベルに立ち上がる時点までの間、立ち上がり同期期間信号を出力する同期期間検出回路と、
前記同期オン/オフ設定レジスタが前記立ち上がり同期禁止信号を出力したときは、前記立ち上がり同期禁止期間設定部から前記立ち上がり同期禁止期間信号が出力されている間、立ち上がり同期禁止信号を出力する立ち上がり同期禁止信号出力部と、
前記立ち上がり同期禁止信号出力部が前記立ち上がり同期禁止信号を出力している間、前記立ち上がり同期期間信号の有無にかかわらず前記カウント待ち信号を前記クロック生成カウンタに与えて、立ち上がり同期動作を行わせずに前記クロックの立ち上がり期間のカウントを強制的に待機させ、前記立ち上がり同期禁止信号出力部が前記立ち上がり同期禁止信号を出力しないときは、前記クロック立ち上がり同期期間信号を与えられている間、カウント待ち信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントを待機させる同期回路と、
を備え、これにより
立ち上がり同期オフが設定された場合は、前記立ち上がり同期禁止期間が経過するまでの間、前記クロック配線と前記出力部の前記出力端子のレベルとの間で同期をとることなく立ち上がり期間のカウントを強制的に待機し、前記立ち上がり同期禁止期間が経過した後、前記クロック配線と前記出力部の前記出力端子のレベルとの間で同期をとることを特徴とするクロック配線駆動回路。
A circuit for driving a clock wiring,
A rising synchronization on / off setting register that outputs a rising synchronization prohibition signal when rising synchronization is turned on or off with respect to the clock wiring and the rising synchronization off is set;
A clock for counting a rising period and a falling period of the clock, outputting a high level clock while counting the rising period, and outputting a low level clock while counting the falling period A clock generation counter that outputs an output signal;
An output terminal connected to the clock wiring, and an output section for driving the clock wiring given the clock output signal;
A rising synchronization inhibition period for outputting a rising synchronization inhibition period signal from when the clock output signal for outputting a high level clock is output from the clock generation counter until a predetermined rising synchronization inhibition period elapses A setting section;
A sample circuit that holds and outputs the level of the clock wiring;
Using the output of the sample circuit and the output of the clock generation counter, from the point in time when the output terminal of the output unit rises to a high level and the clock wiring maintains a low level, the clock wiring then goes to a high level. A synchronization period detection circuit that outputs a rising synchronization period signal until the time of rising to
When the synchronization on / off setting register outputs the rising synchronization inhibition signal, the rising synchronization inhibition signal is output while the rising synchronization inhibition period setting unit outputs the rising synchronization inhibition period signal. A signal output unit;
While the rising synchronization prohibition signal output unit outputs the rising synchronization prohibition signal, regardless of the presence of the rising synchronization period signal, the count generation signal is supplied to the clock generation counter, and the rising synchronization operation is not performed. Forcibly wait for counting of the rising period of the clock, and when the rising synchronization prohibition signal output unit does not output the rising synchronization prohibition signal, while the clock rising synchronization period signal is given, the count wait signal A synchronization circuit that waits for a count of the rising period of the clock,
When rising synchronization off is set by this, the rising edge is not synchronized between the clock wiring and the level of the output terminal of the output unit until the rising synchronization prohibition period elapses. A clock wiring driving circuit, which forcibly waits for a period count and synchronizes between the clock wiring and the level of the output terminal of the output unit after the rising synchronization prohibition period has elapsed.
前記同期期間検出回路は、前記サンプル回路の出力と前記クロック生成カウンタの出力とを用いて、前記出力部の前記出力端子がハイレベルを維持しているが前記クロック配線がローレベルに立ち下がった時点から、前記出力端子がその後ローレベルに立ち下がる時点までの間、クロック立ち下がり同期期間信号を出力し、
前記同期回路は、前記立ち上がり同期禁止信号出力部が前記立ち上がり同期禁止信号を出力するか否かにかかわらず、前記クロック立ち下がり同期期間信号を与えられると、カウントクリア信号を前記クロック生成カウンタに与えて、前記クロックの立ち上がり期間のカウントをクリアさせ、
これにより、前記クロック生成カウンタは、前記カウントクリア信号を与えられると、ローレベルのクロックを出力させるための前記クロック出力信号を出力することを特徴とする請求項4記載のクロック配線駆動回路。
The synchronization period detection circuit uses the output of the sample circuit and the output of the clock generation counter to maintain the output terminal of the output unit at a high level, but the clock wiring falls to a low level. From the time point to the time point when the output terminal subsequently falls to a low level, a clock falling synchronization period signal is output,
The synchronization circuit provides a count clear signal to the clock generation counter when receiving the clock falling synchronization period signal regardless of whether the rising synchronization inhibition signal output unit outputs the rising synchronization inhibition signal or not. And clear the count of the rising period of the clock,
5. The clock wiring drive circuit according to claim 4, wherein the clock generation counter outputs the clock output signal for outputting a low level clock when the count clear signal is given.
前記立ち上がり同期禁止期間設定部は、
前記クロック生成カウンタから出力された前記クロック出力信号を所定のタイミングで順次転送して出力する、直列に接続された複数段のフリップフロップと、
前記クロック生成カウンタから出力された前記クロック出力信号と、前記フリップフロップにより転送された後出力された前記クロック出力信号とを与えられ、前記クロック生成カウンタからハイレベルのクロックを出力させるための前記クロック出力信号が出力されてから前記立ち上がり同期禁止期間が経過するまでの間、前記立ち上がり同期禁止期間信号を出力する第1の論理回路とを有し、
前記同期回路は、
前記立ち上がり同期禁止信号出力部から出力された前記立ち上がり同期禁止信号と、前記同期期間検出回路から出力された前記立ち上がり同期期間信号とを与えられる第2の論理回路を有し、
前記第2の論理回路は、前記立ち上がり同期禁止信号が入力されている間、又は前記立ち上がり同期禁止信号が入力されず前記立ち上がり同期期間信号が入力されている間、前記カウント待ち信号を出力することを特徴とする請求項4又は5記載のクロック配線駆動回路。
The rising synchronization prohibition period setting unit is
A plurality of flip-flops connected in series, sequentially transferring and outputting the clock output signal output from the clock generation counter at a predetermined timing;
The clock for receiving the clock output signal output from the clock generation counter and the clock output signal output after being transferred by the flip-flop and outputting a high level clock from the clock generation counter A first logic circuit that outputs the rising synchronization inhibition period signal from when an output signal is output until the rising synchronization inhibition period elapses;
The synchronization circuit includes:
A second logic circuit that is provided with the rising synchronization inhibition signal output from the rising synchronization inhibition signal output unit and the rising synchronization period signal output from the synchronization period detection circuit;
The second logic circuit outputs the count wait signal while the rising synchronization inhibition signal is input or while the rising synchronization inhibition signal is not input and the rising synchronization period signal is input. 6. The clock wiring drive circuit according to claim 4 or 5, wherein:
JP2003106613A 2003-04-10 2003-04-10 Clock wiring drive circuit Expired - Fee Related JP4221239B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003106613A JP4221239B2 (en) 2003-04-10 2003-04-10 Clock wiring drive circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003106613A JP4221239B2 (en) 2003-04-10 2003-04-10 Clock wiring drive circuit

Publications (2)

Publication Number Publication Date
JP2004310673A JP2004310673A (en) 2004-11-04
JP4221239B2 true JP4221239B2 (en) 2009-02-12

Family

ID=33468757

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003106613A Expired - Fee Related JP4221239B2 (en) 2003-04-10 2003-04-10 Clock wiring drive circuit

Country Status (1)

Country Link
JP (1) JP4221239B2 (en)

Also Published As

Publication number Publication date
JP2004310673A (en) 2004-11-04

Similar Documents

Publication Publication Date Title
KR100387980B1 (en) Serial interface that can operate in two different serial data transfer modes
KR101086426B1 (en) Apparatus and method for controlling the timing of data transition of serial data line in I2C controller
KR20030033040A (en) Generalized i2c slave transmitter/receiver state machine
WO2002069146A2 (en) Data processing system having an on-chip background debug system and method therefor
US5646553A (en) Driver for tri-state bus
US8131949B2 (en) Memory access control device equipped with memory access request generating modules/arbitrator and control method thereof
WO1996021276A1 (en) Clock noise filter for integrated circuits
KR101350085B1 (en) Power conservation
US20040119520A1 (en) Setup/hold time control device
TW201426718A (en) Gate driving device
JP3144374B2 (en) Signal change acceleration bus drive circuit
US7395450B2 (en) Synchronous/asynchronous interface circuit and electronic device
US5428765A (en) Method and apparatus for disabling and restarting clocks
JP4221239B2 (en) Clock wiring drive circuit
US7574618B2 (en) Interface circuit
US20070101028A1 (en) Serial data input system
EP3032428A1 (en) Data communication device and method for data communication
US20070296464A1 (en) Methods and apparatus for serially connected devices
EP1288771A2 (en) Semiconductor integrated circuit with function to start and stop supply of clock signal
US6484267B1 (en) Clock gated bus keeper
JPH1185304A (en) Clock input control circuit
JP4201375B2 (en) Data transfer device
US5428797A (en) Circuitry for eliminating bus contention at high frequencies by driving a bus to an available state prior to its relinquishing control of the bus
US5617310A (en) Multiple operation mode microcontroller
JP3256551B2 (en) Drive circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051115

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081016

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20081107

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081117

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111121

Year of fee payment: 3

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111121

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees