JPH1131119A - Data transfer circuit - Google Patents

Data transfer circuit

Info

Publication number
JPH1131119A
JPH1131119A JP18839597A JP18839597A JPH1131119A JP H1131119 A JPH1131119 A JP H1131119A JP 18839597 A JP18839597 A JP 18839597A JP 18839597 A JP18839597 A JP 18839597A JP H1131119 A JPH1131119 A JP H1131119A
Authority
JP
Japan
Prior art keywords
data
circuit
internal memory
data transfer
amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP18839597A
Other languages
Japanese (ja)
Inventor
Takashi Uematsu
岳志 植松
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP18839597A priority Critical patent/JPH1131119A/en
Publication of JPH1131119A publication Critical patent/JPH1131119A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data transfer circuit which surely performs transfer up to the end of data and efficiently performs data transfer even when it is applied to a data communication system that performs a finite data input. SOLUTION: This data transfer circuit is a data transfer circuit 15 that performs data transfer between peripheral circuits and main memory through a data bus. It detects the existence of a data input from a peripheral circuit and performs data transfer when data quantity that is temporarily stored in internal memory 152 exceeds a prescribed threshold in a period when there is a data input. On the other hand, in a period when there is no data input, it performs data transfer regardless of whether data quantity that is temporarily stored in the memory 152 exceeds the threshold or not.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データ通信システ
ムの端末装置等に適用され、端末装置等におけるメイン
メモリにその周辺回路(バスマスタをも含む)から入力
されるデータをデータバスを通してデータ転送するデー
タ転送回路に関する。
The present invention is applied to a terminal device or the like of a data communication system, and transfers data input from a peripheral circuit (including a bus master) to a main memory of the terminal device or the like via a data bus. The present invention relates to a data transfer circuit.

【0002】[0002]

【従来の技術】図8は、従来のこの種のデータ転送回路
の一例を示すブロック図である。
2. Description of the Related Art FIG. 8 is a block diagram showing an example of a conventional data transfer circuit of this kind.

【0003】図8を参照して、このデータ転送回路は、
図示しない周辺回路から入力されるデータの形式を内部
で扱う形式に変換するデータ入力インターフェース25
1と、データ入力インターフェイス251からのデータ
を一時的に蓄積する内部メモリ252と、内部メモリ2
52への書き込みおよび読み出しを書き込むデータ数お
よび読み出すデータ数をカウントしながら制御する内部
メモリ制御回路253と、内部メモリ制御回路253の
カウント結果に基づいて内部メモリ252に蓄積された
データ量を算出する減算回路254と、減算回路254
から得られた内部メモリ252に蓄積されたデータ量を
しきい値と比較してデータ量がしきい値を超過したこと
を検出してしきい超過信号Thを出力する比較回路25
5と、比較回路255からのしきい超過信号Thに基づ
いてデータ転送の実行を制御するバスマスタ制御回路2
56とを有している。
Referring to FIG. 8, this data transfer circuit comprises:
Data input interface 25 for converting the format of data input from a peripheral circuit (not shown) to a format handled internally
1, an internal memory 252 for temporarily storing data from the data input interface 251, and an internal memory 2
An internal memory control circuit 253 for controlling while counting the number of data to be written to and read from the data 52 and the number of data to be read, and calculates the amount of data stored in the internal memory 252 based on the count result of the internal memory control circuit 253. Subtraction circuit 254 and subtraction circuit 254
A comparison circuit 25 that compares the amount of data stored in the internal memory 252 obtained from the above with a threshold value, detects that the data amount has exceeded the threshold value, and outputs a threshold excess signal Th.
5 and a bus master control circuit 2 for controlling execution of data transfer based on the threshold excess signal Th from the comparison circuit 255.
56.

【0004】次に、この従来のデータ転送回路の動作を
説明する。
Next, the operation of the conventional data transfer circuit will be described.

【0005】周辺回路からデータが送られてくると、送
られてきたデータはデータ入力インターフェイス251
でデータ転送回路への入力データの形式からデータ転送
回路内での形式に変換されて内部メモリ252へ送られ
る。
When data is sent from a peripheral circuit, the sent data is sent to the data input interface 251.
Is converted from the format of the input data to the data transfer circuit to the format in the data transfer circuit and sent to the internal memory 252.

【0006】内部メモリ252へ送られてきたデータ
は、内部メモリ252においてライトアドレスポインタ
の指し示すアドレスに一時的に蓄積され、リードアドレ
スポインタの指し示すアドレスからバスマスタ制御回路
256に出力される。
The data sent to the internal memory 252 is temporarily stored in the internal memory 252 at the address indicated by the write address pointer, and is output to the bus master control circuit 256 from the address indicated by the read address pointer.

【0007】内部メモリ制御回路253は、ライトアド
レスポインタ用とリードアドレスポインタ用の2つのカ
ウンタを持っている。ライトアドレスポインタは、内部
メモリ252の入力側の制御に用いられ、データ入力イ
ンターフェイス251から1回のデータ入力があったこ
とを検出する度にカウンタを1つ進める。また、リード
アドレスポインタは、内部メモリ252の出力側の制御
に用いられ、バスマスタ制御回路256にへ1回のデー
タ転送があったことを検出する度にカウンタを1つ進め
る。
The internal memory control circuit 253 has two counters for a write address pointer and a read address pointer. The write address pointer is used to control the input side of the internal memory 252, and increments the counter by one each time it detects that there has been one data input from the data input interface 251. The read address pointer is used for controlling the output side of the internal memory 252, and increments the counter by one each time it detects that the bus master control circuit 256 has performed one data transfer.

【0008】減算回路254は、内部メモリ制御回路2
53におけるライトアドレスポインタとリードアドレス
ポインタとの差分を算出し、内部メモリ252に現在蓄
積されているデータ量を算出する。
The subtraction circuit 254 is connected to the internal memory control circuit 2
The difference between the write address pointer and the read address pointer in 53 is calculated, and the amount of data currently stored in the internal memory 252 is calculated.

【0009】比較回路255は、減算回路254から得
られた内部メモリ252に蓄積されたデータ量をしきい
値と比較してデータ量がしきい値を超過したことを検出
してしきい超過信号Thをバスマスタ制御回路256へ
出力する。
The comparison circuit 255 compares the amount of data stored in the internal memory 252 obtained from the subtraction circuit 254 with a threshold value, detects that the data amount has exceeded the threshold value, and detects a threshold excess signal. Th is output to the bus master control circuit 256.

【0010】バスマスタ制御回路256は、データバス
の制御全般を行う。加えて、比較回路255からのしき
い超過信号Thに基づいて、データ転送の実行を制御す
る。詳しくは、比較回路255からのしきい超過信号T
hを監視して、内部メモリ252に現在蓄積されている
データ量がしきい値を越えている場合にはバースト的に
データ転送を実行させる。そして、内部メモリ252に
蓄積されているデータ量がしきい値以下になると、デー
タ転送を終了させる。このような方法によれば、効率的
にデータ転送を行える。
[0010] The bus master control circuit 256 performs overall control of the data bus. In addition, execution of data transfer is controlled based on the threshold excess signal Th from the comparison circuit 255. Specifically, the threshold excess signal T from the comparison circuit 255
h is monitored, and if the amount of data currently stored in the internal memory 252 exceeds the threshold value, the data transfer is executed in a burst manner. When the amount of data stored in the internal memory 252 becomes equal to or smaller than the threshold, the data transfer is terminated. According to such a method, data transfer can be performed efficiently.

【0011】[0011]

【発明が解決しようとする課題】上述した例をも含め、
従来のデータ転送回路では、有限のデータ入力がある
と、内部メモリ内にしきい値以下のデータ量のデータが
残るという問題点がある。このように内部メモリ内に残
ったデータは、次にしきい値を越えるまで転送されな
い。しかも、有限のデータ入力であるために、次にしき
い値を越えることは期待されず、内部メモリ内にデータ
が永久に残る。特に、内部メモリ内に残るデータが重要
なデータである場合には、問題である。
SUMMARY OF THE INVENTION Including the above example,
In a conventional data transfer circuit, there is a problem that if there is a finite data input, data having a data amount equal to or less than the threshold value remains in the internal memory. The data remaining in the internal memory in this manner is not transferred until the data exceeds the next threshold value. Moreover, because of the finite data input, it is not expected that the threshold value will be exceeded next, and the data will remain permanently in the internal memory. In particular, this is a problem when the data remaining in the internal memory is important data.

【0012】このような事態を防止する方法として、し
きい値の概念を削除した方法、即ち、転送すべきデータ
が内部メモリ内に1つでも蓄積された時点でデータ転送
を開始するという方法が考えられる。この方法は、具体
的には、内部メモリに蓄積されたデータ量を0データ量
と比較してデータ量が0であることを検出してデータ量
ゼロ信号0を出力する比較回路と、比較回路からのデー
タ量ゼロ信号0に基づいてデータ転送の実行を制御する
バスマスタ制御回路とにより実現される。
As a method for preventing such a situation, a method in which the concept of the threshold value is deleted, that is, a method in which data transfer is started when at least one data to be transferred is accumulated in the internal memory. Conceivable. Specifically, this method includes comparing a data amount stored in an internal memory with a 0 data amount, detecting that the data amount is 0, and outputting a data amount zero signal 0, and a comparing circuit. And a bus master control circuit that controls the execution of data transfer based on the data amount zero signal 0 from the CPU.

【0013】しかし、この方法をとると、使用するデー
タバスの占有率が高くなり、効率的なデータ転送ができ
ない。特に、最近では、多数の周辺回路が同一のデータ
バスを使用することが多く、占有率が高くなることは好
ましくない。このため、データを効率的に転送するため
には、やはりしきい値の概念は残す必要がある。
However, when this method is adopted, the occupation rate of the data bus to be used becomes high, and efficient data transfer cannot be performed. In particular, recently, many peripheral circuits often use the same data bus, and it is not preferable that the occupation ratio be high. For this reason, in order to transfer data efficiently, it is necessary to keep the concept of the threshold value.

【0014】本発明の課題は、有限のデータ入力される
データ通信システムに適用した場合でも、確実にデータ
の最後まで転送を行えると共に、効率的にデータ転送を
行えるデータ転送回路を提供することである。
An object of the present invention is to provide a data transfer circuit capable of transferring data to the end of data reliably and efficiently transferring data even when applied to a data communication system to which finite data is input. is there.

【0015】[0015]

【課題を解決するための手段】本発明によれば周辺回路
とメインメモリとの間をデータバスを通してデータ転送
するデータ転送回路において、前記周辺回路からのデー
タ入力の有無を検出し、データ入力の有る期間では内部
に一時的に蓄積したデータ量が所定のしきい値を越えた
ときにデータ転送を行う一方、データ入力の無い期間で
は内部に一時的に蓄積したデータ量が前記しきい値を越
えるまたは越えないにかかわらずデータ転送を行うこと
を特徴とするデータ転送回路、が得られる。
According to the present invention, in a data transfer circuit for transferring data between a peripheral circuit and a main memory through a data bus, the presence or absence of data input from the peripheral circuit is detected, and During a certain period, data transfer is performed when the amount of data temporarily stored inside exceeds a predetermined threshold value, while during a period of no data input, the amount of data temporarily stored internally exceeds the threshold value. A data transfer circuit characterized in that data transfer is performed regardless of whether or not the data is exceeded.

【0016】本発明によればまた、前記周辺回路から入
力されるデータの形式を内部で扱う形式に変換するデー
タ入力インターフェースと、前記周辺回路からデータ入
力に先立って入力される所定の信号に基づいてデータ入
力の有無を検出する入力有効期間検出回路と、前記デー
タ入力インターフェイスからのデータを一時的に蓄積す
る内部メモリと、前記内部メモリへの書き込みおよび読
み出しを書き込むデータ数および読み出すデータ数をカ
ウントしながら制御する内部メモリ制御回路と、前記内
部メモリ制御回路のカウント結果に基づいて前記内部メ
モリに蓄積されたデータ量を算出する減算回路と、前記
減算回路から得られた前記内部メモリに蓄積されたデー
タ量を前記しきい値および0データ量とそれぞれ比較し
て該データ量が該しきい値を超過したことおよび該デー
タ量が0であることを検出する比較回路と、前記入力有
効期間検出回路の検出信号および前記比較回路の検出信
号に基づいてデータ転送の実行を制御するバスマスタ制
御回路とを有する前記データ転送回路が得られる。
According to the present invention, a data input interface for converting a format of data input from the peripheral circuit to a format used internally is provided, and a data input interface is provided based on a predetermined signal input prior to data input from the peripheral circuit. An input valid period detection circuit for detecting the presence or absence of data input, an internal memory for temporarily storing data from the data input interface, and counting the number of data to be written and read to and from the internal memory. An internal memory control circuit that controls the internal memory, a subtraction circuit that calculates the amount of data stored in the internal memory based on the count result of the internal memory control circuit, and an internal memory that is stored in the internal memory obtained from the subtraction circuit. The data amount is compared with the threshold value and the 0 data amount, and the data amount is A comparison circuit for detecting that the threshold value has been exceeded and that the data amount is 0, and a bus master control for controlling execution of data transfer based on the detection signal of the input valid period detection circuit and the detection signal of the comparison circuit And a data transfer circuit having a circuit.

【0017】本発明によればさらに、前記バスマスタ制
御回路は、データ入力が有りかつ前記内部メモリに蓄積
されたデータ量が前記しきい値を越えたとき、ならびに
データ入力が無いときに、該内部メモリに蓄積されたデ
ータをデータ量が0になるまでデータ転送を行うように
制御する前記データ転送回路が得られる。
Further, according to the present invention, the bus master control circuit is configured to output the data when the data input is present and the amount of data stored in the internal memory exceeds the threshold value or when there is no data input. The data transfer circuit for controlling the data stored in the memory to perform data transfer until the data amount becomes zero is obtained.

【0018】本発明によればまた、前記バスマスタ制御
回路は、データ入力が有るときか、または前記内部メモ
リに蓄積されたデータ量が前記しきい値を越えたとき
に、データ転送を開始するように制御し、前記内部メモ
リに蓄積されたデータ量が0になったときに、データ転
送を終了するように制御し、さらに、データ入力が有る
ときに、データ転送を行うか行わないかを切り替え可能
である☆2に記載のデータ転送回路が得られる。
According to the present invention, the bus master control circuit starts data transfer when data is input or when the amount of data stored in the internal memory exceeds the threshold value. Control to terminate the data transfer when the amount of data stored in the internal memory becomes 0, and to switch between performing and not performing data transfer when there is data input. The data transfer circuit described in ☆ 2 is obtained.

【0019】本発明によればさらに、前記データ入力イ
ンターフェイスおよび前記入力有効期間検出回路は、E
nable形式、Sync.形式、およびハンドシェイ
ク形式を含む複数のデータ入力形式に対して切り替え可
能に対応している前記データ転送回路が得られる。
According to the present invention, further, the data input interface and the input valid period detection circuit may be configured such that:
No. format, Sync. The data transfer circuit is provided which is switchably compatible with a plurality of data input formats including a format and a handshake format.

【0020】本発明によればまた、前記内部メモリは、
前記データ入力インターフェイスからのデータをライト
アドレスポインタで指定されたアドレスに一時的に蓄積
すると共に、リードアドレスポインタで指定されたアド
レスから順次データを出力する前記データ転送回路が得
られる。
According to the present invention, the internal memory further comprises:
The data transfer circuit temporarily stores data from the data input interface at an address specified by a write address pointer, and sequentially outputs data from an address specified by a read address pointer.

【0021】本発明によればさらに、前記内部メモリ制
御回路は、前記内部メモリのライトアドレスポインタ用
のライトカウンタと、リードアドレスポインタ用のリー
ドカウンタとを備え、書き込むデータ数をライトカウン
タでカウントすると共に、読み出すデータ数をリードカ
ウンタでカウントし、前記減算回路は、前記内部メモリ
制御回路の前記ライトカウンタカウント結果と前記リー
ドカウンタのカウント結果との差分から前記内部メモリ
に蓄積されたデータ量を算出する前記データ転送回路が
得られる。
According to the present invention, the internal memory control circuit further includes a write counter for a write address pointer of the internal memory and a read counter for a read address pointer, and counts the number of data to be written by the write counter. At the same time, the number of data to be read is counted by a read counter, and the subtraction circuit calculates the amount of data stored in the internal memory from the difference between the write counter count result of the internal memory control circuit and the count result of the read counter. The above data transfer circuit is obtained.

【0022】[0022]

【発明の実施の形態】以下、図面を参照して、本発明の
実施の形態によるデータ転送回路を説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A data transfer circuit according to an embodiment of the present invention will be described below with reference to the drawings.

【0023】図1は、本発明の実施の形態によるデータ
転送回路を適用したデータ通信システムにおける端末装
置の構成を示すブロック図である。図1を参照して、本
端末装置は、図示しない人工衛星から送られてくるMP
EGの画像データを扱うものを想定している。本端末装
置は、人工衛星から送られてくる画像データを受信する
アンテナ10と、アンテナ10で受信されたデータの選
局等を行うチューナ11と、チューナ11から出力され
た変調されたデータについて復調するQPSK復調回路
12と、QPSK復調回路12から出力されたデータに
ついて伝送路の誤り訂正を行う誤り訂正回路13と、誤
り訂正回路13から出力されたデータについてスクラン
ブルの解除を行うスクランブル解除回路14と、スクラ
ンブル解除回路14から出力されたデータをメモリ17
にデータ転送する本発明によるデータ転送回路15と、
データバスの制御を行うCPU16と、データ転送回路
15から転送されたデータを一時的に蓄積するメモリ1
7と、メモリ17に蓄積されたデータを読み込み、トラ
ンスポートストリーム形式のMPEG画像データをデ・
マルチプレクスするTS DEMUX18と、TS D
EMUX18でデ・マルチプレクスされたデータをデコ
ードするMPEGデコーダ19と、MPEGデコーダ1
9でデコードされたデータを表示する表示回路20とか
ら構成されている。
FIG. 1 is a block diagram showing a configuration of a terminal device in a data communication system to which a data transfer circuit according to an embodiment of the present invention is applied. With reference to FIG. 1, the present terminal device transmits an MP transmitted from an artificial satellite (not shown).
It is assumed that the device handles EG image data. The terminal device includes an antenna 10 for receiving image data sent from an artificial satellite, a tuner 11 for selecting a data received by the antenna 10, and demodulation of modulated data output from the tuner 11. A QPSK demodulation circuit 12 that performs error correction on a transmission line for data output from the QPSK demodulation circuit 12, a descrambling circuit 14 that descrambles data output from the error correction circuit 13, , The data output from the descrambling circuit 14
A data transfer circuit 15 according to the present invention for transferring data to
A CPU 16 for controlling a data bus and a memory 1 for temporarily storing data transferred from the data transfer circuit 15
7 and the data stored in the memory 17 are read, and the MPEG image data in the transport stream format is
TS DEMUX18 to be multiplexed and TS DEMUX18
An MPEG decoder 19 for decoding the data demultiplexed by the EMUX 18, and an MPEG decoder 1
9 and a display circuit 20 for displaying the data decoded.

【0024】図2は、図1に示した本発明によるデータ
転送回路15の構成を示すブロック図である。図2を参
照して、データ転送回路15は、スクランブル解除回路
14(図1)から入力されるデータの形式を内部で扱う
形式に変換するデータ入力インターフェース151と、
スクランブル解除回路14からデータ入力に先立って入
力される所定の信号としてのEnable1信号を監視
してデータ入力の有無を検出し、データ入力の有無を示
すデータ入力有無信号DIを出力する入力有効期間検出
回路157と、データ入力インターフェイス151から
のデータを一時的に蓄積する内部メモリ152と、内部
メモリ152への書き込みおよび読み出しを書き込むデ
ータ数および読み出すデータ数をカウントしながら制御
する内部メモリ制御回路153と、内部メモリ制御回路
153のカウント結果に基づいて内部メモリ152に蓄
積されたデータ量を算出する減算回路154と、減算回
路154から得られた内部メモリ152に蓄積されたデ
ータ量をしきい値および0データ量とそれぞれ比較して
データ量がしきい値を超過したことおよびデータ量が0
であることを検出してしきい超過信号Thおよびデータ
量ゼロ信号0を出力する比較回路155と、入力有効期
間検出回路157からのデータ入力有無信号DIならび
に比較回路155からのしきい超過信号Thおよびデー
タ量ゼロ信号0に基づいて、内部メモリ152に蓄積さ
れたデータをメモリ17(図1)等へデータ転送するこ
とを制御するバスマスタ制御回路156とを有してい
る。
FIG. 2 is a block diagram showing a configuration of the data transfer circuit 15 according to the present invention shown in FIG. Referring to FIG. 2, data transfer circuit 15 includes a data input interface 151 for converting a format of data input from descrambling circuit 14 (FIG. 1) into a format handled internally.
Input valid period detection for monitoring the Enable1 signal as a predetermined signal input from the descrambling circuit 14 prior to data input, detecting the presence or absence of data input, and outputting the data input presence / absence signal DI indicating the presence / absence of data input A circuit 157, an internal memory 152 for temporarily storing data from the data input interface 151, and an internal memory control circuit 153 for controlling while counting the number of data to be written and read to and from the internal memory 152, and A subtraction circuit 154 for calculating the amount of data stored in the internal memory 152 based on the count result of the internal memory control circuit 153, and a threshold value and a data amount stored in the internal memory 152 obtained from the subtraction circuit 154. Data amount is threshold compared to 0 data amount respectively The excess it and the amount of data is 0
, And outputs a threshold excess signal Th and a data amount zero signal 0, a data input presence / absence signal DI from the input valid period detection circuit 157, and a threshold excess signal Th from the comparison circuit 155. And a bus master control circuit 156 for controlling the transfer of data stored in the internal memory 152 to the memory 17 (FIG. 1) or the like based on the data amount zero signal 0.

【0025】次に、データ転送回路15の動作を説明す
る。
Next, the operation of the data transfer circuit 15 will be described.

【0026】まず、スクランブル解除回路14からスク
ランブルが解除されたデータが送られてくる。ここで
は、図3に示すような形式でデータが入力されるものと
する。即ち、Clock,Enable1,およびDa
ta(7:0)の3種類の信号が送られてくる。Dat
aは、8ビットで入力されるものとする。また、このデ
ータ入力は、データ転送回路15からは制御できないも
のとする。即ち、ハンドシェイクではない形式で入力さ
れる。図3において、Enable1信号がHighの
期間がデータ入力の有効期間である。よって、データ入
力インターフェイス151は、有効期間のデータを取り
込む必要がある。データ入力インターフェイス151
は、図3に示すような波形に対応するインターフェイス
だけではなく、Sync.形式やハンドシェイク形式に
対応するものでもよい。また、複数のデータ入力形式に
対して切り替え可能に対応させてもよい。この際には、
入力有効期間検出回路157も、複数のデータ入力形式
に対応させる。
First, descrambled data is sent from the descrambling circuit 14. Here, it is assumed that data is input in a format as shown in FIG. That is, Clock, Enable1, and Da
Three types of signals of ta (7: 0) are transmitted. Dat
It is assumed that a is input in 8 bits. This data input cannot be controlled from the data transfer circuit 15. That is, the input is performed in a format other than the handshake. In FIG. 3, a period in which the Enable1 signal is High is a data input valid period. Therefore, the data input interface 151 needs to take in the data of the valid period. Data input interface 151
Is not only an interface corresponding to the waveform as shown in FIG. Format or handshake format. Further, a plurality of data input formats may be switchably supported. In this case,
The input valid period detection circuit 157 also supports a plurality of data input formats.

【0027】入力有効期間検出回路157では、常にE
nable1信号を監視しており、データ入力の有効期
間/無効期間を示すデータ入力有無信号DIを生成す
る。データ入力有無信号DIは、図4に示すように、
「Highのときはデータ入力が行われている有効期間
を示し」ており、「Lowのときはデータ入力が行われ
ていない無効期間を示し」ている。
In the input valid period detecting circuit 157, E
It monitors the enable1 signal and generates a data input presence / absence signal DI indicating a valid period / invalid period of data input. The data input presence signal DI is, as shown in FIG.
“High indicates a valid period during which data is input”, and “Low indicates an invalid period during which no data is input”.

【0028】内部メモリ152は、データ入力インター
フェイス151からのデータを、内部メモリ制御回路1
53によってライトアドレスポインタで指定されたアド
レスに一時的に蓄積すると共に、リードアドレスポイン
タで指定されたアドレスから順次データを出力する。
The internal memory 152 stores data from the data input interface 151 in the internal memory control circuit 1.
53 temporarily stores the data at the address specified by the write address pointer and sequentially outputs data from the address specified by the read address pointer.

【0029】内部メモリ制御回路153は、内部メモリ
152のライトアドレスポインタ用のライトカウンタ
と、リードアドレスポインタ用のリードカウンタとを備
えている。内部メモリ制御回路153は、書き込むデー
タ数をライトカウンタでカウントすると共に、読み出す
データ数をリードカウンタでカウントする。
The internal memory control circuit 153 includes a write counter for a write address pointer of the internal memory 152 and a read counter for a read address pointer. The internal memory control circuit 153 counts the number of data to be written by a write counter and the number of data to be read by a read counter.

【0030】減算回路は、内部メモリ制御回路153の
ライトカウンタカウント結果とリードカウンタのカウン
ト結果との差分から内部メモリ152に蓄積されたデー
タ量を算出する。
The subtraction circuit calculates the amount of data stored in the internal memory 152 from the difference between the count result of the write counter of the internal memory control circuit 153 and the count result of the read counter.

【0031】比較回路155は、減算回路154で算出
されたデータ量を、予め定められたしきい値と比較す
る。比較の結果、「内部メモリ152に現在蓄積されて
いるデータ量がしきい値を越えた場合はしきい超過信号
ThをLowにし」、「越えてない場合はしきい超過信
号ThをHighにし」てバスマスタ制御回路156へ
出力する。また、比較回路155は、データ量が0であ
るかを判定し、「内部メモリ152に現在蓄積されてい
るデータ量がある場合はデータ量ゼロ信号0をHigh
にし」、「0の場合にはデータ量ゼロ信号0をLowに
し」てバスマスタ制御回路156へ出力する。
The comparison circuit 155 compares the data amount calculated by the subtraction circuit 154 with a predetermined threshold value. As a result of the comparison, “if the amount of data currently stored in the internal memory 152 exceeds the threshold, the threshold excess signal Th is set to Low”, and “if not, the threshold excess signal Th is set to High”. And outputs it to the bus master control circuit 156. Further, the comparison circuit 155 determines whether the data amount is 0, and “if the data amount currently stored in the internal memory 152 is present, the data amount zero signal 0 is set to High.
, And if “0”, the data amount zero signal 0 is set to Low ”and output to the bus master control circuit 156.

【0032】バスマスタ制御回路156は、入力有効期
間検出回路157から出力されるデータ入力有無信号D
Iを監視している。
The bus master control circuit 156 has a data input presence / absence signal D output from the input valid period detection circuit 157.
I'm watching.

【0033】データ入力有無信号DIがHigh、即ち
データが現在入力中であれば、バスマスタ制御回路15
6は、比較回路155から出力されるしきい超過信号T
hをサンプリングする。しきい超過信号ThがLowで
あれば、即ち内部メモリ152に現在蓄積されているデ
ータ量がしきい値を越えている場合には、データ転送を
開始する。一方、しきい超過信号ThがHigh、即ち
内部メモリ152に現在蓄積されているデータ量がしき
い値を越えていない場合には、そのデータ量がしきい値
を越えるまでそのまま待機する。
If the data input presence / absence signal DI is High, that is, if data is currently being input, the bus master control circuit 15
6 is a threshold excess signal T output from the comparison circuit 155.
h is sampled. If the threshold excess signal Th is Low, that is, if the amount of data currently stored in the internal memory 152 exceeds the threshold, data transfer is started. On the other hand, if the threshold excess signal Th is High, that is, if the data amount currently stored in the internal memory 152 does not exceed the threshold value, the process stands by until the data amount exceeds the threshold value.

【0034】データ入力有無信号DIがLow、即ちデ
ータが現在入力されていなければ、バスマスタ制御回路
156は、比較回路155から出力されるしきい超過信
号Thの状態に関係なく、即ち内部メモリ152に現在
蓄積されているデータ量がしきい値を越えているかまた
は越えていないに拘らず、データ転送を開始する。
If the data input presence / absence signal DI is Low, that is, if no data is currently input, the bus master control circuit 156 outputs the signal to the internal memory 152 regardless of the state of the threshold excess signal Th output from the comparison circuit 155. Data transfer is started regardless of whether the currently stored data amount exceeds or does not exceed the threshold value.

【0035】上記いずれかの場合によりデータ転送が開
始した後は、バスマスタ制御回路156は、比較回路1
55から出力されるデータ量ゼロ信号0を常に監視し、
データ量ゼロ信号0がLow,即ち内部メモリ152に
転送すべきデータがなくなったときには、データ転送を
終了する。
After the data transfer is started in any of the above cases, the bus master control circuit 156 operates the comparison circuit 1
Always monitor the data amount zero signal 0 output from 55,
When the data amount zero signal 0 is Low, that is, when there is no more data to be transferred to the internal memory 152, the data transfer ends.

【0036】図5は、このときの様子を示した図であ
る。データ入力有無信号DIがHighの期間(期間A
またはC)では、データ入力が期待されるため、内部メ
モリ152に蓄積されたデータ量が設定されたしきい値
を越えるまで待機する。データ量がしきい値を越えたと
き(タイミングもしくは)、バースト的なデータ転
送が開始される。このデータ転送により、内部メモリ1
52に蓄積されたデータ量が0となったとき(タイミン
グもしくは)、データ転送は一時終了する。尚、デ
ータ入力によって入力されるデータ量よりもしきい値を
大きく設定しておけば、データ入力有無信号DIがLo
wの区間のみでデータ転送を行なえ、さらに効率的なデ
ータ転送を行うことが可能になる。
FIG. 5 is a diagram showing the situation at this time. The period during which the data input presence / absence signal DI is High (period A
In C), since data input is expected, the process waits until the amount of data stored in the internal memory 152 exceeds a set threshold value. When the data amount exceeds the threshold (at timing or), burst-like data transfer is started. By this data transfer, the internal memory 1
When the amount of data stored in 52 becomes 0 (at the timing or), the data transfer ends temporarily. If the threshold value is set to be larger than the data amount input by data input, the data input presence / absence signal DI becomes Lo.
Data transfer can be performed only in the section of w, and more efficient data transfer can be performed.

【0037】図6は、バスマスタ制御回路156におけ
るステートマシンの一構成例を示している。ここでは、
このステートマシンを管理する別のステートマシンが存
在すると仮定する。さて、このステートマシンは、初期
状態ステートS0と、アドレスフェーズステートS1
と、データ転送フェーズステートS2と、転送終了ステ
ートS3とにより構成されている。尚、この構成は、説
明の便宜を考慮した、ごく基本的な構成である。バスマ
スタ制御回路156におけるこのステートマシンは、以
下の条件A〜Dにしたがって進行する。
FIG. 6 shows a configuration example of the state machine in the bus master control circuit 156. here,
Suppose there is another state machine that manages this state machine. Now, this state machine includes an initial state state S0 and an address phase state S1.
, A data transfer phase state S2, and a transfer end state S3. This configuration is a very basic configuration in consideration of convenience of description. This state machine in the bus master control circuit 156 proceeds according to the following conditions A to D.

【0038】条件A:(しきい超過信号Th=Low)
or(データ入力有無信号DI=Low) 条件B:アドレスフェーズステートS1完了 条件C:データ量ゼロ信号0=Low 条件D:(データ量ゼロ信号0=High)and(バ
スサイクル=Stop) 初期状態ステートS0では、しきい超過信号Thとデー
タ入力有無信号DIを監視しており、いずれかがLow
になったときに、データ転送を開始、即ちアドレスフェ
ーズステートS1に移行する。
Condition A: (threshold excess signal Th = Low)
or (Data input presence / absence signal DI = Low) Condition B: Completion of address phase state S1 Condition C: Data amount zero signal 0 = Low Condition D: (Data amount zero signal 0 = High) and (bus cycle = Stop) Initial state state In S0, the threshold excess signal Th and the data input presence / absence signal DI are monitored, and one of them is Low.
, The data transfer starts, that is, shifts to the address phase state S1.

【0039】アドレスフェーズステートS1では、デー
タバスにおけるアドレスフェーズが完了したときに、デ
ータ転送フェーズステートS2に移行する。
In the address phase state S1, when the address phase on the data bus is completed, the process shifts to the data transfer phase state S2.

【0040】データ転送フェーズステートS2では、デ
ータ量ゼロ信号0を監視しており、この信号がLowに
なったときに、転送終了ステートS3に移行する。
In the data transfer phase state S2, the data amount zero signal 0 is monitored, and when this signal becomes low, the process shifts to the transfer end state S3.

【0041】転送終了ステートS3からは、無条件に初
期状態ステートS0に移行し、次のデータ転送に備え
る。
From the transfer end state S3, the process unconditionally shifts to the initial state S0 to prepare for the next data transfer.

【0042】図7は、データバスがパーソナルコンピュ
ータのPCIバスであるときの各種信号の波形の例を示
す図ある。図7では、図6に示したバスマスタ制御回路
156のステートマシンの各ステートを対応させて示し
ている。また、図7では、説明する便宜上、PCIバス
の動作に関する信号のうちの最低限の信号のみを示して
いる。
FIG. 7 is a diagram showing examples of waveforms of various signals when the data bus is a PCI bus of a personal computer. FIG. 7 shows the states of the state machine of the bus master control circuit 156 shown in FIG. 6 in association with each other. FIG. 7 shows only the minimum signals among the signals related to the operation of the PCI bus for convenience of description.

【0043】図7において、本発明によるデータ転送回
路15では、データ入力が期待される期間と期待されな
い期間とに分けて考えている。バスマスタ制御回路15
6においては、データ入力が期待される期間では、しき
い値の概念を残してデータ転送することで、転送効率を
保つ。一方、入力が期待されない期間では、しきい値の
概念を削除し、残りのデータ量がしきい値を越えるまた
は越えないに拘らず、データ転送を行う。最終データの
入力が終わると、データ入力は無効期間に必ず入る。こ
のデータ入力の無効期間では、内部メモリ152に蓄積
されているデータ量がしきい値の値には関係なくデータ
転送されるため、内部メモリ152に、しきい値以下の
データが残ることはない。即ち、最終データまで確実に
データ転送を行ない、かつデータ転送を効率的に行うこ
とが可能である。
In FIG. 7, the data transfer circuit 15 according to the present invention is divided into a period in which data input is expected and a period in which data input is not expected. Bus master control circuit 15
In No. 6, during the period in which data input is expected, the transfer efficiency is maintained by transferring the data while leaving the concept of the threshold value. On the other hand, in a period during which no input is expected, the concept of the threshold is deleted, and data transfer is performed regardless of whether the remaining data amount exceeds or does not exceed the threshold. When the final data has been entered, the data entry always enters the invalid period. In the invalid period of the data input, the amount of data stored in the internal memory 152 is transferred regardless of the threshold value, so that the data below the threshold does not remain in the internal memory 152. . That is, it is possible to transfer data reliably to the last data and to perform data transfer efficiently.

【0044】また、データ入力の期待されない期間でデ
ータ転送をするかしないかの切り替え機能を付加してお
けば、従来どおりのデータ転送を行うことも可能であ
る。
Further, if a function of switching whether or not to perform data transfer during a period in which data input is not expected is added, it is possible to perform conventional data transfer.

【0045】[0045]

【発明の効果】本発明によるデータ転送回路は、周辺回
路からのデータ入力の有無を検出し、データ入力の有る
期間では内部に一時的に蓄積したデータ量が所定のしき
い値を越えたときにデータ転送を行う一方、データ入力
の無い期間では内部に一時的に蓄積したデータ量がしき
い値を越えるまたは越えないにかかわらずデータ転送を
行うため、有限のデータ入力されるデータ通信システム
に適用した場合でも、確実にデータの最後まで転送を行
えると共に、効率的にデータ転送を行える。
The data transfer circuit according to the present invention detects the presence / absence of data input from a peripheral circuit, and when the amount of data temporarily stored therein exceeds a predetermined threshold during a period in which data is input. On the other hand, during the period when there is no data input, data transfer is performed regardless of whether the amount of data temporarily stored inside exceeds or does not exceed the threshold value. Even when applied, data can be reliably transferred to the end and data can be transferred efficiently.

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

【図1】本発明の実施の形態によるデータ転送回路が適
用された端末装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a terminal device to which a data transfer circuit according to an embodiment of the present invention is applied.

【図2】本発明の実施の形態によるデータ転送回路の構
成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a data transfer circuit according to the embodiment of the present invention.

【図3】図2に示すデータ転送回路への入力データの波
形の例を示す図である。
FIG. 3 is a diagram illustrating an example of a waveform of input data to a data transfer circuit illustrated in FIG. 2;

【図4】図2に示すデータ転送回路における入力有効期
間検出回路の動作を説明するための図である。
FIG. 4 is a diagram for explaining an operation of an input valid period detection circuit in the data transfer circuit shown in FIG. 2;

【図5】図2に示すデータ転送回路によるデータ転送が
行われるタイミングの例を示す図である。
FIG. 5 is a diagram illustrating an example of timing at which data transfer is performed by the data transfer circuit illustrated in FIG. 2;

【図6】図2に示すデータ転送回路のステートマシンの
構成例を示す図である。
FIG. 6 is a diagram illustrating a configuration example of a state machine of the data transfer circuit illustrated in FIG. 2;

【図7】図6に示すステートマシンをPCIバスに適用
した場合の波形の例を示す図である。
FIG. 7 is a diagram showing an example of a waveform when the state machine shown in FIG. 6 is applied to a PCI bus.

【図8】従来例によるデータ転送回路の構成を示すブロ
ック図である。
FIG. 8 is a block diagram showing a configuration of a data transfer circuit according to a conventional example.

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

10 アンテナ 11 チューナ 12 QPSK復調回路 13 誤り訂正回路 14 スクランブル解除回路 15 データ転送回路 16 CPU 17 メモリ 18 TS DEMUX 19 MPEGデコーダ 20 表示回路 151、251 データ入力インターフェイス 157 入力有効期間検出回路 152、252 内部メモリ 153、253 内部メモリ制御回路 154、254 減算回路 155、255 比較回路 156、256 バスマスタ制御回路 S0 初期状態ステート S1 アドレスフェーズステート S2 データ転送フェーズステート S3 転送終了ステート Reference Signs List 10 antenna 11 tuner 12 QPSK demodulation circuit 13 error correction circuit 14 descrambling circuit 15 data transfer circuit 16 CPU 17 memory 18 TS DEMUX 19 MPEG decoder 20 display circuit 151, 251 data input interface 157 input valid period detection circuit 152, 252 internal memory 153, 253 Internal memory control circuit 154, 254 Subtraction circuit 155, 255 Comparison circuit 156, 256 Bus master control circuit S0 Initial state state S1 Address phase state S2 Data transfer phase state S3 Transfer end state

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 周辺回路とメインメモリとの間をデータ
バスを通してデータ転送するデータ転送回路において、
前記周辺回路からのデータ入力の有無を検出し、データ
入力の有る期間では内部に一時的に蓄積したデータ量が
所定のしきい値を越えたときにデータ転送を行う一方、
データ入力の無い期間では内部に一時的に蓄積したデー
タ量が前記しきい値を越えるまたは越えないにかかわら
ずデータ転送を行うことを特徴とするデータ転送回路。
1. A data transfer circuit for transferring data between a peripheral circuit and a main memory through a data bus,
While detecting the presence or absence of data input from the peripheral circuit, during the period of data input, while performing data transfer when the amount of data temporarily stored therein exceeds a predetermined threshold,
A data transfer circuit for performing data transfer regardless of whether the amount of data temporarily stored therein exceeds or does not exceed the threshold during a period in which there is no data input.
【請求項2】 前記周辺回路から入力されるデータの形
式を内部で扱う形式に変換するデータ入力インターフェ
ースと、前記周辺回路からデータ入力に先立って入力さ
れる所定の信号に基づいてデータ入力の有無を検出する
入力有効期間検出回路と、前記データ入力インターフェ
イスからのデータを一時的に蓄積する内部メモリと、前
記内部メモリへの書き込みおよび読み出しを書き込むデ
ータ数および読み出すデータ数をカウントしながら制御
する内部メモリ制御回路と、前記内部メモリ制御回路の
カウント結果に基づいて前記内部メモリに蓄積されたデ
ータ量を算出する減算回路と、前記減算回路から得られ
た前記内部メモリに蓄積されたデータ量を前記しきい値
および0データ量とそれぞれ比較して該データ量が該し
きい値を超過したことおよび該データ量が0であること
を検出する比較回路と、前記入力有効期間検出回路の検
出信号および前記比較回路の検出信号に基づいてデータ
転送の実行を制御するバスマスタ制御回路とを有する請
求項1に記載のデータ転送回路。
2. A data input interface for converting a format of data input from the peripheral circuit into a format used internally, and presence / absence of data input based on a predetermined signal input from the peripheral circuit prior to data input. , An internal memory for temporarily storing data from the data input interface, and an internal memory for controlling while counting the number of data to be written and read to and from the internal memory. A memory control circuit, a subtraction circuit that calculates an amount of data accumulated in the internal memory based on a count result of the internal memory control circuit, and a data amount accumulated in the internal memory obtained from the subtraction circuit. Compared with the threshold value and 0 data amount respectively, the data amount has exceeded the threshold value. And a comparison circuit for detecting that the data amount is 0, and a bus master control circuit for controlling execution of data transfer based on a detection signal of the input valid period detection circuit and a detection signal of the comparison circuit. Item 2. The data transfer circuit according to item 1.
【請求項3】 前記バスマスタ制御回路は、データ入力
が有りかつ前記内部メモリに蓄積されたデータ量が前記
しきい値を越えたとき、ならびにデータ入力が無いとき
に、該内部メモリに蓄積されたデータをデータ量が0に
なるまでデータ転送を行うように制御する請求項2に記
載のデータ転送回路。
3. The bus master control circuit according to claim 1, wherein when the data input is present and the amount of data stored in the internal memory exceeds the threshold, and when there is no data input, the bus master control circuit stores the data stored in the internal memory. 3. The data transfer circuit according to claim 2, wherein the data transfer circuit controls the data transfer until the data amount becomes zero.
【請求項4】 前記バスマスタ制御回路は、データ入力
が有るときか、または前記内部メモリに蓄積されたデー
タ量が前記しきい値を越えたときに、データ転送を開始
するように制御し、前記内部メモリに蓄積されたデータ
量が0になったときに、データ転送を終了するように制
御し、さらに、データ入力が有るときに、データ転送を
行うか行わないかを切り替え可能である請求項2に記載
のデータ転送回路。
4. The bus master control circuit controls to start data transfer when there is a data input or when the amount of data stored in the internal memory exceeds the threshold value. When the amount of data stored in the internal memory becomes zero, the data transfer is controlled to end, and when there is a data input, it is possible to switch between performing and not performing the data transfer. 3. The data transfer circuit according to 2.
【請求項5】 前記データ入力インターフェイスおよび
前記入力有効期間検出回路は、Enable形式、Sy
nc.形式、およびハンドシェイク形式を含む複数のデ
ータ入力形式に対して切り替え可能に対応している請求
項2乃至4のいずれかに記載のデータ転送回路。
5. The data input interface and the input valid period detection circuit are of an Enable type, Sy
nc. 5. The data transfer circuit according to claim 2, wherein the data transfer circuit is switchably compatible with a plurality of data input formats including a format and a handshake format.
【請求項6】 前記内部メモリは、前記データ入力イン
ターフェイスからのデータをライトアドレスポインタで
指定されたアドレスに一時的に蓄積すると共に、リード
アドレスポインタで指定されたアドレスから順次データ
を出力する請求項2乃至5のいずれかに記載のデータ転
送回路。
6. The internal memory temporarily stores data from the data input interface at an address specified by a write address pointer, and sequentially outputs data from an address specified by a read address pointer. 6. The data transfer circuit according to any one of 2 to 5.
【請求項7】 前記内部メモリ制御回路は、前記内部メ
モリのライトアドレスポインタ用のライトカウンタと、
リードアドレスポインタ用のリードカウンタとを備え、
書き込むデータ数をライトカウンタでカウントすると共
に、読み出すデータ数をリードカウンタでカウントし、
前記減算回路は、前記内部メモリ制御回路の前記ライト
カウンタカウント結果と前記リードカウンタのカウント
結果との差分から前記内部メモリに蓄積されたデータ量
を算出する請求項2乃至6のいずれかに記載のデータ転
送回路。
7. The internal memory control circuit includes: a write counter for a write address pointer of the internal memory;
A read counter for a read address pointer,
The number of data to be written is counted by a write counter, and the number of data to be read is counted by a read counter.
7. The data processing device according to claim 2, wherein the subtraction circuit calculates a data amount accumulated in the internal memory from a difference between the write counter count result of the internal memory control circuit and the count result of the read counter. Data transfer circuit.
JP18839597A 1997-07-14 1997-07-14 Data transfer circuit Pending JPH1131119A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18839597A JPH1131119A (en) 1997-07-14 1997-07-14 Data transfer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18839597A JPH1131119A (en) 1997-07-14 1997-07-14 Data transfer circuit

Publications (1)

Publication Number Publication Date
JPH1131119A true JPH1131119A (en) 1999-02-02

Family

ID=16222896

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18839597A Pending JPH1131119A (en) 1997-07-14 1997-07-14 Data transfer circuit

Country Status (1)

Country Link
JP (1) JPH1131119A (en)

Similar Documents

Publication Publication Date Title
US7849340B2 (en) Data transmission system and link state managing method thereof using turn-off acknowledgement and electrical idle waiting timeouts
CA1287905C (en) Method and apparatus for detecting a rate of data transmission
US6137949A (en) Apparatus and method for transmitting variable rate data according to multiple storage state indicators
US6442208B1 (en) Apparatus and method for transmitting data
US6792481B2 (en) DMA controller
JP2568458B2 (en) Data length detector
JPH1131119A (en) Data transfer circuit
US7203205B2 (en) Polling device and communication apparatus
CN1152244A (en) Data processing device including buffer memory
KR940007555B1 (en) Td/bus interface method of network synchronous apparatus
US8024767B1 (en) Method and apparatus for receiving digital video signals
JP3887059B2 (en) Data writing method, data reading method, and memory circuit
JP4148290B2 (en) Signal processing circuit
JP2630077B2 (en) Clock synchronous serial interface
JPH10285223A (en) Signal processing circuit
JP2003249948A (en) Transfer controller
JP4387488B2 (en) Overflow protection circuit and image transmission apparatus using the same
JP2736820B2 (en) Data communication device interface circuit
JP3924903B2 (en) Signal processing circuit
JP4148292B2 (en) Signal processing circuit
JP4192988B2 (en) Signal processing circuit
JP4148291B2 (en) Signal processing circuit
CN117370233A (en) HDMI controller UPI storage circuit and UPI data storage method
JPH10136027A (en) Communication controller
JPH1022986A (en) Serial input and output port

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000621