JP2010231701A - Apparatus for quickly starting system - Google Patents

Apparatus for quickly starting system Download PDF

Info

Publication number
JP2010231701A
JP2010231701A JP2009081059A JP2009081059A JP2010231701A JP 2010231701 A JP2010231701 A JP 2010231701A JP 2009081059 A JP2009081059 A JP 2009081059A JP 2009081059 A JP2009081059 A JP 2009081059A JP 2010231701 A JP2010231701 A JP 2010231701A
Authority
JP
Japan
Prior art keywords
storage device
access
main storage
cache memory
data
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.)
Withdrawn
Application number
JP2009081059A
Other languages
Japanese (ja)
Inventor
Takuma Koseki
拓真 小関
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.)
Kawasaki Microelectronics Inc
Original Assignee
Kawasaki Microelectronics Inc
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 Kawasaki Microelectronics Inc filed Critical Kawasaki Microelectronics Inc
Priority to JP2009081059A priority Critical patent/JP2010231701A/en
Publication of JP2010231701A publication Critical patent/JP2010231701A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a quick starting apparatus that reduces the time from power-on to completion of system starting, in a system including a cache memory between a CPU and a main storage. <P>SOLUTION: The quick starting apparatus includes a monitoring apparatus that monitors access from the cache memory to the main storage and acquires access time from power-on to an access operation and an address of the main storage to be accessed at the first system boot, and a table storage that stores the access time and address acquired by the monitoring apparatus as table data. The monitoring apparatus reads data from an address of the main storage corresponding to a relevant address of the table data according to the access time included in the table data stored in the table storage, and writes the read data into the cache memory at the second and subsequent system boot. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、CPUと主記憶装置との間にキャッシュメモリを備えるシステムにおいて、キャッシュメモリの制御を工夫することにより、システム起動時の処理時間を短縮する起動高速化装置に関するものである。   The present invention relates to a startup speed-up device that shortens the processing time during system startup by devising control of the cache memory in a system including a cache memory between a CPU and a main storage device.

電気製品等の組み込みシステムとして、CPU(コンピュータ)と、キャッシュメモリ(キャッシュコントローラを含む)と、主記憶装置(メインメモリ)とを含むシステムが用いられている。   A system including a CPU (computer), a cache memory (including a cache controller), and a main storage device (main memory) is used as an embedded system such as an electric product.

キャッシュメモリは、CPUから主記憶装置へのアクセスの遅延を減らすために、CPUと主記憶装置との間に配置される揮発性メモリである。CPUが一度ロードした(読み出した)命令コードやデータ(以下、両者を纏めて読み出しデータともいう)をキャッシュメモリに保存しておき、CPUが同じ読み出しデータを再利用する際に、主記憶装置からではなくキャッシュメモリから再ロードすることにより、ロード時間を短縮し、CPUの処理速度を上昇させることができる。   The cache memory is a volatile memory disposed between the CPU and the main storage device in order to reduce a delay in access from the CPU to the main storage device. The instruction code and data once loaded (read) by the CPU (hereinafter collectively referred to as read data) are stored in the cache memory, and when the CPU reuses the same read data, Instead of reloading from the cache memory, the load time can be shortened and the processing speed of the CPU can be increased.

システムの起動直後には、揮発性のキャッシュメモリにはどのような読み出しデータも記憶されていない。その結果、システムの起動直後には、CPUが初期化プログラム(初期化ルーチンないし起動プログラムとも呼ばれる)を実行する時に主記憶装置への多くのアクセスが生じてしまう。また、初期化プログラムには繰り返し命令が少なく、これにより主記憶装置へのアクセスが頻繁に発生し、その都度、CPUに待ち時間が発生することが分かった。   Immediately after the system is started, no read data is stored in the volatile cache memory. As a result, immediately after the system is started, many accesses to the main storage device occur when the CPU executes an initialization program (also called an initialization routine or a startup program). Further, it has been found that the initialization program has few repeated instructions, which causes frequent access to the main storage device, and a waiting time is generated in the CPU each time.

このような問題に対応するため、従来、いくつかの方法が提案されている。
1つの方法は、データ先読み制御方式であり、CPUが実行した命令コードの後続の命令コードないしデータを先読みして次回の読み出しに備えるというものである(特許文献1)。
In order to cope with such a problem, several methods have been conventionally proposed.
One method is a data prefetch control method, in which an instruction code or data subsequent to an instruction code executed by the CPU is prefetched to prepare for the next reading (Patent Document 1).

ところが、この方法では、プログラムの分岐命令などによって、先読みした後続の命令コードやデータが必ずしも使用されるとは限らない。そのため、これによりキャッシュメモリに不必要なキャッシュデータがロードされ、他の必要なキャッシュデータが削除されてしまうため、その結果、それらの命令コードおよびデータの再ロードが発生してしまうリスクがある。   However, in this method, the prefetched subsequent instruction code and data are not always used by a program branch instruction or the like. As a result, unnecessary cache data is loaded into the cache memory and other necessary cache data is deleted. As a result, there is a risk of reloading those instruction codes and data.

また、他の方法として、電源投入時にあらかじめロードすることが分かっているデータをキャッシュメモリにロードしておき、CPUが初期化プログラムを実行するとき、キャッシュメモリにロードしたデータを利用して初期化プログラムのキャッシュ時間を短縮するものがある(特許文献2)。   As another method, data that is known to be loaded in advance when the power is turned on is loaded into the cache memory. When the CPU executes the initialization program, the data loaded into the cache memory is used for initialization. There is one that shortens the cache time of a program (Patent Document 2).

しかしながら、この方法も、キャッシュメモリの容量の範囲に限ってのみの高速化であるため、それを超えるサイズの初期化プログラムである場合、それを超えた分については高速化できない。また、電源投入時からCPUが起動するまでの時間が短い場合には、初期化プログラムを十分にキャッシュできないか、キャッシュが終わるまでCPUの始動を待たせなければならないという問題がある。   However, since this method is also speeded up only within the range of the capacity of the cache memory, if the initialization program exceeds the size, it cannot be speeded up beyond that. In addition, when the time from when the power is turned on to when the CPU starts up is short, there is a problem that the initialization program cannot be sufficiently cached or the CPU must be started until the cache is completed.

特開平1−314327号公報JP-A-1-314327 特開平7−36784号公報JP-A-7-36784

本発明の目的は、CPUと主記憶装置との間にキャッシュメモリを備えるシステムにおいて、電源投入からシステム起動完了までの時間を短縮することができる起動高速化装置を提供することにある。   An object of the present invention is to provide a startup acceleration device capable of shortening the time from power-on to system startup completion in a system including a cache memory between a CPU and a main storage device.

上記目的を達成するために、本発明は、CPUと、該CPUが使用する読み出しデータが記憶された主記憶装置と、該主記憶装置から読み出した読み出しデータを前記CPUに供給するとともに、一時的に記憶するキャッシュメモリとを備えるシステムの起動高速化装置であって、
1回目のシステム起動時に、前記キャッシュメモリから前記主記憶装置へのアクセスを監視して、電源投入から前記アクセスが行われるまでのアクセス時間とアクセス先の前記主記憶装置のアドレスを取得する監視装置と、
前記監視装置により取得されたアクセス時間とアドレスをテーブルデータとして記憶するテーブル記憶装置とを備え、
前記監視装置は、2回目以降のシステム起動時に、前記テーブル記憶装置に記憶されたテーブルデータに含まれるアクセス時間の順序に従って、該アクセス時間到達までに、前記テーブルデータに含まれるアドレスに対応する前記主記憶装置のアドレスから読み出しデータを読み出し、該読み出した読み出しデータを前記キャッシュメモリに書き込むことを特徴とする起動高速化装置を提供するものである。
In order to achieve the above object, the present invention provides a CPU, a main storage device storing read data used by the CPU, read data read from the main storage device to the CPU, and temporarily A system startup speed-up device comprising a cache memory stored in
A monitoring device that monitors the access from the cache memory to the main storage device at the first system startup, and obtains the access time from power-on to the access and the address of the access destination main storage device When,
A table storage device for storing the access time and address acquired by the monitoring device as table data;
The monitoring device corresponds to the address corresponding to the address included in the table data before reaching the access time according to the order of the access time included in the table data stored in the table storage device at the second or subsequent system startup. It is an object of the present invention to provide a startup acceleration device characterized in that read data is read from an address of a main storage device, and the read data is written to the cache memory.

ここで、前記監視装置は、2回目以降のシステム起動時に、前記キャッシュメモリから前記主記憶装置へのアクセスがあったことを検出し、かつ、該アクセス先のアドレスを含むテーブルデータが前記テーブル記憶装置に記憶されている場合、該アクセス先のアドレスを含むテーブルデータに含まれるアクセス時間を、前記検出されたアクセスが行われたアクセス時間に書き換えることが好ましい。   Here, the monitoring device detects that the main memory is accessed from the cache memory at the second or subsequent system startup, and table data including the access destination address is stored in the table storage. When stored in the apparatus, it is preferable to rewrite the access time included in the table data including the access destination address to the access time when the detected access was performed.

また、本発明は、CPUと、該CPUが使用する読み出しデータが記憶された主記憶装置と、該主記憶装置から読み出した読み出しデータを前記CPUに供給するとともに、一時的に記憶するキャッシュメモリとを備えるシステムの起動高速化装置であって、
1回目のシステム起動時に、前記キャッシュメモリから前記主記憶装置へのアクセスを監視して、一定の時間毎に、アクセス先の前記主記憶装置のアドレスの一部のビットからなる各々のインデックスに含まれる複数のアドレスへのアクセス回数を取得する監視装置と、
電源投入から前記一定の時間毎までのアクセス時間と前記監視装置により取得されたアクセス回数が最大のインデックスをテーブルデータとして記憶するテーブル記憶装置とを備え、
前記監視装置は、2回目以降のシステム起動時に、前記テーブル記憶装置に記憶されたテーブルデータに含まれるアクセス時間の順序に従って、前記テーブルデータに含まれるインデックスに対応する前記主記憶装置の複数のアドレスから読み出しデータを読み出し、該読み出した複数の読み出しデータのうちの一部を前記キャッシュメモリに書き込むことを特徴とする起動高速化装置を提供する。
The present invention also provides a CPU, a main storage device in which read data used by the CPU is stored, a cache memory that supplies read data read from the main storage device to the CPU and temporarily stores the read data. A system startup acceleration device comprising:
When the system is started for the first time, the access from the cache memory to the main storage device is monitored, and is included in each index consisting of some bits of the address of the main storage device to be accessed at regular intervals. A monitoring device that obtains the number of accesses to a plurality of addresses,
A table storage device that stores, as table data, an access time from power-on to the predetermined time and an index with the maximum number of accesses acquired by the monitoring device;
The monitoring device has a plurality of addresses of the main storage device corresponding to the index included in the table data in accordance with the order of access times included in the table data stored in the table storage device at the second or subsequent system startup. There is provided a start-up acceleration device characterized in that read data is read from a plurality of read data and a part of the read data is written to the cache memory.

ここで、前記監視装置は、2回目以降のシステム起動時に、前記一定の時間毎に、前記テーブルデータに含まれるインデックスとは異なるインデックスに含まれる複数のアドレスへのアクセス回数が閾値を超えた場合、前記テーブルデータに含まれるインデックスを、前記閾値を超えたインデックスに書き換えることが好ましい。   In this case, when the system is started for the second time or later, the number of accesses to a plurality of addresses included in an index different from the index included in the table data exceeds a threshold value for each predetermined time. Preferably, the index included in the table data is rewritten to an index exceeding the threshold value.

本発明によれば、初期化プログラムを2回目以降に実行する場合、監視装置が、前回の実行時に保存したテーブルデータに含まれるアクセス時間を参照して、順次、テーブルデータに含まれるアドレスに対応する主記憶装置のアドレスからデータを読み出してキャッシュメモリへ書き込む。そのため、基本的に、CPUから主記憶装置へのアクセスは発生せず、初期化プログラムの実行が高速化され、システムの起動時間を短縮することができる。   According to the present invention, when the initialization program is executed for the second time or later, the monitoring device refers to the access time included in the table data stored at the previous execution and sequentially corresponds to the address included in the table data. Data is read from the address of the main storage device and written to the cache memory. Therefore, basically, access from the CPU to the main storage device does not occur, the execution of the initialization program is accelerated, and the system startup time can be shortened.

また、本発明によれば、アクセスがあった毎にテーブルデータを記憶するのではなく、一定の時間毎にテーブルデータを記憶することもできる。そのため、必要となるテーブル記憶装置のメモリ容量を適宜低減することができる。   Further, according to the present invention, the table data can be stored at regular intervals instead of storing the table data every time access is made. Therefore, the required memory capacity of the table storage device can be appropriately reduced.

本発明に関わる起動高速化装置を搭載する組み込みシステムの構成を表す一実施形態のブロック図である。It is a block diagram of one Embodiment showing the structure of the embedded system carrying the starting acceleration apparatus concerning this invention. 図1に示すキャッシュメモリの構成を表す概念図である。It is a conceptual diagram showing the structure of the cache memory shown in FIG. キャッシュメモリに記憶されるキャッシュセットの構成を表す概念図である。It is a conceptual diagram showing the structure of the cache set memorize | stored in cache memory. テーブル記憶装置に記憶されるテーブルデータの構成を表す概念図である。It is a conceptual diagram showing the structure of the table data memorize | stored in a table memory | storage device. 図1に示す組み込みシステムの動作を表すフローチャートである。It is a flowchart showing operation | movement of the embedded system shown in FIG. テーブル記憶装置に記憶されるテーブルデータの構成を表す別の概念図である。It is another conceptual diagram showing the structure of the table data memorize | stored in a table memory | storage device. キャッシュメモリで使用されるインデックスとテーブルデータで使用されるインデックスとの関係を表す概念図である。It is a conceptual diagram showing the relationship between the index used by cache memory, and the index used by table data. 図1に示す組み込みシステムの動作を表す別のフローチャートである。4 is another flowchart showing the operation of the embedded system shown in FIG. 1.

以下に、添付の図面に示す好適実施形態に基づいて、本発明の起動高速化装置を詳細に説明する。   DESCRIPTION OF EMBODIMENTS Hereinafter, a startup acceleration device of the present invention will be described in detail based on a preferred embodiment shown in the accompanying drawings.

図1は、本発明に関わる起動高速化装置を搭載する組み込みシステムの構成を表す一実施形態のブロック図である。同図に示す組み込みシステム10は、CPU12と、キャッシュメモリ14と、主記憶装置16と、監視装置18と、テーブル記憶装置20とによって構成されている。ここで、監視装置18およびテーブル記憶装置20は、本発明に関わる起動高速化装置を構成するものである。   FIG. 1 is a block diagram of an embodiment showing a configuration of an embedded system equipped with a startup acceleration device according to the present invention. The embedded system 10 shown in FIG. 1 includes a CPU 12, a cache memory 14, a main storage device 16, a monitoring device 18, and a table storage device 20. Here, the monitoring device 18 and the table storage device 20 constitute a startup acceleration device according to the present invention.

CPU12とキャッシュメモリ14は相互に接続されている。また、キャッシュメモリ14、主記憶装置16および監視装置18は、内部バス22を介して相互に接続されている。さらに、監視装置18とテーブル記憶装置20は相互に接続されている。   The CPU 12 and the cache memory 14 are connected to each other. Further, the cache memory 14, the main storage device 16, and the monitoring device 18 are connected to each other via an internal bus 22. Furthermore, the monitoring device 18 and the table storage device 20 are connected to each other.

組み込みシステム10において、CPU12は、システム全体の動作を制御する制御手段であり、初期化プログラムを含む、各種のプログラム(ソフトウェア)をロードして、実行する。   In the embedded system 10, the CPU 12 is a control unit that controls the operation of the entire system, and loads and executes various programs (software) including an initialization program.

ここで、初期化プログラムは、組み込みシステム10に電源が投入された時に、CPUが最初に実行することで組み込みシステム10を初期化するためのプログラムであり、あらかじめ主記憶装置16に記憶されている。   Here, the initialization program is a program for initializing the embedded system 10 by being executed first by the CPU when the embedded system 10 is turned on, and is stored in the main storage device 16 in advance. .

続いて、キャッシュメモリ14は、主記憶装置16と比べると容量は小さいが高速に動作する揮発性の半導体メモリである。キャッシュメモリ14は、内蔵されているキャッシュコントローラ(図示省略)の制御により、CPU12が使用する読み出しデータを主記憶装置16から内部バス22を介して読み出してCPU12に供給するとともに、キャッシュセット(キャッシュデータ)として一時的に記憶する。CPU12が同じ読み出しデータを再利用する場合、その読み出しデータがキャッシュメモリ14に記憶されていれば、主記憶装置16からではなく、キャッシュメモリ14に記憶されている読み出しデータがCPU12に供給されることにより、読み出し動作が高速化される。   Subsequently, the cache memory 14 is a volatile semiconductor memory that operates at a high speed although its capacity is smaller than that of the main storage device 16. The cache memory 14 reads out read data used by the CPU 12 from the main storage device 16 via the internal bus 22 and supplies it to the CPU 12 under the control of a built-in cache controller (not shown). ) As a temporary store. When the CPU 12 reuses the same read data, if the read data is stored in the cache memory 14, the read data stored in the cache memory 14 is supplied to the CPU 12 instead of from the main storage device 16. This speeds up the read operation.

主記憶装置16は、キャッシュメモリ14と比べると大容量であるが低速な揮発性の半導体メモリである。主記憶装置16には、初期化プログラムを含む、CPU12が使用する各種の読み出しデータが、電源投入直後にフラッシュメモリなどの不揮発性メモリ(図示省略)からコピーされることにより、あらかじめ記憶されている。   The main storage device 16 is a volatile semiconductor memory having a large capacity but a low speed as compared with the cache memory 14. In the main storage device 16, various read data used by the CPU 12 including an initialization program are stored in advance by being copied from a nonvolatile memory (not shown) such as a flash memory immediately after the power is turned on. .

監視装置18は、1回目(初回)のシステム起動時に、CPU12(実際には、キャッシュメモリ14)から主記憶装置16へのアクセスを監視して、電源投入からアクセスが行われるまでのアクセス時間(本実施形態では、電源投入からのクロック数)と、アクセス先の主記憶装置16のアドレスを取得し、テーブルデータとしてテーブル記憶装置20に書き込む。また、監視装置18は、2回目以降のシステム起動時に、テーブル記憶装置20に記憶されたテーブルデータに含まれるアクセス時間の順序に従って、そのアクセス時間に到達するまでに、あるいは所定時間おきに、テーブルデータに含まれるアドレスに対応する主記憶装置16のアドレスから読み出しデータを読み出し、これをキャッシュセットとしてキャッシュメモリ14に書き込む。この様な処理を行うことにより、必要とするデータが必要な時刻までに効率よくキャッシュメモリ14に書き込まれる。監視装置18には初期化完了レジスタ24が設けられている。電源投入直後の初期化完了レジスタ24の初期値は、初期化が完了していないことを意味する‘0’であり、監視装置18は、初期化プログラム(すなわち、CPU12)によって、初期化完了レジスタ24が初期化完了を意味する‘1’に変更されるまで上記動作を続ける。   The monitoring device 18 monitors the access from the CPU 12 (actually, the cache memory 14) to the main storage device 16 at the first (first) system startup, and the access time from when the power is turned on until the access is performed ( In the present embodiment, the number of clocks from power-on) and the address of the main storage device 16 to be accessed are acquired and written as table data in the table storage device 20. In addition, the monitoring device 18 starts the second or subsequent system startup according to the order of the access times included in the table data stored in the table storage device 20 until the access time is reached or every predetermined time. Read data is read from the address of the main storage device 16 corresponding to the address included in the data, and is written in the cache memory 14 as a cache set. By performing such processing, necessary data is efficiently written into the cache memory 14 by a necessary time. The monitoring device 18 is provided with an initialization completion register 24. The initial value of the initialization completion register 24 immediately after the power is turned on is “0” which means that the initialization is not completed, and the monitoring device 18 is initialized by the initialization program (that is, the CPU 12). The above operation is continued until 24 is changed to “1” indicating completion of initialization.

テーブル記憶装置20は、不揮発性の書き換え可能な半導体メモリであり、上記の通り、監視装置18により取得されたアクセス時間とアドレスをテーブルデータとして記憶する。テーブル記憶装置20には、CPU12が初期化プログラムを初めて実行したか否かを表す初回実行フラグレジスタ26が設けられている。初回実行フラグレジスタ26は、例えば、初期化プログラムが変更された場合等に、初期化プログラムのアップデートプログラム(すなわち、CPU12)によって、初期化プログラムの実行が1回目の実行であることを意味する‘1’に設定され、1回目の初期化プログラムの終了後、初期化プログラムの実行が1回目の実行ではない(2回目以降の実行である)ことを意味する‘0’に書き換えられる。   The table storage device 20 is a nonvolatile rewritable semiconductor memory, and stores the access time and address acquired by the monitoring device 18 as table data as described above. The table storage device 20 is provided with an initial execution flag register 26 that indicates whether or not the CPU 12 has executed the initialization program for the first time. The first execution flag register 26 means that the initialization program is executed for the first time by the update program (that is, the CPU 12) of the initialization program when the initialization program is changed, for example. It is set to “1”, and after completion of the first initialization program, it is rewritten to “0” which means that the execution of the initialization program is not the first execution (the second and subsequent executions).

次に、キャッシュメモリ14について説明する。   Next, the cache memory 14 will be described.

図2は、図1に示すキャッシュメモリ14の構成を表す概念図である。キャッシュメモリ14は、図2に示すように、複数のラインを備えており、1つのラインに4つまでのキャッシュセットが記憶できるように構成されている。キャッシュセットは、キャッシュメモリ14に読み出しデータを記憶する場合の最小単位である。各々のキャッシュセットが記憶されるメモリ領域はウェイ(Way)と呼ばれる。図2に示すキャッシュメモリ14は、各ラインが4つのウェイ(Way1〜4)によって構成されている。   FIG. 2 is a conceptual diagram showing the configuration of the cache memory 14 shown in FIG. As shown in FIG. 2, the cache memory 14 includes a plurality of lines, and is configured to store up to four cache sets in one line. The cache set is a minimum unit when read data is stored in the cache memory 14. A memory area in which each cache set is stored is called a way. In the cache memory 14 illustrated in FIG. 2, each line is configured by four ways (Way 1 to 4).

ここで、キャッシュセットについて説明する。
図3は、キャッシュメモリ14に記憶されるキャッシュセットの構成を表す概念図である。キャッシュセットは、図3に示すように、有効(Valid)ビット、ロック(Lock)ビット、および、データ(DATA)を含む。
Here, the cache set will be described.
FIG. 3 is a conceptual diagram showing the configuration of a cache set stored in the cache memory 14. As shown in FIG. 3, the cache set includes a valid bit, a lock bit, and data (DATA).

ここで、有効ビットは、対応するキャッシュセットの記憶内容が利用可能な有効なものか、意味のない無効なものかを表す。有効ビットは、例えば、キャッシュセットが有効なものである時に‘1’に設定され、無効なものである時に‘0’に設定される。以下の説明では有効ビットの更新については言及しないが、有効ビットは、キャッシュコントローラもしくは監視装置18により随時更新(変更)される。   Here, the valid bit indicates whether the stored contents of the corresponding cache set are valid or usable and meaningless invalid. For example, the valid bit is set to “1” when the cache set is valid, and is set to “0” when the cache set is invalid. In the following description, updating of the valid bit is not mentioned, but the valid bit is updated (changed) as needed by the cache controller or the monitoring device 18.

ロックビットは、対応するキャッシュセットの内容を、CPU12もしくは監視装置18のどちらが変更できるかを表す。ロックビットは監視装置18により更新され、本実施形態では、ロックビットが‘0’に設定されると、CPU12がキャッシュセットの内容を変更することができ、‘1’に設定されると、監視装置18がキャッシュセットの内容を変更できる。なお、ロックビットによる制限はキャッシュセットの書き込みについてだけであり、その読み出しは制限されない。   The lock bit indicates whether the CPU 12 or the monitoring device 18 can change the contents of the corresponding cache set. The lock bit is updated by the monitoring device 18. In this embodiment, when the lock bit is set to '0', the CPU 12 can change the contents of the cache set, and when set to '1', the monitor bit is monitored. The device 18 can change the contents of the cache set. The restriction by the lock bit is only for writing to the cache set, and the reading is not restricted.

データは、主記憶装置16からの読み出しデータであり、例えば、64ビットで構成される命令コード列またはデータ列を含む。また、データには、このデータが記憶されている主記憶装置16のアドレス(ADDRESS)も含まれる。   The data is read data from the main storage device 16 and includes, for example, an instruction code string or data string composed of 64 bits. The data also includes the address (ADDRESS) of the main storage device 16 in which this data is stored.

キャッシュメモリ14では、キャッシュセットに含まれるデータのアドレスのインデックス(アドレスの最上位ビットから一定のビット数で構成される部分)が同一の場合には、それらのキャッシュセットは同じラインに記憶される。例えば、アドレスが8ビットであり、インデックスがアドレスの上位5ビットで構成される場合、キャッシュメモリ14には、同一インデックスの8つ(残り3ビットに対応)のキャッシュセットのうちの4つまでのアドレスに対応するキャッシュセットが同じラインに記憶される。   In the cache memory 14, when the indexes of the addresses of the data included in the cache set (parts composed of a certain number of bits from the most significant bit of the address) are the same, the cache sets are stored in the same line. . For example, if the address is 8 bits and the index is composed of the upper 5 bits of the address, the cache memory 14 stores up to 4 of the 8 cache sets of the same index (corresponding to the remaining 3 bits). The cache set corresponding to the address is stored on the same line.

なお、例えば、ウェイの1つが利用不可能になったとしても、それは3つのウェイによって構成されるキャッシュメモリとして機能するだけであり、極端な性能の低下は発生しないことに留意すべきである。   It should be noted that, for example, even if one of the ways becomes unavailable, it only functions as a cache memory constituted by three ways, and no extreme performance degradation occurs.

次に、テーブル記憶装置20に記憶されるテーブルデータについて説明する。
図4は、テーブル記憶装置20に記憶されるテーブルデータの構成を表す概念図である。テーブルデータは、図4に示すように、アクセス時間(AccessTime)とアドレス(ADDRESS)を含む。
Next, table data stored in the table storage device 20 will be described.
FIG. 4 is a conceptual diagram showing the configuration of table data stored in the table storage device 20. As shown in FIG. 4, the table data includes an access time (AccessTime) and an address (ADDRESS).

ここで、アクセス時間は、組み込みシステム10に電源が投入されてから、CPU12から主記憶装置16へのアクセスが発生するまでの時間である。図4の例では、アクセス時間はクロック数(clks)で表されている。clksは、CPU12の動作クロックである。また、アドレスは、キャッシュセットに含まれるデータが記憶されている主記憶装置16のアドレスである。なお、キャッシュセットに含まれるデータのアドレスと、これに対応するテーブルデータに含まれるアドレスは同じでものある。   Here, the access time is the time from when the power is turned on to the embedded system 10 until the access from the CPU 12 to the main storage device 16 occurs. In the example of FIG. 4, the access time is represented by the number of clocks (clks). clks is an operation clock of the CPU 12. The address is an address of the main storage device 16 in which data included in the cache set is stored. The address of data included in the cache set and the address included in the corresponding table data are the same.

次に、図5に示すフローチャートに従って、組み込みシステム10の動作を説明する。   Next, the operation of the embedded system 10 will be described according to the flowchart shown in FIG.

電源投入後(S1)、初期化完了レジスタ24は、初期化が完了していないことを意味する‘0’に設定される。また、初回実行フラグレジスタ26は、1回目の初期化プログラムの実行である場合には‘1’、2回目以降の実行である場合には‘0’に設定される。   After the power is turned on (S1), the initialization completion register 24 is set to “0” which means that the initialization is not completed. The first execution flag register 26 is set to ‘1’ when executing the first initialization program, and ‘0’ when executing the second and subsequent times.

また、電源投入後、監視装置18は、キャッシュメモリ14の4つのウェイ1〜4のうち、ウェイ1,2の全てのキャッシュセットのロックビットを‘0’、ウェイ3,4の全てのキャッシュセットのロックビットを‘1’に設定する(S2)。   After the power is turned on, the monitoring device 18 sets the lock bits of all the cache sets of the ways 1 and 2 among the four ways 1 to 4 of the cache memory 14 to “0” and all the cache sets of the ways 3 and 4. Is set to '1' (S2).

これにより、ウェイ1,2はCPU12によってキャッシュセットの書き込みが管理され、ウェイ3,4は管理装置18によってキャッシュセットの書き込みが管理されることになる。   As a result, in the ways 1 and 2, the CPU 12 manages the writing of the cache set, and in the ways 3 and 4, the management device 18 manages the writing of the cache set.

続いて、監視装置18は、初回実行フラグレジスタ26の値を確認し、今回の初期化プログラムの実行が1回目の実行であるか否かを判断する(S3)。つまり、監視装置18は、初回実行フラグレジスタの値が‘1’であれば、今回の初期化プログラムの実行は1回目の実行であり、初回実行フラグレジスタの値が‘0’であれば、今回の初期化プログラムの実行が2回目以降の実行であると判断する。   Subsequently, the monitoring device 18 checks the value of the initial execution flag register 26, and determines whether or not the current initialization program is executed for the first time (S3). That is, if the value of the initial execution flag register is “1”, the monitoring device 18 executes the initialization program for the first time, and if the value of the initial execution flag register is “0”, It is determined that this initialization program is executed for the second time or later.

ここで、今回の初期化プログラムの実行が1回目の実行である場合(S3で‘YES’)、ステップS5へ進む。   If the current initialization program is executed for the first time (“YES” in S3), the process proceeds to step S5.

一方、今回の初期化プログラムの実行が2回目以降の実行である場合(S3で‘NO’)、監視装置18は、テーブルデータに含まれるアクセス時間を参照して(アクセス時間が短いものから順に)、そのアクセス時間に到達するまでに、あるいは所定時間おきに、テーブル記憶装置20からテーブルデータを読み出し、読み出したテーブルデータに含まれるアドレスに対応する主記憶装置16のアドレスから所定ビット長の読み出しデータを読み出し、これをキャッシュセットとして、テーブルデータに含まれるアドレスに対応するキャッシュメモリ14のライン(インデックス)のウェイ3または4に書き込む(S4)。   On the other hand, when the initialization program is executed for the second time or later (“NO” in S3), the monitoring device 18 refers to the access time included in the table data (in order from the shortest access time). ) Until the access time is reached or every predetermined time, the table data is read from the table storage device 20, and a predetermined bit length is read from the address of the main storage device 16 corresponding to the address included in the read table data. Data is read, and this is set as a cache set and written to way 3 or 4 of the line (index) of the cache memory 14 corresponding to the address included in the table data (S4).

上記のように、初期化プログラムを2回目以降に実行する場合、監視装置18が、前回の実行時に保存したテーブルデータに含まれるアクセス時間を参照して、順次、そのアクセス時間に到達するまでに、あるいは所定時間おきに、テーブルデータに含まれるアドレスに対応する主記憶装置16のアドレスからデータを読み出してキャッシュメモリ14へ書き込む。そのため、初期化プログラムの実行が高速化され、システムの起動時間を短縮することができる。   As described above, when the initialization program is executed for the second time or later, the monitoring device 18 refers to the access time included in the table data stored at the previous execution and sequentially reaches the access time. Alternatively, data is read from the address of the main storage device 16 corresponding to the address included in the table data and written to the cache memory 14 at predetermined time intervals. This speeds up the execution of the initialization program and shortens the system startup time.

なお、キャッシュセットをウェイ3ないし4に上書きする時の制御方式は、何ら限定されず、例えば、LRU(Least Recently Used)制御でもよいし、単純にウェイ3とウェイ4に交互に上書きしてもよい。   Note that the control method for overwriting the cache set on the ways 3 to 4 is not limited in any way. For example, LRU (Least Recently Used) control may be used, or the ways 3 and 4 may be overwritten alternately. Good.

続いて、監視装置18は、CPU12から主記憶装置16へのアクセスがあったか否かを検出する(S5)。   Subsequently, the monitoring device 18 detects whether or not the CPU 12 has accessed the main storage device 16 (S5).

ここで、CPU12から主記憶装置16へのアクセスがなかった場合(S5で‘NO’)、ステップS3へ戻り、監視装置18は前述の動作を繰り返す。   If there is no access from the CPU 12 to the main storage device 16 (“NO” in S5), the process returns to step S3, and the monitoring device 18 repeats the above-described operation.

一方、CPU12から主記憶装置16へのアクセスがあった場合(S5で‘YES’)、監視装置18は、CPU12がアクセスした主記憶装置16のアドレスと同じアドレスを含むテーブルデータがテーブル記憶装置20に記憶されているか否かを検出する(S6)。   On the other hand, when there is an access from the CPU 12 to the main storage device 16 (“YES” in S5), the monitoring device 18 has table data including the same address as the address of the main storage device 16 accessed by the CPU 12 stored in the table storage device 20. (S6).

ここで、同じアドレスを含むテーブルデータが記憶されていない場合(S6で‘NO’)、監視装置18は、取得したアクセス時間とアドレスから新たなテーブルデータを作成し、これをテーブル記憶装置20に追加する(S7)。CPU12から主記憶装置16へのアクセスがあったということは、キャッシュメモリ14においてキャッシュミスが発生したということであるから、テーブル記憶装置20に同じアドレスを含むテーブルデータが記憶されていない場合、これを2回目以降の初期化プログラムの実行に備えてテーブル記憶装置20に記憶しておく必要がある。   If table data including the same address is not stored (“NO” in S6), the monitoring device 18 creates new table data from the acquired access time and address, and stores this in the table storage device 20. Add (S7). The fact that the CPU 12 has accessed the main storage device 16 means that a cache miss has occurred in the cache memory 14, so if table data including the same address is not stored in the table storage device 20, this will occur. Must be stored in the table storage device 20 in preparation for the second and subsequent execution of the initialization program.

一方、同じアドレスを含むテーブルデータが記憶されている場合(S6で‘YES’)、テーブル記憶装置20に記憶されているテーブルデータが効果的に機能していない(例えば、監視装置18によりキャッシュメモリ14にデータが書き込まれるのが遅かった)ということであるから、監視装置18は、アクセス先のアドレスを含むテーブルデータに含まれるアクセス時間を、検出されたアクセスが行われたアクセス時間に書き換える(アクセス時間を短縮する)(S8)。この場合、対応するテーブルデータ以後の全てのテーブルデータのアクセス時間を同様に書き換える必要がある。   On the other hand, when table data including the same address is stored (“YES” in S6), the table data stored in the table storage device 20 is not functioning effectively (for example, the monitoring device 18 uses a cache memory). Therefore, the monitoring device 18 rewrites the access time included in the table data including the access destination address to the access time at which the detected access was performed (data was written later to 14). (S8). In this case, it is necessary to similarly rewrite access times of all table data after the corresponding table data.

CPU12(実際にはキャッシュメモリ14)が主記憶装置16にアクセスする時間は、監視装置18が、主記憶装置16からキャッシュメモリ14へ読み出しデータを書き込んで(コピーして)おくことにより、キャッシュメモリ14から主記憶装置16へのアクセスがなくなるため短縮される。このため、テーブルデータに設定されたアクセス時間を、2回目以降の初期化プログラムの実行時に、適宜調整する(アクセス時間を書き換える)必要がある。   The time for the CPU 12 (actually the cache memory 14) to access the main storage device 16 is such that the monitoring device 18 writes (copies) the read data from the main storage device 16 to the cache memory 14, so that the cache memory Since the access to the main storage device 16 from 14 disappears, the time is shortened. For this reason, it is necessary to appropriately adjust (rewrite the access time) the access time set in the table data when the initialization program is executed for the second and subsequent times.

ここで、アクセス時間を調整する方法は、何ら限定されないが、例えば、各々のテーブルデータの前(各々のテーブルデータに含まれるアクセス時間よりも短いアクセス時間を含むテーブルデータ)に存在するテーブルデータの個数を計算しておき、計算したテーブルデータの個数とテーブルデータ1つ当たりの推定高速化時間とを乗算して累積高速化時間を算出し、算出した累積高速化時間を、現在のアクセス時間から減算したものを新たなアクセス時間として設定する方法を例示することができる。   Here, the method for adjusting the access time is not limited at all, but for example, the table data existing before each table data (table data including an access time shorter than the access time included in each table data). Calculate the cumulative speedup time by multiplying the calculated number of table data and the estimated speedup time per table data, and calculate the cumulative speedup time from the current access time. A method of setting the subtracted value as a new access time can be exemplified.

続いて、監視装置18は、初期化完了レジスタ24の値を確認し、初期化プログラムによるシステムの初期化が完了したか否か(初期化完了レジスタ24が‘1’にセットされたか否か)を検出する(S9)。   Subsequently, the monitoring device 18 checks the value of the initialization completion register 24 and determines whether or not the initialization of the system by the initialization program is completed (whether or not the initialization completion register 24 is set to “1”). Is detected (S9).

ここで、初期化完了レジスタ24が‘0’の場合(S9で‘NO’)、初期化が完了していないことを意味するから、ステップS3へ戻り、監視装置18は前述の動作を繰り返す。   Here, if the initialization completion register 24 is “0” (“NO” in S9), it means that the initialization has not been completed. Therefore, the process returns to step S3, and the monitoring device 18 repeats the above-described operation.

一方、初期化完了レジスタ24が‘1’の場合(S9で‘YES’)、初期化が完了したことを意味するから、監視装置18は、キャッシュメモリ14のウェイ3,4の全てのキャッシュセットのロックビットを‘0’に設定して動作を終了する(S10)。   On the other hand, if the initialization completion register 24 is “1” (“YES” in S9), it means that the initialization is completed, and the monitoring device 18 therefore sets all cache sets in the ways 3 and 4 of the cache memory 14. The lock bit is set to '0' and the operation is terminated (S10).

ここで、本実施形態によるシステムの起動高速化の効果を具体的に考えてみる。例えば、ある初期化プログラムの実行時に、以下のような命令が実行されるものとする。   Here, the effect of increasing the startup speed of the system according to the present embodiment will be specifically considered. For example, assume that the following instruction is executed when an initialization program is executed.

繰り返しのない命令 − 一定時間当たりCseq回
繰り返しのある命令 − 一定時間当たりCrpt回
平均繰り返し回数 − Rrpt回
1回の命令を主記憶装置16から読み出すための時間 − Fmain
1回の命令をキャッシュメモリ14から読み出すための時間 − Fcache
Instructions without repetition − Cseq times per fixed time Instructions with repetition − Crpt times per fixed time Average number of repetitions − Rrpt times Time to read one instruction from the main memory 16 − Fmain
Time to read one instruction from the cache memory 14-Fcache

この場合、組み込みシステム10の高速化率は以下の計算式で表される。   In this case, the speed-up rate of the embedded system 10 is expressed by the following calculation formula.

Figure 2010231701
Figure 2010231701

ここで、Cseq、Crpt、Rrpt、Fmain、Fcacheの回数として、例えば、表1に示すような数値を仮に考えてみる。   Here, for example, numerical values as shown in Table 1 are considered as the number of times of Cseq, Crpt, Rrpt, Fmain, Fcache.

Figure 2010231701
Figure 2010231701

表1の値を前述の計算式に代入して高速化率を計算すると約72%となる。つまり、本実施形態の組み込みシステム10は、本発明を適用していない従来の組み込みシステムと比べて3倍以上高速化され、十分な効果を期待できることが分かる。   Substituting the values in Table 1 into the above formula, the speed-up rate is calculated to be about 72%. That is, it can be seen that the embedded system 10 of the present embodiment is three times faster than a conventional embedded system to which the present invention is not applied, and a sufficient effect can be expected.

なお、この計算結果は理想値であり、実際にはCPU12による命令実行が高速で行われた場合、主記憶装置16からキャッシュメモリ14への読み出しデータの転送が間に合わないことにより、最大限の効果を発揮できない場合も考えられなくはない。しかし、この点を考慮しても十分な高速化が期待できるといえる。また、この場合でも、図2のウェイ1,2に代表されるように、CPU12が管理するキャッシュ領域での高速化も見込めるため、大きな速度低下にはならない。   This calculation result is an ideal value. Actually, when the instruction execution by the CPU 12 is performed at high speed, the transfer of read data from the main storage device 16 to the cache memory 14 is not in time, so that the maximum effect is obtained. It is not unthinkable that you cannot demonstrate However, even if this point is taken into consideration, it can be said that sufficient speedup can be expected. Even in this case, as represented by the ways 1 and 2 in FIG. 2, the cache area managed by the CPU 12 can be accelerated, so that the speed is not greatly reduced.

次に、別の実施形態を挙げて、本発明に関わる起動高速化装置を説明する。   Next, a startup acceleration device according to the present invention will be described with another embodiment.

本実施形態の組み込みシステムは、図1に示すものと同じ構成のものであるが、監視装置18とテーブル記憶装置20の機能が異なっている。   The embedded system of this embodiment has the same configuration as that shown in FIG. 1, but the functions of the monitoring device 18 and the table storage device 20 are different.

本実施形態において、監視装置18は、1回目のシステム起動時に、キャッシュメモリ14から主記憶装置16へのアクセスを監視して、一定の時間毎に、アクセス先の主記憶装置16のアドレスのインデックスと、各々のインデックスに含まれる複数のアドレスへのアクセス回数を取得し、テーブル記憶装置20に、電源投入から一定の時間毎までのアクセス時間と、監視装置18により取得されたアクセス回数が最大のインデックスをテーブルデータとして記憶させる。また、監視装置18は、2回目以降のシステム起動時に、テーブル記憶装置20に記憶されたテーブルデータに含まれるアクセス時間の順序に従って、例えば、所定時間おきに、テーブルデータに含まれるインデックスに対応する主記憶装置16の複数のアドレスから読み出しデータを読み出し、読み出した複数の読み出しデータのうちの一部をキャッシュメモリ14に書き込む。   In this embodiment, the monitoring device 18 monitors the access from the cache memory 14 to the main storage device 16 at the first system startup, and indexes the address of the access destination main storage device 16 at regular intervals. The number of accesses to a plurality of addresses included in each index is acquired, and the table storage device 20 has the maximum access time from power-on to every fixed time and the number of accesses acquired by the monitoring device 18. The index is stored as table data. The monitoring device 18 corresponds to the index included in the table data, for example, every predetermined time according to the order of the access times included in the table data stored in the table storage device 20 at the second and subsequent system startups. Read data is read from a plurality of addresses of the main storage device 16 and a part of the read data is written to the cache memory 14.

テーブル記憶装置20に記憶されるテーブルデータは、図4とは異なる形式のものである。本実施形態で使用するテーブルデータは、図6に示すように、アクセス時間(AccessTime)とインデックス(Index)を含む。   The table data stored in the table storage device 20 has a format different from that in FIG. The table data used in this embodiment includes an access time (AccessTime) and an index (Index) as shown in FIG.

ここで、アクセス時間は、組み込みシステム10に電源が投入されてから、一定の時間毎までの時間である。図6の例では、アクセス時間は、クロック数(1Mclks)で表されている。1Mclksは、CPU12の動作クロックを基準とし、そのクロックが100万回発振するまでの時間である。また、インデックスは、キャッシュメモリ14で使用されているインデックスよりも、そのビット数(アドレスの上位ビット側のビット数)が少ないものである。   Here, the access time is the time from when power is turned on to the embedded system 10 until a certain time. In the example of FIG. 6, the access time is represented by the number of clocks (1 Mclks). 1 Mclks is the time until the clock oscillates 1 million times with the operation clock of the CPU 12 as a reference. The index has a smaller number of bits (the number of bits on the higher bit side of the address) than the index used in the cache memory 14.

例えば、アドレスが8ビットの場合を考える。キャッシュメモリ14で使用されるインデックスがアドレスの上位5ビットで構成される場合、1つのインデックスには8つ(残り3ビット相当)のアドレスが含まれる。図7に示すように、キャッシュメモリ14で使用されるインデックスが、例えば、10000XXX(インデックス10000は、2進数表示)の場合、このインデックスに含まれるアドレスは、XXX=000〜111(XXXは2進数表示)までの複数(8つ)のアドレスを含む。   For example, consider the case where the address is 8 bits. When an index used in the cache memory 14 is composed of the upper 5 bits of an address, 8 addresses (corresponding to the remaining 3 bits) are included in one index. As shown in FIG. 7, when the index used in the cache memory 14 is, for example, 10000XXX (index 10000 is a binary number), the address included in this index is XXX = 000 to 111 (XXX is a binary number) A plurality of (eight) addresses up to (display).

一方、テーブルデータで使用されるインデックスがアドレスの上位4ビットで構成される場合、1つのインデックスに16個のアドレスが含まれる。同様に、図7に示すように、テーブルデータで使用されるインデックスが、例えば、1000XXXXの場合、このインデックスに含まれるアドレスは、XXXX=0000〜1111までの複数(16個)のアドレスを含む。   On the other hand, when the index used in the table data is composed of the upper 4 bits of the address, 16 addresses are included in one index. Similarly, as shown in FIG. 7, when the index used in the table data is, for example, 1000XXXX, the addresses included in this index include a plurality (16) of addresses from XXXX = 0000 to 1111.

つまり、テーブルデータで使用されるインデックスは、キャッシュメモリ14で使用されるインデックスと比べて、1つのインデックスに含まれるアドレスの数が多くなるように設定されている。   That is, the index used in the table data is set so that the number of addresses included in one index is larger than the index used in the cache memory 14.

本実施形態では、初期化プログラムを1回目に実行する時に、テーブルデータとして、100万回に1回(1Mclks)、言い換えると、1Mclksの整数倍の時間毎に、1つのインデックスを記憶する。   In the present embodiment, when the initialization program is executed for the first time, one index is stored as table data once per million times (1 Mclks), in other words, every time that is an integral multiple of 1 Mclks.

次に、図8に示すフローチャートに従って、組み込みシステム10の動作を説明する。   Next, the operation of the embedded system 10 will be described according to the flowchart shown in FIG.

ステップS11からステップS13までの動作は、図5におけるステップS1からステップS3までの動作と同じである。   The operation from step S11 to step S13 is the same as the operation from step S1 to step S3 in FIG.

ここで、今回の初期化プログラムの実行が1回目の実行である場合(S13で‘YES’)、監視装置18は、次の1Mclksの間に、CPU12から主記憶装置16へのアクセスがあった時のインデックスとそのアクセス回数を取得する(S14)。   Here, when the execution of the initialization program this time is the first execution (“YES” in S13), the monitoring device 18 has accessed the main storage device 16 from the CPU 12 during the next 1 Mclks. The hour index and the number of accesses are acquired (S14).

続いて、監視装置18は、次の1Mclksの境界に到達したか否かを検出する(S15)。   Subsequently, the monitoring device 18 detects whether or not the next 1 Mclks boundary has been reached (S15).

ここで、次の1Mclksの境界に到達していない場合(S15で‘NO’)、ステップS14へ戻り、監視装置18は前述の動作を繰り返す。   If the next 1 Mclks boundary has not been reached (NO in S15), the process returns to step S14, and the monitoring device 18 repeats the above-described operation.

一方、次の1Mclksの境界に到達した場合(S15で‘YES’)、監視装置18は、その時のアクセス時間と、取得したインデックスのうち、最もアクセス回数が多かったものを代表インデックスとしてテーブル記憶装置20に記憶する(S16)。   On the other hand, when the next 1Mclks boundary is reached (“YES” in S15), the monitoring device 18 uses the access time at that time and the acquired index with the highest number of accesses as a table index. 20 (S16).

一方、今回の初期化プログラムの実行が2回目以降の実行である場合(S13で‘NO’)、監視装置18は、テーブルデータのアクセス時間を参照して(アクセス時間が短いものから順に)、所定時間おきに、テーブル記憶装置20からテーブルデータを読み出し、読み出したテーブルデータに含まれるインデックスに対応する主記憶装置16の複数のアドレスから所定ビット長の読み出しデータを読み出し、これら複数のアドレスの読み出しデータのうちの2つの読み出しデータを、キャッシュセットとして、テーブルデータのインデックスに対応するキャッシュメモリ14のライン(キャッシュメモリ14のインデックス)のウェイ3または4に書き込む(S17)。   On the other hand, when the current initialization program is executed for the second time or later (“NO” in S13), the monitoring device 18 refers to the access time of the table data (in order from the shortest access time), The table data is read from the table storage device 20 every predetermined time, read data having a predetermined bit length is read from a plurality of addresses of the main storage device 16 corresponding to the index included in the read table data, and the plurality of addresses are read. Two pieces of read data among the data are written as cache sets in ways 3 or 4 of the line of the cache memory 14 (index of the cache memory 14) corresponding to the index of the table data (S17).

ステップS18,S19の動作は、ステップS14,S15の動作と同じである。   The operations in steps S18 and S19 are the same as the operations in steps S14 and S15.

続いて、監視装置18は、CPU12から主記憶装置16への他のインデックス(対応するアクセス時間のテーブルデータに含まれるインデックスとは異なるインデックスに含まれる複数のアドレス)へのアクセス回数が閾値を超えたか否かを検出する(S20)。閾値は、対応するアクセス時間のテーブルデータに含まれるインデックスを取得した時に検出したアクセス回数以上の値に設定することが望ましい。   Subsequently, in the monitoring device 18, the number of accesses from the CPU 12 to another index (a plurality of addresses included in an index different from the index included in the table data of the corresponding access time) from the CPU 12 exceeds the threshold. It is detected whether or not (S20). The threshold is preferably set to a value equal to or greater than the number of accesses detected when the index included in the corresponding access time table data is acquired.

ここで、他のインデックスへのアクセス回数が閾値を超えていない場合(S20で‘NO’)、ステップS22へ進む。閾値を超えていないということは、ステップS17でキャッシュメモリ14に書き込んだキャッシュセットが効果的に機能しており、キャッシュメモリ14で発生したキャッシュミスは閾値よりも少ないということであるから、キャッシュメモリ14に書き込んだキャッシュセットを入れ替える必要はない。   If the number of accesses to other indexes does not exceed the threshold (“NO” in S20), the process proceeds to step S22. The fact that the threshold value is not exceeded means that the cache set written to the cache memory 14 in step S17 is functioning effectively, and the cache miss occurring in the cache memory 14 is less than the threshold value. It is not necessary to replace the cache set written in 14.

一方、アクセス回数が閾値を超えた場合(S20で‘YES’)、監視装置18は、対応するアクセス時間のテーブルデータに含まれるインデックスを、閾値を超えたインデックスに書き換える(S21)。閾値を超えたということは、ステップS17でキャッシュメモリ14に書き込んだキャッシュセットが効果的に機能しておらず、キャッシュメモリ14で閾値を超える回数のキャッシュミスが発生したということであるから、テーブルデータに含まれるインデックスを、閾値を超えたインデックスに書き換える必要がある。   On the other hand, when the access count exceeds the threshold (“YES” in S20), the monitoring device 18 rewrites the index included in the corresponding access time table data to an index exceeding the threshold (S21). The fact that the threshold value has been exceeded means that the cache set written to the cache memory 14 in step S17 is not functioning effectively, and the cache memory 14 has generated cache misses that exceed the threshold value. It is necessary to rewrite the index included in the data to an index that exceeds the threshold.

このため、テーブルデータに設定されたインデックスを、2回目以降の初期化プログラムの実行時に、適宜調整する(代表インデックスを適宜変更する)。   For this reason, the index set in the table data is appropriately adjusted (the representative index is appropriately changed) when the initialization program is executed for the second and subsequent times.

これにより、次回の初期化プログラムの実行時に、対応するテーブルデータのインデックスに応じて、このインデックスに対応する複数のアドレスの中から所定のアドレス(本実施形態の場合、先頭の2つのアドレスあるいは所定間隔があいたアドレス等)に対応するキャッシュセットがキャッシュメモリ14に書き込まれる。   Accordingly, when the initialization program is executed next time, a predetermined address (in the case of this embodiment, the first two addresses or a predetermined address) is selected from a plurality of addresses corresponding to the index of the corresponding table data. A cache set corresponding to an interval or the like is written in the cache memory 14.

これ以後のステップS22,S23の動作は、図5におけるステップS9,S10の動作と同じである。   The subsequent operations in steps S22 and S23 are the same as the operations in steps S9 and S10 in FIG.

図4に示すテーブルデータを使用する実施形態では、全てのアクセスについてテーブルデータを記憶するため、大きなメモリ容量のテーブル記憶装置20を必要とする。これに対し、本実施形態では、1Mclksという一定の時間毎にテーブルデータを記憶するため、必要となるテーブル記憶装置20のメモリ容量を適宜低減することができる。なお、一定の時間は、高速化率とメモリ容量とを考慮して適宜設定することが望ましい。   In the embodiment using the table data shown in FIG. 4, the table storage device 20 having a large memory capacity is required to store the table data for all accesses. On the other hand, in the present embodiment, the table data is stored at a fixed time of 1 Mclks, so that the necessary memory capacity of the table storage device 20 can be reduced as appropriate. Note that it is desirable to set the fixed time as appropriate in consideration of the speed-up rate and the memory capacity.

その一方で、本実施形態では、主記憶装置16から16個のうちの2個の1/8と全ての読み出しデータをキャッシュすることはできないため、図4に示すテーブルデータを使用する実施形態の場合と比べると高速化率は低下する。しかしこの場合も、キャッシュできるデータ数を増やすことは可能であり、また、監視装置18によってキャッシュされないものについては、CPU12が管理するキャッシュメモリによってキャッシュが行われるはずであるから、高速化率は十分に得られる。   On the other hand, in the present embodiment, two 1/8 out of 16 from the main storage device 16 and all the read data cannot be cached. Therefore, in the embodiment using the table data shown in FIG. Compared to the case, the speed-up rate decreases. However, in this case as well, it is possible to increase the number of data that can be cached, and those that are not cached by the monitoring device 18 should be cached by the cache memory managed by the CPU 12, so the speed-up rate is sufficient Is obtained.

なお、本発明は、組み込みシステムに限らず、CPUと、主記憶装置と、両者の間に接続されたキャッシュメモリとを備える様々なシステムに適用可能である。また、監視装置の具体的な構成は何ら限定されず、同様の機能を果たすものであれば、どのような構成のものであっても利用可能である。また、テーブルデータに含まれるアクセス時間は、クロック数で表すことに限定されず、電源投入からの時間を表すことができれば、どのような表現方法を用いてもよい。   The present invention is not limited to an embedded system, but can be applied to various systems including a CPU, a main storage device, and a cache memory connected between the two. In addition, the specific configuration of the monitoring device is not limited at all, and any configuration can be used as long as it has a similar function. Further, the access time included in the table data is not limited to the number of clocks, and any expression method may be used as long as the time from power-on can be expressed.

本発明は、基本的に以上のようなものである。
以上、本発明について詳細に説明したが、本発明は上記実施形態に限定されず、本発明の主旨を逸脱しない範囲において、種々の改良や変更をしてもよいのはもちろんである。
The present invention is basically as described above.
Although the present invention has been described in detail above, the present invention is not limited to the above-described embodiment, and it is needless to say that various improvements and modifications may be made without departing from the gist of the present invention.

10 組み込みシステム
12 CPU
14 キャッシュメモリ
16 主記憶装置
18 監視装置
20 テーブル記憶装置
22 内部バス
24 初期化完了レジスタ
26 初回実行フラグレジスタ
10 Embedded system 12 CPU
14 cache memory 16 main storage device 18 monitoring device 20 table storage device 22 internal bus 24 initialization completion register 26 first execution flag register

Claims (4)

CPUと、該CPUが使用する読み出しデータが記憶された主記憶装置と、該主記憶装置から読み出した読み出しデータを前記CPUに供給するとともに、一時的に記憶するキャッシュメモリとを備えるシステムの起動高速化装置であって、
1回目のシステム起動時に、前記キャッシュメモリから前記主記憶装置へのアクセスを監視して、電源投入から前記アクセスが行われるまでのアクセス時間とアクセス先の前記主記憶装置のアドレスを取得する監視装置と、
前記監視装置により取得されたアクセス時間とアドレスをテーブルデータとして記憶するテーブル記憶装置とを備え、
前記監視装置は、2回目以降のシステム起動時に、前記テーブル記憶装置に記憶されたテーブルデータに含まれるアクセス時間の順序に従って、該アクセス時間到達までに、前記テーブルデータに含まれるアドレスに対応する前記主記憶装置のアドレスから読み出しデータを読み出し、該読み出した読み出しデータを前記キャッシュメモリに書き込むことを特徴とする起動高速化装置。
High-speed startup of a system comprising a CPU, a main storage device storing read data used by the CPU, and a cache memory for temporarily supplying the read data read from the main storage device to the CPU Device.
A monitoring device that monitors the access from the cache memory to the main storage device at the first system startup, and obtains the access time from power-on to the access and the address of the access destination main storage device When,
A table storage device for storing the access time and address acquired by the monitoring device as table data;
The monitoring device corresponds to the address corresponding to the address included in the table data before reaching the access time according to the order of the access time included in the table data stored in the table storage device at the second or subsequent system startup. A start-up acceleration device characterized in that read data is read from an address of a main storage device, and the read data is written to the cache memory.
前記監視装置は、2回目以降のシステム起動時に、前記キャッシュメモリから前記主記憶装置へのアクセスがあったことを検出し、かつ、該アクセス先のアドレスを含むテーブルデータが前記テーブル記憶装置に記憶されている場合、該アクセス先のアドレスを含むテーブルデータに含まれるアクセス時間を、前記検出されたアクセスが行われたアクセス時間に書き換えることを特徴とする請求項1に記載の起動高速化装置。   The monitoring device detects that the main memory is accessed from the cache memory at the second and subsequent system startups, and stores the table data including the access destination address in the table memory. 2. The startup acceleration device according to claim 1, wherein when the access is performed, the access time included in the table data including the address of the access destination is rewritten to the access time when the detected access is performed. CPUと、該CPUが使用する読み出しデータが記憶された主記憶装置と、該主記憶装置から読み出した読み出しデータを前記CPUに供給するとともに、一時的に記憶するキャッシュメモリとを備えるシステムの起動高速化装置であって、
1回目のシステム起動時に、前記キャッシュメモリから前記主記憶装置へのアクセスを監視して、一定の時間毎に、アクセス先の前記主記憶装置のアドレスの一部のビットからなる各々のインデックスに含まれる複数のアドレスへのアクセス回数を取得する監視装置と、
電源投入から前記一定の時間毎までのアクセス時間と前記監視装置により取得されたアクセス回数が最大のインデックスをテーブルデータとして記憶するテーブル記憶装置とを備え、
前記監視装置は、2回目以降のシステム起動時に、前記テーブル記憶装置に記憶されたテーブルデータに含まれるアクセス時間の順序に従って、前記テーブルデータに含まれるインデックスに対応する前記主記憶装置の複数のアドレスから読み出しデータを読み出し、該読み出した複数の読み出しデータのうちの一部を前記キャッシュメモリに書き込むことを特徴とする起動高速化装置。
High-speed startup of a system comprising a CPU, a main storage device storing read data used by the CPU, and a cache memory for temporarily supplying the read data read from the main storage device to the CPU Device.
When the system is started for the first time, the access from the cache memory to the main storage device is monitored, and is included in each index consisting of some bits of the address of the main storage device to be accessed at regular intervals. A monitoring device that obtains the number of accesses to a plurality of addresses,
A table storage device that stores, as table data, an access time from power-on to the predetermined time and an index with the maximum number of accesses acquired by the monitoring device;
The monitoring device has a plurality of addresses of the main storage device corresponding to the index included in the table data in accordance with the order of access times included in the table data stored in the table storage device at the second or subsequent system startup. Read start data is read out, and a part of the read out read data is written in the cache memory.
前記監視装置は、2回目以降のシステム起動時に、前記一定の時間毎に、前記テーブルデータに含まれるインデックスとは異なるインデックスに含まれる複数のアドレスへのアクセス回数が閾値を超えた場合、前記テーブルデータに含まれるインデックスを、前記閾値を超えたインデックスに書き換えることを特徴とする請求項3に記載の起動高速化装置。   The monitoring device, when the system is started for the second time or later, if the number of accesses to a plurality of addresses included in an index different from the index included in the table data exceeds a threshold at each predetermined time, the table The startup acceleration device according to claim 3, wherein an index included in the data is rewritten to an index exceeding the threshold.
JP2009081059A 2009-03-30 2009-03-30 Apparatus for quickly starting system Withdrawn JP2010231701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009081059A JP2010231701A (en) 2009-03-30 2009-03-30 Apparatus for quickly starting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009081059A JP2010231701A (en) 2009-03-30 2009-03-30 Apparatus for quickly starting system

Publications (1)

Publication Number Publication Date
JP2010231701A true JP2010231701A (en) 2010-10-14

Family

ID=43047420

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009081059A Withdrawn JP2010231701A (en) 2009-03-30 2009-03-30 Apparatus for quickly starting system

Country Status (1)

Country Link
JP (1) JP2010231701A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016033745A (en) * 2014-07-31 2016-03-10 京セラドキュメントソリューションズ株式会社 Information processor and information processing program
US9442724B2 (en) 2011-01-31 2016-09-13 Socionext Inc. Start control apparatus for controlling a start of an information device by using an interrupt generation code, information device, and start control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9442724B2 (en) 2011-01-31 2016-09-13 Socionext Inc. Start control apparatus for controlling a start of an information device by using an interrupt generation code, information device, and start control method
JP2016033745A (en) * 2014-07-31 2016-03-10 京セラドキュメントソリューションズ株式会社 Information processor and information processing program

Similar Documents

Publication Publication Date Title
JP3880581B2 (en) Streaming data using cache locks
US20050086435A1 (en) Cache memory controlling apparatus, information processing apparatus and method for control of cache memory
JP5030796B2 (en) System and method for restricting access to cache during data transfer
JP2002514819A (en) A data processing circuit having a cache memory.
JP2009098934A (en) Processor and cache memory
JP2010198610A (en) Data processing apparatus and method
US20110167224A1 (en) Cache memory, memory system, data copying method, and data rewriting method
US8856453B2 (en) Persistent prefetch data stream settings
US20130311751A1 (en) System and data loading method
JP2006516168A (en) How to use a cache miss pattern to address the stride prediction table
JP4008947B2 (en) Cache memory and control method thereof
US7526615B2 (en) Compressed victim cache
JP4009306B2 (en) Cache memory and control method thereof
JP2008186233A (en) Instruction cache pre-fetch control method and device thereof
JP5159258B2 (en) Arithmetic processing unit
US20170262328A1 (en) Information processing system, information processing apparatus, information processing method, and computer-readable non-transitory storage medium
JP5045163B2 (en) Arithmetic processing device and control method of arithmetic processing device
JP2010231701A (en) Apparatus for quickly starting system
JP5298826B2 (en) Cache memory and prefetch method
JP2006350633A (en) Data management method and data management system
US8436866B2 (en) Inter-frame texel cache
WO2016122657A1 (en) Ordering updates for nonvolatile memory accesses
JP2008257508A (en) Cache control method, cache device, and microcomputer
US7376797B2 (en) Cache memory system and method using reference bits
JP4008946B2 (en) Cache memory and control method thereof

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120605