JP3517884B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP3517884B2
JP3517884B2 JP06543392A JP6543392A JP3517884B2 JP 3517884 B2 JP3517884 B2 JP 3517884B2 JP 06543392 A JP06543392 A JP 06543392A JP 6543392 A JP6543392 A JP 6543392A JP 3517884 B2 JP3517884 B2 JP 3517884B2
Authority
JP
Japan
Prior art keywords
address
data
main storage
central processing
access
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
JP06543392A
Other languages
Japanese (ja)
Other versions
JPH05265942A (en
Inventor
俊幸 清水
宏明 石畑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP06543392A priority Critical patent/JP3517884B2/en
Publication of JPH05265942A publication Critical patent/JPH05265942A/en
Application granted granted Critical
Publication of JP3517884B2 publication Critical patent/JP3517884B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、計算機システムのDMA
制御部におけるデータ入出力方法に関する。最近の、計
算機システムの性能向上に対する要求に伴い、入出力処
理が効率良く行われる必要がある。 【0002】然して、最近の計算機システムに接続され
る入出力装置(I/O) の数の増大に伴い、中央処理装置(C
PU) からの主記憶装置(MSU) に対するアクセスと、該入
出力装置(I/0) からの主記憶装置(MSU) に対するアクセ
スとが競合することが多くなる動向にある。 【0003】特に、ディスク装置, メッセージ通信とい
った低速の入出力処理が存在する場合には、該高速の中
央処理装置(CPU) の主記憶装置(MSU) に対するアクセス
と競合し、該中央処理装置(CPU) の演算性能に影響を与
えることが多い。 【0004】このようなことから、中央処理装置(CPU)
と主記憶装置(MSU) と、入出力装置(I/O) が共通に使用
しているデータバスでの、上記入出力装置(I/O) と主記
憶装置(MSU) との間のデータ転送で生じる空き時間を有
効に利用するデータ入出力方法が要求される。 【0005】 【従来の技術】図6は、従来のダイレクト・メモリ・ア
クセス (以下、DMA という) 制御部の動作を説明する図
であり、(a) は計算機システムの構成例を示し、(b1),
(b2) はDMA によるデータ転送時の通常のアクセス可能
な範囲を示し、(c) は従来のDMAによるデータ転送時の
問題点を示している。 【0006】図6(a) に示したような、中央処理装置(C
PU) 1 と、主記憶装置(MSU) 2 と、入出力装置(I/O) 3
と、該主記憶装置(MSU) 2 と入出力装置(I/O) 3 との間
のデータ転送を制御するDMA 制御部(DMAC 、以下省略)
4 とからなり、それぞれの装置が、内部バス 6で接続さ
れており、上記中央処理装置(CPU) 1 内のアドレス変換
バッファ(TLB) 10によりメモリ管理を行い、データの入
出力を行うデータ処理システムにおいては、該DMA 制御
部 4は、中央処理装置(CPU) 1 から、主記憶装置(MSU)
2 上のデータ転送開始アドレス, カレントアドレス, 転
送バイト数を受信して、所定のレジスタに設定した後、
該中央処理装置(CPU) 1 からの起動指示に基づいて、
主記憶装置(MSU) 2 と入出力装置(I/0) との間で、上記
内部バス6を介して自律的にデータ転送を行う。 【0007】この場合、図6(b1),(b2) に示したよう
に、入出力装置(I/O) 3 から主記憶装置(MSU) 2 へのデ
ータの読み込みが完了するまで、該主記憶装置(MSU) 2
の該データの読み込まれた領域のデータをリードするこ
とはできない。 【0008】又、主記憶装置(MSU) 2 から入出力装置(I
/O) 3 へのデータの書き出しが完了する迄、該書き出し
領域に対して、中央処理装置(CPU) 1 から新たな書き込
みを行うことはできない。 【0009】 【発明が解決しようとする課題】従って、主記憶装置(M
SU) 2 と入出力装置(I/O) 3 との間で、該DMA によるデ
ータ転送が行われている間において、例えば、該入出力
装置(I/0) 3 が低速の入出力装置であって、内部バス 6
上でのデータ転送が、図6(c) に示したように、空き期
間を持っている場合、例えば、転送データCに対してア
クセスしようとしても、該転送データCが未だ、主記憶
装置(MSU) 2 に対して読み込み, 或いは、書き出しが行
われていることが認識できないので、中央処理装置(CP
U) 1 は、該一連のデータ転送が完了するまで、該主記
憶装置(MSU) 2 の、該データ転送領域に対して、アクセ
ス (リード, ライト) ができず、該中央処理装置(CPU)
1 の演算性能を妨げてしまうという問題があった。 【0010】本発明は上記従来の欠点に鑑み、中央処理
装置(CPU) と, 主記憶装置(MSU) と、入出力装置(I/O)
と、該主記憶装置(MSU) と入出力装置(I/O) との間での
データ転送を行うDMA 制御部とからなり、アドレス変換
バッファ(TLB) によりメモリ管理を行い、データの入出
力を行う計算機システムにおいて、該DMA 制御部におい
て、データの入出力の途中でも、副作用の生じない主記
憶装置(MSU) の部分のデータにアクセスすることができ
るDMA 制御部におけるデータ入出力方法を提供すること
を目的とするものである。 【0011】 【課題を解決するための手段】図1〜図3は、本発明の
原理説明図であり、図1,図2の(a1),(a2) はデータの
読み込みの場合を示し、(b1),(b2) はデータの書き出し
の場合を示し、(a1),(b1) はメモリ管理テーブルと、主
記憶装置(MSU) との関係を示し、(a2),(b2) は動作タイ
ムチャートを示しており、図3(a) はアドレス変換の原
理を示し、図3(b) はアドレス変換バッファ(TLB) の概
念を示している。上記の問題点は下記のように構成した
DMA 制御部におけるデータ入出力回路によって解決され
る。 【0012】本発明のデータ処理装置は、主記憶装置
と、入出力装置と、論理アドレスを物理アドレスに変換
するアドレス変換バッファを設けた中央処理装置と、主
記憶装置と入出力装置との間のデータ転送を制御するD
MA制御部と、を有するデータ処理装置において、DM
A制御部によるデータのDMA転送中に、中央処理装置
が主記憶装置をアクセスしたときのアクセスアドレス
が、DMA転送による主記憶装置上のデータ転送済領域
内にあるか否かを検出するアクセス領域検出手段と、検
出した結果、中央処理装置が主記憶装置をアクセスした
ときのアクセスアドレスがDMA転送による主記憶装置
上のデータ転送済領域内のときには、データのアクセス
を許可し、データ転送済領域外のときには、中央処理装
置にアクセス領域外を通知するアクセス制御手段とを有
する構成である。 【0013】また、アクセス領域検出手段は、主記憶装
置と入出力装置との間でのDMA転送によるデータの転
送数をカウントするデータ転送数カウント手段と、DM
A制御部、中央処理装置から主記憶装置へのアクセスの
論理アドレスの上位アドレスが一致しているときに、中
央処理装置から主記憶装置へのアクセスの論理アドレス
の下位アドレスとデータ転送数カウント手段によりカウ
ントされたデータ転送数とを比較するアドレス比較手段
と、比較した結果により、中央処理装置から主記憶装置
へのアクセスアドレスがデータ転送済領域内にあるか否
かを判定する領域判定手段とを有する構成である。 【0014】また、アクセス制御手段により、中央処理
装置にアクセス領域外が通知されたときに、中央処理装
置は、主記憶装置へのアクセスを一定時間ホールドする
アクセスホールド手段を有する構成である。 【0015】 【0016】 【0017】 【0018】 【作用】図3(b) に示したアドレス変換バッファ(TLB)
10は、図3(a) に示したように、仮想メモリアドレス空
間の膨大な論理アドレス空間のブロックを指示する論理
アドレスを、実際の主記憶装置(MSU) 2 の物理アドレス
に変換するもので、図示されていない動的アドレス変換
機構(DAT) で得た論理アドレス−物理アドレスの対情報
が格納されている。 【0019】ここで、「Base」は、ヒットした論理アド
レス(上位)に対応する物理アドレスを格納しているベ
ースレジスタを示し、該ベースレジスタの中に、該論理
アドレス (上位) に対応する物理アドレス (上位) が格
納されている。「r,e,w 」等は、アクセスの正当性を示
す「アトリビュート」を示し、「Len 」は、当該論理ア
ドレスブロックの主記憶装置(MSU) 2 上での語方向のデ
ータ長を示している。 【0020】通常、メモリアドレスは、上記アドレス変
換バッファ(TLB) 10の、上記ベースレジスタ「Base」と
「r,e,w 」と「Len 」とで管理されており、これは、セ
グメント方法として知られているものである。 【0021】本発明は、上記アドレス変換バッファ(TL
B) 10の「Len 」に対するレジスタ「Len 」, 又は、該
「Len 」に代わる「Cnt 」を、データの入出力に同期し
て更新することにより、実際に、読み込んだ, 或いは、
書き出した (不要になった) データの領域を認識するこ
とができることに着目し、中央処理装置(CPU) 1 から、
主記憶装置(MSU) 2 にアクセスがあったとき、該「Bas
e」が示すメモリ空間の先頭アドレスと、該「Len 」が
示す領域内にあるとき、該中央処理装置(CPU) 1 からの
アクセスを許可し、該領域外にあることを検出したとき
には、トラップを発生させて、該アクセスを抑止した
り、一定時間アクセスをホールドして、該アクセス領域
が、上記転送領域内に入ったとき、該中央処理装置(CP
U) からのアクセスを許可するように動作させるもので
ある。 【0022】以下、図1により、本発明のDMA 制御部に
おけるデータ入出力回路の動作,作用を、より具体的に
説明する。図1(a1),(a2) は、入出力装置(I/O) 3 から
主記憶装置(MSU) 2 へのデータの読み込み時の動作を示
しているが、本発明においては、DMA 制御部 4内に、上
記アドレス変換バッファ(TLB) 10と同じ構成のメモリ管
理テーブル 42 を設け、主記憶装置(MSU) 2 上の転送開
始アドレスを、該メモリ管理テーブル 42 の「Base」欄
に設定した後、「Len 」欄を“0”として、該DMA 制御
部 4を起動する。 【0023】該DMA 制御部 4は、データ転送がある毎
に、該「Len 」欄を「+1」して、中央処理装置(CPU)
1 からのリードアクセス可能な領域 (斜線で示す) を増
加させる。この機構により、中央処理装置(CPU) 1 は、
該主記憶装置(MSU) 2 の該当の領域に対して、全てのデ
ータが入出力装置(I/O) 3 から到着するまで待つことな
く、アクセスすることができる。{図1(a2)の動作タイ
ムチャート参照} 主記憶装置(MSU) 2 から入出力装置(I/O) 3 へのデータ
の書き出し時には、該書き出すデータが変更されては困
るので、一般には、システムバッファにコピーしてから
(但し、該転送領域を書き込み禁止にしてコピーしない
方法も提案されている) 、該DMA 制御部 4を起動する。 【0024】そして、本発明の場合、図2(b1),(b2) に
示したように、該主記憶装置(MSU)2 から入出力装置(I/
O) 3 へのデータの書き出しの終了した部分 (斜線で示
す)について、データ転送中であっても、中央処理装置
(CPU) 1 からのデータの書き込みを許可するように動作
させるため、従来方法のように、コピーの必要がなくな
り、待ち時間が少なくなる。{図2(b2)の動作タイムチ
ャート参照} このように、本発明のDMA 制御部におけるデータ入出力
回路を用いたデータ転送方法においては、該DMA 制御部
でのデータ転送中においても、副作用の生じない部分デ
ータに対して、中央処理装置(CPU) からアクセスが可能
になるため、データ書き出し時のコピー時間が削減で
き、計算機システムの性能が向上する効果がある。 【0025】 【実施例】以下本発明の実施例を図面によって詳述す
る。前述の図1〜図3は、本発明の原理説明図であり、
図4,図5は、本発明の一実施例を示した図であって、
図4は、メモリ管理テーブルを、DMA 制御部外に設けた
場合を示しており、図5は、該メモリ管理テーブルを、
DMA 制御部内に設けた場合を示している。 【0026】本発明においては、中央処理装置(CPU) 1
と、主記憶装置(MSU) 2 と、入出力装置(I/O) 3 と、該
主記憶装置(MSU) 2 と入出力装置(I/O) 3 との間のデー
タ転送を制御するDMA 制御部 4とからなり、上記中央処
理装置(CPU) 1 内のアドレス変換バッファ(TLB) 10によ
りメモリ管理を行い、データの入出力を行うデータ処理
システムにおいて、該DMA 制御部 4の入力バッファ 40,
又は、出力バッファ 41 の状態を保持するのに、例え
ば、該DMA 制御部 4内に、上記アドレス変換バッファ(T
LB) 10と同じ構成のメモリ管理テーブル 42 を設け、
(図5参照)該DMA制御部 4でのデータ転送に応じて、
該メモリ管理テーブル 42 の内容を更新し、該DMA 制御
部 4でのデータ転送中において、該更新された上記メモ
リ管理テーブル 42 の内容が指示する、上記入出力装置
(I/0) 3 から、上記主記憶装置(MSU)2 に読み込み済み
の領域, 又は、該主記憶装置(MSU) 2 からの書き出し
済みの領域に対して、上記中央処理装置(CPU) 1 がア
クセス (リード, 或いは、ライト) する手段が、本発明
を実施するのに必要な手段である。尚、全図を通して同
じ符号は同じ対象物を示している。 【0027】以下、図1〜図3を参照しながら、図4,
図5によって、本発明のDMA 制御部におけるデータ入出
力回路の構成と動作を説明する。図4,図5は、アドレ
ス変換バッファ(TLB) 10と、DMA 制御部 4との相互関係
を示しており、図4は、該DMA 制御部 4が管理する入力
バッファ 40,又は、出力バッファ 41 の状態を保持する
メモリ管理テーブル 5を、該DMA 制御部 4の外、例え
ば、中央処理装置(CPU) 1 に設けた例として、その「Le
n 」部のみを「Cnt」として、チャネル対応に設けた例
を示しており、図5は、該メモリ管理テーブル 42 を、
DMA 制御部 4内に、上記アドレス変換バッファ(TLB) 10
と同じ構成で設けた例を示している。 【0028】先ず、図4の例では、中央処理装置(CPU)
1 が、これから、DMA 制御部 4を起動してデータ転送を
行うチャネルに対応して設けられている、上記アドレス
変換バッファ(TLB) 10の「Len 」部に対応したメモリ管
理テーブル 5のカウンタ「Cnt 」をリセットした後、該
DMA 制御部 4に、該DMA によりデータ転送を行うのに必
要な制御情報 (転送開始アドレス, 転送量等) を送出
し、該制御情報が、該DMA 制御部 4の所定の制御レジス
タに設定された時点で、該DMA 制御部 4を起動する。 【0029】該起動されたDMA 制御部 4が、主記憶装置
(MSU) 2 と入出力装置(I/O) 3 との間で、自律的なデー
タ転送を行う毎に、上記中央処理装置(CPU) 1 内の上記
チャネル対応に設けられているカウンタ「Cnt 」をカウ
ントアップする。 【0030】該DMA 制御部 4でのデータ転送中におい
て、該中央処理装置(CPU) 1 から主記憶装置(MSU) 2 に
対するアクセス命令 (リード, 又は、ライト) が発行さ
れると、該アクセスアドレス (論理アドレス) の上位ア
ドレスが、アドレス変換バッファ(TLB) 10の「Addr」部
と一致するかどうかが調べられ、一致する (即ち、ヒッ
トする) と、物理アドレスに変換された後、該論理アド
レスの下位アドレスと加算されて、該アクセスすべき物
理アドレスが生成されると共に、その下位アドレスが、
上記カウンタ「Cnt 」と比較され、データ転送済みの領
域, 又は、内であることが、検出手段 (領域チェッ
ク) 43で検出されると、該アクセス命令による主記憶装
置(MSU) 2 に対するアクセスが行われるが、該比較にお
いて、データ転送済みの領域外であることが、該検出手
段 43 で検出され、所謂、通常のアクセス例外とは異な
るトラップが発生すると、該メモリアクセスは、一旦中
央処理装置(CPU) 1 内で保持され、例えば、後述するよ
うに、他のプログラムの実行に遷移させる。 【0031】そして、該アクセスアドレスがデータ転送
済みの領域, 又は、内にあることが検出された時点
で、該当のアクセス命令を含むプログラムに戻り、該領
域に対するアクセス命令の実行が行われる。 【0032】このとき、アドレス変換バッファ(TLB) 10
のアトリビュート (リード不可, ライト可能, 〜等に対
するアクセスの正常性) も同時に調べられ、該アクセス
の正当性の確認が行われる。 【0033】次に、図5は、該DMA 制御部 4でのデータ
転送時の入力バッファ 40,又は、出力バッファ 41 の状
態を保持するメモリ管理テーブル 42 を、該DMA 制御部
4内に設け、且つ、上記アクセス変換バッファ(TLB) 10
と同じ構成とし、該「Len 」部には、データ転送のバイ
ト数をカウントする機能を持たせる。 【0034】ここで、上記DMA 制御部 4内の、上記メモ
リ管理テーブル 42 の、上記カウント機能を持っている
「Len 」部を“0”とした後、所定の制御情報を送出
し、該DMA 制御部 4内の所定の制御レジスタに設定され
た時点で、該DMA 制御部 4を起動する。 【0035】該DMA 制御部 4では、データ転送が行われ
る毎に、該「Len 」部をカウントアップする。一方、該
DMA 制御部 4でのデータ転送中において、該中央処理装
置(CPU) 1 から主記憶装置(MSU) 2 に対するアクセス命
令 (リード, 又は、ライト) が発行されると、中央処理
装置(CPU) 1 では、該アクセス命令の指示するアクセス
アドレス (論理アドレス) の上位アドレスが、該アクセ
ス変換バッファ(TLB) 10の「Addr」部と一致するかどう
かが調べられ、一致する (即ち、ヒット) と、該論理ア
ドレス (上位) が物理アドレスに変換され、該論理アド
レスの下位アドレスと加算されて、該アクセスすべき物
理アドレスが生成されると共に、当該DMA 制御部4内
の、上記メモリ管理テーブル 42 の「Len 」部を調べ、
該アクセス命令が指示する論理アドレスの下位アドレス
が、該DMA 制御部 4内の、上記「Len 」部が指示する領
域を越えていないかどうかかが調べられ、該領域, 又
は、内にあることが、検出手段 (領域チェック) 43で
検出された場合には、該DMA 制御部 4がデータ転送中で
あっても、主記憶装置(MSU) 2 に対して、該アクセス命
令が実行されるが、該アクセス命令が指示するアドレス
が、上記領域, 又は、の外であることが、該検出手
段 43 で検出 (即ち、トラップの発生) されると、通常
のアクセス例外とは別の例外を発生させ、該アクセス命
令の実行を一時保持して、他の処理、例えば、他のプロ
グラムに遷移させる。 【0036】そして、該DMA 制御部 4でのデータ転送が
進んで、上記アクセス命令が指示するアドレスが、該読
み込み済み, 或いは、書き出し済みの領域, 又は、
内に入ったことが検出されると、該保持されていたアク
セス命令のプログラムに遷移させて、該保持されている
アクセス命令を実行するように動作させる。 【0037】このとき、前述のように、アドレス変換バ
ッファ(TLB) 10のアトリビュート (リード不可, ライト
可能, 〜等に対するアクセスの正常性) も同時に調べら
れ、該アクセスの正当性の確認が行われる。 【0038】このように、本発明によるアドレス変換バ
ッファ(TLB) を用いたデータ入出力方法は、中央処理装
置(CPU) と, 主記憶装置(MSU) と、入出力装置(I/O)
と、該主記憶装置(MSU) と入出力装置(I/O) との間での
データ転送を行うDMA 制御部とからなり、アドレス変換
バッファ(TLB) によりメモリ管理を行い、データの入出
力を行う計算機システムにおいて、該DMA 制御部内が管
理する入力バッファ, 及び、出力バッファの状態を保持
するメモリ管理テーブルを、例えば、上記アドレス変換
バッファ(TLB) のレジスタと対応させて構成し、該メモ
リ管理テーブルの「データ長(Len) 」部をデータ転送量
に応じて制御し、該入力バッファに入出力装置(I/O) か
らデータを読み込み中において、該読み込み済みの部分
のデータを中央処理装置(CPU) がリードするか、出力バ
ッファのデータを入出力装置(I/O)に書き出し途中にお
いて、該書き出し済みの部分に、該中央処理装置(CPU)
がライトするようにした所に特徴がある。 【0039】 【発明の効果】以上、詳細に説明したように、本発明の
アドレス変換バッファ(TLB) を用いたデータ入出力回路
は、中央処理装置(CPU) と, 主記憶装置(MSU) と、入出
力装置(I/O) と、該主記憶装置(MSU) と入出力装置(I/
O) との間でのデータ転送を行うDMA 制御部とからな
り、アドレス変換バッファ(TLB) によりメモリ管理を行
い、データの入出力を行う計算機システムにおいて、該
DMA 制御部が管理する入力バッファ, 及び、出力バッフ
ァの状態を保持するメモリ管理テーブルを、例えば、上
記アドレス変換バッファ(TLB) のレジスタと対応させて
構成し、該メモリ管理テーブルの「データ長(Len) 」部
をデータ転送量に応じて制御し、該入力バッファに入出
力装置(I/O) からデータを読み込み中において、該読み
込み済みの部分のデータを中央処理装置(CPU) がリード
するか、出力バッファのデータを入出力装置(I/O) に書
き出し途中において、該書き出し済みの部分に、該中央
処理装置(CPU) がライトするようにしたものであるの
で、DMA 制御部においてデータ転送中においても、副作
用の生じない部分データに対して、中央処理装置(CPU)
からのアクセスが可能となり、データの書き出し時に
は、従来方法で必要であったコピー処理が削減でき、計
算機システムの性能を向上させることができる効果があ
る。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system DMA.
The present invention relates to a data input / output method in a control unit. With recent demands for improving the performance of computer systems, it is necessary to perform input / output processing efficiently. However, with the recent increase in the number of input / output devices (I / O) connected to computer systems, central processing units (C
There is a tendency that access from the PU to the main storage device (MSU) and access from the input / output device (I / 0) to the main storage device (MSU) often conflict with each other. In particular, when low-speed input / output processing such as a disk device and message communication is present, the high-speed central processing unit (CPU) competes with the access to the main storage unit (MSU), and the central processing unit (CPU) CPU performance is often affected. [0004] Because of this, the central processing unit (CPU)
Data between the input / output unit (I / O) and the main storage unit (MSU) on a data bus commonly used by the input / output unit (I / O) and the main storage unit (MSU). There is a demand for a data input / output method that makes effective use of the idle time generated in the transfer. FIG. 6 is a diagram for explaining the operation of a conventional direct memory access (hereinafter referred to as DMA) control unit. FIG. 6A shows an example of the configuration of a computer system, and FIG. ),
(b2) shows a normal accessible range at the time of data transfer by DMA, and (c) shows a problem at the time of data transfer by conventional DMA. A central processing unit (C) as shown in FIG.
PU) 1, main storage unit (MSU) 2, and input / output unit (I / O) 3
And a DMA controller (DMAC, hereinafter abbreviated) that controls data transfer between the main storage device (MSU) 2 and the input / output device (I / O) 3
Each of the devices is connected by an internal bus 6, and the memory is managed by an address translation buffer (TLB) 10 in the central processing unit (CPU) 1. In the system, the DMA control unit 4 sends a message from a central processing unit (CPU) 1 to a main storage unit (MSU).
2 After receiving the data transfer start address, current address, and number of bytes transferred, and setting them in the specified register,
Based on a start instruction from the central processing unit (CPU) 1,
Data is autonomously transferred between the main storage device (MSU) 2 and the input / output device (I / 0) via the internal bus 6. In this case, as shown in FIGS. 6 (b1) and 6 (b2), the data read from the input / output device (I / O) 3 to the main storage device (MSU) 2 is completed until the data is read. Storage unit (MSU) 2
Cannot read the data in the area where the data has been read. Also, the main storage unit (MSU) 2 is connected to the input / output unit (I
Until the data writing to / O) 3 is completed, new writing cannot be performed from the central processing unit (CPU) 1 to the writing area. Therefore, the main storage device (M
While the data transfer by the DMA is performed between the (SU) 2 and the input / output device (I / O) 3, for example, the input / output device (I / 0) 3 is a low-speed input / output device. Ah, internal bus 6
If the above data transfer has a vacant period as shown in FIG. 6C, for example, even if an attempt is made to access the transfer data C, the transfer data C is still in the main storage device ( MSU) 2 cannot be read or written, so the central processing unit (CP
U) 1 cannot access (read, write) the data transfer area of the main storage device (MSU) 2 until the series of data transfer is completed, and the central processing unit (CPU)
There was a problem that the calculation performance of 1 was hindered. In view of the above-mentioned conventional disadvantages, the present invention provides a central processing unit (CPU), a main storage unit (MSU), and an input / output unit (I / O).
And a DMA control unit for transferring data between the main storage device (MSU) and the input / output device (I / O) .The memory management is performed by an address translation buffer (TLB), and data input / output is performed. A data input / output method in a DMA control unit that can access data in a main storage unit (MSU) that does not cause side effects even during data input / output in the DMA control unit. It is intended to do so. FIGS. 1 to 3 are explanatory diagrams of the principle of the present invention. FIGS. 1 and 2 (a1) and (a2) show the case of reading data. (b1) and (b2) show the case of writing data, (a1) and (b1) show the relationship between the memory management table and the main storage unit (MSU), and (a2) and (b2) show the operation 3A shows a time chart, FIG. 3A shows the principle of address translation, and FIG. 3B shows the concept of an address translation buffer (TLB). The above problem was configured as follows
The problem is solved by the data input / output circuit in the DMA controller. A data processing device according to the present invention is a main storage device.
, I / O devices, and translate logical addresses to physical addresses
A central processing unit having an address translation buffer
D for controlling data transfer between a storage device and an input / output device
And a MA control unit.
During the DMA transfer of data by the A control unit, the central processing unit
Access address when access to main storage
Is the data-transferred area on the main storage device by DMA transfer
Access area detecting means for detecting whether the
Issued, the central processing unit accessed main storage.
When the access address is the main storage device by DMA transfer
Data access when in the data transferred area above
And when the data is outside the data transfer area, the central processing
Access control means for notifying the outside of the access area
Configuration. [0013] The access area detecting means may include a main storage device.
Transfer of data between a device and an input / output device by DMA transfer
Data transfer number counting means for counting the number of transmissions;
A control unit, access from the central processing unit to the main storage device
When the upper address of the logical address matches,
Logical address of access from main processor to main storage
Counter by the lower address of
Address comparing means for comparing the number of transferred data
And the result of the comparison, the central processing unit
Whether the access address to is in the data transferred area
And a region determining means for determining whether Further , the central processing is performed by the access control means.
When the device is notified of the out of access area, the central processing unit
Holds access to main storage for a certain period of time
This is a configuration having access hold means. [0017] The operation of the address translation buffer (TLB) shown in FIG.
Numeral 10 is for converting a logical address indicating a block of a huge logical address space of the virtual memory address space into a physical address of an actual main storage unit (MSU) 2 as shown in FIG. 3 (a). And logical address-physical address pair information obtained by a dynamic address translation mechanism (DAT) not shown. Here, "Base" indicates a base register storing a physical address corresponding to a hit logical address (upper), and a physical register corresponding to the logical address (upper) is included in the base register. Contains the address (upper). "R, e, w" and the like indicate "attributes" indicating the validity of access, and "Len" indicates the data length in the word direction of the logical address block on the main storage unit (MSU) 2. I have. Normally, memory addresses are managed by the base registers "Base", "r, e, w", and "Len" of the address translation buffer (TLB) 10. It is known. According to the present invention, the address translation buffer (TL
B) The register "Len" for "Len" of 10 or "Cnt" instead of "Len" is actually read or updated by updating in synchronization with data input / output, or
Focusing on the fact that the area of the written (unnecessary) data can be recognized, the central processing unit (CPU) 1
When the main storage (MSU) 2 is accessed,
The access from the central processing unit (CPU) 1 is permitted when the start address of the memory space indicated by `` e '' and the area indicated by the `` Len '' are detected. To prevent the access or hold the access for a certain period of time, and when the access area enters the transfer area, the central processing unit (CP
U) to allow access. Hereinafter, the operation and operation of the data input / output circuit in the DMA control unit of the present invention will be described more specifically with reference to FIG. FIGS. 1 (a1) and (a2) show the operation when data is read from the input / output device (I / O) 3 to the main storage device (MSU) 2. In the present invention, the DMA controller 4, a memory management table 42 having the same configuration as that of the address translation buffer (TLB) 10 is provided, and the transfer start address on the main storage device (MSU) 2 is set in the `` Base '' column of the memory management table 42. Thereafter, the “Len” column is set to “0”, and the DMA control unit 4 is started. The DMA control unit 4 increments the “Len” column by “+1” every time there is a data transfer, and the central processing unit (CPU)
Increase read-accessible area from 1 (indicated by diagonal lines). With this mechanism, the central processing unit (CPU) 1
The corresponding area of the main storage device (MSU) 2 can be accessed without waiting until all data arrives from the input / output device (I / O) 3. } Refer to the operation time chart of FIG. 1 (a2)} When writing data from the main storage device (MSU) 2 to the input / output device (I / O) 3, it is generally not necessary to change the data to be written. After copying to system buffer
(However, a method in which the transfer area is write-protected and not copied has also been proposed), starts the DMA control unit 4. In the case of the present invention, as shown in FIGS. 2 (b1) and 2 (b2), the main storage (MSU) 2 is used to
O) For the part where data writing to 3 has been completed (indicated by hatching), even if data is being transferred, the central processing unit
Since the operation is performed so as to permit the writing of data from the (CPU) 1, there is no need for copying as in the conventional method, and the waiting time is reduced. << Refer to the operation time chart of FIG. 2 (b2) >> As described above, in the data transfer method using the data input / output circuit in the DMA control unit of the present invention, the side effect of the DMA control unit is not affected even during the data transfer. Since partial data that does not occur can be accessed from the central processing unit (CPU), the copying time when writing data can be reduced, and the performance of the computer system can be improved. Embodiments of the present invention will be described below in detail with reference to the drawings. FIGS. 1 to 3 are explanatory views of the principle of the present invention.
4 and 5 are views showing an embodiment of the present invention,
FIG. 4 shows a case where the memory management table is provided outside the DMA control unit, and FIG.
The figure shows the case where it is provided in the DMA control unit. In the present invention, a central processing unit (CPU) 1
, A main storage device (MSU) 2, an input / output device (I / O) 3, and a DMA for controlling data transfer between the main storage device (MSU) 2 and the input / output device (I / O) 3 In a data processing system comprising a control unit 4 and performing memory management by an address translation buffer (TLB) 10 in the central processing unit (CPU) 1 and inputting / outputting data, an input buffer 40 of the DMA control unit 4 is used. ,
Alternatively, to hold the state of the output buffer 41, for example, the address conversion buffer (T
(LB) A memory management table 42 having the same configuration as that of 10 is provided.
(See FIG. 5) In response to the data transfer in the DMA control unit 4,
The contents of the memory management table 42 are updated, and during the data transfer by the DMA control unit 4, the input / output device is instructed by the updated contents of the memory management table 42.
From (I / 0) 3, the area that has been read into the main storage unit (MSU) 2 or the area that has been written out from the main storage unit (MSU) 2 has the above-mentioned central processing unit (CPU) 1 The means for accessing (reading or writing) is the means necessary to carry out the present invention. Note that the same reference numerals indicate the same objects throughout the drawings. Hereinafter, referring to FIGS. 1 to 3, FIG.
The configuration and operation of the data input / output circuit in the DMA control unit according to the present invention will be described with reference to FIG. 4 and 5 show the interrelationship between the address translation buffer (TLB) 10 and the DMA controller 4. FIG. 4 shows the input buffer 40 or the output buffer 41 managed by the DMA controller 4. As an example in which a memory management table 5 that holds the state of the memory is provided in the central processing unit (CPU) 1 outside the DMA control unit 4, for example,
FIG. 5 shows an example in which only the “n” part is provided as “Cnt” for each channel, and FIG.
The address translation buffer (TLB) 10
An example in which the same configuration is provided is shown. First, in the example of FIG. 4, the central processing unit (CPU)
The counter 1 of the memory management table 5 corresponding to the “Len” portion of the address translation buffer (TLB) 10 provided for the channel for activating the DMA control unit 4 and performing data transfer from now on After resetting Cnt
Control information (transfer start address, transfer amount, etc.) necessary for performing data transfer by the DMA is sent to the DMA control unit 4, and the control information is set in a predetermined control register of the DMA control unit 4. At this point, the DMA control unit 4 is started. The started DMA control unit 4 operates as a main storage device.
Each time an autonomous data transfer is performed between the (MSU) 2 and the input / output device (I / O) 3, the counter `` Cnt '' provided for the channel in the central processing unit (CPU) 1 Is counted up. During the data transfer in the DMA controller 4, when the central processing unit (CPU) 1 issues an access instruction (read or write) to the main storage unit (MSU) 2, the access address It is checked whether or not the upper address of (logical address) matches the “Addr” part of the address translation buffer (TLB) 10, and if it matches (i.e., hits), it is converted to a physical address, and This is added to the lower address of the address to generate the physical address to be accessed, and the lower address is
When the detection means (area check) 43 detects that the data is within or within the area to which data has been transferred by comparison with the counter "Cnt", the access to the main storage unit (MSU) 2 by the access instruction is performed. In the comparison, the detection means 43 detects that the data is outside the area to which data has been transferred, and when a trap different from a so-called normal access exception occurs, the memory access is temporarily stopped by the central processing unit. (CPU) 1, and, for example, as described later, transition to execution of another program. Then, when it is detected that the access address is in or within the area to which data has been transferred, the program returns to the program including the relevant access instruction, and the access instruction to the area is executed. At this time, the address translation buffer (TLB) 10
(Normal read access, normal write access, etc.) are checked at the same time, and the validity of the access is confirmed. Next, FIG. 5 shows a memory management table 42 for holding the state of the input buffer 40 or the output buffer 41 at the time of data transfer in the DMA control unit 4.
4 and the access conversion buffer (TLB) 10
The "Len" section has a function of counting the number of bytes of data transfer. Here, after the “Len” part having the counting function in the memory management table 42 in the DMA control unit 4 is set to “0”, predetermined control information is sent out, The DMA control unit 4 is started at the time when it is set in a predetermined control register in the control unit 4. The DMA controller 4 counts up the "Len" section every time data transfer is performed. On the other hand,
During the data transfer by the DMA controller 4, when the central processing unit (CPU) 1 issues an access instruction (read or write) to the main storage unit (MSU) 2, the central processing unit (CPU) 1 Then, it is checked whether or not the upper address of the access address (logical address) indicated by the access instruction matches the “Addr” portion of the access translation buffer (TLB) 10. The logical address (upper) is converted to a physical address, added to the lower address of the logical address to generate the physical address to be accessed, and the memory management table 42 in the DMA controller 4 Look at the "Len" section,
It is checked whether the lower address of the logical address specified by the access instruction does not exceed the area specified by the "Len" part in the DMA control unit 4, and it is determined that the lower address is within the area. Is detected by the detection means (area check) 43, the access instruction is executed with respect to the main storage device (MSU) 2 even though the DMA control unit 4 is transferring data. When the detection means 43 detects that the address indicated by the access instruction is outside the above-mentioned area or (that is, a trap is generated), an exception different from the normal access exception is generated. Then, the execution of the access instruction is temporarily held, and the process is shifted to another process, for example, another program. Then, the data transfer in the DMA control unit 4 proceeds, and the address specified by the access instruction is changed to the read or written area, or
When it is detected that the access instruction has been entered, the program shifts to the program of the stored access instruction, and operates to execute the stored access instruction. At this time, as described above, the attributes of the address translation buffer (TLB) 10 (non-readable, writable, normality of access to, etc.) are checked at the same time, and the validity of the access is confirmed. . As described above, the data input / output method using the address translation buffer (TLB) according to the present invention comprises a central processing unit (CPU), a main storage unit (MSU), and an input / output unit (I / O).
And a DMA control unit for transferring data between the main storage device (MSU) and the input / output device (I / O) .The memory management is performed by an address translation buffer (TLB), and data input / output is performed. In the computer system for performing the above, the input buffer managed by the DMA control unit and the memory management table holding the state of the output buffer are configured to correspond to, for example, the register of the address translation buffer (TLB), and the memory The "data length (Len)" part of the management table is controlled according to the data transfer amount, and while data is being read from the input / output device (I / O) into the input buffer, the data of the read portion is centrally processed. While the device (CPU) is reading or writing data in the output buffer to the input / output device (I / O), the written portion is added to the central processing unit (CPU).
There is a characteristic in that it is made to light. As described in detail above, the data input / output circuit using the address translation buffer (TLB) according to the present invention includes a central processing unit (CPU), a main storage unit (MSU), , An input / output device (I / O), the main storage device (MSU) and an input / output device (I / O).
O), a DMA control unit that transfers data to and from the computer system that manages memory using an address translation buffer (TLB) and inputs and outputs data.
For example, a memory management table that holds the state of the input buffer and the output buffer managed by the DMA control unit is configured to correspond to the register of the address translation buffer (TLB), and the “data length (data length)” of the memory management table is set. Len) '' part is controlled according to the data transfer amount, and while the data is being read from the input / output device (I / O) into the input buffer, the central processing unit (CPU) reads the data of the read portion. Or, while the data in the output buffer is being written to the input / output device (I / O), the written portion is written by the central processing unit (CPU). Central processing unit (CPU) for partial data that does not cause side effects even during transfer
This makes it possible to reduce the copy processing required by the conventional method when writing data, thereby improving the performance of the computer system.

【図面の簡単な説明】 【図1】本発明の原理説明図(その1) 【図2】本発明の原理説明図(その2) 【図3】本発明の原理説明図(その3) 【図4】本発明の一実施例を示した図(その1) 【図5】本発明の一実施例を示した図(その2) 【図6】従来のダイレクト・メモリ・アクセス制御部の
動作を説明する図 【符号の説明】 1 中央処理装置(CPU) 2 主記憶装置
(MSU) 10 アドレス変換バッファ(TLB) 3 入出力装置(I/O) 4 DMA 制御部 40 入力バッファ 41 出力バッフ
ァ 42,5 メモリ管理テーブル 43 検出手段 DMA 制御部への起動信号, 又は、起動指示 読み込み済の領域 書き出し済
の領域
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram illustrating the principle of the present invention (part 1). FIG. 2 is a diagram illustrating the principle of the present invention (part 2). FIG. 3 is a diagram illustrating the principle of the present invention (part 3). FIG. 4 is a diagram showing an embodiment of the present invention (part 1); FIG. 5 is a diagram showing an embodiment of the present invention (part 2); FIG. 6 is an operation of a conventional direct memory access control unit. [Explanation of symbols] 1 Central processing unit (CPU) 2 Main storage device
(MSU) 10 Address conversion buffer (TLB) 3 I / O device (I / O) 4 DMA control unit 40 Input buffer 41 Output buffer 42,5 Memory management table 43 Detecting means Start signal or start instruction to DMA control unit Read area Write area

フロントページの続き (56)参考文献 特開 昭59−178522(JP,A) 特開 平3−122746(JP,A) 特開 昭63−86057(JP,A) 特開 昭61−74051(JP,A) 特開 昭63−47825(JP,A) 特開 平4−308956(JP,A) 特公 昭61−32710(JP,B1) (58)調査した分野(Int.Cl.7,DB名) G06F 13/38 G06F 13/28 Continuation of front page (56) References JP-A-59-178522 (JP, A) JP-A-3-122746 (JP, A) JP-A-63-86057 (JP, A) JP-A-61-74051 (JP, A) , A) JP-A-63-47825 (JP, A) JP-A-4-308956 (JP, A) JP-B-61-3710 (JP, B1) (58) Fields investigated (Int. Cl. 7 , DB G06F 13/38 G06F 13/28

Claims (1)

(57)【特許請求の範囲】 【請求項1】主記憶装置と、論理アドレスの上位アドレ
スに対応する主記憶装置の物理アドレスを格納するベー
スレジスタを格納するセグメント方式のアドレス変換バ
ッファを設けた中央処理装置と、主記憶装置と入出力装
置との間のデータ転送を制御するDMA制御部と、を有
するデータ処理装置において、論理アドレスの上位アドレス部分でアドレス変換バッフ
ァを索引して出力されたアドレス部分を上位アドレス部
分とし、前記論理アドレスの下位アドレス部分を下位ア
ドレス部分として物理アドレスを生成する物理アドレス
生成手段と、 ベースレジスタが示す先頭アドレスからの相対位置を示
すカウンタを設け、主記憶装置と入出力装置との間での
DMA転送によるデータの転送毎にカウントアップする
カウント手段と、 DMA転送中に、中央処理装置から主記憶装置のDMA
転送領域へのアクセスにより生成された物理アドレスの
中の下位アドレスと、カウント手段によりカウントされ
たカウンタ値とを比較するアドレス比較手段と、 比較された結果、生成された物理アドレスの中の下位ア
ドレスがカウント値より小さいときには、アクセス領域
内として中央処理装置から主記憶装置のアクセスを実行
するアクセス実行手段とを有することを特徴とする デー
タ処理装置。
(57) [Claims] [Claim 1] A main storage device and an upper address of a logical address
Base for storing the physical address of the main storage device corresponding to the
In a data processing device having a central processing unit provided with a segment type address conversion buffer for storing a data register and a DMA control unit for controlling data transfer between a main storage device and an input / output device, a logical address Address translation buffer in address part
Address part output by indexing the
And the lower address part of the logical address is
Physical address that generates a physical address as the address part
Indicates the generation means and the relative position from the start address indicated by the base register
A counter between the main memory and the I / O device.
Counts up each time data is transferred by DMA transfer
Counting means; and, during a DMA transfer, a central processing unit (DMA) in a main storage device.
Of the physical address generated by accessing the transfer area
It is counted by the lower address in
Address comparing means for comparing the counter value with the lower address in the physical address generated as a result of the comparison.
When the dress is smaller than the count value, the access area
Access to main storage from central processing unit
A data processing device comprising:
JP06543392A 1992-03-24 1992-03-24 Data processing device Expired - Fee Related JP3517884B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP06543392A JP3517884B2 (en) 1992-03-24 1992-03-24 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP06543392A JP3517884B2 (en) 1992-03-24 1992-03-24 Data processing device

Publications (2)

Publication Number Publication Date
JPH05265942A JPH05265942A (en) 1993-10-15
JP3517884B2 true JP3517884B2 (en) 2004-04-12

Family

ID=13286976

Family Applications (1)

Application Number Title Priority Date Filing Date
JP06543392A Expired - Fee Related JP3517884B2 (en) 1992-03-24 1992-03-24 Data processing device

Country Status (1)

Country Link
JP (1) JP3517884B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860025A (en) * 1996-07-09 1999-01-12 Roberts; David G. Precharging an output peripheral for a direct memory access operation

Also Published As

Publication number Publication date
JPH05265942A (en) 1993-10-15

Similar Documents

Publication Publication Date Title
CN100592271C (en) Apparatus and method for high performance volatile disk drive memory access using an integrated DMA engine
JP4764360B2 (en) Techniques for using memory attributes
JP3180362B2 (en) Information processing device
US7426728B2 (en) Reducing latency, when accessing task priority levels
CN114579480A (en) Page missing processing method, device and system, electronic equipment and storage medium
JP2821345B2 (en) Asynchronous I / O control method
JP2829115B2 (en) File sharing method
JP3517884B2 (en) Data processing device
JPH06348593A (en) Data transfer controller
US4985826A (en) Method and device to execute two instruction sequences in an order determined in advance
JPS6319058A (en) Memory device
JP3187446B2 (en) Cache memory controller
US4628450A (en) Data processing system having a local memory which does not use a directory device with distributed resident programs and a method therefor
JPH03147157A (en) Information processor
JP3130798B2 (en) Bus transfer device
JP3425355B2 (en) Multiple write storage
JPH03656B2 (en)
JP2679440B2 (en) Information processing device
JPH07146814A (en) Memory device
JPS6138504B2 (en)
JP3068451B2 (en) Electronic computer
JP3061818B2 (en) Access monitor device for microprocessor
JP2000122968A (en) Input/output cache memory and its control method
JP2735400B2 (en) Asynchronous I / O control method
JPH0310343A (en) Hot spot data management processing system

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040119

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080206

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090206

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090206

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100206

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110206

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees