JP5056487B2 - Debugging support mechanism and processor system - Google Patents

Debugging support mechanism and processor system Download PDF

Info

Publication number
JP5056487B2
JP5056487B2 JP2008056366A JP2008056366A JP5056487B2 JP 5056487 B2 JP5056487 B2 JP 5056487B2 JP 2008056366 A JP2008056366 A JP 2008056366A JP 2008056366 A JP2008056366 A JP 2008056366A JP 5056487 B2 JP5056487 B2 JP 5056487B2
Authority
JP
Japan
Prior art keywords
support mechanism
access
mismatch
detection unit
master device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008056366A
Other languages
Japanese (ja)
Other versions
JP2009211630A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2008056366A priority Critical patent/JP5056487B2/en
Publication of JP2009211630A publication Critical patent/JP2009211630A/en
Application granted granted Critical
Publication of JP5056487B2 publication Critical patent/JP5056487B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明は、キャッシュメモリを有するプロセッサを用いたプロセッサシステムについてプログラムのデバッグ作業を支援するためのデバッグ支援機構に関する。   The present invention relates to a debugging support mechanism for supporting a program debugging operation for a processor system using a processor having a cache memory.

近時、プロセッサシステムに対しては、市場からの要求により高性能および低消費電力の両立が強く求められている。このため、マルチプロセッサ構成を採用したプロセッサシステムや汎用プロセッサに加えて特定の処理に専用化されたアクセラレータを搭載したプロセッサシステムなどが広く採用されている。   Recently, processor systems are strongly required to achieve both high performance and low power consumption due to market demands. For this reason, a processor system employing a multiprocessor configuration, a processor system equipped with an accelerator dedicated to specific processing in addition to a general-purpose processor, and the like are widely adopted.

また、多くのプロセッサシステムでは、プロセッサの外部に設けられるメモリデバイスのアクセス速度が遅いことに起因して処理性能が低下するという問題がある。このため、高速にアクセス可能なキャッシュメモリをプロセッサの内部に設け、プロセッサの外部に設けられるメモリデバイスのデータのコピーをキャッシュメモリに格納する手法がよく利用されている。   In many processor systems, there is a problem that the processing performance deteriorates due to the low access speed of a memory device provided outside the processor. For this reason, a technique is often used in which a cache memory that can be accessed at high speed is provided inside the processor, and a copy of data of a memory device provided outside the processor is stored in the cache memory.

しかしながら、キャッシュメモリを有するプロセッサを含む複数のマスタデバイスがメインメモリを共通に使用するプロセッサシステムでは、プロセッサのキャッシュメモリおよびメインメモリ間でデータの一貫性が確保されないという問題(キャッシュ一貫性問題)が生じる。例えば、プロセッサのキャッシュメモリにおいてアドレスAのデータが書き換えられている場合、別のマスタデバイスによりアドレスAのデータがメインメモリから読み出されると、そのマスタデバイスにおいて誤ったデータが使用されるという問題が生じる。   However, in a processor system in which a plurality of master devices including a processor having a cache memory commonly use main memory, there is a problem that data consistency cannot be ensured between the cache memory of the processor and the main memory (cache consistency problem). Arise. For example, when the data at the address A is rewritten in the cache memory of the processor, if the data at the address A is read from the main memory by another master device, there is a problem that the wrong data is used in the master device .

キャッシュ一貫性問題を解決する手法としては、キャッシュメモリに対するアクセスやメインメモリに対するアクセスを監視して得られる情報に基づいてキャッシュメモリを制御する手法(一般に、スヌープ方式と呼ばれる)がよく知られている。しかしながら、この手法では、メモリアクセスが発生する度に監視処理が実施されるため、消費電力が増大するという欠点がある。また、キャッシュ一貫性が確保されるまでプロセッサが待機状態になるため、処理性能が低下するという欠点もある。更に、監視装置の実現に伴って回路物量が増加するという欠点もある。   As a technique for solving the cache coherency problem, a technique (generally referred to as a snoop method) for controlling the cache memory based on information obtained by monitoring access to the cache memory or access to the main memory is well known. . However, this method has a drawback in that power consumption increases because monitoring processing is performed each time a memory access occurs. In addition, since the processor is in a standby state until cache coherency is ensured, there is also a disadvantage that processing performance is lowered. Furthermore, there is a drawback that the amount of circuit objects increases with the realization of the monitoring device.

これらの欠点は、低消費電力化の要求が強くない用途(パーソナルコンピュータやワークステーションなど)のプロセッサシステムでは問題とならないが、低消費電力化の要求が強い用途(携帯電話機やディジタルカメラなど)のプロセッサシステムでは深刻な問題となる。このため、低消費電力化の要求が強い用途のプロセッサシステムでは、キャッシュ一貫性維持機構を搭載しないのが一般的である。なお、キャッシュメモリ、キャッシュ一貫性およびスヌープ方式については、非特許文献1などに記載されているため、ここでの詳細な説明は省略している。また、キャッシュ一貫性に関連する技術については、特許文献1、2などに開示されている。
特開2003−345653号公報 特開平6−150032号公報 デイビッド・A・パターソン、ジョン・L・ヘネシー著、「コンピュータの構成と設計第3版」、日経BP社発行
These drawbacks are not a problem in processor systems for applications where personal power consumption is not strongly required (personal computers, workstations, etc.), but for applications where there is a strong demand for low power consumption (mobile phones, digital cameras, etc.). This is a serious problem in processor systems. For this reason, a processor system for applications where there is a strong demand for lower power consumption generally does not include a cache coherency maintenance mechanism. The cache memory, cache coherency, and snoop method are described in Non-Patent Document 1 and the like, and thus detailed description thereof is omitted here. Further, techniques related to cache coherency are disclosed in Patent Documents 1 and 2 and the like.
JP 2003-345653 A JP-A-6-150032 David A. Patterson, John L. Hennessy, "Computer Configuration and Design 3rd Edition", published by Nikkei BP

キャッシュ一貫性維持機構が搭載されていないプロセッサシステムでは、消費電力の増大、処理性能の低下あるいは回路物量の増加などの問題はないが、キャッシュ一貫性が維持されていないことに起因するプログラムのバグが発生した場合にデバッグが容易ではなく、プログラムの開発工数が増大するという問題がある。   In processor systems that do not have a cache coherency maintenance mechanism, there are no problems such as an increase in power consumption, a decrease in processing performance, or an increase in the amount of circuitry, but a bug in the program due to cache coherency not being maintained. When this occurs, there is a problem that debugging is not easy and the development man-hour of the program increases.

本発明の目的は、キャッシュ一貫性維持機構を搭載していないプロセッサシステムについてプログラムデバッグの容易化を実現することにある。   An object of the present invention is to facilitate program debugging for a processor system that does not include a cache coherency maintenance mechanism.

デバッグ支援機構は、中央処理装置およびキャッシュメモリを有する第1マスタデバイスと、第2マスタデバイスと、第1マスタデバイスと第2マスタデバイスとの間で共通に使用されるメインメモリとを備えるプロセッサシステムにて第1マスタデバイス内に設けられ、不一致検出部および停止要求発行部を備える。不一致検出部は、メモリアクセスの発生を契機としてキャッシュメモリのデータ不一致を検出する。停止要求発行部は、不一致検出部によるデータ不一致の検出に伴って中央処理装置に対して停止要求を発行する。   A debugging support mechanism includes a first master device having a central processing unit and a cache memory, a second master device, and a main memory used in common between the first master device and the second master device. Are provided in the first master device and include a mismatch detection unit and a stop request issuing unit. The mismatch detection unit detects a data mismatch in the cache memory when the memory access occurs. The stop request issuing unit issues a stop request to the central processing unit when the data mismatch is detected by the mismatch detection unit.

例えば、デバッグ支援機構は、アドレス情報格納部を更に備える。アドレス情報格納部は、不一致検出部によるデータ不一致の検出時のメモリアクセスのアドレス情報を格納する。例えば、デバッグ支援機構は、アクセス種別情報格納部を更に備える。アクセス種別情報格納部は、不一致検出部によるデータ不一致の検出時のメモリアクセスのアクセス種別情報を格納する。例えば、アクセス種別情報は、アクセス元を示す情報およびリードアクセス/ライトアクセスを示す情報を含む。例えば、デバッグ支援機構は、不一致検出制御部を更に備える。不一致検出制御部は、不一致検出部の稼働/非稼働を制御する。   For example, the debug support mechanism further includes an address information storage unit. The address information storage unit stores address information for memory access when data mismatch is detected by the mismatch detection unit. For example, the debugging support mechanism further includes an access type information storage unit. The access type information storage unit stores access type information for memory access when data mismatch is detected by the mismatch detection unit. For example, the access type information includes information indicating an access source and information indicating read access / write access. For example, the debugging support mechanism further includes a mismatch detection control unit. The mismatch detection control unit controls operation / non-operation of the mismatch detection unit.

キャッシュメモリのデータ不一致が発生した時点での中央処理装置の内部状態情報(プログラムカウンタ情報など)およびメモリアクセスのアドレス情報やアクセス種別情報をプログラム開発者に対して提供することができる。このため、キャッシュ一貫性問題に起因するプログラムのバグが発生した場合にデバッグを効率よく実施することが可能になる。この結果、プログラムの開発工数を大幅に削減することができる。   It is possible to provide the program developer with the internal state information (program counter information, etc.) of the central processing unit at the time when the data mismatch of the cache memory occurs, the memory access address information and the access type information. For this reason, debugging can be efficiently performed when a bug in the program due to the cache coherency problem occurs. As a result, the number of program development steps can be greatly reduced.

以下、実施形態について図面を用いて説明する。   Hereinafter, embodiments will be described with reference to the drawings.

図1は、第1実施形態におけるプロセッサシステムを示している。第1実施形態のプロセッサシステム10は、プロセッサ(第1マスタデバイス)20、アクセラレータ(第2マスタデバイス)30、インターコネクト40およびメインメモリ50を備えている。プロセッサ20およびアクセラレータ30は、インターコネクト40を介してメインメモリ50にリードアクセス/ライトアクセス可能である。   FIG. 1 shows a processor system in the first embodiment. The processor system 10 of the first embodiment includes a processor (first master device) 20, an accelerator (second master device) 30, an interconnect 40, and a main memory 50. The processor 20 and the accelerator 30 can perform read / write access to the main memory 50 via the interconnect 40.

プロセッサ20は、CPU(Central Processing Unit)21、キャッシュメモリ22およびデバッグ支援機構23を備えている。CPU21は、プログラムの実行により演算処理や制御処理などを実施する。キャッシュメモリ22は、メインメモリ50に比べて高速にアクセス可能なメモリであり、メインメモリ50のデータのコピーを格納するために設けられている。デバッグ支援機構23は、プログラムのデバッグ作業を支援するための機構であり、デバッグ起動レジスタ24、不一致検出部25およびブレーク要求発行部26を備えている。   The processor 20 includes a CPU (Central Processing Unit) 21, a cache memory 22, and a debugging support mechanism 23. The CPU 21 performs arithmetic processing, control processing, and the like by executing programs. The cache memory 22 is a memory that can be accessed at a higher speed than the main memory 50, and is provided for storing a copy of data in the main memory 50. The debug support mechanism 23 is a mechanism for supporting the debugging work of the program, and includes a debug start register 24, a mismatch detection unit 25, and a break request issue unit 26.

デバッグ起動レジスタ24は、CPU21からリードアクセス/ライトアクセス可能なレジスタであり、デバッグ支援機構23の有効/無効を制御するために設けられている。例えば、デバッグ起動レジスタ24は、デバッグ支援機構23を有効状態にする場合に“1”に設定され、デバッグ支援機構23を無効状態にする場合に“0”に設定される。   The debug activation register 24 is a register that can be read / written by the CPU 21 and is provided to control the validity / invalidity of the debug support mechanism 23. For example, the debug activation register 24 is set to “1” when the debug support mechanism 23 is enabled, and is set to “0” when the debug support mechanism 23 is disabled.

不一致検出部25は、CPU21のキャッシュメモリ22に対するアクセス、キャッシュメモリ22のメインメモリ50に対するアクセスおよびアクセラレータ30のメインメモリ50に対するアクセスの発生を契機として、キャッシュメモリ22のデータ不一致(キャッシュメモリ22のデータとメインメモリ50のデータとの不一致)を検出する。不一致検出部25は、キャッシュメモリ22のデータ不一致を検出した場合、ブレーク要求発行部26に供給される不一致検出信号DETを活性化させる。   The mismatch detection unit 25 receives data mismatch (data in the cache memory 22) triggered by the occurrence of access to the cache memory 22 of the CPU 21, access to the main memory 50 of the cache memory 22, and access to the main memory 50 of the accelerator 30. And the data in the main memory 50 are detected. The mismatch detection unit 25 activates the mismatch detection signal DET supplied to the break request issuing unit 26 when detecting a data mismatch in the cache memory 22.

ブレーク要求発行部26は、デバッグ起動レジスタ24が“1”に設定されている場合(デバッグ支援機構23が有効状態である場合)、不一致検出部25から供給される不一致検出信号DETの活性化に応答して、CPU21に供給されるブレーク要求信号BRKを活性化させる。デバッグ支援機構23(ブレーク要求発行部26)からCPU21へのブレーク要求信号BRKが活性化されると、CPU21によるプログラムの実行が停止される。   The break request issuing unit 26 activates the mismatch detection signal DET supplied from the mismatch detection unit 25 when the debug activation register 24 is set to “1” (when the debug support mechanism 23 is in a valid state). In response, the break request signal BRK supplied to the CPU 21 is activated. When the break request signal BRK from the debug support mechanism 23 (break request issuing unit 26) to the CPU 21 is activated, the execution of the program by the CPU 21 is stopped.

このように、デバッグ支援機構23においては、キャッシュメモリ22のデータ不一致を検出した場合にCPU21に対してブレーク要求を発行するデバッグ機能が実現されている。また、図示を省略しているが、デバッグ支援機構23においては、所定アドレスへのアクセスが所定回数実施されたことを検出した場合にCPU21に対してブレーク要求を発行するデバッグ機能なども実現されている。この種のデバッグ機能は、例えば、特開昭56−58199号公報に開示されている。   As described above, the debugging support mechanism 23 implements a debugging function for issuing a break request to the CPU 21 when a data mismatch in the cache memory 22 is detected. Although not shown, the debug support mechanism 23 also implements a debugging function that issues a break request to the CPU 21 when it is detected that access to a predetermined address has been performed a predetermined number of times. Yes. This type of debugging function is disclosed in, for example, Japanese Patent Laid-Open No. 56-58199.

図2は、第1実施形態におけるプログラムデバッグの流れを示している。プログラム開発者は、プロセッサ20(CPU21)により実行されるプログラムの開発時に、キャッシュ一貫性問題に起因するプログラムのバグが発生したことを認識すると(ステップS11)、デバッグ支援機構23のデバッグ起動レジスタ24を“1”に設定する(ステップS12)。これにより、デバッグ支援機構23が有効状態になる(ステップS31)。この後、プログラム開発者は、開発中のプログラムを起動する(ステップS13)。これにより、CPU21によるプログラムの実行が開始される(ステップS21)。CPU21によるプログラムの実行中には、デバッグ支援機構23の不一致検出部25により、キャッシュメモリ22のデータ不一致が発生したか否かが監視される。デバッグ支援機構23の不一致検出部25は、キャッシュメモリ22のデータ不一致を検出すると、不一致検出信号DETを活性化させる(ステップS32)。これに伴って、デバッグ支援機構23のブレーク要求発行部26は、ブレーク要求信号BRKを活性化させる(ステップS33)。これにより、CPU21によるプログラムの実行が停止される(ステップS22)。そして、プログラム開発者は、CPU21の内部状態情報(プログラムカウンタ情報など)を取得してバグ原因を究明する(ステップS14)。   FIG. 2 shows the flow of program debugging in the first embodiment. When the program developer recognizes that a bug in the program due to the cache coherency problem has occurred during the development of the program executed by the processor 20 (CPU 21) (step S11), the debug start register 24 of the debug support mechanism 23. Is set to "1" (step S12). As a result, the debug support mechanism 23 is enabled (step S31). Thereafter, the program developer starts the program under development (step S13). Thereby, execution of the program by CPU21 is started (step S21). During the execution of the program by the CPU 21, the mismatch detection unit 25 of the debug support mechanism 23 monitors whether or not a data mismatch in the cache memory 22 has occurred. The mismatch detection unit 25 of the debug support mechanism 23 activates the mismatch detection signal DET when detecting a data mismatch in the cache memory 22 (step S32). Along with this, the break request issuing unit 26 of the debug support mechanism 23 activates the break request signal BRK (step S33). Thereby, the execution of the program by the CPU 21 is stopped (step S22). Then, the program developer acquires the internal state information (program counter information, etc.) of the CPU 21 and investigates the cause of the bug (step S14).

以上のような第1実施形態では、キャッシュメモリ一貫性問題が発生した時点でのCPU21の内部状態情報(プログラムカウンタ情報など)をプログラム開発者に対して提供することができる。このため、キャッシュ一貫性問題に起因するプログラムのバグを効率よくデバッグすることが可能になる。この結果、プログラムの開発期間の短縮が可能になる。   In the first embodiment as described above, the internal state information (program counter information, etc.) of the CPU 21 at the time when the cache memory consistency problem occurs can be provided to the program developer. This makes it possible to efficiently debug program bugs resulting from cache consistency problems. As a result, the program development period can be shortened.

図3は、第2実施形態におけるプロセッサシステムを示している。なお、第2実施形態を説明するにあたって、第1実施形態で説明した要素と同一の要素については、第1実施形態で使用した符号と同一の符号を使用し、詳細な説明を省略する。   FIG. 3 shows a processor system in the second embodiment. In the description of the second embodiment, the same reference numerals as those used in the first embodiment are used for the same elements as those described in the first embodiment, and detailed description thereof is omitted.

第2実施形態のプロセッサシステム10aは、図1(第1実施形態)のプロセッサシステム10においてプロセッサ20をプロセッサ20aに置き換えたものである。プロセッサ20aは、図1のプロセッサ20においてデバッグ支援機構23をデバッグ支援機構23aに置き換えたものである。   The processor system 10a of the second embodiment is obtained by replacing the processor 20 with the processor 20a in the processor system 10 of FIG. 1 (first embodiment). The processor 20a is obtained by replacing the debug support mechanism 23 with the debug support mechanism 23a in the processor 20 of FIG.

デバッグ支援機構23aは、図1のデバッグ支援機構23において不一致検出部25を不一致検出部25aに置き換えるとともにアドレスレジスタ27を追加したものである。不一致検出部25aは、図1の不一致検出部25と同様に動作するうえに、キャッシュメモリ22のデータ不一致を検出した際のメモリアクセスのアドレス情報をアドレスレジスタ27に格納する。なお、アドレスレジスタ27は、CPU21からリードアクセス/ライトアクセス可能なレジスタである。   The debug support mechanism 23a is obtained by replacing the mismatch detection unit 25 with the mismatch detection unit 25a and adding an address register 27 in the debug support mechanism 23 of FIG. The mismatch detection unit 25 a operates in the same manner as the mismatch detection unit 25 of FIG. 1, and stores memory access address information in the address register 27 when a data mismatch of the cache memory 22 is detected. The address register 27 is a register that can be read / written accessed from the CPU 21.

以上のような第2実施形態では、第1実施形態(図2)と同様にプログラムデバッグを実施可能であり、キャッシュ一貫性問題が発生した時点でのCPU21の内部状態情報(プログラムカウンタ情報など)に加えてメモリアクセスのアドレス情報をプログラム開発者に対して提供することができる。従って、プログラムデバッグの効率を更に向上させることができ、プログラムの開発期間の更なる短縮が可能になる。特に、キャッシュ一貫性問題が発生した時点でのメモリアクセスのアドレス情報を、所定アドレスへのアクセスが所定回数実施されたことを検出した場合にCPU21に対してブレーク要求を発行するデバッグ機能で利用することにより、プログラムデバッグの効率を大幅に向上させることができる。   In the second embodiment as described above, program debugging can be performed in the same manner as in the first embodiment (FIG. 2), and the internal state information (program counter information, etc.) of the CPU 21 when a cache coherency problem occurs. In addition, address information for memory access can be provided to the program developer. Accordingly, the efficiency of program debugging can be further improved, and the program development period can be further shortened. In particular, the address information of the memory access at the time when the cache coherency problem occurs is used in a debugging function that issues a break request to the CPU 21 when it is detected that a predetermined number of accesses to the predetermined address has been performed. As a result, the efficiency of program debugging can be greatly improved.

図4は、第3実施形態におけるプロセッサシステムを示している。なお、第3実施形態を説明するにあたって、第1および第2実施形態で説明した要素と同一の要素については、第1および第2実施形態で使用した符号と同一の符号を使用し、詳細な説明を省略する。   FIG. 4 shows a processor system in the third embodiment. In describing the third embodiment, the same reference numerals as those used in the first and second embodiments are used for the same elements as those described in the first and second embodiments. Description is omitted.

第3実施形態のプロセッサシステム10bは、図3(第2実施形態)のプロセッサシステム10aにおいてプロセッサ20aをプロセッサ20bに置き換えたものである。プロセッサ20bは、図3のプロセッサ20aにおいてデバッグ支援機構23aをデバッグ支援機構23bに置き換えたものである。   The processor system 10b of the third embodiment is obtained by replacing the processor 20a with the processor 20b in the processor system 10a of FIG. 3 (second embodiment). The processor 20b is obtained by replacing the debug support mechanism 23a with the debug support mechanism 23b in the processor 20a of FIG.

デバッグ支援機構23bは、図3のデバッグ支援機構23aにおいて不一致検出部25aを不一致検出部25bに置き換えるとともにアクセス種別レジスタ28を追加したものである。不一致検出部25bは、図3の不一致検出部25aと同様に動作するうえに、キャッシュメモリ22のデータ不一致を検出した際のメモリアクセスのアクセス種別情報(アクセス元を示す情報やリードアクセス/ライトアクセスを示す情報などを含む)をアクセス種別レジスタ28に格納する。なお、アクセス種別レジスタ28は、CPU21からリードアクセス/ライトアクセス可能なレジスタである。   The debug support mechanism 23b is obtained by replacing the mismatch detection unit 25a with the mismatch detection unit 25b and adding an access type register 28 in the debug support mechanism 23a of FIG. The mismatch detection unit 25b operates in the same manner as the mismatch detection unit 25a of FIG. 3, and also accesses the access type information (information indicating the access source and read access / write access when the data mismatch of the cache memory 22 is detected. Are stored in the access type register 28. The access type register 28 is a register that can be read / written accessed from the CPU 21.

以上のような第3実施形態では、第1実施形態(図2)と同様にプログラムデバッグを実施可能であり、キャッシュ一貫性問題が発生した時点でのCPU21の内部状態情報(プログラムカウンタ情報など)およびメモリアクセスのアドレス情報に加えてメモリアクセスのアクセス種別情報をプログラム開発者に対して提供することができる。従って、プログラムデバッグの効率を更に向上させることができ、プログラムの開発期間の更なる短縮が可能になる。   In the third embodiment as described above, program debugging can be performed in the same manner as in the first embodiment (FIG. 2), and internal state information (program counter information, etc.) of the CPU 21 when a cache coherency problem occurs. In addition to memory access address information, memory access access type information can be provided to the program developer. Accordingly, the efficiency of program debugging can be further improved, and the program development period can be further shortened.

図5は、第4実施形態におけるプロセッサシステムを示している。なお、第4実施形態を説明するにあたって、第1、第2および第3実施形態で説明した要素と同一の要素については、第1、第2および第3実施形態で使用した符号と同一の符号を使用し、詳細な説明を省略する。   FIG. 5 shows a processor system in the fourth embodiment. In the description of the fourth embodiment, the same reference numerals as those used in the first, second, and third embodiments are used for the same elements as those described in the first, second, and third embodiments. The detailed description is omitted.

第4実施形態のプロセッサシステム10cは、図4(第3実施形態)のプロセッサシステム10bにおいてプロセッサ20bをプロセッサ20cに置き換えたものである。プロセッサ20cは、図4のプロセッサ20bにおいてデバッグ支援機構23bをデバッグ支援機構23cに置き換えたものである。   The processor system 10c of the fourth embodiment is obtained by replacing the processor 20b with the processor 20c in the processor system 10b of FIG. 4 (third embodiment). The processor 20c is obtained by replacing the debug support mechanism 23b with the debug support mechanism 23c in the processor 20b of FIG.

デバッグ支援機構23cは、図3のデバッグ支援機構23bにおいて不一致検出部25bを不一致検出部25cに置き換えるとともに不一致検出起動レジスタ29を追加したものである。不一致検出起動レジスタ29は、CPU21からリードアクセス/ライトアクセス可能なレジスタであり、不一致検出部25cの稼働/非稼働を制御するために設けられている。例えば、不一致検出起動レジスタ29は、不一致検出部25cを稼働状態にする場合に“1”に設定され、不一致検出部25cを非稼働状態にする場合に“0”に設定される。不一致検出部25cは、不一致検出起動レジスタ29が“1”に設定されている場合、図4の不一致検出部25bと同様に動作する。   The debug support mechanism 23c is obtained by replacing the mismatch detection unit 25b with the mismatch detection unit 25c and adding a mismatch detection activation register 29 in the debug support mechanism 23b of FIG. The mismatch detection activation register 29 is a register that can be read / written accessible from the CPU 21, and is provided to control the operation / non-operation of the mismatch detection unit 25c. For example, the mismatch detection activation register 29 is set to “1” when the mismatch detection unit 25c is set to the operating state, and is set to “0” when the mismatch detection unit 25c is set to the non-operating state. The mismatch detection unit 25c operates in the same manner as the mismatch detection unit 25b in FIG. 4 when the mismatch detection activation register 29 is set to “1”.

図6は、第4実施形態におけるプログラムデバッグの流れを示している。第4実施形態におけるプログラムデバッグの流れは、第1実施形態(図2)におけるプログラムデバッグの流れに対して、プログラム開発者がデバッグ支援機構23cの不一致検出起動レジスタ29を“1”に設定することで、デバッグ支援機構23cの不一致検出部25cが稼働状態になるという手順(ステップS12’、S31’)が追加されたものになる。   FIG. 6 shows the flow of program debugging in the fourth embodiment. The program debugging flow in the fourth embodiment is that the program developer sets the mismatch detection activation register 29 of the debugging support mechanism 23c to “1” with respect to the program debugging flow in the first embodiment (FIG. 2). Thus, a procedure (steps S12 ′ and S31 ′) in which the mismatch detection unit 25c of the debug support mechanism 23c is in an operating state is added.

以上のような第4実施形態では、不一致検出起動レジスタ29を介して不一致検出部25cの稼働/非稼働を制御可能であるため、プログラムデバッグ時にのみ不一致検出部25cを稼働状態にすることができる。従って、実際のシステム運用時に消費電力を抑えることが可能になる。なお、不一致検出起動レジスタ29の役割をデバッグ起動レジスタ24に持たせることも可能であるが、デバッグ支援機構23cにおいては、不一致検出部25cを用いたデバッグ機能以外のデバッグ機能も実現されているため、デバッグ起動レジスタ24とは別に不一致検出起動レジスタ29が設けられている。   In the fourth embodiment as described above, since the operation / non-operation of the inconsistency detection unit 25c can be controlled via the inconsistency detection activation register 29, the inconsistency detection unit 25c can be brought into an operating state only during program debugging. . Therefore, power consumption can be suppressed during actual system operation. Although it is possible to give the debug activation register 24 the role of the mismatch detection activation register 29, the debug support mechanism 23c also realizes a debug function other than the debug function using the mismatch detection unit 25c. In addition to the debug activation register 24, a mismatch detection activation register 29 is provided.

図7は、第5実施形態におけるプロセッサシステムを示している。なお、第5実施形態を説明するにあたって、第1、第2、第3および第4実施形態で説明した要素と同一の要素については、第1、第2、第3および第4実施形態で使用した符号と同一の符号を使用し、詳細な説明を省略する。   FIG. 7 shows a processor system in the fifth embodiment. In describing the fifth embodiment, the same elements as those described in the first, second, third, and fourth embodiments are used in the first, second, third, and fourth embodiments. The same reference numerals are used, and detailed description is omitted.

第5実施形態のプロセッサシステム10dは、図5(第4実施形態)のプロセッサシステム10cにおいてプロセッサ20cをプロセッサ20d−1に置き換えるとともにアクセラレータ30をプロセッサ20d−2に置き換えたものである。プロセッサ20d−1、20d−2は、図5のプロセッサ20cにおいてデバッグ支援機構23cをデバッグ支援機構23dに置き換えたものである。デバッグ支援機構23dは、図5のデバッグ支援機構23cにおいて不一致検出部25cを不一致検出部25dに置き換えたものである。   The processor system 10d of the fifth embodiment is obtained by replacing the processor 20c with the processor 20d-1 and replacing the accelerator 30 with the processor 20d-2 in the processor system 10c of FIG. 5 (fourth embodiment). The processors 20d-1 and 20d-2 are obtained by replacing the debug support mechanism 23c with the debug support mechanism 23d in the processor 20c of FIG. The debug support mechanism 23d is obtained by replacing the mismatch detection unit 25c with the mismatch detection unit 25d in the debug support mechanism 23c of FIG.

プロセッサ20d−1(20d−2)の不一致検出部25dは、プロセッサ20d−1(20d−2)の不一致検出起動レジスタ29が“1”に設定されている場合、プロセッサ20d−1(20d−2)におけるCPU21のキャッシュメモリ22に対するアクセス、プロセッサ20d−1(20d−2)におけるキャッシュメモリ22のメインメモリ50に対するアクセス、プロセッサ20d−2(20d−1)におけるCPU21のキャッシュメモリ22に対するアクセスおよびプロセッサ20d−2(20d−1)におけるキャッシュメモリ22のメインメモリ50に対するアクセスの発生を契機として、プロセッサ20d−1(20d−2)のキャッシュメモリ22のデータ不一致(プロセッサ20d−1(20d−2)のキャッシュメモリ22のデータとメインメモリ50のデータとの不一致およびプロセッサ20d−1(20d−2)のキャッシュメモリ22のデータとプロセッサ20d−2(20d−1)のキャッシュメモリ22のデータとの不一致)を検出する。プロセッサ20d−1(20d−2)の不一致検出部25dは、プロセッサ20d−1(20d−2)のキャッシュメモリ22のデータ不一致を検出した場合、プロセッサ20d−1(20d−2)のブレーク要求発行部26に供給される不一致検出信号DETを活性化させる。   When the mismatch detection activation register 29 of the processor 20d-1 (20d-2) is set to “1”, the mismatch detection unit 25d of the processor 20d-1 (20d-2) ) Access to the cache memory 22 of the CPU 21, access to the main memory 50 of the cache memory 22 in the processor 20 d-1 (20 d-2), access to the cache memory 22 of the CPU 21 in the processor 20 d-2 (20 d-1), and the processor 20 d. -2 (20d-1), when the access to the main memory 50 of the cache memory 22 occurs, the data mismatch of the cache memory 22 of the processor 20d-1 (20d-2) (the processor 20d-1 (20d-2) Cat And the data in the main memory 50 and the data in the cache memory 22 of the processor 20d-1 (20d-2) and the data in the cache memory 22 of the processor 20d-2 (20d-1)). To detect. When the mismatch detection unit 25d of the processor 20d-1 (20d-2) detects a data mismatch in the cache memory 22 of the processor 20d-1 (20d-2), it issues a break request for the processor 20d-1 (20d-2). The mismatch detection signal DET supplied to the unit 26 is activated.

以上のような第5実施形態では、プロセッサ20d−1、20d−2を用いたマルチプロセッサ構成が採用されているが、このような場合でも、プロセッサ20d−1、20d−2にデバッグ支援機構23dが設けられることで、第1、第2、第3および第4実施形態と同様の効果が得られる。   In the fifth embodiment as described above, a multiprocessor configuration using the processors 20d-1 and 20d-2 is adopted. Even in such a case, the debug support mechanism 23d is added to the processors 20d-1 and 20d-2. By providing, the same effects as those of the first, second, third and fourth embodiments can be obtained.

以上の第1〜第5実施形態に関して、更に以下の付記を開示する。
(付記1)
中央処理装置およびキャッシュメモリを有する第1マスタデバイスと、第2マスタデバイスと、前記第1マスタデバイスと前記第2マスタデバイスとの間で共通に使用されるメインメモリとを備えるプロセッサシステムにて前記第1マスタデバイス内に設けられるデバッグ支援機構であって、
メモリアクセスの発生を契機として前記キャッシュメモリのデータ不一致を検出する不一致検出部と、
前記不一致検出部によるデータ不一致の検出に伴って前記中央処理装置に対して停止要求を発行する停止要求発行部とを備えることを特徴とするデバッグ支援機構。
(付記2)
付記1に記載のデバッグ支援機構において、
前記不一致検出部によるデータ不一致の検出時のメモリアクセスのアドレス情報を格納するアドレス情報格納部を備えることを特徴とするデバッグ支援機構。
(付記3)
付記1または付記2に記載のデバッグ支援機構において、
前記不一致検出部によるデータ不一致の検出時のメモリアクセスのアクセス種別情報を格納するアクセス種別情報格納部を備えることを特徴とするデバッグ支援機構。
(付記4)
付記3に記載のデバッグ支援機構において、
前記アクセス種別情報は、アクセス元を示す情報およびリードアクセス/ライトアクセスを示す情報を含むことを特徴とするデバッグ支援機構。
(付記5)
付記1〜4のいずれか1項に記載のデバッグ支援機構において、
前記不一致検出部の稼働/非稼働を制御する不一致検出制御部を備えることを特徴とするデバッグ支援機構。
(付記6)
中央処理装置と、キャッシュメモリと、デバッグ支援機構とを有する第1マスタデバイスと、
第2マスタデバイスと、
前記第1マスタデバイスと前記第2マスタデバイスとの間で共通に使用されるメインメモリとを備え、
前記デバッグ支援機構は、
メモリアクセスの発生を契機として前記キャッシュメモリのデータ不一致を検出する不一致検出部と、
前記不一致検出部によるデータ不一致の検出に伴って前記中央処理装置に対して停止要求を発行する停止要求発行部とを備えることを特徴とするプロセッサシステム。
Regarding the above first to fifth embodiments, the following additional notes are further disclosed.
(Appendix 1)
In a processor system comprising: a first master device having a central processing unit and a cache memory; a second master device; and a main memory used in common between the first master device and the second master device. A debugging support mechanism provided in the first master device,
A mismatch detection unit that detects data mismatch in the cache memory triggered by the occurrence of memory access;
A debugging support mechanism, comprising: a stop request issuing unit that issues a stop request to the central processing unit when a data mismatch is detected by the mismatch detection unit.
(Appendix 2)
In the debug support mechanism described in Appendix 1,
A debugging support mechanism, comprising: an address information storage unit for storing address information of memory access when data mismatch is detected by the mismatch detection unit.
(Appendix 3)
In the debug support mechanism described in appendix 1 or appendix 2,
A debugging support mechanism comprising: an access type information storage unit for storing access type information for memory access when data mismatch is detected by the mismatch detection unit.
(Appendix 4)
In the debug support mechanism described in Appendix 3,
The debug support mechanism, wherein the access type information includes information indicating an access source and information indicating read access / write access.
(Appendix 5)
In the debugging support mechanism according to any one of appendices 1 to 4,
A debugging support mechanism comprising: a mismatch detection control unit that controls operation / non-operation of the mismatch detection unit.
(Appendix 6)
A first master device having a central processing unit, a cache memory, and a debugging support mechanism;
A second master device;
A main memory used in common between the first master device and the second master device;
The debugging support mechanism includes:
A mismatch detection unit that detects data mismatch in the cache memory triggered by the occurrence of memory access;
A processor system, comprising: a stop request issuing unit that issues a stop request to the central processing unit when the data mismatch is detected by the mismatch detection unit.

以上、本発明について詳細に説明してきたが、前述の実施形態は発明の一例に過ぎず、本発明はこれらに限定されるものではない。本発明を逸脱しない範囲で変形可能であることは明らかである。   As mentioned above, although this invention was demonstrated in detail, above-mentioned embodiment is only an example of this invention and this invention is not limited to these. Obviously, modifications can be made without departing from the scope of the present invention.

第1実施形態におけるプロセッサシステムを示す図である。It is a figure which shows the processor system in 1st Embodiment. 第1実施形態におけるプログラムデバッグの流れを示す図である。It is a figure which shows the flow of the program debug in 1st Embodiment. 第2実施形態におけるプロセッサシステムを示す図である。It is a figure which shows the processor system in 2nd Embodiment. 第3実施形態におけるプロセッサシステムを示す図である。It is a figure which shows the processor system in 3rd Embodiment. 第4実施形態におけるプロセッサシステムを示す図である。It is a figure which shows the processor system in 4th Embodiment. 第4実施形態におけるプログラムデバッグの流れを示す図である。It is a figure which shows the flow of the program debug in 4th Embodiment. 第5実施形態におけるプロセッサシステムを示す図である。It is a figure which shows the processor system in 5th Embodiment.

符号の説明Explanation of symbols

10、10a、10b、10c、10d‥プロセッサシステム;20、20a、20b、20c、20d−1、20d−2‥プロセッサ;21‥CPU;22‥キャッシュメモリ;23、23a、23b、23c、23d‥デバッグ支援機構;24‥デバッグ起動レジスタ;25、25a、25b、25c、25d‥不一致検出部;26‥ブレーク要求発行部;27‥アドレスレジスタ;28‥アクセス種別レジスタ;29‥不一致検出起動レジスタ;30‥アクセラレータ;40‥インターコネクト;50‥メインメモリ;BRK‥ブレーク要求信号;DET‥不一致検出信号 10, 10a, 10b, 10c, 10d ... processor system; 20, 20a, 20b, 20c, 20d-1, 20d-2 ... processor; 21 ... CPU; 22 ... cache memory; 23, 23a, 23b, 23c, 23d ... Debug support mechanism; 24, debug start register; 25, 25a, 25b, 25c, 25d, mismatch detection unit; 26, break request issue unit, 27, address register, 28, access type register, 29, mismatch detection start register; Accelerator; 40 Interconnect; 50 Main memory; BRK Break request signal; DET Mismatch detection signal

Claims (5)

中央処理装置およびキャッシュメモリを有する第1マスタデバイスと、第2マスタデバイスと、前記第1マスタデバイスと前記第2マスタデバイスとの間で共通に使用されるメインメモリとを備えるプロセッサシステムにて前記第1マスタデバイス内に設けられるデバッグ支援機構であって、
メモリアクセスの発生を契機として前記キャッシュメモリのデータ不一致を検出する不一致検出部と、
前記不一致検出部によるデータ不一致の検出に伴って前記中央処理装置に対して停止要求を発行する停止要求発行部とを備えることを特徴とするデバッグ支援機構。
In a processor system comprising: a first master device having a central processing unit and a cache memory; a second master device; and a main memory used in common between the first master device and the second master device. A debugging support mechanism provided in the first master device,
A mismatch detection unit that detects data mismatch in the cache memory triggered by the occurrence of memory access;
A debugging support mechanism, comprising: a stop request issuing unit that issues a stop request to the central processing unit when a data mismatch is detected by the mismatch detection unit.
請求項1に記載のデバッグ支援機構において、
前記不一致検出部によるデータ不一致の検出時のメモリアクセスのアドレス情報を格納するアドレス情報格納部を備えることを特徴とするデバッグ支援機構。
The debugging support mechanism according to claim 1,
A debugging support mechanism, comprising: an address information storage unit for storing address information of memory access when data mismatch is detected by the mismatch detection unit.
請求項1または請求項2に記載のデバッグ支援機構において、
前記不一致検出部によるデータ不一致の検出時のメモリアクセスのアクセス種別情報を格納するアクセス種別情報格納部を備えることを特徴とするデバッグ支援機構。
In the debugging support mechanism according to claim 1 or 2,
A debugging support mechanism comprising: an access type information storage unit for storing access type information for memory access when data mismatch is detected by the mismatch detection unit.
請求項3に記載のデバッグ支援機構において、
前記アクセス種別情報は、アクセス元を示す情報およびリードアクセス/ライトアクセスを示す情報を含むことを特徴とするデバッグ支援機構。
In the debugging support mechanism according to claim 3,
The debug support mechanism, wherein the access type information includes information indicating an access source and information indicating read access / write access.
中央処理装置と、キャッシュメモリと、デバッグ支援機構とを有する第1マスタデバイスと、
第2マスタデバイスと、
前記第1マスタデバイスと前記第2マスタデバイスとの間で共通に使用されるメインメモリとを備え、
前記デバッグ支援機構は、
メモリアクセスの発生を契機として前記キャッシュメモリのデータ不一致を検出する不一致検出部と、
前記不一致検出部によるデータ不一致の検出に伴って前記中央処理装置に対して停止要求を発行する停止要求発行部とを備えることを特徴とするプロセッサシステム。
A first master device having a central processing unit, a cache memory, and a debugging support mechanism;
A second master device;
A main memory used in common between the first master device and the second master device;
The debugging support mechanism includes:
A mismatch detection unit that detects data mismatch in the cache memory triggered by the occurrence of memory access;
A processor system, comprising: a stop request issuing unit that issues a stop request to the central processing unit when the data mismatch is detected by the mismatch detection unit.
JP2008056366A 2008-03-06 2008-03-06 Debugging support mechanism and processor system Expired - Fee Related JP5056487B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008056366A JP5056487B2 (en) 2008-03-06 2008-03-06 Debugging support mechanism and processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008056366A JP5056487B2 (en) 2008-03-06 2008-03-06 Debugging support mechanism and processor system

Publications (2)

Publication Number Publication Date
JP2009211630A JP2009211630A (en) 2009-09-17
JP5056487B2 true JP5056487B2 (en) 2012-10-24

Family

ID=41184679

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008056366A Expired - Fee Related JP5056487B2 (en) 2008-03-06 2008-03-06 Debugging support mechanism and processor system

Country Status (1)

Country Link
JP (1) JP5056487B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02275551A (en) * 1989-04-18 1990-11-09 Oki Electric Ind Co Ltd Debugging device for cache memory
JPH06150032A (en) * 1992-10-31 1994-05-31 V M Technol Kk Integrated circuit microprocessor
JP3494072B2 (en) * 1999-04-26 2004-02-03 日本電気株式会社 Cache memory and fault detection method thereof
JP4114915B2 (en) * 2002-05-24 2008-07-09 株式会社ルネサステクノロジ Data processing apparatus and data processing system
JP2007257441A (en) * 2006-03-24 2007-10-04 Fujitsu Ltd Processor and processor control method

Also Published As

Publication number Publication date
JP2009211630A (en) 2009-09-17

Similar Documents

Publication Publication Date Title
US10789117B2 (en) Data error detection in computing systems
JP4837456B2 (en) Information processing device
JP4764360B2 (en) Techniques for using memory attributes
US10713128B2 (en) Error recovery in volatile memory regions
US20160055059A1 (en) Memory devices and modules
US11977744B2 (en) Memory anomaly processing method and system, electronic device, and storage medium
US9268627B2 (en) Processor hang detection and recovery
KR20150111936A (en) Runtime backup of data in a memory module
WO2015196941A1 (en) Method for processing error catalogs of node in cc-numa system and node
US8181063B2 (en) Computer device, continuing operation method for computer device, and program
US20120084496A1 (en) Validating persistent memory content for processor main memory
TW201432436A (en) Fault tolerance in a multi-core circuit
JP6963552B2 (en) Replay of partially executed instruction blocks in processor-based systems that utilize the block atomic execution model
US9424165B2 (en) Debugging processor hang situations using an external pin
US10055359B2 (en) Pinning objects in multi-level memory hierarchies
JP5056487B2 (en) Debugging support mechanism and processor system
US8990512B2 (en) Method and apparatus for error correction in a cache
JP2005149503A (en) System and method for testing memory using dma
JP2005196680A (en) Computer system
WO2012137239A1 (en) Computer system
JP2009230479A (en) Microprocessor
JP7074291B2 (en) Information processing equipment, information processing methods and programs
US10810070B2 (en) Simulator based detection of a violation of a coherency protocol in an incoherent shared memory system
JP2010056744A (en) Information processor, image forming apparatus, and program
TWI479307B (en) Computer and method for restarting the computer having a memory error

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111125

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: 20120703

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120716

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

Free format text: PAYMENT UNTIL: 20150810

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees