JP3359987B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP3359987B2
JP3359987B2 JP12472295A JP12472295A JP3359987B2 JP 3359987 B2 JP3359987 B2 JP 3359987B2 JP 12472295 A JP12472295 A JP 12472295A JP 12472295 A JP12472295 A JP 12472295A JP 3359987 B2 JP3359987 B2 JP 3359987B2
Authority
JP
Japan
Prior art keywords
block
buffer
data
blocks
flag
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
JP12472295A
Other languages
Japanese (ja)
Other versions
JPH08320779A (en
Inventor
裕之 野口
Original Assignee
松下電送システム株式会社
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 松下電送システム株式会社 filed Critical 松下電送システム株式会社
Priority to JP12472295A priority Critical patent/JP3359987B2/en
Publication of JPH08320779A publication Critical patent/JPH08320779A/en
Application granted granted Critical
Publication of JP3359987B2 publication Critical patent/JP3359987B2/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 data processing apparatus having a buffer used for inputting or outputting data to be transmitted and received.

【0002】[0002]

【従来の技術】従来DSP(Digital Signal Processe
r) が、データの送受信に用いるデータバッファの使用
可能な容量は、1バイト、または4バイトというように
ハードウェア的に固定されており、ソフトウェアによっ
て使用する容量を制御することは行われていなかった。
このためハードウェア的に用意されたバッファの全ての
容量が使われていた。
2. Description of the Related Art Conventional DSP (Digital Signal Processe)
r) However, the usable capacity of the data buffer used for data transmission and reception is fixed in hardware such as 1 byte or 4 bytes, and the capacity used by software is not controlled. Was.
For this reason, all the capacity of the buffer prepared in hardware was used.

【0003】[0003]

【発明が解決しようとする課題】ところで、DSPはそ
の種類により1回で処理できるデータの容量が異なるた
め、DSPがデータの送受信に用いるデータバッファの
容量が一定であると、DSPの種類とデータバッファの
容量の組み合わせによっては非常に使い難くなる。例え
ばDSPが1回の処理で3個分のデータ(例えば3バイ
ト)を処理しようとする場合、データバッファの容量が
2個分または4個分(2バイトまたは4バイト)の容量
であると、使い難いという問題があった。
Since the capacity of data that can be processed at one time differs depending on the type of the DSP, if the capacity of the data buffer used for data transmission and reception by the DSP is constant, the type of the DSP and the data It becomes very difficult to use depending on the combination of the buffer capacities. For example, when the DSP intends to process three pieces of data (for example, three bytes) in one process, if the capacity of the data buffer is two or four pieces (two bytes or four bytes), There was a problem that it was difficult to use.

【0004】本発明は、上述の問題点に鑑みてなされた
もので、DSPの1回の処理容量に応じて、データバッ
ファの容量を可変とすることが可能なデータ処理装置を
提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems, and has as its object to provide a data processing apparatus capable of changing the capacity of a data buffer according to the processing capacity of a single DSP. Aim.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
請求項1の発明では、所定ビット単位のブロックを複数
有し、各ブロックは所定の順序付けがなされているバッ
ファと、1回で処理するデータ容量に応じて使用ブロッ
ク数を定め、且つ最初に読み出す先頭ブロックを指示す
る制御手段と、前記指示された先頭ブロックから前記所
定の順序に基づいて前記使用ブロック数だけブロックを
選択し、該選択ブロックのデータを出力するセレクタ
と、前記バッファの最後段ブロックの読み出し状態に応
じて読み出し状態のフラグを作成するフラグ手段とを具
備し、前記バッファの最後段ブロックが最後のブロック
となるように前記先頭ブロックの位置を決め、前記制御
手段は前記フラグから最後段ブロックの読み出し完了を
認識したら前記先頭ブロックから次のデータの読み出し
を行う。
In order to achieve the above object, according to the first aspect of the present invention, a plurality of blocks of a predetermined bit unit are provided.
Each block has a predetermined order.
And the number of blocks used according to the amount of data
Determine the number of blocks and indicate the first block to be read first
Control means, and the location from the designated first block.
Blocks according to the number of used blocks based on a predetermined order
Selector for selecting and outputting data of the selected block
And the read state of the last block of the buffer.
Flag means for generating a read state flag
The last block of the buffer is the last block
The position of the first block is determined so that
The means determines the completion of reading of the last block from the flag.
When recognized, read the next data from the first block
I do.

【0006】[0006]

【0007】[0007]

【0008】請求項の発明では、所定ビット単位のブ
ロックを複数有し、各ブロックは所定の順序付けがなさ
れているバッファと、1回で処理するデータ容量に応じ
て使用ブロック数を定め、且つ最初に書き込む先頭ブロ
ックを指示する制御手段と、前記指示された先頭ブロッ
クから前記所定の順序に基づいて前記使用ブロック数だ
けブロックを選択し、入力データを書き込ませる書込指
示手段と、前記バッファの最後段ブロックの書き込み状
態に応じて書き込み状態のフラグを作成するフラグ手段
とを具備し、前記バッファの最後段ブロックが最後のブ
ロックとなるように前記先頭ブロックの位置を決め、前
記制御手段は前記フラグから最後段ブロックの書き込み
完了を認識したら前記先頭ブロックから次の入力データ
の書き込みを行う。
According to the second aspect of the present invention, a plurality of blocks in a predetermined bit unit are provided, and each block determines the number of blocks to be used in accordance with a buffer having a predetermined order and a data capacity to be processed at one time. Control means for instructing a head block to be written first, write instructing means for selecting blocks from the instructed head block by the number of used blocks based on the predetermined order, and writing input data, Flag means for creating a write state flag in accordance with the write state of the last block, determining the position of the first block so that the last block of the buffer is the last block, and the control means When the completion of writing of the last block is recognized from the flag, the next input data is written from the first block.

【0009】[0009]

【作用】請求項1の発明では、バッファを構成する複数
のブロックの中から1回で処理するデータ容量に応じて
使用ブロック数が定められる。制御手段が最初に使用す
るブロックを指示すると、セレクタは指示されたブロッ
クから順序付けに従って最後のブロックまでを選択し、
そのブロックへデータを出力する。これによりDSPの
1回の処理に合わせたバッファのブロックを使用するこ
とができる。例えばバッファは4ブロックよりなり、1
ブロックは1バイトのデータを格納するとすれば、DS
Pが1回で3バイトの処理をする場合、2番目から4番
目までのブロックを使用する。
According to the first aspect of the present invention, a plurality of buffers constituting a buffer are provided.
According to the amount of data to be processed in one block
The number of used blocks is determined. When the control means indicates the first block to be used, the selector selects from the indicated block to the last block according to the ordering,
Output data to the block. As a result, it is possible to use a block of the buffer corresponding to one processing of the DSP. For example, the buffer is composed of 4 blocks and 1
If a block stores 1 byte of data, DS
When P processes 3 bytes at one time, the second to fourth blocks are used.

【0010】また、フラグ手段を加え、セレクタが最後
のブロックのデータを出力したときフラグ表示させる。
これにより最後のブロックの出力処理が終了したことが
わかるので、制御手段は指示した最初のブロックから最
後のブロックまでの順位付けに従って次のデータを書き
込む。DSPの1回の処理データは必ず最後のブロック
まで使用されるように最初に使用するブロックを決めて
いるので、1回の処理終了を検出することが容易とな
り、この検出のためのソフトウェアの構成も容易とな
る。
Further , a flag means is added so that a flag is displayed when the selector outputs the data of the last block.
This indicates that the output processing of the last block has been completed, so the control means writes the next data according to the order from the designated first block to the last block. Since the first block to be used is determined so that one processing data of the DSP is always used up to the last block, it is easy to detect the end of one processing, and the configuration of software for this detection Also becomes easier.

【0011】請求項の発明では、バッファを構成する
複数のブロックの中から1回で処理するデータ容量に応
じて使用ブロック数が定められる。制御手段が最初に書
き込むブロックを指示すると、書込指示手段はその指示
されたブロックより、順序付けに従ってブロックを選択
し、入力データを書き込ませる。これによりDSPが処
理するデータ量となるブロック数を使用することができ
る。例えばバッファは4ブロックからなり、1ブロック
は1バイトの容量を有し、DSPの1回の処理容量が3
バイトであれば、最初のブロックとして2番目を指示
し、2〜4番目までの3バイトのブロックを使用するこ
とができる。
According to the second aspect of the present invention, the number of used blocks is determined according to the data capacity to be processed at one time from among a plurality of blocks constituting the buffer. When the control means designates a block to be written first, the write designation means selects a block from the designated block according to the ordering, and causes the input data to be written. As a result, the number of blocks corresponding to the amount of data processed by the DSP can be used. For example, the buffer is composed of four blocks, one block has a capacity of one byte, and the processing capacity of one DSP is three.
If it is a byte, the second block is designated as the first block, and blocks of 3 bytes from the second to the fourth can be used.

【0012】また、フラグ手段を加え、書込指示手段が
最後のブロックに入力データを書き込ませたことを表示
させる。これにより最後のブロックの書き込み終了がわ
かるので、制御手段は最初に書き込まれたブロックから
最後のブロックまでの入力データの書き込みを行うこと
ができる。DSPの1回の処理データは必ず最後のブロ
ックまで使用されるように最初に使用するブロックを決
めているので、この1回の処理終了を検出することが容
易となり、この検出のためのソフトウェアの構成も容易
となる。
Further , a flag means is added to display that the write instruction means has written the input data in the last block. As a result, the end of the writing of the last block can be known, so that the control means can write the input data from the first written block to the last block. Since the first block to be used is determined so that one processing data of the DSP is always used until the last block, it is easy to detect the end of this one processing, and the software for this detection is used. The configuration is also easy.

【0013】[0013]

【実施例】以下、本発明の実施例を図面を参照して説明
する。図1は本発明の実施例におけるDSPの送受信デ
ータ処理回路の概略を示すブロック図であり、図2は図
1におけるパラレル/シリアル変換部(以下P/S変換
部と記載する)の内部構造を示したブロック図、図3は
図1におけるシリアル/パラレル変換部(以下S/P変
換部と記載する)の内部構造を示したブロック図であ
る。図1において1はDSP、2はパラレル信号をシリ
アル信号に変換するP/S変換部、3はシリアル信号を
パラレル信号に変換するS/P変換部、4はデジタル信
号をアナログ信号に変換するデジタル/アナログ変換部
(以下D/A変換部と記載する)、5はアナログ信号を
デジタル信号に変換するアナログ/デジタル変換部(以
下A/D変換部と記載する)、6は送信側アナログ回
線、7は受信側アナログ回線を示す。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram schematically showing a transmission / reception data processing circuit of a DSP according to an embodiment of the present invention. FIG. 2 shows an internal structure of a parallel / serial converter (hereinafter, referred to as a P / S converter) in FIG. FIG. 3 is a block diagram showing an internal structure of a serial / parallel converter (hereinafter, referred to as an S / P converter) in FIG. In FIG. 1, 1 is a DSP, 2 is a P / S converter for converting a parallel signal to a serial signal, 3 is an S / P converter for converting a serial signal to a parallel signal, and 4 is a digital signal for converting a digital signal to an analog signal. / Analog conversion unit (hereinafter referred to as D / A conversion unit), 5 is an analog / digital conversion unit (hereinafter referred to as A / D conversion unit) that converts an analog signal to a digital signal, 6 is a transmission side analog line, Reference numeral 7 denotes a receiving-side analog line.

【0014】図2に示すP/S変換部は送信データを取
り扱う。21は送信データのリングバッファでありDS
P1によって送出されたデータが書き込まれる。リング
バッファ21は複数段のブロックからなり、各ブロック
は8ビットで構成されている。本実施例では21a〜2
1dの4段のブロックから構成されている。各ブロック
21a〜21dはa〜dの順序で使用するようになって
おり、さらにdからaの順に使用できるのでリングバッ
ファと呼ばれる。本実施例ではDSP1の1回での処理
容量に合わせて、a〜dのいずれかのブロックから使用
を開始するようにする。22はリングバッファ21のど
の段から使うかを示す値を格納するバッファで、DSP
1によって書き込まれる。23はカウンタでバッファ2
2の値を入力しサンプリグクロックCLKAとビット送
信クロックCLKBによって動作する。
The P / S converter shown in FIG. 2 handles transmission data. 21 is a ring buffer for transmission data, DS
The data sent by P1 is written. The ring buffer 21 is composed of a plurality of blocks, each block being composed of 8 bits. In the present embodiment, 21a to 2
It is composed of four stages of 1d. Each of the blocks 21a to 21d is used in the order of a to d, and can be used in the order of d to a, so that it is called a ring buffer. In the present embodiment, use is started from one of the blocks a to d in accordance with the processing capacity of the DSP 1 at one time. Reference numeral 22 denotes a buffer for storing a value indicating which stage of the ring buffer 21 to use, and a DSP
Written by one. 23 is a buffer 2
When the value of 2 is input, the operation is performed by the sampling clock CLKA and the bit transmission clock CLKB.

【0015】24はカウンタ23の出力により各ブロッ
ク21a,21b,21c,21dの出力の内1個のバ
スを選択するセレクタ、25はセレクタ24の出力をパ
ラレル信号からシリアル信号に変換するP/S変換器、
26はカウンタ23の出力、サンプリングクロックCL
KA,ビット送信クロックCLKB等によりリングバッ
ファ21の状態を示すステータスフラグを作るフラグデ
コーダである。ステータスフラグとしてはリングバッフ
ァ21の指示した段のブロックより最後の段のブロック
までデータが書き込まれた場合は「FULL」、データ
が読み出された場合は「EMP」を示すフラグ等が使用
される。27はフラグデコーダ26で作られたフラグを
DSP1が読むためのトライステートバッファである。
なお、NCSはチップセレクト、RDはリード信号、W
Tはライト信号、SOUTは送信データ、RINは受信
データを示す。
A selector 24 selects one of the outputs of the blocks 21a, 21b, 21c, 21d based on the output of the counter 23. A P / S 25 converts the output of the selector 24 from a parallel signal to a serial signal. converter,
26 is the output of the counter 23, the sampling clock CL
This is a flag decoder that creates a status flag indicating the state of the ring buffer 21 based on KA, the bit transmission clock CLKB, and the like. As the status flag, a flag indicating "FULL" when data is written from the block at the stage specified in the ring buffer 21 to the block at the last stage, and a flag indicating "EMP" when data is read are used. . Reference numeral 27 denotes a tri-state buffer for the DSP 1 to read the flag generated by the flag decoder 26.
NCS is chip select, RD is read signal, W
T indicates a write signal, SOUT indicates transmission data, and RIN indicates reception data.

【0016】図3に示すS/P変換部は受信データを取
り扱う。31は受信データのリングバッファであり、D
SP1によって読み出されるデータが書き込まれる。リ
ングバッファ31は複数段のブロックからなり、各ブロ
ックは8ビットで構成されている。本実施例では31
a,31b,31c,31dの4段のブロックから構成
されている。各ブロック31a〜31dはa〜dの順序
で使用するようになっており、さらにdからaの順にも
使用できる。本実施例ではDSP1の1回での処理容量
に合わせて、a〜dのいずれかのブロックから使用を開
始するようにする。32はリングバッファ31のどの段
のブロックから使うかを示すデータを格納するバッファ
で、DSP1によって書き込まれる。33はカウンタと
デコーダであり、カウンタはバッファ32のデータを基
にサンプリングクロックCLKAとビット受信クロック
CLKB等によって動作し、この出力結果をデコードし
てリングバッファ31とフラグデコーダ35に出力す
る。カウンタの出力により受信データをどの段のブロッ
クから書き込んでゆくかが指示される。34は受信デー
タをシリアル信号からパラレル信号に変換し、リングバ
ッファ31へ出力するS/P変換器である。35はカウ
ンタ、デコーダの出力とサンプリングクロックCLK
A,ビット受信クロックCLKB等により、リングバッ
ファ31の「FULL」、または「EMP」等のステー
タスフラグを作るフラグデコーダ、36はフラグデコー
ダ35で作られたフラグデータをDSP1が読むための
トライステートバッファである。
The S / P converter shown in FIG. 3 handles received data. 31 is a ring buffer for received data,
Data read by SP1 is written. The ring buffer 31 is composed of a plurality of blocks, each block being composed of 8 bits. In this embodiment, 31
a, 31b, 31c, and 31d. The blocks 31a to 31d are used in the order of a to d, and can be used in the order of d to a. In the present embodiment, use is started from one of the blocks a to d in accordance with the processing capacity of the DSP 1 at one time. Reference numeral 32 denotes a buffer for storing data indicating which block of the ring buffer 31 to use, and is written by the DSP 1. Reference numeral 33 denotes a counter and a decoder. The counter operates based on the data of the buffer 32 by the sampling clock CLKA and the bit reception clock CLKB, etc., decodes the output result and outputs the result to the ring buffer 31 and the flag decoder 35. The output of the counter indicates from which block the received data is to be written. Reference numeral 34 denotes an S / P converter that converts received data from a serial signal to a parallel signal and outputs the converted signal to the ring buffer 31. 35 is a counter, decoder output and sampling clock CLK
A, a flag decoder that creates a status flag such as “FULL” or “EMP” of the ring buffer 31 in response to the bit reception clock CLKB, etc., and a tri-state buffer 36 for the DSP 1 to read the flag data created by the flag decoder 35 It is.

【0017】図4はサンプリングクロックCLKAとビ
ット送信クロックCLKBを説明する図である。サンプ
リングクロックCLKAは音声信号をサンプリングする
周期を有するクロックで、ビット送信クロックCLKB
はサンプリングした音声を例えば8ビットで表示した場
合、このビットを送出するクロックである。
FIG. 4 is a diagram for explaining the sampling clock CLKA and the bit transmission clock CLKB. The sampling clock CLKA is a clock having a period for sampling the audio signal, and the bit transmission clock CLKB
Is a clock for transmitting this bit when the sampled audio is displayed in, for example, 8 bits.

【0018】以上のように構成されたP/S変換部2、
S/P変換部3の動作について説明する。まず図2に示
すP/S変換部2によるデータ送信について説明する。
DSP1は、1回で処理するデータ容量に基づき、使用
するブロック数を定める。1回で3バイトのデータを処
理するとすると、リングバッファ21の3ブロック使用
する。バッファ22にはDSP1が値(0〜3HEX)
を書き込むが、3ブロックを使用する場合は1HEX
(16進数)を書き込む。リセットを解除して動作を開
始するとサンプリングクロックCLKAによりカウンタ
23がバッファ22に格納された値を読み出し、この値
およびこれに1を加算するごとに出力する。カウンタ2
3の出力値はリングバッファ21のブロックの段の位置
を示す。例えば0を出力すればブロック21aから使う
ことを示し、1を出力すればブロック21bから使うこ
とを示す。カウンタ23の出力はセレクタ24に入力さ
れ、セレクタ24はこの入力値に基づきブロックを選択
し、P/S変換器25へ出力する。カウンタ23の値は
サンプリングクロックCLKAにより3HEXまでカウ
ントすると、次のサンプリングクロックCLKAでは再
びバッファ22の格納値を読み出し、この値を出力し、
以下サンプリングクロックCLKAごとに1を加算した
値を出力する。つまりカウンタ23がバッファ22から
1を読み込むとすると、セレクタ24はリングバッファ
21の出力21b,21c,21d,21b,21c,
21dというように順番に選んでP/S変換器25へ出
力する。
The P / S converter 2 configured as described above,
The operation of the S / P converter 3 will be described. First, data transmission by the P / S converter 2 shown in FIG. 2 will be described.
The DSP 1 determines the number of blocks to be used based on the amount of data processed at one time. If three bytes of data are processed at one time, three blocks of the ring buffer 21 are used. The value of DSP1 is stored in the buffer 22 (0 to 3HEX).
Is written, but if 3 blocks are used, 1HEX
(Hexadecimal number) is written. When the reset is released and the operation is started, the counter 23 reads the value stored in the buffer 22 by the sampling clock CLKA, and outputs this value and every time 1 is added thereto. Counter 2
The output value of 3 indicates the position of the block of the ring buffer 21. For example, when 0 is output, it is used from the block 21a, and when 1 is output, it is used from the block 21b. The output of the counter 23 is input to the selector 24, which selects a block based on the input value and outputs the selected block to the P / S converter 25. When the value of the counter 23 is counted up to 3HEX by the sampling clock CLKA, the value stored in the buffer 22 is read out again at the next sampling clock CLKA, and this value is output.
Hereinafter, a value obtained by adding 1 is output for each sampling clock CLKA. That is, assuming that the counter 23 reads 1 from the buffer 22, the selector 24 outputs the outputs 21b, 21c, 21d, 21b, 21c of the ring buffer 21.
21d and output to the P / S converter 25 in order.

【0019】また、フラグデコーダ26ではカウンタ2
3の出力とサンプリングクロックCLKAおよびビット
送信クロックCLKB等より、リングバッファ21のデ
ータの読み出し状態をDSP1に読ませるためのステー
タスフラグを作って出力し、トライステートバッファ2
7によりDSP1のバスへドライブされる。このステー
タスフラグはリングバッファ21の最終段ブロック21
dの状態に基づき作成される。つまりブロック21dの
データがセレクタ24により読み出されれば、ブロック
21b〜21dのデータは全て読み出されたことにな
る。リングバッファ21のブロックを何段使用するか決
めるのに、使用を開始する段のブロックを決め、最終段
まで使用することにしているため、このように最終段の
チェックのみでステータスフラグの作成が可能となる。
In the flag decoder 26, the counter 2
3, a status flag for causing the DSP 1 to read the data read state of the ring buffer 21 is output from the sampling clock CLKA and the bit transmission clock CLKB, etc.
7 to the bus of DSP1. This status flag is stored in the last block 21 of the ring buffer 21.
It is created based on the state of d. That is, if the data of the block 21d is read by the selector 24, it means that all the data of the blocks 21b to 21d have been read. To decide how many blocks of the ring buffer 21 are to be used, the block of the stage to be used is decided and used until the last stage. Thus, the status flag can be created only by checking the last stage. It becomes possible.

【0020】次に図3に示すS/P変換部3によるデー
タ受信時の動作について説明する。送信時と同様にまず
DSP1が1回で処理するデータ容量を決める。この値
が4バイトであるとするとリングバッファ31を4ブロ
ック使用する。バッファ32には0HEX(16進数)
を書き込む。カウンタデコーダ33がサンプリングクロ
ックCLKAにより読み込んだ値0を出力し、次に1,
2,3を出力すると、再びバッファ32から0を読み込
み、0,1,2,3と出力する。これによりリングバッ
ファ31には31a,31b,31c,31d,31
a,31b,31c,31dというように順番に受信デ
ータが取り込まれる。一方S/P変換器34で変換され
た受信データは、リングバッファ31の全てのブロック
に向かっているので、取り込むか否かはカウンタ33の
出力によって決まる。また、フラグデコーダ35ではカ
ウンタデコーダ33の出力、サンプリングクロックCL
KA、ビット受信クロックCLKB等により、リングバ
ッファ31の使用状況を示すステータスフラグを作り、
トライステートバッファ36によりDSP1のバスへド
ライブされる。フラグデコーダ35はリングバッファ3
1の最終段ブロック31dにS/P変換器34からの受
信データが読み込まれたとき、リングバッファ31の全
てのブロックに受信データが読み込まれたとするステー
タスフラグを作成する。
Next, the operation of the S / P converter 3 shown in FIG. 3 when receiving data will be described. As in the case of the transmission, the DSP 1 first determines the data capacity to be processed at one time. Assuming that this value is 4 bytes, the ring buffer 31 uses 4 blocks. 0HEX (hexadecimal) in buffer 32
Write. The counter decoder 33 outputs the value 0 read by the sampling clock CLKA,
When 2, 3 are output, 0 is read from the buffer 32 again and output as 0, 1, 2, 3. Thereby, 31a, 31b, 31c, 31d, 31 are stored in the ring buffer 31.
The received data is taken in order as a, 31b, 31c, 31d. On the other hand, the received data converted by the S / P converter 34 is directed to all the blocks of the ring buffer 31, so whether or not to take in the data is determined by the output of the counter 33. In the flag decoder 35, the output of the counter decoder 33, the sampling clock CL
A status flag indicating the use status of the ring buffer 31 is created by KA, the bit reception clock CLKB, etc.
Driven to the bus of DSP1 by tristate buffer 36. The flag decoder 35 is the ring buffer 3
When the received data from the S / P converter 34 is read into the first final block 31d, a status flag is created that indicates that the received data has been read into all the blocks of the ring buffer 31.

【0021】以上の実施例はリングバッファ21,31
がいずれも4ブロックより構成されているものとして説
明したが、この数が変化しても同様な動作が可能であ
る。
In the above embodiment, the ring buffers 21 and 31 are used.
Has been described as being composed of four blocks, but the same operation is possible even if this number changes.

【0022】[0022]

【発明の効果】以上の説明より明らかなように、本発明
は、複数段のブロックからなるリングバッファを有し、
DSPが1回で処理する容量に合わせてバッファを使用
するように設定できる。これによりDSPは送信側、受
信側バッファの容量を別々に設定することも可能とな
り、使用する容量に応じて任意に設定できるので使いや
すく、汎用性があるバッファを得ることができる。また
使用するバッファの容量を決定する際、使用する最初の
段のブロックを設定し、そのブロックから順に最終ブロ
ックまで使用することにより、最終段のブロックの使用
状態を調べれば、リングバッファの使用状態がわかるの
で、これを表すステータスフラグを作る回路が単純とな
る。
As is clear from the above description, the present invention has a ring buffer composed of a plurality of blocks,
The buffer can be set so as to be used in accordance with the capacity processed by the DSP at one time. This makes it possible for the DSP to separately set the capacity of the buffer on the transmission side and the capacity of the buffer on the reception side, and it is possible to arbitrarily set the capacity according to the capacity to be used. Also, when determining the capacity of the buffer to be used, set the first stage block to be used and use it from the block to the last block to check the usage status of the last stage block. Therefore, a circuit for creating a status flag indicating this can be simplified.

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

【図1】実施例のDSPの送受信データ処理回路を示す
FIG. 1 is a diagram showing a transmission / reception data processing circuit of a DSP according to an embodiment;

【図2】データ送信を行うパラレル/シリアル変換部の
詳細を示すブロック図
FIG. 2 is a block diagram illustrating details of a parallel / serial conversion unit that performs data transmission;

【図3】データ受信を行うシリアル/パラレル変換部の
詳細を示すブロック図
FIG. 3 is a block diagram illustrating details of a serial / parallel conversion unit that performs data reception;

【図4】サンプリングクロックCLKAとビット送信ク
ロックCLKBを説明する図
FIG. 4 is a diagram illustrating a sampling clock CLKA and a bit transmission clock CLKB.

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

1 DSP 2 パラレル/シリアル変換部 3 シリアル/パラレル変換部 21 リングバッファ 22 バッファ 23 カウンタ 24 セレクタ 25 P/S変換器 26 フラグデコーダ 27 トライステートバッファ 31 リングバッファ 32 バッファ 33 カウンタデコーダ 34 S/P変換器 35 フラグデコーダ 1 DSP 2 parallel / serial converter 3 serial / parallel converter 21 ring buffer 22 buffer 23 counter 24 selector 25 P / S converter 26 flag decoder 27 tri-state buffer 31 ring buffer 32 buffer 33 counter decoder 34 S / P converter 35 Flag Decoder

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平2−155059(JP,A) 特開 昭54−124644(JP,A) 特開 平7−21121(JP,A) 特開 平8−79310(JP,A) 特開 平4−222985(JP,A) 特開 平1−233514(JP,A) 特開 平6−131256(JP,A) 特開 平3−214992(JP,A) 実開 昭57−123536(JP,U) (58)調査した分野(Int.Cl.7,DB名) G06F 5/06 G06F 13/38 G11C 7/00 H04L 13/08 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-2-155059 (JP, A) JP-A-54-124644 (JP, A) JP-A-7-21121 (JP, A) JP-A 8- 79310 (JP, A) JP-A-4-222985 (JP, A) JP-A-1-233514 (JP, A) JP-A-6-131256 (JP, A) JP-A-3-2194992 (JP, A) 57-123536 (JP, U) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 5/06 G06F 13/38 G11C 7/00 H04L 13/08

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 所定ビット単位のブロックを複数有し、
各ブロックは所定の順序付けがなされているバッファ
と、1回で処理するデータ容量に応じて使用ブロック数
を定め、且つ最初に読み出す先頭ブロックを指示する制
御手段と、前記指示された先頭ブロックから前記所定の
順序に基づいて前記使用ブロック数だけブロックを選択
し、該選択ブロックのデータを出力するセレクタと、前
記バッファの最後段ブロックの読み出し状態に応じて読
み出し状態のフラグを作成するフラグ手段とを具備し、
前記バッファの最後段ブロックが最後のブロックとなる
ように前記先頭ブロックの位置を決め、前記制御手段は
前記フラグから最後段ブロックの読み出し完了を認識し
たら前記先頭ブロックから次のデータの読み出しを行う
ことを特徴とするデータ処理装置。
A plurality of blocks each having a predetermined bit unit;
Each block is a buffer having a predetermined order, a number of blocks to be used is determined in accordance with a data capacity to be processed at one time, and control means for designating a head block to be read first, and A selector for selecting blocks by the number of used blocks based on a predetermined order and outputting data of the selected block; and a flag means for creating a read state flag in accordance with a read state of the last block of the buffer. Have,
The position of the first block is determined so that the last block of the buffer is the last block, and the control means reads the next data from the first block when recognizing completion of reading of the last block from the flag. A data processing device characterized by the above-mentioned.
【請求項2】 所定ビット単位のブロックを複数有し、
各ブロックは所定の順序付けがなされているバッファ
と、1回で処理するデータ容量に応じて使用ブロック数
を定め、且つ最初に書き込む先頭ブロックを指示する制
御手段と、前記指示された先頭ブロックから前記所定の
順序に基づいて前記使用ブロック数だけブロックを選択
し、入力データを書き込ませる書込指示手段と、前記バ
ッファの最後段ブロックの書き込み状態に応じて書き込
み状態のフラグを作成するフラグ手段とを具備し、前記
バッファの最後段ブロックが最後のブロックとなるよう
に前記先頭ブロックの位置を決め、前記制御手段は前記
フラグから最後段ブロックの書き込み完了を認識したら
前記先頭ブロックから次の入力データの書き込みを行う
ことを特徴とするデータ処理装置。
2. It has a plurality of blocks of a predetermined bit unit,
Each block has a predetermined ordering buffer, the number of blocks to be used is determined according to the data capacity to be processed at one time, and control means for designating a first block to be written first, and Write instruction means for selecting blocks by the number of used blocks based on a predetermined order and writing input data, and flag means for creating a write state flag according to the write state of the last block of the buffer. When the position of the first block is determined so that the last block of the buffer is the last block, and the control means recognizes the completion of writing of the last block from the flag, the next input data of the next block is read from the first block. A data processing device for performing writing.
JP12472295A 1995-05-24 1995-05-24 Data processing device Expired - Fee Related JP3359987B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12472295A JP3359987B2 (en) 1995-05-24 1995-05-24 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12472295A JP3359987B2 (en) 1995-05-24 1995-05-24 Data processing device

Publications (2)

Publication Number Publication Date
JPH08320779A JPH08320779A (en) 1996-12-03
JP3359987B2 true JP3359987B2 (en) 2002-12-24

Family

ID=14892492

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12472295A Expired - Fee Related JP3359987B2 (en) 1995-05-24 1995-05-24 Data processing device

Country Status (1)

Country Link
JP (1) JP3359987B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001005721A (en) * 1999-06-17 2001-01-12 Nec Ic Microcomput Syst Ltd Method for filter processing by securing memory for ring buffer by dsp and its filter processing system

Also Published As

Publication number Publication date
JPH08320779A (en) 1996-12-03

Similar Documents

Publication Publication Date Title
US7130952B2 (en) Data transmit method and data transmit apparatus
JPH04107070A (en) Encoding and decoding device
KR960005751B1 (en) Data in-/out-put circuit
US5079984A (en) MIDI signal processor
JP3359987B2 (en) Data processing device
JP3461483B2 (en) Data transfer method and device
EP0338564A2 (en) Microprogram branching method and microsequencer employing the method
JP3765273B2 (en) Shift register
US5590371A (en) Serial communication circuit on an LSI chip and communicating with another microcomputer on the chip
US5233695A (en) Microprocessor with a reduced size microprogram
US5748984A (en) Ad converting apparatus including holding means indicating whether or not data after AD conversion has been previously used
US5099446A (en) Data transfer apparatus and data transfer system
KR100200567B1 (en) Matching method between tdna and processor of tnif
JP2907165B2 (en) Logic synthesis system
JP2573746B2 (en) Data compression device
JP2555171B2 (en) Bit judgment method
US5479165A (en) Two-dimensional coding apparatus
JP2518387B2 (en) Serial data transmission circuit
JP2555882B2 (en) Signal processor
JP2002050172A (en) Fifo control circuit
JPS6288031A (en) Register filing system
JP3384213B2 (en) Memory access device
KR19980027537A (en) Micom interface device
JP2532092B2 (en) State holding circuit scanning method
JPH0410044A (en) Data transfer circuit and cd-rom drive containing this data transfer circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees