JP2004110419A - Memory access control device - Google Patents

Memory access control device Download PDF

Info

Publication number
JP2004110419A
JP2004110419A JP2002272172A JP2002272172A JP2004110419A JP 2004110419 A JP2004110419 A JP 2004110419A JP 2002272172 A JP2002272172 A JP 2002272172A JP 2002272172 A JP2002272172 A JP 2002272172A JP 2004110419 A JP2004110419 A JP 2004110419A
Authority
JP
Japan
Prior art keywords
data
access
address
memory
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002272172A
Other languages
Japanese (ja)
Inventor
Makoto Nakamura
中村 誠
Tomonori Maekawa
前川 智律
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.)
Fuji Electric Retail Systems Co Ltd
Original Assignee
Fuji Electric Retail Systems Co 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 Fuji Electric Retail Systems Co Ltd filed Critical Fuji Electric Retail Systems Co Ltd
Priority to JP2002272172A priority Critical patent/JP2004110419A/en
Publication of JP2004110419A publication Critical patent/JP2004110419A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To sufficiently shorten a processing time in a predetermined processor by sufficiently quickly reading data frequently accessed and requested to output them. <P>SOLUTION: In this memory access control device 10, a part of data stored in a main memory 2 is stored in a high-speed storage processing part 12 with reading speed higher than that of the main memory 2, and if there are data targeted for an access request in the high-speed storage processing part 12, the data are outputted from the high-speed storage processing part 12. The memory access control device 10 is provided with a storage processing control part 18 storing data more frequently accessed and requested in the high-speed storage device 12 preferentially. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、第1の記憶装置に記憶されているデータの一部を、読み出し速度が第1の記憶装置より速い第2の記憶装置に記憶し、アクセス要求の対象となるデータが第2の記憶装置に存在する場合に、該データを第2の記憶装置から出力するメモリアクセス制御装置に関するものである。
【0002】
【従来の技術】
一般に、メモリシステムの高速化技法の1つとしてキャッシングが知られている。このキャッシングは、中央演算処理装置(以下、CPU;Central  Processing  Unitともいう)と主記憶装置(以下、メインメモリともいう)との間に、キャッシュメモリと呼ばれるメインメモリよりも高速/小容量のメモリを備えてなるメモリアクセス制御装置を配置して行われるものである。
【0003】
図13は、従来のメモリアクセス制御装置を実装してなる処理システムを模式的に示したものであり、(a)は処理システムの構成を示したブロック図であり、(b)は(a)におけるメモリアクセス制御装置の構成を示したブロック図である。図13において、処理システムは、CPU1と、メインメモリ2と、メモリアクセス制御装置20とを有して構成してある。
【0004】
CPU1は、所定のプログラム命令を解釈し、実行することのできる処理装置である。メインメモリ2は、例えばDRAM(Dynamic  Random  Access  Memory)、ROM(Read Only Memory)等であり、アドレス毎に所定のデータを記憶しているものである。
【0005】
メモリアクセス制御装置20は、図13(b)に示すように、主制御部21と、キャッシュメモリ22と、アドレス検出部23と、判断部26と、記憶処理部27とを有して構成してある。
【0006】
主制御部21は、メモリアクセス制御装置20の動作を統括的に制御するものである。キャッシュメモリ22は、既述のようにメインメモリ2よりも読み出し速度が速く、該メインメモリ2よりも記憶容量が小さいメモリである。アドレス検出部23は、CPU1からのアクセス要求に含まれるメインメモリ2のアドレス(以下、アクセスアドレスともいう)を検出するものである。判断部26は、アドレス検出部23により検出されたアドレスのデータがキャッシュメモリ22に記憶されているか否かを判断するものである。記憶処理部27は、メインメモリ2から入力したデータを最新のデータとしてキャッシュメモリ22に記憶させるものである。
【0007】
次に、上記の処理システムを構成するメモリアクセス制御装置20の動作について説明する。図14および図15は、図13におけるメモリアクセス制御装置の動作を説明するための説明図であり、図14が前半部分を、図15が後半部分を示している。ここで、説明の便宜上、メインメモリ2は、最大10個のデータを記憶することが可能であるとし、キャッシュメモリ22は、最大2個のデータを記憶することが可能であるとする。また、図14および図15において、Sn′(n=1〜16)は、CPU1からのアクセス要求を示しており、Cm′(m=0〜16)は、キャッシュメモリ22の記憶状態を示している。Cm′にある矢印は、次回アクセスがあると上書きされる位置を示すためのポインタ、すなわち記憶処理部27によりデータが記憶される位置を示すためのポインタである。このポインタは、入力されたデータが上書きされると次領域に移動する。尚、キャッシュメモリ22に記憶してあるデータを出力する場合にはポインタは移動しない。以下においては、CPU1のアクセス要求の順序にしたがって動作を説明する。
【0008】
CPU1がメインメモリ2にアクセス要求する以前においては、メインメモリ2は、アドレスA−1〜A−10にそれぞれデータが記憶された状態(M0)となっている。メモリアクセス制御装置20のキャッシュメモリ22は、初期状態であり、まだ何も記憶されていない空の状態となっている(C0′)。
【0009】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S1′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−2を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−2のデータが記憶されているか否かを判断する。既述のようにこの時点においては、キャッシュメモリ22は初期状態(C0′)であるので、アクセスアドレスA−2のデータがメインメモリ2から出力されることになる。そして、主制御部21は、入力インターフェース24を介してメインメモリ2からアクセスアドレスA−2のデータを入力し、記憶処理部27を通じてキャッシュメモリ22に記憶する一方(C1′)、出力インターフェース25を介してCPU1に該データを出力する。
【0010】
CPU1がメインメモリ2のアドレスA−3にアクセス要求すると(S2′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−3を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−3のデータが記憶されているか否かを判断する。この時点においては、キャッシュメモリ22にはアドレスA−2のデータしか記憶されていないので(C1′)、アクセスアドレスA−3のデータはメインメモリ2から出力されることになる。そして、主制御部21は、入力インターフェース24を介してメインメモリ2からアクセスアドレスA−3のデータを入力し、記憶処理部27を通じてキャッシュメモリ22に記憶する一方(C2′)、出力インターフェース25を介してCPU1に該データを出力する。ここに、キャッシュメモリ22は、アクセスアドレスA−2のデータと、アクセスアドレスA−3のデータとの2個のデータが記憶されることになり、記憶容量が完全に充たされた状態となる。
【0011】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S3′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−2を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−2のデータが記憶されているか否かを判断する。そして、主制御部21は、キャッシュメモリ22にはアドレスA−2のデータが記憶されているので(C2′)、出力インターフェース25を介してCPU1に該データを出力する。この場合、キャッシュメモリ22に記憶してあるデータを出力したため、既述のように、ポインタは移動しない(C3′)。
【0012】
CPU1がメインメモリ2のアドレスA−4にアクセス要求すると(S4′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−4を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−4のデータが記憶されているか否かを判断する。この時点においては、キャッシュメモリ22にはアドレスA−4のデータが記憶されていないので(C3′)、アクセスアドレスA−4のデータはメインメモリ2から出力されることになる。そして、主制御部21は、入力インターフェース24を介してメインメモリ2からアクセスアドレスA−4のデータを入力し、記憶処理部27を通じてキャッシュメモリ22のポインタが指定したデータ、すなわちアドレスA−2のデータに上書きして記憶する一方(C4′)、出力インターフェース25を介してCPU1に該データを出力する。
【0013】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S5′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−2を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−2のデータが記憶されているか否かを判断する。この時点においては、キャッシュメモリ22にはアドレスA−2のデータが記憶されていないので(C4′)、アクセスアドレスA−2のデータはメインメモリ2から出力されることになる。そして、主制御部21は、入力インターフェース24を介してメインメモリ2からアクセスアドレスA−2のデータを入力し、記憶処理部27を通じてキャッシュメモリ22のアドレスA−3のデータに上書きして記憶する一方(C5′)、出力インターフェース25を介してCPU1に該データを出力する。
【0014】
CPU1がメインメモリ2のアドレスA−5にアクセス要求すると(S6′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−5を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−5のデータが記憶されているか否かを判断する。この時点においては、キャッシュメモリ22にはアドレスA−5のデータが記憶されていないので(C5′)、アクセスアドレスA−5のデータはメインメモリ2から出力されることになる。そして、主制御部21は、入力インターフェース24を介してメインメモリ2からアクセスアドレスA−5のデータを入力し、記憶処理部27を通じてキャッシュメモリ22のアドレスA−4のデータに上書きして記憶する一方(C6′)、出力インターフェース25を介してCPU1に該データを出力する。
【0015】
CPU1がメインメモリ2のアドレスA−6にアクセス要求すると(S7′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−6を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−6のデータが記憶されているか否かを判断する。この時点においては、キャッシュメモリ22にはアドレスA−6のデータが記憶されていないので(C6′)、アクセスアドレスA−6のデータはメインメモリ2から出力されることになる。そして、主制御部21は、入力インターフェース24を介してメインメモリ2からアクセスアドレスA−6のデータを入力し、記憶処理部27を通じてキャッシュメモリ22のアドレスA−2のデータに上書きして記憶する一方(C7′)、出力インターフェース25を介してCPU1に該データを出力する。
【0016】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S8′)、メモリアクセス制御装置20の主制御部21は、アドレス検出部23を通じてアクセスアドレスA−2を検出する。その後、判断部26を通じてキャッシュメモリ22にアクセスアドレスA−2のデータが記憶されているか否かを判断する。この時点においては、キャッシュメモリ22にはアドレスA−2のデータが記憶されていないので(C7′)、アクセスアドレスA−2のデータはメインメモリ2から出力されることになる。そして、主制御部21は、入力インターフェース24を介してメインメモリ2からアクセスアドレスA−2のデータを入力し、記憶処理部27を通じてキャッシュメモリ22のアドレスA−5のデータに上書きして記憶する一方(C8′)、出力インターフェース25を介してCPU1に該データを出力する。
【0017】
以上がCPU1からのアクセス要求の前半部分(S1′〜S8′)におけるメモリアクセス制御装置20の動作である。CPU1からのアクセス要求の後半部分(S9′〜S16′)におけるメモリアクセス制御装置20も、前半部分(S1′〜S8′)と同様の動作をし、図15に示すように、キャッシュメモリ22は、C9′〜C16′の記憶状態となる。
【0018】
【特許文献1】
特開平8−16473号公報
【0019】
【発明が解決しようとする課題】
図16は、上記のアクセス要求(S1′〜S16′)において、メインメモリ2の各アドレスA−1〜A−10のアクセス回数を示した表である。この図16により、CPU1が最もアクセス要求しているのは、アドレスA−2であることが判る(S1′、S3′、S5′、S8′、S9′、S11′、S13′、S16′)。
【0020】
ところが、従来のメモリアクセス制御装置20においては、キャッシュメモリ22に記憶されているアドレスA−2のデータを出力したのは、S3′、S9′およびS11′だけであり、その他はメインメモリ2から入力したデータを出力しているに過ぎない。つまり、CPU1がメモリアクセス制御装置20にアクセスしたのは、S3′、S9′およびS11′だけであり、その他はメインメモリ2にアクセスしたことになる。これでは、メインメモリ2よりも読み出し速度の速いキャッシュメモリ22を有効に活用することができず、CPU1による処理時間を充分に短いものとすることができない、という問題がある。
【0021】
本発明は、上記実情に鑑みて、頻繁にアクセス要求されるデータを充分に速く読み出して出力することにより、所定の処理装置による処理時間を充分に短いものとすることができるメモリアクセス制御装置を提供することを目的とする。
【0022】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1に係るメモリアクセス制御装置は、第1の記憶装置に記憶されているデータの一部を、読み出し速度が前記第1の記憶装置より速い第2の記憶装置に記憶し、アクセス要求の対象となるデータが前記第2の記憶装置に存在する場合に、前記データを前記第2の記憶装置から出力するメモリアクセス制御装置において、前記第2の記憶装置に対して、アクセス要求の回数が多いデータを優先的に記憶させる記憶処理制御手段を備えていることを特徴とする。
【0023】
また、本発明の請求項2に係るメモリアクセス制御装置は、上記の請求項1において、前記記憶処理制御手段は、アクセス要求の回数が同じデータが複数存在する場合には、該データのうち最新のものを優先的に記憶させるものであることを特徴とする。
【0024】
また、本発明の請求項3に係るメモリアクセス制御装置は、上記の請求項1において、前記記憶処理制御手段は、アクセス要求に含まれる前記第1の記憶装置のアクセスアドレスを検出する検出部と、前記検出部が検出したアクセスアドレス毎の検出回数をカウントするカウンタ部と、前記カウンタ部によりカウントされた検出回数が多いアクセスアドレスのデータを優先的に前記第2の記憶装置に記憶させる記憶処理制御部とを有して構成されていることを特徴とする。
【0025】
【発明の実施の形態】
以下に添付図面を参照して、本発明に係るメモリアクセス制御装置の好適な実施の形態について詳細に説明する。
【0026】
図1は、本発明の実施の形態に係るメモリアクセス制御装置を実装してなる処理システムを模式的に示したものであり、(a)は処理システムの構成を示したブロック図であり、(b)は(a)におけるメモリアクセス制御装置の構成を示したブロック図である。図1において、処理システムは、CPU1と、メインメモリ2と、メモリアクセス制御装置10とを有して構成してある。
【0027】
CPU1は、所定のプログラム命令を解釈し、実行することのできる処理装置である。メインメモリ2は、上記請求項における第1の記憶装置であって、例えばDRAM、ROM等であり、アドレス毎に所定のデータを記憶しているものである。
【0028】
メモリアクセス制御装置10は、図1(b)に示すように、主制御部11と、高速記憶処理部12と、アドレス検出部13と、カウンタ部14と、判断部17と、記憶処理制御部18とを有して構成してある。
【0029】
主制御部11は、所定のプログラムにしたがってメモリアクセス制御装置10の動作を統括的に制御するものである。高速記憶処理部12は、例えばキャッシュメモリであり、メインメモリ2よりも読み出し速度が速く、該メインメモリ2よりも記憶容量が小さいものである。アドレス検出部13は、CPU1からのアクセス要求に含まれるメインメモリ2のアクセスアドレスを検出するものである。カウンタ部14は、アドレス検出部13が検出したアクセスアドレス毎の検出回数をカウントするものである。判断部17は、アドレス検出部13により検出されたアクセスアドレスのデータが高速記憶処理部12に記憶されているか否かを判断するものである。
【0030】
記憶処理制御部18は、上記の請求項における第2の記憶装置であって、カウンタ部14によりカウントされた検出回数の多いアクセスアドレスのデータを優先的に高速記憶処理部12に記憶させるとともに、カウンタ部14によりカウントされた検出回数が同じデータが複数存在する場合には、該データのうち最新のものを優先的に高速記憶処理部12に記憶させるものである。
【0031】
次に、処理システムを構成するメモリアクセス制御装置10の動作について説明する。図2および図3は、図1におけるメモリアクセス制御装置の動作を説明するための説明図であり、図2が前半部分を、図3が後半部分を示している。ここで、説明の便宜上、メインメモリ2は、最大10個のデータを記憶することが可能であるとし、高速記憶処理部12は、最大2個のデータを記憶することが可能であるとする。また、図2および図3において、Sn(n=1〜16)は、CPU1からのアクセス要求を示しており、Cm(m=0〜16)は、高速記憶処理部12の記憶状態を示している。更に、CPU1からアクセス要求されるアドレスの順序は、上記の図14および図15と同じにしてある。以下においては、CPU1のアクセス要求の順序にしたがって動作を説明する。
【0032】
CPU1がメインメモリ2にアクセス要求する以前においては、メインメモリ2は、アドレスA−1〜A−10にそれぞれデータが記憶された状態(M0)となっている。メモリアクセス制御装置10の高速記憶処理部12は、初期状態であり、まだ何も記憶されていない空の状態となっている(C0)。
【0033】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S1)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−2を検出し、カウンタ部14を通じてこのアクセスアドレスA−2の検出回数をカウントする。その後、判断部17を通じて高速記憶処理部12にアクセスアドレスA−2のデータが記憶されているか否かを判断する。この時点においては、既述のように高速記憶処理部12は初期状態であるので(C0)、アクセスアドレスA−2のデータがメインメモリ2から出力されることになる。そして、主制御部11は、入力インターフェース15を介してメインメモリ2からアクセスアドレスA−2のデータを入力し、記憶処理制御部18を通じて高速記憶処理部12に記憶する一方(C1)、出力インターフェース16を介してCPU1に該データを出力する。このアクセス要求(S1)では、CPU1は、メインメモリ2にアクセスしたことになる。
【0034】
CPU1がメインメモリ2のアドレスA−3にアクセス要求すると(S2)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−3を検出し、カウンタ部14を通じてこのアクセスアドレスA−3の検出回数をカウントする。その後、判断部17を通じて高速記憶処理部12にアクセスアドレスA−3のデータが記憶されているか否かを判断する。この時点においては、高速記憶処理部12にはアドレスA−2のデータしか記憶されていないので(C1)、アクセスアドレスA−3のデータがメインメモリ2から出力されることになる。そして、主制御部11は、入力インターフェース15を介してメインメモリ2からアクセスアドレスA−3のデータを入力し、記憶処理制御部18を通じて高速記憶処理部12に記憶する一方(C2)、出力インターフェース16を介してCPU1に該データを出力する。この場合、高速記憶処理部12は、アクセスアドレスA−2のデータと、アクセスアドレスA−3のデータとの2個のデータが記憶されることになり、記憶容量が完全に充たされた状態となる。このアクセス要求(S2)では、CPU1は、メインメモリ2にアクセスしたことになる。
【0035】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S3)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−2を検出し、カウンタ部14を通じてこのアクセスアドレスA−3の検出回数をカウントする。ここでは、アクセスアドレスA−2の検出回数が2回とカウントされる。その後、主制御部11は、判断部17を通じて高速記憶処理部12にアクセスアドレスA−2のデータが記憶されているか否かを判断する。この時点においては、高速記憶処理部12にはアドレスA−2のデータが記憶されているので(C2)、出力インターフェース16を介してCPU1に該データを出力する。このアクセス要求(S3)では、CPU1は、メモリアクセス制御装置10にアクセスしたことになる。
【0036】
CPU1がメインメモリ2のアドレスA−4にアクセス要求すると(S4)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−4を検出し、カウンタ部14を通じてこのアクセスアドレスA−4の検出回数をカウントする。ここでは、アクセスアドレスA−4の検出回数が1回とカウントされる。その後、主制御部11は、判断部17を通じて高速記憶処理部12にアクセスアドレスA−4のデータが記憶されているか否かを判断する。この時点においては高速記憶処理部12にはアドレスA−4のデータが記憶されていないので(C3)、アクセスアドレスA−4のデータがメインメモリ2から出力されることになる。そして、主制御部11は、入力インターフェース15を介してメインメモリ2からアクセスアドレスA−4のデータを入力し、記憶処理制御部18を通じて高速記憶処理部12の検出回数が多いデータを残して検出回数の少ないアドレスA−3のデータに上書きして記憶する一方(C4)、出力インターフェース16を介してCPU1に該データを出力する。このアクセス要求(S4)では、CPU1は、メインメモリ2にアクセスしたことになる。
【0037】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S5)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−2を検出し、カウンタ部14を通じてこのアクセスアドレスA−2の検出回数をカウントする。ここでは、アクセスアドレスA−2の検出回数が3回とカウントされる。その後、主制御部11は、判断部17を通じて高速記憶処理部12にアクセスアドレスA−2のデータが記憶されているか否かを判断する。この時点においては、高速記憶処理部12にはアドレスA−2のデータが記憶されているので(C4)、出力インターフェース16を介してCPU1に該データを出力する。このアクセス要求(S5)では、CPU1は、メモリアクセス制御装置10にアクセスしたことになる。
【0038】
CPU1がメインメモリ2のアドレスA−5にアクセス要求すると(S6)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−5を検出し、カウンタ部14を通じてこのアクセスアドレスA−5の検出回数をカウントする。ここでは、アクセスアドレスA−5の検出回数が1回とカウントされる。その後、主制御部11は、判断部17を通じて高速記憶処理部12にアクセスアドレスA−5のデータが記憶されているか否かを判断する。この時点においては、高速記憶処理部12にはアドレスA−5のデータが記憶されていないので(C5)、アクセスアドレスA−5のデータがメインメモリ2から出力されることになる。そして、主制御部11は、入力インターフェース15を介してメインメモリ2からアクセスアドレスA−5のデータを入力し、記憶処理制御部18を通じて高速記憶処理部12の検出回数が多いデータを残して検出回数の少ないアドレスA−4のデータに上書きして記憶する一方(C6)、出力インターフェース16を介してCPU1に該データを出力する。このアクセス要求(S6)では、CPU1は、メインメモリ2にアクセスしたことになる。
【0039】
CPU1がメインメモリ2のアドレスA−6にアクセス要求すると(S7)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−6を検出し、カウンタ部14を通じてこのアクセスアドレスA−6の検出回数をカウントする。ここでは、アクセスアドレスA−6の検出回数が1回とカウントされる。その後、主制御部11は、判断部17を通じて高速記憶処理部12にアクセスアドレスA−6のデータが記憶されているか否かを判断する。この時点においては、高速記憶処理部12にはアドレスA−6のデータが記憶されていないので(C6)、アクセスアドレスA−6のデータはメインメモリ2から出力されることになる。そして、主制御部11は、入力インターフェース15を介してメインメモリ2からアクセスアドレスA−6のデータを入力し、記憶処理制御部18を通じて高速記憶処理部12の検出回数が多いデータを残して検出回数の少ないアドレスA−5のデータに上書きして記憶する一方(C7)、出力インターフェース16を介してCPU1に該データを出力する。このアクセス要求(S7)では、CPU1は、メインメモリ2にアクセスしたことになる。
【0040】
CPU1がメインメモリ2のアドレスA−2にアクセス要求すると(S8)、メモリアクセス制御装置10の主制御部11は、アドレス検出部13を通じてアクセスアドレスA−2を検出し、カウンタ部14を通じてこのアクセスアドレスA−2の検出回数をカウントする。ここでは、アクセスアドレスA−2の検出回数が4回とカウントされる。その後、主制御部11は、判断部17を通じて高速記憶処理部12にアクセスアドレスA−2のデータが記憶されているか否かを判断する。この時点においては、高速記憶処理部12にはアドレスA−2のデータが記憶されているので(C7)、出力インターフェース16を介してCPU1に該データを出力する。このアクセス要求(S8)では、CPU1は、メモリアクセス制御装置10にアクセスしたことになる。
【0041】
CPU1からのアクセス要求の前半部分(S1〜S8)におけるアクセスアドレスの検出回数は図4に示すようになる。この図4から明らかなように、アクセスアドレスA−2の検出回数が4回となっており、アクセスアドレスA−3〜A−6がそれぞれ1回ずつとなっている。そのため、アクセス要求S8後における高速記憶処理部12は、検出回数の最も多い、すなわちアクセス要求の回数が最も多いアドレスA−2のデータと、検出回数が同じアドレスA−3〜A−6のデータのうち、最新のアドレスA−6のデータとが記憶されている(C8)。
【0042】
以下に、CPU1からのアクセス要求の後半部分(S9〜S16)について説明する。尚、アクセス要求の後半部分(S9〜S16)のメモリアクセス制御装置10の動作は、アクセス要求の前半部分(S1〜S8)のいずれかと同様であるので、簡略して説明する。図5〜図12は、アクセス要求の後半部分(S9〜S16)のそれぞれにおけるカウンタ部14によってカウントされたアクセスアドレス毎の検出回数である。
【0043】
CPU1がアドレスA−2にアクセス要求すると(S9)、メモリアクセス制御装置10は、既述のS3、S5およびS8の場合と同様にして、アクセスアドレスA−2を検出してそのアクセスアドレスA−2の検出回数をカウントした後、高速記憶処理部12にアドレスA−2のデータの存否を確認し、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図5に示すようになる。
【0044】
CPU1がアドレスA−3にアクセス要求すると(S10)、メモリアクセス制御装置10は、アクセスアドレスA−3を検出してそのアクセスアドレスの検出回数をカウントした後、高速記憶処理部12にアドレスA−3のデータの存否を確認し、メインメモリ2から入力したアクセスアドレスA−3のデータをアドレスA−6のデータに上書きして記憶する一方(C10)、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図6に示すようになる。
【0045】
CPU1がアドレスA−2にアクセス要求すると(S11)、メモリアクセス制御装置10は、既述のS3、S5、S8およびS9の場合と同様にして、アクセスアドレスA−2を検出してそのアクセスアドレスA−2の検出回数をカウントした後、高速記憶処理部12にアドレスA−2のデータの存否を確認し、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図7に示すようになる。
【0046】
CPU1がアドレスA−4にアクセス要求すると(S12)、メモリアクセス制御装置10は、アクセスアドレスA−4を検出してそのアクセスアドレスの検出回数をカウントした後、高速記憶処理部12にアドレスA−4のデータの存否を確認し、メインメモリ2から入力したアクセスアドレスA−4のデータをアドレスA−3のデータに上書きして記憶する一方(C12)、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図8に示すようになる。
【0047】
CPU1がアドレスA−2にアクセス要求すると(S13)、メモリアクセス制御装置10は、既述のS3、S5、S8、S9およびS11の場合と同様にして、アクセスアドレスA−2を検出してそのアクセスアドレスA−2の検出回数をカウントした後、高速記憶処理部12にアドレスA−2のデータの存否を確認し、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図9に示すようになる。
【0048】
CPU1がアドレスA−5にアクセス要求すると(S14)、メモリアクセス制御装置10は、アクセスアドレスA−5を検出してそのアクセスアドレスの検出回数をカウントした後、高速記憶処理部12にアドレスA−5のデータの存否を確認し、メインメモリ2から入力したアクセスアドレスA−5のデータをアドレスA−4のデータに上書きして記憶する一方(C14)、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図10に示すようになる。
【0049】
CPU1がアドレスA−6にアクセス要求すると(S15)、メモリアクセス制御装置10は、アクセスアドレスA−6を検出してそのアクセスアドレスの検出回数をカウントした後、高速記憶処理部12にアドレスA−6のデータの存否を確認し、メインメモリ2から入力したアクセスアドレスA−6のデータをアドレスA−5のデータに上書きして記憶する一方(C15)、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図11に示すようになる。
【0050】
最後にCPU1がアドレスA−2にアクセス要求すると(S16)、メモリアクセス制御装置10は、既述のS3、S5、S8、S9、S11およびS13の場合と同様にして、アクセスアドレスA−2を検出してそのアクセスアドレスA−2の検出回数をカウントした後、高速記憶処理部12にアドレスA−2のデータの存否を確認し、CPU1に該データを出力する。この場合におけるアクセスアドレス毎の検出回数は図12に示すようになる。
【0051】
CPU1からのアクセス要求の後半部分(S9〜S16)においては、アクセス要求S9、S11、S13およびS16では、CPU1は、メモリアクセス制御装置10にアクセスしたことになり、その他のアクセス要求では、CPU1は、メインメモリ2にアクセスしたことになる。
【0052】
以上説明したように、本発明の実施の形態に係るメモリアクセス制御装置10によれば、記憶処理制御部18がカウンタ部14によりカウントされた検出回数の多いアクセスアドレスのデータを優先的に高速記憶処理部12に記憶させるので、頻繁にアクセス要求されるデータを充分に速く読み出して出力することができ、これにより、CPU1による処理時間を充分に短いものとすることができる。従来例と比較して説明すると、従来例では、アクセス要求S3′、S9′およびS11′の場合のみキャッシュメモリ22からアクセスアドレスのデータを読み出して出力することしかできなかったが、本実施の形態では、アクセス要求S3、S5、S8、S9、S11、S13およびS16の場合に高速記憶処理部12からアクセスアドレスのデータを読み出して出力することができ、CPU1による処理時間を大幅に短縮することができることが明らかである。
【0053】
また、記憶処理制御部18がカウンタ部14によりカウントされた検出回数が同じアクセスアドレスのデータが複数存在する場合には、該データのうち最新のものを高速記憶処理部12に記憶させるので、最新のアクセスアドレスが再びアクセス要求された場合には、該アクセスアドレスのデータを充分に速く読み出して出力することができ、これにより、CPU1による処理時間を充分に短いものとすることができる。
【0054】
更に、本実施の形態に係るメモリアクセス制御装置10によれば、高速記憶処理部12の数を増加させるわけではないので、装置全体に要するコストは従来例とほぼ同じであり、コスト面のデメリットはない。
【0055】
以上、本発明のメモリアクセス制御装置の好適な実施の形態について説明したが、本発明はこれに限定されるものではない。例えば、上記の実施の形態では、メモリアクセス制御装置10をCPU1の外部装置として説明したが、本発明のメモリアクセス制御装置は、CPU等の処理装置の内部に設けられて内部装置として機能することもできる。
【0056】
また、上記の実施の形態では、高速記憶処理部12は、メモリアクセス制御装置10の内部に設けられていたが、本発明では、第2の記憶装置である高速記憶処理部は、メモリアクセス制御装置の外部に設けられていてもよい。
【0057】
更に、上記の実施の形態では、第1の記憶装置をメインメモリ2、第2の記憶装置を高速記憶処理部12としたが、本発明では、第1の記憶装置を例えば所謂ハードディスクや各種メモリ装置とし、第2の記憶装置を例えばメインメモリとしてもよい。
【0058】
【発明の効果】
以上説明したように、請求項1に記載の発明によれば、記憶処理制御手段がアクセス要求の回数が多いデータを優先的に第2の記憶装置に記憶させるので、頻繁にアクセス要求されるデータを充分に速く読み出して出力することができ、これにより、所定の処理装置による処理時間を充分に短いものとすることができる。
【0059】
また、請求項2に記載の発明によれば、記憶処理制御手段がアクセス要求の回数が同じデータが複数存在する場合には、該データのうち最新のものを優先的に第2の記憶装置に記憶させるので、該最新のデータが再びアクセス要求された場合には、該データを充分に速く読み出して出力することができる。
【0060】
また、請求項3に記載の発明によれば、記憶処理制御部がカウンタ部によりカウントされた検出回数の多いアクセスアドレスのデータを優先的に第2の記憶装置に記憶させるので、頻繁にアクセス要求されるデータを充分に速く読み出して出力することができ、これにより、所定の処理装置による処理時間を充分に短いものとすることができる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係るメモリアクセス制御装置を実装してなる処理システムを模式的に示したブロック図である。
【図2】図1におけるメモリアクセス制御装置の動作の前半部分を説明するための説明図である。
【図3】図1におけるメモリアクセス制御装置の動作の後半部分を説明するための説明図である。
【図4】CPUからのアクセス要求の前半部分におけるアクセスアドレス毎の検出回数を示した図表である。
【図5】CPUからのアクセス要求S1〜S9までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図6】CPUからのアクセス要求S1〜S10までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図7】CPUからのアクセス要求S1〜S11までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図8】CPUからのアクセス要求S1〜S12までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図9】CPUからのアクセス要求S1〜S13までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図10】CPUからのアクセス要求S1〜S14までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図11】CPUからのアクセス要求S1〜S15までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図12】CPUからのアクセス要求S1〜S16までにおけるアクセスアドレス毎の検出回数を示した図表である。
【図13】従来のメモリアクセス制御装置を実装してなる処理システムを模式的に示したブロック図である。
【図14】図13におけるメモリアクセス制御装置の動作の前半部分を説明するための説明図である。
【図15】図13におけるメモリアクセス制御装置の動作の後半部分を説明するための説明図である。
【図16】図14および図15におけるCPUからのアクセス要求の回数を示した図表である。
【符号の説明】
1    CPU
2    メインメモリ
10   メモリアクセス制御装置
11   主制御部
12   高速記憶処理部
13   アドレス検出部
14   カウンタ部
15   入力インターフェース
16   出力インターフェース
17   判断部
18   記憶処理制御部
[0001]
TECHNICAL FIELD OF THE INVENTION
According to the present invention, a part of data stored in a first storage device is stored in a second storage device whose read speed is faster than that of the first storage device, and data to be accessed is stored in a second storage device. The present invention relates to a memory access control device that outputs the data from a second storage device when the data exists in a storage device.
[0002]
[Prior art]
Generally, caching is known as one of the techniques for speeding up a memory system. This caching is performed between a central processing unit (hereinafter, also referred to as a CPU; Central Processing Unit) and a main storage device (hereinafter, also referred to as a main memory) with a higher speed / smaller memory than a main memory called a cache memory. This is performed by arranging a memory access control device having:
[0003]
FIGS. 13A and 13B schematically show a processing system in which a conventional memory access control device is mounted. FIG. 13A is a block diagram showing a configuration of the processing system, and FIG. FIG. 2 is a block diagram showing a configuration of a memory access control device in FIG. 13, the processing system includes a CPU 1, a main memory 2, and a memory access control device 20.
[0004]
The CPU 1 is a processing device that can interpret and execute a predetermined program command. The main memory 2 is, for example, a DRAM (Dynamic Random Access Memory), a ROM (Read Only Memory), or the like, and stores predetermined data for each address.
[0005]
As shown in FIG. 13B, the memory access control device 20 includes a main control unit 21, a cache memory 22, an address detection unit 23, a determination unit 26, and a storage processing unit 27. It is.
[0006]
The main control unit 21 controls the operation of the memory access control device 20 as a whole. As described above, the cache memory 22 has a higher read speed than the main memory 2 and has a smaller storage capacity than the main memory 2. The address detector 23 detects an address of the main memory 2 (hereinafter, also referred to as an access address) included in an access request from the CPU 1. The determination unit 26 determines whether or not the data of the address detected by the address detection unit 23 is stored in the cache memory 22. The storage processing unit 27 stores the data input from the main memory 2 in the cache memory 22 as the latest data.
[0007]
Next, the operation of the memory access control device 20 configuring the above processing system will be described. 14 and 15 are explanatory diagrams for explaining the operation of the memory access control device in FIG. 13. FIG. 14 shows the first half and FIG. 15 shows the second half. Here, for convenience of explanation, it is assumed that the main memory 2 can store a maximum of ten pieces of data, and the cache memory 22 can store a maximum of two pieces of data. 14 and 15, Sn '(n = 1 to 16) indicates an access request from the CPU 1, and Cm' (m = 0 to 16) indicates a storage state of the cache memory 22. I have. The arrow at Cm 'is a pointer for indicating a position to be overwritten when there is a next access, that is, a pointer for indicating a position at which data is stored by the storage processing unit 27. This pointer moves to the next area when the input data is overwritten. When outputting data stored in the cache memory 22, the pointer does not move. Hereinafter, the operation will be described in accordance with the order of the access requests from the CPU 1.
[0008]
Before the CPU 1 requests access to the main memory 2, the main memory 2 is in a state (M0) in which data is stored at addresses A-1 to A-10, respectively. The cache memory 22 of the memory access control device 20 is in an initial state and is in an empty state in which nothing is stored (C0 ').
[0009]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S1 '), the main control unit 21 of the memory access control device 20 detects the access address A-2 through the address detection unit 23. Thereafter, it is determined whether or not the data of the access address A-2 is stored in the cache memory 22 through the determining unit 26. As described above, at this point, the cache memory 22 is in the initial state (C0 '), so that the data of the access address A-2 is output from the main memory 2. Then, the main control unit 21 inputs the data of the access address A-2 from the main memory 2 via the input interface 24 and stores the data in the cache memory 22 through the storage processing unit 27 (C1 ′), while the output interface 25 The data is output to the CPU 1 via the CPU 1.
[0010]
When the CPU 1 requests access to the address A-3 of the main memory 2 (S2 '), the main control unit 21 of the memory access control device 20 detects the access address A-3 through the address detection unit 23. Thereafter, it is determined whether or not the data of the access address A-3 is stored in the cache memory 22 through the determination unit 26. At this time, since only the data of the address A-2 is stored in the cache memory 22 (C1 '), the data of the access address A-3 is output from the main memory 2. Then, the main control unit 21 inputs the data of the access address A-3 from the main memory 2 through the input interface 24 and stores the data in the cache memory 22 through the storage processing unit 27 (C2 ′), while the output interface 25 The data is output to the CPU 1 via the CPU 1. Here, the cache memory 22 stores two data, that is, the data of the access address A-2 and the data of the access address A-3, and the storage capacity is completely filled. .
[0011]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S3 '), the main control unit 21 of the memory access control device 20 detects the access address A-2 through the address detection unit 23. Thereafter, it is determined whether or not the data of the access address A-2 is stored in the cache memory 22 through the determining unit 26. Then, since the data of the address A-2 is stored in the cache memory 22 (C2 ′), the main control unit 21 outputs the data to the CPU 1 via the output interface 25. In this case, since the data stored in the cache memory 22 is output, the pointer does not move as described above (C3 ').
[0012]
When the CPU 1 requests access to the address A-4 of the main memory 2 (S4 '), the main control unit 21 of the memory access control device 20 detects the access address A-4 through the address detection unit 23. Thereafter, it is determined through the determining unit 26 whether or not the data of the access address A-4 is stored in the cache memory 22. At this point, since the data of the address A-4 is not stored in the cache memory 22 (C3 '), the data of the access address A-4 is output from the main memory 2. Then, the main control unit 21 inputs the data of the access address A-4 from the main memory 2 via the input interface 24, and the data designated by the pointer of the cache memory 22 through the storage processing unit 27, that is, the data of the address A-2. While the data is overwritten and stored (C4 '), the data is output to the CPU 1 via the output interface 25.
[0013]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S5 '), the main control unit 21 of the memory access control device 20 detects the access address A-2 through the address detection unit 23. Thereafter, it is determined whether or not the data of the access address A-2 is stored in the cache memory 22 through the determining unit 26. At this time, since the data of the address A-2 is not stored in the cache memory 22 (C4 '), the data of the access address A-2 is output from the main memory 2. Then, the main control unit 21 inputs the data of the access address A-2 from the main memory 2 via the input interface 24 and overwrites and stores the data of the address A-3 of the cache memory 22 through the storage processing unit 27. On the other hand (C5 '), the data is output to the CPU 1 via the output interface 25.
[0014]
When the CPU 1 requests access to the address A-5 of the main memory 2 (S6 '), the main control unit 21 of the memory access control device 20 detects the access address A-5 through the address detection unit 23. Thereafter, it is determined whether or not the data of the access address A-5 is stored in the cache memory 22 through the determination unit 26. At this time, since the data of the address A-5 is not stored in the cache memory 22 (C5 '), the data of the access address A-5 is output from the main memory 2. Then, the main control unit 21 inputs the data of the access address A-5 from the main memory 2 via the input interface 24 and overwrites the data of the address A-4 of the cache memory 22 through the storage processing unit 27 and stores the data. On the other hand (C6 '), the data is output to the CPU 1 via the output interface 25.
[0015]
When the CPU 1 requests access to the address A-6 of the main memory 2 (S7 '), the main control unit 21 of the memory access control device 20 detects the access address A-6 through the address detection unit 23. Thereafter, it is determined whether or not the data of the access address A-6 is stored in the cache memory 22 through the determination unit 26. At this time, since the data of the address A-6 is not stored in the cache memory 22 (C6 '), the data of the access address A-6 is output from the main memory 2. Then, the main control unit 21 inputs the data of the access address A-6 from the main memory 2 via the input interface 24 and overwrites the data of the address A-2 of the cache memory 22 through the storage processing unit 27 and stores the data. On the other hand, (C7 '), the data is output to the CPU 1 via the output interface 25.
[0016]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S8 '), the main control unit 21 of the memory access control device 20 detects the access address A-2 through the address detection unit 23. Thereafter, it is determined whether or not the data of the access address A-2 is stored in the cache memory 22 through the determining unit 26. At this point, since the data of the address A-2 is not stored in the cache memory 22 (C7 '), the data of the access address A-2 is output from the main memory 2. Then, the main control unit 21 inputs the data of the access address A-2 from the main memory 2 via the input interface 24 and overwrites the data of the address A-5 of the cache memory 22 through the storage processing unit 27 and stores the data. On the other hand (C8 '), the data is output to the CPU 1 via the output interface 25.
[0017]
The above is the operation of the memory access control device 20 in the first half (S1 'to S8') of the access request from the CPU 1. The memory access control device 20 in the latter half (S9 'to S16') of the access request from the CPU 1 performs the same operation as the former half (S1 'to S8'), and as shown in FIG. , C9 'to C16'.
[0018]
[Patent Document 1]
JP-A-8-16473
[0019]
[Problems to be solved by the invention]
FIG. 16 is a table showing the number of accesses to each of the addresses A-1 to A-10 of the main memory 2 in the above access requests (S1 'to S16'). It can be seen from FIG. 16 that the CPU 1 requests the most access to the address A-2 (S1 ', S3', S5 ', S8', S9 ', S11', S13 ', S16'). .
[0020]
However, in the conventional memory access control device 20, only the data of the address A-2 stored in the cache memory 22 is output to S3 ', S9' and S11 ', and the other data is output from the main memory 2. It simply outputs the input data. That is, the CPU 1 accesses the memory access control device 20 only in S3 ', S9' and S11 ', and the other accesses the main memory 2. In this case, there is a problem that the cache memory 22 having a higher read speed than the main memory 2 cannot be effectively used, and the processing time by the CPU 1 cannot be made sufficiently short.
[0021]
In view of the above circumstances, the present invention provides a memory access control device capable of sufficiently shortening the processing time of a predetermined processing device by reading and outputting sufficiently frequently requested data sufficiently quickly. The purpose is to provide.
[0022]
[Means for Solving the Problems]
In order to achieve the above object, a memory access control device according to claim 1 of the present invention provides a memory access control device for reading a part of data stored in a first storage device at a speed higher than that of the first storage device. A memory access control device that stores the data in the second storage device when the data to be accessed is stored in the second storage device, and outputs the data from the second storage device. The storage device is characterized by comprising storage processing control means for preferentially storing data with a large number of access requests to the storage device.
[0023]
According to a second aspect of the present invention, in the memory access control device according to the first aspect, when a plurality of data having the same number of access requests exist, Is stored preferentially.
[0024]
Further, in the memory access control device according to claim 3 of the present invention, in the above-described claim 1, the storage processing control unit includes a detection unit configured to detect an access address of the first storage device included in an access request. A counter that counts the number of detections for each access address detected by the detection unit; and a storage process that preferentially stores, in the second storage device, data of an access address with a large number of detections counted by the counter. And a control unit.
[0025]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of a memory access control device according to the present invention will be described in detail with reference to the accompanying drawings.
[0026]
FIG. 1 schematically shows a processing system equipped with a memory access control device according to an embodiment of the present invention. FIG. 1A is a block diagram showing the configuration of the processing system. FIG. 2B is a block diagram showing the configuration of the memory access control device in FIG. 1, the processing system includes a CPU 1, a main memory 2, and a memory access control device 10.
[0027]
The CPU 1 is a processing device that can interpret and execute a predetermined program command. The main memory 2 is the first storage device in the claims, and is, for example, a DRAM, a ROM, or the like, and stores predetermined data for each address.
[0028]
As shown in FIG. 1B, the memory access control device 10 includes a main control unit 11, a high-speed storage processing unit 12, an address detection unit 13, a counter unit 14, a determination unit 17, a storage processing control unit 18.
[0029]
The main controller 11 controls the operation of the memory access controller 10 according to a predetermined program. The high-speed storage processing unit 12 is, for example, a cache memory, and has a higher reading speed than the main memory 2 and a smaller storage capacity than the main memory 2. The address detection unit 13 detects an access address of the main memory 2 included in an access request from the CPU 1. The counter section 14 counts the number of detections for each access address detected by the address detection section 13. The determination unit 17 determines whether the data of the access address detected by the address detection unit 13 is stored in the high-speed storage processing unit 12.
[0030]
The storage processing control unit 18 is the second storage device in the above claim, and stores data of an access address with a large number of detections counted by the counter unit 14 in the high-speed storage processing unit 12 preferentially. When there are a plurality of pieces of data having the same number of detections counted by the counter section 14, the latest one of the pieces of data is preferentially stored in the high-speed storage processing section 12.
[0031]
Next, the operation of the memory access control device 10 constituting the processing system will be described. 2 and 3 are explanatory diagrams for explaining the operation of the memory access control device in FIG. 1. FIG. 2 shows the first half and FIG. 3 shows the second half. Here, for convenience of explanation, it is assumed that the main memory 2 can store a maximum of ten pieces of data, and the high-speed storage processing unit 12 can store a maximum of two pieces of data. 2 and 3, Sn (n = 1 to 16) indicates an access request from the CPU 1, and Cm (m = 0 to 16) indicates a storage state of the high-speed storage processing unit 12. I have. Further, the order of the addresses requested to be accessed by the CPU 1 is the same as that in FIGS. 14 and 15 described above. Hereinafter, the operation will be described in accordance with the order of the access requests from the CPU 1.
[0032]
Before the CPU 1 requests access to the main memory 2, the main memory 2 is in a state (M0) in which data is stored at addresses A-1 to A-10, respectively. The high-speed storage processing unit 12 of the memory access control device 10 is in an initial state, and is in an empty state in which nothing is stored (C0).
[0033]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S1), the main control section 11 of the memory access control device 10 detects the access address A-2 through the address detection section 13 and this access address through the counter section 14. The number of detections of the address A-2 is counted. Thereafter, it is determined whether or not the data of the access address A-2 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this point, since the high-speed storage processing unit 12 is in the initial state as described above (C0), the data of the access address A-2 is output from the main memory 2. Then, the main control unit 11 inputs the data of the access address A-2 from the main memory 2 through the input interface 15 and stores it in the high-speed storage processing unit 12 through the storage processing control unit 18 (C1), while the output interface The data is output to the CPU 1 via the CPU 16. With this access request (S1), the CPU 1 has accessed the main memory 2.
[0034]
When the CPU 1 requests access to the address A-3 of the main memory 2 (S2), the main control unit 11 of the memory access control device 10 detects the access address A-3 through the address detection unit 13 and accesses this access through the counter unit 14. The number of detections of the address A-3 is counted. Thereafter, it is determined whether or not the data of the access address A-3 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this time, since only the data of the address A-2 is stored in the high-speed storage processing unit 12 (C1), the data of the access address A-3 is output from the main memory 2. Then, the main control unit 11 inputs the data of the access address A-3 from the main memory 2 via the input interface 15 and stores it in the high-speed storage processing unit 12 through the storage processing control unit 18 (C2), while the output interface The data is output to the CPU 1 via the CPU 16. In this case, the high-speed storage processing unit 12 stores two data, that is, the data of the access address A-2 and the data of the access address A-3, and the storage capacity is completely filled. It becomes. With this access request (S2), the CPU 1 has accessed the main memory 2.
[0035]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S3), the main control section 11 of the memory access control device 10 detects the access address A-2 through the address detection section 13 and this access address through the counter section 14. The number of detections of the address A-3 is counted. Here, the number of times the access address A-2 is detected is counted as two. After that, the main control unit 11 determines whether or not the data of the access address A-2 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this point, since the data of the address A-2 is stored in the high-speed storage processing unit 12 (C2), the data is output to the CPU 1 via the output interface 16. By this access request (S3), the CPU 1 has accessed the memory access control device 10.
[0036]
When the CPU 1 requests access to the address A-4 of the main memory 2 (S4), the main control section 11 of the memory access control device 10 detects the access address A-4 through the address detection section 13 and this access address through the counter section 14. The number of detections of the address A-4 is counted. Here, the number of times the access address A-4 is detected is counted as one. Thereafter, the main control unit 11 determines whether the data of the access address A-4 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this time, since the data of the address A-4 is not stored in the high-speed storage processing unit 12 (C3), the data of the access address A-4 is output from the main memory 2. Then, the main control unit 11 inputs the data of the access address A-4 from the main memory 2 via the input interface 15, and detects the high-speed storage processing unit 12 through the storage processing control unit 18 while leaving the data having a large number of detections. While overwriting and storing the data of the address A-3 which is less frequently performed (C4), the data is output to the CPU 1 via the output interface 16. With this access request (S4), the CPU 1 has accessed the main memory 2.
[0037]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S5), the main control unit 11 of the memory access control device 10 detects the access address A-2 through the address detection unit 13 and this access address through the counter unit 14. The number of detections of the address A-2 is counted. Here, the number of times the access address A-2 is detected is counted as three. After that, the main control unit 11 determines whether or not the data of the access address A-2 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this point, since the data of the address A-2 is stored in the high-speed storage processing unit 12 (C4), the data is output to the CPU 1 via the output interface 16. By this access request (S5), the CPU 1 has accessed the memory access control device 10.
[0038]
When the CPU 1 requests access to the address A-5 of the main memory 2 (S6), the main control unit 11 of the memory access control device 10 detects the access address A-5 through the address detection unit 13 and this access address through the counter unit 14. The number of detections of the address A-5 is counted. Here, the number of times the access address A-5 is detected is counted as one. After that, the main control unit 11 determines whether the data of the access address A-5 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this point, since the data of the address A-5 is not stored in the high-speed storage processing unit 12 (C5), the data of the access address A-5 is output from the main memory 2. Then, the main control unit 11 inputs the data of the access address A-5 from the main memory 2 via the input interface 15, and detects the high-speed storage processing unit 12 through the storage processing control unit 18, excluding the data whose number of detections is large. While overwriting and storing the data of the address A-4 which has been performed less frequently (C6), the data is output to the CPU 1 via the output interface 16. By this access request (S6), the CPU 1 has accessed the main memory 2.
[0039]
When the CPU 1 requests access to the address A-6 of the main memory 2 (S7), the main control section 11 of the memory access control device 10 detects the access address A-6 through the address detection section 13 and this access address through the counter section 14. The number of detections of the address A-6 is counted. Here, the number of times the access address A-6 is detected is counted as one. Thereafter, the main control unit 11 determines whether or not the data of the access address A-6 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this point, since the data of the address A-6 is not stored in the high-speed storage processing unit 12 (C6), the data of the access address A-6 is output from the main memory 2. Then, the main control unit 11 inputs the data of the access address A-6 from the main memory 2 through the input interface 15, and detects the high-speed storage processing unit 12 through the storage processing control unit 18, excluding the data whose number of detections is large. While overwriting and storing the data of the address A-5 which has been performed less frequently (C7), the data is output to the CPU 1 via the output interface 16. By this access request (S7), the CPU 1 has accessed the main memory 2.
[0040]
When the CPU 1 requests access to the address A-2 of the main memory 2 (S8), the main control unit 11 of the memory access control device 10 detects the access address A-2 through the address detection unit 13 and this access address through the counter unit 14. The number of detections of the address A-2 is counted. Here, the number of times the access address A-2 is detected is counted as four. After that, the main control unit 11 determines whether or not the data of the access address A-2 is stored in the high-speed storage processing unit 12 through the determination unit 17. At this point, since the data of the address A-2 is stored in the high-speed storage processing unit 12 (C7), the data is output to the CPU 1 via the output interface 16. By this access request (S8), the CPU 1 has accessed the memory access control device 10.
[0041]
The number of times the access address is detected in the first half (S1 to S8) of the access request from the CPU 1 is as shown in FIG. As is apparent from FIG. 4, the number of detections of the access address A-2 is four, and each of the access addresses A-3 to A-6 is one. Therefore, after the access request S8, the high-speed storage processing unit 12 determines that the data of the address A-2 with the largest number of detections, that is, the data of the addresses A-3 to A-6 with the same number of detections, Of these, the data at the latest address A-6 is stored (C8).
[0042]
Hereinafter, the latter half (S9 to S16) of the access request from the CPU 1 will be described. The operation of the memory access control device 10 in the second half (S9 to S16) of the access request is the same as that in any of the first half (S1 to S8) of the access request, and therefore will be briefly described. 5 to 12 show the number of detections for each access address counted by the counter unit 14 in each of the latter half of the access request (S9 to S16).
[0043]
When the CPU 1 requests access to the address A-2 (S9), the memory access control device 10 detects the access address A-2 and detects the access address A- like in the case of S3, S5 and S8 described above. After counting the number of detections of 2, the high-speed storage processing unit 12 confirms the presence or absence of the data at the address A-2, and outputs the data to the CPU 1. The number of detections for each access address in this case is as shown in FIG.
[0044]
When the CPU 1 requests access to the address A-3 (S10), the memory access control device 10 detects the access address A-3 and counts the number of times the access address is detected. The data at the access address A-3 input from the main memory 2 is overwritten with the data at the address A-6 and stored (C10), while the data at the address A-6 inputted from the main memory 2 is stored (C10). FIG. 6 shows the number of detections for each access address in this case.
[0045]
When the CPU 1 makes an access request to the address A-2 (S11), the memory access control device 10 detects the access address A-2 and detects the access address in the same manner as in S3, S5, S8 and S9 described above. After counting the number of detections of A-2, the high-speed storage processing unit 12 confirms the presence or absence of the data at the address A-2, and outputs the data to the CPU 1. FIG. 7 shows the number of detections for each access address in this case.
[0046]
When the CPU 1 requests access to the address A-4 (S12), the memory access control device 10 detects the access address A-4 and counts the number of times the access address is detected. 4 is checked, and the data at the access address A-4 input from the main memory 2 is overwritten on the data at the address A-3 and stored (C12), while the data is output to the CPU 1. The number of detections for each access address in this case is as shown in FIG.
[0047]
When the CPU 1 requests access to the address A-2 (S13), the memory access control device 10 detects the access address A-2 and performs the detection in the same manner as in S3, S5, S8, S9 and S11 described above. After counting the number of times the access address A-2 is detected, the high-speed storage processing unit 12 confirms the presence or absence of the data at the address A-2, and outputs the data to the CPU 1. The number of detections for each access address in this case is as shown in FIG.
[0048]
When the CPU 1 requests access to the address A-5 (S14), the memory access control device 10 detects the access address A-5 and counts the number of times the access address is detected. The data of the access address A-5 input from the main memory 2 is overwritten on the data of the address A-4 and stored (C14), and the data is output to the CPU 1. The number of detections for each access address in this case is as shown in FIG.
[0049]
When the CPU 1 requests access to the address A-6 (S15), the memory access control device 10 detects the access address A-6, counts the number of times the access address is detected, and then sends the address A--6 to the high-speed storage processing unit 12. The data of the access address A-6 input from the main memory 2 is overwritten with the data of the address A-5 and stored (C15), and the data is output to the CPU 1. The number of detections for each access address in this case is as shown in FIG.
[0050]
Finally, when the CPU 1 requests access to the address A-2 (S16), the memory access control device 10 sets the access address A-2 in the same manner as in the above-described S3, S5, S8, S9, S11 and S13. After detecting and counting the number of times the access address A-2 is detected, the high-speed storage processing unit 12 confirms the presence or absence of the data at the address A-2, and outputs the data to the CPU 1. The number of detections for each access address in this case is as shown in FIG.
[0051]
In the latter half of the access request from the CPU 1 (S9 to S16), in the access requests S9, S11, S13 and S16, the CPU 1 has accessed the memory access control device 10, and in the other access requests, the CPU 1 Means that the main memory 2 has been accessed.
[0052]
As described above, according to the memory access control device 10 according to the embodiment of the present invention, the storage processing control unit 18 preferentially stores the data of the access address with the large number of detections counted by the counter unit 14 at high speed. Since the data is stored in the processing unit 12, the data frequently requested to be accessed can be read and output sufficiently quickly, so that the processing time by the CPU 1 can be sufficiently reduced. Explaining in comparison with the conventional example, in the conventional example, the data of the access address could only be read and output from the cache memory 22 only in the case of the access requests S3 ', S9' and S11 '. In the case of the access requests S3, S5, S8, S9, S11, S13, and S16, the data of the access address can be read and output from the high-speed storage processing unit 12, and the processing time by the CPU 1 can be greatly reduced. It's clear what you can do.
[0053]
When there are a plurality of data of the access address having the same number of detections counted by the counter unit 14, the storage processing control unit 18 stores the latest data among the data in the high-speed storage processing unit 12. When the access address is requested again, the data of the access address can be read out and output sufficiently quickly, whereby the processing time by the CPU 1 can be made sufficiently short.
[0054]
Further, according to the memory access control device 10 according to the present embodiment, the number of the high-speed storage processing units 12 is not increased, so that the cost required for the entire device is almost the same as the conventional example, and the cost is disadvantageous. There is no.
[0055]
Although the preferred embodiment of the memory access control device of the present invention has been described above, the present invention is not limited to this. For example, in the above embodiment, the memory access control device 10 is described as an external device of the CPU 1, but the memory access control device of the present invention is provided inside a processing device such as a CPU and functions as an internal device. Can also.
[0056]
Further, in the above embodiment, the high-speed storage processing unit 12 is provided inside the memory access control device 10, but in the present invention, the high-speed storage processing unit as the second storage device It may be provided outside the device.
[0057]
Further, in the above embodiment, the first storage device is the main memory 2 and the second storage device is the high-speed storage processing unit 12. However, in the present invention, the first storage device is, for example, a so-called hard disk or various memories. The second storage device may be, for example, a main memory.
[0058]
【The invention's effect】
As described above, according to the first aspect of the present invention, since the storage processing control means preferentially stores data with a large number of access requests in the second storage device, data for which frequent access requests are made Can be read out and output sufficiently quickly, whereby the processing time by a predetermined processing device can be made sufficiently short.
[0059]
According to the second aspect of the present invention, when there are a plurality of data having the same number of access requests, the storage processing control means preferentially assigns the latest one of the data to the second storage device. Since the latest data is requested to be accessed again, the data can be read and output sufficiently fast.
[0060]
According to the third aspect of the present invention, the storage processing control unit preferentially stores, in the second storage device, the data of the access address having the large number of detections counted by the counter unit, so that the access request is frequently made. The data to be read can be read out and output sufficiently fast, so that the processing time by a predetermined processing device can be made sufficiently short.
[Brief description of the drawings]
FIG. 1 is a block diagram schematically showing a processing system including a memory access control device according to an embodiment of the present invention.
FIG. 2 is an explanatory diagram for describing a first half of an operation of the memory access control device in FIG. 1;
FIG. 3 is an explanatory diagram for explaining the latter half of the operation of the memory access control device in FIG. 1;
FIG. 4 is a table showing the number of detections for each access address in the first half of an access request from a CPU.
FIG. 5 is a table showing the number of detections for each access address in access requests S1 to S9 from the CPU.
FIG. 6 is a table showing the number of detections for each access address in access requests S1 to S10 from the CPU.
FIG. 7 is a table showing the number of detections for each access address in access requests S1 to S11 from the CPU.
FIG. 8 is a table showing the number of detections for each access address in access requests S1 to S12 from the CPU.
FIG. 9 is a table showing the number of detections for each access address in access requests S1 to S13 from the CPU.
FIG. 10 is a table showing the number of detections for each access address in access requests S1 to S14 from the CPU.
FIG. 11 is a table showing the number of detections for each access address in access requests S1 to S15 from the CPU.
FIG. 12 is a table showing the number of detections for each access address in access requests S1 to S16 from the CPU.
FIG. 13 is a block diagram schematically showing a processing system in which a conventional memory access control device is mounted.
FIG. 14 is an explanatory diagram for describing the first half of the operation of the memory access control device in FIG. 13;
FIG. 15 is an explanatory diagram for describing the latter half of the operation of the memory access control device in FIG. 13;
FIG. 16 is a table showing the number of access requests from the CPU in FIGS. 14 and 15;
[Explanation of symbols]
1 CPU
2 Main memory
10 Memory access control device
11 Main control unit
12 High-speed storage processing unit
13 Address detector
14 Counter section
15 Input interface
16 output interface
17 Judgment unit
18 Memory processing control unit

Claims (3)

第1の記憶装置に記憶されているデータの一部を、読み出し速度が前記第1の記憶装置より速い第2の記憶装置に記憶し、アクセス要求の対象となるデータが前記第2の記憶装置に存在する場合に、前記データを前記第2の記憶装置から出力するメモリアクセス制御装置において、
前記第2の記憶装置に対して、アクセス要求の回数が多いデータを優先的に記憶させる記憶処理制御手段を備えていることを特徴とするメモリアクセス制御装置。
A part of the data stored in the first storage device is stored in a second storage device whose reading speed is faster than that of the first storage device, and the data to be accessed is stored in the second storage device. A memory access control device that outputs the data from the second storage device when
A memory access control device, comprising: a storage processing control unit that preferentially stores data with a large number of access requests to the second storage device.
前記記憶処理制御手段は、アクセス要求の回数が同じデータが複数存在する場合には、該データのうち最新のものを優先的に記憶させるものであることを特徴とする請求項1に記載のメモリアクセス制御装置。2. The memory according to claim 1, wherein when there are a plurality of pieces of data having the same number of access requests, the storage processing control means stores the latest one of the pieces of data preferentially. Access control device. 前記記憶処理制御手段は、アクセス要求に含まれる前記第1の記憶装置のアクセスアドレスを検出する検出部と、
前記検出部が検出したアクセスアドレス毎の検出回数をカウントするカウンタ部と、
前記カウンタ部によりカウントされた検出回数が多いアクセスアドレスのデータを優先的に前記第2の記憶装置に記憶させる記憶処理制御部と
を有して構成されていることを特徴とする請求項1に記載のメモリアクセス制御装置。
A detection unit configured to detect an access address of the first storage device included in an access request;
A counter unit that counts the number of detections for each access address detected by the detection unit,
2. The storage processing control unit according to claim 1, further comprising: a storage processing control unit configured to store data of an access address having a large number of detections counted by the counter unit in the second storage device preferentially. A memory access control device according to claim 1.
JP2002272172A 2002-09-18 2002-09-18 Memory access control device Pending JP2004110419A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002272172A JP2004110419A (en) 2002-09-18 2002-09-18 Memory access control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002272172A JP2004110419A (en) 2002-09-18 2002-09-18 Memory access control device

Publications (1)

Publication Number Publication Date
JP2004110419A true JP2004110419A (en) 2004-04-08

Family

ID=32269270

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002272172A Pending JP2004110419A (en) 2002-09-18 2002-09-18 Memory access control device

Country Status (1)

Country Link
JP (1) JP2004110419A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008544372A (en) * 2005-06-14 2008-12-04 シーコア ソリューションズ Information caching by popularity

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008544372A (en) * 2005-06-14 2008-12-04 シーコア ソリューションズ Information caching by popularity
JP2013149258A (en) * 2005-06-14 2013-08-01 Ccor Solutions Cache processing for information by popularity

Similar Documents

Publication Publication Date Title
US9037810B2 (en) Pre-fetching of data packets
JP7340326B2 (en) Perform maintenance operations
US9645931B2 (en) Filtering snoop traffic in a multiprocessor computing system
CN110959154B (en) Private cache for thread local store data access
KR20070113293A (en) Method and system for optimizing translation lookaside buffer entries
US10324760B2 (en) Leases for blocks of memory in a multi-level memory
US10482033B2 (en) Method and device for controlling memory
US10198357B2 (en) Coherent interconnect for managing snoop operation and data processing apparatus including the same
WO2009110168A1 (en) Dma transfer device
CN109716305B (en) Method, computing device, and medium for implementing asynchronous cache maintenance operations
US9384131B2 (en) Systems and methods for accessing cache memory
JP4452644B2 (en) Improved memory performance
JPWO2010032433A1 (en) Buffer memory device, memory system, and data reading method
JP5831319B2 (en) Control device, management device, information processing system, operation method of control device, operation method of management device, operation method of information processing system, and program
JP2004110419A (en) Memory access control device
JP2007207249A (en) Method and system for cache hit under miss collision handling, and microprocessor
US11249914B2 (en) System and methods of an efficient cache algorithm in a hierarchical storage system
US9442863B1 (en) Cache entry management using read direction detection
US11307999B2 (en) Data cache segregation for spectre mitigation
US9218293B2 (en) Data processing system with cache linefill buffer and method of operation
US9043557B1 (en) Heterogeneous memory system
US20180217929A1 (en) Interleaved access of memory
US6643736B1 (en) Scratch pad memories
CN107408059B (en) Cross-level prefetching for shared multilevel banks
JP6565729B2 (en) Arithmetic processing device, control device, information processing device, and control method for information processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070619

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20071016