Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4257626B2 - Memory access device - Google Patents
[go: Go Back, main page]

JP4257626B2 - Memory access device - Google Patents

Memory access device Download PDF

Info

Publication number
JP4257626B2
JP4257626B2 JP27773599A JP27773599A JP4257626B2 JP 4257626 B2 JP4257626 B2 JP 4257626B2 JP 27773599 A JP27773599 A JP 27773599A JP 27773599 A JP27773599 A JP 27773599A JP 4257626 B2 JP4257626 B2 JP 4257626B2
Authority
JP
Japan
Prior art keywords
address
data
indirect
main storage
storage device
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
JP27773599A
Other languages
Japanese (ja)
Other versions
JP2001101072A (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 JP27773599A priority Critical patent/JP4257626B2/en
Publication of JP2001101072A publication Critical patent/JP2001101072A/en
Application granted granted Critical
Publication of JP4257626B2 publication Critical patent/JP4257626B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、仮想記憶方式にメモリバッファ制御を適用したメモリアクセス装置に関する。
【0002】
【従来の技術】
あるデバイスがメモリ空間上にある開始アドレスと終了アドレスとにはさまれた空間を開始アドレスから終了アドレスまでをアクセスし、繰り返し、開始アドレスに戻るように、リング状にアクセスするメモリアクセス装置が知られている。
このようなメモリ資源の使用方法は、データのフロー制御等で一時的にデータを保持しておくリングバッファとしてよく用いられている。
【0003】
このようなリングバッファを用いることにより、メモリ資源を効率よく使用することができ、しかもアドレス変換の制御が簡単になる。
また、計算機アーキテクチャにおいて、主記憶装置の一部を使い、プログラムが仮想的に連続エリアとしてメモリをアクセスする考え方がある。仮想記憶方式はこの考え方に基づいた方式であって、デバイスが論理アドレスを指定し、所定のアドレス変換テーブルを参照することにより、その論理アドレスを主記憶装置の物理アドレスに変換する方式である。その代表的な方式としてページング方式がある。
【0004】
この仮想記憶方式は一般的にソフト制御で行われるが、ハード制御によるリングバッファ制御にも応用でき、上位変換テーブルを動的に書き換えることによりリングバッファを実現することができる。
【0005】
【発明が解決しようとする課題】
ところで、従来のこのようなメモリアクセス装置では、2つのデバイスが同じメモリ空間をアクセスする場合、データ読み出しのための入力デバイスとデータ書き込み用の出力デバイスとでアクセスすべきメモリ空間が異なることが考えられる。このため、アドレス変換テーブルを複数備える必要がある。
【0006】
また、高速化のため、F/F(フリップフロップ)回路などでアドレス変換テーブルを構成した場合、アドレス変換テーブルを書き換える必要があることから複数のデバイスがF/F回路等を共通に使うことができず、デバイス毎に設ける必要がある。このため、回路規模が大きくなってしまう。
従って、できるだけ回路規模が大きくならないようにリングバッファ制御を行えるようにすることが好ましい。
【0007】
【課題を解決するための手段】
本発明は以上の点を解決するため次の構成を採用する。
〈構成1〉
請求項1の発明に係るメモリアクセス装置は、連続した論理アドレスを、アドレス変換テーブルを用いて主記憶装置のメモリ空間の物理アドレスに変換することにより主記憶装置のメモリ空間を連続エリアと仮想する仮想記憶方式を、主記憶装置における所定のメモリ空間をリング構造とみなして周回するようにアクセスする制御方式に適用して前記主記憶装置のメモリ空間をアクセスするものにおいて、前記アドレス変換テーブルには、複数のアドレスが格納され、前記主記憶装置に対するアクセスを要求するデバイス毎に間接テーブルを備え、該間接テーブルが、アドレス変換テーブルのアドレスを指定する複数のアドレスデータを格納し、対応するデバイスからのアクセスが終了したときに格納されたアドレスデータが所定テーブルのテーブルサイズの中で周回するように更新され、前記間接テーブルの前記テーブルサイズは、前記アドレス変換テーブルのテーブルサイズよりも小さく、前記間接テーブルの複数のアドレスデータのアドレス総数は、前記アドレス変換テーブルのテーブルサイズと等しく、前記アドレスデータが、アドレスの総数の周期で周回するように、前記間接テーブルが更新されるように構成されている。
【0008】
〈構成2〉
請求項2の発明に係るメモリアクセス装置では、前記デバイスのアクセス終了後、間接テーブルに格納されたアドレス変換テーブルのアドレスデータが所定テーブルサイズの中で周回するように間接テーブルを更新する間接テーブル更新手段を備えている。
【0009】
〈構成3〉
請求項3の発明に係るメモリアクセス装置では、連続した論理アドレスを、アドレス変換テーブルを用いて主記憶装置のメモリ空間の物理アドレスに変換することにより主記憶装置のメモリ空間を連続エリアと仮想する仮想記憶方式を、主記憶装置における所定のメモリ空間をリング構造とみなして周回するようにアクセスする制御方式に適用して前記主記憶装置のメモリ空間をアクセスするメモリアクセス装置において、前記主記憶装置に対するアクセスを要求するデバイス毎に間接テーブルを備え、該間接テーブルは、アドレス変換テーブルのアドレスを指定するアドレスデータを格納し、対応するデバイスからのアクセスが終了したときに格納されたアドレスデータが所定テーブルのテーブルサイズの中で周回するように更新されるように構成され、前記デバイスのアクセス終了後、前記間接テーブルに格納されたアドレス変換テーブルのアドレスデータが所定テーブルサイズの中で周回するように前記間接テーブルを更新する間接テーブル更新手段を備え、前記間接テーブル更新手段が、間接テーブルに格納されたアドレス変換テーブルのアドレスデータに間接テーブルのテーブルサイズを加算する加算手段と、該加算手段により加算された加算データをアドレス変換テーブルのテーブルサイズから減算する減算手段と、該減算手段による減算の結果、減算データが零未満のときは、格納されたアドレス変換テーブルのアドレスデータを加算データに書き換え、減算データが零のときは、格納されたアドレス変換テーブルのアドレスデータを零に書き換える書き換え手段と、を備えている。
【0010】
〈構成4〉
請求項4の発明に係るメモリアクセス装置では、主記憶装置にデータを書き込む書き込み要求が書き込み用デバイスからあり、主記憶装置からデータを読み出す読み出し要求が読み出し用デバイスからあったとき、主記憶装置へのアクセスの競合を回避するように、前記書き込み用デバイス及び読み出し用デバイスのアクセスを制御するアクセス制御手段を備えている。
【0011】
〈構成5〉
請求項5の発明に係るメモリアクセス装置では、前記アクセス制御手段が、書き込み用デバイスによってデータが書き込まれた書き込みアドレスと読み出し用デバイスによってデータが読み出された読み出しアドレスとを比較して主記憶装置に書き込み可能な領域があるか読み出し可能なデータがあるかを判定する判定手段と、該判定手段により、書き込み可能な領域があると判定されたときは、書き込み用デバイスに書き込みを許可する書き込み要求許可手段と、前記判定手段により、読み出し可能なデータがあると判定され、書き込み用デバイスが書き込み要求をしていないときに読み出し用デバイスに読み出しを許可する読み出し要求許可手段と、を備えている。
【0012】
〈構成6〉
請求項6の発明に係るメモリアクセス装置では、前記間接テーブルに格納されているアドレスデータの更新すべきデータを予め演算して格納するレジスタテーブルを備えている。
【0013】
【発明の実施の形態】
以下、本発明の実施の形態を具体例を用いて説明する。
〈具体例1〉
具体例1は、間接テーブルをデバイス毎に備え、デバイスがアドレス変換テーブルを間接的に参照することにより、アクセス空間が異なるデバイスが複数存在するときでもアドレス変換テーブルを1つにすることができるようにしたものである。
【0014】
図1は、具体例1の構成を示すブロック図である。
主記憶装置100は、例えばプログラムを展開するための実記憶空間を有するメモリである。
【0015】
上位アドレス変換テーブル200は、ページング方式により連続した論理アドレス(仮想アドレス)を主記憶装置100の物理アドレス(実アドレス)に変換するためのテーブルであり、CPU500によってデータの読み書きが可能なレジスタを備えて構成されている。このレジスタに、主記憶装置100の使用可能エリアの上位アドレスが格納される。
【0016】
デバイス300A,Bは、主記憶装置100に読み書きするためのデバイスであり、それぞれデータ転送部301Aを備えている。
尚、具体例1では、デバイス300Aは外部からデータを取り込んで主記憶装置100に書き込む入力専用の入力デバイス、デバイス300Bは主記憶装置100に書き込まれたデータを読み出して外部に出力する出力専用の出力デバイスとして説明する。
【0017】
テーブル参照部400は、デバイス300A,Bが上位アドレス変換テーブル200を参照できるように制御するブロックであり、間接テーブル410A,Bと、間接テーブル更新部420A,Bと、終了アドレス検出部430A,Bと、アービタ440と、を備えて構成されている。
【0018】
間接テーブル410A,Bは、それぞれデバイス300A,Bに対応するように備えられ、CPU500によってデータの読み書きが可能なレジスタによって構成されたテーブルである。間接テーブル410A,Bの各レジスタには上位アドレス変換テーブル200のアドレスが格納される。
【0019】
間接テーブル更新部420A,Bは、それぞれ間接テーブル410A,Bを更新してリングバッファ処理を行うための間接テーブル更新手段である。
間接テーブル410A,B及び間接テーブル更新部420A,Bの詳細な構成については後述する。
【0020】
アービタ440は、デバイス300A,Bのメモリアクセスの競合を回避するためのブロックである。アービタ440の詳細な構成については後述する。
終了アドレス検出部430A,Bは、それぞれデバイス300A,Bの書き込み又は読み出しが終了したことを示す終了アドレスを検出するブロックであり、デバイス300A,Bから出力されたデータの終了アドレスを検出し、間接テーブル更新部420A,Bに終了タイミング信号を出力する。
【0021】
CPU500は、主記憶装置100、上位アドレス変換テーブル200及び間接テーブル410A,Bを制御するとともに、上位アドレス変換テーブル200、間接テーブル410A,Bに対してデータの読み書きを行う演算装置である。
【0022】
次に、間接テーブル更新部420A,B及び間接テーブル410A,Bの構成について説明する。
図2は間接テーブル410A,B及び間接テーブル更新部420A,Bの構成を示すブロック図である。
【0023】
具体例1の間接テーブル410A,Bは、それぞれ4つのレジスタ411a〜dを備えている。このレジスタ411a〜dにそれぞれ上位アドレス変換テーブルのアドレスが格納される。
間接テーブル更新部420A,Bは、書き込みタイミング発生部421と、セレクタ422と、演算部423と、を備えている。
書き込みタイミング発生部421は、終了アドレス検出部430A又はBから終了タイミング信号を入力して間接テーブル410A,Bのデータを書き換える書き換えタイミング信号を作成し、この書き換えタイミング信号を各レジスタ411a〜dに出力する。
【0024】
セレクタ422は、間接テーブル410A,Bの各レジスタ411a〜dのデータの演算部423への出力を切り換えるものである。
演算部423は、更新データを演算するものである。
【0025】
図3は具体例1の演算部423の構成を示すブロック図である。
演算部423は、加算器425と、減算器426と、比較器427と、セレクタ428と、を備えて構成されている。
【0026】
加算器425は、各レジスタ411a〜dのデータと間接テーブル長とを入力して両データの加算を行う加算手段である。尚、この間接テーブル長は、間接テーブル410A,Bのサイズを示すデータであり、具体例1の間接テーブル長は「4」である。
減算器426は、加算器425の出力データが上位アドレス変換テーブル長を越えるかどうかを判定するために、上位アドレス変換テーブル長から加算器425の出力データを減算する減算手段である。尚、上位アドレス変換テーブル長は上位アドレス変換テーブル200のサイズを示すデータである。
【0027】
セレクタ428は、比較器427によって制御されて加算器425の出力データ及び減算器426の出力データのうち、いずれか一方を選択出力するものである。
比較器427は、減算器426によって減算された減算データを“0”と比較することにより加算器425の加算データが上位アドレス変換テーブル長と等しいかどうかを判定し、加算器425の出力データが上位アドレス変換テーブル長と等しくないときは、セレクタ428から加算器425の出力データが出力され、等しいときは減算器426の出力データが出力されるようにセレクタ428を制御する。
このセレクタ428と比較器427とが書き換え手段に相当する。
【0028】
次に、アービタ440の構成について説明する。
図4は、具体例1のアービタ440の構成を示すブロック図である。
書き込みアドレス記憶部441は、間接テーブル410Aに最後に書き込んだアドレスに、1を加えたアドレスを保持するブロックである。
【0029】
読み出しアドレス記憶部442は、間接テーブル410Bから最後に読み出したアドレスに、1を加えたアドレスを保持するブロックである。
セレクタ443は、デバイス300Aから書き込み要求信号が入力されたとき、書き込み要求を行ったデバイス300Aからのアドレス及び書き込みアドレス記憶部441により保持されたアドレスのうち、いずれか一方を書き込みアドレスとして選択出力するブロックである。
【0030】
セレクタ444は、デバイス300Bから読み出し要求信号が入力されたとき、読み出し要求を行ったデバイス300Bからのアドレス及び書き込みアドレス記憶部441により保持されたアドレスのうち、いずれか一方を読み出しアドレスとして選択出力するブロックである。
【0031】
アドレス比較部445は、セレクタ443から出力された書き込みアドレス及びセレクタ444から出力された読み出しアドレスを比較することにより書き込み可能な領域があるか読み出し可能なデータがあるかを判定する判定手段であり、書き込み可能な領域があると判定したときは、書き込み要求受付信号作成部446に書き込み可能信号を出力し、読み出し可能なデータがあると判定したときは、読み出し要求受付信号作成部447に読みだし可能信号を出力する。
【0032】
書き込み要求受付信号作成部446は、デバイス300A、アドレス比較部445から、それぞれ書き込み要求信号、書き込み可能信号が入力されたとき、デバイス300Aにデータの書き込みを許可する書き込み受付信号を出力する書き込み要求許可手段である。また、書き込み要求受付信号作成部446は、データの書き込み中、読み出し要求受付信号作成部447に書き込み中信号を出力する。
【0033】
読み出し要求受付信号作成部447は、デバイス300B、アドレス比較部445から、それぞれ読み出し要求信号、読み出し可能信号が入力され、さらに書き込み要求受付信号作成部446から書き込み中信号が出力されていないときに、デバイス300Bにデータの読み出しを許可する読み出し受付信号を出力する読み出し要求許可手段である。
【0034】
〈動作〉
ページング方式では、プログラムを主記憶装置100上に展開して動作させるとき、プログラムが一定の長さのいくつかのページに区切られて主記憶装置100上に配置される。従って、プログラムが格納されているエリアは、メモリ資源を確保するため、通常は不連続となる。
このため、上位アドレス変換テーブル200を使用して連続した論理アドレスが主記憶装置100上の物理アドレスに変換される。
【0035】
図5は、具体例1の動作説明図である。
尚、具体例1では、分かりやすくするため、この図5に示すようにプログラムが256×4のサイズで収まるものとして説明する。
また、主記憶装置100は32ビットのアドレス空間を有し、1エリアは、256(8ビット)毎に区切られているものとし、デバイス300A,Bがアクセスできるアドレス空間を10ビット、使用できるエリアをエリア0〜6の7エリアとする。従って、上位アドレス変換テーブル長は、「7」となる。尚、ここでは、1ワードのビット数は特に限定されない。
【0036】
この場合、プログラムのアドレス空間は256×4なので8+2=10ビットということになる。下位8ビットは主記憶装置100のアドレスとしてそのまま使用することができるので変換するのは上位2ビットとなる。
【0037】
このプログラム空間の上位2ビットのアドレスが上位アドレス変換テーブル200のアドレスとなる。テーブルの大きさは、テーブル1アドレス当たりのビット数は主記憶装置100の上位24ビットであり、これが4つ分(アドレス分)ということになる。また、上位アドレス変換テーブル200のレジスタ210〜216には、それぞれ主記憶装置100のエリア0〜6の上位24ビットのアドレスデータが入力される。
【0038】
このように、上位2ビットのアドレスを上位アドレス変換テーブル200を通して変換し、下位のアドレスをそのまま使用することにより、あたかもプログラムがエリア0のアドレスから起動されたように動作させることができる。
具体的に、アドレス変換を行うには、まず、上位アドレス変換テーブル200の各レジスタ210〜216に、それぞれ主記憶装置100のエリア0〜6の上位アドレスを格納し、主記憶装置100上でのデバイスが使用可能なエリア0〜6を上位アドレス変換テーブル200の各レジスタ210〜216に割り当てる。これはプログラムによって実行される。
【0039】
このように割り当てが行われた後、プログラムによってデバイス300A用の間接テーブル410Aの初期化が行われる。
間接テーブル410Aの初期化を行うには、デバイス300A用の間接テーブル410Aのレジスタ411aに上位アドレス変換テーブル200のレジスタ210を指定するデータ“0”をセットする。同様にして間接テーブル410Aのレジスタ411b〜dに、それぞれ上位アドレス変換テーブル200のレジスタ211〜213を指定するデータ“1”〜“3”をセットする。
【0040】
デバイス300B用の間接テーブル410Bについても同様に初期化が行われる。
間接テーブル410Aの初期化後、プログラムによりデバイス300Aに起動をかけて入力動作を開始させる。
デバイス300Aが入力動作を開始して主記憶装置100にデータを書き込むとき、アドレス変換が行われる。
【0041】
図5の例では、デバイス300Aによって例えばヘクサ表現でアドレス「0x2a5」(「0x」はヘクサ表現であることを示す。)が指定される。このとき、上位2ビットは「2」であるので、間接テーブル410Aのアドレスは「2」となり、レジスタ411cのデータ「2」が得られる。このデータ「2」が上位アドレス変換テーブル200のアドレスデータとなる。
【0042】
このアドレスデータ「2」に基づいて上位アドレス変換テーブル200のレジスタに格納されているデータ「0X000007」が得られる。
このデータ「0X000007」は、主記憶装置100の上位24ビットのアドレスデータであるので、このデータ「0X000007」とデバイス300Bの下位8ビットのデータ「0xa5」に基づいて主記憶装置100のアドレス「0X000007a5」が得られる。
【0043】
そして、このアドレス「0X000007a5」を指定して主記憶装置100のエリア6に格納されているデータが読み出される。
主記憶装置100へのデータの書き込みが終了したとき、アクセスの終了タイミングが終了アドレス検出部430によって検出され、終了信号が間接テーブル410Aの書き込みタイミング発生部421に入力される。
【0044】
間接テーブル更新部420Aはこの信号をトリガとして間接テーブル410Aのデータを更新する。
更新は以下のようにして行われる。
まず、セレクタ422が制御されて間接テーブル410Aのレジスタ411aのデータが演算部423に入力される。
【0045】
演算部423では、このデータに間接テーブル長が加算器425により加算される。
例えば、レジスタ411aに格納されているデータが「0」のときは、データ「0」に「4」が加算されて「4」となる。このときは、更新されたデータ「4」がレジスタ411aに格納される。
【0046】
同じようにして、セレクタ422が切り換えられ、間接テーブル410Aのレジスタ411a〜dに格納されているデータが順次更新される。
間接テーブル410Aのレジスタに格納されているデータが「3」のときは、加算値は「3」+「4」=「7」となり、上位アドレス変換テーブル長と等しくなる。このときは、セレクタ422が比較器427によって切り換えられてデータ「0」が出力される。
このようにして主記憶装置100のエリア6を越えないように、間接テーブル410Aの更新が行われる。
【0047】
図6は間接テーブル410Aの遷移を説明するための説明図である。
図6に示すように、状態1では、間接テーブル410Aのレジスタ411a〜dには、それぞれ上位アドレス変換テーブル200のアドレスデータ0〜3がセットされている。間接テーブル410Aが更新されたとき、間接テーブル410Aの各レジスタ411a〜dが書き換えられて状態1は状態2のように変化し、この状態2において、さらに間接テーブル410Aが更新されて状態3のように変化する。
【0048】
読み出しができる程度にデータが蓄積されたとき、今度は、デバイス300Bを起動する。このときも同じようにしてアドレス変換が行われ、データの読み出しが行われる。
【0049】
そして、デバイス300Bによる主記憶装置100からのデータの読み出しが終了したときは、書き込み終了時と同様に読み出しアクセスの終了タイミングが終了アドレス検出部430によって検出され、終了タイミング信号が間接テーブル410Aの書き込みタイミング発生部421に入力される。この信号がトリガとなって書き込みタイミング発生部421から書き換えタイミング信号が出力され、間接テーブル410Aのデータが更新される。
【0050】
デバイス300Aにより書き込み要求が行われたとき、あるいはデバイス300Bによって読み出し要求が行われたとき、アービタ440によってメモリアクセスがコントロールされ、メモリアクセスの競合が回避される。
【0051】
例えば、デバイス300Aからアービタ440に書き込み要求信号が入力されてデバイス300Aにより書き込み要求が行われたとき、アドレス比較部445によって書き込みアドレスと読み出しアドレスとが比較される。そして、書き込みアドレスが読み出しアドレスよりも小さいときは、書き込み領域があると判定されてアドレス比較部445から書き込み要求受付信号作成部446に書き込み可能信号が出力される。
【0052】
この書き込み可能信号が書き込み要求受付信号作成部446に出力されたとき、書き込み受付信号が書き込み要求受付信号作成部446からデバイス300Aに出力され、デバイス300Aにより主記憶装置100へのデータの書き込みが行われる。
【0053】
同様に、デバイス300Bからアービタ440に読み出し要求信号が入力されて読み出し要求が行われたとき、書き込みアドレスが読み出しアドレスよりも小さいときは、読み出すデータがあるとアドレス比較部445によって判定され、アドレス比較部445から書き込み要求受付信号作成部446に書き込み可能信号が出力される。そして、書き込み要求受付信号作成部446から書き込み中信号が出力されていないときは、読み出し要求受付信号作成部447からデバイス300Bに読み出し受付信号が出力され、デバイス300Bにより主記憶装置100からデータの読み出しが行われる。
【0054】
一方、書き込みアドレスが読み出しアドレスよりも大きいときは、デバイス300Aから書き込み要求信号が入力されても書き込み領域はないとアドレス比較部445によって判定され、アドレス比較部445から書き込み可能信号は出力されない。また、デバイス300Bから読み出し要求信号が入力されても読み出すデータはないとアドレス比較部445によって判定されて読み出し可能信号は出力されない。このようにしてメモリアクセスの競合が回避され、デバイス300Aが主記憶装置100にデータを書き込む前にデバイス300Bによってデータの読み出しが行われないようになる。
【0055】
〈具体例1の効果〉
以上、説明したように具体例1によれば、間接テーブル410A,Bをデバイス300A,B毎に備え、上位アドレス変換テーブル200を間接的に参照するようにしたので、上位アドレス変換テーブル200を複数設ける必要がなく、回路規模を大幅に削減することができる。
【0056】
ここで、アドレス変換を目的とするテーブルを上位アドレス変換テーブルのみで構成する場合と間接テーブルを追加して構成する場合とで、その回路規模を比較する。
【0057】
尚、ここでも、主記憶装置のメモリ空間を32ビットのアドレス空間、1エリアのアドレス空間を8ビット、デバイスのアクセスできるアドレス空間を10ビットとし、使用できるエリア数を7つとする。
【0058】
各テーブルをF/F回路で構成した場合、1つの上位アドレス変換テーブルは24×7ビットとなる。デバイスが2つのとき、これを2つ使うので、F/F回路24×7×2=336の数だけ必要となる。
これに対して、間接テーブルを設けた場合、上位アドレス変換テーブルは1つで済むため、F/F回路は、24×7+3×4×2=192の数で済み、回路規模を削減できることになる。
【0059】
尚、具体例1では、デバイスを2つとしたので、2つの間接テーブルを必要としたが、間接テーブルの数はこの具体例1には限定されない。また、テーブル長も各デバイスのアクセス空間に応じて増減することもできる。
【0060】
また、上位アドレス変換テーブルも主記憶装置の使用可能エリアの数に応じて増減することができ、主記憶装置の使用可能エリア取得の範囲を制限する事でテーブルの各アドレスのビット数を減らすことが可能になる。
【0061】
例えば、主記憶装置のメモリアドレス空間が32ビットで使用可能エリアが常に主記憶装置のアドレス空間の後半と制限すれば、最上位の1ビットは常に固定となるためテーブルの全てのアドレスで最上位の1ビットを省くことができる。
【0062】
また、デバイス空間が使用可能エリアの空間より大きい場合でも間接テーブルをデバイス空間に合わせたテーブル長にすれば処理可能となる。
例えば、デバイスのアドレス空間が4エリア分で実際に使えるエリアが3つのときは、間接テーブルの内容を“0”、“1”、“2”、“0”というように設定することにより、リングバッファとして使用可能となる。
【0063】
また、間接テーブル更新部の演算部も間接テーブルのアドレス分備えることもでき、このようにすれば間接テーブルの更新を全て同時に行える。一方、間接テーブル更新部のセレクタの入力数を増やし、書き込みタイミング発生部を全デバイス共通のものにすることにより、全デバイスの間接テーブルの更新用の演算部が1つで済むことになる。
【0064】
また、具体例1では、間接テーブル更新部の演算部をハードウェア構成としたが、ソフトウェアによって構成することもできる。
図7はその動作を示すフローチャートである。
ステップ(図中、ステップを「S」と記す。)1では、間接テーブル410A(又はB)のデータを入力する。
【0065】
ステップ2では、間接テーブル410Aのデータと間接テーブル長を加算する。
ステップ3では、この加算値を上位アドレス変換テーブル長と比較する。
そして、加算値が上位アドレス変換テーブル長よりも大きいときは、ステップ4に進み、上位アドレス変換テーブル長から加算値を減算する。
【0066】
ステップ5では、この値を出力する。
また、加算値が上位アドレス変換テーブル長を越えたときは、ステップ6に進み、変数Bに加算値を代入し、ステップ5に進んでこの変数Bを出力する。
このように、演算部423をソフトウェアによって構成することもできる。
【0067】
〈具体例2〉
具体例2は、更新時間を短縮するため、間接テーブルの各レジスタと対応するレジスタテーブルを備え、あらかじめ更新用のデータを演算させてレジスタテーブルに格納するようにしたものである。
【0068】
図8は、具体例2の構成を示すブロック図である。
具体例2の間接テーブル更新部420A,Bは、それぞれ書き込み可能なレジスタ452a〜dを有するレジスタテーブル450を備えている。
尚、具体例1と同一要素については同一符号を付して説明を省略する。
【0069】
〈動作〉
次に具体例2の更新動作を説明する。
具体例2では、間接テーブル410A(又はB)の更新前に、間接テーブル410Aのレジスタ411aのデータを読み取り、演算部423により更新データが作成される。
尚、具体例2においても、演算部423をハードウェアにより構成してもよいし、ソフトウェアによって構成してもよい。
【0070】
そして、この演算結果がレジスタテーブル450のレジスタ452aに書き込まれる。
同様にして間接テーブル410Aのレジスタ411b〜dについてもデータが読み取られ、演算結果が各レジスタテーブル450の452b〜dに書き込まれる。
【0071】
間接テーブル410Aの更新時、書き込みタイミング発生部421から書き換えタイミング信号が出力されたとき、このレジスタテーブル450のレジスタ452a〜dのデータが間接テーブル410Aの各レジスタ411a〜dに同時に出力され、コピーされる。
【0072】
尚、間接テーブル410の書き換えタイミングは、割り込み信号等を用いてCPU500にも通知される。
レジスタテーブル450から間接テーブル410へのコピーは通常1クロックで終了する。
そして、コピー終了後、次の更新に備えて再び更新用データがレジスタテーブル450に書き込まれる。
このように、レジスタテーブル450の書き換え、レジスタテーブル450から間接テーブル410Aへのコピーを繰り返すことによりリングバッファが実現される。
【0073】
〈具体例2の効果〉
以上、説明したように具体例2によれば、レジスタが間接テーブル410A,Bの各レジスタと対応するレジスタテーブル450を備え、あらかじめ演算した更新用データを間接テーブル410A,Bの更新時、同時に更新するようにしたので、更新時間を大幅に短縮することができる。従って、デバイス300A,Bは主記憶装置100を、高速かつ連続的にアクセスすることができる。
【図面の簡単な説明】
【図1】具体例1の構成を示すブロック図である。
【図2】具体例1の間接テーブル及び間接テーブル更新部の構成を示すブロック図である。
【図3】具体例1の演算部(間接テーブル更新部)の構成を示すブロック図である。
【図4】具体例1のアービタの構成を示すブロック図である。
【図5】具体例1の動作説明図である。
【図6】具体例1の間接テーブルの遷移を示す説明図である。
【図7】具体例1の演算部をソフトウェアで構成した場合のその動作を示すフローチャートである。
【図8】具体例2の間接テーブル及び間接テーブル更新部の構成を示すブロック図である。
【符号の説明】
100 主記憶装置
200 上位アドレス変換テーブル
300A,B デバイス
400 テーブル参照部
410 間接テーブル
420 間接テーブル更新部
440 アービタ
450 レジスタテーブル
500 CPU
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a memory access device in which memory buffer control is applied to a virtual storage system.
[0002]
[Prior art]
A memory access device that accesses a ring in such a way that a device accesses a space between a start address and an end address in a memory space from the start address to the end address and repeatedly returns to the start address. It has been.
Such a method of using memory resources is often used as a ring buffer for temporarily holding data by data flow control or the like.
[0003]
By using such a ring buffer, memory resources can be used efficiently, and control of address translation is simplified.
In the computer architecture, there is a concept that a part of the main storage device is used and the program accesses the memory as a virtual continuous area. The virtual storage system is a system based on this concept, in which a device designates a logical address and refers to a predetermined address conversion table to convert the logical address into a physical address of the main storage device. A typical method is a paging method.
[0004]
This virtual storage method is generally performed by software control, but it can also be applied to ring buffer control by hardware control, and a ring buffer can be realized by dynamically rewriting the upper conversion table.
[0005]
[Problems to be solved by the invention]
By the way, in such a conventional memory access device, when two devices access the same memory space, it is considered that the memory space to be accessed is different between the input device for reading data and the output device for writing data. It is done. For this reason, it is necessary to provide a plurality of address conversion tables.
[0006]
In addition, when the address conversion table is configured with an F / F (flip-flop) circuit or the like for speeding up, it is necessary to rewrite the address conversion table, so that a plurality of devices commonly use the F / F circuit or the like. This is not possible and must be provided for each device. For this reason, the circuit scale becomes large.
Therefore, it is preferable to perform ring buffer control so that the circuit scale is not as large as possible.
[0007]
[Means for Solving the Problems]
The present invention adopts the following configuration in order to solve the above points.
<Configuration 1>
The memory access device according to the first aspect of the present invention virtualizes the memory space of the main storage device as a continuous area by converting continuous logical addresses into physical addresses of the memory space of the main storage device using an address conversion table. The virtual storage system is applied to a control system that accesses a predetermined memory space in the main storage device so as to circulate as a ring structure, and accesses the memory space of the main storage device. The address conversion table stores a plurality of addresses. And an indirect table for each device that requests access to the main storage device, and the indirect table specifies an address of the address conversion table. plural Address data is stored, and when the access from the corresponding device is completed, the address data stored in the specified table Table Updated to go around in size, The table size of the indirect table is smaller than the table size of the address conversion table, the total number of addresses of the plurality of address data in the indirect table is equal to the table size of the address conversion table, and the address data is The indirect table is updated to circulate in the total number of cycles. It is configured as follows.
[0008]
<Configuration 2>
In the memory access device according to the second aspect of the present invention, after the access of the device is completed, the indirect table update is performed so that the address data of the address conversion table stored in the indirect table circulates within a predetermined table size. Means.
[0009]
<Configuration 3>
In the memory access device according to the invention of claim 3, A virtual storage system that virtualizes the memory space of the main storage device as a continuous area by converting continuous logical addresses into physical addresses of the memory space of the main storage device using an address conversion table, and a predetermined memory in the main storage device In a memory access device for accessing the memory space of the main storage device by applying to a control method for accessing the space so as to circulate considering the space as a ring structure, an indirect table is provided for each device that requests access to the main storage device. The indirect table stores address data specifying the address of the address conversion table and is updated so that the stored address data circulates within the table size of the predetermined table when access from the corresponding device is completed. And after the end of access to the device, With an indirect table updating means for address data of the serial indirect table stored address conversion table to update the indirect table so as to surround in a predetermined table size, The indirect table updating means adds an indirect table table size to the address conversion table address data stored in the indirect table, and subtracts the addition data added by the addition means from the address conversion table table size. Subtracting means, and when the subtraction data is less than zero as a result of subtraction by the subtracting means, the address data in the stored address conversion table is rewritten to addition data, and when the subtraction data is zero, the stored address conversion Rewriting means for rewriting the address data of the table to zero.
[0010]
<Configuration 4>
In the memory access device according to the fourth aspect of the present invention, when the write request for writing data to the main storage device is from the write device and the read request for reading data from the main storage device is from the read device, the read request is sent to the main storage device. Access control means for controlling access to the writing device and the reading device so as to avoid access conflicts.
[0011]
<Configuration 5>
In the memory access device according to the invention of claim 5, the access control means compares the write address where the data is written by the write device with the read address where the data is read by the read device, and the main memory device Determining means for determining whether there is a writable area or readable data, and when the determining means determines that there is a writable area, a write request for permitting writing to the writing device A permission unit, and a read request permission unit that permits the read device to permit reading when it is determined by the determination unit that there is data that can be read and the write device does not request writing.
[0012]
<Configuration 6>
According to a sixth aspect of the present invention, there is provided a memory access device comprising a register table for previously calculating and storing data to be updated of address data stored in the indirect table.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described using specific examples.
<Specific example 1>
Specific Example 1 includes an indirect table for each device, and the device indirectly refers to the address conversion table, so that even when there are a plurality of devices having different access spaces, one address conversion table can be obtained. It is a thing.
[0014]
FIG. 1 is a block diagram illustrating a configuration of the first specific example.
The main storage device 100 is a memory having a real storage space for developing a program, for example.
[0015]
The upper address conversion table 200 is a table for converting a continuous logical address (virtual address) into a physical address (real address) of the main storage device 100 by a paging method, and includes a register that allows the CPU 500 to read and write data. Configured. In this register, the upper address of the usable area of the main storage device 100 is stored.
[0016]
The devices 300A and 300B are devices for reading from and writing to the main storage device 100, and each include a data transfer unit 301A.
In the first specific example, the device 300A is an input-only input device that captures data from the outside and writes it to the main storage device 100, and the device 300B is an output-only device that reads out the data written to the main storage device 100 and outputs it to the outside It will be described as an output device.
[0017]
The table reference unit 400 is a block that controls the devices 300A and 300B to refer to the upper address conversion table 200. The indirect tables 410A and B, the indirect table update units 420A and B, and the end address detection units 430A and B And an arbiter 440.
[0018]
The indirect tables 410A and 410B are tables that are provided so as to correspond to the devices 300A and 300B, respectively, and are configured by registers in which the CPU 500 can read and write data. The addresses of the upper address conversion table 200 are stored in the registers of the indirect tables 410A and 410B.
[0019]
The indirect table update units 420A and 420B are indirect table update means for updating the indirect tables 410A and B, respectively, and performing ring buffer processing.
Detailed configurations of the indirect tables 410A and 410B and the indirect table update units 420A and 420B will be described later.
[0020]
The arbiter 440 is a block for avoiding a memory access conflict of the devices 300A and 300B. The detailed configuration of the arbiter 440 will be described later.
The end address detection units 430A and 430B are blocks for detecting an end address indicating that the writing or reading of the devices 300A and 300B has ended, respectively, and detect the end address of the data output from the devices 300A and 300B. An end timing signal is output to the table updating units 420A and 420B.
[0021]
The CPU 500 is an arithmetic unit that controls the main storage device 100, the upper address conversion table 200, and the indirect tables 410A and B, and reads and writes data from and to the upper address conversion table 200 and the indirect tables 410A and B.
[0022]
Next, the configuration of the indirect table update units 420A and B and the indirect tables 410A and B will be described.
FIG. 2 is a block diagram showing the configuration of the indirect tables 410A and 410B and the indirect table update units 420A and 420B.
[0023]
Each of the indirect tables 410A and B of the first specific example includes four registers 411a to 411d. The addresses of the higher-order address conversion table are stored in the registers 411a to 411d, respectively.
The indirect table update units 420A and 420B include a write timing generation unit 421, a selector 422, and a calculation unit 423.
The write timing generation unit 421 receives the end timing signal from the end address detection unit 430A or B and creates a rewrite timing signal for rewriting the data in the indirect tables 410A and B, and outputs the rewrite timing signal to the registers 411a to 411d. To do.
[0024]
The selector 422 switches the output of the data of the registers 411a to 411d of the indirect tables 410A and B to the arithmetic unit 423.
The calculation unit 423 calculates update data.
[0025]
FIG. 3 is a block diagram illustrating a configuration of the calculation unit 423 of the first specific example.
The calculation unit 423 includes an adder 425, a subtracter 426, a comparator 427, and a selector 428.
[0026]
The adder 425 is an adding unit that inputs the data of the registers 411a to 411d and the indirect table length and adds the two data. The indirect table length is data indicating the sizes of the indirect tables 410A and B, and the indirect table length in the first specific example is “4”.
The subtractor 426 is subtracting means for subtracting the output data of the adder 425 from the upper address conversion table length in order to determine whether the output data of the adder 425 exceeds the upper address conversion table length. The upper address conversion table length is data indicating the size of the upper address conversion table 200.
[0027]
The selector 428 is controlled by the comparator 427 to selectively output one of the output data from the adder 425 and the output data from the subtractor 426.
The comparator 427 determines whether the addition data of the adder 425 is equal to the upper address conversion table length by comparing the subtraction data subtracted by the subtractor 426 with “0”, and the output data of the adder 425 is When it is not equal to the upper address conversion table length, the selector 428 is controlled so that the output data of the adder 425 is output from the selector 428, and when it is equal, the output data of the subtractor 426 is output.
The selector 428 and the comparator 427 correspond to rewriting means.
[0028]
Next, the configuration of the arbiter 440 will be described.
FIG. 4 is a block diagram illustrating a configuration of the arbiter 440 according to the first specific example.
The write address storage unit 441 is a block that holds an address obtained by adding 1 to the address written last in the indirect table 410A.
[0029]
The read address storage unit 442 is a block that holds an address obtained by adding 1 to the address read last from the indirect table 410B.
When a write request signal is input from the device 300A, the selector 443 selectively outputs one of the address from the device 300A that made the write request and the address held by the write address storage unit 441 as a write address. It is a block.
[0030]
When a read request signal is input from the device 300B, the selector 444 selects and outputs one of the address from the device 300B that made the read request and the address held by the write address storage unit 441 as a read address. It is a block.
[0031]
The address comparison unit 445 is a determination unit that determines whether there is a writable area or readable data by comparing the write address output from the selector 443 and the read address output from the selector 444, When it is determined that there is a writable area, a writable signal is output to the write request acceptance signal creation unit 446, and when it is determined that there is readable data, it can be read by the read request acceptance signal creation unit 447. Output a signal.
[0032]
The write request acceptance signal creation unit 446 outputs a write request permission that allows the device 300A to write data when a write request signal and a writable signal are input from the device 300A and the address comparison unit 445, respectively. Means. Also, the write request acceptance signal creation unit 446 outputs a writing in-progress signal to the read request acceptance signal creation unit 447 during data writing.
[0033]
When the read request reception signal creation unit 447 receives a read request signal and a read enable signal from the device 300B and the address comparison unit 445, respectively, and when the write request reception signal creation unit 446 does not output a writing signal, This is a read request permission means for outputting a read acceptance signal for permitting the device 300B to read data.
[0034]
<Operation>
In the paging method, when a program is expanded and operated on the main storage device 100, the program is divided into several pages having a certain length and arranged on the main storage device 100. Therefore, the area where the program is stored is usually discontinuous in order to secure memory resources.
Therefore, consecutive logical addresses are converted into physical addresses on the main storage device 100 using the upper address conversion table 200.
[0035]
FIG. 5 is an operation explanatory diagram of the first specific example.
In the specific example 1, for the sake of easy understanding, it is assumed that the program fits in a 256 × 4 size as shown in FIG.
Further, the main storage device 100 has a 32-bit address space, and one area is divided every 256 (8 bits), and an address space that can be used by the devices 300A and 300B is 10 bits. Are 7 areas of areas 0-6. Therefore, the upper address conversion table length is “7”. Here, the number of bits of one word is not particularly limited.
[0036]
In this case, since the address space of the program is 256 × 4, 8 + 2 = 10 bits. Since the lower 8 bits can be used as they are as the address of the main storage device 100, the upper 2 bits are converted.
[0037]
The upper 2-bit address of this program space becomes the address of the upper address conversion table 200. As for the size of the table, the number of bits per table address is the upper 24 bits of the main storage device 100, which is four (addresses). Further, the upper 24 bits of address data of areas 0 to 6 of the main storage device 100 are input to the registers 210 to 216 of the upper address conversion table 200, respectively.
[0038]
In this way, by converting the upper 2-bit address through the upper address conversion table 200 and using the lower address as it is, the program can be operated as if it was started from the address of area 0.
Specifically, in order to perform the address conversion, first, the upper addresses of the areas 0 to 6 of the main storage device 100 are stored in the registers 210 to 216 of the upper address conversion table 200, respectively. Areas 0 to 6 usable by the device are allocated to the registers 210 to 216 of the upper address conversion table 200. This is done by the program.
[0039]
After the assignment is performed in this manner, the indirect table 410A for the device 300A is initialized by the program.
In order to initialize the indirect table 410A, data “0” designating the register 210 of the higher-order address conversion table 200 is set in the register 411a of the indirect table 410A for the device 300A. Similarly, data “1” to “3” designating the registers 211 to 213 of the upper address conversion table 200 are set in the registers 411b to 411d of the indirect table 410A, respectively.
[0040]
The indirect table 410B for the device 300B is similarly initialized.
After initialization of the indirect table 410A, the device 300A is activated by a program to start an input operation.
When the device 300A starts an input operation and writes data to the main storage device 100, address conversion is performed.
[0041]
In the example of FIG. 5, for example, an address “0x2a5” (“0x” indicates hexa expression) is specified in hexa expression by the device 300A. At this time, since the upper 2 bits are “2”, the address of the indirect table 410A is “2”, and the data “2” of the register 411c is obtained. This data “2” becomes the address data of the upper address conversion table 200.
[0042]
Based on this address data “2”, data “0X000007” stored in the register of the higher-order address conversion table 200 is obtained.
Since this data “0X000007” is the upper 24 bits of address data of the main storage device 100, the address “0X000007a5” of the main storage 100 is based on this data “0X000007” and the lower 8 bits of data “0xa5” of the device 300B. Is obtained.
[0043]
Then, the data stored in the area 6 of the main storage device 100 is read by designating this address “0X000007a5”.
When the writing of data to the main storage device 100 is completed, the end timing of access is detected by the end address detector 430, and the end signal is input to the write timing generator 421 of the indirect table 410A.
[0044]
The indirect table updating unit 420A updates data in the indirect table 410A using this signal as a trigger.
The update is performed as follows.
First, the selector 422 is controlled, and the data in the register 411a of the indirect table 410A is input to the arithmetic unit 423.
[0045]
In the calculation unit 423, the indirect table length is added to this data by the adder 425.
For example, when the data stored in the register 411a is “0”, “4” is added to the data “0” to become “4”. At this time, the updated data “4” is stored in the register 411a.
[0046]
Similarly, the selector 422 is switched, and the data stored in the registers 411a to 411d of the indirect table 410A are sequentially updated.
When the data stored in the register of the indirect table 410A is “3”, the added value is “3” + “4” = “7”, which is equal to the upper address conversion table length. At this time, the selector 422 is switched by the comparator 427 and data “0” is output.
In this way, the indirect table 410A is updated so as not to exceed the area 6 of the main storage device 100.
[0047]
FIG. 6 is an explanatory diagram for explaining the transition of the indirect table 410A.
As shown in FIG. 6, in the state 1, the address data 0 to 3 of the higher-order address conversion table 200 are set in the registers 411a to 411d of the indirect table 410A, respectively. When the indirect table 410A is updated, the registers 411a to 411d of the indirect table 410A are rewritten to change the state 1 to the state 2. In this state 2, the indirect table 410A is further updated to the state 3 as shown in FIG. To change.
[0048]
When data is stored to such an extent that it can be read, the device 300B is activated next time. At this time, address conversion is performed in the same manner, and data is read out.
[0049]
When reading of data from the main storage device 100 by the device 300B is completed, the end timing of the read access is detected by the end address detecting unit 430 as in the case of the end of writing, and the end timing signal is written to the indirect table 410A. Input to the timing generator 421. This signal is used as a trigger to output a rewrite timing signal from the write timing generator 421, and the data in the indirect table 410A is updated.
[0050]
When a write request is made by the device 300A, or when a read request is made by the device 300B, memory access is controlled by the arbiter 440, and memory access contention is avoided.
[0051]
For example, when a write request signal is input from the device 300A to the arbiter 440 and a write request is made by the device 300A, the address comparison unit 445 compares the write address with the read address. When the write address is smaller than the read address, it is determined that there is a write area, and a write enable signal is output from the address comparison unit 445 to the write request acceptance signal creation unit 446.
[0052]
When this write enable signal is output to the write request acceptance signal creation unit 446, a write acceptance signal is output from the write request acceptance signal creation unit 446 to the device 300A, and data is written to the main storage device 100 by the device 300A. Is called.
[0053]
Similarly, when a read request signal is input from the device 300B to the arbiter 440 and a read request is made, if the write address is smaller than the read address, the address comparison unit 445 determines that there is data to be read, and the address comparison A write enable signal is output from the unit 445 to the write request acceptance signal creation unit 446. When no write request signal is output from the write request reception signal creation unit 446, a read reception signal is output from the read request reception signal creation unit 447 to the device 300B, and data is read from the main storage device 100 by the device 300B. Is done.
[0054]
On the other hand, when the write address is larger than the read address, the address comparison unit 445 determines that there is no write area even if a write request signal is input from the device 300A, and the address comparison unit 445 does not output a writable signal. Further, even if a read request signal is input from the device 300B, it is determined by the address comparison unit 445 that there is no data to be read, and no read enable signal is output. In this way, memory access contention is avoided, and data is not read by the device 300B before the device 300A writes data to the main storage device 100.
[0055]
<Effect of specific example 1>
As described above, according to the first specific example, the indirect tables 410A and B are provided for the devices 300A and 300B, and the upper address conversion table 200 is indirectly referenced. There is no need to provide it, and the circuit scale can be greatly reduced.
[0056]
Here, the circuit scale is compared between the case where the table for address conversion is composed of only the higher-order address conversion table and the case where the table is composed by adding an indirect table.
[0057]
In this case as well, the memory space of the main storage device is a 32-bit address space, the address space of one area is 8 bits, the address space accessible by the device is 10 bits, and the number of usable areas is seven.
[0058]
When each table is configured by an F / F circuit, one upper address conversion table is 24 × 7 bits. Since two devices are used when there are two devices, the number of F / F circuits 24 × 7 × 2 = 336 is required.
On the other hand, if an indirect table is provided, only one upper address conversion table is required, so the number of F / F circuits is 24 × 7 + 3 × 4 × 2 = 192, and the circuit scale can be reduced. .
[0059]
In Specific Example 1, since two devices are used, two indirect tables are required. However, the number of indirect tables is not limited to Specific Example 1. The table length can also be increased or decreased according to the access space of each device.
[0060]
Also, the upper address conversion table can be increased or decreased according to the number of usable areas of the main storage device, and the number of bits of each address in the table can be reduced by limiting the range of acquisition of the usable area of the main storage device. Is possible.
[0061]
For example, if the memory address space of the main storage device is 32 bits and the usable area is always limited to the second half of the address space of the main storage device, the most significant bit is always fixed, so the most significant bit at all addresses in the table One bit of can be omitted.
[0062]
Even when the device space is larger than the space of the usable area, the indirect table can be processed by setting the table length to match the device space.
For example, if the device address space is 4 areas and there are 3 areas that can actually be used, the contents of the indirect table can be set to “0”, “1”, “2”, “0”, etc. It can be used as a buffer.
[0063]
In addition, the calculation unit of the indirect table update unit can also be provided for the address of the indirect table, so that all of the indirect table can be updated simultaneously. On the other hand, by increasing the number of inputs of the selector of the indirect table update unit and making the write timing generation unit common to all devices, only one arithmetic unit for updating the indirect table of all devices is required.
[0064]
In the first specific example, the calculation unit of the indirect table update unit has a hardware configuration, but may be configured by software.
FIG. 7 is a flowchart showing the operation.
In step (step is indicated as “S” in the figure) 1, data of the indirect table 410A (or B) is input.
[0065]
In step 2, the data of the indirect table 410A and the indirect table length are added.
In step 3, this added value is compared with the upper address conversion table length.
When the added value is larger than the upper address conversion table length, the process proceeds to step 4 where the added value is subtracted from the upper address conversion table length.
[0066]
In step 5, this value is output.
If the added value exceeds the upper address conversion table length, the process proceeds to step 6 where the added value is substituted for variable B, and the process proceeds to step 5 to output variable B.
As described above, the calculation unit 423 can also be configured by software.
[0067]
<Specific example 2>
In the second specific example, in order to shorten the update time, a register table corresponding to each register of the indirect table is provided, and update data is calculated in advance and stored in the register table.
[0068]
FIG. 8 is a block diagram illustrating a configuration of the second specific example.
The indirect table update units 420A and 420B of the specific example 2 each include a register table 450 having writable registers 452a to 452d.
In addition, the same code | symbol is attached | subjected about the same element as the specific example 1, and description is abbreviate | omitted.
[0069]
<Operation>
Next, the update operation of the specific example 2 will be described.
In the second specific example, before the indirect table 410A (or B) is updated, the data in the register 411a of the indirect table 410A is read, and the update data is created by the calculation unit 423.
In the second specific example, the calculation unit 423 may be configured by hardware or software.
[0070]
Then, the calculation result is written into the register 452a of the register table 450.
Similarly, data is read from the registers 411b to 411d of the indirect table 410A, and the calculation result is written to 452b to 45d of each register table 450.
[0071]
When the rewrite timing signal is output from the write timing generator 421 when the indirect table 410A is updated, the data in the registers 452a to 452d of the register table 450 is simultaneously output and copied to the registers 411a to 411d of the indirect table 410A. The
[0072]
Note that the rewrite timing of the indirect table 410 is also notified to the CPU 500 using an interrupt signal or the like.
Copying from the register table 450 to the indirect table 410 usually ends in one clock.
After the copy is completed, the update data is written again in the register table 450 in preparation for the next update.
In this manner, a ring buffer is realized by rewriting the register table 450 and repeating copying from the register table 450 to the indirect table 410A.
[0073]
<Effect of specific example 2>
As described above, according to the second specific example, the register includes the register table 450 corresponding to each register of the indirect tables 410A and B, and the update data calculated in advance is simultaneously updated when the indirect tables 410A and B are updated. As a result, the update time can be greatly shortened. Therefore, the devices 300A and 300B can access the main storage device 100 at high speed and continuously.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a specific example 1;
FIG. 2 is a block diagram illustrating a configuration of an indirect table and an indirect table update unit according to the first specific example.
FIG. 3 is a block diagram illustrating a configuration of a calculation unit (indirect table update unit) of specific example 1;
FIG. 4 is a block diagram illustrating a configuration of an arbiter according to a specific example 1;
FIG. 5 is an operation explanatory diagram of a specific example 1;
FIG. 6 is an explanatory diagram showing transition of an indirect table in specific example 1;
FIG. 7 is a flowchart showing the operation when the arithmetic unit of the first specific example is configured by software.
FIG. 8 is a block diagram illustrating a configuration of an indirect table and an indirect table update unit according to specific example 2;
[Explanation of symbols]
100 Main memory
200 Upper address translation table
300A, B device
400 Table reference part
410 Indirect table
420 Indirect table update unit
440 Arbiter
450 register table
500 CPU

Claims (6)

連続した論理アドレスを、アドレス変換テーブルを用いて主記憶装置のメモリ空間の物理アドレスに変換することにより主記憶装置のメモリ空間を連続エリアと仮想する仮想記憶方式を、主記憶装置における所定のメモリ空間をリング構造とみなして周回するようにアクセスする制御方式に適用して前記主記憶装置のメモリ空間をアクセスするメモリアクセス装置において、
前記アドレス変換テーブルには、複数のアドレスが格納され
前記主記憶装置に対するアクセスを要求するデバイス毎に間接テーブルを備え、該間接テーブルは、アドレス変換テーブルのアドレスを指定する複数のアドレスデータを格納し、対応するデバイスからのアクセスが終了したときに格納されたアドレスデータが所定テーブルのテーブルサイズの中で周回するように更新され、
前記間接テーブルの前記テーブルサイズは、前記アドレス変換テーブルのテーブルサイズよりも小さく、
前記間接テーブルの複数のアドレスデータのアドレス総数は、前記アドレス変換テーブルのテーブルサイズと等しく、
前記アドレスデータが、アドレスの総数の周期で周回するように、前記間接テーブルが更新されるように構成されたことを特徴とするメモリアクセス装置。
A virtual memory system that virtualizes the memory space of the main storage device as a continuous area by converting continuous logical addresses into physical addresses of the memory space of the main storage device using an address conversion table, and a predetermined memory in the main storage device In a memory access device for accessing the memory space of the main storage device by applying to a control method for accessing the space so as to circulate considering the space as a ring structure,
The address conversion table stores a plurality of addresses ,
An indirect table is provided for each device that requests access to the main storage device, and the indirect table stores a plurality of address data designating addresses in the address conversion table, and is stored when access from the corresponding device is completed. Updated address data to circulate within the table size of the predetermined table,
The table size of the indirect table is smaller than the table size of the address conversion table,
The total number of addresses of the plurality of address data in the indirect table is equal to the table size of the address conversion table,
The memory access device , wherein the indirect table is updated so that the address data circulates in a cycle of the total number of addresses .
前記デバイスのアクセス終了後、間接テーブルに格納されたアドレス変換テーブルのアドレスデータが所定テーブルサイズの中で周回するように間接テーブルを更新する間接テーブル更新手段を備えたことを特徴とする請求項1に記載のメモリアクセス装置。  2. An indirect table updating means for updating an indirect table so that address data of an address conversion table stored in an indirect table circulates within a predetermined table size after the device access is completed. The memory access device described in 1. 連続した論理アドレスを、アドレス変換テーブルを用いて主記憶装置のメモリ空間の物理アドレスに変換することにより主記憶装置のメモリ空間を連続エリアと仮想する仮想記憶方式を、主記憶装置における所定のメモリ空間をリング構造とみなして周回するようにアクセスする制御方式に適用して前記主記憶装置のメモリ空間をアクセスするメモリアクセス装置において、
前記主記憶装置に対するアクセスを要求するデバイス毎に間接テーブルを備え、該間接テーブルは、アドレス変換テーブルのアドレスを指定するアドレスデータを格納し、対応するデバイスからのアクセスが終了したときに格納されたアドレスデータが所定テーブルのテーブルサイズの中で周回するように更新されるように構成され、
前記デバイスのアクセス終了後、前記間接テーブルに格納されたアドレス変換テーブルのアドレスデータが所定テーブルサイズの中で周回するように、前記間接テーブルが更新される間接テーブル更新手段を備え、
前記間接テーブル更新手段は、間接テーブルに格納されたアドレス変換テーブルのアドレスデータに間接テーブルのテーブルサイズを加算する加算手段と、
該加算手段により加算された加算データをアドレス変換テーブルのテーブルサイズから減算する減算手段と、
該減算手段による減算の結果、減算データが零未満のときは、格納されたアドレス変換テーブルのアドレスデータを加算データに書き換え、減算データが零のときは、格納されたアドレス変換テーブルのアドレスデータを零に書き換える書き換え手段と、
を備えたことを特徴とするメモリアクセス装置。
A virtual memory system that virtualizes the memory space of the main storage device as a continuous area by converting continuous logical addresses into physical addresses of the memory space of the main storage device using an address conversion table, and a predetermined memory in the main storage device In a memory access device for accessing the memory space of the main storage device by applying to a control method for accessing the space so as to circulate considering the space as a ring structure,
An indirect table is provided for each device that requests access to the main storage device, and the indirect table stores address data that specifies an address in the address conversion table, and is stored when access from the corresponding device is completed. The address data is configured to be updated so as to circulate within the table size of the predetermined table,
An indirect table update means for updating the indirect table so that the address data of the address conversion table stored in the indirect table circulates within a predetermined table size after the access of the device is completed;
The indirect table updating means includes an adding means for adding the table size of the indirect table to the address data of the address conversion table stored in the indirect table;
Subtraction means for subtracting the addition data added by the addition means from the table size of the address conversion table;
As a result of the subtraction by the subtracting means, when the subtraction data is less than zero, the stored address conversion table address data is rewritten to addition data, and when the subtraction data is zero, the stored address conversion table address data is changed. Rewriting means for rewriting to zero,
Features and to Rume memory access device further comprising a.
主記憶装置にデータを書き込む書き込み要求が書き込み用デバイスからあり、主記憶装置からデータを読み出す読み出し要求が読み出し用デバイスからあったとき、主記憶装置へのアクセスの競合を回避するように、前記書き込み用デバイス及び読み出し用デバイスのアクセスを制御するアクセス制御手段を備えたことを特徴とする請求項1〜請求項3のいずれか1つに記載のメモリアクセス装置。  When the write request for writing data to the main storage device is from the write device and the read request for reading data from the main storage device is from the read device, the write is performed so as to avoid contention for access to the main storage device 4. The memory access apparatus according to claim 1, further comprising access control means for controlling access to the access device and the read device. 前記アクセス制御手段は、書き込み用デバイスによってデータが書き込まれた書き込みアドレスと読み出し用デバイスによってデータが読み出された読み出しアドレスとを比較して主記憶装置に書き込み可能な領域があるか読み出し可能なデータがあるかを判定する判定手段と、
該判定手段により、書き込み可能な領域があると判定されたときは、書き込み用デバイスに書き込みを許可する書き込み要求許可手段と、
前記判定手段により、読み出し可能なデータがあると判定され、書き込み用デバイスが書き込み要求をしていないときに読み出し用デバイスに読み出しを許可する読み出し要求許可手段と、
を備えたことを特徴とする請求項4に記載のメモリアクセス装置。
The access control means compares the write address where the data is written by the write device and the read address where the data is read by the read device to determine whether there is a writable area in the main storage device. Determination means for determining whether or not there is,
When the determination means determines that there is a writable area, a write request permission means for permitting writing to the writing device;
The determination means determines that there is data that can be read, and a read request permission means that allows the read device to read when the write device does not request a write;
The memory access device according to claim 4, further comprising:
前記間接テーブルに格納されているアドレスデータの更新すべきデータを予め演算して格納するレジスタテーブルを備えたことを特徴とする請求項1〜請求項5のいずれか1つに記載のメモリアクセス装置。  6. The memory access device according to claim 1, further comprising a register table that precalculates and stores data to be updated of address data stored in the indirect table. .
JP27773599A 1999-09-30 1999-09-30 Memory access device Expired - Fee Related JP4257626B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27773599A JP4257626B2 (en) 1999-09-30 1999-09-30 Memory access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27773599A JP4257626B2 (en) 1999-09-30 1999-09-30 Memory access device

Publications (2)

Publication Number Publication Date
JP2001101072A JP2001101072A (en) 2001-04-13
JP4257626B2 true JP4257626B2 (en) 2009-04-22

Family

ID=17587606

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27773599A Expired - Fee Related JP4257626B2 (en) 1999-09-30 1999-09-30 Memory access device

Country Status (1)

Country Link
JP (1) JP4257626B2 (en)

Also Published As

Publication number Publication date
JP2001101072A (en) 2001-04-13

Similar Documents

Publication Publication Date Title
JP3170301B2 (en) Address translator
EP0373291B1 (en) Digital signal processor
KR970011207B1 (en) Method and apparatus for a register providing atomic access to set and clear individual bits of a shared register without a software interlock
JP2504206B2 (en) Bus controller
EP0669579B1 (en) Coherence index generation for use by an input/output adapter
JP2001290706A (en) Prefetch for TLB cache
US6684267B2 (en) Direct memory access controller, and direct memory access control method
JP3506024B2 (en) Information processing equipment
JP3803196B2 (en) Information processing apparatus, information processing method, and recording medium
JP2000040029A (en) Memory address converting device for data processing system, and data processing method
JP4257626B2 (en) Memory access device
US6378058B1 (en) Method of and apparatus for processing information, and providing medium
US4628450A (en) Data processing system having a local memory which does not use a directory device with distributed resident programs and a method therefor
JPH09282221A (en) Main memory controller
US5524221A (en) Next instruction pointer calculation system for a microcomputer
JPH0689229A (en) Buffer memory invalidating apparatus and invalidating method
JP4363431B2 (en) Data transfer method
JPH03271859A (en) Information processor
JPH10247150A (en) Data processing system
JP3476376B2 (en) Virtual storage address space access control method and apparatus therefor
JP2000172675A (en) List vector processor
JPH04266140A (en) Address conversion buffer device
JP3242847B2 (en) Data controller
JP2001100991A (en) Digital signal processor
JPH05250156A (en) RISC processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050830

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051124

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080929

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081007

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081204

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20081224

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090122

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120213

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130213

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140213

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees