JP2002162427A - Frequency-measuring circuit and digital signal processor using the same - Google Patents

Frequency-measuring circuit and digital signal processor using the same

Info

Publication number
JP2002162427A
JP2002162427A JP2000358031A JP2000358031A JP2002162427A JP 2002162427 A JP2002162427 A JP 2002162427A JP 2000358031 A JP2000358031 A JP 2000358031A JP 2000358031 A JP2000358031 A JP 2000358031A JP 2002162427 A JP2002162427 A JP 2002162427A
Authority
JP
Japan
Prior art keywords
circuit
counter
clock
signal
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2000358031A
Other languages
Japanese (ja)
Inventor
Shigeki Kimura
繁樹 木村
Yuji Ikegaya
祐治 池ヶ谷
Kazuo Nakamura
和夫 中村
Takaaki Makino
貴昭 牧野
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.)
Yamaha Corp
Original Assignee
Yamaha 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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP2000358031A priority Critical patent/JP2002162427A/en
Publication of JP2002162427A publication Critical patent/JP2002162427A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a frequency-measuring circuit, capable of accurately measuring the cycle of a sampling frequency Fs using a simple constitution, using a digital circuit suitable for use by incorporating it in a signal processor or the like. SOLUTION: This circuit is provided with a master counter clock 17 for counting clock signals inputted into a clock terminal CK; a sample number counter 25 for counting input-side or output-side Fs (sampling frequency) synchronizing clock signals inputted into the clock terminal CK, registers 30 and 33 for storing the measurement cycle of the counter 25; comparators 28 and 31 for comparing counts CNT2 of the counter 25 with the measurement cycle stored in the registers 30 and 33; a register group comprising a plurality of registers 19 and 20 or registers 34 to 38 for sequentially storing counts CNT1 of the counter 17, according to the outputs of the comparators 28 and 31; and subtracters 21 and 40 for finding variations in the counts CNT1 stored in the register group.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、複数の異なる信
号の周波数を比較する際に用いて好適な周波数測定回路
及びそれを用いたデジタル信号処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a frequency measuring circuit suitable for comparing the frequencies of a plurality of different signals and a digital signal processing device using the same.

【0002】[0002]

【従来の技術】ディジタルオーディオ機器等のデジタル
機器では、32kHz、44.1kHz、48kHz等
の様々なサンプリング周波数が使用されており、サンプ
リング周波数が異なる機器同士をつなぐ場合、送出側機
器から送出されるサンプル列を受取側機器のサンプリン
グ周波数に変換する必要がある。例えば48kHzのサ
ンプリング周波数でDVD(デジタルビデオディスクに
記憶されているデータを、CD(コンパクトディスク)
用にダビングする場合、サンプリング周波数を44.1
kHzに変換する必要がある。また、サンプリング周波
数は同じではあるが別々のシステムクロックで駆動され
ているデジタル機器同士をつなぐ場合にも同様に、送出
側機器から送出されたサンプル列を受取側機器のサンプ
リング周波数に同期させるための周波数変換が必要とな
る。
2. Description of the Related Art In digital equipment such as digital audio equipment, various sampling frequencies such as 32 kHz, 44.1 kHz, and 48 kHz are used. When devices having different sampling frequencies are connected to each other, data is transmitted from a transmitting device. It is necessary to convert the sample sequence to the sampling frequency of the receiving device. For example, at a sampling frequency of 48 kHz, data stored on a DVD (digital video disk) is converted to a CD (compact disk).
When dubbing for
It is necessary to convert to kHz. Similarly, when connecting digital devices having the same sampling frequency but driven by different system clocks, the sample sequence sent from the sending device is also synchronized with the sampling frequency of the receiving device. Frequency conversion is required.

【0003】このようなサンプリング周波数の変換を行
うデジタル信号処理装置では、入力側のサンプリング周
波数と出力側のサンプリング周波数を正確に測定した
り、サンプリング周波数の変動を正確にかつ遅延無く検
知したりすることが必要となる。上記のようなサンプリ
ング周波数変換器において、サンプリング周波数を測定
するための構成が、特開平5−235698号公報「サ
ンプリング周波数変換器」、特開平5−259812号
公報「サンプリング周波数変換器」等に記載されてい
る。これらの公報に記載されているサンプリング周波数
測定器では、サンプリング周波数を256倍程度のビッ
トクロックやシステムクロックを使って計測することで
精度良く測定しようとしていた。
In such a digital signal processing apparatus for converting the sampling frequency, the sampling frequency on the input side and the sampling frequency on the output side are accurately measured, and the fluctuation of the sampling frequency is detected accurately and without delay. It is necessary. In the sampling frequency converter as described above, configurations for measuring the sampling frequency are described in JP-A-5-235698, "Sampling frequency converter", JP-A-5-259812, "Sampling frequency converter" and the like. Have been. The sampling frequency measuring devices described in these publications have attempted to measure the sampling frequency with high accuracy by measuring the sampling frequency using a bit clock or a system clock of about 256 times.

【0004】上記のようなサンプリング周波数の変換に
おいて周波数を測定するための構成には、周波数変換を
行うためのデジタル信号処理回路(DSP)の外部に汎
用CPUを設け、汎用CPU内のタイマー等を使って周
波数を計測し、その値を信号処理回路に与えて利用する
例があった。あるいは、信号処理中にサンプリング周波
数Fsが変更されると、信号処理回路は何らかの方法で
外部からサンプリング周波数Fsの情報を得て、その情
報にしたがってプログラムや係数の入れ替えや変更を行
う例もあった。また、個々の信号処理回路内にサンプル
数カウンタを持ったものも存在した。
In the configuration for measuring the frequency in the conversion of the sampling frequency as described above, a general-purpose CPU is provided outside a digital signal processing circuit (DSP) for performing the frequency conversion, and a timer or the like in the general-purpose CPU is used. There has been an example in which the frequency is measured using the frequency, and the value is given to a signal processing circuit and used. Alternatively, when the sampling frequency Fs is changed during the signal processing, the signal processing circuit obtains information on the sampling frequency Fs from the outside by some method, and replaces or changes a program or a coefficient according to the information. . In addition, there is a signal processing circuit having a sample number counter in each signal processing circuit.

【0005】[0005]

【発明が解決しようとする課題】従来の技術において、
サンプリング周波数を256倍程度のビットクロックや
システムクロックを使って計測する構成では、計測精度
が8ビット程度となり十分な精度が得られない場合があ
る。また、十分な精度を得るには高速なクロックが必要
になる場合がある。
SUMMARY OF THE INVENTION In the prior art,
In a configuration in which the sampling frequency is measured using a bit clock or system clock that is about 256 times, the measurement accuracy is about 8 bits, and sufficient accuracy may not be obtained in some cases. In addition, a high-speed clock may be required to obtain sufficient accuracy.

【0006】信号処理回路外で周波数測定を行う構成で
は、信号処理回路外からハンドシェークや割り込み等に
よってサンプリング周波数Fsの計測値を得るため、信
号処理に利用できるまでにタイムラグが生じたりして処
理が遅れるという課題があった。また、外部ポートやデ
ータバス経由で値を受け取るため、信号処理回路内での
使い方が限定されてしまう場合があった。例えば、サン
プリング周波数Fsの値をROM(リードオンリメモ
リ)やRAM(ランダムアクセスメモリ)のアドレスイ
ンデックス等に使えなかったり、あるいは使うために何
ステップかの余分な処理時間を必要としたりといった問
題が生じる場合があった。
In a configuration in which frequency measurement is performed outside the signal processing circuit, a measurement value of the sampling frequency Fs is obtained from the outside of the signal processing circuit by handshaking, interruption, or the like. There was a problem of being late. Further, since the value is received via an external port or a data bus, the usage in the signal processing circuit may be limited. For example, there arises a problem that the value of the sampling frequency Fs cannot be used as an address index of a ROM (Read Only Memory) or a RAM (Random Access Memory), or that some extra processing time is required to use it. There was a case.

【0007】また、従来の技術において、個々の信号処
理回路内にサンプル数カウンタを設けた構成では、各チ
ップのサンプル数カウンタを同時にリセットし、同期さ
せてカウント動作を行えるようにするなどの仕組みは用
いられていなかった。
Further, in the conventional technology, in a configuration in which a sample number counter is provided in each signal processing circuit, a mechanism such that the sample number counter of each chip is simultaneously reset and the count operation can be performed in synchronization. Was not used.

【0008】本発明は、上記の事情を考慮してなされた
ものであって、信号処理装置等に内蔵して用いるのに適
したデジタル回路による簡単な構成で、サンプリング周
波数Fsの周期を正確に測定することができる周波数測
定回路、及びそれを用いたデジタル信号処理装置を提供
することを目的とする。また、同様な構成で、サンプリ
ング周波数Fsの変動を検出することができる周波数測
定回路を提供することを目的とする。
The present invention has been made in view of the above circumstances, and has a simple configuration using a digital circuit suitable for use by being built in a signal processing device or the like. It is an object of the present invention to provide a frequency measurement circuit capable of performing measurement and a digital signal processing device using the same. It is another object of the present invention to provide a frequency measurement circuit having a similar configuration and capable of detecting a change in the sampling frequency Fs.

【0009】[0009]

【課題を解決するための手段】上記課題を解決するた
め、請求項1記載の発明は、クロック端子に入力される
第1のクロック信号をカウントする第1のカウンタ回路
と、クロック端子に入力される第2のクロック信号をカ
ウントする第2のカウンタ回路と、第2のカウンタの計
測周期を記憶する第1の記憶回路と、第2のカウンタの
カウント値と前記第1の記憶回路に記憶された計測周期
とを比較する第1の比較回路と、第1の比較回路の出力
に応じて前記第1のカウンタ回路のカウント値を順次記
憶する複数の記憶回路からなる第1の記憶回路群と、第
1の記憶回路群において記憶されたカウント値の変動を
求める第1の演算回路とを備えることを特徴とする。
According to a first aspect of the present invention, there is provided a first counter circuit for counting a first clock signal input to a clock terminal, and a first counter circuit for counting a first clock signal input to a clock terminal. A second counter circuit that counts a second clock signal, a first storage circuit that stores a measurement cycle of the second counter, a count value of the second counter, and a value that is stored in the first storage circuit. A first comparison circuit for comparing the measured period with the first measurement circuit; and a first storage circuit group including a plurality of storage circuits for sequentially storing the count value of the first counter circuit in accordance with the output of the first comparison circuit. , A first arithmetic circuit for determining a change in the count value stored in the first storage circuit group.

【0010】請求項2記載の発明は、前記第1の演算回
路が第1の記憶回路群におけるいずれか2つの記憶回路
の記憶値の差分を求めることを特徴とする。請求項3記
載の発明は、第2のカウンタの計測周期を記憶する第2
の記憶回路と、第2のカウンタのカウント値と前記第2
の記憶回路に記憶された計測周期とを比較する第2の比
較回路と、第2の比較回路の出力に応じて前記第1のカ
ウンタ回路のカウント値を順次記憶する複数の記憶回路
からなる第2の記憶回路群と、第2の記憶回路群におい
て記憶されたカウント値の変動を求める第2の演算回路
とをさらに備えることを特徴とする。請求項4記載の発
明は、前記第1のカウンタ回路のカウント値と所定の設
定値とを比較する第3の比較回路と、第3の比較回路に
よる比較結果を記憶する第3の記憶回路とを備えること
を特徴とする。
The invention according to claim 2 is characterized in that the first arithmetic circuit obtains a difference between stored values of any two storage circuits in the first storage circuit group. According to a third aspect of the present invention, a second counter for storing a measurement cycle of the second counter is provided.
Storage circuit, the count value of the second counter and the second
And a plurality of storage circuits for sequentially storing the count value of the first counter circuit in accordance with the output of the second comparison circuit. And a second arithmetic circuit for calculating a change in the count value stored in the second storage circuit group. According to a fourth aspect of the present invention, there is provided a third comparison circuit for comparing a count value of the first counter circuit with a predetermined set value, and a third storage circuit for storing a comparison result by the third comparison circuit. It is characterized by having.

【0011】請求項5記載の発明は、前記第1のカウン
タ回路のクロック信号を複数の信号から選択する第1の
選択回路、又は、前記第2のカウンタ回路のクロック信
号を複数の信号から選択する第2の選択回路の少なくと
も一方を備えることを特徴とする。請求項6記載の発明
は、前記第1のカウンタのリセット信号を複数の信号か
ら選択する第3の選択回路を備えたことを特徴とする。
請求項7記載の発明は、前記第2のカウンタのリセット
信号を複数の信号から選択する第4の選択回路を備えた
ことを特徴とする。請求項8記載の発明は、前記第1の
クロック信号の周期が、前記第2のクロック信号の周期
より短いことを特徴とする。請求項9記載の発明は、前
記第1のカウンタ回路のクロック信号を、システムクロ
ック、入力側ビットクロック、又は出力側ビットクロッ
クから選択する第1の選択回路を備えることを特徴とす
る。請求項10記載の発明は、前記第2のカウンタ回路
のクロック信号を、入力側サンプル同期信号または出力
側サンプル同期信号から選択する第2の選択回路を備え
ることを特徴とする。
According to a fifth aspect of the present invention, the first selection circuit selects the clock signal of the first counter circuit from a plurality of signals, or selects the clock signal of the second counter circuit from a plurality of signals. And at least one of the second selection circuits. According to a sixth aspect of the present invention, the apparatus further comprises a third selection circuit for selecting a reset signal of the first counter from a plurality of signals.
The invention according to claim 7 is characterized in that a fourth selection circuit for selecting a reset signal of the second counter from a plurality of signals is provided. The invention according to claim 8 is characterized in that the cycle of the first clock signal is shorter than the cycle of the second clock signal. According to a ninth aspect of the present invention, there is provided a first selection circuit for selecting a clock signal of the first counter circuit from a system clock, an input side bit clock, or an output side bit clock. According to a tenth aspect of the present invention, there is provided a second selection circuit for selecting a clock signal of the second counter circuit from an input-side sample synchronization signal or an output-side sample synchronization signal.

【0012】請求項11記載の発明は、前記第3の選択
回路が、前記第1のカウンタ回路のリセット信号を、少
なくとも第1の入力側サンプル同期信号、出力側サンプ
ル同期信号を含む複数の信号から選択することを特徴と
する。請求項12記載の発明は、前記第4の選択回路
が、前記第2のカウンタ回路のリセット信号を、少なく
とも第1の比較回路の出力、第2の比較回路の出力、又
は所定の外部信号を含む複数の信号から選択することを
特徴とする。請求項13記載の発明は、請求項1乃至1
2のいずれか1項に記載の周波数測定回路を備え、少な
くとも前記第1乃至第4の選択回路のいずれかの選択動
作を制御する制御信号を供給することを特徴とする。
According to an eleventh aspect of the present invention, the third selection circuit outputs a reset signal of the first counter circuit to a plurality of signals including at least a first input-side sample synchronization signal and an output-side sample synchronization signal. It is characterized by selecting from. According to a twelfth aspect of the present invention, the fourth selection circuit outputs a reset signal of the second counter circuit to at least an output of the first comparison circuit, an output of the second comparison circuit, or a predetermined external signal. It is characterized by selecting from a plurality of included signals. The invention according to claim 13 is the invention according to claims 1 to 1
3. A frequency measurement circuit according to any one of 2 to 2, wherein a control signal for controlling at least one of the first to fourth selection circuits is supplied.

【0013】上記構成によれば、例えば、2種類のカウ
ンタを使って計測時間を長く取ることによってサンプリ
ング周波数Fsの周期を正確に測定したり、計測時間を
短く取ることで比較的短期間に発生するサンプリング周
波数Fsの周期の変動を測定したりすることができる。
また、サンプリング周波数Fsの周期が設定値を超える
かまたは設定値を割り込むかした場合に立つフラグ(第
3の記憶回路)を設けることで、それを見て変動があっ
たことを検出することができる。あるいは、長周期で計
測したサンプリング周波数Fsの値と短周期で計測した
サンプリング周波数Fsの値を比較することによって変
動を容易に検出することが可能である。さらに、外部か
らの制御信号によってサンプル数カウンタ(第2のカウ
ンタ回路)のカウント開始、停止の制御を行うことを可
能とすることで、複数の信号処理装置チップ間等におい
て、同期してサンプル数をカウントする際に適した機能
を有することができる。
According to the above configuration, for example, the period of the sampling frequency Fs can be measured accurately by taking a long measurement time by using two types of counters, or can be generated in a relatively short time by taking a short measurement time. Of the sampling frequency Fs to be measured.
In addition, by providing a flag (third storage circuit) that stands when the cycle of the sampling frequency Fs exceeds the set value or interrupts the set value, it is possible to detect that there is a change by looking at the flag. it can. Alternatively, the change can be easily detected by comparing the value of the sampling frequency Fs measured in the long cycle with the value of the sampling frequency Fs measured in the short cycle. Furthermore, by controlling the start and stop of the count of the sample number counter (second counter circuit) by an external control signal, the number of samples can be synchronized between a plurality of signal processing device chips or the like. Can be provided with a function suitable for counting the numbers.

【0014】[0014]

【発明の実施の形態】以下、図面を参照して本発明によ
る周波数測定回路(周波数測定装置)の実施の形態につ
いて説明する。図1は本実施の形態の回路構成を示すブ
ロック図である。本実施形態の周波数測定回路は、ディ
ジタルオーディオ機器等のデジタル機器において入力サ
ンプル列を、それとは非同期の出力サンプル列に変換す
るデジタル信号処理回路(DSP)等に内蔵して用いら
れるものであって、入力側のサンプリング周波数、出力
側のサンプリング周波数、システムクロック周波数等の
3種類の周波数、および、それらの絶対的もしくは相対
的な変化を測定する際に利用できるように構成されてい
る。図1に示す信号I1〜I6は本回路を備えるデジタ
ル信号処理装置から入力される信号であり、信号O1〜
O2およびFs(サンプリング周波数)計測値1,Fs
計測値2はそのデジタル信号処理装置へ向けて出力され
る信号である。また、セレクタ16,18,24,27
および39へ入力されるセレクト信号S1,S2,S
3,S4,およびS5は、デジタル信号処理装置からそ
れぞれ供給される。入力側Fs同期信号および出力側F
s同期信号はともに外部から供給される信号であって、
入力サンプル列と出力サンプル列のそれぞれのサンプリ
ング信号に同期した周波数を有している。システムクロ
ックSystem Clock、入力ビットクロックInput Bit Cloc
kおよび出力ビットクロックOutput Bit Clockは、それ
ぞれ、デジタル信号処理装置で用いられているシステム
クロック等の入力側Fs同期信号および出力側Fs同期
信号の周期よりも短い周期を有するクロック信号、入力
および出力サンプル列の各ビットに対応するクロック信
号である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a frequency measuring circuit (frequency measuring device) according to the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a circuit configuration of the present embodiment. The frequency measurement circuit according to the present embodiment is used by being built in a digital signal processing circuit (DSP) or the like that converts an input sample sequence into an output sample sequence that is asynchronous with a digital device such as a digital audio device. , The sampling frequency on the input side, the sampling frequency on the output side, the system clock frequency, and the like, and their absolute or relative changes can be measured. Signals I1 to I6 shown in FIG. 1 are signals input from a digital signal processing device including this circuit,
O2 and Fs (sampling frequency) measurement value 1, Fs
The measurement value 2 is a signal output to the digital signal processing device. Further, selectors 16, 18, 24, 27
And 39, select signals S1, S2, S
3, S4, and S5 are supplied from the digital signal processing device, respectively. Input Fs synchronization signal and output F
The s synchronization signal is a signal supplied from the outside, and
It has a frequency synchronized with each sampling signal of the input sample sequence and the output sample sequence. System Clock, Input Bit Cloc
k and an output bit clock are a clock signal having a cycle shorter than that of an input-side Fs synchronization signal and a cycle of an output-side Fs synchronization signal such as a system clock used in a digital signal processing device, and an input and an output, respectively. This is a clock signal corresponding to each bit of the sample sequence.

【0015】図1に示す周波数測定回路は、大きく分け
ると図の上の部分に書かれているマスタークロックカウ
ンタ17とその値を保存するレジスタ類(レジスタ(以
下、REG)A(19)〜B(20)、REG 0(3
4)〜REG N(38)等)とからなるブロックと、
図の下の部分に書かれているサンプル数カウンタ25と
アベレージング周期設定用の比較器28,31等からな
るブロックの2つから構成されている。マスタークロッ
クカウンタ17は、リセット付きのカウンタ回路であ
り、セレクタ18によって選択されたシステムクロック
System Clock(入力端子1)、入力側ビットクロックIn
put Bit Clock(入力端子2)、出力側ビットクロックO
utput Bit Cloc k(入力端子3)のいずれかの信号をク
ロック信号CKとしてカウント動作を行い、カウント値
を信号CNT1として出力する。また、マスタークロッ
クカウンタ17は、セレクタ16によって選択された入
力側Fs同期信号、出力側Fs同期信号、固定値“0”
のいずれかの信号をリセット信号RESETとして入力
し、“1”または“0”で繰り返し変化する入力側Fs
同期信号あるいは出力側Fs同期信号が“1”レベルの
ときにリセットしたり、固定値“0”を入力してリセッ
トを行わずにフリーランカウンタとして動作したりす
る。
The frequency measurement circuit shown in FIG. 1 is roughly divided into a master clock counter 17 written in the upper part of the figure and registers (registers (hereinafter referred to as REGs) A (19) to B (REG) A for storing the value thereof. (20), REG 0 (3
4) to REG N (38)).
It is composed of two blocks consisting of a sample number counter 25 written in the lower part of the figure and comparators 28 and 31 for setting the averaging period. The master clock counter 17 is a counter circuit with a reset, and has a system clock selected by the selector 18.
System Clock (input terminal 1), input side bit clock In
put Bit Clock (input terminal 2), output side bit clock O
A count operation is performed using any signal of the output bit clock (input terminal 3) as a clock signal CK, and the count value is output as a signal CNT1. Further, the master clock counter 17 outputs the input-side Fs synchronization signal and the output-side Fs synchronization signal selected by the selector 16 and the fixed value “0”.
Is input as a reset signal RESET, and the input side Fs that repeatedly changes with “1” or “0” is input.
Reset is performed when the synchronization signal or the output side Fs synchronization signal is at “1” level, or operates as a free-run counter without resetting by inputting a fixed value “0”.

【0016】REG A(19)及びREG 0(3
4)は、それぞれ、比較器28の出力信号C1および比
較器31の出力信号C2の変化に同期してマスタークロ
ックカウンタ17のカウント値CNT1を保存するレジ
スタである。REG B(20)は、REG A(1
9)の出力を入力とするレジスタであって、REG B
(20)にはREG A(19)が信号C1の1つ前の
変化に同期して取り込んだ値がその次の変化に同期して
取り込まれるよう動作する。N個(Nは自然数)のRE
G 1(35),REG 2(36)〜REG N(3
8)は、それぞれ、REG 0(34),REG 1
(35)〜REG N−1(37)の出力を入力とする
レジスタであって、信号C2の変化に同期して、順次、
保持している値を伝送するように動作する。REG C
(22)は、減算器21によって、REG A(19)
が保持する値からREG B(20)が保持する値を減
算した結果(Fs計測値1)を保存するレジスタであ
る。REG X(41)は、減算器40によって、RE
G 0(34)の値から、セレクタ39で選択されたR
EG1(35)〜REG N(38)のいずれかが保持
する値を減算した結果(Fs計測値2)を保存するレジ
スタである。ここで、REG 1(35)〜REGN
(38)の出力は、それぞれセレクタ39の入力端子1
〜Nに入力される。なお、減算器21および減算器40
には、例えば、減算だけに限らず、Fsの平均値計算
や、Fsの最高値、最低値測定など、Fsの特性を測定
する機能を有するようにしても良い。その測定結果は減
算器の場合と同様にREG C(22)、REG X
(41)に保存される。
REG A (19) and REG 0 (3)
4) are registers for storing the count value CNT1 of the master clock counter 17 in synchronization with changes in the output signal C1 of the comparator 28 and the output signal C2 of the comparator 31, respectively. REG B (20) is REG A (1
9) a register which receives the output of 9) as an input,
At (20), the REG A (19) operates so that the value acquired in synchronization with the immediately preceding change of the signal C1 is acquired in synchronization with the next change. N (N is a natural number) REs
G 1 (35), REG 2 (36) to REG N (3
8) are REG 0 (34) and REG 1
(35) to REG N-1 (37) are registers which receive the output, and sequentially register in synchronization with the change of the signal C2.
It operates to transmit the value it holds. REG C
(22) is processed by the subtractor 21 in REG A (19).
Is a register for storing the result (Fs measurement value 1) obtained by subtracting the value held by REG B (20) from the value held by. REG X (41) is calculated by the subtractor 40 as RE
From the value of G 0 (34), the value of R
This register stores the result (Fs measurement value 2) obtained by subtracting the value held by any of EG1 (35) to REG N (38). Here, REG 1 (35) to REGN
The output of (38) is input terminal 1 of selector 39, respectively.
To N. The subtracter 21 and the subtractor 40
For example, not only the subtraction but also the function of measuring the characteristics of Fs, such as calculating the average value of Fs and measuring the maximum and minimum values of Fs, may be provided. The measurement results are REG C (22) and REG X as in the case of the subtractor.
Stored in (41).

【0017】REG L(30)とREG S(33)
は、入力I4とI6に応じてそれぞれ指定されたアベレ
ージングの周期を設定するためのレジスタである。アベ
レージングの周期とは、マスタークロックカウンタ17
のカウンタ値CNT1を各レジスタに取り込む周期であ
る。比較器28および比較器31は、それぞれ、サンプ
ル数カウンタ25のカウント値CNT2と、REG L
(30)の設置値およびREG S(33)の設定値と
を比較し、一致したときに出力C1およびC2を出力す
る。すなわち、サンプル数カウンタ25のカウント値C
NT2が、REG L(30)またはREG S(3
3)にそれぞれ設定されている設定周期に等しくなった
ときに、マスタークロックカウンタ17のカウント値C
NT1が、レジスタREG A(19)またはREG
0(34)に保存されるとともに、順次、各レジスタの
値がその次のレジスタに取り込まれて保存されることに
なる。ただし、この場合、比較器28と比較器31は、
レジスタ29とレジスタ32にそれぞれ設定されている
値に応じて、比較対象とするビットを任意に設定する機
能を有している。
REG L (30) and REG S (33)
Is a register for setting the averaging cycle specified according to the inputs I4 and I6. The averaging cycle is defined as the master clock counter 17
This is the cycle of taking in the counter value CNT1 of each of the registers. The comparator 28 and the comparator 31 respectively include the count value CNT2 of the sample number counter 25 and the REG L
The setting value of (30) and the setting value of REGS (33) are compared, and when they match, outputs C1 and C2 are output. That is, the count value C of the sample number counter 25
NT2 receives REG L (30) or REG S (3
When the period becomes equal to the set period set in 3), the count value C of the master clock counter 17 is set.
NT1 registers REG A (19) or REG
At the same time as being stored at 0 (34), the value of each register is sequentially taken in and stored in the next register. However, in this case, the comparator 28 and the comparator 31
It has a function of arbitrarily setting bits to be compared according to the values set in the registers 29 and 32, respectively.

【0018】サンプル数カウンタ25の動作クロックC
Kは、セレクタ27によって入力側のFs同期信号(入
力端子1)または出力側のFs同期信号(入力端子2)
から選択できる。ただし、セレクタ27の出力は、ディ
レイ回路26によって所定時間遅延された後、サンプル
数カウンタ25のクロック端子に入力される。またサン
プル数カウンタ25のリセット信号RESETは、セレ
クタ24によって、所定の外部信号によってセットされ
るフラグ回路(ラッチ回路)2Bの出力(入力端子
1)、比較器28の出力C1(入力端子2)、“0”す
なわち常にリセットがかからない状態にする信号(入力
端子3)、または比較器31の出力C2(入力端子4)
から選択できる。ラッチ回路23は、所定の外部信号を
セット信号SETとし、セレクタ27の出力をリセット
信号RESETとするセット−リセットフリップフロッ
プ回路である。
Operation clock C of the sample number counter 25
K is an input Fs synchronization signal (input terminal 1) or an output Fs synchronization signal (input terminal 2) by the selector 27.
You can choose from. However, the output of the selector 27 is input to the clock terminal of the sample number counter 25 after being delayed by a predetermined time by the delay circuit 26. The reset signal RESET of the sample number counter 25 is output by the selector 24 from the output (input terminal 1) of the flag circuit (latch circuit) 2B set by a predetermined external signal, the output C1 (input terminal 2) of the comparator 28, “0”, that is, a signal (input terminal 3) for making it not always reset, or the output C2 of the comparator 31 (input terminal 4)
You can choose from. The latch circuit 23 is a set-reset flip-flop circuit that uses a predetermined external signal as a set signal SET and uses the output of the selector 27 as a reset signal RESET.

【0019】マスタークロックカウンタ17の上部に書
かれている比較器14は、マスタークロックカウンタ1
7のカウント出力CNT1と、REG P(11)の設
定値Pとを比較して、「CNT1<P」の場合フラグ回
路FLAG A(10)をセットする信号SETを出力
する。比較器15は、マスタークロックカウンタ17の
カウント出力CNT1と、REG Q(12)の設定値
Qとを比較して、「Q<CNT1」の場合フラグ回路F
LAG B(13)をセットする信号SETを出力す
る。フラグ回路FLAG A(10)およびFLAG
B(13)は、フラグ回路23と同様に構成される回路
であって、デジタル信号処理装置等から供給されるリセ
ット信号RESETをリセット入力にするとともに、そ
れぞれ比較器14および15の出力をセット信号SET
として動作し、出力O1およびO2を出力する。マスタ
ークロックカウンタ17の上部に書かれている各回路に
よって、マスタークロックカウンタ17の値CNT1が
一投定値Pより割り込むか、Qを超えるかした場合に、
各フラグ回路FLAG A(10)およびFLAGB
(13)に設定されるフラグを立たせるように動作す
る。これは、入力側あるいは出力側Fsの変動の検出に
用いることができる。
The comparator 14 written above the master clock counter 17 is the master clock counter 1.
7 and the set value P of REG P (11), and outputs a signal SET for setting the flag circuit FLAG A (10) if "CNT1 <P". The comparator 15 compares the count output CNT1 of the master clock counter 17 with the set value Q of the REG Q (12), and if "Q <CNT1," the flag circuit F
A signal SET for setting LAG B (13) is output. Flag circuit FLAG A (10) and FLAG
B (13) is a circuit configured in the same way as the flag circuit 23. The reset signal RESET supplied from the digital signal processing device or the like is used as a reset input, and the outputs of the comparators 14 and 15 are set signals. SET
And outputs the outputs O1 and O2. Each circuit written above the master clock counter 17 causes the value CNT1 of the master clock counter 17 to be lower than the predetermined value P or to exceed Q.
Each flag circuit FLAG A (10) and FLAGB
An operation is performed to set the flag set in (13). This can be used for detecting a change in the input side or the output side Fs.

【0020】以下、図1に示す構成の動作について説明
する。マスタークロックカウンタ17は、サンプリング
周波数(Fs)等の計測に用いるカウンタであり、動作
クロックをシステムクロックSystem Clock、入力側ビッ
トクロックInput Bit Clock、出力側ビットクロックOut
put Bit Clockから選択しカウントアップする。
The operation of the configuration shown in FIG. 1 will be described below. The master clock counter 17 is a counter used for measuring a sampling frequency (Fs) or the like, and operates a system clock System Clock, an input side bit clock Input Bit Clock, and an output side bit clock Out.
Select from put Bit Clock and count up.

【0021】入力側または出力側のFsを計測する場合
には、マスタークロックカウンタ17にリセットをかけ
ずにフリーランさせて使う。すなわち、セレクタ16で
信号“0”(入力端子3)を選択する。また、マスター
クロックカウンタ17のクロックCKとしては、セレク
タ18で、システムクロックSystem Clock(入力端子
1)が選択される。セレクタ27では、入力側Fsを測
定する場合には入力側Fs同期信号が選択され(入力端
子1)、出力側Fsを測定する場合には出力側Fs同期
信号が選択される(入力端子2)。サンプル数カウンタ
25は、被測定周波数の1サンプル周期ごとにカウント
アップする。この場合、サンプル数カウンタ25のリセ
ット入力には、REG L(30)の設定値をアベレー
ジング周期とする場合はセレクタ24で比較器28の出
力C1を選択して入力し(入力端子2)、REG S
(33)の設定値をアベレージング周期とする場合はセ
レクタ24で比較器31の出力C2を選択して入力し
(入力端子4)、またREG L(30)の設定値に基
づく値をアベレージング周期とする測定結果をREG
C(22)に得ると同時に、REG S(33)の設定
値に基づく値を他のアベレージング周期とする測定結果
をREG X(41)に得るようにするときには、サン
プル数カウンタ25をフリーランカウンタとして動作さ
せるため、固定値“0”を入力する。
When measuring Fs on the input side or output side, the master clock counter 17 is free-run without being reset and used. That is, the selector 16 selects the signal “0” (input terminal 3). As the clock CK of the master clock counter 17, the selector 18 selects the system clock System Clock (input terminal 1). The selector 27 selects the input-side Fs synchronization signal when measuring the input-side Fs (input terminal 1), and selects the output-side Fs synchronization signal when measuring the output-side Fs (input terminal 2). . The sample number counter 25 counts up every one sample period of the measured frequency. In this case, the selector 24 selects and inputs the output C1 of the comparator 28 to the reset input of the sample number counter 25 when the set value of REG L (30) is used as the averaging cycle (input terminal 2). REG S
When the set value of (33) is used as the averaging period, the output C2 of the comparator 31 is selected and input by the selector 24 (input terminal 4), and the value based on the set value of REGL (30) is averaged. REG the measurement result as the cycle
At the same time as obtaining at C (22) and obtaining at REG X (41) a measurement result with a value based on the set value of REG S (33) as another averaging cycle, the sample number counter 25 is set to free run. To operate as a counter, a fixed value “0” is input.

【0022】REG L(30),REG S(33)
には何周期分計測を行うかという値を設定する。この周
期が長いほど計測の精度は上がるが、Fsに変化があっ
た場合、追従性は悪くなる。REG L(30),RE
G S(33)に設定された周期とサンプル数カウンタ
25の値を比較器28,31で比較して一致するとマス
タークロックカウンタ17の値をREG A(19)も
しくはREG 0(34)に取り込む。このとき、比較
器28,31はレジスタ29,30に設定されているデ
ータに基づいて比較対象となるビットを決定する。RE
G A(19),B(20)及びREG 0(34)〜
N(38)は1周期ごとにFIFO(First-In First-O
ut)のようにデータが推移していく。つまり、REG
A(19)の値はREG B(20)に、REG 0
(34)の値はREG 1(35)に、REG 1(3
5)の値はREG 2(36)に…という具合にデータ
が転送される。
REG L (30), REG S (33)
Is set to a value indicating how many cycles to measure. The longer this cycle is, the higher the measurement accuracy is, but if Fs changes, the follow-up becomes poor. REG L (30), RE
The comparator 28 and 31 compare the cycle set in the GS (33) with the value of the sample number counter 25, and when they match, the value of the master clock counter 17 is taken into REG A (19) or REG 0 (34). At this time, the comparators 28 and 31 determine bits to be compared based on the data set in the registers 29 and 30. RE
G A (19), B (20) and REG 0 (34)-
N (38) is a FIFO (First-In First-O
ut). That is, REG
The value of A (19) is stored in REG B (20) and REG 0
The value of (34) is assigned to REG 1 (35) and REG 1 (3
The data of the value of 5) is transferred to REG 2 (36).

【0023】比較器28は、レジスタ29に設定されて
いるマスクビットに基づいて比較対象のビットを決定
し、サンプル数カウンタ25のカウント値CNT2がR
EGL(30)の設定値に等しくなった場合、出力C1
を“1”にする。比較器28の出力C1が“1”となっ
たとき、REG A(19)に新しい値が取り込まれ、
次に今までREG A(19)にあったデータがREG
B(20)に移され、その時点で減算器21が2つの
レジスタの差をとって、その結果がREG C(22)
に保存される。これがREG L(30)に設定された
値の周期分、入力側または出力側Fsが発生した間にシ
ステムクロックSystem Clockのクロック発生回数を表
し、Fsの計測値1となる。
The comparator 28 determines the bit to be compared based on the mask bit set in the register 29, and the count value CNT2 of the sample number counter 25 is R
When the value becomes equal to the set value of EGL (30), the output C1
To “1”. When the output C1 of the comparator 28 becomes "1", a new value is taken into REG A (19),
Next, the data that had been in REG A (19)
B (20), at which point the subtractor 21 takes the difference between the two registers and the result is REG C (22)
Is stored in This represents the number of clock generations of the system clock System Clock during the occurrence of the input side or the output side Fs for the period of the value set in REGL (30), and becomes the measured value 1 of Fs.

【0024】一方、比較器31は、レジスタ32に設定
されているマスクビットに基づいて比較対象のビットを
決定し、サンプル数カウンタ25のカウント値CNT2
がREG S(33)の設定値に等しくなった場合、出
力C2を“1”にする。比較器31の出力C2が“1”
となったとき、REG 0(34)に新しい値が取り込
まれ、次に今までREG 0(34)〜REG N−1
(37)にあったデータがそれぞれREG 1(35)
〜REG N(38)に移され、その時点で減算器40
がレジスタREG 0(34)の値と、セレクタ39で
選択されたレジスタREG 1(35)〜REG N
(38)のいずれかのレジスタの値の差をとって、その
結果がREG X(41)に保存される。これがFsの
計測値2である。
On the other hand, the comparator 31 determines a bit to be compared on the basis of the mask bit set in the register 32, and determines the count value CNT2 of the sample number counter 25.
Becomes equal to the set value of REG S (33), the output C2 is set to "1". The output C2 of the comparator 31 is "1"
, The new value is taken into REG 0 (34), and then REG 0 (34) to REG N-1
The data in (37) is REG 1 (35), respectively.
REG N (38), at which point the subtractor 40
Are the values of the registers REG 0 (34) and the registers REG 1 (35) to REG N selected by the selector 39.
The difference between the values of any of the registers in (38) is obtained, and the result is stored in REG X (41). This is the measured value 2 of Fs.

【0025】なお、アベレージング周期をREG L
(30)に設定して計測値をREGC(22)に得る場
合には、サンプル数カウンタ25のリセット入力に比較
器28の出力C1を入力するようにして、サンプル数カ
ウンタ25をそのカウント値がREG L(30)の値
に一致する度にリセットするようにする。また、アベレ
ージング周期をREG S(33)に設定して計測値を
REG X(41)に得る場合には、サンプル数カウン
タ25のリセット入力に比較器31の出力C2を入力す
るようにして、サンプル数カウンタ25をそのカウント
値がREG S(33)の値に一致する度にリセットす
るようにする。さらに、アベレージング周期をREG
L(30)に設定してその周期による計測値をREG
C(22)に得ると同時に、他のアベレージング周期を
REG S(33)に設定してその周期による計測値を
REG X(41)に得る場合には、サンプル数カウン
タ25のリセット入力に固定値“0”を入力してフリー
カウンタとして動作させ、かつレジスタ29,32にマ
スクデータを設定して比較器28,31の比較対象のビ
ットを決定し、異なるアベレージング周期の設定値に基
づいて出力C1,C2に“1”が出力されるようにす
る。
The averaging cycle is REG L
When the measurement value is obtained in REGC (22) by setting to (30), the output C1 of the comparator 28 is input to the reset input of the sample number counter 25, and the count value of the sample number counter 25 is It is reset every time it matches the value of REG L (30). When the averaging cycle is set to REG S (33) and the measured value is obtained in REG X (41), the output C2 of the comparator 31 is input to the reset input of the sample number counter 25. The sample number counter 25 is reset every time the count value matches the value of REGS (33). Furthermore, the averaging cycle is set to REG.
L (30) and set the measured value in that cycle to REG
In the case where the other averaging cycle is set to REG S (33) and the measured value according to the cycle is obtained in REG X (41) at the same time as obtaining at C (22), it is fixed to the reset input of the sample number counter 25. A value "0" is input to operate as a free counter, and mask data is set in the registers 29 and 32 to determine bits to be compared by the comparators 28 and 31, and based on the set values of different averaging periods. "1" is output to the outputs C1 and C2.

【0026】次に、入力側と出力側のFsの比を求める
場合の動作について説明する。図1の周波数測定回路で
は、2つのカウンタ17,25の動作クロックを選ぶこ
とによって入力側と出力側でFsが異なるようなシステ
ムにおいて入出力のFsの比を求めることも出来る。例
えばマスタークロックカウンタ17を入力ビットクロッ
クで、サンプル数カウンタ25を出力側Fs同期信号で
動作させればREGC(22)、REG X(41)に
はFsの比が得られる。この場合、マスタークロックカ
ウンタ17はセレクタ16で“0”入力を選択してフリ
ーランカウンタとして動作させ、サンプル数カウンタ2
5のリセット入力には比較器28もしくは比較器31の
出力または固定値“0”を入力する。
Next, the operation for obtaining the ratio of Fs between the input side and the output side will be described. In the frequency measuring circuit of FIG. 1, the ratio of input / output Fs can be obtained in a system in which Fs is different between the input side and the output side by selecting the operation clocks of the two counters 17 and 25. For example, if the master clock counter 17 is operated with the input bit clock and the sample number counter 25 is operated with the output side Fs synchronization signal, the ratio of Fs is obtained in REGC (22) and REG X (41). In this case, the master clock counter 17 selects the “0” input by the selector 16 and operates as a free-run counter.
5, the output of the comparator 28 or the comparator 31 or the fixed value "0" is input to the reset input.

【0027】周期設定レジスタREG L(30)及び
REG A(19)、B(20)は比較的アベレージン
グ周期が長い場合に用いる。一方、REG S(33)
及びREG 0(34)〜N(38)はアベレージング
周期が短く、Fsの変動に対する追従性が必要な場合に
用いる。例えばマスタークロックカウンタ17の動作ク
ロックがFsの256分周程度(8ビット)で24ビッ
ト精度のFs計測値が必要な場合、REG L(30)
には216(=65536)を設定してやればよいことに
なる。しかし、65536サンプルの間に起こったFs
の変化にはうまく追従できないことになる。追従性をよ
くしたい場合の方法のひとつとしてはアベレージング周
期を短くすればよいが、例えば1サンプルごとにFsの
値を知りたいとなると、上の例では8ビット程度の精度
でしかFsの値を得られないことになる。毎サンプルF
sの値を知りたくて且つもう少し精度もほしい場合に
は、REG S(33)及びREG 0(34)〜N
(38)を使う。例えばN=32(保存用レジスタRE
G 1〜REG Nが32ワード分ある)の場合を考え
ると、やはりマスタークロックがFsの256分周程度
(8ビット)である時、毎サンプル前記レジスタの値が
取り込まれる様にREG S(33)を設定すると、8
ビット+5ビット=13ビットの精度で毎サンプルFs
の値を得ることが出来る。保存するワード数はセレクタ
39によって選択することが出来、このワード数とアベ
レージング周期によってFsの計測精度が決まる。な
お、前記レジスタの取り込み指示信号としてセレクタ2
7の出力を使用しても良い。
The cycle setting registers REG L (30) and REGs A (19) and B (20) are used when the averaging cycle is relatively long. On the other hand, REG S (33)
And REGs 0 (34) to N (38) are used when the averaging period is short and a follow-up property to the fluctuation of Fs is required. For example, when the operation clock of the master clock counter 17 is about 256 divisions of Fs (8 bits) and a 24-bit precision Fs measurement value is required, REG L (30)
Should be set to 2 16 (= 65536). However, the Fs that occurred during 65536 samples
Will not be able to keep up with the changes. One of the methods for improving the followability is to shorten the averaging period. For example, if one wants to know the value of Fs for each sample, the value of Fs can be obtained only with an accuracy of about 8 bits in the above example. You will not be able to get. Every sample F
If you want to know the value of s and want a little more precision, REG S (33) and REG 0 (34)-N
Use (38). For example, N = 32 (storage register RE
Considering the case where G1 to REGN are equivalent to 32 words), when the master clock is also about 256 times the frequency of Fs (8 bits), REG S (33 ) Is set to 8
Bits + 5 bits = Fs per sample with 13-bit precision
Can be obtained. The number of words to be stored can be selected by the selector 39, and the measurement accuracy of Fs is determined by the number of words and the averaging cycle. It should be noted that the selector 2 receives the register fetch instruction signal.
7 may be used.

【0028】上記のように、アベレージング周期の異な
る2つの計測値を比較することによって、追従性のよい
Fs計測値2でFsの変化を知り、変化があった場合に
精度のよいFs計測値1を求めて、それを信号処理アプ
リケーション内で使用するというような使い方が考えら
れる。
As described above, by comparing two measured values having different averaging periods, a change in Fs can be known from the Fs measured value 2 having good tracking performance, and if there is a change, an accurate Fs measured value can be obtained. For example, a method of finding 1 and using it in a signal processing application is conceivable.

【0029】また、Fsの変動はFLAG A(1
0),B(13)を使っても検出できる。この場合マス
タークロックカウンタ17はFs周期にしたがってリセ
ットをかけて使う。すなわち、入力側Fs同期信号の変
動を検出する場合には、セレクタ16で入力側Fs同期
信号(入力端子1)を選択し、出力側Fs同期信号の変
動を検出する場合には、セレクタ16で出力側Fs同期
信号(入力端子2)を選択する。また、マスタークロッ
クカウンタ17のクロックCKには、セレクタ18でシ
ステムクロックSystem Clock(入力端子1)を選択して
入力する。もしカウンタ値CNT1がREG P(1
1)に設定された値に達する前にリセットされるとFL
AG A(10)が立ち、REG Q(12)に設定さ
れた値を超えてリセットされればFLAG B(13)
が立つ。デジタル信号処理装置はこのフラグを見てFs
が変動したかどうかを知ることが出来る。なお、FLA
G A(10),B(13)をリセットするタイミング
は、デジタル信号処理装置によって任意のタイミングで
設定することができる。
The fluctuation of Fs is FLAG A (1
0) and B (13). In this case, the master clock counter 17 is reset and used according to the Fs cycle. That is, the selector 16 selects the input-side Fs synchronization signal (input terminal 1) when detecting a change in the input-side Fs synchronization signal, and selects the input-side Fs synchronization signal by using the selector 16 when detecting the change in the output-side Fs synchronization signal. The output side Fs synchronization signal (input terminal 2) is selected. The selector 18 selects and inputs a system clock System Clock (input terminal 1) as the clock CK of the master clock counter 17. If the counter value CNT1 is REG P (1
If reset before reaching the value set in 1), FL
If AG A (10) rises and is reset beyond the value set in REG Q (12), FLAG B (13)
Stands. The digital signal processor sees this flag and
Can be determined whether or not has changed. In addition, FLA
The timing for resetting GA (10) and B (13) can be set at an arbitrary timing by the digital signal processing device.

【0030】上述したようにサンプル数カウンタ25
は、フリーランにするか、またはリセット信号を比較器
出力、外部信号(フラグ回路23のセット入力)から選
ぶことが出来る。リセット信号を使用せず、フリーラン
にする場合にはセレクタ24で入力端子3を選択する。
リセット信号を比較器28,31の出力C1,C2にす
る場合には、セレクタ24で入力端子2,4をそれぞれ
選択する。リセット信号を外部信号にする場合には、入
力端子1を選択するようにする。フリーランにした場合
にはサンプル数カウンタ25の出力の比較対象となるビ
ット以外をMASKレジスタ29,32によってマスク
して周期設定レジスタ30,33に設定した値とで比較
出力が出るようにする。外部信号によるリセットは複数
のチップで同時にサンプルカウントを開始したい場合な
どに用いる。例えば、まず、フラグ回路23のセット入
力SETに“0”→“1”→“0”と変化する外部信号
を1パルス入力してフラグ回路23をセットして、サン
プル数カウンタ25をリセットし、次に、入力側または
出力側Fs同期信号が“1”レベルになったときにフラ
グ回路23がリセットされて、サンプル数カウンタ25
のリセット入力RESETには“0”が入力されて、カ
ウント動作が可能になる。次に、ディレイ回路26によ
って所定時間遅延された入力側または出力側Fs同期信
号がクロック入力CKに入力されてカウントされる。こ
の場合、外部信号の入力後、次の入力側または出力側F
s同期信号を最初のクロックとしてサンプル数カウンタ
25がカウント動作を開始することになる。そして、サ
ンプル数カウンタ25がカウント動作を開始した後は、
例えば、セレクタ24の選択を入力端子2または入力端
子4に切り替えて、比較器28または31の出力に応じ
てサンプル数カウンタ25をリセットするようにする。
As described above, the sample number counter 25
Can be set to free-run or a reset signal can be selected from a comparator output and an external signal (set input of the flag circuit 23). When the free run is performed without using the reset signal, the input terminal 3 is selected by the selector 24.
When the reset signals are output C1 and C2 of the comparators 28 and 31, the selector 24 selects the input terminals 2 and 4, respectively. When the reset signal is an external signal, the input terminal 1 is selected. In the case of the free run, the bits other than the comparison target bit of the output of the sample number counter 25 are masked by the MASK registers 29 and 32 so that the comparison output is output with the value set in the cycle setting registers 30 and 33. The reset by an external signal is used when, for example, it is desired to simultaneously start sample counting in a plurality of chips. For example, first, an external signal that changes from “0” → “1” → “0” is input as one pulse to the set input SET of the flag circuit 23, the flag circuit 23 is set, and the sample number counter 25 is reset. Next, when the input side or output side Fs synchronizing signal becomes “1” level, the flag circuit 23 is reset and the sample number counter 25 is reset.
"0" is input to the reset input RESET of, and the count operation becomes possible. Next, the input-side or output-side Fs synchronization signal delayed by a predetermined time by the delay circuit 26 is input to the clock input CK and counted. In this case, after the input of the external signal, the next input side or output side F
With the s synchronization signal as the first clock, the sample number counter 25 starts the counting operation. Then, after the sample number counter 25 starts the counting operation,
For example, the selection of the selector 24 is switched to the input terminal 2 or the input terminal 4, and the sample number counter 25 is reset according to the output of the comparator 28 or 31.

【0031】図2に、上述した種々の動作における各回
路の設定例および測定結果を出力する回路を一覧にして
示した。図2の図表では、例えば測定項目が入力側Fs
である場合、アベレージング周期をREG L(30)
に設定する設定方法と、アベレージング周期をREG
S(33)に設定する設定方法と、2種類のアベレージ
ング周期をそれぞれREG L(30)とREG S
(33)に設定する設定方法との3通りがあることが示
されている。図2の図表では、測定項目別に、各設定方
法におけるセレクタ16,18,24,27,39で選
択すべき入力端子の端子番号と、アベレージング周期の
設定先レジスタと、測定結果の出力先のレジスタと、F
LAG A(10),B(13)を利用して測定結果を
得る場合の検出値の下限および上限の設定先レジスタと
が示されている。また、備考欄には、複数の測定方法の
なかで、MASKレジスタ29,32を使用する場合
と、FLAG A(10),B(13)を利用する場合
を記入している。
FIG. 2 shows a list of setting examples of each circuit in the various operations described above and circuits for outputting the measurement results. In the chart of FIG. 2, for example, the measurement item is the input side Fs
, The averaging cycle is REG L (30)
Setting method and averaging cycle to REG
The setting method to be set in S (33) and the two types of averaging periods are REG L (30) and REG S
It is shown that there are three types of setting methods (33). In the table of FIG. 2, for each measurement item, the terminal number of the input terminal to be selected by the selectors 16, 18, 24, 27, and 39 in each setting method, the averaging period setting destination register, and the measurement result output destination Register and F
The lower limit and the upper limit register of the detection value when the measurement result is obtained using the LAGs A (10) and B (13) are shown. In the remarks column, the case where the MASK registers 29 and 32 are used and the case where the FLAGs A (10) and B (13) are used are described among a plurality of measurement methods.

【0032】図2では、例えば、入力側Fsを測定する
場合の測定方法が3種類あり、そのうちアベレージング
周期をREG L(30)に設定するときには、セレク
タ16,18,24,27の入力がそれぞれ入力端子
3,1,2,1に設定され、そして、入力側Fsの周期
に応じた出力がREG C(22)に得られることが示
されている。また、入力側Fsを測定する場合にアベレ
ージング周期をREGS(33)に設定するときには、
セレクタ16,18,24,27,39の入力がそれぞ
れ入力端子3,1,4,1,1〜Nのいずれか,に設定
され、そして、入力側Fsの周期に応じた出力がREG
X(41)に得られることが示されている。なお、ア
ベレージング周期をREG L(30)に設定するとき
には、セレクタ39の設定および周波数変動を検出する
際の検出下限となる周期や上限となる周期の設定は不要
であり、その旨が該当欄に「−」印を記入するか、ある
いは該当欄を無記入を記とすることで示されている。ま
た、他の例としては、入力側Fsと出力側Fsの周波数
比に応じた値を得る場合(測定項目:出力側Fs/入力
側Fs)、アベレージング周期をREG L(30)に
設定するときには、セレクタ16,18,24,27の
入力が、それぞれ入力端子3,3,2,1に設定され、
入力側Fsと出力側Fsの周波数比に応じた出力がRE
G C(22)に得られることが示されている。
In FIG. 2, for example, there are three types of measurement methods for measuring the input side Fs, and when the averaging cycle is set to REG L (30), the inputs of the selectors 16, 18, 24, and 27 are required. It is shown that they are set to the input terminals 3, 1, 2, and 1, respectively, and that an output corresponding to the cycle of the input side Fs is obtained at the REG C (22). When the averaging cycle is set to REGS (33) when measuring the input side Fs,
The inputs of the selectors 16, 18, 24, 27, and 39 are set to any of the input terminals 3, 1, 4, 1, 1 to N, and the output corresponding to the cycle of the input side Fs is REG.
X (41) shows that it is obtained. When the averaging cycle is set to REGL (30), the setting of the selector 39 and the setting of the cycle as the lower limit and the cycle as the upper limit for detecting the frequency fluctuation are not necessary. Is indicated by entering a "-" mark in the column, or leaving the corresponding column blank. As another example, when a value corresponding to the frequency ratio between the input side Fs and the output side Fs is obtained (measurement item: output side Fs / input side Fs), the averaging cycle is set to REGL (30). Sometimes, the inputs of selectors 16, 18, 24, 27 are set to input terminals 3, 3, 2, 1 respectively,
The output corresponding to the frequency ratio between the input side Fs and the output side Fs is RE.
GC (22) shows that it is obtained.

【0033】以上説明したように、本実施の形態によれ
ば、次のような作用を得ることができる。 1サンプル周期に複数ビットカウントできるマスター
クロックカウンタ17と1サンプルごとに1カウントア
ップするサンプル数カウンタ25を組み合わせて複数サ
ンプル期間のアベレージングをとることによってクロッ
ク周波数を上げることなく高精度なFs値を得ることが
出来る。
As described above, according to the present embodiment, the following operation can be obtained. A master clock counter 17 capable of counting a plurality of bits in one sample period and a sample counter 25 that counts up by one for each sample are combined to perform averaging over a plurality of sample periods, thereby obtaining a highly accurate Fs value without increasing the clock frequency. Can be obtained.

【0034】アベレージング周期はレジスタ30,3
3によって任意の値に設定することが出来る。このレジ
スタ30,33の値とサンプル数カウンタ25の値が一
致した時にマスタークロックカウンタ17の値をサンプ
ルし以前の値との減算を行うことにより任意の精度でF
sの値を計測することが可能である。高精度な値が必要
な時は期間を長く、また逆に精度がそれほど必要ない場
合やFsの変動を細かく知りたい場合などは期間を短く
設定すればよい。
The averaging period is determined by the registers 30 and 3
3 can be set to any value. When the values of the registers 30 and 33 match the value of the sample number counter 25, the value of the master clock counter 17 is sampled and subtracted from the previous value to obtain F at arbitrary accuracy.
It is possible to measure the value of s. When a high-precision value is required, the period may be set long. On the contrary, when the accuracy is not so much required or when it is desired to know the variation of Fs in detail, the period may be set short.

【0035】次の2種類の方法でFsの変動を知るこ
とが出来る。1つは、アベレージング周期設定レジスタ
30,33を複数持っているため期間を長く設定したも
のと短く設定したものでFsを比較することによってF
sの変動を知ることが出来る。2つ目はサンプル同期信
号の周期が設定レジスタ12,11の値を超えたり割り
込んだりした場合に立つフラグ13,10を用いて変動
を知ることができる。これらの2つの方法のどちらかで
Fsの変動を知ることによって処理量や処理内容の変更
に利用したり、計測したFs値にしたがって係数データ
の値を切り替えたりすることに使える。
The variation of Fs can be known by the following two methods. One is that by having a plurality of averaging cycle setting registers 30 and 33, the Fs is compared by comparing the Fs with the one with a longer period and the one with the shorter period.
The variation of s can be known. Second, the variation can be known by using the flags 13 and 10 that are set when the period of the sample synchronization signal exceeds or interrupts the values of the setting registers 12 and 11. Knowing the variation of Fs by either of these two methods can be used to change the processing amount or processing content, or to switch the value of coefficient data according to the measured Fs value.

【0036】マスタークロックカウンタ17のサンプ
ル値を保存するためのバッファを複数ワード持つため
(REG 1(35)〜N(38))、アベレージング
周期が短い場合でもバッファのワード数分の精度を上乗
せして毎サンプル最新のFs値を得ることが出来る。
Since the buffer for storing the sample value of the master clock counter 17 has a plurality of words (REG 1 (35) to N (38)), even if the averaging cycle is short, the precision of the number of words in the buffer is added. Thus, the latest Fs value can be obtained for each sample.

【0037】マスタークロックカウンタ17のクロッ
ク入力はシステムクロック入力側ビットクロック、出力
側ビットクロックから選択することが出来、サンプル数
カウンタ25のクロック入力は入力側サンプル同期信
号、出力側サンプル同期信号から選択することが出来る
ため入出力のFsの比を求めることが可能である。これ
を用いて、例えば特開平5−235698号公報「サン
プリング周波数変換器」に記載されているように、上位
ビットをデータRAMの参照アドレス、下位ビットを補
間器への入力データなどに割り当てることによって、F
s変換機能を実現することができる。
The clock input of the master clock counter 17 can be selected from the system clock input side bit clock and the output side bit clock. The clock input of the sample number counter 25 is selected from the input side sample synchronization signal and the output side sample synchronization signal. It is possible to obtain the ratio of input and output Fs. By using this, as described in, for example, Japanese Patent Application Laid-Open No. Hei 5-235698, “Sampling Frequency Converter”, upper bits are assigned to a reference address of a data RAM, lower bits are assigned to input data to an interpolator, and the like. , F
An s conversion function can be realized.

【0038】サンプル数カウンタ25のカウント開始
および停止動作は内部信号あるいは外部信号によって制
御することが出来るため複数チップでサンプルに同期し
た処理が可能になる。
The count start and stop operations of the sample number counter 25 can be controlled by an internal signal or an external signal, so that a process synchronized with the sample can be performed by a plurality of chips.

【0039】次に、上記実施形態を構成する各回路の機
能について図3を参照して説明する。図3は、上述した
実施形態の構成要素を機能毎にまとめて示す機能ブロッ
ク図である。図3のマスタークロックカウンタ100
は、システムのマスタークロック信号等、サンプリング
周波数FsのM倍(Mは実数)の周波数のクロック信号
をクロックとしてカウント動作を行うもので、図1のマ
スタークロックカウンタ17に対応する。例えば、シス
テムのサンプリング周波数Fsをカウントする場合、M
はサンプリング周波数Fsに対するマスタークロックの
分解能を示すことになる。Fs計測回路1(101)
は、図1のREG A(19)、REG B(20)、
減算器21、およびREG C(22)に対応するもの
であって、記憶回路1(101a)がREG A(1
9)とREG B(20)に、演算回路1(101b)
が減算器21とREG C(22)に対応している。記
憶回路1(101a)は、記憶数2、語長L(Lは自然
数)のシフト回路から構成されていて、計測周期指定回
路1(103)の出力信号の周期に同期して、マスター
クロックカウンタ100のカウンタ値を取り込んで、シ
フト回路内でシフトする。つまり、記憶回路1(101
a)は、現在値と1周期前の値との1組のカウンタ値を
記憶することになる。演算回路1(101b)は、記憶
回路1(101a)に記憶されている1組の記憶値を用
い、所定の演算処理を行ってサンプリング周波数Fsに
応じた計測値であるFs計測値1を算出する。演算処理
としては1組の記憶値の差分を求める減算処理や、さら
にその平均値、最高値、最低値を求める演算処理等が考
えられる。
Next, the function of each circuit constituting the above embodiment will be described with reference to FIG. FIG. 3 is a functional block diagram showing components of the above-described embodiment collectively for each function. Master clock counter 100 of FIG.
Performs a counting operation using a clock signal having a frequency M times the sampling frequency Fs (M is a real number), such as a system master clock signal, as a clock, and corresponds to the master clock counter 17 in FIG. For example, when counting the sampling frequency Fs of the system, M
Indicates the resolution of the master clock with respect to the sampling frequency Fs. Fs measurement circuit 1 (101)
Are REG A (19), REG B (20),
It corresponds to the subtractor 21 and the REG C (22), and the storage circuit 1 (101a) stores the REG A (1
9) and REG B (20) are added to arithmetic circuit 1 (101b)
Corresponds to the subtractor 21 and the REG C (22). The storage circuit 1 (101a) is constituted by a shift circuit having a storage number of 2 and a word length L (L is a natural number), and synchronizes with a cycle of an output signal of the measurement cycle designation circuit 1 (103) to generate a master clock counter. The counter value of 100 is taken in and shifted in the shift circuit. That is, the storage circuit 1 (101
In a), a set of counter values including a current value and a value one cycle before is stored. The arithmetic circuit 1 (101b) performs a predetermined arithmetic process using one set of stored values stored in the storage circuit 1 (101a) to calculate an Fs measurement value 1 that is a measurement value according to the sampling frequency Fs. I do. Examples of the arithmetic processing include a subtraction processing for obtaining a difference between a set of stored values, and an arithmetic processing for obtaining an average value, a maximum value, and a minimum value.

【0040】Fs計測回路2(102)は、図1のRE
G 0(34)〜REG N(38)、セレクタ39、
減算器40、およびREG X(41)に対応するもの
であって、記憶回路2(102a)がREG 0(3
4)〜REG N(38)とセレクタ39に、演算回路
2(102b)が減算器40とREG X(41)に対
応している。記憶回路2(102a)は、記憶数N、語
長S(Sは自然数)のシフト回路から構成されていて、
計測周期指定回路2(104)の出力信号の周期に同期
して、マスタークロックカウンタ100のカウンタ値を
取り込んで、シフト回路内で順次シフトする。つまり、
記憶回路2(102a)は、現在値と1〜N−1周期前
の過去の値のN個のカウンタ値を記憶することになる。
演算回路2(102b)は、記憶回路2(102a)に
記憶されているN個の記憶値を用いて、例えば現在の値
と1〜N−1周期前のいずれかの値との差分を求める減
算処理等の演算処理を行ってFsに応じた計測値である
Fs計測値2を算出する。
The Fs measurement circuit 2 (102) uses the RE
G 0 (34) to REG N (38), selector 39,
It corresponds to the subtractor 40 and REG X (41), and the storage circuit 2 (102a) stores REG 0 (3
4) to REG N (38) and selector 39, and arithmetic circuit 2 (102b) corresponds to subtractor 40 and REG X (41). The storage circuit 2 (102a) includes a shift circuit having a storage number N and a word length S (S is a natural number),
In synchronization with the cycle of the output signal of the measurement cycle designating circuit 2 (104), the counter value of the master clock counter 100 is fetched and sequentially shifted in the shift circuit. That is,
The storage circuit 2 (102a) stores the current value and N counter values of the past value 1 to N-1 cycles ago.
The arithmetic circuit 2 (102b) uses the N stored values stored in the storage circuit 2 (102a) to determine, for example, the difference between the current value and any value 1 to N-1 cycles ago. An arithmetic process such as a subtraction process is performed to calculate an Fs measurement value 2 which is a measurement value corresponding to Fs.

【0041】計測周期指定回路1(103)は、サンプ
ル数カウンタ105のカウント数が周期Aの値に対応す
る値になったときに計測周期を指示する信号を出力する
ものであって、図1の比較器28、REG L(3
0)、レジスタ29に対応する。計測周期指定回路2
(104)は、サンプル数カウンタ105のカウント数
が周期Bの値に対応する値になったときに計測周期を指
示する信号を出力するものであって、図1の比較器3
1、REG S(33)、レジスタ32に対応する。サ
ンプル数カウンタ105は、入力側または出力側のサン
プル周波数信号Fsに同期した信号の発生回数をカウン
トしカウント数を出力するものであって、図1のサンプ
ル数カウンタ25に対応する。
The measurement cycle designating circuit 1 (103) outputs a signal indicating a measurement cycle when the count number of the sample number counter 105 reaches a value corresponding to the value of the cycle A. REG L (3
0), corresponding to the register 29. Measurement cycle specification circuit 2
(104) outputs a signal indicating a measurement cycle when the count number of the sample number counter 105 reaches a value corresponding to the value of the cycle B.
1, REG S (33), corresponds to the register 32. The sample number counter 105 counts the number of occurrences of a signal synchronized with the sample frequency signal Fs on the input side or the output side and outputs the count number, and corresponds to the sample number counter 25 in FIG.

【0042】なお、上記構成では、通常は、ハードウェ
アの規模を抑えるために、記憶回路2の語長Sは記憶回
路1に比べて短くとる(S<L)。記憶数Nは語長Sを
長くすればするほど多く必要となる。記憶数Nは語長S
を長くすればするほど多く必要となる。N,Sは、周期
B、マスタークロックの分解能Mによって決定される。
N,Sが必要な精度、追従性を満たすくらい大きくとれ
るなら、Fs測定回路1は省略可能である。
In the above configuration, the word length S of the storage circuit 2 is usually shorter than that of the storage circuit 1 (S <L) in order to reduce the scale of hardware. The longer the word length S, the greater the number of storages N is required. The storage number N is the word length S
The longer the is, the more is needed. N and S are determined by the cycle B and the resolution M of the master clock.
The Fs measuring circuit 1 can be omitted if N and S can be made large enough to satisfy the required accuracy and followability.

【0043】[0043]

【発明の効果】本発明によれば、クロック端子に入力さ
れる第1のクロック信号をカウントする第1のカウンタ
回路と、クロック端子に入力される第2のクロック信号
をカウントする第2のカウンタ回路と、第2のカウンタ
の計測周期を記憶する第1の記憶回路と、第2のカウン
タのカウント値と前記第1の記憶回路に記憶された計測
周期とを比較する第1の比較回路と、第1の比較回路の
出力に応じて前記第1のカウンタ回路のカウント値を順
次記憶する複数の記憶回路からなる第1の記憶回路群
と、第1の記憶回路群において記憶されたカウント値の
変動を求める第1の演算回路とを備えるようにしたの
で、2種類のカウンタ回路を利用し、第1のカウンタ回
路で測定対象のクロック信号をカウントするとともに、
第2のカウンタ回路で計測周期の基準となるクロック信
号をカウントしかつ第1の記憶回路でそれに基づいて発
生される計測周期を任意に設定可能とし、さらに計測周
期毎に第1のカウンタ回路のカウンタ値を第1の記憶回
路群に転送して、演算回路で第1の記憶回路群に記憶し
たカウント値の変動を求めることで周波数に応じた測定
結果を得ることができるので、信号処理装置等に内蔵す
るのに適した構成であるデジタル回路による簡単な構成
で、かつ測定条件の設定変更の自由度を高め、所望の精
度でサンプリング周波数Fsの周期を正確に測定するこ
とができるという効果を得られる。
According to the present invention, a first counter circuit for counting a first clock signal input to a clock terminal and a second counter for counting a second clock signal input to a clock terminal A first storage circuit that stores a measurement cycle of the second counter; a first comparison circuit that compares a count value of the second counter with the measurement cycle stored in the first storage circuit; A first storage circuit group including a plurality of storage circuits for sequentially storing the count value of the first counter circuit in accordance with an output of the first comparison circuit; and a count value stored in the first storage circuit group. And a first arithmetic circuit for calculating the variation of the clock signal, so that the clock signal to be measured is counted by the first counter circuit using two types of counter circuits,
The second counter circuit counts a clock signal serving as a reference of the measurement cycle, and the first storage circuit allows the measurement cycle generated based on the count to be arbitrarily set. Since the counter value is transferred to the first storage circuit group and the arithmetic circuit calculates the change in the count value stored in the first storage circuit group, a measurement result corresponding to the frequency can be obtained. The effect of being able to accurately measure the period of the sampling frequency Fs with a desired accuracy with a simple configuration using a digital circuit, which is a configuration suitable for being incorporated in a device, etc., and increasing the degree of freedom in changing the setting of measurement conditions. Can be obtained.

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

【図1】 この発明による周波数測定回路の一実施の形
態を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a frequency measurement circuit according to the present invention.

【図2】 図1に示す回路の設定および動作を一覧にし
て示す図である。
FIG. 2 is a diagram showing a list of settings and operations of the circuit shown in FIG. 1;

【図3】 図1に示す周波数測定回路を構成する各回路
の機能をまとめて示す機能ブロック図である。
FIG. 3 is a functional block diagram collectively showing functions of respective circuits constituting the frequency measurement circuit shown in FIG.

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

10,13,23…フラグ回路、11,12,19,2
0,30,33,34,36,37,38…レジスタ、
14,15,28,31…比較器、16,18,22,
41,24,27,39…セレクタ、17…マスターカ
ウンタクロック、21,40…減算器、25…サンプル
数カウンタ。
10, 13, 23 ... Flag circuit, 11, 12, 19, 2
0, 30, 33, 34, 36, 37, 38 ... registers,
14, 15, 28, 31 ... comparators, 16, 18, 22,
41, 24, 27, 39 ... selector, 17 ... master counter clock, 21, 40 ... subtractor, 25 ... sample number counter.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中村 和夫 静岡県浜松市中沢町10番1号 ヤマハ株式 会社内 (72)発明者 牧野 貴昭 静岡県浜松市中沢町10番1号 ヤマハ株式 会社内 Fターム(参考) 2G029 AA01 AA02 AA04 AB05 AC02 AD01 AD08 AE08 AE10 AF03 AF07 AH00 5K029 AA01 HH27 KK22 LL14 LL19 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Kazuo Nakamura 10-1 Nakazawa-cho, Hamamatsu-shi, Shizuoka Yamaha Corporation (72) Inventor Takaaki Makino 10-1 Nakazawa-cho, Hamamatsu-shi, Shizuoka Yamaha Corporation F Terms (reference) 2G029 AA01 AA02 AA04 AB05 AC02 AD01 AD08 AE08 AE10 AF03 AF07 AH00 5K029 AA01 HH27 KK22 LL14 LL19

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 クロック端子に入力される第1のクロッ
ク信号をカウントする第1のカウンタ回路と、 クロック端子に入力される第2のクロック信号をカウン
トする第2のカウンタ回路と、 第2のカウンタの計測周期を記憶する第1の記憶回路
と、 第2のカウンタのカウント値と前記第1の記憶回路に記
憶された計測周期とを比較する第1の比較回路と、 第1の比較回路の出力に応じて前記第1のカウンタ回路
のカウント値を順次記憶する複数の記憶回路からなる第
1の記憶回路群と、 第1の記憶回路群において記憶されたカウント値の変動
を求める第1の演算回路とを備えることを特徴とする周
波数測定回路。
A first counter circuit that counts a first clock signal input to a clock terminal; a second counter circuit that counts a second clock signal input to a clock terminal; A first storage circuit for storing the measurement cycle of the counter, a first comparison circuit for comparing the count value of the second counter with the measurement cycle stored in the first storage circuit, and a first comparison circuit A first storage circuit group consisting of a plurality of storage circuits for sequentially storing the count value of the first counter circuit in accordance with the output of the first counter circuit; and a first storage circuit group for determining a change in the count value stored in the first storage circuit group. A frequency measuring circuit comprising:
【請求項2】 前記第1の演算回路が第1の記憶回路群
におけるいずれか2つの記憶回路の記憶値の差分を求め
ることを特徴とする請求項1記載の周波数測定回路。
2. The frequency measurement circuit according to claim 1, wherein said first arithmetic circuit calculates a difference between values stored in any two storage circuits in a first storage circuit group.
【請求項3】 第2のカウンタの計測周期を記憶する第
2の記憶回路と、 第2のカウンタのカウント値と前記第2の記憶回路に記
憶された計測周期とを比較する第2の比較回路と、 第2の比較回路の出力に応じて前記第1のカウンタ回路
のカウント値を順次記憶する複数の記憶回路からなる第
2の記憶回路群と、 第2の記憶回路群において記憶されたカウント値の変動
を求める第2の演算回路とをさらに備えることを特徴と
する請求項1記載の周波数測定回路。
3. A second storage circuit for storing a measurement cycle of a second counter, and a second comparison for comparing a count value of the second counter with a measurement cycle stored in the second storage circuit. A second storage circuit group including a circuit, a plurality of storage circuits that sequentially store the count value of the first counter circuit in accordance with an output of the second comparison circuit, and a second storage circuit group. 2. The frequency measuring circuit according to claim 1, further comprising a second arithmetic circuit for calculating a change in the count value.
【請求項4】 前記第1のカウンタ回路のカウント値と
所定の設定値とを比較する第3の比較回路と、 第3の比較回路による比較結果を記憶する第3の記憶回
路とを備えることを特徴とする請求項1乃至3のいずれ
か1項記載の周波数測定回路。
4. A semiconductor device comprising: a third comparison circuit for comparing a count value of the first counter circuit with a predetermined set value; and a third storage circuit for storing a comparison result by the third comparison circuit. The frequency measurement circuit according to claim 1, wherein:
【請求項5】 前記第1のカウンタ回路のクロック信号
を複数の信号から選択する第1の選択回路、又は、前記
第2のカウンタ回路のクロック信号を複数の信号から選
択する第2の選択回路の少なくとも一方を備えることを
特徴とする請求項1乃至4のいずれか1項記載の周波数
測定回路。
5. A first selection circuit for selecting a clock signal of the first counter circuit from a plurality of signals, or a second selection circuit for selecting a clock signal of the second counter circuit from a plurality of signals. The frequency measurement circuit according to claim 1, further comprising at least one of the following.
【請求項6】 前記第1のカウンタのリセット信号を複
数の信号から選択する第3の選択回路を備えたことを特
徴とする請求項1乃至4のいずれか1項記載の周波数測
定回路。
6. The frequency measurement circuit according to claim 1, further comprising a third selection circuit that selects a reset signal of the first counter from a plurality of signals.
【請求項7】 前記第2のカウンタのリセット信号を複
数の信号から選択する第4の選択回路を備えたことを特
徴とする請求項1乃至4のいずれか1項記載の周波数測
定回路。
7. The frequency measurement circuit according to claim 1, further comprising a fourth selection circuit that selects a reset signal of the second counter from a plurality of signals.
【請求項8】 前記第1のクロック信号の周期が、前記
第2のクロック信号の周期より短いことを特徴とする請
求項1乃至4のいずれか1項記載の周波数測定回路。
8. The frequency measurement circuit according to claim 1, wherein a cycle of the first clock signal is shorter than a cycle of the second clock signal.
【請求項9】 前記第1のカウンタ回路のクロック信号
を、システムクロック、入力側ビットクロック、又は出
力側ビットクロックから選択する第1の選択回路を備え
ることを特徴とする請求項1乃至5のいずれか1項記載
の周波数測定回路。
9. The apparatus according to claim 1, further comprising a first selection circuit for selecting a clock signal of said first counter circuit from a system clock, an input side bit clock, or an output side bit clock. The frequency measurement circuit according to claim 1.
【請求項10】 前記第2のカウンタ回路のクロック信
号を、入力側サンプル同期信号または出力側サンプル同
期信号から選択する第2の選択回路を備えることを特徴
とする請求項1乃至5のいずれか1項記載の周波数測定
回路。
10. The apparatus according to claim 1, further comprising a second selection circuit for selecting a clock signal of the second counter circuit from an input-side sample synchronization signal or an output-side sample synchronization signal. 2. The frequency measurement circuit according to claim 1.
【請求項11】 前記第3の選択回路が、前記第1のカ
ウンタ回路のリセット信号を、少なくとも第1の入力側
サンプル同期信号、出力側サンプル同期信号を含む複数
の信号から選択することを特徴とする請求項6記載の周
波数測定回路。
11. The third selection circuit selects a reset signal of the first counter circuit from a plurality of signals including at least a first input-side sample synchronization signal and an output-side sample synchronization signal. The frequency measuring circuit according to claim 6, wherein
【請求項12】 前記第4の選択回路が、前記第2のカ
ウンタ回路のリセット信号を、少なくとも第1の比較回
路の出力、第2の比較回路の出力、又は所定の外部信号
を含む複数の信号から選択することを特徴とする請求項
7記載の周波数測定回路。
12. The fourth selection circuit outputs a reset signal of the second counter circuit to a plurality of signals including at least an output of a first comparison circuit, an output of a second comparison circuit, or a predetermined external signal. The frequency measurement circuit according to claim 7, wherein the frequency measurement circuit is selected from signals.
【請求項13】 請求項1乃至12のいずれか1項に記
載の周波数測定回路を備え、少なくとも前記第1乃至第
4の選択回路のいずれかの選択動作を制御する制御信号
を供給することを特徴とするデジタル信号処理装置。
13. A frequency measuring circuit comprising: the frequency measuring circuit according to claim 1; and supplying a control signal for controlling at least one of the first to fourth selecting circuits. Digital signal processing device characterized by the following.
JP2000358031A 2000-11-24 2000-11-24 Frequency-measuring circuit and digital signal processor using the same Withdrawn JP2002162427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000358031A JP2002162427A (en) 2000-11-24 2000-11-24 Frequency-measuring circuit and digital signal processor using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000358031A JP2002162427A (en) 2000-11-24 2000-11-24 Frequency-measuring circuit and digital signal processor using the same

Publications (1)

Publication Number Publication Date
JP2002162427A true JP2002162427A (en) 2002-06-07

Family

ID=18830004

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000358031A Withdrawn JP2002162427A (en) 2000-11-24 2000-11-24 Frequency-measuring circuit and digital signal processor using the same

Country Status (1)

Country Link
JP (1) JP2002162427A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007530917A (en) * 2003-07-11 2007-11-01 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Improved frequency determination
CN112748283A (en) * 2020-12-29 2021-05-04 成都前锋电子仪器有限责任公司 Audio signal sampling method, main control chip and audio module thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007530917A (en) * 2003-07-11 2007-11-01 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Improved frequency determination
CN112748283A (en) * 2020-12-29 2021-05-04 成都前锋电子仪器有限责任公司 Audio signal sampling method, main control chip and audio module thereof

Similar Documents

Publication Publication Date Title
US5555524A (en) Semi-synchronous dual port FIFO
US5365468A (en) Sampling frequency converter
CN100575964C (en) Be used to measure the instrument of electric power
US20020190880A1 (en) Digital sample rate converters having matched group delay
US20020060328A1 (en) Semiconductor device
JP2002162427A (en) Frequency-measuring circuit and digital signal processor using the same
US7366935B1 (en) High speed bus with alignment, re-timing and buffer underflow/overflow detection enhancements
CN114528998B (en) Multi-board card signal synchronization method, equipment and medium for quantum measurement and control system
JP3811483B2 (en) Frequency error detection apparatus and detection method based on histogram information of input signal
JPH03131715A (en) Measuring data processor
US7719450B2 (en) Device for the parallel-serial conversion of several signal parameters each detected by a detector
JP3196183B2 (en) Time measuring device
CN117420342B (en) Multichannel acquisition method, device, system, FPGA and sampling oscilloscope
JP3451691B2 (en) Serial data transmission circuit
JPH11112440A (en) Sampling rate converter
JP4032929B2 (en) Frame synchronization method and apparatus
JPH11340789A (en) Sampling rate converter
JP2002163745A (en) Signal processor
JP2023026961A (en) Measuring instrument and measuring method
JP2709982B2 (en) IC tester
JPH1114773A (en) Time interval measuring method and distance measuring device
JPH10242945A (en) Pseudo random pattern error measuring circuit
JPH04212015A (en) Average value rectifying type measuring apparatus
JP2518387B2 (en) Serial data transmission circuit
JP2001202231A (en) Parallel data counting device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070919

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090827