Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4075882B2 - Cache memory hit rate measurement circuit, processor and method - Google Patents
[go: Go Back, main page]

JP4075882B2 - Cache memory hit rate measurement circuit, processor and method - Google Patents

Cache memory hit rate measurement circuit, processor and method Download PDF

Info

Publication number
JP4075882B2
JP4075882B2 JP2004298947A JP2004298947A JP4075882B2 JP 4075882 B2 JP4075882 B2 JP 4075882B2 JP 2004298947 A JP2004298947 A JP 2004298947A JP 2004298947 A JP2004298947 A JP 2004298947A JP 4075882 B2 JP4075882 B2 JP 4075882B2
Authority
JP
Japan
Prior art keywords
cache
cache memory
shift register
hit rate
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004298947A
Other languages
Japanese (ja)
Other versions
JP2006113732A (en
Inventor
俊克 細井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2004298947A priority Critical patent/JP4075882B2/en
Publication of JP2006113732A publication Critical patent/JP2006113732A/en
Application granted granted Critical
Publication of JP4075882B2 publication Critical patent/JP4075882B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明は、コンピュータのキャッシュメモリのヒット率を測定するキャッシュメモリのヒット率測定回路、キャッシュメモリのヒット率測定機能を備えたプロセッサ、及び、キャッシュメモリのヒット率測定方法に関する。   The present invention relates to a cache memory hit rate measuring circuit for measuring a hit rate of a cache memory of a computer, a processor having a cache memory hit rate measuring function, and a cache memory hit rate measuring method.

ハードウェア資源を利用してキャッシュのヒット率を測定する方法として、特開平5−20187号公報に開示された方法が挙げられる。同公報の方法では、任意のデータリプレース回数に対するキャッシュのヒット回数からキャッシュのヒット率を測定している。また、特開平2−201561号公報にも、同様のキャッシュヒット率測定回路が開示されている。   As a method of measuring the cache hit rate using hardware resources, there is a method disclosed in Japanese Patent Laid-Open No. 5-20187. In the method of this publication, the cache hit rate is measured from the number of cache hits with respect to an arbitrary number of data replacements. Japanese Patent Laid-Open No. 2-201561 also discloses a similar cache hit rate measuring circuit.

特開平5−20187号公報JP-A-5-20187 特開平2−201561号公報JP-A-2-2015561

ところで、特定のソフトウェアの動作の処理能力やパフォーマンスの向上に役立てるため、一定の時間内のキャッシュメモリのヒット率の変化をリアルタイムに知りたいという要請がある。しかしながら、上述の各方法では、累積されたキャッシュメモリのヒット回数から求めたヒット率が得られるに過ぎず、リアルタイム性の高いキャッシュメモリヒット率を得ることができないという問題点がある。なお、特開平2−201561号公報では、連続してヒット率を監視できるとされているが、キャッシュアクセスカウンタがフルになるタイミングでヒット率をその都度計算するものであり、特定のソフトウェアの動作中のキャッシュアクセス状況を把握するには不十分である。   By the way, there is a demand for knowing in real time the change in the cache memory hit rate within a certain period of time in order to improve the processing capability and performance of the operation of specific software. However, each of the above-described methods has a problem that only the hit rate obtained from the accumulated number of hits of the cache memory can be obtained, and a cache memory hit rate having a high real-time property cannot be obtained. In JP-A-2-2015561, it is said that the hit rate can be continuously monitored, but the hit rate is calculated each time the cache access counter becomes full. It is not enough to grasp the cache access status.

また、特定のソフトウェアの動作時のキャッシュメモリのヒット率の動向をリアルタイムに知ることができれば、システム側のコンフィグレーションの変更等の対応措置を講ずるなどしてその後のパフォーマンスの向上に役立てる等その用途も大きく広がると考えられる。   In addition, if the trend of the cache memory hit rate during the operation of specific software can be known in real time, it can be used to improve performance afterwards by taking measures such as changing the system configuration. Is also expected to spread greatly.

本発明は、上記した事情に鑑みてなされたものであって、一定のサイクル内のキャッシュメモリのヒット率の動向を監視し、リアルタイムに出力可能なキャッシュメモリのヒット率測定回路、及び、キャッシュメモリのヒット率測定方法を提供することを目的とする。   The present invention has been made in view of the above-described circumstances, and monitors the trend of the hit rate of the cache memory within a certain cycle and can output the hit rate of the cache memory in real time, and the cache memory An object of the present invention is to provide a method for measuring the hit rate.

前記課題を解決するための手段を提供する本発明の第1の視点によれば、以下の盗聴を備えるキャッシュメモリのヒット率測定回路が提供される。このキャッシュメモリのヒット率測定回路は、レジスタ回路を備え、キャッシュアクセスが行われる度、該キャッシュアクセスの結果を所定回数分記憶保持する。また、このキャッシュメモリのヒット率測定回路は、カウンタ回路を備え、前記レジスタ回路の動作と同期して、レジスタ回路に記憶保持されたキャッシュのヒット回数を計数する。また、このキャッシュメモリのヒット率測定回路は、出力回路を備え、前記計数したキャッシュのヒット回数を出力する。   According to a first aspect of the present invention that provides means for solving the above-described problems, a hit ratio measurement circuit for a cache memory including the following wiretapping is provided. The cache memory hit rate measurement circuit includes a register circuit, and stores and holds the cache access result a predetermined number of times each time a cache access is performed. The cache memory hit rate measurement circuit includes a counter circuit, and counts the number of cache hits stored in the register circuit in synchronization with the operation of the register circuit. The hit ratio measurement circuit of the cache memory includes an output circuit, and outputs the counted number of cache hits.

また本発明の第2の視点によれば、Nビットのシフトレジスタと、キャッシュヒットカウンタと、キャッシュヒットを出力する出力回路と、を備えたキャッシュメモリのヒット率測定回路が提供される。前記シフトレジスタは、所定のサイクルで順次入力されるキャッシュアクセスの結果を保持する。前記キャッシュヒットカウンタは、前記シフトレジスタの最下位ビットに入力される内容と、最上位ビットから出力された内容に基づいて更新されるカウンタ値(Nサイクルあたりのキャッシュヒット回数)を保持する。出力回路は、前記キャッシュヒットカウンタのカウンタ値を出力するが、この値が、Nサイクルあたりのキャッシュのヒット率を表している。また、前記キャッシュメモリのヒット率測定回路は、前記シフトレジスタを駆動するためのクロック信号を生成するタイミング生成回路を備える。前記タイミング生成回路は、CPU(Central Processing Unit)から要求されたアドレスの上位指定ビットが変更された場合に、キャッシュアクセスが行われたものとしてクロック信号を送出する。   According to a second aspect of the present invention, there is provided a cache memory hit rate measuring circuit comprising an N-bit shift register, a cache hit counter, and an output circuit for outputting a cache hit. The shift register holds cache access results sequentially input in a predetermined cycle. The cache hit counter holds the contents input to the least significant bit of the shift register and the counter value (number of cache hits per N cycles) updated based on the contents output from the most significant bit. The output circuit outputs the counter value of the cache hit counter, and this value represents the cache hit rate per N cycles. The hit ratio measurement circuit of the cache memory includes a timing generation circuit that generates a clock signal for driving the shift register. The timing generation circuit transmits a clock signal as a result of cache access when an upper designated bit of an address requested by a CPU (Central Processing Unit) is changed.

また本発明の第3の視点によれば、内蔵キャッシュメモリと、前記内蔵キャッシュメモリの管理を行うとともに、キャッシュアクセスの結果を示す信号を出力するキャッシュ制御回路と、上述したキャッシュメモリのヒット率測定回路とを備えるプロセッサが提供される。   According to the third aspect of the present invention, the internal cache memory, the cache control circuit for managing the internal cache memory and outputting a signal indicating the result of the cache access, and the hit rate measurement of the cache memory described above And a processor comprising the circuit.

また本発明の第4の視点によれば、Nビットのシフトレジスタを用いたキャッシュメモリのヒット率測定方法が提供される。まず、CPUから要求されたアドレスの上位指定ビットが変更されたか否かを監視し、該アドレスの上位指定ビットが変更されて少なくともキャッシュラインの変更を検知した場合にクロック信号を生成するステップが行われる。そして前記クロック信号と同期して、キャッシュアクセスの結果を前記シフトレジスタにシリアル入力するステップが行われる。そして、前記シフトレジスタの最下位ビットに入力される内容と、最上位ビットから出力された内容に基いて、シフトレジスタに記録されたキャッシュヒット回数を更新するステップが行われ、次いで前記更新したキャッシュヒット回数を逐次出力するステップが行われる。   According to a fourth aspect of the present invention, there is provided a cache memory hit rate measuring method using an N-bit shift register. First, a step of monitoring whether or not the upper designated bit of the address requested by the CPU has been changed and generating a clock signal when the upper designated bit of the address is changed and at least a cache line change is detected is performed. Is called. Then, in synchronization with the clock signal, a step of serially inputting the cache access result to the shift register is performed. Then, based on the content input to the least significant bit of the shift register and the content output from the most significant bit, a step of updating the number of cache hits recorded in the shift register is performed, and then the updated cache A step of sequentially outputting the number of hits is performed.

本発明によれば、リアルタイムに過去Nサイクル分のキャッシュヒット回数を得ることができる。このキャッシュヒット回数は、CPUの過去一定処理サイクル内のキャッシュのヒット率と考えることができ、特定のソフトの動作時の処理能力や、パフォーマンスの向上に役立てることができる。   According to the present invention, the number of cache hits for the past N cycles can be obtained in real time. The number of cache hits can be considered as a cache hit rate within the past fixed processing cycle of the CPU, and can be used to improve processing capability and performance during operation of specific software.

続いて、本発明のその好ましい一実施の形態について図面を参照して詳細に説明する。図1は、本実施の形態に係るプロセッサの概略構成を表した図である。図1を参照すると、CPU2、キャッシュ制御回路9、TAGメモリ12、キャッシュメモリ4、外部メモリとからなるキャッシュ機構の基本構成に加えて、本発明に係るキャッシュメモリのヒット率測定回路3とが示されている。   Next, a preferred embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram showing a schematic configuration of a processor according to the present embodiment. Referring to FIG. 1, a cache memory hit rate measuring circuit 3 according to the present invention is shown in addition to the basic configuration of a cache mechanism comprising a CPU 2, a cache control circuit 9, a TAG memory 12, a cache memory 4, and an external memory. Has been.

CPU2は、キャッシュ制御回路9と接続されており、キャッシュ制御回路9は、キャッシュメモリ4とTAGメモリ12に接続されている。キャッシュメモリ4から出力されたデータは、外部メモリデータとのセレクタ19に接続されており、CPU2に転送される。   The CPU 2 is connected to the cache control circuit 9, and the cache control circuit 9 is connected to the cache memory 4 and the TAG memory 12. Data output from the cache memory 4 is connected to the selector 19 for external memory data and transferred to the CPU 2.

図2は、キャッシュメモリのヒット率測定回路3の詳細構成を表した図である。図2を参照すると、キャッシュメモリのヒット率測定回路3は、大きく分けて、タイミング生成回路5と、シフトレジスタ6と、カウンタ7と、出力回路8とを備えている。   FIG. 2 is a diagram showing a detailed configuration of the hit rate measurement circuit 3 of the cache memory. Referring to FIG. 2, the hit rate measurement circuit 3 of the cache memory is roughly provided with a timing generation circuit 5, a shift register 6, a counter 7, and an output circuit 8.

タイミング生成回路5は、バスサイクルのスタートタイミング生成回路23と、アドレスラッチ(A)29、アドレスラッチ(A−1)35と、ANDゲート27と、分周回路32、34と、比較器33と、フリップフロップ37とを備え、CPUのアドレス16と、キャッシュ制御回路9からキャッシュアクセスのヒット状態を示す信号17とが入力される。また、タイミング生成回路5は、シフトレジスタ6に対して、後に詳述するシフトクロック信号1と、キャッシュ制御回路9から受信した信号17に対応する(キャッシュヒット)信号18を供給する。   The timing generation circuit 5 includes a bus cycle start timing generation circuit 23, an address latch (A) 29, an address latch (A-1) 35, an AND gate 27, frequency dividing circuits 32 and 34, a comparator 33, A flip-flop 37 is provided, and a CPU address 16 and a signal 17 indicating a cache access hit state are input from the cache control circuit 9. Further, the timing generation circuit 5 supplies the shift register 6 with a shift clock signal 1 described later in detail and a (cache hit) signal 18 corresponding to the signal 17 received from the cache control circuit 9.

バスサイクルのスタートのタイミング生成回路23は、アドレスラッチ(A)29、アドレスラッチ(A−1)35、ANDゲート27に対して、バスサイクルの最初にクロック信号を供給する。   The bus cycle start timing generation circuit 23 supplies a clock signal to the address latch (A) 29, the address latch (A-1) 35, and the AND gate 27 at the beginning of the bus cycle.

アドレスラッチ(A)29は、CPUのアドレス16をラッチする回路でありアドレスラッチ(A−1)35は、アドレスラッチ(A)29のアドレスをラッチする回路である。排他的論理和ゲートで構成される比較器33は、アドレスラッチ(A)29とアドレスラッチ(A−1)35の値を比較し、キャッシュアクセスが行われたことを示す信号36として出力する。   The address latch (A) 29 is a circuit that latches the address 16 of the CPU, and the address latch (A-1) 35 is a circuit that latches the address of the address latch (A) 29. The comparator 33 constituted by an exclusive OR gate compares the values of the address latch (A) 29 and the address latch (A-1) 35, and outputs it as a signal 36 indicating that the cache access has been performed.

分周回路34は出力回路8側へ分周クロックを出力する回路であり、分周回路32は出力回路8側へシリアル出力の外部出力要求を出力する回路である。キャッシュメモリのヒット率のシリアル出力タイミングは、データバス30を経由しCPU2から分周回路32、34のパラメータを設定することにより変更できるようになっている。   The frequency dividing circuit 34 is a circuit that outputs a divided clock to the output circuit 8 side, and the frequency dividing circuit 32 is a circuit that outputs an external output request for serial output to the output circuit 8 side. The serial output timing of the hit ratio of the cache memory can be changed by setting parameters of the frequency dividing circuits 32 and 34 from the CPU 2 via the data bus 30.

シフトレジスタ6は、N個のフリップフロップからなり、タイミング生成回路5から受け取った(キャッシュヒット)信号18の内容、即ち、過去N回のキャッシュアクセスの履歴を保持可能となっている。またシフトレジスタ6は、カウンタ7に対して、後述するカウンタ値のアップ、ダウン操作のための信号を供給する。   The shift register 6 includes N flip-flops, and can hold the contents of the (cache hit) signal 18 received from the timing generation circuit 5, that is, the history of the past N cache accesses. The shift register 6 supplies a signal for a counter value up / down operation described later to the counter 7.

カウンタ7は、シフトレジスタ6の入力と出力の状態に基づいて、アップ、ダウンされるカウンタ値を保持している。またカウンタ7のカウンタ値50は、出力回路8へ入力される。   The counter 7 holds a counter value that is increased or decreased based on the input and output states of the shift register 6. The counter value 50 of the counter 7 is input to the output circuit 8.

また、出力回路8は、カウンタ7のカウンタ値50を入力し、分周回路32、34で指定されたタイミングで外部へデータをシリアル出力する。   The output circuit 8 receives the counter value 50 of the counter 7 and serially outputs data to the outside at the timing specified by the frequency dividing circuits 32 and 34.

続いて本実施の形態の動作について説明する。始めに図1を参照して、キャッシュ機構の概略動作について説明する。まず、キャッシュ制御回路9は、CPU2から出力されたアドレス16と、TAGメモリ12のデータと比較してキャッシュがヒットしているか否かを判断する。   Next, the operation of the present embodiment will be described. First, the schematic operation of the cache mechanism will be described with reference to FIG. First, the cache control circuit 9 compares the address 16 output from the CPU 2 with the data in the TAG memory 12 to determine whether or not the cache is hit.

キャッシュがヒットしている場合には、キャッシュアクセスのヒット状態を示す信号17がアクティブ「1」となる。アクティブな信号17を受信したセレクタ19が、キャッシュメモリ4のデータバス13とデータバス11を繋ぐことにより、CPU2は、キャッシュのデータを取得することが可能となる。   When the cache is hit, the signal 17 indicating the hit state of the cache access becomes active “1”. When the selector 19 that has received the active signal 17 connects the data bus 13 and the data bus 11 of the cache memory 4, the CPU 2 can acquire the cache data.

一方、キャッシュがヒットしない場合は、キャッシュアクセスのヒット状態を示す信号17がインアクティブ「0」となる。インアクティブな信号17を受信したセレクタ19が、外部メモリのデータバス14を選択することにより、データバス11へ外部メモリのデータが送出される。   On the other hand, when the cache does not hit, the signal 17 indicating the cache access hit state becomes inactive “0”. The selector 19 that has received the inactive signal 17 selects the data bus 14 of the external memory, so that the data of the external memory is sent to the data bus 11.

続いて、図2及び図3のタイミングチャートを参照して、キャッシュメモリのヒット率測定回路3の動作について説明する。アドレスラッチ(A)29は、バスサイクルのスタートタイミング生成回路23から出力されたタイミングで、CPU2のアドレス16をラッチする。アドレスラッチ35は次のバスサイクルのスタートタイミングで、アドレスラッチ29の値をラッチする。   Next, the operation of the cache memory hit rate measurement circuit 3 will be described with reference to the timing charts of FIGS. The address latch (A) 29 latches the address 16 of the CPU 2 at the timing output from the start timing generation circuit 23 of the bus cycle. The address latch 35 latches the value of the address latch 29 at the start timing of the next bus cycle.

比較器33は、アドレスラッチ(A)29とアドレスラッチ(A−1)35を比較し、アドレスの下位nビット(n=キャッシュラインビット数)を超えた変化(換言すれば、アドレス上位指定ビットの変化)が生じた場合に、アクティブ「1」とした信号36を出力する。   The comparator 33 compares the address latch (A) 29 and the address latch (A-1) 35 and changes the address exceeding the lower n bits (n = number of cache line bits) (in other words, the upper address specifying bit). When the change occurs, a signal 36 with active “1” is output.

一方、バスサイクルのスタートタイミング生成回路23は、バスサイクルのスタートタイミングでアクティブ「1」とした信号38を送信する。従って、ANDゲート27、フリップフロップ37を経由して、シフトレジスタ及びカウンタに供給されるクロック信号1は、バスサイクルのスタート条件とアドレスの変化の双方が成立したとき、即ち、少なくともキャッシュラインをまたぐようなアクセスが生じたときに、アクティブ「1」となる。   On the other hand, the bus cycle start timing generation circuit 23 transmits a signal 38 which is active “1” at the bus cycle start timing. Therefore, the clock signal 1 supplied to the shift register and the counter via the AND gate 27 and the flip-flop 37, when both the start condition of the bus cycle and the change of the address are satisfied, that is, crosses at least the cache line. When such an access occurs, it becomes active “1”.

また、キャッシュ制御回路9から出力される信号17は、キャッシュがヒットした場合にアクティブ「1」になる信号であり、シフトレジスタ6のシフトタイミングに合わせるために、クロック信号1と同様にフリップフロップ37を経由して、(キャッシュヒット信号)18として入力される。   Further, the signal 17 output from the cache control circuit 9 is a signal that becomes active “1” when the cache hits, and in order to match the shift timing of the shift register 6, the flip-flop 37 is the same as the clock signal 1. And (cache hit signal) 18 is input.

図4は、シフトレジスタ6と、カウンタ7の動作を説明するための図である。図4を参照すると、タイミング生成回路5から出力される、キャッシュのヒット状態を示す信号18は、クロック信号1の立ち上がりのタイミングでシフトレジスタ6の最下位ビット60に供給される。   FIG. 4 is a diagram for explaining the operation of the shift register 6 and the counter 7. Referring to FIG. 4, the signal 18 indicating the cache hit state output from the timing generation circuit 5 is supplied to the least significant bit 60 of the shift register 6 at the rising timing of the clock signal 1.

シフトレジスタ6への入力信号107((キャッシュヒット)信号18)と、シフトレジスタ6の最上位ビット6nから取り出される信号103、及び、排他的論理和ゲートを経由してカウンタ7に入力されるイネーブル信号105の状態により、表108のようにカウンタ7がアップ、ダウンすることになる。従って、カウント値は、シフトレジスタ6の各レジスタ60〜6nに保持された「1」の数と同じとなるように更新される。また表108からも明らかなように、シフトレジスタ6に入力される信号と出力される信号が同一である場合は、イネーブル信号105がインアクティブ「0」となり、カウンタは動作せず、状態を維持する。   The input signal 107 ((cache hit) signal 18) to the shift register 6, the signal 103 taken from the most significant bit 6n of the shift register 6, and the enable input to the counter 7 via the exclusive OR gate Depending on the state of the signal 105, the counter 7 is increased or decreased as shown in Table 108. Accordingly, the count value is updated to be the same as the number of “1” held in each of the registers 60 to 6n of the shift register 6. As is clear from Table 108, when the signal input to the shift register 6 and the output signal are the same, the enable signal 105 becomes inactive “0”, the counter does not operate, and the state is maintained. To do.

このようにしてカウンタ7に保持されるのカウンタ値50は、出力回路8内部にあるラッチで一旦保持され、分周回路32、34から送られる分周クロックと送信要求のタイミングで、シリアル出力15される。   The counter value 50 held in the counter 7 in this way is once held in a latch inside the output circuit 8, and the serial output 15 is sent at the timing of the divided clock and the transmission request sent from the frequency dividing circuits 32 and 34. Is done.

このように、CPUのアクセスサイクル毎のキャッシュのヒット数を保持し、カウントすることで、リアルタイムに出力することが可能となる。この出力値は、一定のNサイクル内のキャッシュのヒット数であるため、その変化をキャッシュヒット率として用いることができる。   In this way, it is possible to output in real time by holding and counting the number of cache hits for each access cycle of the CPU. Since this output value is the number of cache hits in a fixed N cycle, the change can be used as the cache hit rate.

以上、本発明の一実施の形態を説明したが、本発明は、上記実施の形態に限定されるものではなく、その他当業者のなしうる変形実施、細部の仕様変更が可能であることはもちろんである。例えば、上記したバスサイクルのスタートのタイミング生成回路23の構成等は、CPU2のタイプに応じて、適宜変更される事項である。   Although one embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment, and it goes without saying that other modifications and detailed specifications can be made by those skilled in the art. It is. For example, the configuration of the bus cycle start timing generation circuit 23 described above is a matter that is appropriately changed according to the type of the CPU 2.

本発明の一実施の形態の概略構成を表した図である。It is a figure showing schematic structure of one embodiment of the present invention. 本発明の一実施の形態に係るキャッシュメモリのヒット率測定回路の詳細構成を表した図である。It is a figure showing the detailed structure of the hit rate measurement circuit of the cache memory based on one embodiment of this invention. 本発明の一実施の形態を説明するためのタイミングチャートである。It is a timing chart for describing one embodiment of the present invention. 本発明の一実施の形態のシフトレジスタとカウンタの動作を説明するための図である。It is a figure for demonstrating operation | movement of the shift register and counter of one embodiment of this invention.

符号の説明Explanation of symbols

1 (シフトレジスタ)クロック信号
2 CPU
3 キャッシュメモリのヒット率測定回路
4 キャッシュメモリ
5 タイミング生成回路
6 シフトレジスタ
7 (キャッシュヒット)カウンタ
8 出力回路
9 キャッシュ制御回路
11、13、14 データバス
12 TAGメモリ
15 シリアル出力
16 アドレス
17、36、38 信号
18 (キャッシュヒット)信号
19 セレクタ
23 バスサイクルのスタートタイミング生成回路
26、31 システムクロック
27 ANDゲート
29 アドレスラッチ(A)
32、34 分周回路
33 比較器
35 アドレスラッチ(A−1)
37 フリップフロップ
50 カウンタ値
60 シフトレジスタ最下位ビット
6n シフトレジスタ最上位ビット
103、107 信号
105 イネーブル信号
108 表
1 (shift register) clock signal 2 CPU
3 Cache memory hit rate measurement circuit 4 Cache memory 5 Timing generation circuit 6 Shift register 7 (Cache hit) counter 8 Output circuit 9 Cache control circuit 11, 13, 14 Data bus 12 TAG memory 15 Serial output 16 Address 17, 36, 38 signal 18 (cache hit) signal 19 selector 23 bus cycle start timing generation circuit 26, 31 system clock 27 AND gate 29 address latch (A)
32, 34 Frequency divider 33 Comparator 35 Address latch (A-1)
37 Flip-flop 50 Counter value 60 Shift register least significant bit 6n Shift register most significant bit 103, 107 Signal 105 Enable signal 108 Table

Claims (4)

所定のサイクルで動作し、キャッシュアクセスの結果をシリアル入力するNビットのシフトレジスタと、
前記シフトレジスタの最下位ビットに入力される内容と、最上位ビットから出力された内容に基づいて、前記シフトレジスタに記録されたキャッシュヒット回数を計数するキャッシュヒットカウンタと、
前記キャッシュヒットカウンタのカウンタ値を出力する出力回路と、を備えたこと、
を特徴とするキャッシュメモリのヒット率測定回路。
An N-bit shift register that operates in a predetermined cycle and serially inputs a cache access result;
A cache hit counter that counts the number of cache hits recorded in the shift register based on the content input to the least significant bit of the shift register and the content output from the most significant bit;
An output circuit for outputting a counter value of the cache hit counter,
A cache memory hit rate measuring circuit characterized by the above.
請求項に記載のキャッシュメモリのヒット率測定回路において、更に、
少なくともCPUから要求されたアドレスの上位指定ビットが変更されたか否かを検出し、前記シフトレジスタを駆動するためのクロック信号を生成するタイミング生成回路を備えること、
を特徴とするキャッシュメモリのヒット率測定回路。
The hit ratio measurement circuit for a cache memory according to claim 1 , further comprising:
A timing generation circuit that detects whether or not at least an upper designated bit of an address requested from the CPU has been changed and generates a clock signal for driving the shift register;
A cache memory hit rate measuring circuit characterized by the above.
内蔵キャッシュメモリと、
前記内蔵キャッシュメモリの管理を行うとともに、キャッシュアクセスの結果を示す信号を出力するキャッシュ制御回路と、
請求項1又は2に記載のキャッシュメモリのヒット率測定回路と、を備えること、
を特徴とするプロセッサ。
Built-in cache memory,
A cache control circuit for managing the internal cache memory and outputting a signal indicating a result of the cache access;
A cache memory hit rate measuring circuit according to claim 1 or 2 ,
Processor.
Nビットのシフトレジスタを備えるキャッシュメモリのヒット率測定回路を用いたキャッシュメモリのヒット率測定方法であって、
キャッシュメモリのヒット率測定回路が、
CPUから要求されたアドレスの上位指定ビットが変更されたか否かを監視し、該アドレスの上位指定ビットが変更されて少なくともキャッシュラインの変更を検知した場合にクロック信号を生成するステップと、
前記クロック信号と同期して、キャッシュアクセスの結果を前記シフトレジスタにシリアル入力するステップと、
前記シフトレジスタの最下位ビットに入力される内容と、最上位ビットから出力された内容に基いて、シフトレジスタに記録されたキャッシュヒット回数を更新するステップと、
前記更新したキャッシュヒット回数を逐次出力するステップと、を含むこと、
を特徴とするキャッシュメモリのヒット率測定方法。
A cache memory hit rate measuring method using a cache memory hit rate measuring circuit having an N-bit shift register,
Cache memory hit rate measurement circuit
Monitoring whether or not the upper designated bit of the address requested by the CPU is changed, and generating a clock signal when the upper designated bit of the address is changed and at least a change in the cache line is detected;
Synchronously with the clock signal, serially inputting a cache access result to the shift register;
Updating the cache hit count recorded in the shift register based on the content input to the least significant bit of the shift register and the content output from the most significant bit;
Sequentially outputting the updated number of cache hits,
A method for measuring a hit rate of a cache memory, characterized by:
JP2004298947A 2004-10-13 2004-10-13 Cache memory hit rate measurement circuit, processor and method Expired - Fee Related JP4075882B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004298947A JP4075882B2 (en) 2004-10-13 2004-10-13 Cache memory hit rate measurement circuit, processor and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004298947A JP4075882B2 (en) 2004-10-13 2004-10-13 Cache memory hit rate measurement circuit, processor and method

Publications (2)

Publication Number Publication Date
JP2006113732A JP2006113732A (en) 2006-04-27
JP4075882B2 true JP4075882B2 (en) 2008-04-16

Family

ID=36382214

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004298947A Expired - Fee Related JP4075882B2 (en) 2004-10-13 2004-10-13 Cache memory hit rate measurement circuit, processor and method

Country Status (1)

Country Link
JP (1) JP4075882B2 (en)

Also Published As

Publication number Publication date
JP2006113732A (en) 2006-04-27

Similar Documents

Publication Publication Date Title
JP4225851B2 (en) Trace element generation system for data processor
US7461312B2 (en) Digital signature generation for hardware functional test
US7937626B2 (en) Techniques for generating a trace stream for a data processing apparatus
JP2012529721A (en) Robust memory link test using memory controller
US20140164458A1 (en) Systems with adjustable sampling parameters and methods of their operation
JP5142868B2 (en) Cache memory control circuit and processor
JP2013034133A (en) Transmission apparatus, transmitting-receiving system, and control method
JP3312648B2 (en) Pulse signal generating device and pulse signal generating method
JP6041749B2 (en) Trace collection circuit and trace collection method
US8745455B2 (en) Providing an on-die logic analyzer (ODLA) having reduced communications
JP4075882B2 (en) Cache memory hit rate measurement circuit, processor and method
CN118567608A (en) Method, system, computer device, storage medium and program product for generating random clock against clock attack
US20120240128A1 (en) Memory Access Performance Diagnosis
JP5549474B2 (en) Integrated circuit
US12135577B2 (en) Low power and high speed scan dump
JP5773002B2 (en) Integrated circuit
TW201447535A (en) Power saving device and power saving method thereof
JP6049564B2 (en) Data trace circuit, integrated circuit, and data trace method
CN107103116B (en) A trigger device and design method for multiplexing tracking cache
CN118467265A (en) Error detection circuit, method and system-on-chip
WO2025173133A1 (en) Testing apparatus, testing method, and program
JP5177108B2 (en) Arithmetic processing device and control method of arithmetic processing device
JP5375705B2 (en) Microcomputer
JP2011257211A (en) Signal observation device and signal observation method
JP5258039B2 (en) Interface circuit and clock / data supply method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070911

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071023

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071218

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080121

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110208

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110208

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120208

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120208

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130208

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130208

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140208

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees