JP2002073416A - Cache memory and image output device - Google Patents
Cache memory and image output deviceInfo
- Publication number
- JP2002073416A JP2002073416A JP2000256499A JP2000256499A JP2002073416A JP 2002073416 A JP2002073416 A JP 2002073416A JP 2000256499 A JP2000256499 A JP 2000256499A JP 2000256499 A JP2000256499 A JP 2000256499A JP 2002073416 A JP2002073416 A JP 2002073416A
- Authority
- JP
- Japan
- Prior art keywords
- data block
- data
- cache memory
- storage unit
- stored
- 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
Links
Landscapes
- Record Information Processing For Printing (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、キャッシュメモリ
および画像出力装置に関する。The present invention relates to a cache memory and an image output device.
【0002】[0002]
【従来の技術】例えば、カラープリンタを使用する場
合、コンピュータ装置で作成されたデータの色空間(R
(レッド)、G(グリーン)、およびB(ブルー))と
プリンタ装置で実現しようとする色空間(C(シア
ン)、M(マゼンダ)、Y(イエロー)、およびK(ブ
ラック))が異なり、さらに使用する塗料や用紙の特性
に応じて色空間の変換処理が必要である。2. Description of the Related Art For example, when a color printer is used, a color space (R) of data created by a computer device is used.
(Red), G (green), and B (blue)) and the color spaces (C (cyan), M (magenta), Y (yellow), and K (black)) to be realized by the printer device, Further, a color space conversion process is required according to the characteristics of the paint or paper used.
【0003】色処理を行う場合、外部メモリ等に格納さ
れた非線型なデータを参照し、四面体補間等の技術を利
用して元の色空間データから変換後の色空間データへの
計算を行っている。1頁の処理中には、同じデータが外
部メモリから参照されるため、キャッシュメモリを利用
して処理速度の向上を図っている。When performing color processing, reference is made to non-linear data stored in an external memory or the like, and the calculation from the original color space data to the converted color space data is performed using a technique such as tetrahedral interpolation. Is going. Since the same data is referred to from the external memory during the processing of one page, the processing speed is improved by using the cache memory.
【0004】従来のキャッシュメモリは、CPU等の演
算装置からの信号によってキャッシュメモリ上に読み出
されたデータを保護(ロック)することはできるが、回
路内での状況に応じて動的にロックすることができなか
った。それを改善する手段としてFIFO(First In Fi
rst Out)置換法やLRU(Least Recently Used)置換法
などの回路を採用し、何度も参照されるデータがキャッ
シュメモリから破棄される確率を下げ、データ参照速度
の向上が行われている。A conventional cache memory can protect (lock) data read out from the cache memory by a signal from an arithmetic unit such as a CPU, but dynamically locks the data according to a situation in a circuit. I couldn't. FIFO (First In Fi
Circuits such as the rst out (Least Out) replacement method and the LRU (Least Recently Used) replacement method are employed to reduce the probability that data that is referenced many times is discarded from the cache memory, thereby improving the data reference speed.
【0005】[0005]
【発明が解決しようとする課題】キャッシュメモリのロ
ックをCPU等からの信号によって実現しようとした場
合、ソフトウェア制御となるため、即時性が失われるか
制御処理のために時間が割かれるために全体的な速度の
低下が生じてしまう。If the lock of the cache memory is to be realized by a signal from a CPU or the like, software control is performed. The actual speed is reduced.
【0006】FIFO置換法やLRU置換法の場合、同
一インデックス上に同時に保存可能なデータ数はキャッ
シュライン(キャッシュ列)数分のみであり、同一イン
デックス上でキャッシュ列数回参照されなかったデータ
は破棄されることがある。破棄されたデータが次回必要
となった場合でも、もう一度外部メモリからの読み出し
を必要とするため、全体を通して使用頻度の高いデータ
であっても、キャッシュ列数回参照されないことで破棄
され、再読み出しが行われて全体の処理速度を低下させ
てしまう場合がある。また、キャッシュメモリの参照率
(必要なデータがキャッシュメモリに存在する確率)を
向上させるため、より大きなメモリが必要とされてい
る。In the case of the FIFO replacement method or the LRU replacement method, the number of data that can be simultaneously stored on the same index is only the number of cache lines (cache columns). May be destroyed. Even if the discarded data is needed next time, it must be read from the external memory again, so even if the data is frequently used throughout, it is discarded because it is not referred to several times in the cache column, and it is read again. May be performed to lower the overall processing speed. Further, in order to improve the reference rate (the probability that necessary data exists in the cache memory) of the cache memory, a larger memory is required.
【0007】そこで、本発明の目的は、キャッシュメモ
リにおいて、データの参照回数を考慮し、参照率を向上
させることである。It is an object of the present invention to improve the reference rate in a cache memory in consideration of the number of data references.
【0008】[0008]
【課題を解決するための手段】上記目的を達成するため
に、本発明に係るキャッシュメモリは、データブロック
を格納する複数の領域を有するデータブロック記憶手段
と、前記データブロック記憶手段に格納されている各デ
ータブロックの参照回数を記憶する参照回数記憶手段
と、新たなデータブロックを前記データブロック記憶手
段に書き込む際に、空き領域がない場合には、前記参照
回数の少ないデータブロックを格納している領域に、新
たなデータブロックを書き込む制御手段とを備える。In order to achieve the above object, a cache memory according to the present invention comprises: a data block storage means having a plurality of areas for storing data blocks; A reference count storage unit for storing a reference count of each data block, and a new data block written to the data block storage unit. Control means for writing a new data block in the area where the data block is located.
【0009】ここで、前記キャッシュメモリは、前記デ
ータブロック記憶手段に格納されている各データブロッ
クの参照回数がしきい値以上か否かを示す判定情報を記
憶する判定情報記憶手段をさらに備え、前記制御手段
は、新たなデータブロックを前記データブロック記憶手
段に書き込む際に、空き領域がない場合には、前記判定
情報を調べて前記参照回数がしきい値未満のデータブロ
ックを判定し、該データブロックの1つを格納している
領域に、新たなデータブロックを書き込むものとするこ
とができる。Here, the cache memory further includes determination information storage means for storing determination information indicating whether or not the number of references to each data block stored in the data block storage means is equal to or greater than a threshold value. When writing a new data block into the data block storage unit, if there is no free space, the control unit checks the determination information to determine a data block in which the reference count is less than a threshold. A new data block may be written in an area storing one of the data blocks.
【0010】ここで、前記キャッシュメモリは、前記デ
ータブロックの参照履歴を記憶する参照履歴記憶手段を
さらに備え、前記制御手段は、前記参照履歴に基づいて
FIFOまたはLRUに従った順序で前記判定情報を調
べるものとすることができる。Here, the cache memory further includes reference history storage means for storing a reference history of the data block, and the control means controls the determination information in an order according to FIFO or LRU based on the reference history. Can be examined.
【0011】本発明に係る画像出力装置は、前記キャッ
シュメモリを備える。[0011] An image output device according to the present invention includes the cache memory.
【0012】以上の構成によれば、キャッシュメモリに
おいて、データの参照回数を考慮し、参照率を向上させ
ることができる。According to the above configuration, the reference rate can be improved in the cache memory in consideration of the number of data references.
【0013】[0013]
【発明の実施の形態】図1は、本実施形態における画像
出力装置(例えば、プリンタ)の構成例を示すブロック
図である。本実施形態に係る画像出力装置102は、キ
ャッシュメモリ110、CPU121、メモリ122、
プリンタエンジン制御装置123、プリンタエンジン1
24、およびインターフェース125を備え、画像出力
制御装置(例えば、パーソナルコンピュータ)101か
ら送られてくる画像データに基づき画像を出力する。FIG. 1 is a block diagram showing a configuration example of an image output apparatus (for example, a printer) according to this embodiment. The image output device 102 according to the present embodiment includes a cache memory 110, a CPU 121, a memory 122,
Printer engine control device 123, printer engine 1
24, and an interface 125, and outputs an image based on image data sent from an image output control device (for example, a personal computer) 101.
【0014】CPU121は、マイクロプロセッサの形
態をとることができ、各種の制御を行う。メモリ122
には、各種プログラム(例えば、色処理のためのプログ
ラム)および各種データが記憶される。プリンタエンジ
ン124は、プリンタエンジン制御装置123の制御の
下、画像データに基づき画像を出力する。The CPU 121 can take the form of a microprocessor and performs various controls. Memory 122
Stores various programs (for example, a program for color processing) and various data. The printer engine 124 outputs an image based on the image data under the control of the printer engine control device 123.
【0015】図2は、本実施形態におけるキャッシュメ
モリの構成例を示すブロック図である。キャッシュメモ
リ110は、各種制御を行う制御部111、データブロ
ック(データのかたまり)を記憶するデータブロック記
憶部112、および各データブロックの参照回数等を記
憶する参照回数等記憶部113を備える。本実施形態に
おいては、キャッシュメモリ110を半導体として実現
している。FIG. 2 is a block diagram showing a configuration example of the cache memory according to the present embodiment. The cache memory 110 includes a control unit 111 that performs various controls, a data block storage unit 112 that stores a data block (a block of data), and a storage unit 113 that stores the number of references of each data block. In the present embodiment, the cache memory 110 is realized as a semiconductor.
【0016】制御部111は、CPU121からあるデ
ータに対するアクセス要求を受けると、そのデータがデ
ータブロック記憶部112に格納されているか否かを調
べる。格納されている場合には、そのデータをCPU1
21に転送し、格納されていない場合には、そのデータ
を含むデータブロックをメモリ122から読み出して、
データブロック記憶部112に格納し、アクセス要求の
あったデータをCPU121に転送する。When receiving an access request for certain data from the CPU 121, the control unit 111 checks whether or not the data is stored in the data block storage unit 112. If stored, the data is transferred to the CPU 1
21 and, if not stored, read a data block containing that data from memory 122,
The data stored in the data block storage unit 112 is transferred to the CPU 121 in response to the access request.
【0017】図3は、データブロック記憶部112の領
域を説明するための図である。データブロック記憶部1
12は、データブロックを格納する複数の領域を有す
る。図3の例では、インデックス(I1〜In)の各々
について、4つのキャッシュライン(CL1〜CL4)
が設けられている。すなわち、全部でn×4個の領域が
設けられており、各領域にデータブロックを格納するこ
とができる。データブロック記憶部112の容量として
は、例えば4キロバイトや2キロバイトが考えられる。FIG. 3 is a diagram for explaining the area of the data block storage unit 112. Data block storage unit 1
12 has a plurality of areas for storing data blocks. In the example of FIG. 3, for each of the indexes (I1 to In), four cache lines (CL1 to CL4)
Is provided. That is, a total of n × 4 areas are provided, and a data block can be stored in each area. The capacity of the data block storage unit 112 may be, for example, 4 kilobytes or 2 kilobytes.
【0018】本実施形態においては、データブロックの
アドレスからインデックスを求め、そのインデックスの
いずれかの領域(キャッシュライン)にそのデータブロ
ックを格納するようにしている。ただし、インデックス
とは無関係に、データブロックをどの領域にも格納でき
るようにすることもできる。In this embodiment, an index is obtained from the address of a data block, and the data block is stored in any area (cache line) of the index. However, the data block can be stored in any area regardless of the index.
【0019】データブロックを新たに格納しようとする
ときに、対応するインデックスの4つのキャッシュライ
ンがすべて塞がっている(空き領域がない)場合には、
いずれかの領域に上書きすることになる。When a new data block is to be stored, if all four cache lines of the corresponding index are closed (there is no free space),
Any area will be overwritten.
【0020】図4は、参照回数等記憶部113に記憶さ
れている情報の例を示す図である。本実施形態において
は、各インデックスの各キャッシュラインごとに、デー
タブロック名、(CPUの)参照回数、およびしきい値
判定情報(ここでは、ビットで表している)を記憶して
いる。参照回数は、そのデータブロックがデータブロッ
ク記憶部112に格納された段階で0に設定され、以後
CPUが参照するごとに1ずつ増加される。しきい値判
定情報(ビット)は、データブロックの参照回数がしき
い値以上か否かを示す情報である。図4の例では、しき
い値は10であり、データブロックAおよびCについて
は、参照回数がしきい値以上であることから、しきい値
判定ビットは1であり、データブロックBおよびDにつ
いては、参照回数がしきい値未満であることから、しき
い値判定ビットは0である。FIG. 4 is a diagram showing an example of information stored in the storage unit 113 such as the number of times of reference. In the present embodiment, a data block name, the number of references (of the CPU), and threshold value determination information (here, represented by bits) are stored for each cache line of each index. The reference count is set to 0 when the data block is stored in the data block storage unit 112, and is incremented by one each time the CPU refers to the data block. The threshold value determination information (bit) is information indicating whether the number of times of reference to the data block is equal to or greater than the threshold value. In the example of FIG. 4, the threshold value is 10, and since the number of times of reference is equal to or greater than the threshold value for data blocks A and C, the threshold value determination bit is 1, and for data blocks B and D, Since the reference count is less than the threshold value, the threshold value determination bit is 0.
【0021】制御部111は、新たなデータブロックを
データブロック記憶部112に書き込む際に、空き領域
がない場合には、しきい値判定情報を調べて参照回数が
しきい値未満のデータブロックを判定し、該データブロ
ックの1つを格納している領域に、新たなデータブロッ
クを書き込む。したがって、図4の例では、データブロ
ックBまたはDを格納している領域に、新たなデータブ
ロックを上書きすることになる。When writing a new data block into the data block storage unit 112, if there is no free space, the control unit 111 checks the threshold determination information and determines a data block whose reference count is less than the threshold. The determination is made, and a new data block is written in the area storing one of the data blocks. Therefore, in the example of FIG. 4, a new data block is overwritten on the area storing the data block B or D.
【0022】上書きするデータブロックを選択する際に
は、参照回数を考慮して参照回数の最も少ないしきい値
未満のデータブロックを選択するようにしてもよいし、
一番最初に見つかったしきい値未満のデータブロックを
選択するようにしてもよい。When selecting a data block to be overwritten, a data block less than the threshold with the least number of references may be selected in consideration of the number of references.
A data block smaller than the first found threshold value may be selected.
【0023】しきい値未満のデータブロックが1つもな
い場合には、例えば、参照回数の最も少ないデータブロ
ックを上書きの対象とすることが考えられる。If there is no data block smaller than the threshold value, for example, it is conceivable that the data block with the least number of references is to be overwritten.
【0024】参照回数等記憶部113に、データブロッ
クの参照履歴を記憶して、その参照履歴に基づいてFI
FOまたはLRUに従った順序でしきい値判定ビットを
調べるようにすることもできる。The reference history of the data block is stored in the reference count storage unit 113, and the FI is stored based on the reference history.
The threshold determination bits may be checked in an order according to the FO or the LRU.
【0025】本実施形態においては、上書きするデータ
ブロックを選択(決定)する際に、参照回数およびしき
い値判定ビットの双方を用いているが、例えば、参照回
数のみを用いて参照回数の最も少ないデータブロックを
選択するようにすることもできる。In this embodiment, when selecting (deciding) a data block to be overwritten, both the reference count and the threshold value judgment bit are used. It is also possible to select a small number of data blocks.
【0026】また、本実施形態においては、本発明を画
像出力装置に適用した例について説明したが、本発明は
キャッシュメモリを必要とする他の装置に適用すること
もできる。In this embodiment, an example in which the present invention is applied to an image output device has been described. However, the present invention can be applied to other devices requiring a cache memory.
【0027】[0027]
【発明の効果】以上説明したように本発明によれば、キ
ャッシュメモリにおいて、データの参照回数を考慮し、
参照率を向上させることができる。As described above, according to the present invention, in the cache memory, the number of data references is considered,
The reference rate can be improved.
【図1】本発明の実施形態における画像出力装置の構成
例を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration example of an image output device according to an embodiment of the present invention.
【図2】本発明の実施形態におけるキャッシュメモリの
構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a cache memory according to the embodiment of the present invention.
【図3】データブロック記憶部の領域を説明するための
図である。FIG. 3 is a diagram for explaining an area of a data block storage unit;
【図4】参照回数等記憶部に記憶されている情報の例を
示す図である。FIG. 4 is a diagram illustrating an example of information stored in a storage unit such as a reference count.
101 画像出力制御装置 102 画像出力装置 110 キャッシュメモリ 111 制御部 112 データブロック記憶部 113 参照回数等記憶部 121 CPU 122 メモリ 123 プリンタエンジン制御装置 124 プリンタエンジン 125 インターフェース Reference Signs List 101 Image output control device 102 Image output device 110 Cache memory 111 Control unit 112 Data block storage unit 113 Reference count etc. storage unit 121 CPU 122 Memory 123 Printer engine control device 124 Printer engine 125 Interface
Claims (4)
有するデータブロック記憶手段と、 前記データブロック記憶手段に格納されている各データ
ブロックの参照回数を記憶する参照回数記憶手段と、 新たなデータブロックを前記データブロック記憶手段に
書き込む際に、空き領域がない場合には、前記参照回数
の少ないデータブロックを格納している領域に、新たな
データブロックを書き込む制御手段とを備えたことを特
徴とするキャッシュメモリ。1. A data block storage unit having a plurality of areas for storing data blocks, a reference count storage unit for storing a reference count of each data block stored in the data block storage unit, and a new data block. When writing to the data block storage means, if there is no free area, a control means for writing a new data block in the area storing the data block with a small number of references is provided. Cache memory to do.
ている各データブロックの参照回数がしきい値以上か否
かを示す判定情報を記憶する判定情報記憶手段をさらに
備え、前記制御手段は、新たなデータブロックを前記デ
ータブロック記憶手段に書き込む際に、空き領域がない
場合には、前記判定情報を調べて前記参照回数がしきい
値未満のデータブロックを判定し、該データブロックの
1つを格納している領域に、新たなデータブロックを書
き込むことを特徴とする請求項1に記載のキャッシュメ
モリ。2. The apparatus according to claim 1, further comprising: determination information storage means for storing determination information indicating whether or not the number of times of reference to each data block stored in said data block storage means is equal to or greater than a threshold value. When writing a new data block into the data block storage means, if there is no free space, the determination information is checked to determine a data block whose reference count is less than a threshold value, and one of the data blocks is determined. 2. The cache memory according to claim 1, wherein a new data block is written in the storage area.
る参照履歴記憶手段をさらに備え、前記制御手段は、前
記参照履歴に基づいてFIFOまたはLRUに従った順
序で前記判定情報を調べることを特徴とする請求項2に
記載のキャッシュメモリ。3. The apparatus according to claim 1, further comprising: a reference history storage unit configured to store a reference history of the data block, wherein the control unit checks the determination information in an order according to FIFO or LRU based on the reference history. 3. The cache memory according to claim 2, wherein:
ャッシュメモリを備えたことを特徴とする画像出力装
置。4. An image output device comprising the cache memory according to claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000256499A JP2002073416A (en) | 2000-08-25 | 2000-08-25 | Cache memory and image output device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000256499A JP2002073416A (en) | 2000-08-25 | 2000-08-25 | Cache memory and image output device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2002073416A true JP2002073416A (en) | 2002-03-12 |
Family
ID=18745101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000256499A Pending JP2002073416A (en) | 2000-08-25 | 2000-08-25 | Cache memory and image output device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2002073416A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008544372A (en) * | 2005-06-14 | 2008-12-04 | シーコア ソリューションズ | Information caching by popularity |
-
2000
- 2000-08-25 JP JP2000256499A patent/JP2002073416A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008544372A (en) * | 2005-06-14 | 2008-12-04 | シーコア ソリューションズ | Information caching by popularity |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5039334B2 (en) | Cache memory control method and apparatus | |
EP0236781B1 (en) | Image data processing method and apparatus therefor | |
JP2000158724A (en) | Image-processing apparatus, image processing method and recording medium | |
JP4364166B2 (en) | Cache device | |
JPH06348868A (en) | Data driving type information processing system | |
JPH0263763A (en) | Printing apparatus | |
EP0386719A2 (en) | Partial store control circuit | |
JP2002073416A (en) | Cache memory and image output device | |
JPH0553909A (en) | Cache memory control system for image data processing | |
JP3772569B2 (en) | Image processing apparatus and image processing method | |
EP0253352B1 (en) | Graphic data processing system | |
JP3997808B2 (en) | Drawing processing apparatus and drawing processing method | |
EP0285309A2 (en) | Memory protection apparatus for use in an electronic calculator | |
JPS5847784B2 (en) | key storage system | |
JPH01173241A (en) | Cache memory device | |
KR100617232B1 (en) | Graphic Data processing Unit | |
JPH0736806A (en) | Dma system | |
JP2771350B2 (en) | Image processing device | |
JP2002024157A (en) | Method and device for processing dma | |
JP2669311B2 (en) | Bitmap file access system | |
JPH028931A (en) | Printer | |
JPH07320045A (en) | Image processor | |
JPH04205678A (en) | Image information processor | |
JPH11249958A (en) | Memory control system | |
JPS58125287A (en) | High-speed buffer storage device |