JP2014033413A - Semiconductor device and frequency error calculation program - Google Patents

Semiconductor device and frequency error calculation program Download PDF

Info

Publication number
JP2014033413A
JP2014033413A JP2012174207A JP2012174207A JP2014033413A JP 2014033413 A JP2014033413 A JP 2014033413A JP 2012174207 A JP2012174207 A JP 2012174207A JP 2012174207 A JP2012174207 A JP 2012174207A JP 2014033413 A JP2014033413 A JP 2014033413A
Authority
JP
Japan
Prior art keywords
frequency
clock
value
signal
clock signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012174207A
Other languages
Japanese (ja)
Inventor
Masao Watanabe
昌男 渡邉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2012174207A priority Critical patent/JP2014033413A/en
Publication of JP2014033413A publication Critical patent/JP2014033413A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To solve the problem that it takes time to calculate deviation amount of a frequency of a clock signal in a conventional device.SOLUTION: In the semiconductor device, a theoretical value in a first period indicating the period in which a clock edge of an input signal SCL is input is calculated on the basis of the ratio of a theoretical value CLKA_f of the frequency of a first clock signal CLKA having low frequency accuracy and a theoretical value SCL of the frequency of an input signal having a high frequency accuracy. Moreover, the semiconductor device calculates the theoretical value in the first period whenever the clock edge of the first clock signal CLKA is input. And, the semiconductor device calculates the deviation amount from the theoretical value of the frequency of the first clock signal CLKA on the basis of whether or not the clock edge of the input signal SCL has been input in the first period.

Description

本発明は半導体装置及び周波数誤差算出プログラムに関し、例えば、外部から与えられるクロック信号を動作ロックとして動作する半導体装置及び当該半導体装置において実行される周波数誤差算出プログラムに関する。   The present invention relates to a semiconductor device and a frequency error calculation program, for example, a semiconductor device that operates using an externally applied clock signal as an operation lock, and a frequency error calculation program executed in the semiconductor device.

デジタル放送の受信装置では、受信信号のチューニング処理及び復調処理を行う第1の半導体装置と復調された信号のデコード処理を行う第2の半導体装置とを組み合わせて受信装置を構築することがある。このとき、第1の半導体装置及び第2の半導体装置は、それぞれ動作クロック信号の基準となる基準クロック信号を必要とする。この基準クロック信号には、周波数の絶対値誤差が小さいことと、ジッタが小さいことが要求される。   In a digital broadcast receiving device, a receiving device may be constructed by combining a first semiconductor device that performs tuning processing and demodulation processing of a received signal and a second semiconductor device that performs decoding processing of a demodulated signal. At this time, each of the first semiconductor device and the second semiconductor device requires a reference clock signal serving as a reference for the operation clock signal. This reference clock signal is required to have a small absolute frequency error and a small jitter.

例えば、第1の半導体装置では、基準クロック信号の周波数の絶対値誤差が大きくなると、チューニング処理に用いるローカル信号の周波数ずれが大きくなり復調処理でキャリアを補足できなくなる問題が生じる。また、第1の半導体装置では、基準クロック信号の周波数の絶対値誤差が大きくなると、クロック再生系のPLL(Phase Locked Loop)が復調信号にロックできない問題が発生する。さらに、第2の半導体装置においても、基準クロック信号の周波数の絶対値誤差が大きくなると、適切なデコード速度を維持できない問題が発生する。また、基準クロック信号のジッタ特性が悪化すると第1の半導体装置の受信特性が悪化する問題が発生する。   For example, in the first semiconductor device, when the absolute value error of the frequency of the reference clock signal increases, the frequency shift of the local signal used for the tuning process increases and the carrier cannot be supplemented by the demodulation process. Further, in the first semiconductor device, when the absolute value error of the frequency of the reference clock signal becomes large, there occurs a problem that the PLL (Phase Locked Loop) of the clock recovery system cannot be locked to the demodulated signal. Further, even in the second semiconductor device, when the absolute value error of the frequency of the reference clock signal becomes large, there arises a problem that an appropriate decoding speed cannot be maintained. Further, when the jitter characteristic of the reference clock signal is deteriorated, there is a problem that the reception characteristic of the first semiconductor device is deteriorated.

このように、基準クロック信号の周波数精度及びジッタ精度は、受信装置の性能に大きな影響を及ぼす。そのため、デジタル放送の受信装置では、基準クロック信号の信号源に水晶発振子が多く用いられる。しかし、水晶発振子は高価であるため、受信装置のコストアップを抑制するためには水晶発振子の個数を削減することが求められる。   As described above, the frequency accuracy and jitter accuracy of the reference clock signal greatly affect the performance of the receiving apparatus. Therefore, a digital broadcast receiving apparatus often uses a crystal oscillator as a signal source of a reference clock signal. However, since the crystal oscillator is expensive, it is required to reduce the number of crystal oscillators in order to suppress the cost increase of the receiving device.

水晶発振子の個数を削減する1つの方法は、1つの水晶発振子で生成した基準クロック信号を一方の半導体装置に与え、他方の半導体装置には一方の半導体装置において基準クロック信号から生成したクロック信号を与えることが考えられる。しかし、この場合、2つの半導体装置間の信号線が増加する問題や、追加した信号線によるジッタ増加などの問題が生じる。また、水晶発振子の個数を削減する別の方法として水晶発振子に代えて、低ジッタ特性を有するものの周波数精度の劣るセラミック発振子等を用いることが考えられる。このようにセラミック発振子を用いた場合、周波数精度を確保するために周波数誤差を検出して周波数誤差を補正する必要がある。そこで、特許文献1に、周波数誤差検出回路の一例が開示されている。   One method of reducing the number of crystal oscillators is to supply a reference clock signal generated by one crystal oscillator to one semiconductor device and to the other semiconductor device a clock generated from the reference clock signal in one semiconductor device. It is conceivable to give a signal. However, in this case, problems such as an increase in signal lines between the two semiconductor devices and an increase in jitter due to the added signal lines occur. As another method for reducing the number of crystal oscillators, it is conceivable to use a ceramic oscillator having low jitter characteristics but inferior frequency accuracy instead of the crystal oscillator. When the ceramic oscillator is used in this way, it is necessary to detect the frequency error and correct the frequency error in order to ensure frequency accuracy. Therefore, Patent Document 1 discloses an example of a frequency error detection circuit.

特許文献1に記載の周波数誤差検出回路は、時分割方向制御伝送方式の通信装置において、複数バースト期間のDPLL制御回数を求めてこれを平均化する。これにより、特許文献1に記載の周波数誤差検出回路は、周波数誤差により生ずる位相ずれに応じてマスタクロックに対するパルスを増減させることでDPLL回路内のマスタクロックのカウント数を増減させて受信信号とマスタクロックの位相を合わせて周波数誤差を検出することができる。そして、特許文献1に記載の周波数誤差検出回路は、バースト毎のばらつきの影響を受けることなく精度良く周波数誤差を検出することができる。   The frequency error detection circuit described in Patent Document 1 calculates and averages the number of DPLL controls in a plurality of burst periods in a time division direction control transmission type communication apparatus. As a result, the frequency error detection circuit described in Patent Document 1 increases or decreases the master clock count in the DPLL circuit by increasing or decreasing the pulses with respect to the master clock in accordance with the phase shift caused by the frequency error. The frequency error can be detected by matching the clock phases. The frequency error detection circuit described in Patent Document 1 can detect a frequency error with high accuracy without being affected by variations in each burst.

特公平6−81042号公報Japanese Examined Patent Publication No. 6-81042

特許文献1に記載の技術では、バースト信号が入力される毎に周波数誤差を計算するため、所定の範囲内に周波数誤差を収束させるためには多くのバースト信号を受信しなければならず、精度の高い周波数誤差を得るために多くの時間を要する問題がある。   In the technique described in Patent Document 1, since a frequency error is calculated every time a burst signal is input, in order to converge the frequency error within a predetermined range, a large number of burst signals must be received. There is a problem that it takes a lot of time to obtain a high frequency error.

その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。   Other problems and novel features will become apparent from the description of the specification and the accompanying drawings.

一実施の形態によれば、半導体装置では、周波数精度の低い第1のクロック信号の周波数の理論値と、周波数精度の高い入力信号の周波数の理論値と、の比に基づき入力信号の論理レベルが遷移する期間を示す第1の期間の理論値を算出する。また、半導体装置は、第1の期間の理論値を第1のクロック信号のクロックエッジが入力される毎に算出する。そして、半導体装置は、当該第1の期間に入力信号の論理レベルが遷移したか否かに基づき第1のクロック信号の周波数の理論値からのずれ量を算出する。   According to one embodiment, in the semiconductor device, the logic level of the input signal is based on the ratio between the theoretical value of the frequency of the first clock signal with low frequency accuracy and the theoretical value of the frequency of the input signal with high frequency accuracy. The theoretical value of the first period indicating the period of transition of is calculated. In addition, the semiconductor device calculates the theoretical value of the first period every time the clock edge of the first clock signal is input. Then, the semiconductor device calculates an amount of deviation from the theoretical value of the frequency of the first clock signal based on whether or not the logic level of the input signal has changed during the first period.

一実施の形態によれば、周波数精度が低い第2のクロック信号の周波数の理論値からのずれ量を高速かつ高精度に算出することができる。   According to the embodiment, it is possible to calculate the deviation amount from the theoretical value of the frequency of the second clock signal with low frequency accuracy at high speed and with high accuracy.

実施の形態1にかかる半導体装置を含む受信システムのブロック図である。1 is a block diagram of a receiving system including a semiconductor device according to a first embodiment; 実施の形態1にかかる位相差計算部の図である。FIG. 3 is a diagram of a phase difference calculation unit according to the first embodiment. 実施の形態1にかかる半導体装置の動作を説明するタイミングチャートである。4 is a timing chart for explaining the operation of the semiconductor device according to the first embodiment; キャリー発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図である。It is a figure explaining the frequency error amount when the clock edge of an input signal is input during the carry generation period. キャリー発生期間の直前のキャリー非発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図である。It is a figure explaining the frequency error amount when the clock edge of an input signal is input during the carry non-occurrence period immediately before the carry generation period. キャリー発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図である。It is a figure explaining the frequency error amount when the clock edge of an input signal is input during the carry generation period. キャリー発生期間の直後のキャリー非発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図である。It is a figure explaining the frequency error amount when the clock edge of an input signal is input during the carry non-occurrence period immediately after the carry generation period. 第1のクロック信号の周波数が理想値である場合において実施の形態1にかかる半導体装置が算出するずれ量を説明するための図である。FIG. 6 is a diagram for explaining a deviation amount calculated by the semiconductor device according to the first embodiment when the frequency of the first clock signal is an ideal value; 第1のクロック信号の周波数が理想値よりも高い場合において実施の形態1にかかる半導体装置が算出するずれ量を説明するための図である。FIG. 6 is a diagram for explaining a deviation amount calculated by the semiconductor device according to the first embodiment when the frequency of the first clock signal is higher than an ideal value. 第1のクロック信号の周波数が理想値よりも低い場合において実施の形態1にかかる半導体装置が算出するずれ量を説明するための図である。FIG. 6 is a diagram for explaining a deviation amount calculated by the semiconductor device according to the first embodiment when the frequency of the first clock signal is lower than an ideal value. 実施の形態2にかかる半導体装置を含む受信システムのブロック図である。FIG. 4 is a block diagram of a receiving system including a semiconductor device according to a second embodiment. 実施の形態3にかかる半導体装置を含む受信システムのブロック図である。FIG. 6 is a block diagram of a receiving system including a semiconductor device according to a third embodiment. 実施の形態4にかかる半導体装置を含む受信システムのブロック図である。FIG. 6 is a block diagram of a receiving system including a semiconductor device according to a fourth embodiment.

実施の形態1
以下、図面を参照して実施の形態について説明する。実施の形態1では、外部で生成された基準クロック信号の周波数の理論値からのずれ量を算出する周波数誤差計算部を有する半導体装置について説明する。この半導体装置は、基準クロック信号に基づき動作するものであればどのような機能を有するものであっても良いが、実施の形態1では、半導体装置の一例としてデジタル放送の受信システムにおいてダウンコンバート処理及び復調処理を行う半導体装置(例えば、受信回路)を説明する。
Embodiment 1
Hereinafter, embodiments will be described with reference to the drawings. In the first embodiment, a semiconductor device having a frequency error calculation unit that calculates a deviation amount from a theoretical value of the frequency of an externally generated reference clock signal will be described. This semiconductor device may have any function as long as it operates based on the reference clock signal. In the first embodiment, as an example of the semiconductor device, a down-conversion process is performed in a digital broadcast receiving system. A semiconductor device (for example, a receiving circuit) that performs demodulation processing will be described.

図1に、実施の形態1にかかる受信システムのブロック図を示す。図1に示すように、受信システムは、受信回路1とホストIC2とを有する。受信回路1は、1つ半導体チップ上に回路が形成される半導体装置である。また、ホストIC2は、受信回路1とは別の半導体チップ上に回路が形成される半導体装置である。   FIG. 1 is a block diagram of a receiving system according to the first embodiment. As shown in FIG. 1, the reception system includes a reception circuit 1 and a host IC 2. The receiving circuit 1 is a semiconductor device in which a circuit is formed on one semiconductor chip. The host IC 2 is a semiconductor device in which a circuit is formed on a different semiconductor chip from the receiving circuit 1.

また、受信回路1は、低精度クロック信号生成部3により生成された第1のクロック信号CLKAに基づき動作する。受信回路1は、アンテナANTを介して受信した受信信号に対してダウンコンバート処理及び復調処理を施して、データ信号を再生する。ホストIC2は、受信回路1からデータ信号に基づき処理を行う。実施の形態1では、ホストIC2は、データ信号に対するデコード処理と、受信回路1の制御とを行う。このホストIC2は、高精度クロック信号生成部4により生成された基準クロック信号CLKRに基づき動作する。   The receiving circuit 1 operates based on the first clock signal CLKA generated by the low-accuracy clock signal generation unit 3. The receiving circuit 1 performs a down-conversion process and a demodulation process on the received signal received via the antenna ANT, and reproduces a data signal. The host IC 2 performs processing based on the data signal from the receiving circuit 1. In the first embodiment, the host IC 2 performs a decoding process on the data signal and controls the receiving circuit 1. The host IC 2 operates based on the reference clock signal CLKR generated by the high precision clock signal generation unit 4.

ここで、クロック信号生成部について説明する。実施の形態1にかかる受信システムでは、精度の異なる2つのクロック信号生成部を用いる。クロック信号の精度には、ジッタ特性に対する精度と、周波数の絶対値に対する精度とがある。低精度クロック信号生成部3は、周波数の絶対値に対する精度が低く、ジッタ特性に対する精度は高い第1のクロック信号CLKAを生成する。また、高精度クロック信号生成部4は、低精度クロック信号生成部3よりも周波数の絶対値に対する精度は高く、ジッタ特性に対する精度は第1のクロック信号CLKAと同様に高い。つまり、実施の形態では、周波数の絶対値について言及する場合に、クロック信号生成部及びクロック信号の精度が高い或いは低いとの表現を用いる。低精度クロック生成部3としては、セラミック発振子等を用いることができる。また、高精度クロック生成部4としては、水晶発振子等を用いることができる。なお、水晶発振子は高価でありコストアップの原因となる。   Here, the clock signal generation unit will be described. In the receiving system according to the first embodiment, two clock signal generators with different accuracy are used. The accuracy of the clock signal includes accuracy with respect to jitter characteristics and accuracy with respect to an absolute value of frequency. The low-accuracy clock signal generation unit 3 generates the first clock signal CLKA that has low accuracy with respect to the absolute value of frequency and high accuracy with respect to jitter characteristics. In addition, the high-accuracy clock signal generation unit 4 has higher accuracy with respect to the absolute value of the frequency than the low-accuracy clock signal generation unit 3, and the accuracy with respect to jitter characteristics is as high as that of the first clock signal CLKA. That is, in the embodiment, when referring to the absolute value of the frequency, the expression that the accuracy of the clock signal generation unit and the clock signal is high or low is used. As the low-accuracy clock generation unit 3, a ceramic oscillator or the like can be used. As the high-accuracy clock generation unit 4, a crystal oscillator or the like can be used. The crystal oscillator is expensive and causes an increase in cost.

続いて、実施の形態1にかかる受信システムについて詳細に説明する。図1に示すように、受信回路1は、クロック補正部10、アナログPLL回路11、チューナー部12、デジタルPLL回路13、復調処理部14を有する。   Subsequently, the receiving system according to the first exemplary embodiment will be described in detail. As illustrated in FIG. 1, the reception circuit 1 includes a clock correction unit 10, an analog PLL circuit 11, a tuner unit 12, a digital PLL circuit 13, and a demodulation processing unit 14.

クロック補正部10は、第1のクロック信号CLKAに基づき動作する。そして、クロック補正部10は、第1のクロック信号CLKAと制御信号(シリアルデータSDA及びシリアルクロックSCLを含む信号)とに基づき第1のクロック信号CLKAの周波数の絶対値と理想値との誤差を補正するずれ量MODを算出する。   The clock correction unit 10 operates based on the first clock signal CLKA. Then, the clock correction unit 10 calculates an error between the absolute value and the ideal value of the frequency of the first clock signal CLKA based on the first clock signal CLKA and the control signal (a signal including the serial data SDA and the serial clock SCL). A shift amount MOD to be corrected is calculated.

アナログPLL回路11は、第1のクロック信号CLKAに基づき動作信号(例えば、ローカル信号CLKA)を生成する。このとき、アナログPLL回路11は、アナログ値に基づきローカル信号CLKLの周波数を制御する。また、アナログPLL回路11は、クロック補正部10が生成したずれ量MODを参照して、ローカル信号CLKLの周波数を調整する。   The analog PLL circuit 11 generates an operation signal (for example, the local signal CLKA) based on the first clock signal CLKA. At this time, the analog PLL circuit 11 controls the frequency of the local signal CLKL based on the analog value. The analog PLL circuit 11 adjusts the frequency of the local signal CLKL with reference to the shift amount MOD generated by the clock correction unit 10.

チューナー部12は、ローカル信号に基づきアンテナANTから入力される受信信号とローカル信号CLKLとに基づき受信信号よりも周波数の低いベースバンド信号或いは中間周波数信号IFを生成するダウンコンバート処理を行う。   The tuner unit 12 performs a down-conversion process for generating a baseband signal or an intermediate frequency signal IF having a frequency lower than that of the received signal based on the received signal input from the antenna ANT based on the local signal and the local signal CLKL.

デジタルPLL回路13は、第1のクロック信号CLKAに基づき動作信号(例えば、動作クロック信号CLKD)を生成する。このとき、デジタルPLL回路13は、デジタル値に基づき動作クロック信号CLKDの周波数を制御する。また、デジタルPLL回路13は、クロック補正部10が生成したずれ量MODを参照して、動作クロック信号CLKDの周波数を調整する。   The digital PLL circuit 13 generates an operation signal (for example, the operation clock signal CLKD) based on the first clock signal CLKA. At this time, the digital PLL circuit 13 controls the frequency of the operation clock signal CLKD based on the digital value. In addition, the digital PLL circuit 13 refers to the shift amount MOD generated by the clock correction unit 10 and adjusts the frequency of the operation clock signal CLKD.

復調処理部14は、動作クロック信号Dに基づきベースバンド信号に対する復調処理を行う。そして、復調後の信号は、データ信号としてホストIC2に出力される。   The demodulation processing unit 14 performs demodulation processing on the baseband signal based on the operation clock signal D. Then, the demodulated signal is output to the host IC 2 as a data signal.

ホストIC2は、信号処理部31、分周回路32、通信インタフェース回路33を有する。信号処理部31は、例えば、CPU等の演算部であって、プログラムに応じた処理を行うものである。実施の形態1では、信号処理部31は、復調処理部14の復調処理により生成されたデータ信号に対するデコード処理等を行う。この信号処理部31は、高精度クロック信号生成部4で生成された基準クロック信号CLKRに基づき動作する。図1に示す例では、信号処理部31は、内部に設けられたPLL回路で基準クロック信号CLKRを逓倍したクロック信号を生成し、当該クロック信号に基づき各種処理を行う基づき動作する。また、信号処理部31は、受信回路1に対する制御データDA0を生成する。   The host IC 2 includes a signal processing unit 31, a frequency dividing circuit 32, and a communication interface circuit 33. The signal processing unit 31 is a calculation unit such as a CPU, for example, and performs processing according to a program. In the first embodiment, the signal processing unit 31 performs a decoding process or the like on the data signal generated by the demodulation process of the demodulation processing unit 14. The signal processor 31 operates based on the reference clock signal CLKR generated by the high precision clock signal generator 4. In the example shown in FIG. 1, the signal processing unit 31 operates based on generating a clock signal obtained by multiplying the reference clock signal CLKR by a PLL circuit provided therein, and performing various processes based on the clock signal. Further, the signal processing unit 31 generates control data DA0 for the receiving circuit 1.

分周回路32は、高精度クロック信号生成部4で生成された基準クロック信号CLKRを分周して第2のクロック信号CLKBを生成する。通信インタフェース回路33は、第2のクロック信号CLKBに基づきシリアルクロックSCLを生成し、制御データDA0に基づきシリアルデータSDAを生成する。通信インタフェース回路33は、例えば、I2C規格に従った通信を行うためのインタフェース回路である。   The frequency dividing circuit 32 divides the reference clock signal CLKR generated by the high-precision clock signal generation unit 4 to generate the second clock signal CLKB. The communication interface circuit 33 generates a serial clock SCL based on the second clock signal CLKB, and generates serial data SDA based on the control data DA0. The communication interface circuit 33 is an interface circuit for performing communication according to the I2C standard, for example.

ここで、実施の形態1にかかる受信システムでは、受信回路1のクロック補正部10に特徴の一つを有するため、クロック補正部10についてさらに詳細に説明する。図1に示すように、クロック補正部10は、通信インタフェース回路21、クロックエッジサンプリング回路22、位相差計算部23、カウンタ24、遷移判定部25、周波数誤差計算部26、周波数判定部27を有する。   Here, since the receiving system according to the first exemplary embodiment has one of the features of the clock correcting unit 10 of the receiving circuit 1, the clock correcting unit 10 will be described in more detail. As shown in FIG. 1, the clock correction unit 10 includes a communication interface circuit 21, a clock edge sampling circuit 22, a phase difference calculation unit 23, a counter 24, a transition determination unit 25, a frequency error calculation unit 26, and a frequency determination unit 27. .

通信インタフェース回路21は、例えば、ホストIC2の通信インタフェース回路33と通信を行うためのインタフェース回路である。つまり、通信インタフェース回路21は、I2C規格に従った通信を行う。通信インタフェース回路21はシリアルクロックSCLを用いてシリアルデータSDAを受信し、クロック補正部10に含まれる回路或いはアナログPLL回路11及びデジタルPLL回路13に制御データDA1を与える。   The communication interface circuit 21 is an interface circuit for communicating with the communication interface circuit 33 of the host IC 2, for example. That is, the communication interface circuit 21 performs communication according to the I2C standard. The communication interface circuit 21 receives the serial data SDA using the serial clock SCL, and supplies the control data DA1 to the circuit included in the clock correction unit 10 or the analog PLL circuit 11 and the digital PLL circuit 13.

クロックエッジサンプリング回路22は、ずれ量MODの算出に用いる入力信号として利用するシリアルクロックSCLのクロックエッジを検出してクロックエッジが入力されたことを示すクロック検出信号CLKSを出力する。ここで、クロックエッジは、シリアルクロックの論理レベルの遷移に伴い生じるものである。そこで、以下では、クロックエッジサンプリング回路22がシリアルクロックSCLの論理レベルが遷移したことを検出した状態をクロックエッジが入力されたと表現する。   The clock edge sampling circuit 22 detects a clock edge of the serial clock SCL used as an input signal used for calculating the shift amount MOD, and outputs a clock detection signal CLKS indicating that the clock edge has been input. Here, the clock edge is caused by the transition of the logic level of the serial clock. Therefore, in the following, a state in which the clock edge sampling circuit 22 detects that the logic level of the serial clock SCL has transitioned is expressed as a clock edge being input.

位相差計算部23は、第1のクロック信号CLKAに同期して動作し、第1のクロック信号CLKAの周期のうち第2のクロック信号(例えば、シリアルクロックSCL)のクロックエッジが入力される可能性のある周期を示す第1の期間(例えば、キャリー発生期間)を第1の周波数値CLKA_f及び第2の周波数値CLKB_fの比から計算する。また、位相差計算部23は、キャリー発生期間における第1のクロック信号CLKAのクロックエッジとシリアルクロックSCLのクロックエッジのとの時間差の理論値を示す位相誤差値Pを第1の周波数値CLKA_f及び第2の周波数値CLKB_fの比から計算する。   The phase difference calculator 23 operates in synchronization with the first clock signal CLKA, and the clock edge of the second clock signal (for example, the serial clock SCL) can be input in the period of the first clock signal CLKA. A first period (for example, a carry generation period) indicating a characteristic cycle is calculated from the ratio of the first frequency value CLKA_f and the second frequency value CLKB_f. Further, the phase difference calculation unit 23 sets the phase error value P indicating the theoretical value of the time difference between the clock edge of the first clock signal CLKA and the clock edge of the serial clock SCL in the carry generation period to the first frequency value CLKA_f and Calculated from the ratio of the second frequency value CLKB_f.

また、図1に示す実施の形態1にかかる受信回路1では、位相差計算部23が第1のレジスタ(例えば、レジスタ231)及び第2のレジスタ(例えば、レジスタ232)を有する。レジスタ231には、低精度クロック生成部3により生成された第1のクロック信号CLKAの周波数の理論値を示す第1の周波数値CLKA_fが格納される。レジスタ232には、高精度クロック生成部4により生成された基準クロック信号CLKRから生成された第2のクロック信号CLKBのクロックエッジと同期したクロックエッジを有する入力信号(例えば、シリアルクロックSCL)の周波数の理論値を示す第2の周波数値CLKB_fが格納される。   In the receiving circuit 1 according to the first exemplary embodiment illustrated in FIG. 1, the phase difference calculation unit 23 includes a first register (for example, the register 231) and a second register (for example, the register 232). The register 231 stores a first frequency value CLKA_f indicating a theoretical value of the frequency of the first clock signal CLKA generated by the low-accuracy clock generation unit 3. The register 232 has a frequency of an input signal (for example, serial clock SCL) having a clock edge synchronized with the clock edge of the second clock signal CLKB generated from the reference clock signal CLKR generated by the high-accuracy clock generation unit 4. The second frequency value CLKB_f indicating the theoretical value is stored.

ここで、クロック補正部10で用いる入力信号について説明する。実施の形態1にかかる受信システムでは、入力信号としてシリアルクロックSCLを用いる。このシリアルクロック信号SCLは、補正対象の第1のクロック信号CLKAの2分の1以下の周波数である。第1のクロック信号CLKAと、シリアルクロックSCLとの周波数をこのような関係とすることで、後述する位相差計算処理における誤判定を防止することができる。また、入力信号は、異なる半導体装置(実施の形態1にかかる受信システムでは、ホストIC2)に供給される基準クロック信号CLKRと同期したクロックエッジを有する信号であればよい。そこで、実施の形態1にかかる受信システムでは、信号線の数を減らすために、基準クロック信号CLKRを分周して生成される第2のクロック信号CLKBに基づき生成される同期クロック信号(例えば、シリアルクロックSCL)と、シリアルクロックSCLと同期したクロックエッジを有する制御信号(例えば、シリアルデータSDA)と、のうちシリアルクロック信号SCLを用いる。なお、入力信号としては、シリアルデータSDAを用いることも可能である。   Here, an input signal used in the clock correction unit 10 will be described. In the receiving system according to the first embodiment, a serial clock SCL is used as an input signal. The serial clock signal SCL has a frequency equal to or less than half that of the first clock signal CLKA to be corrected. By making such a relationship between the frequency of the first clock signal CLKA and the serial clock SCL, an erroneous determination in a phase difference calculation process described later can be prevented. The input signal may be a signal having a clock edge synchronized with the reference clock signal CLKR supplied to a different semiconductor device (in the receiving system according to the first embodiment, the host IC 2). Therefore, in the receiving system according to the first embodiment, in order to reduce the number of signal lines, a synchronous clock signal (for example, generated based on the second clock signal CLKB generated by dividing the reference clock signal CLKR) (for example, The serial clock signal SCL is used among the serial clock SCL) and a control signal (for example, serial data SDA) having a clock edge synchronized with the serial clock SCL. Note that serial data SDA can also be used as an input signal.

また、位相差計算部23の具体的な回路の一例を図2に示す。図2に示すように、位相差計算部23は、加算器41、遅延回路42を有する。加算器41は、遅延回路42を介して得た前回の加算結果と周波数比Tとの加算値を出力する。加算器41が出力する加算値が位相誤差値Pとなる。加算器41が出力する加算値は、最大値が1であり、加算値が1以上となる場合は加算後の値のうち小数点以下の数値を加算値として出力する。また、加算器41は、加算値が1を超える場合、キャリー信号CAを第1の論理レベルとする。また、加算器41は、第1のクロック信号CLKAのクロックエッジが入力される毎に演算を実行する。遅延回路42は、加算器41が出力する加算値を遅延させて加算器41に出力する。位相差計算部23は、このような構成を有することで、第1のクロック信号CLKAのクロックエッジが入力される毎に位相誤差値P及びキャリー信号CAの値を更新する。なお、キャリー信号CAが第1の論理レベル(例えば、ハイレベル)となっている期間がキャリー発生期間となる。   An example of a specific circuit of the phase difference calculation unit 23 is shown in FIG. As shown in FIG. 2, the phase difference calculation unit 23 includes an adder 41 and a delay circuit 42. The adder 41 outputs an addition value between the previous addition result obtained through the delay circuit 42 and the frequency ratio T. The added value output from the adder 41 becomes the phase error value P. The added value output from the adder 41 has a maximum value of 1, and when the added value is 1 or more, a numerical value after the decimal point is output as the added value. Further, when the added value exceeds 1, the adder 41 sets the carry signal CA to the first logic level. The adder 41 performs an operation every time a clock edge of the first clock signal CLKA is input. The delay circuit 42 delays the addition value output from the adder 41 and outputs the delayed addition value to the adder 41. The phase difference calculation unit 23 has such a configuration, so that the phase error value P and the carry signal CA are updated each time the clock edge of the first clock signal CLKA is input. A period in which carry signal CA is at the first logic level (for example, high level) is a carry generation period.

カウンタ24は、第1の期間(例えば、キャリー発生期間)の発生回数をカウントして遷移カウント値を生成する。なお、カウンタ24は、電源投入時に生成されるパワーオンリセット信号等により遷移カウント値をリセットする。   The counter 24 generates a transition count value by counting the number of occurrences of a first period (for example, a carry generation period). The counter 24 resets the transition count value by a power-on reset signal generated when the power is turned on.

遷移判定部25は、入力信号(例えば、シリアルクロックSCL)のクロックエッジが第1の期間(例えば、キャリー発生期間)中に発生したか、キャリー発生期間以外の第2の期間(例えば、キャリー非発生期間)に発生したかを示す遷移判定信号STを出力する。より具体的には、遷移判定部25は、キャリー発生期間中にシリアルクロックSCLのクロックエッジが入力され場合に遷移判定信号STを第1の状態(例えば、正常状態)とする。また、遷移判定部25は、キャリー非発生期間にシリアルクロックSCLのクロックエッジが入力され場合に遷移判定信号STを第2の状態(例えば、異常状態)とする。さらに、遷移判定部25は、シリアルクロックSCLのクロックエッジが入力されない場合に遷移判定信号を第3の状態(例えば、遷移非検出状態)とする。これら3つの状態は、例えば、遷移判定信号として2ビットの信号を用いることで表現できる。   The transition determination unit 25 determines whether the clock edge of the input signal (for example, the serial clock SCL) is generated during the first period (for example, the carry generation period) or the second period (for example, the carry non-period) other than the carry generation period. The transition determination signal ST indicating whether it occurred during the occurrence period) is output. More specifically, the transition determination unit 25 sets the transition determination signal ST to the first state (for example, the normal state) when the clock edge of the serial clock SCL is input during the carry generation period. Further, the transition determination unit 25 sets the transition determination signal ST to the second state (for example, an abnormal state) when the clock edge of the serial clock SCL is input during the carry non-occurrence period. Furthermore, the transition determination unit 25 sets the transition determination signal to the third state (for example, the transition non-detection state) when the clock edge of the serial clock SCL is not input. These three states can be expressed by using, for example, a 2-bit signal as a transition determination signal.

周波数誤差計算部26は、遷移判定信号ST及び位相誤差値Pに基づき第1のクロック信号CLKAの周波数の理論値からの周波数誤差量を算出する。周波数判定部26は、遷移判定信号STに基づき第1のクロック信号CLKAの位相の理論値からのずれ方向を判定し、位相誤差値STに基づき第1のクロック信号CLKAの周波数の理論値からのずれ量を算出する。より具体的には、周波数誤差計算部26は、シリアルクロックSCLのクロックエッジがキャリー発生期間中に入力された後に、キャリー発生期間の直前のキャリー非発生期間にシリアルクロックSCLのクロックエッジが入力された場合は第1のクロック信号CLKAの位相が理論値に対して進んでいると判断する。また、周波数誤差計算部26は、シリアルクロックSCLのクロックエッジがキャリー発生期間中に入力された後に、キャリー発生期間の直後のキャリー非発生期間にシリアルクロックSCLのクロックエッジが入力された場合は第1のクロック信号CLKAの位相が理論値に対して遅れていると判断する。そして、周波数誤差計算部26は、キャリー発生期間毎に位相誤差値Pに基づき算出される値を遷移カウント値で除算して第1のクロック信号CLKAの周波数の理論値との誤差量を算出する。さらに具体的な周波数誤差計算部26の動作は後述する。   The frequency error calculator 26 calculates a frequency error amount from a theoretical value of the frequency of the first clock signal CLKA based on the transition determination signal ST and the phase error value P. The frequency determination unit 26 determines a direction of deviation from the theoretical value of the phase of the first clock signal CLKA based on the transition determination signal ST, and determines from the theoretical value of the frequency of the first clock signal CLKA based on the phase error value ST. The amount of deviation is calculated. More specifically, after the clock edge of the serial clock SCL is input during the carry generation period, the frequency error calculation unit 26 receives the clock edge of the serial clock SCL during the carry non-occurrence period immediately before the carry generation period. If it is, it is determined that the phase of the first clock signal CLKA is advanced with respect to the theoretical value. Further, the frequency error calculation unit 26 receives the first clock edge of the serial clock SCL after the clock edge of the serial clock SCL is input during the carry generation period and then when the clock edge of the serial clock SCL is input during the non-carry generation period immediately after the carry generation period. It is determined that the phase of the first clock signal CLKA is delayed from the theoretical value. Then, the frequency error calculation unit 26 divides the value calculated based on the phase error value P for each carry generation period by the transition count value to calculate an error amount from the theoretical value of the frequency of the first clock signal CLKA. . More specific operation of the frequency error calculator 26 will be described later.

周波数判定部27は、周波数誤差計算部26が算出した周波数誤差量の上限値と下限値とに基づき前記第1のクロック信号の周波数の理論値からのずれ量を算出する。より具体的には、周波数判定部27は、周波数誤差計算部26が算出した周波数誤差量の上限値と下限値との差が予め設定した所定値以下となった時点での上限値と下限値との間の値(実施の形態1では、上限値と下限値との中心値)をずれ量として算出する。周波数判定部27が算出したずれ量は、レジスタ271に格納される。ここで、実施の形態1にかかる受信回路1は、第1のクロック信号に基づき動作信号を生成する内部発振回路としてアナログPLL回路11及びデジタルPLL回路13を有し、動作信号に基づき所定の機能を実現する機能回路としてチューナー部12及び復調処理部14を有する。周波数判定部27は、算出したずれ量を内部発振回路に与えて前記動作信号の周波数を補正する。   The frequency determination unit 27 calculates a deviation amount from the theoretical value of the frequency of the first clock signal based on the upper limit value and the lower limit value of the frequency error amount calculated by the frequency error calculation unit 26. More specifically, the frequency determination unit 27 determines the upper limit value and the lower limit value when the difference between the upper limit value and the lower limit value of the frequency error amount calculated by the frequency error calculation unit 26 is equal to or less than a predetermined value set in advance. (In Embodiment 1, the center value between the upper limit value and the lower limit value) is calculated as a deviation amount. The shift amount calculated by the frequency determination unit 27 is stored in the register 271. Here, the receiving circuit 1 according to the first embodiment includes an analog PLL circuit 11 and a digital PLL circuit 13 as an internal oscillation circuit that generates an operation signal based on the first clock signal, and has a predetermined function based on the operation signal. As a functional circuit for realizing the above, a tuner unit 12 and a demodulation processing unit 14 are provided. The frequency determination unit 27 corrects the frequency of the operation signal by applying the calculated deviation amount to the internal oscillation circuit.

続いて、第1のクロック信号CLKAの位相とシリアルクロックSCLの位相とのずれについて説明する。そこで、実施の形態1にかかる受信回路1の動作を説明するタイミングチャートを図3に示す。図3では、シリアルクロックSCLに対して3つの位相を有する第1のクロック信号CLKAを示した。まず、[1]で示される第1のクロック信号CLKAは、理想とする位相と同じ位相を有するものであり、[2]で示される第1のクロック信号CLKAは、理想とする位相に対して進んだ位相を有するものであり、[3]で示される第1のクロック信号CLKAは、理想とする位相に対して遅れた位相を有するものである。つまり、[1]で示される第1のクロック信号CLKAは、理想する周波数を有するものであり、[2]で示される第1のクロック信号CLKAは、理想とする周波数よりも高い周波数を有するものであり、[3]で示される第1のクロック信号CLKAは、理想とする周波数よりも低い周波数を有するものである。   Next, a difference between the phase of the first clock signal CLKA and the phase of the serial clock SCL will be described. FIG. 3 shows a timing chart for explaining the operation of the receiving circuit 1 according to the first embodiment. FIG. 3 shows the first clock signal CLKA having three phases with respect to the serial clock SCL. First, the first clock signal CLKA indicated by [1] has the same phase as the ideal phase, and the first clock signal CLKA indicated by [2] The first clock signal CLKA indicated by [3] has a phase delayed from the ideal phase. That is, the first clock signal CLKA indicated by [1] has an ideal frequency, and the first clock signal CLKA indicated by [2] has a higher frequency than the ideal frequency. The first clock signal CLKA indicated by [3] has a frequency lower than the ideal frequency.

また、図3で示す例では、第1のクロック信号CLKAの周波数の理論値を示す第1の周波数値CLKA_fと、シリアルクロックSCLの周波数の理論値を示す第2の周波数値CLKB_fと、の比が0.11である場合を示すものである。さらに、図3に示す例では、位相差計算部23で計算される位相誤差値Pと、キャリー発生期間及びキャリー非発生期間を示した。   In the example shown in FIG. 3, the ratio between the first frequency value CLKA_f indicating the theoretical value of the frequency of the first clock signal CLKA and the second frequency value CLKB_f indicating the theoretical value of the frequency of the serial clock SCL. This shows the case where is 0.11. Further, in the example shown in FIG. 3, the phase error value P calculated by the phase difference calculation unit 23, the carry generation period and the carry non-occurrence period are shown.

図3に示すように、第1のクロック信号CLKAの周波数が理論値と同じであれば、キャリー発生期間にシリアルクロックSCLのクロックエッジが入力される。一方、第1のクロック信号CLKAの周波数が理論値に対して高い或いは低い場合、キャリー非発生期間にシリアルクロックSCLのクロックエッジが入力される可能性がある。   As shown in FIG. 3, if the frequency of the first clock signal CLKA is the same as the theoretical value, the clock edge of the serial clock SCL is input during the carry generation period. On the other hand, when the frequency of the first clock signal CLKA is higher or lower than the theoretical value, there is a possibility that the clock edge of the serial clock SCL is input during the carry non-occurrence period.

シリアルクロックSCLのクロックエッジがキャリー非発生期間に入力される確率は、第1のクロック信号CLKAの周波数の理論値との周波数誤差量の大きさによって異なる。クロック補正部10では、シリアルクロックSCLのクロックエッジの入力タイミングとキャリー発生期間との関係と、位相誤差値Pの大きさとに基づき第1のクロック信号CLKAの周波数誤差量を算出する。   The probability that the clock edge of the serial clock SCL is input during the carry non-occurrence period differs depending on the magnitude of the frequency error amount from the theoretical value of the frequency of the first clock signal CLKA. The clock correction unit 10 calculates the frequency error amount of the first clock signal CLKA based on the relationship between the input timing of the clock edge of the serial clock SCL and the carry generation period and the magnitude of the phase error value P.

そこで、周波数誤差計算部26における周波数誤差量の計算方法について詳細に説明する。図4にキャリー発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図を示す。図4に示すように、キャリー発生期間のうち前半にシリアルクロックSCLの理論的な遷移タイミングがあり、かつ、キャリー発生期間中にシリアルクロックSCLのクロックエッジが入力された場合、周波数誤差計算部26は、周波数誤差量として1からキャリー発生期間の開始時点の位相誤差値Pを引いた値(Δt1=1−P)を、遷移カウント値nで除算した値(Δt1/n)を算出する。この場合、+Δt1/n以下の周波数誤差が発生していると判定できる。   Therefore, a method for calculating the frequency error amount in the frequency error calculator 26 will be described in detail. FIG. 4 illustrates a frequency error amount when the clock edge of the input signal is input during the carry generation period. As shown in FIG. 4, when there is a theoretical transition timing of the serial clock SCL in the first half of the carry generation period and the clock edge of the serial clock SCL is input during the carry generation period, the frequency error calculation unit 26 Calculates a value (Δt1 / n) obtained by dividing a value (Δt1 = 1−P) obtained by subtracting the phase error value P at the start of the carry generation period from 1 as a frequency error amount by the transition count value n. In this case, it can be determined that a frequency error of + Δt1 / n or less has occurred.

次いで、図5にキャリー発生期間の直前のキャリー非発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図を示す。図5に示すように、キャリー発生期間の直前のキャリー発生期間にシリアルクロックSCLのクロックエッジが入力された場合、周波数誤差計算部26は、キャリー発生期間の開始時点の位相誤差値Pを用いて、周波数誤差量として1から位相誤差値Pを引いた値(Δt2=1−P)を、遷移カウント値nで除算した値(Δt2/n)を算出する。この場合、+Δt2/n以上の周波数誤差が発生していると判定できる。   Next, FIG. 5 is a diagram for explaining the frequency error amount when the clock edge of the input signal is input during the carry non-occurrence period immediately before the carry generation period. As shown in FIG. 5, when the clock edge of the serial clock SCL is input in the carry generation period immediately before the carry generation period, the frequency error calculator 26 uses the phase error value P at the start of the carry generation period. As a frequency error amount, a value (Δt2 / n) obtained by dividing a value obtained by subtracting the phase error value P from 1 (Δt2 = 1−P) by the transition count value n is calculated. In this case, it can be determined that a frequency error of + Δt2 / n or more has occurred.

次いで、図6にキャリー発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図を示す。図6に示すように、キャリー発生期間のうち後半にシリアルクロックSCLの理論的な遷移タイミングがあり、かつ、キャリー発生期間中にシリアルクロックSCLのクロックエッジが入力された場合、周波数誤差計算部26は、周波数誤差量としてキャリー発生期間の終了時点の位相誤差値P(Δt3=P)を、遷移カウント値nで除算した値(Δt3/n)を算出する。この場合、−Δt3/n以下の周波数誤差が発生していると判定できる。   Next, FIG. 6 is a diagram for explaining the frequency error amount when the clock edge of the input signal is input during the carry generation period. As shown in FIG. 6, when there is a theoretical transition timing of the serial clock SCL in the second half of the carry generation period and the clock edge of the serial clock SCL is input during the carry generation period, the frequency error calculation unit 26 Calculates a value (Δt3 / n) obtained by dividing the phase error value P (Δt3 = P) at the end of the carry generation period by the transition count value n as the frequency error amount. In this case, it can be determined that a frequency error of −Δt3 / n or less has occurred.

次いで、図7にキャリー発生期間の直後のキャリー非発生期間中に入力信号のクロックエッジが入力された場合の周波数誤差量を説明する図を示す。図7に示すように、キャリー発生期間の直後のキャリー発生期間にシリアルクロックSCLのクロックエッジが入力された場合、周波数誤差計算部26は、周波数誤差量としてキャリー発生期間の終了時点の位相誤差値P(Δt4=P)を、遷移カウント値nで除算した値(Δt4/n)を算出する。この場合、−Δt4/n以上の周波数誤差が発生していると判定できる。   Next, FIG. 7 is a diagram for explaining the frequency error amount when the clock edge of the input signal is input during the carry non-occurrence period immediately after the carry generation period. As shown in FIG. 7, when the clock edge of the serial clock SCL is input in the carry generation period immediately after the carry generation period, the frequency error calculation unit 26 uses the phase error value at the end of the carry generation period as the frequency error amount. A value (Δt4 / n) obtained by dividing P (Δt4 = P) by the transition count value n is calculated. In this case, it can be determined that a frequency error of −Δt4 / n or more has occurred.

なお、周波数誤差計算部26は、キャリー発生期間及びその前後のキャリー非発生期間中にシリアルクロックSCLが入力されなかった場合周波数誤差値の計算は行わないものとする。   Note that the frequency error calculation unit 26 does not calculate the frequency error value when the serial clock SCL is not input during the carry occurrence period and the carry non-occurrence periods before and after the carry occurrence period.

続いて、上記のような計算方法によって算出された周波数誤差値に基づくずれ量MODの算出方法について説明する。上記計算方法では、位相誤差値Pにより算出される値を遷移カウント値nによって除算する。つまり、周波数誤差計算部26で算出される周波数誤差量は、遷移カウント値nが大きくなるほど小さくなるという特徴を有する。また、図4〜図7を参照して説明したように、周波数誤差計算部26は、実際の周波数誤差が算出された周波数誤差値以上であるか以下であるかを示すものである。このようなことから、周波数誤差計算部26において反復して周波数誤差値を算出することで周波数誤差値が所定の範囲に収束する。そこで、周波数判定部27では、周波数誤差値の範囲の上限値と下限値とが所定の範囲に収束した時点における周波数誤差値の範囲の中心値をずれ量として算出する。そこで、図8〜図10に実施の形態1にかかる半導体装置が算出するずれ量を説明する図を示す。この図8〜図10では、縦方向に時間が経過するものとする。   Next, a calculation method of the shift amount MOD based on the frequency error value calculated by the above calculation method will be described. In the above calculation method, the value calculated by the phase error value P is divided by the transition count value n. That is, the frequency error amount calculated by the frequency error calculation unit 26 has a feature that it decreases as the transition count value n increases. As described with reference to FIGS. 4 to 7, the frequency error calculation unit 26 indicates whether the actual frequency error is greater than or less than the calculated frequency error value. For this reason, the frequency error value converges in a predetermined range by repeatedly calculating the frequency error value in the frequency error calculation unit 26. Therefore, the frequency determination unit 27 calculates the center value of the frequency error value range at the time when the upper limit value and the lower limit value of the frequency error value range converge to a predetermined range as a deviation amount. FIG. 8 to FIG. 10 are diagrams for explaining the deviation amounts calculated by the semiconductor device according to the first embodiment. 8 to 10, it is assumed that time elapses in the vertical direction.

図8にシリアルクロックSCLの周波数が理想値である場合において実施の形態1にかかる半導体装置が算出するずれ量を説明するための図を示す。図8に示すように、タイミング(a)において、周波数判定部27は、その時点で算出された周波数誤差値X1を取得する。図8では、タイミング(a)において算出される周波数誤差値X1は、Δt1/naの大きさを有する。   FIG. 8 is a diagram for explaining the amount of deviation calculated by the semiconductor device according to the first embodiment when the frequency of the serial clock SCL is an ideal value. As shown in FIG. 8, at the timing (a), the frequency determination unit 27 acquires the frequency error value X1 calculated at that time. In FIG. 8, the frequency error value X1 calculated at the timing (a) has a magnitude of Δt1 / na.

続いて、タイミング(b)において、周波数判定部27は、その時点で算出された周波数誤差値X2を取得する。図8では、タイミング(b)において算出される周波数誤差値X1は、Δt1/nbの大きさを有する。これにより、周波数誤差値の範囲としてX2〜X1の範囲が算出される。このタイミング(b)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲Xよりも大きいため、クロック補正部10はずれ量の算出処理を継続する。   Subsequently, at timing (b), the frequency determination unit 27 acquires the frequency error value X2 calculated at that time. In FIG. 8, the frequency error value X1 calculated at the timing (b) has a magnitude of Δt1 / nb. Thereby, the range of X2 to X1 is calculated as the range of the frequency error value. At this timing (b), since the size of the range of the frequency error value is larger than the predetermined range X set in advance, the clock correction unit 10 continues the shift amount calculation process.

続いて、タイミング(c)において、周波数判定部27は、その時点で算出された周波数誤差値X3を取得する。図8では、タイミング(c)において算出される周波数誤差値X3は、Δt1/ncの大きさを有する。これにより、周波数誤差値の範囲としてX2〜X3の範囲が算出される。この周波数誤差値X3は、遷移カウント値nがタイミング(a)の時点よりも大きいため、タイミング(a)で算出される周波数誤差値X1よりも小さくなる。このタイミング(c)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲Xよりも大きいため、クロック補正部10はずれ量の算出処理を継続する。   Subsequently, at timing (c), the frequency determination unit 27 acquires the frequency error value X3 calculated at that time. In FIG. 8, the frequency error value X3 calculated at the timing (c) has a magnitude of Δt1 / nc. Thereby, the range of X2 to X3 is calculated as the range of the frequency error value. The frequency error value X3 is smaller than the frequency error value X1 calculated at the timing (a) because the transition count value n is larger than the timing (a). At this timing (c), since the size of the range of the frequency error value is larger than the predetermined range X set in advance, the clock correction unit 10 continues the shift amount calculation process.

続いて、タイミング(d)において、周波数判定部27は、その時点で算出された周波数誤差値X4を取得する。図8では、タイミング(d)において算出される周波数誤差値X4は、Δt3/ndの大きさを有する。この周波数誤差値X4は、遷移カウント値nがタイミング(b)の時点よりも大きいため、タイミング(b)で算出される周波数誤差値X2よりも小さくなる。このタイミング(d)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲X以下の大きさとなるため、クロック補正部10はずれ量の算出処理を停止し、ずれ量MODの大きさを確定する。図8に示す例では、周波数誤差値の範囲(X4〜X3)の中心値が0ppmとなっているため、第1のクロック信号CLKAの理論値に対するずれ量は0ppmと算出される。   Subsequently, at the timing (d), the frequency determination unit 27 acquires the frequency error value X4 calculated at that time. In FIG. 8, the frequency error value X4 calculated at the timing (d) has a magnitude of Δt3 / nd. The frequency error value X4 is smaller than the frequency error value X2 calculated at the timing (b) because the transition count value n is larger than the timing (b). At this timing (d), the frequency error value range is equal to or smaller than a predetermined range X set in advance, so that the clock correction unit 10 stops the deviation amount calculation process and sets the magnitude of the deviation amount MOD. Determine. In the example shown in FIG. 8, since the center value of the frequency error value range (X4 to X3) is 0 ppm, the amount of deviation from the theoretical value of the first clock signal CLKA is calculated as 0 ppm.

次いで、図9にシリアルクロックSCLの周波数が理想値よりも高い場合において実施の形態1にかかる半導体装置が算出するずれ量を説明するための図を示す。図9に示すように、タイミング(a)において、周波数判定部27は、その時点で算出された周波数誤差値X1を取得する。図9では、タイミング(a)において算出される周波数誤差値X1は、Δt1/naの大きさを有する。   Next, FIG. 9 is a diagram for explaining a deviation amount calculated by the semiconductor device according to the first embodiment when the frequency of the serial clock SCL is higher than an ideal value. As shown in FIG. 9, at the timing (a), the frequency determination unit 27 acquires the frequency error value X1 calculated at that time. In FIG. 9, the frequency error value X1 calculated at the timing (a) has a magnitude of Δt1 / na.

続いて、タイミング(b)において、周波数判定部27は、その時点で算出された周波数誤差値X2を取得する。図9では、タイミング(b)において算出される周波数誤差値X1は、Δt3/nbの大きさを有する。これにより、周波数誤差値の範囲としてX2〜X1の範囲が算出される。このタイミング(b)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲Xよりも大きいため、クロック補正部10はずれ量の算出処理を継続する。   Subsequently, at timing (b), the frequency determination unit 27 acquires the frequency error value X2 calculated at that time. In FIG. 9, the frequency error value X1 calculated at the timing (b) has a magnitude of Δt3 / nb. Thereby, the range of X2 to X1 is calculated as the range of the frequency error value. At this timing (b), since the size of the range of the frequency error value is larger than the predetermined range X set in advance, the clock correction unit 10 continues the shift amount calculation process.

続いて、タイミング(c)において、周波数判定部27は、その時点で算出された周波数誤差値X3を取得する。図9では、タイミング(c)において算出される周波数誤差値X3は、Δt2/ncの大きさを有する。また、このタイミング(c)では、キャリー発生期間の直前のキャリー非発生期間にシリアルクロックSCLのクロックエッジが入力される。そのため、タイミング(c)において算出される周波数誤差値により、第1のクロック信号CLKAの周波数が高くずれていることが認識される。これにより、周波数誤差値の範囲としてX3〜X1の範囲が算出される。この周波数誤差値X3は、遷移カウント値nがタイミング(a)の時点よりも大きいため、タイミング(a)で算出される周波数誤差値X1よりも小さくなる。このタイミング(c)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲Xよりも大きいため、クロック補正部10はずれ量の算出処理を継続する。また、タイミング(c)において、第1のクロック信号CLKAの周波数が理論値よりも高いことが認識されるため、これ以降周波数誤差計算部26及び周波数判定部27は、クロック信号CLKAの周波数が高い方向にずれていることを前提に計算を進める。   Subsequently, at timing (c), the frequency determination unit 27 acquires the frequency error value X3 calculated at that time. In FIG. 9, the frequency error value X3 calculated at the timing (c) has a magnitude of Δt2 / nc. At this timing (c), the clock edge of the serial clock SCL is input in the carry non-occurrence period immediately before the carry generation period. Therefore, it is recognized that the frequency of the first clock signal CLKA is highly shifted due to the frequency error value calculated at the timing (c). Thereby, the range of X3 to X1 is calculated as the range of the frequency error value. The frequency error value X3 is smaller than the frequency error value X1 calculated at the timing (a) because the transition count value n is larger than the timing (a). At this timing (c), since the size of the range of the frequency error value is larger than the predetermined range X set in advance, the clock correction unit 10 continues the shift amount calculation process. Further, since it is recognized that the frequency of the first clock signal CLKA is higher than the theoretical value at the timing (c), the frequency error calculation unit 26 and the frequency determination unit 27 thereafter have a high frequency of the clock signal CLKA. The calculation proceeds on the assumption that the direction is deviated.

続いて、タイミング(d)において、周波数判定部27は、その時点で算出された周波数誤差値X4を取得する。図9では、タイミング(d)において算出される周波数誤差値X4は、Δt1/ndの大きさを有する。この周波数誤差値X4は、遷移カウント値nがタイミング(a)の時点よりも大きいため、タイミング(a)で算出される周波数誤差値X1よりも小さくなる。このタイミング(d)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲X以下の大きさとなるため、クロック補正部10はずれ量の算出処理を停止し、ずれ量MODの大きさを確定する。図9に示す例では、周波数誤差値の範囲(X3〜X4)の中心値が+Yppmとなっているため、第1のクロック信号CLKAの理論値に対するずれ量は+Yppmと算出される。   Subsequently, at the timing (d), the frequency determination unit 27 acquires the frequency error value X4 calculated at that time. In FIG. 9, the frequency error value X4 calculated at timing (d) has a magnitude of Δt1 / nd. The frequency error value X4 is smaller than the frequency error value X1 calculated at the timing (a) because the transition count value n is larger than the timing (a). At this timing (d), the frequency error value range is equal to or smaller than a predetermined range X set in advance, so that the clock correction unit 10 stops the deviation amount calculation process and sets the magnitude of the deviation amount MOD. Determine. In the example shown in FIG. 9, since the center value of the frequency error value range (X3 to X4) is + Yppm, the amount of deviation from the theoretical value of the first clock signal CLKA is calculated as + Yppm.

次いで、図10にシリアルクロックSCLの周波数が理想値よりも低い場合において実施の形態1にかかる半導体装置が算出するずれ量を説明するための図を示す。図10に示すように、タイミング(a)において、周波数判定部27は、その時点で算出された周波数誤差値X1を取得する。図10では、タイミング(a)において算出される周波数誤差値X1は、Δt1/naの大きさを有する。   Next, FIG. 10 is a diagram for explaining a deviation amount calculated by the semiconductor device according to the first embodiment when the frequency of the serial clock SCL is lower than the ideal value. As shown in FIG. 10, at the timing (a), the frequency determination unit 27 acquires the frequency error value X1 calculated at that time. In FIG. 10, the frequency error value X1 calculated at the timing (a) has a magnitude of Δt1 / na.

続いて、タイミング(b)において、周波数判定部27は、その時点で算出された周波数誤差値X2を取得する。図10では、タイミング(b)において算出される周波数誤差値X2は、Δt3/nbの大きさを有する。これにより、周波数誤差値の範囲としてX2〜X1の範囲が算出される。このタイミング(b)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲Xよりも大きいため、クロック補正部10はずれ量の算出処理を継続する。   Subsequently, at timing (b), the frequency determination unit 27 acquires the frequency error value X2 calculated at that time. In FIG. 10, the frequency error value X2 calculated at the timing (b) has a magnitude of Δt3 / nb. Thereby, the range of X2 to X1 is calculated as the range of the frequency error value. At this timing (b), since the size of the range of the frequency error value is larger than the predetermined range X set in advance, the clock correction unit 10 continues the shift amount calculation process.

続いて、タイミング(c)において、周波数判定部27は、その時点で算出された周波数誤差値X3を取得する。図10では、タイミング(c)において算出される周波数誤差値X3は、Δt4/ncの大きさを有する。また、このタイミング(c)では、キャリー発生期間の直後のキャリー非発生期間にシリアルクロックSCLのクロックエッジが入力される。そのため、タイミング(c)において算出される周波数誤差値により、第1のクロック信号CLKAの周波数が低くずれていることが認識される。これにより、周波数誤差値の範囲としてX3〜X2の範囲が算出される。この周波数誤差値X3は、遷移カウント値nがタイミング(a)の時点よりも大きいため、タイミング(a)で算出される周波数誤差値X1よりも小さくなる。このタイミング(c)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲Xよりも大きいため、クロック補正部10はずれ量の算出処理を継続する。また、タイミング(c)において、第1のクロック信号CLKAの周波数が理論値よりも低いことが認識されるため、これ以降周波数誤差計算部26及び周波数判定部27は、クロック信号CLKAの周波数が低い方向にずれていることを前提に計算を進める。   Subsequently, at timing (c), the frequency determination unit 27 acquires the frequency error value X3 calculated at that time. In FIG. 10, the frequency error value X3 calculated at the timing (c) has a magnitude of Δt4 / nc. At this timing (c), the clock edge of the serial clock SCL is input in the carry non-occurrence period immediately after the carry generation period. For this reason, it is recognized that the frequency of the first clock signal CLKA is shifted low due to the frequency error value calculated at the timing (c). Thereby, the range of X3 to X2 is calculated as the range of the frequency error value. The frequency error value X3 is smaller than the frequency error value X1 calculated at the timing (a) because the transition count value n is larger than the timing (a). At this timing (c), since the size of the range of the frequency error value is larger than the predetermined range X set in advance, the clock correction unit 10 continues the shift amount calculation process. Further, since it is recognized that the frequency of the first clock signal CLKA is lower than the theoretical value at the timing (c), the frequency error calculation unit 26 and the frequency determination unit 27 thereafter have a low frequency of the clock signal CLKA. The calculation proceeds on the assumption that the direction is deviated.

続いて、タイミング(d)において、周波数判定部27は、その時点で算出された周波数誤差値X4を取得する。図10では、タイミング(d)において算出される周波数誤差値X4は、Δt3/ndの大きさを有する。この周波数誤差値X4は、遷移カウント値nがタイミング(b)の時点よりも大きいため、タイミング(b)で算出される周波数誤差値X2よりも小さくなる。このタイミング(d)では、周波数誤差値の範囲の大きさが予め設定した所定の範囲X以下の大きさとなるため、クロック補正部10はずれ量の算出処理を停止し、ずれ量MODの大きさを確定する。図10に示す例では、周波数誤差値の範囲(X3〜X4)の中心値が−Yppmとなっているため、第1のクロック信号CLKAの理論値に対するずれ量は−Yppmと算出される。   Subsequently, at the timing (d), the frequency determination unit 27 acquires the frequency error value X4 calculated at that time. In FIG. 10, the frequency error value X4 calculated at timing (d) has a magnitude of Δt3 / nd. The frequency error value X4 is smaller than the frequency error value X2 calculated at the timing (b) because the transition count value n is larger than the timing (b). At this timing (d), the frequency error value range is equal to or smaller than a predetermined range X set in advance, so that the clock correction unit 10 stops the deviation amount calculation process and sets the magnitude of the deviation amount MOD. Determine. In the example shown in FIG. 10, since the center value of the frequency error value range (X3 to X4) is −Yppm, the amount of deviation from the theoretical value of the first clock signal CLKA is calculated as −Yppm.

上記説明より、実施の形態1にかかる受信回路1では、クロック補正部10が自半導体装置に供給される第1のクロック信号CLKAに基づき予め設定される周波数の理論値に基づきシリアルクロックSCLのクロックエッジが入力されるキャリー発生期間を計算する。つまり、クロック補正部10において算出されるキャリー発生期間は、第1のクロック信号CLKAの周波数に応じて時間的に前後し、かつ、期間の長さが変化する。また、クロック補正部10は、第1のクロック信号CLKAよりも精度の高い第2のクロック信号CLKBに基づき生成されるシリアルクロックSCLのクロックエッジがキャリー発生期間に入力されたか、キャリー非発生期間に入力されたかを認識する。そして、クロック補正部10は、シリアルクロックSCLが入力されるタイミングと、キャリー発生期間に算出される位相誤差値Pと、遷移カウント値nとに基づき周波数誤差の範囲を算出し、当該周波数誤差の範囲に基づき第1のクロック信号CLKAの周波数の理論値からのずれ量MODを算出する。   From the above description, in the receiving circuit 1 according to the first embodiment, the clock correction unit 10 generates the clock of the serial clock SCL based on the theoretical value of the frequency set in advance based on the first clock signal CLKA supplied to the semiconductor device. The carry generation period in which the edge is input is calculated. That is, the carry generation period calculated by the clock correction unit 10 varies in time according to the frequency of the first clock signal CLKA, and the length of the period changes. Further, the clock correction unit 10 determines whether the clock edge of the serial clock SCL generated based on the second clock signal CLKB, which is more accurate than the first clock signal CLKA, is input during the carry generation period or during the carry non-generation period. Recognize whether it was entered. The clock correction unit 10 calculates a frequency error range based on the input timing of the serial clock SCL, the phase error value P calculated during the carry generation period, and the transition count value n, and Based on the range, a deviation MOD from the theoretical value of the frequency of the first clock signal CLKA is calculated.

これにより、実施の形態1にかかる受信回路1では、チューナー部等に入力される受信信号を待つことなく、受信システムの内部で生成されるシリアルクロックSCLに基づき早期にずれ量MODを算出することができる。また、受信回路1は、当該ずれ量に基づきアナログPLL回路11及びデジタルPLL回路13が生成する動作信号の周波数を補正することができる。   As a result, the receiving circuit 1 according to the first embodiment calculates the shift amount MOD at an early stage based on the serial clock SCL generated inside the receiving system without waiting for a received signal input to the tuner unit or the like. Can do. In addition, the receiving circuit 1 can correct the frequency of the operation signal generated by the analog PLL circuit 11 and the digital PLL circuit 13 based on the deviation amount.

一方、受信回路1と共に用いられるホストIC2等の他の半導体装置において生成した基準信号と、受信回路1に供給される第1のクロック信号CLKAと、のクロック数を比較して第1のクロック信号CLKAの誤差を算出することもできる。しかし、この場合、10ppmの誤差を検出するために10万クロックのクロック数を有するため、実施の形態1にかかる受信回路1ほど高速に第1のクロック信号CLKAの周波数のずれ量を算出することができない。   On the other hand, the first clock signal is obtained by comparing the number of clocks of the reference signal generated in another semiconductor device such as the host IC 2 used together with the receiving circuit 1 and the first clock signal CLKA supplied to the receiving circuit 1. The error of CLKA can also be calculated. However, in this case, since the number of clocks is 100,000 in order to detect an error of 10 ppm, the frequency shift amount of the first clock signal CLKA is calculated as fast as the receiving circuit 1 according to the first embodiment. I can't.

また、他の半導体装置から別途基準信号を受信し、当該基準信号と第1のクロック信号CLKAとのクロック数の差に基づき第1のクロック信号CLKAの周波数のずれ量を算出する場合、受信システムの信号線及び受信回路1等の端子数が増加数する問題が発生する。しかし、実施の形態1にかかる受信回路1は、ずれ量MODの算出に用いる高精度な入力信号として制御信号の伝達に用いられる信号の1つとして用いられるシリアルクロックSCLを用いる。これにより、実施の形態1にかかる受信回路1は、入力信号を伝達する信号線を別途準備する必要がないため、受信システムの基盤面積及び半導体装置の端子数を削減することができる。   In addition, when a reference signal is separately received from another semiconductor device and the frequency shift amount of the first clock signal CLKA is calculated based on a difference in the number of clocks between the reference signal and the first clock signal CLKA, the receiving system There arises a problem that the number of terminals of the signal line and the receiving circuit 1 increases. However, the receiving circuit 1 according to the first embodiment uses the serial clock SCL used as one of the signals used for transmission of the control signal as a highly accurate input signal used for calculating the shift amount MOD. Thereby, since the receiving circuit 1 according to the first embodiment does not need to separately prepare a signal line for transmitting an input signal, it is possible to reduce the base area of the receiving system and the number of terminals of the semiconductor device.

また、クロック数の比較により第1のクロック信号CLKAの周波数のずれ量を算出する場合、基準信号として第1のクロック信号CLKAと同等の周波数のクロック信号を伝達する必要がある。この場合、基準信号の周波数が高くなる傾向にあり、受信システムの不要輻射が増加する問題が生じる。しかし、実施の形態1にかかる受信システムでは、受信回路1において周波数のずれ量の算出に用いられるシリアルクロックSCLは、第1のクロック信号CLKAの周波数の2分の1以下の周波数である。より具体的には、第1のクロック信号CLKAの周波数は28MHz程度であり、シリアルクロックSCLの周波数は400Hz程度である。このようなことから、実施の形態1にかかる受信システムでは、ずれ量の算出に用いられる入力信号の周波数を低く設定し、不要輻射を抑制することができる。   In addition, when calculating the frequency shift amount of the first clock signal CLKA by comparing the number of clocks, it is necessary to transmit a clock signal having the same frequency as the first clock signal CLKA as a reference signal. In this case, the frequency of the reference signal tends to increase, and there arises a problem that unnecessary radiation of the receiving system increases. However, in the receiving system according to the first embodiment, the serial clock SCL used for calculating the frequency shift amount in the receiving circuit 1 is a frequency that is half or less of the frequency of the first clock signal CLKA. More specifically, the frequency of the first clock signal CLKA is about 28 MHz, and the frequency of the serial clock SCL is about 400 Hz. For this reason, in the receiving system according to the first embodiment, it is possible to set the frequency of the input signal used for calculating the deviation amount to be low and suppress unnecessary radiation.

また、実施の形態1にかかる受信回路1では、ずれ量の算出に用いるシリアルクロックSCLの周波数を第1のクロック信号CLKAの周波数の2分の1以下とすることで、シリアルクロックSCLの遷移が発生するタイミングの理論値がキャリー発生期間の前半から後半、或いは、後半から前半にランダムに飛び越えて発生することを防止することが出来る。シリアルクロックSCLの遷移が発生するタイミングの理論値が前半から後半、或いは、後半から前半にランダムに飛び越えて発生した場合、第1のクロック信号CLKAの周波数が高いか低いかを認識することが困難になる問題がある。   In the receiving circuit 1 according to the first embodiment, the frequency of the serial clock SCL used for calculating the deviation amount is set to be equal to or less than half the frequency of the first clock signal CLKA, so that the serial clock SCL transitions. It is possible to prevent the theoretical value of the generated timing from randomly jumping from the first half to the second half of the carry generation period or from the second half to the first half. It is difficult to recognize whether the frequency of the first clock signal CLKA is high or low when the theoretical value of the timing at which the serial clock SCL transition occurs randomly jumps from the first half to the second half or from the second half to the first half. There is a problem to become.

また、ホストIC2等の他の半導体装置で生成された基準信号を受信し、当該基準信号に基づき受信回路1内で利用されるクロック信号等を生成した場合、ホストIC2における電源変動の影響により基準信号の生成過程において基準信号のジッタ特性が悪化する恐れがある。しかし、実施の形態1にかかる受信回路1は、供給される第1のクロック信号CLKAの周波数の理論値からのずれ量MODを算出して、当該ずれ量MODに基づき内部で生成するクロック信号等の周波数を補正することができる。これにより、実施の形態1にかかる受信システムでは、第1のクロック信号CLKAを生成するクロック生成部としてセラミック発振子等の低精度クロック生成素子を用いることができる。このセラミック発振子は、周波数の絶対値に対する精度は低いものの良好なジッタ特性を有するクロック信号を生成することができる。つまり、実施の形態1にかかる受信システムでは、このようなクロック生成部を用いることで、アナログPLL回路11及びデジタルPLL回路13が生成するクロック信号等のジッタ特性を高めることができる。そして、受信システムのチューナー等に低ジッタの動作信号(例えば、ローカル信号)を供給することで、受信特性を向上させることができる。   In addition, when a reference signal generated by another semiconductor device such as the host IC 2 is received and a clock signal or the like used in the receiving circuit 1 is generated based on the reference signal, the reference is generated due to the influence of power supply fluctuation in the host IC 2. In the signal generation process, the jitter characteristics of the reference signal may be deteriorated. However, the receiving circuit 1 according to the first embodiment calculates the shift amount MOD from the theoretical value of the frequency of the supplied first clock signal CLKA, and generates a clock signal or the like generated internally based on the shift amount MOD. Can be corrected. Thereby, in the receiving system according to the first embodiment, a low-accuracy clock generation element such as a ceramic oscillator can be used as a clock generation unit that generates the first clock signal CLKA. This ceramic oscillator can generate a clock signal having a good jitter characteristic although the accuracy with respect to the absolute value of the frequency is low. That is, in the receiving system according to the first embodiment, by using such a clock generation unit, it is possible to improve the jitter characteristics of the clock signal generated by the analog PLL circuit 11 and the digital PLL circuit 13. The reception characteristic can be improved by supplying a low jitter operation signal (for example, a local signal) to a tuner or the like of the reception system.

また、ホストIC2等の他の半導体装置で生成された基準信号を受信し、当該基準信号に基づき受信回路1内で利用されるクロック信号等を生成した場合、他の半導体装置において基準信号を生成する発振回路等が必要になる。しかしながら、実施の形態1にかかる受信回路1を用いることで、他の半導体装置に基準信号を生成する発振回路等を別途設ける必要がない。つまり、実施の形態1にかかる受信回路1を用いることで、他の半導体装置の回路面積を小さくすることができる。   When a reference signal generated by another semiconductor device such as the host IC 2 is received and a clock signal or the like used in the receiving circuit 1 is generated based on the reference signal, the reference signal is generated in the other semiconductor device. An oscillation circuit or the like is required. However, by using the receiving circuit 1 according to the first embodiment, it is not necessary to separately provide an oscillation circuit or the like for generating a reference signal in another semiconductor device. That is, by using the receiving circuit 1 according to the first embodiment, the circuit area of another semiconductor device can be reduced.

また、他の半導体装置等から供給される基準信号等に基づき受信回路1内で利用されるクロック信号等を生成した場合、いずれか一方の回路を停止させると受信システム全体が停止してしまし、いずれか一方の回路を停止状態として消費電力を削減することができない。しかし、実施の形態1にかかる受信システムでは、ずれ量MODを算出した後は、受信回路1とホストIC2がそれぞれ独立したクロック生成部により生成されたクロック信号に基づき動作する。そのため、実施の形態1にかかる受信システムでは、いずれか一方の回路を停止し、必要な回路のみを動作させて受信システムの消費電力を削減することができる。   In addition, if a clock signal used in the receiver circuit 1 is generated based on a reference signal supplied from another semiconductor device, etc., stopping either circuit will stop the entire receiver system. Therefore, power consumption cannot be reduced by stopping one of the circuits. However, in the receiving system according to the first embodiment, after calculating the shift amount MOD, the receiving circuit 1 and the host IC 2 operate based on the clock signals generated by the independent clock generating units. Therefore, in the receiving system according to the first embodiment, it is possible to stop one of the circuits and operate only the necessary circuit to reduce the power consumption of the receiving system.

実施の形態2
実施の形態2では、クロック補正部がずれ量MODの算出に用いる入力信号としてシリアルデータSDAを用いる形態について説明する。そこで、図11に実施の形態2にかかる受信回路1aを含む受信システムのブロック図を示す。なお、実施の形態2の説明において実施の形態1と同じ構成要素については実施の形態1と同じ符号を付して説明を省略する。
Embodiment 2
In the second embodiment, a mode will be described in which serial data SDA is used as an input signal used by the clock correction unit to calculate the shift amount MOD. FIG. 11 is a block diagram of a receiving system including the receiving circuit 1a according to the second embodiment. In the description of the second embodiment, the same components as those of the first embodiment are denoted by the same reference numerals as those of the first embodiment, and the description thereof is omitted.

図11に示すように、受信回路1aは、実施の形態1にかかる受信回路1のクロック補正部10に代えてクロック補正部10aを有する。このクロック補正部10aは、実施の形態1にかかるクロック補正部10のクロックエッジサンプリング回路22に代えてクロックエッジサンプリング回路22aを有する。そして、クロックエッジサンプリング回路22aは、ずれ量MODの算出に用いる入力信号として利用するシリアルデータSDAのクロックエッジを検出してクロックエッジが入力されたことを示すクロック検出信号CLKSを出力する。   As illustrated in FIG. 11, the reception circuit 1a includes a clock correction unit 10a instead of the clock correction unit 10 of the reception circuit 1 according to the first embodiment. The clock correction unit 10a includes a clock edge sampling circuit 22a instead of the clock edge sampling circuit 22 of the clock correction unit 10 according to the first embodiment. Then, the clock edge sampling circuit 22a detects a clock edge of the serial data SDA used as an input signal used for calculating the shift amount MOD, and outputs a clock detection signal CLKS indicating that the clock edge is input.

つまり、実施の形態2にかかる受信回路1aでは、入力信号として、シリアルクロックSCLと同様に第2のクロック信号CLKBに基づき生成されるシリアルデータSDAを用いるものであり、実施の形態1にかかる受信回路1と同様の演算処理によりずれ量MODを算出することができる。   That is, in the receiving circuit 1a according to the second embodiment, serial data SDA generated based on the second clock signal CLKB is used as an input signal in the same manner as the serial clock SCL. The shift amount MOD can be calculated by the same arithmetic processing as the circuit 1.

実施の形態3
実施の形態3では、クロック補正部がずれ量MODの算出に用いる入力信号として第2のクロック信号CLKBを用いる形態について説明する。そこで、図12に実施の形態3にかかる受信回路1bを含む受信システムのブロック図を示す。なお、実施の形態3の説明において実施の形態1と同じ構成要素については実施の形態1と同じ符号を付して説明を省略する。
Embodiment 3
In the third embodiment, a mode will be described in which the clock correction unit uses the second clock signal CLKB as an input signal used to calculate the shift amount MOD. FIG. 12 is a block diagram of a receiving system including the receiving circuit 1b according to the third embodiment. In the description of the third embodiment, the same components as those of the first embodiment are denoted by the same reference numerals as those of the first embodiment, and the description thereof is omitted.

図12に示すように、受信回路1bは、実施の形態1にかかる受信回路1のクロック補正部10に代えてクロック補正部10bを有する。このクロック補正部10bは、実施の形態1にかかるクロック補正部10のクロックエッジサンプリング回路22に代えてクロックエッジサンプリング回路22bを有する。そして、クロックエッジサンプリング回路22bは、ずれ量MODの算出に用いる入力信号として利用する第2のクロック信号CLKBのクロックエッジを検出してクロックエッジが入力されたことを示すクロック検出信号CLKSを出力する。   As illustrated in FIG. 12, the reception circuit 1b includes a clock correction unit 10b instead of the clock correction unit 10 of the reception circuit 1 according to the first embodiment. The clock correction unit 10b includes a clock edge sampling circuit 22b instead of the clock edge sampling circuit 22 of the clock correction unit 10 according to the first embodiment. Then, the clock edge sampling circuit 22b detects a clock edge of the second clock signal CLKB used as an input signal used for calculating the shift amount MOD, and outputs a clock detection signal CLKS indicating that the clock edge has been input. .

つまり、実施の形態3にかかる受信回路1bでは、入力信号として、シリアルクロックSCLの生成に用いられる第2のクロック信号CLKBを用いるものであり、実施の形態1にかかる受信回路1と同様の演算処理によりずれ量MODを算出することができる。   That is, in the receiving circuit 1b according to the third embodiment, the second clock signal CLKB used for generating the serial clock SCL is used as an input signal, and the same calculation as that performed by the receiving circuit 1 according to the first embodiment. The shift amount MOD can be calculated by the processing.

この実施の形態3にかかる受信回路1bでは、第2のクロック信号CLKBを伝達するための信号線を新たに追加する必要があるが、シリアルクロックSCLよりも周波数の高い第2のクロック信号CLKBを用いることで実施の形態1にかかる受信回路1よりも高速にずれ量MODを算出することができる。なお、第2のクロック信号CLKBは、第1のクロック信号CLKAの周波数の2分の1以下の周波数を有するものであるため、実施の形態1と同様に不要輻射を削減することは可能である。   In the receiving circuit 1b according to the third embodiment, it is necessary to newly add a signal line for transmitting the second clock signal CLKB. However, the second clock signal CLKB having a frequency higher than that of the serial clock SCL is used. By using it, the shift amount MOD can be calculated faster than the receiving circuit 1 according to the first embodiment. Note that the second clock signal CLKB has a frequency equal to or lower than one half of the frequency of the first clock signal CLKA, and therefore, unnecessary radiation can be reduced as in the first embodiment. .

実施の形態4
実施の形態4では、演算回路において周波数誤差算出プログラムを実行することでクロック補正部10における演算処理を行う形態について説明する。そこで、図13に実施の形態4にかかる受信回路1cを含む受信システムのブロック図を示す。なお、実施の形態4の説明において実施の形態1と同じ構成要素については実施の形態1と同じ符号を付して説明を省略する。
Embodiment 4
In the fourth embodiment, a description will be given of a mode in which arithmetic processing in the clock correction unit 10 is performed by executing a frequency error calculation program in an arithmetic circuit. FIG. 13 is a block diagram of a receiving system including the receiving circuit 1c according to the fourth embodiment. In the description of the fourth embodiment, the same components as those of the first embodiment are denoted by the same reference numerals as those of the first embodiment, and the description thereof is omitted.

図13に示すように、受信回路1cは、実施の形態1にかかるクロック補正部10に代えてクロック補正部50を有する。このクロック補正部50は、周波数誤差算出プログラムにより位相差計算部23、カウンタ24、遷移判定部25、周波数誤差計算部26及び周波数判定部27を実現する演算回路51を有する。また、クロック補正部50は、演算回路51で実行される周波数誤差算出プログラムを格納するプログラム格納部52を有する。なお、クロック補正部50においても、通信インタフェース回路21及びクロックエッジサンプリング回路22を有する。   As illustrated in FIG. 13, the reception circuit 1 c includes a clock correction unit 50 instead of the clock correction unit 10 according to the first embodiment. The clock correction unit 50 includes an arithmetic circuit 51 that implements a phase difference calculation unit 23, a counter 24, a transition determination unit 25, a frequency error calculation unit 26, and a frequency determination unit 27 by a frequency error calculation program. The clock correction unit 50 also includes a program storage unit 52 that stores a frequency error calculation program executed by the arithmetic circuit 51. The clock correction unit 50 also includes a communication interface circuit 21 and a clock edge sampling circuit 22.

なお、実施の形態4にかかる受信回路1cは、実施の形態1と同様に第1のレジスタ(例えば、レジスタ231)と、第2のレジスタ(例えば、レジスタ232)とをクロック補正部50に含む。レジスタ231には、第1のクロック生成部(例えば、低精度クロック信号生成部3)により生成された第1のクロック信号CLKAの理論値を示す第1の周波数値が格納される。また、レジスタ232には、低精度クロック信号生成部3よりも周波数の絶対値精度が高い第2のクロック生成部(例えば、高精度クロック信号生成部4)により生成された第2のクロック信号第2のクロック信号CLKBのクロックエッジと同期したクロックエッジを有する入力信号の周波数の理論値を示す第2の周波数値が格納される。そして、演算回路51は、第1のクロック信号CLKAに基づき演算処理を行う。   Note that the receiving circuit 1c according to the fourth embodiment includes the first register (for example, the register 231) and the second register (for example, the register 232) in the clock correction unit 50 as in the first embodiment. . The register 231 stores a first frequency value indicating a theoretical value of the first clock signal CLKA generated by the first clock generation unit (for example, the low-accuracy clock signal generation unit 3). In the register 232, the second clock signal generated by the second clock generation unit (for example, the high-accuracy clock signal generation unit 4) having higher frequency absolute value accuracy than the low-accuracy clock signal generation unit 3 is stored. A second frequency value indicating the theoretical value of the frequency of the input signal having a clock edge synchronized with the clock edge of the second clock signal CLKB is stored. The arithmetic circuit 51 performs arithmetic processing based on the first clock signal CLKA.

演算回路51は、周波数誤差算出プログラムに基づき第1のクロック信号の周波数の理論値とのずれ量を算出する。より具体的には、演算回路51は、第1のクロック信号CLKAに同期して、第1のクロック信号CLKAの周期のうちシリアルクロックSCLのクロックエッジが入力される可能性のある周期を示す第1の期間(例えば、キャリー発生期間)を第1の周波数値及び前記第2の周波数値の比から算出する。この処理は、実施の形態1にかかる位相差計算部23における処理と同等の演算処理である。演算回路51は、キャリー発生期間における第1のクロック信号CLKAのクロックエッジとシリアルクロックSCLのクロックエッジとの時間差の理論値を示す位相誤差値Pを第1の周波数値CLKA_f及び第2の周波数値CLKB_fの比から算出する。この処理は、実施の形態1にかかる位相差計算部23における処理と同等の演算処理である。演算回路51は、シリアルクロックSCLのクロックエッジがキャリー発生期間中に発生したか、キャリー発生期間以外の第2の期間(例えば、キャリー非発生期間)に発生したかを判定して遷移判定値STを生成する。この処理は、実施の形態1にかかる遷移判定部25における処理と同等の演算処理である。演算回路51は、遷移判定値ST及び位相誤差値Pに基づき第1のクロック信号CLKAの周波数の理論値からの周波数誤差量を算出する。この処理は、実施の形態1にかかる周波数誤差計算部26における処理と同等の演算処理である。演算回路51は、周波数誤差量の上限値と下限値とに基づき第1のクロック信号CLKAの周波数の理論値からのずれ量MODを算出する。この処理は、実施の形態1にかかる周波数判定部27と同等の処理である。なお、実施の形態4においても、ずれ量MODは、レジスタ271に格納される。   The arithmetic circuit 51 calculates the amount of deviation from the theoretical value of the frequency of the first clock signal based on the frequency error calculation program. More specifically, the arithmetic circuit 51 synchronizes with the first clock signal CLKA, and indicates a cycle in which the clock edge of the serial clock SCL may be input in the cycle of the first clock signal CLKA. One period (for example, a carry generation period) is calculated from the ratio of the first frequency value and the second frequency value. This process is an arithmetic process equivalent to the process in the phase difference calculation unit 23 according to the first embodiment. The arithmetic circuit 51 uses the phase error value P indicating the theoretical value of the time difference between the clock edge of the first clock signal CLKA and the clock edge of the serial clock SCL in the carry generation period as the first frequency value CLKA_f and the second frequency value. Calculated from the ratio of CLKB_f. This process is an arithmetic process equivalent to the process in the phase difference calculation unit 23 according to the first embodiment. The arithmetic circuit 51 determines whether the clock edge of the serial clock SCL has occurred during the carry generation period or during the second period other than the carry generation period (for example, the carry non-occurrence period), and the transition determination value ST Is generated. This process is an arithmetic process equivalent to the process in the transition determination unit 25 according to the first embodiment. The arithmetic circuit 51 calculates a frequency error amount from a theoretical value of the frequency of the first clock signal CLKA based on the transition determination value ST and the phase error value P. This process is an arithmetic process equivalent to the process in the frequency error calculator 26 according to the first embodiment. The arithmetic circuit 51 calculates a deviation MOD from the theoretical value of the frequency of the first clock signal CLKA based on the upper limit value and the lower limit value of the frequency error amount. This process is equivalent to the frequency determination unit 27 according to the first embodiment. Also in the fourth embodiment, the shift amount MOD is stored in the register 271.

また、周波数誤差算出プログラムを実行する演算回路51は、遷移判定信号STに基づき第1のクロック信号CLKAの位相の理論値からのずれ方向を判定し、位相誤差値Pに基づき第1のクロック信号CLKAの周波数の理論値からの周波数誤差量を算出する。この処理は、実施の形態1にかかる周波数誤差計算部26における処理と同等の演算処理である。   The arithmetic circuit 51 that executes the frequency error calculation program determines the direction of deviation of the phase of the first clock signal CLKA from the theoretical value based on the transition determination signal ST, and determines the first clock signal based on the phase error value P. The frequency error amount from the theoretical value of the frequency of CLKA is calculated. This process is an arithmetic process equivalent to the process in the frequency error calculator 26 according to the first embodiment.

また、周波数誤差算出プログラムを実行する演算回路51は、キャリー発生期間の発生回数をカウントして遷移カウント値を生成する。そして、演算回路51は、キャリー発生期間毎に位相誤差値Pを遷移カウント値nで除算して第1のクロック信号の周波数の理論値との周波数誤差量を算出する。この処理は、実施の形態1にかかるカウンタ24及び周波数誤差計算部26における処理と同等の演算処理である。   In addition, the arithmetic circuit 51 that executes the frequency error calculation program counts the number of occurrences of the carry generation period to generate a transition count value. Then, the arithmetic circuit 51 divides the phase error value P by the transition count value n for each carry generation period to calculate a frequency error amount from the theoretical value of the frequency of the first clock signal. This processing is equivalent to the processing in the counter 24 and the frequency error calculation unit 26 according to the first embodiment.

また、周波数誤差算出プログラムを実行する演算回路51は、シリアルクロックSCLのクロックエッジがキャリー発生期間中に入力された後に、キャリー発生期間の直前のっキャリー非発生期間にシリアルクロックSCLのクロックエッジが入力された場合は第1のクロック信号CLKAの位相が理論値に対して進んでいると判断する。また、演算会と51は、キャリー発生期間の直後のキャリー非発生期間にシリアルクロックSCLのクロックエッジが入力された場合は第1のクロック信号CLKAの位相が理論値に対して遅れていると判断する。この処理は、実施の形態1にかかる周波数誤差計算部26の処理と同等の演算処理である。   In addition, the arithmetic circuit 51 that executes the frequency error calculation program sets the clock edge of the serial clock SCL in the carry non-occurrence period immediately before the carry generation period after the clock edge of the serial clock SCL is input during the carry generation period. If it is input, it is determined that the phase of the first clock signal CLKA is advanced with respect to the theoretical value. The calculation group 51 determines that the phase of the first clock signal CLKA is delayed from the theoretical value when the clock edge of the serial clock SCL is input in the carry non-occurrence period immediately after the carry generation period. To do. This process is an arithmetic process equivalent to the process of the frequency error calculation unit 26 according to the first embodiment.

また、周波数誤差算出プログラムを実行する演算回路51は、周波数誤差計算部26で算出された周波数誤差量の上限値と下限値との差が予め設定した所定値以下となった時点での上限値と下限値との間の値を前記ずれ量として算出する。この処理は、実施の形態1にかかる周波数判定部27の処理と同等の演算処理である。   The arithmetic circuit 51 that executes the frequency error calculation program has an upper limit value when the difference between the upper limit value and the lower limit value of the frequency error amount calculated by the frequency error calculation unit 26 is equal to or less than a predetermined value set in advance. A value between the lower limit value and the lower limit value is calculated as the deviation amount. This process is an arithmetic process equivalent to the process of the frequency determination unit 27 according to the first embodiment.

また、周波数誤差算出プログラムを実行する演算回路51は、キャリー発生期間中にシリアルクロックSCLのクロックエッジが入力され場合に遷移判定信号STを第1の状態(例えば、正常状態)とする。また、演算回路51は、キャリー非発生期間にシリアルクロックSCLのクロックエッジが入力され場合に遷移判定信号STを第2の状態(例えば、異常状態)とする。さらに、演算回路51は、シリアルクロックSCLのクロックエッジが入力されない場合に遷移判定信号を第3の状態(例えば、遷移非検出状態)とする。この処理は、実施の形態1にかかる遷移判定部25の処理と同等の演算処理である。   The arithmetic circuit 51 that executes the frequency error calculation program sets the transition determination signal ST to the first state (for example, the normal state) when the clock edge of the serial clock SCL is input during the carry generation period. The arithmetic circuit 51 sets the transition determination signal ST to the second state (for example, an abnormal state) when the clock edge of the serial clock SCL is input during the carry non-occurrence period. Further, the arithmetic circuit 51 sets the transition determination signal to the third state (for example, the transition non-detection state) when the clock edge of the serial clock SCL is not input. This process is an arithmetic process equivalent to the process of the transition determination unit 25 according to the first embodiment.

そして、周波数誤差算出プログラムを実行する演算回路51は、アナログPLL回路11及びデジタルPLL回路13に算出したずれ量MODを与えて動作信号の周波数を補正する。この処理は、実施の形態1にかかる周波数判定部27の処理と同等の演算処理である。   Then, the arithmetic circuit 51 that executes the frequency error calculation program corrects the frequency of the operation signal by giving the calculated shift amount MOD to the analog PLL circuit 11 and the digital PLL circuit 13. This process is an arithmetic process equivalent to the process of the frequency determination unit 27 according to the first embodiment.

上記説明より、実施の形態1にかかるクロック補正部10における処理は、周波数誤差算出プログラム等のソフトウェアにより演算処理によっても実現することが可能である。このように、ソフトウェアによりクロック補正部10の処理を実施することで、CPUコア等を含む半導体装置により実施の形態1にかかる受信回路1を実現することができる。   From the above description, the processing in the clock correction unit 10 according to the first embodiment can also be realized by arithmetic processing using software such as a frequency error calculation program. As described above, by performing the processing of the clock correction unit 10 by software, the receiving circuit 1 according to the first embodiment can be realized by a semiconductor device including a CPU core and the like.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は既に述べた実施の形態に限定されるものではなく、その要旨を逸脱しない範囲において種々の変更が可能であることはいうまでもない。例えば、クロック補正部10は、ホストIC2に組み込むことが可能である。この場合、受信回路1側に高精度クロック信号生成部4を設け、ホストIC2側に訂正後クロック信号生成部3を設ける。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiments. However, the present invention is not limited to the embodiments already described, and various modifications can be made without departing from the scope of the invention. It goes without saying that it is possible. For example, the clock correction unit 10 can be incorporated in the host IC 2. In this case, a high-accuracy clock signal generation unit 4 is provided on the receiving circuit 1 side, and a corrected clock signal generation unit 3 is provided on the host IC 2 side.

1、1a、1b、1c 受信回路
2 ホストIC
3 低精度クロック信号生成部
4 高精度クロック信号生成部
10、10a、10b、10c、50 クロック補正部
11 アナログPLL回路
12 チューナー部
13 デジタルPLL回路
14 復調処理部
21 通信インタフェース回路
22 クロックエッジサンプリング回路
23 位相差計算部
231 レジスタ
232 レジスタ
24 カウンタ
25 遷移判定部
26 周波数誤差計算部
27 周波数判定部
271 レジスタ
31 信号処理部
32 分周回路
33 通信インタフェース回路
41 加算器
42 遅延回路
51 演算回路
52 プログラム格納部
CA キャリー信号
P 位相誤差値
n 遷移カウント値
ST 遷移判定信号
DA1 制御データ
SCL シリアルクロック
SDA シリアルデータ
CLKA 第1のクロック信号
CLKB 第2のクロック信号
CLKR 基準クロック信号
1, 1a, 1b, 1c Receiver circuit 2 Host IC
DESCRIPTION OF SYMBOLS 3 Low precision clock signal generation part 4 High precision clock signal generation part 10, 10a, 10b, 10c, 50 Clock correction part 11 Analog PLL circuit 12 Tuner part 13 Digital PLL circuit 14 Demodulation processing part 21 Communication interface circuit 22 Clock edge sampling circuit 23 phase difference calculation unit 231 register 232 register 24 counter 25 transition determination unit 26 frequency error calculation unit 27 frequency determination unit 271 register 31 signal processing unit 32 frequency divider circuit 33 communication interface circuit 41 adder 42 delay circuit 51 arithmetic circuit 52 program storage Part CA carry signal P phase error value n transition count value ST transition determination signal DA1 control data SCL serial clock SDA serial data CLKA first clock signal CLKB second clock Click signal CLKR the reference clock signal

Claims (20)

第1のクロック生成部により生成された第1のクロック信号の理論値を示す第1の周波数値を格納する第1のレジスタと、
前記第1のクロック生成部よりも周波数の絶対値精度が高い第2のクロック生成部により生成された第2のクロック信号のクロックエッジと同期したクロックエッジを有する入力信号の周波数の理論値を示す第2の周波数値を格納する第2のレジスタと、
前記第1のクロック信号に同期して動作し、前記第1のクロック信号の周期のうち前記入力信号のクロックエッジが入力される可能性のある周期を示す第1の期間と、前記第1の期間における前記第1のクロック信号のクロックエッジと前記入力信号のクロックエッジのとの時間差の理論値を示す位相誤差値と、を前記第1の周波数値及び前記第2の周波数値の比から計算する位相差計算部と、
前記入力信号のクロックエッジが前記第1の期間中に発生したか、前記第1の期間以外の第2の期間に発生したかを示す遷移判定信号を出力する遷移判定部と、
前記遷移判定信号及び前記位相誤差値に基づき前記第1のクロック信号の周波数の理論値からの周波数誤差量を算出する周波数誤差計算部と、
前記周波数誤差量の上限値と下限値とに基づき前記第1のクロック信号の周波数の理論値からのずれ量を算出する周波数判定部と、
を有する半導体装置。
A first register that stores a first frequency value indicating a theoretical value of the first clock signal generated by the first clock generation unit;
The theoretical value of the frequency of the input signal having a clock edge synchronized with the clock edge of the second clock signal generated by the second clock generator having a higher absolute frequency accuracy than that of the first clock generator. A second register for storing a second frequency value;
A first period that operates in synchronization with the first clock signal and indicates a period in which a clock edge of the input signal may be input, among the periods of the first clock signal; A phase error value indicating a theoretical value of a time difference between the clock edge of the first clock signal and the clock edge of the input signal in a period is calculated from the ratio of the first frequency value and the second frequency value. A phase difference calculator to
A transition determination unit that outputs a transition determination signal indicating whether a clock edge of the input signal occurred during the first period or a second period other than the first period;
A frequency error calculation unit that calculates a frequency error amount from a theoretical value of the frequency of the first clock signal based on the transition determination signal and the phase error value;
A frequency determination unit that calculates a deviation amount from a theoretical value of the frequency of the first clock signal based on an upper limit value and a lower limit value of the frequency error amount;
A semiconductor device.
前記入力信号は、前記第1のクロック信号の周波数の2分の1以下の周波数を有する請求項1に記載の半導体装置。   2. The semiconductor device according to claim 1, wherein the input signal has a frequency equal to or less than a half of a frequency of the first clock signal. 前記入力信号は、異なる半導体装置において前記第2のクロック信号に基づき生成される同期クロック信号と、前記同期クロック信号と同期したクロックエッジを有する制御信号と、のいずれか一方である請求項1に記載の半導体装置。   2. The input signal is any one of a synchronous clock signal generated based on the second clock signal in a different semiconductor device and a control signal having a clock edge synchronized with the synchronous clock signal. The semiconductor device described. 前記周波数誤差計算部は、前記遷移判定信号に基づき前記第1のクロック信号の位相の理論値からのずれ方向を判定し、前記位相誤差値に基づき前記第1のクロック信号の周波数の理論値からの前記ずれ量を算出する請求項1に記載の半導体装置。   The frequency error calculation unit determines a deviation direction from the theoretical value of the phase of the first clock signal based on the transition determination signal, and based on the theoretical value of the frequency of the first clock signal based on the phase error value. The semiconductor device according to claim 1, wherein the shift amount is calculated. 前記第1の期間の発生回数をカウントして遷移カウント値を生成するカウンタを有し、
前記周波数誤差計算部は、前記第1の期間毎に前記位相誤差値に基づき算出される値を前記遷移カウント値で除算して前記第1のクロック信号の周波数の理論値との前記周波数誤差量を算出する請求項1に記載の半導体装置。
A counter that counts the number of occurrences of the first period and generates a transition count value;
The frequency error calculation unit divides a value calculated based on the phase error value for each first period by the transition count value and the frequency error amount with a theoretical value of the frequency of the first clock signal. The semiconductor device according to claim 1, wherein:
前記周波数誤差計算部は、前記入力信号のクロックエッジが前記第1の期間中に入力された後に、前記第1の期間の直前の前記第2の期間に前記入力信号のクロックエッジが入力された場合は前記第1のクロック信号の位相が理論値に対して進んでいると判断し、前記第1の期間の直後の前記第2の期間に前記入力信号のクロックエッジが入力された場合は前記第1のクロック信号の位相が理論値に対して遅れていると判断する請求項1に記載の半導体装置。   In the frequency error calculation unit, after the clock edge of the input signal is input during the first period, the clock edge of the input signal is input during the second period immediately before the first period. In the case, it is determined that the phase of the first clock signal is advanced with respect to the theoretical value, and the clock edge of the input signal is input in the second period immediately after the first period. The semiconductor device according to claim 1, wherein it is determined that the phase of the first clock signal is delayed with respect to a theoretical value. 前記遷移判定部は、前記第1の期間中に前記入力信号のクロックエッジが入力され場合に前記遷移判定信号を第1の状態とし、前記第2の期間に前記入力信号のクロックエッジが入力され場合に前記遷移判定信号を第2の状態とし、前記入力信号のクロックエッジが入力されない場合に前記遷移判定信号を第3の状態とする請求項1に記載の半導体装置。   The transition determination unit sets the transition determination signal to the first state when the clock edge of the input signal is input during the first period, and the clock edge of the input signal is input during the second period. 2. The semiconductor device according to claim 1, wherein the transition determination signal is set to a second state in a case, and the transition determination signal is set to a third state when a clock edge of the input signal is not input. 前記周波数判定部は、前記周波数誤差量の前記上限値と前記下限値との差が予め設定した所定値以下となった時点での前記上限値と前記下限値との間の値を前記ずれ量として算出する請求項1に記載の半導体装置。   The frequency determination unit calculates a value between the upper limit value and the lower limit value when the difference between the upper limit value and the lower limit value of the frequency error amount is equal to or less than a predetermined value set in advance. The semiconductor device according to claim 1, calculated as: 前記第1のクロック信号に基づき動作信号を生成する内部発振回路と、
前記動作信号に基づき所定の機能を実現する機能回路と、を有し、
前記周波数判定部は、前記内部発振回路に算出した前記ずれ量を与えて前記動作信号の周波数を補正する請求項1に記載の半導体装置。
An internal oscillation circuit for generating an operation signal based on the first clock signal;
And a functional circuit that realizes a predetermined function based on the operation signal,
The semiconductor device according to claim 1, wherein the frequency determination unit corrects the frequency of the operation signal by giving the calculated shift amount to the internal oscillation circuit.
前記第1のクロック生成部は、セラミック発振子により生成されたクロック信号を前記第1のクロック信号として生成し、
前記第2のクロック生成部は、水晶発振子により生成されたクロック信号に基づき前記第2のクロック信号を生成する請求項1に記載の半導体装置。
The first clock generation unit generates a clock signal generated by a ceramic oscillator as the first clock signal,
The semiconductor device according to claim 1, wherein the second clock generation unit generates the second clock signal based on a clock signal generated by a crystal oscillator.
第1のクロック生成部により生成された第1のクロック信号の理論値を示す第1の周波数値を格納する第1のレジスタと、
前記第1のクロック生成部よりも周波数の絶対値精度が高い第2のクロック生成部により生成された第2のクロック信号のクロックエッジと同期したクロックエッジを有する入力信号の周波数の理論値を示す第2の周波数値を格納する第2のレジスタと、
前記第1のクロック信号に基づき演算処理を行う演算回路と、を有する半導体装置において前記演算回路により実行され、前記第1のクロック信号の周波数の理論値とのずれ量を算出する周波数誤差算出プログラムであって、
前記第1のクロック信号に同期して、前記第1のクロック信号の周期のうち前記入力信号のクロックエッジが入力される可能性のある周期を示す第1の期間を前記第1の周波数値及び前記第2の周波数値の比から算出し、
前記第1の期間における前記第1のクロック信号のクロックエッジと前記入力信号のクロックエッジとの時間差の理論値を示す位相誤差値を前記第1の周波数値及び前記第2の周波数値の比から算出し、
前記入力信号のクロックエッジが前記第1の期間中に発生したか、前記第1の期間以外の第2の期間に発生したかを判定して遷移判定値を生成し、
前記遷移判定値及び前記位相誤差値に基づき前記第1のクロック信号の周波数の理論値からの周波数誤差量を算出し、
前記周波数誤差量の上限値と下限値とに基づき前記第1のクロック信号の周波数の理論値からの前記ずれ量を算出する周波数誤差算出プログラム。
A first register that stores a first frequency value indicating a theoretical value of the first clock signal generated by the first clock generation unit;
The theoretical value of the frequency of the input signal having a clock edge synchronized with the clock edge of the second clock signal generated by the second clock generator having a higher absolute frequency accuracy than that of the first clock generator. A second register for storing a second frequency value;
A frequency error calculation program that is executed by the arithmetic circuit in a semiconductor device having an arithmetic circuit that performs arithmetic processing based on the first clock signal, and calculates a deviation amount from a theoretical value of the frequency of the first clock signal Because
In synchronization with the first clock signal, a first period indicating a period in which a clock edge of the input signal may be input is included in the period of the first clock signal. Calculated from the ratio of the second frequency values;
A phase error value indicating a theoretical value of a time difference between the clock edge of the first clock signal and the clock edge of the input signal in the first period is calculated from the ratio of the first frequency value and the second frequency value. Calculate
Determining whether a clock edge of the input signal occurred during the first period or a second period other than the first period to generate a transition determination value;
Calculating a frequency error amount from a theoretical value of the frequency of the first clock signal based on the transition determination value and the phase error value;
A frequency error calculation program for calculating the deviation amount from a theoretical value of the frequency of the first clock signal based on an upper limit value and a lower limit value of the frequency error amount.
前記入力信号は、前記第1のクロック信号の周波数の2分の1以下の周波数を有する請求項11に記載の周波数誤差算出プログラム。   The frequency error calculation program according to claim 11, wherein the input signal has a frequency equal to or lower than a half of the frequency of the first clock signal. 前記入力信号は、異なる半導体装置において前記第2のクロック信号に基づき生成される同期クロック信号と、前記同期クロック信号と同期したクロックエッジを有する制御信号と、のいずれか一方である請求項11に記載の周波数誤差算出プログラム。   12. The input signal is any one of a synchronous clock signal generated based on the second clock signal in a different semiconductor device and a control signal having a clock edge synchronized with the synchronous clock signal. The frequency error calculation program described. 前記周波数誤差算出プログラムは、前記遷移判定信号に基づき前記第1のクロック信号の位相の理論値からのずれ方向を判定し、前記位相誤差値に基づき前記第1のクロック信号の周波数の理論値からの前記周波数誤差量を算出する請求項11に記載の周波数誤差算出プログラム。   The frequency error calculation program determines a deviation direction from the theoretical value of the phase of the first clock signal based on the transition determination signal, and based on the theoretical value of the frequency of the first clock signal based on the phase error value. The frequency error calculation program according to claim 11, wherein the frequency error amount is calculated. 前記周波数誤差算出プログラムは、
前記第1の期間の発生回数をカウントして遷移カウント値を生成し、
前記第1の期間毎に前記位相誤差値を前記遷移カウント値で除算して前記第1のクロック信号の周波数の理論値との前記周波数誤差量を算出する請求項11に記載の周波数誤差算出プログラム。
The frequency error calculation program is
Counting the number of occurrences of the first period to generate a transition count value,
The frequency error calculation program according to claim 11, wherein the frequency error amount is calculated by dividing the phase error value by the transition count value for each first period and the theoretical value of the frequency of the first clock signal. .
前記周波数誤差算出プログラムは、前記入力信号のクロックエッジが前記第1の期間中に入力された後に、前記第1の期間の直前の前記第2の期間に前記入力信号のクロックエッジが入力された場合は前記第1のクロック信号の位相が理論値に対して進んでいると判断し、前記第1の期間の直後の前記第2の期間に前記入力信号のクロックエッジが入力された場合は前記第1のクロック信号の位相が理論値に対して遅れていると判断する請求項11に記載の周波数誤差算出プログラム。   In the frequency error calculation program, after the clock edge of the input signal is input during the first period, the clock edge of the input signal is input during the second period immediately before the first period. In the case, it is determined that the phase of the first clock signal is advanced with respect to the theoretical value, and the clock edge of the input signal is input in the second period immediately after the first period. The frequency error calculation program according to claim 11, wherein the phase of the first clock signal is determined to be delayed from the theoretical value. 前記周波数誤差算出プログラムは、前記周波数誤差量の前記上限値と前記下限値との差が予め設定した所定値以下となった時点での前記上限値と前記下限値との間の値を前記ずれ量として算出する請求項11に記載の半導体装置。   The frequency error calculation program calculates a deviation between a value between the upper limit value and the lower limit value when a difference between the upper limit value and the lower limit value of the frequency error amount is equal to or less than a predetermined value set in advance. The semiconductor device according to claim 11, wherein the semiconductor device is calculated as a quantity. 前記周波数誤差算出プログラムは、前記第1の期間中に前記入力信号のクロックエッジが入力され場合に前記遷移判定値を第1の状態とし、前記第2の期間に前記入力信号のクロックエッジが入力され場合に前記遷移判定値を第2の状態とし、前記入力信号のクロックエッジが入力されない場合に前記遷移判定値を第3の状態とする請求項11に記載の周波数誤差算出プログラム。   The frequency error calculation program sets the transition determination value to the first state when the clock edge of the input signal is input during the first period, and inputs the clock edge of the input signal during the second period. The frequency error calculation program according to claim 11, wherein the transition determination value is set to the second state in this case, and the transition determination value is set to the third state when the clock edge of the input signal is not input. 前記半導体装置は、
前記第1のクロック信号に基づき動作信号を生成する内部発振回路と、
前記動作信号に基づき所定の機能を実現する機能回路と、を有し、
前記周波数誤差算出プログラムは、前記内部発振回路に算出した前記ずれ量を与えて前記動作信号の周波数を補正する請求項11に記載の周波数誤差算出プログラム。
The semiconductor device includes:
An internal oscillation circuit for generating an operation signal based on the first clock signal;
And a functional circuit that realizes a predetermined function based on the operation signal,
The frequency error calculation program according to claim 11, wherein the frequency error calculation program corrects the frequency of the operation signal by giving the calculated shift amount to the internal oscillation circuit.
前記第1のクロック生成部は、セラミック発振子により生成されたクロック信号を前記第1のクロック信号として生成し、
前記第2のクロック生成部は、水晶発振子により生成されたクロック信号に基づき前記第2のクロック信号を生成する請求項11に記載の周波数誤差算出プログラム。
The first clock generation unit generates a clock signal generated by a ceramic oscillator as the first clock signal,
The frequency error calculation program according to claim 11, wherein the second clock generation unit generates the second clock signal based on a clock signal generated by a crystal oscillator.
JP2012174207A 2012-08-06 2012-08-06 Semiconductor device and frequency error calculation program Pending JP2014033413A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012174207A JP2014033413A (en) 2012-08-06 2012-08-06 Semiconductor device and frequency error calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012174207A JP2014033413A (en) 2012-08-06 2012-08-06 Semiconductor device and frequency error calculation program

Publications (1)

Publication Number Publication Date
JP2014033413A true JP2014033413A (en) 2014-02-20

Family

ID=50282904

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012174207A Pending JP2014033413A (en) 2012-08-06 2012-08-06 Semiconductor device and frequency error calculation program

Country Status (1)

Country Link
JP (1) JP2014033413A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101810283B1 (en) * 2014-09-29 2018-01-18 주식회사 엘지화학 System and method for calculating the frequency of BMS input pulse

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101810283B1 (en) * 2014-09-29 2018-01-18 주식회사 엘지화학 System and method for calculating the frequency of BMS input pulse

Similar Documents

Publication Publication Date Title
US8634503B2 (en) Fast lock clock-data recovery for phase steps
US9791887B2 (en) Synchronization of a data signal
WO2011004580A1 (en) Clock data recovery circuit
US9425781B2 (en) Syncless unit interval variation tolerant PWM receiver circuit, system and method
US6954506B2 (en) Clock signal recovery circuit used in receiver of universal serial bus and method of recovering clock signal
JP2013528011A (en) Apparatus and method for compensating injection locking
US8472561B2 (en) Receiver circuit
US8854101B2 (en) Adaptive clock generating apparatus and method thereof
CN109787625B (en) Voltage burr protection system that system overclocking arouses based on two PLL
US20050084048A1 (en) Clock and data recovery circuit
US9967083B2 (en) Receiving device
JP2014033413A (en) Semiconductor device and frequency error calculation program
CN111446960B (en) Clock output circuit
US20130051439A1 (en) Frequency calibration device and method for programmable oscillator
CN203340051U (en) Phase-locked loop system
JP2008176578A (en) Redundant operation system and operation part
JP6064930B2 (en) Electrical / electronic equipment, circuits, and communication systems
JP5270524B2 (en) Clock phase synchronization circuit
US10110371B2 (en) Phase difference estimation device and communication device having the phase difference estimation device
US10116435B2 (en) Control circuit and control method of communication device
US10075311B2 (en) Clock correction method and circuit utilizing training sequence to correct oscillator output, and reference clock generation method and circuit utilizing training sequence to generate reference clock
US9319216B2 (en) Operating method of human interface device
JP2018074312A (en) Frequency detector and clock data recovery device
JP2000004152A (en) Time frequency reference signal generator and reference time frequency generating device, and reference time generating device using the same
US10305493B2 (en) Phase-locked loop and frequency synthesizer