JP2004178122A - Processor system with direct memory access data transfer function - Google Patents

Processor system with direct memory access data transfer function Download PDF

Info

Publication number
JP2004178122A
JP2004178122A JP2002341665A JP2002341665A JP2004178122A JP 2004178122 A JP2004178122 A JP 2004178122A JP 2002341665 A JP2002341665 A JP 2002341665A JP 2002341665 A JP2002341665 A JP 2002341665A JP 2004178122 A JP2004178122 A JP 2004178122A
Authority
JP
Japan
Prior art keywords
input
data
output device
memory access
direct memory
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
JP2002341665A
Other languages
Japanese (ja)
Inventor
Keimei Nakada
啓明 中田
Kazuhiko Tanaka
和彦 田中
Atsuo Kawaguchi
敦生 川口
Taku Tashiro
卓 田代
Kiyokazu Nishioka
清和 西岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2002341665A priority Critical patent/JP2004178122A/en
Publication of JP2004178122A publication Critical patent/JP2004178122A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a direct memory access data transfer function capable of disposing, in the detection of a data receiving error in an input and output device in a processor system with data transfer function by direct memory access, only the data with the error without stopping the data transfer from the input and output device or performing an interruption processing by a processor. <P>SOLUTION: In the data transfer between the input and output device and a memory by direct memory access, the data received by the input and output device is paired with the state of the input and output device in the input and output device or a direct memory access control device, and transferred to the memory. Accordingly, the interruption processing from the processor can be eliminated while suppressing the deterioration of input and output processing function. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、ダイレクトメモリアクセス転送機能付プロセッサシステムに関する。
【0002】
【従来の技術】
入出力装置とデータ転送を行う場合、入出力装置のデータ転送速度に対応する為や、プロセッサ処理能力の消費を抑制する為に、ダイレクトメモリアクセス(DMA)制御装置を用いたデータ転送が各種プロセッサシステムで利用されている。このような従来技術の例として特許文献1に示された装置がある。この例では、通信用チップがデータを受信した際に、DMA転送を用いている。
【0003】
【特許文献1】
特開平9−114771号公報
【0004】
【発明が解決しようとする課題】
DMA転送により入出力装置からデータを入力する際に、入出力装置内でエラーを検出した場合、エラーを適切に処理するために、割り込み処理やデータ入力中止が必要となることがある。特許文献1に示された装置では、エラーが発生した場合には、割り込み処理を用いている。割り込み処理やデータ入力中止を行わない場合には、プロセッサが入出力装置のエラー検出情報を確認しエラーを検出した時点で、基本的には最後にプロセッサがエラー発生状況を確認し、エラーが無いことを確認した以降に入力したデータ全てを破棄する必要がある。
【0005】
したがって、エラー発生時に破棄する入力データ量を極力抑える為には、割り込み処理を用いるか、入出力装置でのデータ受信を停止するか、あるいはプロセッサが頻繁に入出力装置のエラー検出情報を確認する必要がある。
【0006】
しかしデータ受信を停止する方法では、プロセッサがエラーを検出し転送を再開するまでデータ送信側から入出力装置への通信が途絶え、データ送信側の制御が困難である場合は、データ送信側からのデータを取りこぼすことになる。プロセッサが頻繁に入出力装置を確認する方法では、プロセッサへの負担が大きい。割り込み処理を用いる方法は、プロセッサでリアルタイム処理を行っている場合に、実行時間に対する影響の予測が難しく、極力避けたい場合がある。特に、命令キャッシュメモリを持つプロセッサでは、割り込み発生時に割り込み処理プログラムにより命令キャッシュメモリの内容が一部置き換えられることから、本来実行しているプログラムの実行時間に与える影響も大きくなり、この要求も大きくなる。
【0007】
入出力装置でのデータ受信を停止せず、プロセッサへの負担も抑えながら、エラーの発生したデータのみ、あるいはエラーの発生したデータとその周辺のデータのみ破棄可能なDMA転送手段を持つシステムを提供するのが、この発明が解決しようとする課題である。
【0008】
【課題を解決するための手段】
DMA転送により入出力装置の受信データをメモリへ転送する際、入出力装置側で受信データと入出力装置のステータスを組で準備し、この組をDMA転送する。あるいは、DMA制御装置が入出力装置からデータを読み出す際に、入出力装置の受信データとステータスを個別に読み出し、DMA制御装置がそれらを組み合わせてから、メモリへ書き込む。
【0009】
プロセッサは、DMA転送により入出力装置からメモリに書き込まれた受信データを処理する際に、その受信データと組になる入出力装置のステータスを確認し、エラーを検出した場合には、エラーに関係するデータについて、エラー回復処理を行う。
【0010】
【発明の実施の形態】
図1を用いて、第1の実施の形態を説明する。バス600には入出力装置100、DMA制御装置200、プロセッサ300、メモリインタフェース400が接続してある。メモリ500はメモリインタフェース400を介してバス600に接続されており、データの格納やプロセッサ300が実行するプログラムコードの格納に利用する。DMA転送により入出力装置100から転送するデータも、メモリ500に格納する。
【0011】
入出力装置100の内部には、バス600に接続する為のバスインタフェース110、DMA転送するデータを一時格納しておくデータバッファ120、入出力装置の制御を行う制御装置130、入出力装置100の受信データを内部形式データに変換する受信側フォーマット変換装置140、内部形式データを入出力装置100からの送信データに変換する送信側フォーマット変換装置150がある。例えば入出力装置100がシリアルインタフェースである場合、受信側フォーマット変換装置140はシリアル−パラレル変換器、送信側フォーマット変換装置150はパラレル−シリアル変換器である。
【0012】
データバッファ120には入出力装置100の制御装置130が検出したエラー情報等のステータス121と受信側フォーマット変換装置140経由で入力したデータ122を格納する。データバッファ120が複数のエントリを持つ場合には、各エントリがステータス121とデータ122を組にして保持する。
【0013】
DMA転送で入出力装置100から受信データをメモリ500に転送する場合、まず入出力装置100及びDMA制御装置200をプロセッサ300により初期設定する。外部装置900より入出力装置100にデータが受信され、データバッファ120にデータ122を格納すると、その時点での制御装置130のステータス121もデータバッファ120に格納する。一度データバッファ120に格納した後は、データ122とステータス121を組にして取り扱う。
【0014】
バスインタフェース110はデータバッファ120にデータ122とステータス121の組が格納されたことを検出すると、DMA制御装置200にDMA転送要求を出す。DMA制御装置200はDMA転送要求を入出力装置100より受け取ると、バス600経由で入出力装置100のアクセスを行い、データバッファ120に格納されているデータ120とステータス121の組を読み出す。この後、DMA制御装置200はメモリインタフェース400に対して、バス600経由で読み出したデータとステータスの組を1個のデータとしてメモリに書き込む要求を出す。この際、DMA制御装置200はデータを書き込むアドレスもメモリインタフェース400に指示する。
【0015】
DMA制御装置200はメモリ500へのデータ書き込み指示をメモリインタフェース400に出した後、データを書き込むアドレスを更新する。
【0016】
入出力装置100がシリアルインタフェースであると仮定し、図2で示すフレーム構造を単位とした通信を外部装置900と行うことを例としてDMA転送動作を説明する。
【0017】
図2に示すフレームの先頭には16進数でA5Hが3バイトスタートコード1200として存在し、その後にデータ0(1401)からデータ31(1432)まで合計32バイトのデータが続く。さらに1バイトのCRC1211コードが付加してある。また、フレーム内のデータでA5Hが3バイト以上連続する場合、2連続毎に16進数で00Hが挿入し、データ部分とスタートコード1200の識別を可能とする。CRC1211の値についても、A5Hとなる場合には、最上位ビットを反転し、25Hとする。
【0018】
入出力装置100が図2に示すフレームを受信すると、バイト毎に受信側フォーマット変換装置140でシリアル−パラレル変換が行われ、変換結果をデータバッファ120に格納する。同時に受信側フォーマット変換装置140は通信エラー検出を行い、検出結果は制御装置130経由でデータバッファ120にステータス121として格納する。データバッファ120に1バイト分のデータ122及びステータス121が格納されると、バスインタフェース110はDMA制御装置200にDMA転送要求を出す。
【0019】
DMA制御装置200はDMA転送要求を受け取ると、バス600及びバスインタフェース110経由でデータバッファ120より、ステータス121とデータ122の組を読み出す。
【0020】
DMA制御装置200はステータス121とデータ122の組を読み出すと、次にその組をバス600及びメモリインタフェース400経由でメモリ500に書き込む。
【0021】
あるフレーム全体の入力が完了し、メモリ500へのDMA転送が完了した際のメモリ500内のデータ書き込み状態を、図3を用いて説明する。
【0022】
オフセットアドレス+00から+05までの6バイトには、フレームのスタートコード1200の1バイト目(1201)とそれに対応するステータスS0(1301)、2バイト目(1202)とそれに対応するステータスS1(1302)、3バイト目(1203)とそれに対応するステータスS2(1303)が格納される。
【0023】
オフセットアドレス+06から+69までの64バイトには、フレームのデータ1400が、データ0(1401)とそれに対応するステータス0(1501)から順にデータ31(1432)とそれに対応するステータス31(1532)まで格納される。
【0024】
オフセットアドレス+70から+71までの2バイトには、データ0からデータ31までのCRC(1211)とそのステータス(1311)が格納される。
【0025】
図4に示すような複数のフレームを入出力装置100が受信した場合、各フレームは図5に示すようにメモリ500に格納される。すなわち、入出力装置100がフレームを受信した順に従って、メモリ500に連続して格納される。但し、DMA転送領域はリングバッファとして取り扱うため、入出力装置100からのDMA転送領域として割り当てたメモリ領域を超えた場合には、DMA転送領域の先頭に戻ってデータの格納を継続する。
【0026】
プロセッサ300は、入出力装置100が受信したデータを処理する際には、メモリ500に入出力装置100からのDMA転送用として用意した領域が溢れない頻度で、メモリ500に格納されたデータの処理を行う。例えば、メモリ500に10フレーム分の格納領域を用意した場合、8フレーム程度の入力に要する時間間隔で、メモリ500に格納されたデータの処理を行う。
【0027】
プロセッサ300はメモリ500に格納された受信データ処理を行う際に、その受信データに対応するステータスの確認を行い、エラー検出する。
【0028】
プロセッサ300はエラーを検出した場合、現在処理中のフレームを破棄し、外部装置900にデータ再送要求を出す等のエラー処理を行うとともに、次のフレームの開始を検索する。
【0029】
次のフレームの開始位置検索はスタートコード1200のバイト列を発見することにより行う。したがって、入力データを失ってフレームのバイト長が正常なフレームと異なっても、次のフレームを検出可能である。
【0030】
次のフレームの開始位置検索を行う際、現在処理中のフレームのスタートコード1200内にエラーを検出した場合には、スタートコード1200の先頭からスタートコード1200の長さ分だけ跳ばしたところから検索を行う。データ1400またはCRC1211にエラーが存在する場合には、その次のバイトから検索を行う。
【0031】
以上の方法を用いることで、複数のフレームデータがメモリ500に格納された段階で、プロセッサ300がまとめて処理を行う場合に、あるフレームにエラーが存在しても、正常なフレームについては通常処理が可能である。すなわち、DMA転送時にも入力時にエラーを起こしたフレームやデータの位置を特定できる為、エラー処理を行う際に、エラーを起こした個所のみ破棄することが可能となる。
【0032】
第2の実施の形態として、図1に示したDMA制御装置200の代わりに図7に示す別のDMA制御装置2200を用い、図1に示した入出力装置100の代わりに図6に示す別の入出力装置2100を用いる方法を、図6及び図7を用いて説明する。第2の実施の形態でも、DMA制御装置と入出力装置が異なる以外は、図1と同じシステムの構成をとる。
【0033】
図6に示す入出力装置2100は、入出力装置100とは異なり、ステータス121とデータ122を組にするデータバッファ120が存在しない。
【0034】
図7のDMA制御装置2200には、転送先アドレスを保持する1個の転送先アドレスレジスタ2220に対して、転送元アドレスを保持する転送元アドレスレジスタA2225と転送元アドレスレジスタB2226が存在する。
【0035】
DMA制御装置2200がDMA転送を行う際には、予めプロセッサ300により転送元アドレスレジスタAに入出力装置2100のステータスを読み出す為のアドレスを設定し、転送元アドレスレジスタBに入出力装置2100から受信データを読み出す為のアドレスを設定する。転送先アドレスレジスタ2220には、DMA転送したデータの格納に割り当てた領域の開始アドレスを設定する。
【0036】
DMA制御装置2200は入出力装置2100よりDMA転送要求信号を受け取ると、制御装置2240は選択器2230を制御して、転送元アドレスレジスタA2225が保持するアドレスをバスインタフェース2260に供給する。バスインタフェースは制御装置2240の指示に従い、バス600を介して転送元アドレスレジスタA2225が保持するアドレスからデータを読み出し、バッファA2255に格納する。すなわち、入出力装置2100のステータスをバッファA2255に格納する。
【0037】
次に制御装置2240は選択器2230を制御して、転送元アドレスレジスタB2226が保持するアドレスをバスインタフェース2260に供給する。バスインタフェースは制御装置2240の指示に従い、バス600を介して転送元アドレスレジスタB2226が保持するアドレスからデータを読み出し、バッファB2256に格納する。すなわち、入出力装置2100の受信データをバッファB2256に格納する。
【0038】
以上の過程により、バッファ2250には入出力装置2100のステータスと受信データの組が格納される。
【0039】
次に制御装置2240は選択器2230を制御して、転送先アドレスレジスタ2220が保持するアドレスをバスインタフェース2260に供給する。バスインタフェースは制御装置2240の指示に従い、バス600を介してバッファ2250において組となったデータを転送先アドレスレジスタ2220が保持するアドレスへ書き込む。すなわち、入出力装置2100のステータスと受信データが組となる状態でメモリ500に書き込む。
【0040】
最後に、次アドレス生成器2210で次にメモリ500にバッファ2250の内容を書き込むアドレスを算出し、算出結果を転送先アドレスレジスタ2220に書き込む。
【0041】
以上の処理により、第2の実施の形態でも第1の実施の形態と同様の内容をメモリ500に格納することが可能である。したがって、エラー処理では第1の実施の形態と同じ方法が利用可能である。
【0042】
第1及び第2の実施の形態で、入出力装置には外部装置が接続してあるが、システムが複数のブロックにより構成される場合、各ブロックに入出力装置に相当する機能が存在し、ブロック間で入出力装置に相当する機能を介して通信を行うことも考えられる。
【0043】
【発明の効果】
DMA転送時にも入出力装置で入力時にエラーを起こしたフレームやデータの位置を特定できる。この結果、DMA転送時に入出力装置で入力エラーを検出した際に、入出力装置の入力動作を停止したり、プロセッサによる割り込み処理を行ったりすること無しに、エラーを起こした個所のみ破棄することが可能となる。したがって、入出力処理機能の低下を抑制しながら、プロセッサから割り込み処理を排除することを可能とする。特に命令キャッシュを持つプロセッサでは、割り込み処理による命令キャッシュの汚染が避けられるため、実行速度の向上が望め、かつリアルタイム処理における実行時間の予測が容易になる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態に係るブロック図である。
【図2】入出力装置に入力する信号のフレーム構成例を示す図である。
【図3】図2に示すフレーム構成例を入出力装置が受信しDMA転送が行われた際のメモリへのデータ格納状態を示す図である。
【図4】図2に示すフレームを連続して入出力装置に入力する例である。
【図5】図4に示すフレームの連続を入出力装置が受信しDMA転送が行われた際のメモリへのデータ格納状態を示す図である。
【図6】本発明の第2の実施の形態に係る入出力装置のブロック図である。
【図7】本発明の第2の実施の形態に係るDMA制御装置のブロック図である。
【符号の説明】
100…第1の実施の形態で用いる入出力装置、110…第1の入出力装置のバスインタフェース、120…第1の入出力装置のデータバッファ、121…受信データに対応する第1の入出力装置のステータス、122…第1の入出力装置の受信データ、130…第1の入出力装置の制御装置、140…第1の入出力装置の受信側フォーマット変換装置、150…第1の入出力装置の送信側フォーマット変換装置、200…第1の実施の形態で用いるダイレクトメモリアクセス(DMA)制御装置、300…プロセッサ、400…メモリインタフェース、500…メモリ、600…バス、900…外部装置、1200…フレームの例を構成するスタートコード、1201、1202、1203…スタートコードの構成バイト、1211…フレームの例を構成するCRCバイト、1400…フレームの例を構成するデータ、1401、1402、1432…データの構成バイト、1301、1302、1303…スタートコードの構成バイトに対応するステータス、1311…CRCバイトに対応するステータス、1501、1502、1532…データの構成バイトに対応するステータス、1600、1601、1602、1605、1606、1607…フレーム列の例の構成フレーム、2100…第2の実施の形態で用いる入出力装置、2110…第2の入出力装置のバスインタフェース、2130…第2の入出力装置の制御装置、2140…第2の入出力装置の受信側フォーマット変換装置、2150…第2の入出力装置の送信側フォーマット変換装置、2200…第2の実施の形態で用いるダイレクトメモリアクセス(DMA)制御装置、2210…第2のDMA制御装置の次アドレス生成器、2220…第2のDMA制御装置の転送先アドレスレジスタ、2225…第2のDMA制御装置の転送元アドレスレジスタA、2226…第2のDMA制御装置の転送元アドレスレジスタB、2230…第2のDMA制御装置の選択器、2240…第2のDMA制御装置の制御装置、2250…第2のDMA制御装置のバッファ、2255…第2のDMA制御装置のバッファA、2256…第2のDMA制御装置のバッファB、2260…第2のDMA制御装置のバスインタフェース。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a processor system with a direct memory access transfer function.
[0002]
[Prior art]
When performing data transfer with an input / output device, data transfer using a direct memory access (DMA) controller is performed by various processors in order to support the data transfer speed of the input / output device and to suppress consumption of processor processing power. Used in the system. As an example of such a conventional technique, there is an apparatus disclosed in Patent Document 1. In this example, when the communication chip receives data, DMA transfer is used.
[0003]
[Patent Document 1]
Japanese Patent Application Laid-Open No. Hei 9-114771
[Problems to be solved by the invention]
When an error is detected in the input / output device when data is input from the input / output device by the DMA transfer, an interrupt process or data input stop may be necessary in order to appropriately handle the error. In the device disclosed in Patent Document 1, when an error occurs, an interrupt process is used. When interrupt processing and data input stop are not performed, when the processor checks the error detection information of the input / output device and detects an error, the processor basically checks the error occurrence status at the end and there is no error It is necessary to discard all the data entered after confirming that
[0005]
Therefore, in order to minimize the amount of input data to be discarded when an error occurs, interrupt processing is used, data reception by the input / output device is stopped, or the processor frequently checks error detection information of the input / output device. There is a need.
[0006]
However, in the method of stopping data reception, if communication from the data transmission side to the input / output device is interrupted until the processor detects an error and restarts the transfer, and it is difficult to control the data transmission side, the data transmission side will not transmit the data. Data will be missed. The method in which the processor frequently checks the input / output device places a heavy burden on the processor. In the method using interrupt processing, when real-time processing is performed by a processor, it is difficult to predict the effect on the execution time, and there are cases where it is desired to avoid the processing as much as possible. In particular, in a processor having an instruction cache memory, when an interrupt occurs, the contents of the instruction cache memory are partially replaced by the interrupt processing program. Become.
[0007]
Provided is a system having a DMA transfer means capable of discarding only the data in which an error has occurred, or only the data in which the error has occurred and data in the vicinity thereof, without stopping the data reception in the input / output device and suppressing the load on the processor. That is the problem to be solved by the present invention.
[0008]
[Means for Solving the Problems]
When transferring received data of the input / output device to the memory by DMA transfer, the input / output device prepares a set of the received data and the status of the input / output device, and transfers the set by DMA. Alternatively, when the DMA control device reads data from the input / output device, the received data and the status of the input / output device are individually read, and the DMA control device combines them and writes the data into the memory.
[0009]
The processor checks the status of the input / output device paired with the received data when processing the received data written from the input / output device to the memory by the DMA transfer. Error recovery processing is performed on the data to be processed.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
The first embodiment will be described with reference to FIG. The input / output device 100, the DMA control device 200, the processor 300, and the memory interface 400 are connected to the bus 600. The memory 500 is connected to the bus 600 via the memory interface 400, and is used for storing data and storing program codes executed by the processor 300. Data transferred from the input / output device 100 by DMA transfer is also stored in the memory 500.
[0011]
Inside the input / output device 100, a bus interface 110 for connecting to the bus 600, a data buffer 120 for temporarily storing data to be DMA-transferred, a control device 130 for controlling the input / output device, There are a receiving-side format converter 140 that converts received data into internal format data, and a transmitting-side format converter 150 that converts internal format data into transmission data from the input / output device 100. For example, when the input / output device 100 is a serial interface, the receiving-side format converter 140 is a serial-parallel converter, and the transmitting-side format converter 150 is a parallel-serial converter.
[0012]
The data buffer 120 stores a status 121 such as error information detected by the control device 130 of the input / output device 100 and data 122 input via the receiving format converter 140. When the data buffer 120 has a plurality of entries, each entry holds a status 121 and data 122 as a set.
[0013]
When transferring received data from the input / output device 100 to the memory 500 by DMA transfer, first, the input / output device 100 and the DMA control device 200 are initialized by the processor 300. When data is received from the external device 900 to the input / output device 100 and the data 122 is stored in the data buffer 120, the status 121 of the control device 130 at that time is also stored in the data buffer 120. Once stored in the data buffer 120, the data 122 and the status 121 are handled as a set.
[0014]
When detecting that the set of the data 122 and the status 121 is stored in the data buffer 120, the bus interface 110 issues a DMA transfer request to the DMA controller 200. When the DMA control device 200 receives the DMA transfer request from the input / output device 100, the DMA control device 200 accesses the input / output device 100 via the bus 600 and reads out a set of the data 120 and the status 121 stored in the data buffer 120. Thereafter, the DMA controller 200 issues a request to the memory interface 400 to write the set of data and status read via the bus 600 to the memory as one piece of data. At this time, the DMA control device 200 also instructs the memory interface 400 on the address to write the data.
[0015]
After issuing an instruction to write data to the memory 500 to the memory interface 400, the DMA control device 200 updates the address at which data is written.
[0016]
The DMA transfer operation will be described by assuming that the input / output device 100 is a serial interface and that communication with the external device 900 is performed in units of a frame structure shown in FIG.
[0017]
At the beginning of the frame shown in FIG. 2, A5H in hexadecimal is present as a 3-byte start code 1200, followed by data of a total of 32 bytes from data 0 (1401) to data 31 (1432). Further, a 1-byte CRC1211 code is added. Further, when A5H is continuous for 3 bytes or more in the data in the frame, 00H is inserted in hexadecimal notation every two consecutive times, so that the data portion and the start code 1200 can be identified. When the value of CRC1211 is also A5H, the most significant bit is inverted to 25H.
[0018]
When the input / output device 100 receives the frame shown in FIG. 2, the receiving-side format converter 140 performs serial-parallel conversion for each byte, and stores the conversion result in the data buffer 120. At the same time, the receiving-side format converter 140 performs communication error detection, and stores the detection result as the status 121 in the data buffer 120 via the controller 130. When one byte of data 122 and status 121 are stored in data buffer 120, bus interface 110 issues a DMA transfer request to DMA controller 200.
[0019]
When receiving the DMA transfer request, the DMA control device 200 reads a set of the status 121 and the data 122 from the data buffer 120 via the bus 600 and the bus interface 110.
[0020]
When the DMA control device 200 reads a set of the status 121 and the data 122, the DMA control device 200 writes the set into the memory 500 via the bus 600 and the memory interface 400.
[0021]
The data write state in the memory 500 when the input of a certain frame is completed and the DMA transfer to the memory 500 is completed will be described with reference to FIG.
[0022]
In the six bytes from the offset address +00 to +05, the first byte (1201) of the frame start code 1200 and the corresponding status S0 (1301), the second byte (1202) and the corresponding status S1 (1302), The third byte (1203) and the corresponding status S2 (1303) are stored.
[0023]
In the 64 bytes from the offset address +06 to +69, the frame data 1400 is stored in order from data 0 (1401) and the corresponding status 0 (1501) to data 31 (1432) and the corresponding status 31 (1532). Is done.
[0024]
Two bytes from offset address +70 to +71 store CRC (1211) from data 0 to data 31 and its status (1311).
[0025]
When the input / output device 100 receives a plurality of frames as shown in FIG. 4, each frame is stored in the memory 500 as shown in FIG. That is, the frames are continuously stored in the memory 500 in the order in which the input / output device 100 receives the frames. However, since the DMA transfer area is handled as a ring buffer, if the memory area allocated as the DMA transfer area from the input / output device 100 is exceeded, the data is returned to the beginning of the DMA transfer area and data storage is continued.
[0026]
When processing the data received by the input / output device 100, the processor 300 processes the data stored in the memory 500 at such a frequency that the area prepared for the DMA transfer from the input / output device 100 does not overflow the memory 500. I do. For example, when a storage area for 10 frames is prepared in the memory 500, data stored in the memory 500 is processed at a time interval required for inputting about 8 frames.
[0027]
When performing the processing of the received data stored in the memory 500, the processor 300 checks the status corresponding to the received data and detects an error.
[0028]
When detecting an error, the processor 300 discards the frame currently being processed, performs error processing such as issuing a data retransmission request to the external device 900, and searches for the start of the next frame.
[0029]
The search for the start position of the next frame is performed by finding the byte sequence of the start code 1200. Therefore, even if the input data is lost and the byte length of the frame is different from the normal frame, the next frame can be detected.
[0030]
If an error is detected in the start code 1200 of the frame currently being processed when searching for the start position of the next frame, the search is started from the position jumped by the length of the start code 1200 from the start of the start code 1200. Do. If an error exists in the data 1400 or the CRC 1211, the search is performed from the next byte.
[0031]
By using the above method, when a plurality of frame data are stored in the memory 500 and the processor 300 performs processing collectively, even if an error exists in a certain frame, normal processing is performed on a normal frame. Is possible. That is, since the position of a frame or data in which an error has occurred at the time of input can also be specified at the time of DMA transfer, it is possible to discard only the portion in which the error has occurred when performing error processing.
[0032]
As a second embodiment, another DMA controller 2200 shown in FIG. 7 is used instead of the DMA controller 200 shown in FIG. 1, and another DMA controller shown in FIG. 6 is used instead of the input / output device 100 shown in FIG. A method using the input / output device 2100 will be described with reference to FIGS. The second embodiment also has the same system configuration as FIG. 1 except that the DMA control device and the input / output device are different.
[0033]
The input / output device 2100 shown in FIG. 6 differs from the input / output device 100 in that the data buffer 120 for pairing the status 121 and the data 122 does not exist.
[0034]
In the DMA control device 2200 of FIG. 7, a source address register A 2225 and a source address register B 2226 that hold a source address exist for one destination address register 2220 that holds a destination address.
[0035]
When the DMA controller 2200 performs the DMA transfer, the processor 300 previously sets an address for reading the status of the input / output device 2100 in the transfer source address register A, and receives the address from the input / output device 2100 in the transfer source address register B. Set the address for reading data. In the transfer destination address register 2220, a start address of an area allocated for storing data transferred by DMA is set.
[0036]
When the DMA controller 2200 receives the DMA transfer request signal from the input / output device 2100, the controller 2240 controls the selector 2230 to supply the address held by the transfer source address register A 2225 to the bus interface 2260. The bus interface reads data from the address held by the transfer source address register A 2225 via the bus 600 and stores the data in the buffer A 2255 according to the instruction of the control device 2240. That is, the status of the input / output device 2100 is stored in the buffer A 2255.
[0037]
Next, control device 2240 controls selector 2230 to supply the address held by transfer source address register B 2226 to bus interface 2260. The bus interface reads data from the address held by the transfer source address register B 2226 via the bus 600 and stores the data in the buffer B 2256 according to the instruction of the control device 2240. That is, the received data of the input / output device 2100 is stored in the buffer B2256.
[0038]
Through the above process, a set of the status of the input / output device 2100 and the received data is stored in the buffer 2250.
[0039]
Next, the control device 2240 controls the selector 2230 to supply the address held by the transfer destination address register 2220 to the bus interface 2260. The bus interface writes the set of data in the buffer 2250 via the bus 600 to the address held by the transfer destination address register 2220 according to the instruction of the control device 2240. That is, the data is written in the memory 500 in a state where the status of the input / output device 2100 and the received data form a set.
[0040]
Finally, the next address generator 2210 calculates an address to write the contents of the buffer 2250 to the memory 500 next, and writes the calculation result to the transfer destination address register 2220.
[0041]
With the above processing, the same contents as in the first embodiment can be stored in the memory 500 in the second embodiment. Therefore, the same method as in the first embodiment can be used for error processing.
[0042]
In the first and second embodiments, an external device is connected to the input / output device. However, when the system includes a plurality of blocks, each block has a function corresponding to the input / output device, Communication between blocks via a function corresponding to an input / output device may be considered.
[0043]
【The invention's effect】
Also at the time of DMA transfer, the position of a frame or data in which an error has occurred at the time of input by the input / output device can be specified. As a result, when an input error is detected by the input / output device during the DMA transfer, the input operation of the input / output device is stopped, and only the location where the error has occurred is discarded without interrupting the processor. Becomes possible. Therefore, it is possible to eliminate the interrupt processing from the processor while suppressing the deterioration of the input / output processing function. Particularly, in a processor having an instruction cache, the contamination of the instruction cache due to the interrupt processing can be avoided, so that the execution speed can be improved and the execution time in real-time processing can be easily predicted.
[Brief description of the drawings]
FIG. 1 is a block diagram according to a first embodiment of the present invention.
FIG. 2 is a diagram illustrating a frame configuration example of a signal input to an input / output device.
FIG. 3 is a diagram illustrating a data storage state in a memory when the input / output device receives the example of the frame configuration illustrated in FIG. 2 and performs a DMA transfer.
FIG. 4 is an example in which the frames shown in FIG. 2 are continuously input to the input / output device.
5 is a diagram illustrating a state of data storage in a memory when the input / output device receives the sequence of frames illustrated in FIG. 4 and performs a DMA transfer.
FIG. 6 is a block diagram of an input / output device according to a second embodiment of the present invention.
FIG. 7 is a block diagram of a DMA control device according to a second embodiment of the present invention.
[Explanation of symbols]
100: input / output device used in the first embodiment, 110: bus interface of first input / output device, 120: data buffer of first input / output device, 121: first input / output corresponding to received data Status of the device, 122: received data of the first input / output device, 130: control device of the first input / output device, 140: received side format converter of the first input / output device, 150: first input / output Format conversion device on the transmission side of the device, 200: Direct memory access (DMA) control device used in the first embodiment, 300: Processor, 400: Memory interface, 500: Memory, 600: Bus, 900: External device, 1200 .., Start codes constituting an example of a frame, 1201, 1202, 1203... Bytes constituting a start code, 1211. CRC byte constituting an example of a program, 1400... Data constituting an example of a frame, 1401, 1402, 1432... Data constituting byte, 1301, 1302, 1303... Status corresponding to a constituting byte of a start code, 1311. , 1501, 1502, 1532... Status corresponding to data configuration bytes, 1600, 1601, 1602, 1605, 1606, 1607... Configuration frame as an example of a frame sequence, 2100... Used in the second embodiment. Input / output device, 2110: Bus interface of second input / output device, 2130: Control device of second input / output device, 2140: Receiving-side format converter of second input / output device, 2150: Second input / output Format conversion device on the transmission side of the device, 2200. Direct memory access (DMA) controller 2210... Next address generator of the second DMA controller 2220... Destination address register of the second DMA controller 2225... Of the second DMA controller Transfer source address register A, 2226... Transfer source address register B of the second DMA controller 2230... Selector of the second DMA controller 2240... Controller of the second DMA controller 2250. DMA controller buffer, 2255: Buffer A of second DMA controller, 2256: Buffer B of second DMA controller, 2260: Bus interface of second DMA controller.

Claims (4)

ダイレクトメモリアクセス転送機能を持つプロセッサシステムにおいて、ダイレクトメモリアクセスによる入出力装置からメモリへの転送を行う際に、前記入出力装置が受信したデータと前記入出力装置のステータスを組にしてメモリへ書き込む手段を持つプロセッサシステム。In a processor system having a direct memory access transfer function, when data is transferred from an input / output device to a memory by direct memory access, the data received by the input / output device and the status of the input / output device are written to the memory as a set. Processor system with means. ダイレクトメモリアクセス機能を持つプロセッサシステムにおいて、前記ダイレクトメモリアクセス機能を制御する装置が入出力装置にアクセスした際に、前記入出力装置が受信したデータと前記データ受信時のステータスを組したデータを読み出す手段を持つ入出力装置。In a processor system having a direct memory access function, when a device that controls the direct memory access function accesses an input / output device, reads out data that combines the data received by the input / output device and the status at the time of data reception. An input / output device with a means. ダイレクトメモリアクセス機能を持つプロセッサシステムにおいて、入出力装置に前記ダイレクトメモリアクセス機能を制御する装置がアクセスする際に、前記入出力装置の複数の箇所からデータを読み出す手段を持ち、前記複数の箇所から読み出したデータを組にする手段を持ち、かつメモリへ書き込む手段を持つダイレクトメモリアクセス機能制御装置。In a processor system having a direct memory access function, when a device that controls the direct memory access function accesses an input / output device, the processor system includes a unit that reads data from a plurality of locations of the input / output device. A direct memory access function controller having means for combining read data and means for writing to a memory. 請求項3記載のダイレクトメモリアクセス機能制御装置で、入出力装置の受信データを保持する場所及び前記入出力装置の状態を保持する場所からデータを読み出し、読み出したデータを組にしてメモリへ書き込むことが可能なダイレクトメモリアクセス機能制御装置。4. The direct memory access function control device according to claim 3, wherein data is read from a location for holding the received data of the input / output device and a location for holding the state of the input / output device, and the read data is written to the memory as a set. Direct memory access function control device capable of
JP2002341665A 2002-11-26 2002-11-26 Processor system with direct memory access data transfer function Pending JP2004178122A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002341665A JP2004178122A (en) 2002-11-26 2002-11-26 Processor system with direct memory access data transfer function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002341665A JP2004178122A (en) 2002-11-26 2002-11-26 Processor system with direct memory access data transfer function

Publications (1)

Publication Number Publication Date
JP2004178122A true JP2004178122A (en) 2004-06-24

Family

ID=32703928

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002341665A Pending JP2004178122A (en) 2002-11-26 2002-11-26 Processor system with direct memory access data transfer function

Country Status (1)

Country Link
JP (1) JP2004178122A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8375257B2 (en) 2007-08-21 2013-02-12 Samsung Electronics Co., Ltd. ECC control circuits, multi-channel memory systems including the same, and related methods of operation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8375257B2 (en) 2007-08-21 2013-02-12 Samsung Electronics Co., Ltd. ECC control circuits, multi-channel memory systems including the same, and related methods of operation

Similar Documents

Publication Publication Date Title
US5604866A (en) Flow control system having a counter in transmitter for decrementing and incrementing based upon transmitting and received message size respectively for indicating free space in receiver
EP0674276B1 (en) A computer system
JP2002541693A5 (en)
CN100454281C (en) ATAPI instruct receiving way
US7577774B2 (en) Independent source read and destination write enhanced DMA
KR100348545B1 (en) Communication dma device
JP2004178122A (en) Processor system with direct memory access data transfer function
US20040230717A1 (en) Processing device
JP4098910B2 (en) Packet transfer control device and packet transfer method
JP2004227501A (en) Data transfer controller and method
JP4372110B2 (en) Data transfer circuit, multiprocessor system using the same, and data transfer method
JP4458873B2 (en) Serial data transfer method and apparatus
JP2008152580A (en) Communication device and communication method
WO2008004301A1 (en) Data transfer unit, processing unit, and data transfer method
JPH10105488A (en) Communication controller
JP2925049B2 (en) Input buffer control method
JP2006005698A (en) Network controller and semiconductor integrated circuit
JPH05265925A (en) Data transfer controller
JP5013952B2 (en) Monitoring control method and communication apparatus
JPH05136827A (en) Communication processor
JP6000732B2 (en) Data transfer apparatus, control method therefor, and program
JPS63198143A (en) Data transfer controller
JP2010224689A (en) Device control system, information processor, and device control method
JP2011193242A (en) Communication controller and communication control method
KR19990004231A (en) Memory access device in computer system using PI6 bus