JP2593017B2 - Serial data transfer device - Google Patents

Serial data transfer device

Info

Publication number
JP2593017B2
JP2593017B2 JP3272721A JP27272191A JP2593017B2 JP 2593017 B2 JP2593017 B2 JP 2593017B2 JP 3272721 A JP3272721 A JP 3272721A JP 27272191 A JP27272191 A JP 27272191A JP 2593017 B2 JP2593017 B2 JP 2593017B2
Authority
JP
Japan
Prior art keywords
clock pulse
edge detection
circuit
value
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.)
Expired - Fee Related
Application number
JP3272721A
Other languages
Japanese (ja)
Other versions
JPH05114919A (en
Inventor
博史 丸川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP3272721A priority Critical patent/JP2593017B2/en
Publication of JPH05114919A publication Critical patent/JPH05114919A/en
Application granted granted Critical
Publication of JP2593017B2 publication Critical patent/JP2593017B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、シリアル方式のデータ
転送において送信側で用いられるパラレルシリアル変換
回路を備えたシリアルデータ転送装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a serial data transfer device provided with a parallel-serial conversion circuit used on the transmission side in serial data transfer.

【0002】[0002]

【従来の技術】IC間のデータ転送方式としては、パラ
レル転送よりもシリアル転送のほうがピン数、配線数等
の上で有利であり、特にデジタルオーディオ分野のIC
では、信号処理用ICとADコンバータ用及びDAコン
バータ用ICとの間のPCMデータ転送にシリアル転送
が多く用いられている。
2. Description of the Related Art As a data transfer method between ICs, serial transfer is more advantageous than parallel transfer in terms of the number of pins and the number of wires.
, Serial transfer is often used for PCM data transfer between the signal processing IC and the AD converter and DA converter ICs.

【0003】図3は、送信側のシリアルデータ転送装置
が満足すべき転送タイミングの例を示すタイミング図で
ある。同図中のCLKは転送用のクロックパルス、Sは
転送すべきnビットのシリアルデータである。また、L
Rは、チャネル属性等を示す制御信号としてのワード信
号であって、同図に示す例ではその立上りエッジと立下
りエッジとの双方が転送すべきシリアルデータSの1ワ
ードの切れ目のタイミングを示している。一般的には、
ワード信号LRは、“0”と“1”との2値論理信号で
あって、立上りエッジと立下りエッジとのうちの少なく
とも一方のエッジが有意エッジとして、転送すべきシリ
アルデータSの1ワードの切れ目のタイミングを示すも
のである。そして、シリアルデータSは、全ビットがワ
ード信号LRの互いに隣接する2つの有意エッジの間に
ちょうど収まるようにクロックパルスCLKに同期して
順次転送されることが要求される。
FIG. 3 is a timing chart showing an example of transfer timing which should be satisfied by a serial data transfer device on the transmission side. In the figure, CLK is a transfer clock pulse, and S is n-bit serial data to be transferred. Also, L
R is a word signal as a control signal indicating a channel attribute or the like, and in the example shown in FIG. 3, both the rising edge and the falling edge indicate the timing of a break of one word of the serial data S to be transferred. ing. In general,
The word signal LR is a binary logical signal of “0” and “1”, and one word of the serial data S to be transferred is determined when at least one of the rising edge and the falling edge is a significant edge. Indicates the timing of the break. Then, the serial data S is required to be sequentially transferred in synchronization with the clock pulse CLK so that all the bits fall exactly between two adjacent significant edges of the word signal LR.

【0004】図3の転送タイミングに従う従来のシリア
ルデータ転送装置のブロック図を図4に示す。同図にお
いて、31はパラレルデータPをシリアルデータSに変
換するためのパラレルシリアル変換回路(P/S)であ
り、32はBを計数初期値としてクロックパルスCLK
を計数するためのクロックパルス計数回路(COU)で
ある。ロード信号入力端子21を通して与えられるロー
ド信号LDとクロックパルス入力端子22を通して与え
られるクロックパルスCLKとはいずれも、パラレルシ
リアル変換回路(P/S)31とクロックパルス計数回
路(COU)32との双方に共通に印加される。シリア
ルデータSはパラレルシリアル変換回路(P/S)31
からシリアルデータ出力端子23を通して出力され、ワ
ード信号LRはクロックパルス計数回路(COU)32
から制御信号出力端子24を通して出力される。
FIG. 4 shows a block diagram of a conventional serial data transfer device according to the transfer timing shown in FIG. In the figure, 31 is a parallel / serial conversion circuit (P / S) for converting parallel data P into serial data S, and 32 is a clock pulse CLK with B as a count initial value.
Is a clock pulse counting circuit (COU) for counting. Both the load signal LD supplied through the load signal input terminal 21 and the clock pulse CLK supplied through the clock pulse input terminal 22 are both a parallel / serial conversion circuit (P / S) 31 and a clock pulse counting circuit (COU) 32. Are applied in common. The serial data S is converted to a parallel / serial conversion circuit (P / S) 31.
Is output through a serial data output terminal 23, and a word signal LR is output from a clock pulse counting circuit (COU) 32.
From the control signal output terminal 24.

【0005】以上の構成を有する図4のシリアルデータ
転送装置の動作を、図5に示すタイミング図に基づいて
説明する。図5は、転送すべきシリアルデータSの1ワ
ード当りのビット数すなわちワード長が8ビットのとき
の動作の具体例を説明したものである。
The operation of the serial data transfer device of FIG. 4 having the above configuration will be described with reference to a timing chart shown in FIG. FIG. 5 illustrates a specific example of the operation when the number of bits per word of the serial data S to be transferred, that is, the word length is 8 bits.

【0006】まず、ロード信号LDが与えられると、パ
ラレルデータPがパラレルシリアル変換回路(P/S)
31にロードされると同時に、クロックパルス計数回路
(COU)32には転送すべきシリアルデータSのワー
ド長のバイナリ表現値“7”が正の計数初期値Bとして
設定される(B=7)。以後、パラレルシリアル変換回
路(P/S)31は、ロードされたパラレルデータPを
クロックパルスCLKに同期して直ちに1ビットずつシ
フトさせ、該ビットシフトの結果をシリアルデータSと
して順次出力する。一方、クロックパルス計数回路(C
OU)32は、クロックパルスCLKをダウンカウント
し、計数値が負になったときにワード信号LRの極性を
反転(立上り)させる。これにより、クロックパルスC
LK、ワード信号LR及びシリアルデータSの間に、図
3に従った転送タイミングが得られる。
First, when a load signal LD is supplied, the parallel data P is converted into a parallel / serial conversion circuit (P / S).
Simultaneously with the loading into 31, the binary representation value "7" of the word length of the serial data S to be transferred is set as a positive count initial value B in the clock pulse counting circuit (COU) 32 (B = 7). . Thereafter, the parallel / serial conversion circuit (P / S) 31 immediately shifts the loaded parallel data P one bit at a time in synchronization with the clock pulse CLK, and sequentially outputs the result of the bit shift as serial data S. On the other hand, a clock pulse counting circuit (C
OU) 32 counts down the clock pulse CLK and inverts (rises) the polarity of the word signal LR when the count value becomes negative. Thereby, the clock pulse C
Transfer timing according to FIG. 3 is obtained between LK, word signal LR, and serial data S.

【0007】[0007]

【発明が解決しようとする課題】上記従来のシリアルデ
ータ転送装置は、クロックパルス計数回路(COU)3
2の計数値に基づいてワード信号LRの極性反転タイミ
ングを決定する構成であったので、該クロックパルス計
数回路(COU)32から出力されるワード信号LRの
極性反転位置が、パラレルデータPをパラレルシリアル
変換回路(P/S)31へロードしかつ計数初期値Bを
クロックパルス計数回路(COU)32に設定するため
のロード信号LDの位置に応じて変化してしまう。例え
ばワード信号LRの立下りエッジに対してロード信号L
Dのタイミングが遅れると、ワード信号LRの立上りが
それだけ遅れるのである。このロード信号LDがプログ
ラム制御を受ける場合には、プログラムに依存してワー
ド信号LRの位相が変化する。また、シリアルデータS
のワード長が変わってもワード信号LRの位相が変化し
てしまう。例えばワード長が長くなると、やはりワード
信号LRの立上りがそれだけ遅れるのである。更に、以
上のようにしてワード信号LRの位相が変化すると、該
ワード信号LRの1周期内に占めるクロックパルスCL
Kのパルス数すなわちクロックパルスCLKとワード信
号LRとの間の周波数比も変化してしまう。
The above conventional serial data transfer device has a clock pulse counting circuit (COU) 3
Since the polarity inversion timing of the word signal LR is determined based on the count value of 2, the polarity inversion position of the word signal LR output from the clock pulse counting circuit (COU) 32 determines the parallel data P in parallel. It changes according to the position of the load signal LD for loading the serial conversion circuit (P / S) 31 and setting the count initial value B in the clock pulse counting circuit (COU) 32. For example, the load signal L is applied to the falling edge of the word signal LR.
If the timing of D is delayed, the rise of the word signal LR is delayed accordingly. When the load signal LD is under program control, the phase of the word signal LR changes depending on the program. The serial data S
, The phase of the word signal LR changes. For example, when the word length becomes long, the rising of the word signal LR is also delayed by that much. Further, when the phase of the word signal LR changes as described above, the clock pulse CL occupying within one cycle of the word signal LR.
The number of K pulses, that is, the frequency ratio between the clock pulse CLK and the word signal LR also changes.

【0008】以上のとおり従来のシリアルデータ転送装
置は、ロード信号LDの位置及びシリアルデータSのワ
ード長に応じてワード信号LRの位相が変化してしま
い、これに伴ってクロックパルスCLKとワード信号L
Rとの間の周波数比が変化するので、数個のICをシリ
アル転送方式により互いに接続する応用面でシステム設
計の柔軟性を大きく損なう問題があった。
As described above, in the conventional serial data transfer device, the phase of the word signal LR changes in accordance with the position of the load signal LD and the word length of the serial data S, so that the clock pulse CLK and the word signal L
Since the frequency ratio between R and R changes, there is a problem that the flexibility of system design is greatly impaired in the application of connecting several ICs to each other by a serial transfer method.

【0009】本発明の目的は、クロックパルスCLKと
ワード信号LRとの間の周波数比と位相関係とを一定に
保ちながら、シリアルデータSの全ビットがワード信号
LRの互いに隣接する2つの有意エッジの間にちょうど
収まるように該シリアルデータSをクロックパルスCL
Kに同期して順次転送することができるシリアルデータ
転送装置を提供することにある。
An object of the present invention is to keep the frequency ratio and the phase relationship between the clock pulse CLK and the word signal LR constant while keeping all bits of the serial data S at two adjacent significant edges of the word signal LR. Between the serial data S and the clock pulse CL
An object of the present invention is to provide a serial data transfer device capable of sequentially transferring data in synchronization with K.

【0010】[0010]

【課題を解決するための手段】上記の目的を達成するた
めに本発明は、従来とは逆に、与えられたワード信号L
RとクロックパルスCLKとに基づいてクロックパルス
計数回路の動作を制御することによってパラレルシリア
ル変換回路のシフトタイミングを決定する構成を採用し
たものである。
SUMMARY OF THE INVENTION In order to achieve the above object, according to the present invention, a conventional word signal L is applied.
In this configuration, the shift timing of the parallel-serial conversion circuit is determined by controlling the operation of the clock pulse counting circuit based on R and the clock pulse CLK.

【0011】具体的に説明すると、請求項1の発明は、
ワード信号LRが第1の論理値(例えば“0”)をとっ
ている期間のクロックパルスCLKのパルス数と該ワー
ド信号LRが第2の論理値(例えば“1”)をとってい
る期間のクロックパルスCLKのパルス数とが一致する
場合に関するものであって、図1に示すように次のよう
なエッジ検出回路11と第1のクロックパルス計数回路
(COU1)13と第2のクロックパルス計数回路(C
OU2)14とパラレルシリアル変換回路(P/S)1
2とを備えた構成を採用したものである。すなわち、エ
ッジ検出回路11は、2値論理信号であって立上りエッ
ジと立下りエッジとのうちの少なくとも一方のエッジが
転送すべきシリアルデータSの1ワードの切れ目のタイ
ミングを示す有意エッジであるワード信号LRが与えら
れ、かつ該ワード信号LRの有意エッジが与えられる毎
にエッジ検出信号aを出力するものである。第1のクロ
ックパルス計数回路(COU1)13は、前記エッジ検
出回路11からのエッジ検出信号aが与えられた時点で
は転送すべきシリアルデータSの1ワード当りのビット
数を示す値が計数初期値B1として設定され、かつ次に
該エッジ検出回路11からエッジ検出信号aが与えられ
る時点まではクロックパルスCLKに同期して所定の方
向に計数値を順次変化させるものである。第2のクロッ
クパルス計数回路(COU2)14は、前記エッジ検出
回路11からのエッジ検出信号aが与えられた時点では
該時点での前記第1のクロックパルス計数回路(COU
1)13の初期設定前の計数値が計数初期値B2として
設定され、かつ次に該エッジ検出回路11からエッジ検
出信号aが与えられる時点までは前記クロックパルスC
LKに同期して該第1のクロックパルス計数回路(CO
U1)13とは逆の方向に計数値を順次変化させるもの
である。パラレルシリアル変換回路(P/S)12は、
前記エッジ検出回路11からのエッジ検出信号aが与え
られた時点ではシリアルデータSへ変換すべきパラレル
データPがロードされ、かつ次に該エッジ検出回路11
からエッジ検出信号aが与えられる時点までは、前記第
2のクロックパルス計数回路(COU2)14の計数値
による制御下で該ロードされたパラレルデータPの前記
クロックパルスCLKに同期したビットシフトを開始
し、該ビットシフトの結果をシリアルデータSとして順
次出力するものである。
More specifically, the invention of claim 1 is:
The number of clock pulses CLK during the period when the word signal LR has a first logical value (eg, “0”) and the number of clock pulses CLK during the period when the word signal LR has a second logical value (eg, “1”) This relates to the case where the number of clock pulses CLK coincides with each other. As shown in FIG. 1, the following edge detection circuit 11, first clock pulse counting circuit (COU1) 13, and second clock pulse counting are performed. Circuit (C
OU2) 14 and parallel / serial conversion circuit (P / S) 1
2 is adopted. That is, the edge detection circuit 11 is a binary logic signal, and at least one of the rising edge and the falling edge is a significant edge indicating the timing of a break of one word of the serial data S to be transferred. The edge detection signal a is output each time the signal LR is supplied and a significant edge of the word signal LR is supplied. The first clock pulse counting circuit (COU1) 13 sets a value indicating the number of bits per word of the serial data S to be transferred at the time when the edge detection signal a from the edge detection circuit 11 is supplied to the count initial value. The count value is sequentially changed in a predetermined direction in synchronization with the clock pulse CLK until it is set as B1 and the next time the edge detection signal a is given from the edge detection circuit 11. The second clock pulse counting circuit (COU2) 14 receives the edge detection signal a from the edge detection circuit 11 and supplies the first clock pulse counting circuit (COU2) at that time.
1) The count value before the initial setting of 13 is set as the count initial value B2, and the clock pulse C is used until the edge detection signal a is given from the edge detection circuit 11 next time.
LK, the first clock pulse counting circuit (CO
U1) The count value is sequentially changed in the direction opposite to the direction 13. The parallel / serial conversion circuit (P / S) 12
When the edge detection signal a from the edge detection circuit 11 is given, the parallel data P to be converted into the serial data S is loaded, and then the edge detection circuit 11
Until the edge detection signal a is given, the bit shift of the loaded parallel data P synchronized with the clock pulse CLK is started under the control of the count value of the second clock pulse counting circuit (COU2) 14. Then, the result of the bit shift is sequentially output as serial data S.

【0012】また、請求項2の発明は、ワード信号LR
が第1の論理値をとっている期間のクロックパルスCL
Kのパルス数と該ワード信号LRが第2の論理値をとっ
ている期間のクロックパルスCLKのパルス数とが一致
しない場合に対応可能としたものであって、次のような
エッジ検出回路と第1及び第2のクロックパルス計数回
路とパラレルシリアル変換回路とを備えた構成におい
て、第1のクロックパルス計数回路の計数値をワード信
号LRの論理値に応じて選択的に記憶するための記憶回
路を第1のクロックパルス計数回路と第2のクロックパ
ルス計数回路との間に設けた構成を採用したものであ
る。すなわち、エッジ検出回路は、2値論理信号であっ
て立上りエッジと立下りエッジとの双方が転送すべきシ
リアルデータの1ワードの切れ目のタイミングを示す有
意エッジであるワード信号LRが与えられ、かつ該ワー
ド信号LRの有意エッジが与えられる毎にエッジ検出信
号aを出力するものである。第1のクロックパルス計数
回路は、前記エッジ検出回路11からのエッジ検出信号
aが与えられた時点では転送すべきシリアルデータの1
ワード当りのビット数を示す値が計数初期値B1として
設定され、かつ次に該エッジ検出回路からエッジ検出信
号aが与えられる時点まではクロックパルスCLKに同
期して所定の方向に計数値を順次変化させるものであ
る。記憶回路は、前記エッジ検出回路から前記ワード信
号LRの立上りエッジに対応したエッジ検出信号aが与
えられた時点からは該時点での前記第1のクロックパル
ス計数回路の初期設定前の計数値を第1の記憶値として
保持する一方で、該ワード信号LRの立下りエッジに対
応したエッジ検出信号aが与えられた時点からは該時点
での該第1のクロックパルス計数回路の初期設定前の計
数値を前記第1の記憶値とは別に第2の記憶値として保
持するものである。第2のクロックパルス計数回路は、
前記エッジ検出回路から前記ワード信号LRの立上りエ
ッジに対応したエッジ検出信号aが与えられた時点では
前記記憶回路の第2の記憶値が計数初期値B2として設
定される一方で該ワード信号LRの立下りエッジに対応
したエッジ検出信号aが与えられた時点では該記憶回路
の第2の記憶値に代えて前記記憶回路の第1の記憶値が
計数初期値B2として設定され、かつ次に該エッジ検出
回路からいずれかのエッジ検出信号aが与えられる時点
までは各々の計数初期値B2に基づいて前記クロックパ
ルスCLKに同期して前記第1のクロックパルス計数回
路とは逆の方向に計数値を順次変化させるものである。
パラレルシリアル変換回路は、前記エッジ検出回路から
のエッジ検出信号aが与えられた時点ではシリアルデー
タSへ変換すべきパラレルデータPがロードされ、かつ
次に該エッジ検出回路からエッジ検出信号aが与えられ
る時点までは、前記第2のクロックパルス計数回路の計
数値による制御下で該ロードされたパラレルデータPの
前記クロックパルスCLKに同期したビットシフトを開
始し、該ビットシフトの結果をシリアルデータSとして
順次出力するものである。
[0012] Further, according to the invention of claim 2, the word signal LR
Of the clock pulse CL during the period in which
It is possible to cope with the case where the number of pulses of K does not match the number of clock pulses CLK during a period in which the word signal LR has the second logical value. In the configuration including the first and second clock pulse counting circuits and the parallel-serial conversion circuit, storage for selectively storing the count value of the first clock pulse counting circuit according to the logical value of the word signal LR. In this configuration, a circuit is provided between a first clock pulse counting circuit and a second clock pulse counting circuit. In other words, the edge detection circuit is provided with a word signal LR which is a binary logic signal, in which both the rising edge and the falling edge are significant edges indicating a break of one word of serial data to be transferred, and The edge detection signal a is output every time a significant edge of the word signal LR is given. When the edge detection signal a from the edge detection circuit 11 is supplied, the first clock pulse counting circuit outputs one of the serial data to be transferred.
A value indicating the number of bits per word is set as a count initial value B1, and the count value is sequentially incremented in a predetermined direction in synchronization with the clock pulse CLK until the edge detection signal a is supplied from the edge detection circuit. To change it. The storage circuit stores the count value before the initial setting of the first clock pulse counting circuit at the time from when the edge detection signal a corresponding to the rising edge of the word signal LR is given from the edge detection circuit. While the first clock value is held as the first stored value, the time from when the edge detection signal a corresponding to the falling edge of the word signal LR is given to the time before the initial setting of the first clock pulse counting circuit at that time. The counted value is held as a second stored value separately from the first stored value. The second clock pulse counting circuit includes:
When an edge detection signal a corresponding to a rising edge of the word signal LR is supplied from the edge detection circuit, a second storage value of the storage circuit is set as a count initial value B2 while the word signal LR When the edge detection signal a corresponding to the falling edge is given, the first storage value of the storage circuit is set as the count initial value B2 instead of the second storage value of the storage circuit, and Until the time when any one of the edge detection signals a is supplied from the edge detection circuit, the count value in the direction opposite to that of the first clock pulse count circuit is synchronized with the clock pulse CLK based on each count initial value B2. Are sequentially changed.
The parallel-serial conversion circuit is loaded with the parallel data P to be converted to serial data S at the time when the edge detection signal a from the edge detection circuit is supplied, and then supplies the edge detection signal a from the edge detection circuit. Until this time, the bit shift of the loaded parallel data P in synchronization with the clock pulse CLK is started under the control of the count value of the second clock pulse counting circuit, and the result of the bit shift is transmitted to the serial data S. Are sequentially output.

【0013】また、請求項3の発明は、上記請求項1又
は2の発明において、前記第1のクロックパルス計数回
路(COU1)13は転送すべきシリアルデータSの1
ワード当りのビット数のバイナリ表現値を2の補数表現
した負の値が計数初期値B1として設定された後に前記
クロックパルスCLKに同期して計数値を順次増加させ
る機能を、前記第2のクロックパルス計数回路(COU
2)14は前記クロックパルスCLKに同期して計数値
を順次減少させる機能を、前記パラレルシリアル変換回
路(P/S)12は前記第2のクロックパルス計数回路
(COU2)14の計数値が負になるのを待って前記パ
ラレルデータPのビットシフトを開始する機能を各々有
する構成を採用したものである。
According to a third aspect of the present invention, in the first or second aspect of the present invention, the first clock pulse counting circuit (COU1) 13 outputs one of the serial data S to be transferred.
The second clock has a function of sequentially increasing the count value in synchronization with the clock pulse CLK after a negative value obtained by expressing the binary representation value of the number of bits per word in two's complement is set as the count initial value B1. Pulse counting circuit (COU
2) 14 has a function of sequentially decreasing the count value in synchronization with the clock pulse CLK, and the parallel / serial conversion circuit (P / S) 12 has a negative count value of the second clock pulse count circuit (COU2) 14. , Each of which has a function of starting the bit shift of the parallel data P.

【0014】また、請求項4の発明は、上記請求項1又
は2の発明において、前記第1のクロックパルス計数回
路(COU1)13は転送すべきシリアルデータSの1
ワード当りのビット数のバイナリ表現値が正の計数初期
値B1として設定された後に前記クロックパルスCLK
に同期して計数値を順次減少させる機能を、前記第2の
クロックパルス計数回路(COU2)14は前記クロッ
クパルスCLKに同期して計数値を順次増加させる機能
を、前記パラレルシリアル変換回路(P/S)12は前
記第2のクロックパルス計数回路(COU2)14の計
数値が正になるのを待って前記パラレルデータPのビッ
トシフトを開始する機能を各々有する構成を採用したも
のである。
According to a fourth aspect of the present invention, in the first or second aspect of the present invention, the first clock pulse counting circuit (COU1) 13 outputs one of the serial data S to be transferred.
The clock pulse CLK after the binary representation of the number of bits per word has been set as the positive count initial value B1.
The second clock pulse counting circuit (COU2) 14 has a function of sequentially increasing the count value in synchronization with the clock pulse CLK, and a function of sequentially decreasing the count value in synchronization with the parallel-serial conversion circuit (P / S) 12 employs a configuration having a function of starting the bit shift of the parallel data P after the count value of the second clock pulse counting circuit (COU2) 14 becomes positive.

【0015】[0015]

【作用】請求項1の発明によれば、図1中のパラレルシ
リアル変換回路(P/S)12、第1のクロックパルス
計数回路(COU1)13及び第2のクロックパルス計
数回路(COU2)14に共通に与えられるクロックパ
ルスCLKと、エッジ検出回路11に与えられるワード
信号LRとの間の周波数比と位相関係とは予め決定され
ており、シリアルデータSの1ワードの切れ目のタイミ
ングを示すワード信号LRの有意エッジの位置によって
パラレルシリアル変換回路(P/S)12のシフト動作
と第1及び第2のクロックパルス計数回路(COU1,
2)13,14の計数動作とが制御される。
According to the first aspect of the present invention, the parallel-serial conversion circuit (P / S) 12, the first clock pulse counting circuit (COU1) 13, and the second clock pulse counting circuit (COU2) 14 in FIG. The frequency ratio and the phase relationship between the clock pulse CLK commonly applied to the clock signal and the word signal LR applied to the edge detection circuit 11 are determined in advance, and indicate a word indicating the timing of a break of one word of the serial data S. The shift operation of the parallel / serial conversion circuit (P / S) 12 and the first and second clock pulse counting circuits (COU1, COU1) are performed according to the position of the significant edge of the signal LR.
2) The counting operations of 13 and 14 are controlled.

【0016】すなわち、まずエッジ検出回路11は、ワ
ード信号LRの有意エッジが与えられる毎にエッジ検出
信号aを出力する。パラレルシリアル変換回路(P/
S)12は、エッジ検出回路11からのエッジ検出信号
aが与えられた時点でパラレルデータPがロードされる
が、該ロードされたパラレルデータPのビットシフトを
直ちには開始しない。該ビットシフトは、第2のクロッ
クパルス計数回路(COU2)14の計数値が所定の条
件を満たしたときに初めて開始するのである。
That is, first, the edge detection circuit 11 outputs an edge detection signal a every time a significant edge of the word signal LR is given. Parallel-serial conversion circuit (P /
In step S) 12, the parallel data P is loaded when the edge detection signal a from the edge detection circuit 11 is supplied, but the bit shift of the loaded parallel data P is not immediately started. The bit shift starts only when the count value of the second clock pulse counting circuit (COU2) 14 satisfies a predetermined condition.

【0017】一方、エッジ検出信号aが与えられた際に
第1のクロックパルス計数回路(COU1)13に設定
される計数初期値B1は転送すべきシリアルデータSの
1ワード当りのビット数すなわちワード長を示す値であ
り、同エッジ検出信号aが与えられた際に第2のクロッ
クパルス計数回路(COU2)14に設定される計数初
期値B2は該エッジ検出信号aが与えられた時点の第1
のクロックパルス計数回路(COU1)13の初期設定
前の計数値である。しかも、第1のクロックパルス計数
回路(COU1)13と第2のクロックパルス計数回路
(COU2)14とは、いずれもクロックパルスCLK
に同期して計数値を順次変化させるものであるが、その
変化方向は逆である。一方が計数値を増加させる場合に
は、他方は計数値を減少させるのである。したがって、
ワード信号LRがある論理値をとっている期間のクロッ
クパルスCLKのパルス数とシリアルデータSのワード
長との差が第2のクロックパルス計数回路(COU2)
14の計数値となって現われ、この結果シリアルデータ
Sの全ビットがワード信号LRの互いに隣接する2つの
有意エッジの間にちょうど収まるようにパラレルシリア
ル変換回路(P/S)12のシフト動作が開始させられ
る。つまり、ワード信号LRが第1の論理値をとってい
る期間のクロックパルスCLKのパルス数を利用してこ
れに続いてワード信号LRが第2の論理値をとる期間の
シリアルデータSの転送タイミングが制御され、逆にワ
ード信号LRが第2の論理値をとっている期間のクロッ
クパルスCLKのパルス数を利用してこれに続いてワー
ド信号LRが第1の論理値をとる期間のシリアルデータ
Sの転送タイミングが制御されるのである。
On the other hand, when the edge detection signal a is given, the count initial value B1 set in the first clock pulse counting circuit (COU1) 13 is the number of bits per word of the serial data S to be transferred, that is, the word. The count initial value B2 set in the second clock pulse counting circuit (COU2) 14 when the edge detection signal a is applied is the value indicating the length. 1
Of the clock pulse counting circuit (COU1) 13 before the initialization. In addition, the first clock pulse counting circuit (COU1) 13 and the second clock pulse counting circuit (COU2) 14 both use the clock pulse CLK.
, The count value is sequentially changed, but in the opposite direction. If one increases the count, the other decreases the count. Therefore,
The difference between the pulse number of the clock pulse CLK and the word length of the serial data S during the period when the word signal LR has a certain logical value is a second clock pulse counting circuit (COU2).
As a result, the shift operation of the parallel / serial conversion circuit (P / S) 12 is performed so that all the bits of the serial data S fall exactly between two adjacent significant edges of the word signal LR. Be started. That is, the transfer timing of the serial data S during the period in which the word signal LR takes the second logical value using the number of clock pulses CLK during the period in which the word signal LR takes the first logical value. Is controlled, and conversely, the serial data in the period in which the word signal LR takes the first logical value is utilized using the number of clock pulses CLK in the period in which the word signal LR takes the second logical value. The transfer timing of S is controlled.

【0018】しかも、上記請求項1の発明によれば、パ
ラレルシリアル変換回路(P/S)12にパラレルデー
タPをロードさせるための信号(エッジ検出信号a)
を、与えられたワード信号LRに基づいてエッジ検出回
路11で生成しているので、従来とは違ってロード信号
LDの位置に応じてワード信号LRの位相が変化するこ
とはない。また、与えられたワード信号LRの互いに隣
接する2つの有意エッジの間にちょうど収まるようにシ
リアルデータSの全ビットを配分することができるの
で、シリアルデータSのワード長に応じてワード信号L
Rの位相が変化することもない。クロックパルスCLK
とワード信号LRとの間の周波数比と位相関係とは予め
決定されており、該周波数比と位相関係とがシリアルデ
ータSのワード長等に応じて変化することもない。
Further, according to the first aspect of the present invention, a signal (edge detection signal a) for loading the parallel data P into the parallel / serial conversion circuit (P / S) 12.
Is generated by the edge detection circuit 11 based on the given word signal LR, so that the phase of the word signal LR does not change according to the position of the load signal LD unlike the related art. In addition, since all bits of the serial data S can be distributed so as to be exactly between two adjacent significant edges of the given word signal LR, the word signal L is determined according to the word length of the serial data S.
The phase of R does not change. Clock pulse CLK
The frequency ratio and the phase relationship between the word signal LR and the word signal LR are determined in advance, and the frequency ratio and the phase relationship do not change according to the word length of the serial data S or the like.

【0019】また、請求項2の発明によれば、請求項1
の発明の場合と同様にパラレルシリアル変換回路のシフ
ト動作の開始が待たされる。しかも、第1のクロックパ
ルス計数回路の計数値をワード信号LRの論理値に応じ
て選択的に記憶するための記憶回路を第1のクロックパ
ルス計数回路と第2のクロックパルス計数回路との間に
設け、第2のクロックパルス計数回路の計数初期値B1
をワード信号LRの論理値に応じて選択しているので、
ワード信号LRが第1の論理値をとっている期間のクロ
ックパルスCLKのパルス数を利用して次にワード信号
LRが第1の論理値をとる期間のシリアルデータSの転
送タイミングが制御され、ワード信号LRが第2の論理
値をとっている期間のクロックパルスCLKのパルス数
を利用して次にワード信号LRが第2の論理値をとる期
間のシリアルデータSの転送タイミングが制御される。
この結果、ワード信号LRが第1の論理値をとっている
期間のクロックパルスCLKのパルス数と該ワード信号
LRが第2の論理値をとっている期間のクロックパルス
CLKのパルス数とが一致しない場合でも、シリアルデ
ータSの転送タイミングを正確に制御することができ
る。
According to the invention of claim 2, according to claim 1,
As in the case of the invention, the start of the shift operation of the parallel-serial conversion circuit is waited. In addition, a storage circuit for selectively storing the count value of the first clock pulse counting circuit in accordance with the logical value of the word signal LR is provided between the first clock pulse counting circuit and the second clock pulse counting circuit. And the count initial value B1 of the second clock pulse counting circuit.
Is selected according to the logical value of the word signal LR,
The transfer timing of the serial data S during the next period when the word signal LR takes the first logical value is controlled using the number of clock pulses CLK during the period when the word signal LR takes the first logical value, The transfer timing of the serial data S during the next period when the word signal LR has the second logical value is controlled by using the number of clock pulses CLK during the period when the word signal LR has the second logical value. .
As a result, the number of clock pulses CLK during the period when the word signal LR has the first logical value matches the number of clock pulses CLK during the period when the word signal LR has the second logical value. Even when not performed, the transfer timing of the serial data S can be accurately controlled.

【0020】また、請求項3の発明によれば、図2に示
すように、第1のクロックパルス計数回路(COU1)
13は、転送すべきシリアルデータSの1ワード当りの
ビット数(例えば4ビット)のバイナリ表現値を2の補
数表現した負の値(例えば“−4”)が計数初期値B1
として設定された後に、クロックパルスCLKに同期し
て計数値を順次増加させる。一方、第2のクロックパル
ス計数回路(COU2)14は、エッジ検出信号aが与
えられた時点の第1のクロックパルス計数回路(COU
1)13の初期設定前の計数値(例えば“3”)が計数
初期値B2として設定された後に、クロックパルスCL
Kに同期して該第1のクロックパルス計数回路(COU
1)13とは逆に計数値を順次減少させる。これら第1
及び第2のクロックパルス計数回路(COU1,2)1
3,14の計数動作に対応して、パラレルシリアル変換
回路(P/S)12は、第2のクロックパルス計数回路
(COU2)14の計数値が負になるのを待って、パラ
レルデータPのビットシフトを開始する。つまり、転送
すべきシリアルデータSがワード信号LRの互いに隣接
する2つの有意エッジの間にちょうど収まるようにパラ
レルシリアル変換回路(P/S)12のシフト動作が開
始させられるのである。
According to the third aspect of the present invention, as shown in FIG. 2, the first clock pulse counting circuit (COU1)
Reference numeral 13 denotes a negative initial value (for example, "-4") obtained by expressing a binary representation value of the number of bits (for example, 4 bits) per word of the serial data S to be transferred in two's complement, as the initial count value B1.
After that, the count value is sequentially increased in synchronization with the clock pulse CLK. On the other hand, the second clock pulse counting circuit (COU2) 14 outputs the first clock pulse counting circuit (COU2) at the time when the edge detection signal a is given.
1) After the count value (for example, “3”) of 13 before the initial setting is set as the count initial value B2, the clock pulse CL
K, the first clock pulse counting circuit (COU
1) Contrary to 13, the count value is sequentially reduced. These first
And second clock pulse counting circuit (COU1, 2) 1
In response to the counting operations of 3 and 14, the parallel / serial conversion circuit (P / S) 12 waits for the count value of the second clock pulse counting circuit (COU2) 14 to become negative, Start bit shift. In other words, the shift operation of the parallel / serial conversion circuit (P / S) 12 is started so that the serial data S to be transferred falls exactly between two adjacent significant edges of the word signal LR.

【0021】また、請求項4の発明によれば、第1のク
ロックパルス計数回路(COU1)13は、転送すべき
シリアルデータSの1ワード当りのビット数(例えば4
ビット)のバイナリ表現値(例えば“4”)が正の計数
初期値B1として設定された後に、クロックパルスCL
Kに同期して計数値を順次減少させる。一方、第2のク
ロックパルス計数回路(COU2)14は、エッジ検出
信号aが与えられた時点の第1のクロックパルス計数回
路(COU1)13の初期設定前の計数値(例えば“−
3”)が計数初期値B2として設定された後に、クロッ
クパルスCLKに同期して該第1のクロックパルス計数
回路(COU1)13とは逆に計数値を順次増加させ
る。これら第1及び第2のクロックパルス計数回路(C
OU1,2)13,14の計数動作に対応して、パラレ
ルシリアル変換回路(P/S)12は、第2のクロック
パルス計数回路(COU2)14の計数値が正になるの
を待って、パラレルデータPのビットシフトを開始す
る。つまり、請求項3の発明の場合と同様に、転送すべ
きシリアルデータSがワード信号LRの互いに隣接する
2つの有意エッジの間にちょうど収まるようにパラレル
シリアル変換回路(P/S)12のシフト動作が開始さ
せられるのである。
According to the fourth aspect of the present invention, the first clock pulse counting circuit (COU1) 13 controls the number of bits per word of the serial data S to be transferred (for example, 4 bits).
After the binary representation value (for example, “4”) of the bit pulse) is set as the positive count initial value B1, the clock pulse CL
The count value is sequentially reduced in synchronization with K. On the other hand, the second clock pulse counting circuit (COU2) 14 counts the count value (for example, “−”) of the first clock pulse counting circuit (COU1) 13 before the initial setting at the time when the edge detection signal a is given.
After 3 ″) is set as the count initial value B2, the count value is sequentially increased in synchronization with the clock pulse CLK, contrary to the first clock pulse counting circuit (COU1) 13. These first and second values are set. Clock pulse counting circuit (C
In response to the counting operations of OU1, 2) 13 and 14, the parallel / serial conversion circuit (P / S) 12 waits until the count value of the second clock pulse counting circuit (COU2) 14 becomes positive, The bit shift of the parallel data P is started. In other words, as in the case of the third aspect of the present invention, the shift of the parallel / serial conversion circuit (P / S) 12 is performed so that the serial data S to be transferred falls exactly between two adjacent significant edges of the word signal LR. The operation is started.

【0022】[0022]

【実施例】以下、本発明の実施例について図面を参照し
ながら説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0023】図1は、本発明のシリアルデータ転送装置
の実施例を示すブロック図である。同図において、11
は制御信号入力端子1を通して与えられるワード信号L
Rの立上りエッジと立下りエッジとの双方を検出して各
々パルス状のエッジ検出信号aを出力するためのエッジ
検出回路、12はパラレルデータPをシリアルデータS
に変換するためのパラレルシリアル変換回路(P/
S)、13はB1を計数初期値としてクロックパルスC
LKをアップカウントするための第1のクロックパルス
計数回路(COU1)、14は該第1のクロックパルス
計数回路(COU1)13の計数値を計数初期値B2と
してクロックパルスCLKをダウンカウントするための
第2のクロックパルス計数回路(COU2)である。エ
ッジ検出回路11から出力されるエッジ検出信号aは、
パラレルシリアル変換回路(P/S)12並びに第1及
び第2のクロックパルス計数回路(COU1,COU
2)13,14の三者に共通に印加される。クロックパ
ルス入力端子2を通して与えられるクロックパルスCL
Kもまた、これら三者のブロック12〜14に共通に印
加される。シフト許可信号bは、第2のクロックパルス
計数回路(COU2)14から出力されてパラレルシリ
アル変換回路(P/S)12に与えられるものである。
このパラレルシリアル変換回路(P/S)12によりパ
ラレルデータPをビットシフトさせて生成されるシリア
ルデータSは、シリアルデータ出力端子3を通して出力
される。
FIG. 1 is a block diagram showing an embodiment of the serial data transfer device of the present invention. In FIG.
Is a word signal L supplied through the control signal input terminal 1.
An edge detection circuit for detecting both a rising edge and a falling edge of R and outputting a pulse-like edge detection signal a.
Parallel-serial conversion circuit (P /
S) and 13 are clock pulses C using B1 as the initial count value.
A first clock pulse counting circuit (COU1) for up-counting LK is used to count down the clock pulse CLK using the count value of the first clock pulse counting circuit (COU1) 13 as a count initial value B2. A second clock pulse counting circuit (COU2). The edge detection signal a output from the edge detection circuit 11 is
A parallel / serial conversion circuit (P / S) 12 and first and second clock pulse counting circuits (COU1, COU)
2) Applied commonly to the three components 13 and 14. Clock pulse CL applied through clock pulse input terminal 2
K is also commonly applied to these three blocks 12-14. The shift permission signal b is output from the second clock pulse counting circuit (COU2) 14 and supplied to the parallel / serial conversion circuit (P / S) 12.
The serial data S generated by bit-shifting the parallel data P by the parallel / serial conversion circuit (P / S) 12 is output through the serial data output terminal 3.

【0024】以上の構成を有する本実施例のシリアルデ
ータ転送装置の動作を、図2に示すタイミング図に基づ
いて説明する。図2は、転送すべきシリアルデータSの
1ワード当りのビット数すなわちワード長を4ビットと
し、ワード信号LRの1周期内のクロックパルスCLK
のパルス数を16とした場合の動作の具体例を説明した
ものである。ただし、ワード信号LRが第1の論理値
“0”をとっている期間のクロックパルスCLKのパル
ス数と、該ワード信号LRが第2の論理値“1”をとっ
ている期間のクロックパルスCLKのパルス数とはいず
れも8である。
The operation of the serial data transfer apparatus according to the present embodiment having the above configuration will be described with reference to the timing chart shown in FIG. FIG. 2 shows a case where the number of bits per word of the serial data S to be transferred, that is, the word length is 4 bits, and the clock pulse CLK within one cycle of the word signal LR.
This is a description of a specific example of the operation when the number of pulses is 16. However, the number of clock pulses CLK during the period when the word signal LR has the first logical value “0” and the number of clock pulses CLK during the period when the word signal LR has the second logical value “1” Is 8 in all cases.

【0025】まず、説明の都合上ワード信号LRの論理
値が“0”である期間について、第1のクロックパルス
計数回路(COU1)13の動作を中心に説明する。ワ
ード信号LRの立下りエッジがエッジ検出回路11に到
来して該エッジ検出回路11からエッジ検出信号aが出
力されると、第1のクロックパルス計数回路(COU
1)13には転送すべきシリアルデータSの1ワード当
りのビット数のバイナリ表現値を2の補数表現した負の
値“−4”が計数初期値B1として設定される(B1=
−4)。以後、第1のクロックパルス計数回路(COU
1)13は、クロックパルスCLKをアップカウントす
る。そして、ワード信号LRの立上りエッジがエッジ検
出回路11に到来して該エッジ検出回路11から次のエ
ッジ検出信号aが出力される時点では、該第1のクロッ
クパルス計数回路(COU1)13の計数値が“3”に
なっている。
First, the operation of the first clock pulse counting circuit (COU1) 13 during the period in which the logical value of the word signal LR is "0" will be described for convenience of explanation. When the falling edge of the word signal LR arrives at the edge detection circuit 11 and the edge detection signal a is output from the edge detection circuit 11, the first clock pulse counting circuit (COU)
1) In 13, a negative value “−4”, which is a binary representation of the number of bits per word of the serial data S to be transferred and is represented by a two's complement, is set as a count initial value B1 (B1 =
-4). Thereafter, the first clock pulse counting circuit (COU
1) 13 counts up the clock pulse CLK. When the rising edge of the word signal LR arrives at the edge detection circuit 11 and the next edge detection signal a is output from the edge detection circuit 11, the count of the first clock pulse counting circuit (COU1) 13 is counted. The numerical value is “3”.

【0026】このようにしてエッジ検出回路11からワ
ード信号LRの立上りエッジに対応したエッジ検出信号
aが出力されると、第1のクロックパルス計数回路(C
OU1)13には再び“−4”が計数初期値B1として
設定される。これと同時に第2のクロックパルス計数回
路(COU2)14には、該時点での第1のクロックパ
ルス計数回路(COU1)13の初期設定前の計数値
“3”が計数初期値B2として設定される。更にパラレ
ルシリアル変換回路(P/S)12にはパラレルデータ
Pがロードされ、シリアルデータSの第1番目のビット
としてBIT3が出力される。
When the edge detection signal a corresponding to the rising edge of the word signal LR is output from the edge detection circuit 11 in this manner, the first clock pulse counting circuit (C
“OU1” 13 is set again with “−4” as the count initial value B1. At the same time, the count value “3” before the initial setting of the first clock pulse counting circuit (COU1) 13 at that time is set in the second clock pulse counting circuit (COU2) 14 as the count initial value B2. You. Further, parallel data P is loaded into the parallel / serial conversion circuit (P / S) 12, and BIT3 is output as the first bit of the serial data S.

【0027】以後、第1のクロックパルス計数回路(C
OU1)13はクロックパルスCLKを同様にアップカ
ウントするのに対して、第2のクロックパルス計数回路
(COU2)14は該クロックパルスCLKをダウンカ
ウントする。この間、第2のクロックパルス計数回路
(COU2)14の計数値が正又は0である間はシフト
許可信号bが“0”(シフト禁止)であり、該第2のク
ロックパルス計数回路(COU2)14の計数値が負に
なるとシフト許可信号bが“1”(シフト許可)とな
る。パラレルシリアル変換回路(P/S)12は、シフ
ト許可信号bが“0”である間はロードされたパラレル
データPのビットシフトを開始しないので、該パラレル
シリアル変換回路(P/S)12から出力されるシリア
ルデータSはBIT3を保持する。そして、シフト許可
信号bが“1”になると、パラレルシリアル変換回路
(P/S)12は、パラレルデータPをクロックパルス
CLKに同期して1ビットずつシフトさせる動作を開始
し、該ビットシフトの結果をシリアルデータSとして順
次出力する。この結果、BIT3〜BIT0の4ビット
がシリアルデータSとして、ワード信号LRの立上りエ
ッジと立下りエッジとの間にちょうど収まるように転送
される。
Thereafter, the first clock pulse counting circuit (C
The OU1) 13 similarly counts up the clock pulse CLK, while the second clock pulse counting circuit (COU2) 14 counts down the clock pulse CLK. During this time, while the count value of the second clock pulse counting circuit (COU2) 14 is positive or 0, the shift permission signal b is "0" (shift is prohibited), and the second clock pulse counting circuit (COU2) When the count value of 14 becomes negative, the shift permission signal b becomes "1" (shift permission). The parallel / serial conversion circuit (P / S) 12 does not start bit shifting the loaded parallel data P while the shift permission signal b is “0”. The output serial data S holds BIT3. When the shift permission signal b becomes "1", the parallel / serial conversion circuit (P / S) 12 starts an operation of shifting the parallel data P one bit at a time in synchronization with the clock pulse CLK. The results are sequentially output as serial data S. As a result, the four bits of BIT3 to BIT0 are transferred as serial data S so as to fit exactly between the rising edge and the falling edge of the word signal LR.

【0028】以上のとおり、ワード信号LRが第1の論
理値“0”をとっている期間のクロックパルスCLKの
パルス数を利用して、これに続いてワード信号LRが第
2の論理値“1”をとる期間のシリアルデータSの転送
タイミングが制御されるのである。また逆に、ワード信
号LRが第2の論理値“1”をとっている期間のクロッ
クパルスCLKのパルス数を利用してこれに続いてワー
ド信号LRが第1の論理値“0”をとる期間のシリアル
データSの転送タイミングが制御される。
As described above, using the number of clock pulses CLK during the period when the word signal LR takes the first logical value "0", the word signal LR is subsequently changed to the second logical value "0". The transfer timing of the serial data S during the period of “1” is controlled. Conversely, the word signal LR takes the first logical value "0" using the number of clock pulses CLK during the period in which the word signal LR takes the second logical value "1". The transfer timing of the serial data S during the period is controlled.

【0029】なお、エッジ検出回路11がワード信号L
Rの立上りエッジのみを転送すべきシリアルデータSの
1ワードの切れ目のタイミングを示す有意エッジとして
検出し、或いは、該ワード信号LRの立下りエッジのみ
を有意エッジとして検出する構成を採用する場合にも、
上記と同様にクロックパルスCLKとワード信号LRと
の間の周波数比と位相関係とを一定に保ちながら、シリ
アルデータSの全ビットがワード信号LRの互いに隣接
する2つの有意エッジの間にちょうど収まるように該シ
リアルデータSをクロックパルスCLKに同期して順次
転送することができる。
The edge detection circuit 11 outputs the word signal L
When adopting a configuration in which only the rising edge of R is detected as a significant edge indicating the timing of a break of one word of the serial data S to be transferred, or only the falling edge of the word signal LR is detected as a significant edge Also,
As described above, while keeping the frequency ratio and the phase relationship between the clock pulse CLK and the word signal LR constant, all bits of the serial data S just fall between two adjacent significant edges of the word signal LR. Thus, the serial data S can be sequentially transferred in synchronization with the clock pulse CLK.

【0030】また、第1のクロックパルス計数回路(C
OU1)13には転送すべきシリアルデータSの1ワー
ド当りのビット数のバイナリ表現値(上記具体例では4
ビットに対して“4”)を正の計数初期値B1として設
定してもよい。ただし、この場合には第1のクロックパ
ルス計数回路(COU1)13をダウンカウンタとし、
第2のクロックパルス計数回路(COU2)14をアッ
プカウンタとする。また、パラレルシリアル変換回路
(P/S)12は第2のクロックパルス計数回路(CO
U2)14の計数値が正になるのを待ってパラレルデー
タPのビットシフトを開始する機能を有するものとす
る。
The first clock pulse counting circuit (C
OU1) 13 has a binary expression value of the number of bits per word of serial data S to be transferred (4 in the above specific example).
"4" for the bit may be set as the positive count initial value B1. However, in this case, the first clock pulse counting circuit (COU1) 13 is a down counter,
The second clock pulse counting circuit (COU2) 14 is an up counter. The parallel-serial conversion circuit (P / S) 12 is provided with a second clock pulse counting circuit (CO
U2) It is assumed that it has a function of starting the bit shift of the parallel data P after the count value of 14 becomes positive.

【0031】また、ワード信号LRが第1の論理値
“0”をとっている期間のクロックパルスCLKのパル
ス数と該ワード信号LRが第2の論理値“1”をとって
いる期間のクロックパルスCLKのパルス数とが一致し
ない場合に対応可能とするためには、第1のクロックパ
ルス計数回路(COU1)13の計数値をワード信号L
Rの論理値に応じて選択的に記憶するための記憶回路を
第1のクロックパルス計数回路(COU1)13と第2
のクロックパルス計数回路(COU2)14との間に設
け、第2のクロックパルス計数回路(COU2)14の
計数初期値B1をワード信号LRの論理値に応じて該記
憶回路から選択する。このとき、ワード信号LRが第1
の論理値“0”をとっている期間のクロックパルスCL
Kのパルス数を利用して次にワード信号LRが第1の論
理値“0”をとる期間のシリアルデータSの転送タイミ
ングが制御され、ワード信号LRが第2の論理値“1”
をとっている期間のクロックパルスCLKのパルス数を
利用して次にワード信号LRが第2の論理値“1”をと
る期間のシリアルデータSの転送タイミングが制御され
る結果、シリアルデータSの転送タイミングが正確に制
御される。
Further, the number of clock pulses CLK during the period when the word signal LR has the first logical value "0" and the number of clock pulses during the period when the word signal LR has the second logical value "1" In order to cope with the case where the number of pulses of the pulse CLK does not match, the count value of the first clock pulse counting circuit (COU1) 13 is set to the word signal L.
The first clock pulse counting circuit (COU1) 13 and the second clock pulse counting circuit (COU1)
, And an initial count value B1 of the second clock pulse counting circuit (COU2) 14 is selected from the storage circuit according to the logical value of the word signal LR. At this time, the word signal LR becomes the first
Of the clock pulse CL during the period in which the logical value “0” is taken
Using the number of pulses of K, the transfer timing of the serial data S during the period when the word signal LR takes the first logical value “0” next is controlled, and the word signal LR becomes the second logical value “1”.
Is used to control the transfer timing of the serial data S during the period when the word signal LR takes the second logical value “1” using the pulse number of the clock pulse CLK during the period during which the serial data S The transfer timing is accurately controlled.

【0032】[0032]

【発明の効果】以上説明してきたように請求項1の発明
によれば、与えられたワード信号LRとクロックパルス
CLKとに基づいて2段のクロックパルス計数回路(C
OU1,COU2)13,14の動作を制御することに
よってパラレルシリアル変換回路(P/S)12のシフ
トタイミングを決定する構成を採用したので、クロック
パルスCLKとワード信号LRとの間の周波数比と位相
関係とを一定に保ちながら、シリアルデータSの全ビッ
トがワード信号LRの互いに隣接する2つの有意エッジ
の間にちょうど収まるように該シリアルデータSをクロ
ックパルスCLKに同期して順次転送するシリアルデー
タ転送装置を実現することができ、柔軟なシリアルデ−
タ転送システムの構築が可能になる。
As described above, according to the first aspect of the present invention, a two-stage clock pulse counting circuit (C) is provided based on a given word signal LR and clock pulse CLK.
OU1, COU2) 13 and 14 are controlled to determine the shift timing of the parallel / serial conversion circuit (P / S) 12, so that the frequency ratio between the clock pulse CLK and the word signal LR is reduced. While serially maintaining the phase relationship constant, the serial data S is sequentially transferred in synchronization with the clock pulse CLK so that all bits of the serial data S fall exactly between two adjacent significant edges of the word signal LR. A data transfer device can be realized and flexible serial data
A data transfer system can be constructed.

【0033】また、請求項2の発明によれば、第1のク
ロックパルス計数回路の計数値をワード信号LRの論理
値に応じて選択的に記憶するための記憶回路を第1のク
ロックパルス計数回路と第2のクロックパルス計数回路
との間に設け、第2のクロックパルス計数回路の計数初
期値B1をワード信号LRの論理値に応じて選択する構
成を採用したので、ワード信号LRが第1の論理値をと
っている期間のクロックパルスCLKのパルス数と該ワ
ード信号LRが第2の論理値をとっている期間のクロッ
クパルスCLKのパルス数とが一致しない場合でも、シ
リアルデータSの転送タイミングを正確に制御すること
ができる。
According to the second aspect of the present invention, the storage circuit for selectively storing the count value of the first clock pulse counting circuit in accordance with the logical value of the word signal LR is provided. A circuit is provided between the second clock pulse counting circuit and the second clock pulse counting circuit, and the initial count value B1 of the second clock pulse counting circuit is selected according to the logical value of the word signal LR. Even when the number of pulses of the clock pulse CLK during the period in which the logical value is 1 does not match the number of pulses of the clock pulse CLK in the period in which the word signal LR has the second logical value, the serial data S The transfer timing can be accurately controlled.

【0034】また、請求項3の発明によれば、転送すべ
きシリアルデータSの1ワード当りのビット数のバイナ
リ表現値を2の補数表現した負の値を計数初期値B1と
して第1のクロックパルス計数回路(COU1)13に
設定する構成を採用したので、該第1のクロックパルス
計数回路(COU1)13の計数値を計数初期値B2と
する第2のクロックパルス計数回路(COU2)14の
計数値の符号だけでパラレルシリアル変換回路(P/
S)12のシフト動作の開始を制御することができ、回
路構成を簡略化できる効果がある。
Further, according to the third aspect of the present invention, the first clock is defined as a count initial value B1 that is a negative value obtained by expressing a binary representation of the number of bits per word of the serial data S to be transferred in two's complement. Since the configuration in which the pulse count circuit (COU1) 13 is set is adopted, the count value of the first clock pulse count circuit (COU1) 13 is used as the count initial value B2. The parallel-serial conversion circuit (P /
S) The start of the shift operation of 12 can be controlled, and the circuit configuration can be simplified.

【0035】また、請求項4の発明によれば、転送すべ
きシリアルデータSの1ワード当りのビット数のバイナ
リ表現値を正の計数初期値B1として第1のクロックパ
ルス計数回路(COU1)13に設定する構成を採用し
たので、請求項3の発明の場合と同様に、該第1のクロ
ックパルス計数回路(COU1)13の計数値を計数初
期値B2とする第2のクロックパルス計数回路(COU
2)14の計数値の符号だけでパラレルシリアル変換回
路(P/S)12のシフト動作の開始を制御することが
でき、回路構成を簡略化できる効果がある。
According to the fourth aspect of the present invention, the first clock pulse counting circuit (COU1) 13 sets the binary representation value of the number of bits per word of the serial data S to be transferred as the positive count initial value B1. The second clock pulse counting circuit (COU1) 13 uses the count value of the first clock pulse counting circuit (COU1) 13 as the count initial value B2 as in the case of the third aspect of the present invention. COU
2) The start of the shift operation of the parallel / serial conversion circuit (P / S) 12 can be controlled only by the sign of the count value of 14, and the circuit configuration can be simplified.

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

【図1】本発明のシリアルデータ転送装置の実施例を示
すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a serial data transfer device according to the present invention.

【図2】図1のシリアルデータ転送装置の動作説明のた
めのタイミング図である。
FIG. 2 is a timing chart for explaining the operation of the serial data transfer device of FIG. 1;

【図3】シリアルデータ転送装置が満足すべき転送タイ
ミングの例を示すタイミング図である。
FIG. 3 is a timing chart showing an example of transfer timing to be satisfied by a serial data transfer device.

【図4】従来のシリアルデータ転送装置のブロック図で
ある。
FIG. 4 is a block diagram of a conventional serial data transfer device.

【図5】図4のシリアルデータ転送装置の動作説明のた
めのタイミング図である。
FIG. 5 is a timing chart for explaining the operation of the serial data transfer device of FIG. 4;

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

11 エッジ検出回路 12 パラレルシリアル変換回路(P/S) 13 第1のクロックパルス計数回路(COU1) 14 第2のクロックパルス計数回路(COU2) a エッジ検出信号 b シフト許可信号 B1 第1のクロックパルス計数回路の計数初期値 B2 第2のクロックパルス計数回路の計数初期値 CLK クロックパルス LR ワード信号 P パラレルデータ S シリアルデータ Reference Signs List 11 edge detection circuit 12 parallel / serial conversion circuit (P / S) 13 first clock pulse counting circuit (COU1) 14 second clock pulse counting circuit (COU2) a edge detection signal b shift enable signal B1 first clock pulse Counting initial value of counting circuit B2 Counting initial value of second clock pulse counting circuit CLK Clock pulse LR Word signal P Parallel data S Serial data

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 2値論理信号であって立上りエッジと立
下りエッジとのうちの少なくとも一方のエッジが転送す
べきシリアルデータの1ワードの切れ目のタイミングを
示す有意エッジであるワード信号が与えられ、かつ該ワ
ード信号の有意エッジが与えられる毎にエッジ検出信号
を出力するエッジ検出回路と、 前記エッジ検出回路からのエッジ検出信号が与えられた
時点では転送すべきシリアルデータの1ワード当りのビ
ット数を示す値が計数初期値として設定され、かつ次に
該エッジ検出回路からエッジ検出信号が与えられる時点
まではクロックパルスに同期して所定の方向に計数値を
順次変化させる第1のクロックパルス計数回路と、 前記エッジ検出回路からのエッジ検出信号が与えられた
時点では該時点での前記第1のクロックパルス計数回路
の初期設定前の計数値が計数初期値として設定され、か
つ次に該エッジ検出回路からエッジ検出信号が与えられ
る時点までは前記クロックパルスに同期して該第1のク
ロックパルス計数回路とは逆の方向に計数値を順次変化
させる第2のクロックパルス計数回路と、 前記エッジ検出回路からのエッジ検出信号が与えられた
時点ではシリアルデータへ変換すべきパラレルデータが
ロードされ、かつ次に該エッジ検出回路からエッジ検出
信号が与えられる時点までは、前記第2のクロックパル
ス計数回路の計数値による制御下で該ロードされたパラ
レルデータの前記クロックパルスに同期したビットシフ
トを開始し、該ビットシフトの結果をシリアルデータと
して順次出力するパラレルシリアル変換回路とを備えた
ことを特徴とするシリアルデータ転送装置。
1. A word signal which is a binary logic signal and at least one of a rising edge and a falling edge is a significant edge indicating a timing of a break of one word of serial data to be transferred. An edge detection circuit that outputs an edge detection signal each time a significant edge of the word signal is supplied; and a bit per word of serial data to be transferred when the edge detection signal is supplied from the edge detection circuit. A first clock pulse for sequentially changing the count value in a predetermined direction in synchronization with the clock pulse until a value indicating a number is set as a count initial value and the next time an edge detection signal is given from the edge detection circuit A counting circuit, and when the edge detection signal from the edge detection circuit is given, the first clock pulse at that time. The count value before the initial setting of the several circuits is set as a count initial value, and the first clock pulse counting circuit and the first clock pulse counting circuit are synchronized with the clock pulse until the next time when the edge detection signal is supplied from the edge detection circuit. A second clock pulse counting circuit for sequentially changing the count value in the opposite direction, and when the edge detection signal from the edge detection circuit is given, parallel data to be converted into serial data is loaded, and Until the edge detection signal is supplied from the edge detection circuit, a bit shift of the loaded parallel data synchronized with the clock pulse is started under the control of the count value of the second clock pulse counting circuit, A serial-to-serial conversion circuit for sequentially outputting the result of the bit shift as serial data. Rudeta transfer device.
【請求項2】 2値論理信号であって立上りエッジと立
下りエッジとの双方が転送すべきシリアルデータの1ワ
ードの切れ目のタイミングを示す有意エッジであるワー
ド信号が与えられ、かつ該ワード信号の有意エッジが与
えられる毎にエッジ検出信号を出力するエッジ検出回路
と、 前記エッジ検出回路からのエッジ検出信号が与えられた
時点では転送すべきシリアルデータの1ワード当りのビ
ット数を示す値が計数初期値として設定され、かつ次に
該エッジ検出回路からエッジ検出信号が与えられる時点
まではクロックパルスに同期して所定の方向に計数値を
順次変化させる第1のクロックパルス計数回路と、 前記エッジ検出回路から前記ワード信号の立上りエッジ
に対応したエッジ検出信号が与えられた時点からは該時
点での前記第1のクロックパルス計数回路の初期設定前
の計数値を第1の記憶値として保持する一方で、該ワー
ド信号の立下りエッジに対応したエッジ検出信号が与え
られた時点からは該時点での該第1のクロックパルス計
数回路の初期設定前の計数値を前記第1の記憶値とは別
に第2の記憶値として保持する記憶回路と、 前記エッジ検出回路から前記ワード信号の立上りエッジ
に対応したエッジ検出信号が与えられた時点では前記記
憶回路の第2の記憶値が計数初期値として設定される一
方で該ワード信号の立下りエッジに対応したエッジ検出
信号が与えられた時点では該記憶回路の第2の記憶値に
代えて前記記憶回路の第1の記憶値が計数初期値として
設定され、かつ次に該エッジ検出回路からいずれかのエ
ッジ検出信号が与えられる時点までは各々の計数初期値
に基づいて前記クロックパルスに同期して前記第1のク
ロックパルス計数回路とは逆の方向に計数値を順次変化
させる第2のクロックパルス計数回路と、 前記エッジ検出回路からのエッジ検出信号が与えられた
時点ではシリアルデータへ変換すべきパラレルデータが
ロードされ、かつ次に該エッジ検出回路からエッジ検出
信号が与えられる時点までは、前記第2のクロックパル
ス計数回路の計数値による制御下で該ロードされたパラ
レルデータの前記クロックパルスに同期したビットシフ
トを開始し、該ビットシフトの結果をシリアルデータと
して順次出力するパラレルシリアル変換回路とを備えた
ことを特徴とするシリアルデータ転送装置。
2. A word signal, which is a binary logic signal, in which both a rising edge and a falling edge are significant edges indicating a timing of a break of one word of serial data to be transferred, and the word signal is provided. An edge detection circuit that outputs an edge detection signal each time a significant edge is given, and a value indicating the number of bits per word of serial data to be transferred when the edge detection signal is given from the edge detection circuit. A first clock pulse counting circuit that is set as a count initial value, and sequentially changes a count value in a predetermined direction in synchronization with a clock pulse until a time point when an edge detection signal is next supplied from the edge detection circuit; From the time when an edge detection signal corresponding to the rising edge of the word signal is supplied from the edge detection circuit, the first While the count value before the initialization of the lock pulse counting circuit is held as a first storage value, the first detection value at the time from the time when the edge detection signal corresponding to the falling edge of the word signal is given. A storage circuit for holding a count value before initialization of the clock pulse counting circuit as a second storage value separately from the first storage value; and detecting an edge corresponding to a rising edge of the word signal from the edge detection circuit. At the time when the signal is applied, the second storage value of the storage circuit is set as the count initial value, while at the time when the edge detection signal corresponding to the falling edge of the word signal is applied, the second storage value of the storage circuit is set. The first stored value of the storage circuit is set as the initial count value in place of the stored value of 2, and until each time any of the edge detection signals is supplied from the edge detection circuit, each of the total values is counted. A second clock pulse counting circuit for sequentially changing a count value in a direction opposite to the first clock pulse counting circuit in synchronization with the clock pulse based on the initial value; and an edge detection signal from the edge detection circuit. Is supplied, parallel data to be converted to serial data is loaded, and until the next time when the edge detection signal is supplied from the edge detection circuit, control is performed under the control of the count value of the second clock pulse counting circuit. And a parallel-to-serial conversion circuit for starting a bit shift of the loaded parallel data in synchronization with the clock pulse and sequentially outputting a result of the bit shift as serial data.
【請求項3】 請求項1又は2に記載のシリアルデータ
転送装置において、 前記第1のクロックパルス計数回路は、転送すべきシリ
アルデータの1ワード当りのビット数のバイナリ表現値
を2の補数表現した負の値が計数初期値として設定され
た後に前記クロックパルスに同期して計数値を順次増加
させる機能を、 前記第2のクロックパルス計数回路は、前記クロックパ
ルスに同期して計数値を順次減少させる機能を、 前記パラレルシリアル変換回路は、前記第2のクロック
パルス計数回路の計数値が負になるのを待って前記パラ
レルデータのビットシフトを開始する機能を各々有する
ことを特徴とするシリアルデータ転送装置。
3. The serial data transfer device according to claim 1, wherein said first clock pulse counting circuit is a two's complement representation of a binary representation value of the number of bits per word of the serial data to be transmitted. A function of sequentially increasing the count value in synchronization with the clock pulse after the set negative value is set as a count initial value, wherein the second clock pulse counting circuit sequentially counts the count value in synchronization with the clock pulse. The serial-to-serial conversion circuit has a function of starting a bit shift of the parallel data after the count value of the second clock pulse counting circuit becomes negative. Data transfer device.
【請求項4】 請求項1又は2に記載のシリアルデータ
転送装置において、 前記第1のクロックパルス計数回路は、転送すべきシリ
アルデータの1ワード当りのビット数のバイナリ表現値
が正の計数初期値として設定された後に前記クロックパ
ルスに同期して計数値を順次減少させる機能を、 前記第2のクロックパルス計数回路は、前記クロックパ
ルスに同期して計数値を順次増加させる機能を、 前記パラレルシリアル変換回路は、前記第2のクロック
パルス計数回路の計数値が正になるのを待って前記パラ
レルデータのビットシフトを開始する機能を各々有する
ことを特徴とするシリアルデータ転送装置。
4. The serial data transfer device according to claim 1, wherein said first clock pulse counting circuit has a positive initial value in a binary representation value of the number of bits per word of serial data to be transferred. A function of sequentially decreasing the count value in synchronization with the clock pulse after being set as a value; a function of sequentially increasing the count value in synchronization with the clock pulse; A serial data transfer device, wherein each of the serial conversion circuits has a function of starting a bit shift of the parallel data after the count value of the second clock pulse counting circuit becomes positive.
JP3272721A 1991-10-21 1991-10-21 Serial data transfer device Expired - Fee Related JP2593017B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3272721A JP2593017B2 (en) 1991-10-21 1991-10-21 Serial data transfer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3272721A JP2593017B2 (en) 1991-10-21 1991-10-21 Serial data transfer device

Publications (2)

Publication Number Publication Date
JPH05114919A JPH05114919A (en) 1993-05-07
JP2593017B2 true JP2593017B2 (en) 1997-03-19

Family

ID=17517862

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3272721A Expired - Fee Related JP2593017B2 (en) 1991-10-21 1991-10-21 Serial data transfer device

Country Status (1)

Country Link
JP (1) JP2593017B2 (en)

Also Published As

Publication number Publication date
JPH05114919A (en) 1993-05-07

Similar Documents

Publication Publication Date Title
US5343439A (en) Memory apparatus
EP0416513B1 (en) Fifo memory device
JP2641276B2 (en) Two-stage synchronizer
JP2593017B2 (en) Serial data transfer device
US4755817A (en) Data transmission system having transmission intervals which are adjustable for data words of various lengths
EP0393716A2 (en) Delay circuit
JP2678115B2 (en) Timer circuit
JPH1127229A (en) Frame aligner circuit
US11005642B1 (en) Output circuit for a source device with arbitrary access time
EP0632459A2 (en) Delay circuit using a digital memory
JPH0637857A (en) Serial data receiving circuit
US5903144A (en) Circuit configuration for phase difference measurement
JPH07120255B2 (en) Bit buffer circuit
JP3198709B2 (en) Data write and read circuit
JPS63184133A (en) Comparator
JPS62151029A (en) Serial-parallel conversion circuit with counter
JPH04266119A (en) Bit searching circuit
JP2702351B2 (en) Data transfer device
JPH0544685B2 (en)
JPS62209926A (en) Parallel-serial converter
JPH04324563A (en) Digital ic and serial communication circuit used for the same
JPH0514329A (en) Burst signal reception circuit
JP2002062948A (en) Clock switching device
JP2002300035A (en) Analog/digital interface circuit
JPS62122434A (en) Frame signal synchronization detecting circuit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19961105

LAPS Cancellation because of no payment of annual fees