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
JP6818962B2 - Memory history management system - Google Patents
[go: Go Back, main page]

JP6818962B2 - Memory history management system - Google Patents

Memory history management system Download PDF

Info

Publication number
JP6818962B2
JP6818962B2 JP2020549909A JP2020549909A JP6818962B2 JP 6818962 B2 JP6818962 B2 JP 6818962B2 JP 2020549909 A JP2020549909 A JP 2020549909A JP 2020549909 A JP2020549909 A JP 2020549909A JP 6818962 B2 JP6818962 B2 JP 6818962B2
Authority
JP
Japan
Prior art keywords
history
memory
history information
data value
entry
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
JP2020549909A
Other languages
Japanese (ja)
Other versions
JPWO2020075276A1 (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Application granted granted Critical
Publication of JP6818962B2 publication Critical patent/JP6818962B2/en
Publication of JPWO2020075276A1 publication Critical patent/JPWO2020075276A1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0893Caches characterised by their organisation or structure
    • G06F12/0895Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Memory System (AREA)
  • Debugging And Monitoring (AREA)

Description

本発明は、メインメモリの過去の状態を再現するためのシステムに関するものである。 The present invention relates to a system for reproducing the past state of the main memory.

メインメモリの過去の状態を再現する各種のシステムが存在する。
例えば、特許文献1には、次のようなシステムが開示されている。
システムバスに対して発行されるコマンドが監視される。また、キャッシュメモリがバススヌープ機能を備える。キャッシュメモリの更新が発生すると、更新前のデータが記憶部に格納される。そして、記憶部に格納されたデータがメインメモリに書き戻されることにより、メインメモリがチェックポイント時の状態に戻される。
There are various systems that reproduce the past state of main memory.
For example, Patent Document 1 discloses the following system.
Commands issued to the system bus are monitored. In addition, the cache memory has a bus snoop function. When the cache memory is updated, the data before the update is stored in the storage unit. Then, the data stored in the storage unit is written back to the main memory, so that the main memory is returned to the state at the time of checkpoint.

特開平10−078918号公報Japanese Unexamined Patent Publication No. 10-078918

特許文献1に開示されたシステムにおいて、バスコマンドに更新前のデータが含まれない場合には、更新前のデータを記憶部に格納するために、更新前のデータをメインメモリから読み出す必要がある。 In the system disclosed in Patent Document 1, when the bus command does not include the data before the update, it is necessary to read the data before the update from the main memory in order to store the data before the update in the storage unit. ..

本発明は、データ値を含んだ履歴情報を記録するためにメインメモリからデータ値を読み出す、という処理を不要にすることを目的とする。 An object of the present invention is to eliminate the need for a process of reading a data value from a main memory in order to record history information including the data value.

本発明のメモリ履歴管理システムは、1つ以上のアクセス命令が発生する前のメインメモリの状態を再現するために、キャッシュミス時に前記メインメモリからキャッシュメモリへ読み込まれるデータ値を利用することによって、1つ以上の履歴情報を管理する。
前記キャッシュメモリは、前記メインメモリの中の複数の記憶領域に対応する複数のエントリを有する。
それぞれのエントリは、記録フラグを有する。
前記メモリ履歴管理システムは、
前記1つ以上の履歴情報が記録される履歴メモリと、
ライト命令が発生したときに、発生したライト命令の対象となる記憶領域である対象領域に対応するエントリの記録フラグを参照し、参照された記録フラグが、履歴情報の未記録を意味する未記録状態値を示す場合に、前記対象領域から前記キャッシュメモリへ読み込まれたデータ値を含む履歴情報を前記履歴メモリに記録し、且つ、参照された記録フラグに、履歴情報の記録済みを意味する記録済み状態値を設定する履歴記録回路と、を備える。
The memory history management system of the present invention uses the data value read from the main memory to the cache memory at the time of a cache miss in order to reproduce the state of the main memory before the occurrence of one or more access instructions. Manage one or more history information.
The cache memory has a plurality of entries corresponding to a plurality of storage areas in the main memory.
Each entry has a record flag.
The memory history management system
A history memory in which one or more of the history information is recorded, and
When a write instruction is generated, the record flag of the entry corresponding to the target area that is the target storage area of the generated write instruction is referred to, and the referenced record flag is unrecorded, which means that the history information has not been recorded. When indicating a state value, history information including a data value read from the target area to the cache memory is recorded in the history memory, and a record indicating that the history information has been recorded is recorded in the referenced recording flag. It is provided with a history recording circuit for setting a completed state value.

本発明によれば、キャッシュミス時にメインメモリから読み込まれるデータ値が利用される。そのため、データ値を含んだ履歴情報を記録するためにメインメモリからデータ値を読み出す、という処理を不要にすることが可能となる。 According to the present invention, the data value read from the main memory at the time of a cache miss is used. Therefore, it is possible to eliminate the process of reading the data value from the main memory in order to record the history information including the data value.

実施の形態1におけるメモリ履歴管理システム100の構成図。The block diagram of the memory history management system 100 in Embodiment 1. FIG. 実施の形態1におけるメインメモリ202の構成図。The block diagram of the main memory 202 in Embodiment 1. FIG. 実施の形態1におけるキャッシュメモリ110の構成図。The block diagram of the cache memory 110 in Embodiment 1. FIG. 実施の形態1におけるメインメモリ202の記憶領域とキャッシュメモリ110のエントリとの関係図。FIG. 5 is a relationship diagram between the storage area of the main memory 202 and the entry of the cache memory 110 in the first embodiment. 実施の形態1における履歴メモリ120の構成図。The block diagram of the history memory 120 in Embodiment 1. FIG. 実施の形態1における履歴記録方法のフローチャート。The flowchart of the history recording method in Embodiment 1. 実施の形態1におけるアクセス命令リスト211を示す図。The figure which shows the access instruction list 211 in Embodiment 1. FIG. 実施の形態1におけるアクセス命令リスト212を示す図。The figure which shows the access instruction list 212 in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第1データ処理の第1アクセス命令)を示す図。The figure which shows the specific example (the first access instruction of the 1st data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第1データ処理の第2アクセス命令)を示す図。The figure which shows the specific example (the second access instruction of the 1st data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第1データ処理の第3アクセス命令)を示す図。The figure which shows the specific example (third access instruction of the first data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第1データ処理の第4アクセス命令)を示す図。The figure which shows the specific example (the 4th access instruction of the 1st data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第1データ処理の第5アクセス命令)を示す図。The figure which shows the specific example (fifth access instruction of the 1st data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第1データ処理の第6アクセス命令)を示す図。The figure which shows the specific example (sixth access instruction of the first data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第1データ処理の第7アクセス命令)を示す図。The figure which shows the specific example (the seventh access instruction of the 1st data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(記録フラグのクリア)を示す図。The figure which shows the specific example (clearing of a recording flag) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第2データ処理の第1アクセス命令)を示す図。The figure which shows the specific example (the first access instruction of the 2nd data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第2データ処理の第2アクセス命令)を示す図。The figure which shows the specific example (the second access instruction of the 2nd data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第2データ処理の第2アクセス命令)を示す図。The figure which shows the specific example (the second access instruction of the 2nd data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第2データ処理の第3アクセス命令)を示す図。The figure which shows the specific example (third access instruction of the second data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1における履歴記録方法の具体例(第2データ処理の第3アクセス命令)を示す図。The figure which shows the specific example (third access instruction of the second data processing) of the history recording method in Embodiment 1. FIG. 実施の形態1におけるメモリ再現方法のフローチャート。The flowchart of the memory reproduction method in Embodiment 1. 実施の形態1におけるメモリ再現方法の具体例(第2データ処理の開始時)を示す図。The figure which shows the specific example (at the time of starting the 2nd data processing) of the memory reproduction method in Embodiment 1. FIG. 実施の形態1におけるメモリ再現方法の具体例(第1データ処理の開始時)を示す図。The figure which shows the specific example (at the time of starting the 1st data processing) of the memory reproduction method in Embodiment 1. FIG. 実施の形態2における履歴記録方法のフローチャート。The flowchart of the history recording method in Embodiment 2. 実施の形態2における履歴記録方法の具体例(第1データ処理の第4アクセス命令)を示す図。The figure which shows the specific example (the 4th access instruction of the 1st data processing) of the history recording method in Embodiment 2. FIG. 実施の形態2における履歴記録方法の具体例(第2データ処理の第2アクセス命令)を示す図。The figure which shows the specific example (the second access instruction of the 2nd data processing) of the history recording method in Embodiment 2. FIG. 実施の形態2における履歴記録方法の具体例(第2データ処理の第2アクセス命令)を示す図。The figure which shows the specific example (the second access instruction of the 2nd data processing) of the history recording method in Embodiment 2. FIG. 実施の形態2における履歴情報121の具体例を示す図。The figure which shows the specific example of the history information 121 in Embodiment 2. FIG. 実施の形態におけるメモリ履歴管理システム100の構成例を示す図。The figure which shows the configuration example of the memory history management system 100 in embodiment.

実施の形態および図面において、同じ要素または対応する要素には同じ符号を付している。説明した要素と同じ符号が付された要素の説明は適宜に省略または簡略化する。図中の矢印はデータの流れ又は処理の流れを主に示している。 In embodiments and drawings, the same or corresponding elements are designated by the same reference numerals. Descriptions of elements with the same reference numerals as the described elements will be omitted or simplified as appropriate. The arrows in the figure mainly indicate the flow of data or the flow of processing.

実施の形態1.
メモリ履歴管理システム100について、図1から図24に基づいて説明する。
Embodiment 1.
The memory history management system 100 will be described with reference to FIGS. 1 to 24.

***構成の説明***
図1に基づいて、メモリ履歴管理システム100の構成を説明する。
メモリ履歴管理システム100は、コンピュータ200に備わる。
*** Explanation of configuration ***
The configuration of the memory history management system 100 will be described with reference to FIG.
The memory history management system 100 is provided in the computer 200.

コンピュータ200は、プロセッサ201とメインメモリ202とメモリ履歴管理システム100とを備える。
プロセッサ201の具体例は、CPU(Central Processing Unit)である。
メインメモリ202の具体例は、RAM(Random Access Memory)である。
The computer 200 includes a processor 201, a main memory 202, and a memory history management system 100.
A specific example of the processor 201 is a CPU (Central Processing Unit).
A specific example of the main memory 202 is a RAM (Random Access Memory).

メモリ履歴管理システム100は、1つ以上のアクセス命令が発生する前のメインメモリ202の状態を再現するために、1つ以上の履歴情報を管理する。履歴情報については後述する。 The memory history management system 100 manages one or more history information in order to reproduce the state of the main memory 202 before the occurrence of one or more access instructions. The history information will be described later.

メモリ履歴管理システム100は、キャッシュメモリ110と履歴メモリ120とメモリ再現部130とを備える。 The memory history management system 100 includes a cache memory 110, a history memory 120, and a memory reproduction unit 130.

キャッシュメモリ110は、ライトアロケート方式のキャッシュメモリである。
ライトアロケート方式は、ライトミス(ライト命令が発生したときのキャッシュミス)が発生したときに、メインメモリからキャッシュメモリへデータ値が読み込まれる方式である。ライトアロケート方式では、リードミス(リード命令が発生したときのキャッシュミス)が発生したときにも、メインメモリからキャッシュメモリへデータ値が読み込まれる。データ値は単にデータともいう。
メモリ履歴管理システム100では、キャッシュミス時にメインメモリ202からキャッシュメモリ110へ読み込まれるデータ値が利用される。これにより、履歴情報を記録するためにメインメモリ202からデータ値を取得する、という動作が不要となる。
The cache memory 110 is a write-allocate type cache memory.
The write allocate method is a method in which a data value is read from the main memory to the cache memory when a write miss (a cache miss when a write instruction occurs) occurs. In the write allocate method, the data value is read from the main memory to the cache memory even when a read miss (a cache miss when a read instruction occurs) occurs. Data values are also simply called data.
In the memory history management system 100, the data value read from the main memory 202 to the cache memory 110 at the time of a cache miss is used. This eliminates the need for the operation of acquiring data values from the main memory 202 in order to record history information.

履歴メモリ120には、1つ以上の履歴情報が記録される。
履歴メモリ120は、メインメモリ202とは別に用意されたメモリであってもよいし、メインメモリ202の一部であってもよい。
One or more history information is recorded in the history memory 120.
The history memory 120 may be a memory prepared separately from the main memory 202, or may be a part of the main memory 202.

メモリ再現部130は、履歴メモリ120に記録された1つ以上の履歴情報に基づいて、1つ以上のライト命令が発生する前のメインメモリ202の状態を再現する要素である。
メモリ再現部130は、ソフトウェアとハードウェアとのいずれによって実現されてもよい。または、メモリ再現部130は、ソフトウェアとハードウェアとの組み合わせによって実現されてもよい。
メモリ再現部130がソフトウェアによって実現される場合、例えば、コンピュータ200をメモリ再現部130として機能させるためのプログラムがプロセッサ201によって実行される。
メモリ再現部130がハードウェアによって実現される場合、例えば、メモリ再現部130として機能する専用回路が実装される。
The memory reproduction unit 130 is an element that reproduces the state of the main memory 202 before the occurrence of one or more write instructions, based on one or more history information recorded in the history memory 120.
The memory reproduction unit 130 may be realized by either software or hardware. Alternatively, the memory reproduction unit 130 may be realized by a combination of software and hardware.
When the memory reproduction unit 130 is realized by software, for example, a program for making the computer 200 function as the memory reproduction unit 130 is executed by the processor 201.
When the memory reproduction unit 130 is realized by hardware, for example, a dedicated circuit that functions as the memory reproduction unit 130 is mounted.

図2に基づいて、メインメモリ202の構成を説明する。
メインメモリ202は、複数の記憶領域を有する。
それぞれの記憶領域は、アドレスによって識別される。
The configuration of the main memory 202 will be described with reference to FIG.
The main memory 202 has a plurality of storage areas.
Each storage area is identified by an address.

図3に基づいて、キャッシュメモリ110の構成を説明する。
キャッシュメモリ110は、複数のエントリ111を有する。複数のエントリ111は、メインメモリ202の中の複数の記憶領域に対応する。
それぞれのエントリ111は、エントリ番号によって識別される。
The configuration of the cache memory 110 will be described with reference to FIG.
The cache memory 110 has a plurality of entries 111. The plurality of entries 111 correspond to a plurality of storage areas in the main memory 202.
Each entry 111 is identified by an entry number.

それぞれのエントリ111は、フラグ欄とアドレス欄とデータ値欄とを有する。
アドレス欄には、エントリ111に対応する記憶領域のアドレスが格納される。
データ値欄には、エントリ111に対応する記憶領域のデータ値が格納される。
フラグ欄は、有効フラグ(v)とダーティフラグ(d)と記録フラグ(r)とを有する。
有効フラグ(v)は、アドレスおよびデータ値が有効であるか否かを示す。アドレスおよびデータ値が有効であることを意味するフラグ値を「有効値」と称する。アドレスおよびデータ値が無効であることを意味するフラグ値を「無効値」と称する。つまり、有効フラグ(v)には、無効値(0)または有効値(1)が設定される。有効フラグ(v)の初期値は無効値(0)である。
ダーティフラグ(d)は、データ値の書き込みが行われたか否かを示す。具体的には、ダーティフラグ(d)は、エントリ111に対応する記憶領域に対するライト命令が発生したか否かを示す。データ値の書き込みが行われたことを意味するフラグ値を「書き込み状態値」と称する。データ値の書き込みが行われていないことを意味するフラグ値を「不変状態値」と称する。つまり、ダーティフラグ(d)には、不変状態値(0)または書き込み状態値(1)が設定される。ダーティフラグ(d)が書き込み状態値(1)を示す場合、エントリ111のデータ値欄に格納されているデータ値が、メインメモリ202の記憶領域に格納されているデータ値と一致していない可能性がある。このエントリ111が無効化される場合には、データ値欄に格納されているデータ値をメインメモリ202の記憶領域に書き込む必要がある。ダーティフラグ(d)の初期値は不変状態値(0)である。
記録フラグ(r)は、履歴情報が記録されたか否かを示す。履歴情報の記録済みを意味するフラグ値を「記録済み状態値」と称する。履歴情報の未記録を意味するフラグ値を「未記録状態値」と称する。つまり、記録フラグ(r)には、未記録状態値(0)または記録済み状態値(1)が設定される。記録フラグ(r)の初期値は未記録状態値(0)である。
Each entry 111 has a flag field, an address field, and a data value field.
The address of the storage area corresponding to the entry 111 is stored in the address field.
The data value of the storage area corresponding to the entry 111 is stored in the data value column.
The flag column has a valid flag (v), a dirty flag (d), and a recording flag (r).
The valid flag (v) indicates whether the address and the data value are valid or not. A flag value that means that an address and a data value are valid is referred to as a "valid value". A flag value that means that the address and data values are invalid is referred to as an "invalid value". That is, an invalid value (0) or a valid value (1) is set in the valid flag (v). The initial value of the valid flag (v) is the invalid value (0).
The dirty flag (d) indicates whether or not the data value has been written. Specifically, the dirty flag (d) indicates whether or not a write instruction for the storage area corresponding to entry 111 has occurred. The flag value that means that the data value has been written is referred to as a "write state value". A flag value that means that no data value has been written is referred to as an "immutable state value". That is, the invariant state value (0) or the write state value (1) is set in the dirty flag (d). When the dirty flag (d) indicates the write state value (1), the data value stored in the data value field of entry 111 may not match the data value stored in the storage area of the main memory 202. There is sex. When this entry 111 is invalidated, it is necessary to write the data value stored in the data value field to the storage area of the main memory 202. The initial value of the dirty flag (d) is the invariant state value (0).
The recording flag (r) indicates whether or not the history information has been recorded. The flag value that means that the history information has been recorded is referred to as a "recorded state value". A flag value that means unrecorded history information is referred to as an "unrecorded state value". That is, an unrecorded state value (0) or a recorded state value (1) is set in the recording flag (r). The initial value of the recording flag (r) is the unrecorded state value (0).

キャッシュメモリ110は、キャッシュ制御回路112と履歴記録回路113とを備える。
キャッシュ制御回路112は、キャッシュミス時にメインメモリ202の記憶領域からデータ値を読み込み、読み込んだデータ値をキャッシュメモリ110のエントリ111に格納する。
履歴記録回路113は、1つ以上の履歴情報を履歴メモリ120に記録する。
The cache memory 110 includes a cache control circuit 112 and a history recording circuit 113.
The cache control circuit 112 reads a data value from the storage area of the main memory 202 at the time of a cache miss, and stores the read data value in the entry 111 of the cache memory 110.
The history recording circuit 113 records one or more history information in the history memory 120.

図4に基づいて、メインメモリ202の記憶領域とキャッシュメモリ110のエントリ111との対応関係を説明する。
記憶領域とエントリ111とは、ダイレクトマップ方式で互いに対応付けられている。つまり、記憶領域のアドレスとエントリ111のエントリ番号とが互いに対応付けられている。
本実施の形態において、アドレス“0xN”の記憶領域は、エントリ番号“N”のエントリ111に対応付けられている。“N”、“N”および“N”は一桁の整数を表す。
例えば、アドレス“0x100”の記憶領域は、エントリ番号“0”のエントリ111に対応付けられている。アドレス“0x110”の記憶領域とアドレス“0x110”の記憶領域とのそれぞれは、エントリ番号“1”のエントリ111に対応付けられている。アドレス“0x120”の記憶領域は、エントリ番号“2”のエントリ111に対応付けられている。アドレス“0x130”の記憶領域は、エントリ番号“3”のエントリ111に対応付けられている。
The correspondence between the storage area of the main memory 202 and the entry 111 of the cache memory 110 will be described with reference to FIG.
The storage area and the entry 111 are associated with each other in a direct map manner. That is, the address of the storage area and the entry number of the entry 111 are associated with each other.
In the present embodiment, the storage area of the address "0xN 1 N 2 N 3 " is associated with the entry 111 of the entry number "N 2 ". “N 1 ”, “N 2 ” and “N 3 ” represent single digit integers.
For example, the storage area at address “0x100” is associated with entry 111 at entry number “0”. Each of the storage area of the address "0x110" and the storage area of the address "0x110" is associated with the entry 111 of the entry number "1". The storage area of the address “0x120” is associated with the entry 111 of the entry number “2”. The storage area at address “0x130” is associated with entry 111 at entry number “3”.

図5に基づいて、履歴メモリ120の構成を説明する。
履歴メモリ120には、1つ以上の履歴情報121が記録される。
それぞれの履歴情報121は、履歴番号(#)と処理識別子とアドレスとデータ値とを含む。
履歴番号(#)は、履歴情報121を識別する。
処理識別子は、データ処理を識別する。データ処理の具体例は周期処理である。周期処理は、プロセッサ201によって周期的に実行される。処理識別子の具体例は周期番号である。周期番号は周期処理を識別する。
The configuration of the history memory 120 will be described with reference to FIG.
One or more history information 121 is recorded in the history memory 120.
Each history information 121 includes a history number (#), a processing identifier, an address, and a data value.
The history number (#) identifies the history information 121.
The processing identifier identifies the data processing. A specific example of data processing is periodic processing. The periodic processing is periodically executed by the processor 201. A specific example of the processing identifier is the cycle number. The cycle number identifies the cycle process.

***動作の説明***
メモリ履歴管理システム100の動作はメモリ履歴管理方法に相当する。
メモリ履歴管理方法には、履歴記録方法とメモリ再現方法とが含まれる。
履歴記録方法は、履歴記録回路113の動作に相当する。
メモリ再現方法は、メモリ再現部130の動作に相当する。
*** Explanation of operation ***
The operation of the memory history management system 100 corresponds to the memory history management method.
The memory history management method includes a history recording method and a memory reproduction method.
The history recording method corresponds to the operation of the history recording circuit 113.
The memory reproduction method corresponds to the operation of the memory reproduction unit 130.

履歴記録方法とメモリ再現方法とを説明する前に、プロセッサ201とキャッシュ制御回路112とのそれぞれの動作について説明する。
プロセッサ201は、複数のデータ処理を順番に実行する。
それぞれのデータ処理には、1つ以上のアクセス命令が含まれる。アクセス命令は、リード命令とライト命令との総称である。リード命令は、データ値を読み出す命令である。ライト命令は、データ値を書き込む命令である。
以降の説明において、アクセス命令の発生は、プロセッサ201によるアクセス命令の実行に相当する。
Before explaining the history recording method and the memory reproduction method, the respective operations of the processor 201 and the cache control circuit 112 will be described.
Processor 201 executes a plurality of data processes in order.
Each data process includes one or more access instructions. The access instruction is a general term for a read instruction and a write instruction. The read instruction is an instruction to read a data value. The write instruction is an instruction to write a data value.
In the following description, the generation of the access instruction corresponds to the execution of the access instruction by the processor 201.

アクセス命令が発生した場合、発生したアクセス命令の情報がプロセッサ201からキャッシュ制御回路112に入力される。発生したアクセス命令の情報は、以下のような情報である。
発生したアクセス命令の情報は処理識別子を含む。この処理識別子は、実行中のデータ処理を識別する。実行中のデータ処理は、発生したアクセス命令を含むデータ処理である。
発生したアクセス命令の情報はアドレスを含む。このアドレスは、メインメモリ202の中の複数の記憶領域のうち、発生したアクセス命令の対象となる記憶領域を識別する。
発生したアクセス命令の情報はアクセス種類を含む。このアクセス種類は、発生したアクセス命令の種類である。
発生したアクセス命令がライト命令である場合、発生したアクセス命令の情報はライト値を含む。ライト値は、ライト命令で指定されたデータ値、すなわち、ライト後のデータ値である。
When an access instruction is generated, the information of the generated access instruction is input from the processor 201 to the cache control circuit 112. The information of the generated access instruction is the following information.
The information of the generated access instruction includes the processing identifier. This processing identifier identifies the data processing being performed. The data processing being executed is the data processing including the generated access instruction.
The information of the generated access instruction includes the address. This address identifies the storage area that is the target of the generated access instruction from the plurality of storage areas in the main memory 202.
The information of the generated access instruction includes the access type. This access type is the type of access instruction that has occurred.
When the generated access instruction is a write instruction, the information of the generated access instruction includes the write value. The write value is the data value specified by the write instruction, that is, the data value after writing.

メインメモリ202の中の複数の記憶領域のうち、発生したアクセス命令の対象となる記憶領域を「対象領域」と称する。
キャッシュメモリ110の中の複数のエントリ111のうち、対象領域に対応するエントリ111を「対応エントリ」と称する。
複数のデータ処理のうち、発生したアクセス命令を含むデータ処理を「対象処理」と称する。つまり、対象処理は、実行中のデータ処理である。
Of the plurality of storage areas in the main memory 202, the storage area that is the target of the generated access instruction is referred to as a “target area”.
Of the plurality of entries 111 in the cache memory 110, the entry 111 corresponding to the target area is referred to as a “corresponding entry”.
Of a plurality of data processes, the data process including the generated access instruction is referred to as "target process". That is, the target process is the data process being executed.

キャッシュ制御回路112は、対象領域からデータ値を読み込み、読み込んだデータ値を対応エントリのデータ値欄に格納する。
但し、対象領域のデータ値が対応エントリに格納されている場合、キャッシュ制御回路112は、データ値の読み込みとデータ値の格納とを行わない。
また、対象領域とは別の記憶領域のデータ値が対応エントリのデータ値欄に格納されている場合、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、対応エントリのデータ値欄に格納されているデータ値を該当の記憶領域に書き出した後に、読み込んだデータ値を対応エントリのデータ値欄に格納する。
The cache control circuit 112 reads a data value from the target area and stores the read data value in the data value column of the corresponding entry.
However, when the data value of the target area is stored in the corresponding entry, the cache control circuit 112 does not read the data value and store the data value.
Further, when the data value of the storage area different from the target area is stored in the data value column of the corresponding entry, the cache control circuit 112 writes back. That is, the cache control circuit 112 writes the data value stored in the data value column of the corresponding entry to the corresponding storage area, and then stores the read data value in the data value column of the corresponding entry.

さらに、キャッシュ制御回路112は、以下のような処理を行う。
(1)発生したアクセス命令がライト命令である場合、キャッシュ制御回路112は、対応エントリのデータ値欄に格納されているデータ値(ライト前のデータ値)をライト後のデータ値に更新する。
さらに、キャッシュ制御回路112は、対応エントリのダーティフラグに書き込み状態値を設定する。
(2)キャッシュ制御回路112は、対象領域のアドレスを対応エントリのアドレス欄に設定する。
(3)キャッシュ制御回路112は、対応エントリの有効フラグに有効値を設定する。
Further, the cache control circuit 112 performs the following processing.
(1) When the generated access instruction is a write instruction, the cache control circuit 112 updates the data value (data value before writing) stored in the data value column of the corresponding entry to the data value after writing.
Further, the cache control circuit 112 sets a write state value in the dirty flag of the corresponding entry.
(2) The cache control circuit 112 sets the address of the target area in the address field of the corresponding entry.
(3) The cache control circuit 112 sets a valid value in the valid flag of the corresponding entry.

キャッシュ制御回路112によって得られた情報は、キャッシュ制御回路112から履歴記録回路113に入力される。
具体的には、発生したアクセス命令の情報、および、対象領域から読み込まれたデータ値、などが履歴記録回路113に入力される。
The information obtained by the cache control circuit 112 is input from the cache control circuit 112 to the history recording circuit 113.
Specifically, the information of the generated access instruction, the data value read from the target area, and the like are input to the history recording circuit 113.

図6に基づいて、履歴記録方法を説明する。
ステップS101からステップS106は、アクセス命令が発生する毎に実行される。
The history recording method will be described with reference to FIG.
Steps S101 to S106 are executed each time an access instruction is issued.

ステップS101において、履歴記録回路113は、発生したアクセス命令の種類を判定する。
発生したアクセス命令がライト命令である場合、処理はステップS102に進む。
発生したアクセス命令がリード命令である場合、処理はステップS105に進む。
In step S101, the history recording circuit 113 determines the type of the generated access instruction.
If the generated access instruction is a write instruction, the process proceeds to step S102.
If the generated access instruction is a read instruction, the process proceeds to step S105.

ステップS102において、履歴記録回路113は、対応エントリの記録フラグを参照する。
対応エントリの記録フラグが未記録状態値を示す場合、処理はステップS103に進む。
対応エントリの記録フラグが記録済み状態値を示す場合、処理はステップS105に進む。
In step S102, the history recording circuit 113 refers to the recording flag of the corresponding entry.
If the recording flag of the corresponding entry indicates an unrecorded state value, the process proceeds to step S103.
If the record flag of the corresponding entry indicates a recorded state value, the process proceeds to step S105.

ステップS103において、履歴記録回路113は、履歴情報を生成し、生成された履歴情報を履歴メモリ120に記録する。
記録される履歴情報は、対象処理の処理番号と、対象領域のアドレスと、ライト前のデータ値とを含む。
ライト前のデータ値は、キャッシュミス時に対象領域からキャッシュメモリ110へ読み込まれたデータ値である。
但し、対象処理の開始時に対象領域のデータ値が対応エントリのデータ値欄に格納されていた場合、ライト前のデータ値は、ライト後のデータ値が対応エントリのデータ値欄に書き込まれる前に対応エントリのデータ値欄に格納されていたデータ値である。
In step S103, the history recording circuit 113 generates history information, and records the generated history information in the history memory 120.
The recorded history information includes the processing number of the target processing, the address of the target area, and the data value before writing.
The data value before writing is the data value read from the target area into the cache memory 110 at the time of a cache miss.
However, if the data value of the target area is stored in the data value column of the corresponding entry at the start of the target processing, the data value before writing is before the data value after writing is written in the data value column of the corresponding entry. It is the data value stored in the data value column of the corresponding entry.

ステップS104において、履歴記録回路113は、対応エントリの記録フラグに記録済み状態値を設定する。 In step S104, the history recording circuit 113 sets the recorded state value in the recording flag of the corresponding entry.

ステップS105において、履歴記録回路113は、対象処理が終了したか判定する。 In step S105, the history recording circuit 113 determines whether or not the target process has been completed.

例えば、以下のような場合に、履歴記録回路113は、対象処理が終了したと判定する。
(1)rクリア命令がプロセッサ201から入力された場合に、履歴記録回路113は、対象処理が終了したと判定する。rクリア命令は、それぞれのエントリ111の記録フラグをクリアするための命令である。
(2)外部からrクリア信号が入力された場合に、履歴記録回路113は、対象処理が終了したと判定する。rクリア信号は、それぞれのエントリ111の記録フラグをクリアするための命令である。
(3)発生したアクセス命令が特定領域を対象とするアクセス命令である場合に、履歴記録回路113は、対象処理が終了したと判定する。特定領域は、データ処理の終了時にアクセスされる記憶領域である。
For example, in the following cases, the history recording circuit 113 determines that the target process has been completed.
(1) When the r clear instruction is input from the processor 201, the history recording circuit 113 determines that the target process has been completed. The r-clear instruction is an instruction for clearing the recording flag of each entry 111.
(2) When the r clear signal is input from the outside, the history recording circuit 113 determines that the target process has been completed. The r-clear signal is an instruction for clearing the recording flag of each entry 111.
(3) When the generated access instruction is an access instruction targeting a specific area, the history recording circuit 113 determines that the target process has been completed. The specific area is a storage area that is accessed at the end of data processing.

対象処理が終了した場合、処理はステップS106に進む。
対象処理が終了していない場合、履歴記録方法の処理は終了する。
When the target process is completed, the process proceeds to step S106.
If the target process is not completed, the process of the history recording method ends.

ステップS106において、履歴記録回路113は、それぞれのエントリ111の記録フラグに未記録状態値を設定する。
ステップS106の後、履歴記録方法の処理は終了する。
In step S106, the history recording circuit 113 sets an unrecorded state value in the recording flag of each entry 111.
After step S106, the process of the history recording method ends.

以下に、履歴記録方法の具体例を説明する。
まず、第1データ処理が実行され、その後、第2データ処理が実行されるものとする。
図7のアクセス命令リスト211は、第1データ処理に含まれる7つのアクセス命令を示している。
図8のアクセス命令リスト212は、第2データ処理に含まれる3つのアクセス命令を示している。
A specific example of the history recording method will be described below.
First, it is assumed that the first data processing is executed, and then the second data processing is executed.
The access instruction list 211 of FIG. 7 shows seven access instructions included in the first data processing.
The access instruction list 212 of FIG. 8 shows three access instructions included in the second data processing.

図9から図16に基づいて、第1データ処理が実行された場合の履歴記録方法を説明する。
図9において、第1データ処理の第1アクセス命令が発生した。第1データ処理の第1アクセス命令は、アドレス“0x100”の記憶領域を対象とするリード命令である。
キャッシュ制御回路112は、アドレス“0x100”の記憶領域からデータ値“0xaaaa”を読み込み、読み込んだデータ値を第0エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第0エントリ111のアドレス欄にアドレス“0x100”を設定する。そして、キャッシュ制御回路112は、有効フラグ(v)に有効値(1)を設定する。
第1アクセス命令はリード命令であるため、履歴記録回路113は、履歴情報121を記録しない。
A history recording method when the first data processing is executed will be described with reference to FIGS. 9 to 16.
In FIG. 9, the first access instruction for the first data processing has occurred. The first access instruction of the first data processing is a read instruction targeting the storage area of the address "0x100".
The cache control circuit 112 reads the data value “0xaaaa” from the storage area of the address “0x100” and stores the read data value in the data value column of the 0th entry 111. Further, the cache control circuit 112 sets the address "0x100" in the address field of the 0th entry 111. Then, the cache control circuit 112 sets the valid value (1) in the valid flag (v).
Since the first access instruction is a read instruction, the history recording circuit 113 does not record the history information 121.

図10において、第1データ処理の第2アクセス命令が発生した。第1データ処理の第2アクセス命令は、アドレス“0x110”の記憶領域を対象とするライト命令である。ライト値は“0x1111”である。
キャッシュ制御回路112は、アドレス“0x110”の記憶領域からデータ値“0xbbbb”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x110”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0x1111”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x110”の記憶領域から読み込まれたライト前のデータ値“0xbbbb”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“1”とアドレス“0x110”とが含まれる。そして、履歴記録回路113は、第1エントリの記録フラグ(r)に記録済み状態値(1)を設定する。
In FIG. 10, a second access instruction for the first data processing has occurred. The second access instruction of the first data processing is a write instruction targeting the storage area of the address "0x110". The light value is "0x1111".
The cache control circuit 112 reads the data value “0xbbbb” from the storage area of the address “0x110” and stores the read data value in the data value column of the first entry 111. Further, the cache control circuit 112 sets the address "0x110" in the address field of the first entry 111. Then, the cache control circuit 112 sets a valid value (1) in the valid flag (v) of the first entry 111.
Further, the cache control circuit 112 writes the write value “0x1111” in the data value column of the first entry 111. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the first entry 111.
The history recording circuit 113 generates history information 121 including the data value “0xbbbb” before writing read from the storage area of the address “0x110”, and records the generated history information 121 in the history memory 120. The history information 121 further includes a processing identifier "1" and an address "0x110". Then, the history recording circuit 113 sets the recorded state value (1) in the recording flag (r) of the first entry.

図11において、第1データ処理の第3アクセス命令が発生した。第1データ処理の第3アクセス命令は、アドレス“0x120”の記憶領域を対象とするリード命令である。
キャッシュ制御回路112は、アドレス“0x120”の記憶領域からデータ値“0xcccc”を読み込み、読み込んだデータ値を第2エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第2エントリ111のアドレス欄にアドレス“0x120”を設定する。そして、キャッシュ制御回路112は、有効フラグ(v)に有効値(1)を設定する。
第2アクセス命令はリード命令であるため、履歴記録回路113は、履歴情報121を記録しない。
In FIG. 11, a third access instruction for the first data processing has occurred. The third access instruction of the first data processing is a read instruction targeting the storage area of the address "0x120".
The cache control circuit 112 reads the data value “0xcccc” from the storage area of the address “0x120” and stores the read data value in the data value column of the second entry 111. Further, the cache control circuit 112 sets the address "0x120" in the address field of the second entry 111. Then, the cache control circuit 112 sets the valid value (1) in the valid flag (v).
Since the second access instruction is a read instruction, the history recording circuit 113 does not record the history information 121.

図12において、第1データ処理の第4アクセス命令が発生した。第1データ処理の第4アクセス命令は、アドレス“0x120”の記憶領域を対象とするライト命令である。ライト値は“0xcccc”である。
アドレス“0x120”の記憶領域から読み出されたデータ値“0xcccc”は、第2エントリ111に格納済みである。
履歴記録回路113は、第2エントリ111からライト前のデータ値“0xcccc”を取得し、取得したデータ値を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“1”とアドレス“0x120”とが含まれる。そして、履歴記録回路113は、第2エントリ111の記録フラグ(r)に記録済み状態値(1)を設定する。
キャッシュ制御回路112は、第2エントリのデータ値欄にライト値“0xcccc”を書き込む。そして、キャッシュ制御回路112は、第2エントリのダーティフラグ(d)に書き込み状態値(1)を設定する。
In FIG. 12, a fourth access instruction for the first data processing has occurred. The fourth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x120". The light value is "0xcccc".
The data value "0xcccc" read from the storage area of the address "0x120" is stored in the second entry 111.
The history recording circuit 113 acquires the data value “0xcccc” before writing from the second entry 111, generates the history information 121 including the acquired data value, and records the generated history information 121 in the history memory 120. The history information 121 further includes a processing identifier "1" and an address "0x120". Then, the history recording circuit 113 sets the recorded state value (1) in the recording flag (r) of the second entry 111.
The cache control circuit 112 writes the write value “0xcccc” in the data value column of the second entry. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the second entry.

図13において、第1データ処理の第5アクセス命令が発生した。第1データ処理の第5アクセス命令は、アドレス“0x130”の記憶領域を対象とするライト命令である。ライト値は“0xdddd”である。
キャッシュ制御回路112は、アドレス“0x130”の記憶領域からデータ値“0xdddd”を読み込み、読み込んだデータ値を第3エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第3エントリ111のアドレス欄にアドレス“0x130”を設定する。そして、キャッシュ制御回路112は、第3エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第3エントリ111のデータ値欄にライト値“0xdddd”を書き込む。そして、キャッシュ制御回路112は、第3エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x130”の記憶領域から読み込まれたライト前のデータ値“0xdddd”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“1”とアドレス“0x130”とが含まれる。そして、履歴記録回路113は、第3エントリの記録フラグ(r)に記録済み状態値(1)を設定する。
In FIG. 13, the fifth access instruction for the first data processing has occurred. The fifth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x130". The light value is "0xdddd".
The cache control circuit 112 reads the data value “0xdddd” from the storage area of the address “0x130” and stores the read data value in the data value column of the third entry 111. Further, the cache control circuit 112 sets the address "0x130" in the address field of the third entry 111. Then, the cache control circuit 112 sets a valid value (1) in the valid flag (v) of the third entry 111.
Further, the cache control circuit 112 writes the write value “0xdddd” in the data value column of the third entry 111. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the third entry 111.
The history recording circuit 113 generates history information 121 including the data value “0xdddd” before writing read from the storage area of the address “0x130”, and records the generated history information 121 in the history memory 120. The history information 121 further includes a processing identifier "1" and an address "0x130". Then, the history recording circuit 113 sets the recorded state value (1) in the recording flag (r) of the third entry.

図14において、第1データ処理の第6アクセス命令が発生した。第1データ処理の第6アクセス命令は、アドレス“0x130”の記憶領域を対象とするライト命令である。ライト値は“0x2222”である。
アドレス“0x130”の記憶領域から読み出されたデータ値“0xdddd”は、第3エントリ111に格納済みである。
第3エントリ111の記録フラグ(r)が記録済み値(1)を示すため、履歴記録回路113は、履歴情報121を記録しない。
キャッシュ制御回路112は、第3エントリ111のデータ値欄にライト値“0x2222”を書き込む。そして、キャッシュ制御回路112は、第3エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
In FIG. 14, a sixth access instruction for the first data processing has occurred. The sixth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x130". The light value is "0x2222".
The data value "0xdddd" read from the storage area of the address "0x130" is stored in the third entry 111.
Since the recording flag (r) of the third entry 111 indicates the recorded value (1), the history recording circuit 113 does not record the history information 121.
The cache control circuit 112 writes the write value “0x2222” in the data value column of the third entry 111. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the third entry 111.

図15において、第1データ処理の第7アクセス命令が発生した。第1データ処理の第7アクセス命令は、アドレス“0x130”の記憶領域を対象とするリード命令である。
アドレス“0x130”の記憶領域に対するデータ値“0x2222”が、第3エントリ111に格納されている。
第3エントリ111の記録フラグ(r)が記録済み値(1)を示すため、履歴記録回路113は、履歴情報121を記録しない。
In FIG. 15, a seventh access instruction for the first data processing has occurred. The seventh access instruction of the first data processing is a read instruction targeting the storage area of the address "0x130".
The data value "0x2222" for the storage area of the address "0x130" is stored in the third entry 111.
Since the recording flag (r) of the third entry 111 indicates the recorded value (1), the history recording circuit 113 does not record the history information 121.

図16において、第1データ処理が終了したため、履歴記録回路113は、それぞれのエントリ111の記録フラグ(r)に未記録状態値(0)を設定する。 In FIG. 16, since the first data processing is completed, the history recording circuit 113 sets the recording flag (r) of each entry 111 to the unrecorded state value (0).

図17から図20に基づいて、第2データ処理が実行された場合の履歴記録方法を説明する。
図17において、第2データ処理の第1アクセス命令が発生した。第2データ処理の第1アクセス命令は、アドレス“0x110”の記憶領域を対象とするライト命令である。ライト値は“0x3333”である。
アドレス“0x110”の記憶領域に対するデータ値“0x1111”が、第1エントリ111のデータ値欄に格納されている。
第1エントリ111の記録フラグ(r)が未記録状態値(0)を示すため、履歴記録回路113は、履歴情報121を記録する。具体的には、履歴記録回路113は、第1エントリ111のデータ値欄からデータ値“0x1111”を取得し、取得されたデータ値を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“2”とアドレス“0x110”とが含まれる。そして、履歴記録回路113は、第1エントリ111の記録フラグ(r)に記録済み状態値(1)を設定する。
キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0x3333”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
A history recording method when the second data processing is executed will be described with reference to FIGS. 17 to 20.
In FIG. 17, the first access instruction for the second data processing has occurred. The first access instruction of the second data processing is a write instruction targeting the storage area of the address "0x110". The light value is "0x3333".
The data value "0x1111" for the storage area of the address "0x110" is stored in the data value column of the first entry 111.
Since the recording flag (r) of the first entry 111 indicates the unrecorded state value (0), the history recording circuit 113 records the history information 121. Specifically, the history recording circuit 113 acquires the data value "0x1111" from the data value column of the first entry 111, generates the history information 121 including the acquired data value, and generates the generated history information 121. Record in the history memory 120. The history information 121 further includes a processing identifier "2" and an address "0x110". Then, the history recording circuit 113 sets the recorded state value (1) in the recording flag (r) of the first entry 111.
The cache control circuit 112 writes the write value “0x3333” in the data value column of the first entry 111. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the first entry 111.

図18において、第2データ処理の第2アクセス命令が発生した。第2データ処理の第2アクセス命令は、アドレス“0x210”の記憶領域を対象とするライト命令である。ライト値は“0xeeee”である。
アドレス“0x210”の記憶領域に対応する第1エントリ111には、アドレス“0x110”の記憶領域に対するデータ値“0x3333”が格納されている。
そのため、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、第1エントリ111のデータ値欄に格納されているデータ値“0x3333”をアドレス“0x110”の記憶領域に書き込む。
ライトバックの後、キャッシュ制御回路112(または履歴記録回路113)は、第1エントリ111の記録フラグ(r)に未記録状態値(0)を設定する。
In FIG. 18, the second access instruction for the second data processing has occurred. The second access instruction of the second data processing is a write instruction targeting the storage area of the address "0x210". The light value is "0xeeee".
The data value "0x3333" for the storage area of the address "0x110" is stored in the first entry 111 corresponding to the storage area of the address "0x210".
Therefore, the cache control circuit 112 writes back. That is, the cache control circuit 112 writes the data value “0x3333” stored in the data value column of the first entry 111 to the storage area of the address “0x110”.
After the writeback, the cache control circuit 112 (or the history recording circuit 113) sets the recording flag (r) of the first entry 111 to the unrecorded state value (0).

図19において、ライトバックの後、キャッシュ制御回路112は、アドレス“0x210”の記憶領域からデータ値“0xeeee”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x210”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0xeeee”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x210”の記憶領域から読み込まれたライト前のデータ値“0xeeee”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“2”とアドレス“0x210”とが含まれる。そして、履歴記録回路113は、第1エントリの記録フラグ(r)に記録済み状態値(1)を設定する。
In FIG. 19, after the write-back, the cache control circuit 112 reads the data value “0xeeee” from the storage area of the address “0x210” and stores the read data value in the data value column of the first entry 111. Further, the cache control circuit 112 sets the address "0x210" in the address field of the first entry 111. Then, the cache control circuit 112 sets a valid value (1) in the valid flag (v) of the first entry 111.
Further, the cache control circuit 112 writes the write value “0xeeee” in the data value column of the first entry 111. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the first entry 111.
The history recording circuit 113 generates history information 121 including the data value “0xeeee” before writing read from the storage area of the address “0x210”, and records the generated history information 121 in the history memory 120. The history information 121 further includes a processing identifier "2" and an address "0x210". Then, the history recording circuit 113 sets the recorded state value (1) in the recording flag (r) of the first entry.

図20において、第2データ処理の第3アクセス命令が発生した。第2データ処理の第3アクセス命令は、アドレス“0x110”の記憶領域を対象とするライト命令である。ライト値は“0x4444”である。
アドレス“0x110”の記憶領域に対応する第1エントリ111には、アドレス“0x210”の記憶領域に対するデータ値“0xeeee”が格納されている。
そのため、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、第1エントリ111のデータ値欄に格納されているデータ値“0xeeee”をアドレス“0x210”の記憶領域に書き込む。
ライトバックの後、キャッシュ制御回路112(または履歴記録回路113)は、第1エントリ111の記録フラグ(r)に未記録状態値(0)を設定する。
In FIG. 20, a third access instruction for the second data processing has occurred. The third access instruction of the second data processing is a write instruction targeting the storage area of the address "0x110". The light value is "0x4444".
The first entry 111 corresponding to the storage area of the address "0x110" stores the data value "0xeeee" for the storage area of the address "0x210".
Therefore, the cache control circuit 112 writes back. That is, the cache control circuit 112 writes the data value “0xeeee” stored in the data value column of the first entry 111 to the storage area of the address “0x210”.
After the writeback, the cache control circuit 112 (or the history recording circuit 113) sets the recording flag (r) of the first entry 111 to the unrecorded state value (0).

図21において、ライトバックの後、キャッシュ制御回路112は、アドレス“0x110”の記憶領域からデータ値“0x3333”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x110”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0x3333”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x110”の記憶領域から読み込まれたライト前のデータ値“0x3333”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“2”とアドレス“0x110”とが含まれる。そして、履歴記録回路113は、第1エントリの記録フラグ(r)に記録済み状態値(1)を設定する。
In FIG. 21, after writing back, the cache control circuit 112 reads the data value “0x3333” from the storage area of the address “0x110” and stores the read data value in the data value column of the first entry 111. Further, the cache control circuit 112 sets the address "0x110" in the address field of the first entry 111. Then, the cache control circuit 112 sets a valid value (1) in the valid flag (v) of the first entry 111.
Further, the cache control circuit 112 writes the write value “0x3333” in the data value column of the first entry 111. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the first entry 111.
The history recording circuit 113 generates history information 121 including the data value “0x3333” before writing read from the storage area of the address “0x110”, and records the generated history information 121 in the history memory 120. The history information 121 further includes a processing identifier "2" and an address "0x110". Then, the history recording circuit 113 sets the recorded state value (1) in the recording flag (r) of the first entry.

図22に基づいて、メモリ再現方法を説明する。
ステップS111において、メモリ再現部130は、1つ以上の履歴情報が履歴メモリ120に記録されているか判定する。
A memory reproduction method will be described with reference to FIG.
In step S111, the memory reproduction unit 130 determines whether or not one or more history information is recorded in the history memory 120.

但し、目的のデータ処理が開始されたときのメインメモリ202の状態を再現する場合、メモリ再現部130は、目的のデータ処理以後に実行されたデータ処理の処理識別子を含んだ1つ以上の履歴情報が履歴メモリ120に記録されているか判定する。
この場合について、目的のデータ処理以後に実行されたデータ処理の処理識別子を含んだ1つ以上の履歴情報を単に1つ以上の履歴情報という。
However, when reproducing the state of the main memory 202 when the target data processing is started, the memory reproduction unit 130 has one or more histories including the processing identifiers of the data processing executed after the target data processing. It is determined whether the information is recorded in the history memory 120.
In this case, one or more historical information including the processing identifier of the data processing executed after the target data processing is simply referred to as one or more historical information.

1つ以上の履歴情報が履歴メモリ120に記録されている場合、処理はステップS112に進む。
1つ以上の履歴情報が履歴メモリ120に記録されていない場合、メモリ再現方法の処理は終了する。
If one or more history information is recorded in the history memory 120, the process proceeds to step S112.
If one or more history information is not recorded in the history memory 120, the process of the memory reproduction method ends.

ステップS112において、メモリ再現部130は、1つ以上の履歴情報から、記録順とは逆順に、未選択の履歴情報を1つ選択する。
この逆順は、1つ以上の履歴情報の新しい順に相当する。
In step S112, the memory reproduction unit 130 selects one unselected history information from one or more history information in the reverse order of the recording order.
This reverse order corresponds to the newest order of one or more historical information.

ステップS113において、メモリ再現部130は、選択された履歴情報に対応する記憶領域(対応領域)に、選択された履歴情報に含まれるデータ値を書き込む。
具体的には、対応領域は、メインメモリ202の中の複数の記憶領域のうち、選択された履歴情報に含まれるアドレスで識別される記憶領域である。
In step S113, the memory reproduction unit 130 writes the data value included in the selected history information in the storage area (corresponding area) corresponding to the selected history information.
Specifically, the corresponding area is a storage area identified by an address included in the selected history information among a plurality of storage areas in the main memory 202.

ステップS114において、メモリ再現部130は、ステップS112で選択されていない履歴情報(未選択の履歴情報)が有るか判定する。
未選択の履歴情報が有る場合、処理はステップS112に進む。
未選択の履歴情報が無い場合、メモリ再現方法の処理は終了する。
In step S114, the memory reproduction unit 130 determines whether or not there is history information (unselected history information) that has not been selected in step S112.
If there is unselected history information, the process proceeds to step S112.
If there is no unselected history information, the processing of the memory reproduction method ends.

ステップS112からステップS114により、1つ以上のアクセス命令が発生する前のメインメモリ202の状態が再現される。
例えば、目的のデータ処理が開始されたときのメインメモリ202の状態が再現される。
From step S112 to step S114, the state of the main memory 202 before one or more access instructions are generated is reproduced.
For example, the state of the main memory 202 when the target data processing is started is reproduced.

以下に、メモリ再現方法の具体例を説明する。
履歴メモリ120には、図21に示す6つの履歴情報121が記録されているものとする。
A specific example of the memory reproduction method will be described below.
It is assumed that the six history information 121 shown in FIG. 21 is recorded in the history memory 120.

図23に基づいて、第2データ処理が開始されたときのメインメモリ202の状態を再現するメモリ再現方法を説明する。
メモリ再現部130は、処理識別子“2”を含んだ3つの履歴情報121から各々の履歴情報121を記録順とは逆順に選択し、選択された履歴情報121に対応する記憶領域に選択された履歴情報121に含まれるデータ値を書き込む。
A memory reproduction method for reproducing the state of the main memory 202 when the second data processing is started will be described with reference to FIG. 23.
The memory reproduction unit 130 selects each history information 121 from the three history information 121 including the processing identifier “2” in the reverse order of the recording order, and is selected as the storage area corresponding to the selected history information 121. Write the data value included in the history information 121.

具体的には、メモリ再現部130は以下のように動作する。
まず、メモリ再現部130は、履歴番号“6”の履歴情報121を選択する。履歴番号“6”の履歴情報121に対応する記憶領域は、アドレス“0x110”の記憶領域である。また、履歴番号“6”の履歴情報121に含まれるデータ値は“0x3333”である。そのため、メモリ再現部130は、アドレス“0x110”の記憶領域にデータ値“0x3333”を書き込む。
次に、メモリ再現部130は、履歴番号“5”の履歴情報121を選択する。履歴番号“5”の履歴情報121に対応する記憶領域は、アドレス“0x210”の記憶領域である。また、履歴番号“5”の履歴情報121に含まれるデータ値は“0xeeee”である。そのため、メモリ再現部130は、アドレス“0x210”の記憶領域にデータ値“0xeeee”を書き込む。
そして、メモリ再現部130は、履歴番号“4”の履歴情報121を選択する。履歴番号“5”の履歴情報121に対応する記憶領域は、アドレス“0x210”の記憶領域である。また、履歴番号“5”の履歴情報121に含まれるデータ値は“0xeeee”である。そのため、メモリ再現部130は、アドレス“0x210”の記憶領域にデータ値“0xeeee”を書き込む。
Specifically, the memory reproduction unit 130 operates as follows.
First, the memory reproduction unit 130 selects the history information 121 having the history number “6”. The storage area corresponding to the history information 121 of the history number “6” is the storage area of the address “0x110”. The data value included in the history information 121 of the history number "6" is "0x3333". Therefore, the memory reproduction unit 130 writes the data value “0x3333” in the storage area of the address “0x110”.
Next, the memory reproduction unit 130 selects the history information 121 having the history number “5”. The storage area corresponding to the history information 121 of the history number “5” is the storage area of the address “0x210”. Further, the data value included in the history information 121 of the history number "5" is "0xeeee". Therefore, the memory reproduction unit 130 writes the data value “0xeeee” in the storage area of the address “0x210”.
Then, the memory reproduction unit 130 selects the history information 121 of the history number “4”. The storage area corresponding to the history information 121 of the history number “5” is the storage area of the address “0x210”. Further, the data value included in the history information 121 of the history number "5" is "0xeeee". Therefore, the memory reproduction unit 130 writes the data value “0xeeee” in the storage area of the address “0x210”.

これにより、第2データ処理が開始されたときのメインメモリ202の状態が再現される。 As a result, the state of the main memory 202 when the second data processing is started is reproduced.

図24に基づいて、第1データ処理が開始されたときのメインメモリ202の状態を再現するメモリ再現方法を説明する。
メモリ再現部130は、図23で説明した処理の後に、以下の処理を実行する。
メモリ再現部130は、処理識別子“1”を含んだ3つの履歴情報121から各々の履歴情報121を記録順とは逆順に選択し、選択された履歴情報121に対応する記憶領域に選択された履歴情報121に含まれるデータ値を書き込む。
A memory reproduction method for reproducing the state of the main memory 202 when the first data processing is started will be described with reference to FIG. 24.
The memory reproduction unit 130 executes the following processing after the processing described with reference to FIG. 23.
The memory reproduction unit 130 selects each history information 121 from the three history information 121 including the processing identifier "1" in the reverse order of the recording order, and is selected as the storage area corresponding to the selected history information 121. Write the data value included in the history information 121.

具体的には、メモリ再現部130は以下のように動作する。
まず、メモリ再現部130は、履歴番号“3”の履歴情報121を選択する。履歴番号“3”の履歴情報121に対応する記憶領域は、アドレス“0x130”の記憶領域である。また、履歴番号“3”の履歴情報121に含まれるデータ値は“0xdddd”である。そのため、メモリ再現部130は、アドレス“0x130”の記憶領域にデータ値“0xdddd”を書き込む。
次に、メモリ再現部130は、履歴番号“2”の履歴情報121を選択する。履歴番号“2”の履歴情報121に対応する記憶領域は、アドレス“0x120”の記憶領域である。また、履歴番号“2”の履歴情報121に含まれるデータ値は“0xcccc”である。そのため、メモリ再現部130は、アドレス“0x120”の記憶領域にデータ値“0xcccc”を書き込む。
そして、メモリ再現部130は、履歴番号“1”の履歴情報121を選択する。履歴番号“1”の履歴情報121に対応する記憶領域は、アドレス“0x110”の記憶領域である。また、履歴番号“1”の履歴情報121に含まれるデータ値は“0xbbbb”である。そのため、メモリ再現部130は、アドレス“0x110”の記憶領域にデータ値“0xbbbb”を書き込む。
Specifically, the memory reproduction unit 130 operates as follows.
First, the memory reproduction unit 130 selects the history information 121 having the history number “3”. The storage area corresponding to the history information 121 of the history number “3” is the storage area of the address “0x130”. Further, the data value included in the history information 121 of the history number "3" is "0xdddd". Therefore, the memory reproduction unit 130 writes the data value “0xdddd” in the storage area of the address “0x130”.
Next, the memory reproduction unit 130 selects the history information 121 having the history number “2”. The storage area corresponding to the history information 121 of the history number “2” is the storage area of the address “0x120”. The data value included in the history information 121 of the history number "2" is "0xcccc". Therefore, the memory reproduction unit 130 writes the data value “0xcccc” in the storage area of the address “0x120”.
Then, the memory reproduction unit 130 selects the history information 121 having the history number “1”. The storage area corresponding to the history information 121 of the history number “1” is the storage area of the address “0x110”. Further, the data value included in the history information 121 of the history number "1" is "0xbbbb". Therefore, the memory reproduction unit 130 writes the data value “0xbbbb” in the storage area of the address “0x110”.

これにより、第1データ処理が開始されたときのメインメモリ202の状態が再現される。 As a result, the state of the main memory 202 when the first data processing is started is reproduced.

***実施の形態1の効果***
メモリ履歴管理システム100は、キャッシュメモリ110の各エントリに記録フラグを有する。履歴フラグは、履歴メモリ120への書き込みの有無を示す。また、メモリ履歴管理システム100は、メインメモリ202の中の最新のデータ値と履歴メモリ120の中の履歴情報とに基づいて、メインメモリ202の中の過去のデータ値を再現するメモリ再現部130を備える。
これにより、メモリ履歴管理システム100は、メインメモリ202の状態を少ないメモリ容量で再現することができる。例えば、周期処理を行うコンピュータシステムにおいて、メモリ履歴管理システム100は、過去の周期のメモリ値を少ないメモリ容量で再現することができる。メモリ値は、メインメモリ202の中のデータ値である。
最新のメモリ値との差分を示す履歴情報に基づいて過去のデータ値が再現されるため、再現に必要なデータ量が少ない。履歴メモリ120に空きが無くなった場合、メモリ履歴管理システム100は、古い順に履歴情報を上書きすることによって、新たな履歴情報の記録を続けることができる。一方、初期値とライト時の差分データとを記録する方式では、履歴メモリに空きが無くなったために古い履歴情報が上書きされてしまうと、過去のデータ値を再現することができない。
キャッシュメモリ110の各エントリが記録フラグを有することにより、同じエントリに対する複数回のライト命令について履歴情報の記録を抑制することができる。具体的には、同じエントリに対する複数回のライト命令が発生しても、履歴情報の記録を1回にすることができる。そのため、履歴情報の記録量が削減される。
メモリ履歴管理システム100において、ライトアロケート方式のキャッシュメモリ110が利用される。そして、キャッシュミス時にメインメモリ202から読み出されるデータ値がライト前のデータ値として利用される。これにより、履歴情報の記録のためにメインメモリ202からライト前のデータ値を取得する必要がなくなる。
メモリ履歴管理システム100において、履歴情報の記録はハードウェア(履歴記録回路113)によって行われる。そのため、ソフトウェア(データ処理)の処理時間に影響を与えずに、履歴情報の記録を行うことができる。
*** Effect of Embodiment 1 ***
The memory history management system 100 has a recording flag in each entry of the cache memory 110. The history flag indicates whether or not the history memory 120 has been written. Further, the memory history management system 100 reproduces the past data values in the main memory 202 based on the latest data values in the main memory 202 and the history information in the history memory 120. To be equipped.
As a result, the memory history management system 100 can reproduce the state of the main memory 202 with a small memory capacity. For example, in a computer system that performs periodic processing, the memory history management system 100 can reproduce a memory value of a past cycle with a small memory capacity. The memory value is a data value in the main memory 202.
Since the past data value is reproduced based on the history information indicating the difference from the latest memory value, the amount of data required for reproduction is small. When the history memory 120 becomes full, the memory history management system 100 can continue recording new history information by overwriting the history information in chronological order. On the other hand, in the method of recording the initial value and the difference data at the time of writing, if the old history information is overwritten because the history memory is full, the past data value cannot be reproduced.
Since each entry in the cache memory 110 has a record flag, it is possible to suppress the recording of history information for a plurality of write instructions for the same entry. Specifically, even if a plurality of write instructions for the same entry occur, the history information can be recorded once. Therefore, the amount of historical information recorded is reduced.
In the memory history management system 100, the write-allocate type cache memory 110 is used. Then, the data value read from the main memory 202 at the time of a cache miss is used as the data value before writing. This eliminates the need to acquire the data value before writing from the main memory 202 for recording the history information.
In the memory history management system 100, the recording of history information is performed by hardware (history recording circuit 113). Therefore, the history information can be recorded without affecting the processing time of the software (data processing).

***他の構成***
データ処理毎にメインメモリ202の再現を行う必要が無い場合、データ処理毎に履歴情報を管理する必要はない。つまり、履歴情報に処理識別子を含める必要はない。
*** Other configurations ***
When it is not necessary to reproduce the main memory 202 for each data processing, it is not necessary to manage the history information for each data processing. That is, it is not necessary to include the processing identifier in the history information.

履歴記録回路113は、記録フラグのクリア(未記録状態値の設定)をデータ処理毎に行わなくてもよい。つまり、履歴記録回路113は、2つ以上のデータ処理が終了する毎に、各エントリの記録フラグをクリアしてもよい。例えば、履歴記録回路113は、2周期毎または4周期毎に、各エントリの記録フラグをクリアしてもよい。この場合、2周期毎または4周期毎にしかメインメモリ202の状態を再現することができない。しかし、記録される履歴情報の数が減るため、履歴メモリ120の容量を削減することが可能である。 The history recording circuit 113 does not have to clear the recording flag (set the unrecorded state value) for each data process. That is, the history recording circuit 113 may clear the recording flag of each entry each time two or more data processes are completed. For example, the history recording circuit 113 may clear the recording flag of each entry every two cycles or every four cycles. In this case, the state of the main memory 202 can be reproduced only every two cycles or every four cycles. However, since the number of recorded history information is reduced, the capacity of the history memory 120 can be reduced.

実施の形態2.
ライト後のメモリ値がライト前のメモリ値と同じである場合に履歴情報を記録しない形態について、主に実施の形態1と異なる点を図25から図29に基づいて説明する。
Embodiment 2.
A mode in which history information is not recorded when the memory value after writing is the same as the memory value before writing will be described mainly different from the first embodiment with reference to FIGS. 25 to 29.

***構成の説明***
メモリ履歴管理システム100の構成は、実施の形態1における構成と同じである(図1から図5を参照)。
*** Explanation of configuration ***
The configuration of the memory history management system 100 is the same as the configuration in the first embodiment (see FIGS. 1 to 5).

***動作の説明***
図25に基づいて、履歴記録方法を説明する。
ステップS201において、履歴記録回路113は、発生したアクセス命令の種類を判定する。
ステップS201は、実施の形態1におけるステップS101と同じである(図6参照)。
発生したアクセス命令がライト命令である場合、処理はステップS202に進む。
発生したアクセス命令がリード命令である場合、処理はステップS206に進む。
*** Explanation of operation ***
The history recording method will be described with reference to FIG. 25.
In step S201, the history recording circuit 113 determines the type of the generated access instruction.
Step S201 is the same as step S101 in the first embodiment (see FIG. 6).
If the generated access instruction is a write instruction, the process proceeds to step S202.
If the generated access instruction is a read instruction, the process proceeds to step S206.

ステップS202において、履歴記録回路113は、対応エントリの記録フラグを参照する。
ステップS202は、実施の形態1におけるステップS102と同じである(図6参照)。
対応エントリの記録フラグが未記録状態値を示す場合、処理はステップS203に進む。
対応エントリの記録フラグが記録済み状態値を示す場合、処理はステップS206に進む。
In step S202, the history recording circuit 113 refers to the recording flag of the corresponding entry.
Step S202 is the same as step S102 in the first embodiment (see FIG. 6).
If the recording flag of the corresponding entry indicates an unrecorded state value, the process proceeds to step S203.
If the recording flag of the corresponding entry indicates a recorded state value, the process proceeds to step S206.

ステップS203において、履歴記録回路113は、発生したライト命令のライト後のデータ値を、発生したライト命令の対象領域からキャッシュメモリ110へ読み込まれたライト前のデータ値と比較する。
ライト後のデータ値がライト前のデータ値と異なる場合、処理はステップS204に進む。
ライト後のデータ値がライト前のデータ値と同じである場合、処理はステップS206に進む。
In step S203, the history recording circuit 113 compares the data value after writing of the generated write instruction with the data value before writing read from the target area of the generated write instruction into the cache memory 110.
If the data value after writing is different from the data value before writing, the process proceeds to step S204.
If the data value after writing is the same as the data value before writing, the process proceeds to step S206.

ステップS204において、履歴記録回路113は、ライト前のデータ値を含んだ履歴情報を履歴メモリ120に記録する。
ステップS204は、実施の形態1におけるステップS103と同じである(図6参照)。
In step S204, the history recording circuit 113 records the history information including the data value before writing in the history memory 120.
Step S204 is the same as step S103 in the first embodiment (see FIG. 6).

ステップS205において、履歴記録回路113は、対応エントリの記録フラグに記録済み状態値を設定する。
ステップS205は、実施の形態1におけるステップS104と同じである(図6参照)。
In step S205, the history recording circuit 113 sets the recorded state value in the recording flag of the corresponding entry.
Step S205 is the same as step S104 in the first embodiment (see FIG. 6).

ステップS206において、履歴記録回路113は、対象処理が終了したか判定する。
対象処理が終了した場合、履歴記録回路113は、それぞれのエントリ111の記録フラグに未記録状態値を設定する。
ステップS206は、実施の形態1におけるステップS105およびステップS106と同じである(図6参照)。
In step S206, the history recording circuit 113 determines whether or not the target process has been completed.
When the target processing is completed, the history recording circuit 113 sets an unrecorded state value in the recording flag of each entry 111.
Step S206 is the same as step S105 and step S106 in the first embodiment (see FIG. 6).

以下に、履歴記録方法の具体例を説明する。
まず、第1データ処理が実行され、その後、第2データ処理が実行されるものとする。
第1データ処理において、実施の形態1と同じく、7つのアクセス命令が発生する(図7参照)。
第2データ処理において、実施の形態1と同じく、3つのアクセス命令が発生する(図8参照)。
A specific example of the history recording method will be described below.
First, it is assumed that the first data processing is executed, and then the second data processing is executed.
In the first data processing, as in the first embodiment, seven access instructions are generated (see FIG. 7).
In the second data processing, as in the first embodiment, three access instructions are generated (see FIG. 8).

第1データ処理の第1アクセス命令から第1データ処理の第3アクセス命令までの3つのアクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図9から図11を参照)。 The processing when three access instructions from the first access instruction of the first data processing to the third access instruction of the first data processing are generated is as described in the first embodiment (FIGS. 9 to 11). reference).

図26において、第1データ処理の第4アクセス命令が発生した。第1データ処理の第4アクセス命令は、アドレス“0x120”の記憶領域を対象とするライト命令である。ライト後のデータ値は“0xcccc”である。
アドレス“0x120”の記憶領域から読み出されたライト前のデータ値“0xcccc”は、第2エントリ111に格納済みである。
ライト後のデータ値“0xcccc”は、ライト前のデータ値“0xcccc”と同じである。
そのため、履歴記録回路113は、履歴情報121を記録しない。また、履歴記録回路113は、第2エントリ111の記録フラグ(r)に記録済み状態値(1)を設定しない。
In FIG. 26, a fourth access instruction for the first data processing has occurred. The fourth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x120". The data value after writing is "0xcccc".
The data value “0xcccc” before writing read from the storage area of the address “0x120” is stored in the second entry 111.
The data value "0xcccc" after writing is the same as the data value "0xcccc" before writing.
Therefore, the history recording circuit 113 does not record the history information 121. Further, the history recording circuit 113 does not set the recorded state value (1) in the recording flag (r) of the second entry 111.

第1データ処理の第5アクセス命令から第1データ処理の第7アクセス命令までの3つのアクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図13から図15を参照)。 The processing when three access instructions from the fifth access instruction of the first data processing to the seventh access instruction of the first data processing are generated is as described in the first embodiment (FIGS. 13 to 15). reference).

第2データ処理の第1アクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図17参照)。 The processing when the first access instruction of the second data processing is generated is as described in the first embodiment (see FIG. 17).

図27において、第2データ処理の第2アクセス命令が発生した。第2データ処理の第2アクセス命令は、アドレス“0x210”の記憶領域を対象とするライト命令である。ライト後のデータ値は“0xeeee”である。
アドレス“0x210”の記憶領域に対応する第1エントリ111には、アドレス“0x110”の記憶領域に対するデータ値“0x3333”が格納されている。
そのため、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、第1エントリ111のデータ値欄に格納されているデータ値“0x3333”をアドレス“0x110”の記憶領域に書き込む。
ライトバックの後、キャッシュ制御回路112(または履歴記録回路113)は、第1エントリ111の記録フラグ(r)に未記録状態値(0)を設定する。
図27における処理は、実施の形態1の図18における処理と同じである。
In FIG. 27, the second access instruction for the second data processing has occurred. The second access instruction of the second data processing is a write instruction targeting the storage area of the address "0x210". The data value after writing is "0xeeee".
The data value "0x3333" for the storage area of the address "0x110" is stored in the first entry 111 corresponding to the storage area of the address "0x210".
Therefore, the cache control circuit 112 writes back. That is, the cache control circuit 112 writes the data value “0x3333” stored in the data value column of the first entry 111 to the storage area of the address “0x110”.
After the writeback, the cache control circuit 112 (or the history recording circuit 113) sets the recording flag (r) of the first entry 111 to the unrecorded state value (0).
The process in FIG. 27 is the same as the process in FIG. 18 of the first embodiment.

図28において、ライトバックの後、キャッシュ制御回路112は、アドレス“0x210”の記憶領域からデータ値“0xeeee”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x210”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0xeeee”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
ライト後のデータ値“0xeeee”は、ライト前のデータ値“0xeeee”と同じである。
そのため、履歴記録回路113は、履歴情報121を記録しない。また、履歴記録回路113は、第1エントリ111の記録フラグ(r)に記録済み状態値(1)を設定しない。
In FIG. 28, after writing back, the cache control circuit 112 reads the data value “0xeeee” from the storage area of the address “0x210” and stores the read data value in the data value column of the first entry 111. Further, the cache control circuit 112 sets the address "0x210" in the address field of the first entry 111. Then, the cache control circuit 112 sets a valid value (1) in the valid flag (v) of the first entry 111.
Further, the cache control circuit 112 writes the write value “0xeeee” in the data value column of the first entry 111. Then, the cache control circuit 112 sets the write state value (1) in the dirty flag (d) of the first entry 111.
The data value "0xeeee" after writing is the same as the data value "0xeeee" before writing.
Therefore, the history recording circuit 113 does not record the history information 121. Further, the history recording circuit 113 does not set the recorded state value (1) in the recording flag (r) of the first entry 111.

第2データ処理の第3アクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図20および図21を参照)。 The processing when the third access instruction of the second data processing is generated is as described in the first embodiment (see FIGS. 20 and 21).

図29に基づいて、第1データ処理と第2データ処理とが終了したときの履歴メモリ120を説明する。
履歴メモリ120には、4つの履歴情報121が記録されている。一方、実施の形態1では、6つの履歴情報121が記録された(図21参照)。
第1履歴情報121は、実施の形態1における第1履歴情報121に対応する。
第2履歴情報121は、実施の形態1における第3履歴情報121に対応する。
第3履歴情報121は、実施の形態1における第4履歴情報121に対応する。
第4履歴情報121は、実施の形態1における第6履歴情報121に対応する。
実施の形態1における第2履歴情報121と実施の形態1における第5履歴情報121とのそれぞれに対応する履歴情報121は、図29の履歴メモリ120に記録されていない。
The history memory 120 when the first data processing and the second data processing are completed will be described with reference to FIG. 29.
Four history information 121 are recorded in the history memory 120. On the other hand, in the first embodiment, six history information 121s were recorded (see FIG. 21).
The first history information 121 corresponds to the first history information 121 in the first embodiment.
The second history information 121 corresponds to the third history information 121 in the first embodiment.
The third history information 121 corresponds to the fourth history information 121 in the first embodiment.
The fourth history information 121 corresponds to the sixth history information 121 in the first embodiment.
The history information 121 corresponding to each of the second history information 121 in the first embodiment and the fifth history information 121 in the first embodiment is not recorded in the history memory 120 of FIG. 29.

***実施の形態2の効果***
データ値が変化しない場合に履歴情報が記録されないため、履歴メモリ120の容量を削減することができる。メインメモリ202の一部が履歴メモリ120として利用される場合、履歴メモリ120への書き込み回数が削減されることにより、メインメモリ202における帯域削減を図ることができる。
*** Effect of Embodiment 2 ***
Since the history information is not recorded when the data value does not change, the capacity of the history memory 120 can be reduced. When a part of the main memory 202 is used as the history memory 120, the number of writes to the history memory 120 is reduced, so that the bandwidth of the main memory 202 can be reduced.

***他の構成***
履歴記録回路113の代わりにキャッシュ制御回路112が、ライト後のデータ値をライト前のデータ値と比較してもよい。
ライト後のデータ値がライト前のデータ値と同じである場合、キャッシュ制御回路112は、対応エントリのダーティフラグに書き込み状態値を設定しない。つまり、対応エントリのダーティフラグは不変状態値を示す。履歴記録回路113は、対応エントリのダーティフラグを参照する。対応エントリのダーティフラグが書き込み状態値を示さない場合、つまり、対応エントリのダーティフラグが不変状態値を示す場合、履歴記録回路113は、履歴情報を記録しない。
*** Other configurations ***
Instead of the history recording circuit 113, the cache control circuit 112 may compare the data value after writing with the data value before writing.
When the data value after writing is the same as the data value before writing, the cache control circuit 112 does not set the write state value in the dirty flag of the corresponding entry. That is, the dirty flag of the corresponding entry indicates an immutable state value. The history recording circuit 113 refers to the dirty flag of the corresponding entry. If the dirty flag of the corresponding entry does not indicate a write state value, that is, if the dirty flag of the corresponding entry indicates an immutable state value, the history recording circuit 113 does not record history information.

***実施の形態の補足***
メモリ履歴管理システム100の構成は、図1から図5において説明した構成に限られない。
例えば、キャッシュ制御回路112と履歴記録回路113とのそれぞれは、キャッシュメモリ110の外部に設けられてもよい。
例えば、メモリ再現部130は、コンピュータ200とは別のコンピュータに設けられてもよい。
*** Supplement to the embodiment ***
The configuration of the memory history management system 100 is not limited to the configurations described with reference to FIGS. 1 to 5.
For example, each of the cache control circuit 112 and the history recording circuit 113 may be provided outside the cache memory 110.
For example, the memory reproduction unit 130 may be provided in a computer other than the computer 200.

図30に基づいて、メモリ再現部130がメモリ再現装置220に設けられる例を説明する。
メモリ再現装置220は、コンピュータ200とは別に設けられたコンピュータであり、プロセッサ221およびメインメモリ222などのハードウェアを備える。また、メモリ再現装置220は、メモリ再現部223というソフトウェア要素を備える。
メインメモリ222にはメモリ再現プログラムが記憶され、プロセッサ221がメモリ再現プログラムを実行する。
メモリ再現プログラムは、メモリ再現部223としてコンピュータを機能させるためのプログラムである。
但し、メモリ再現部223は、専用回路のようなハードウェアによって実現されてもよい。
An example in which the memory reproduction unit 130 is provided in the memory reproduction device 220 will be described with reference to FIG.
The memory reproduction device 220 is a computer provided separately from the computer 200, and includes hardware such as a processor 221 and a main memory 222. Further, the memory reproduction device 220 includes a software element called a memory reproduction unit 223.
A memory reproduction program is stored in the main memory 222, and the processor 221 executes the memory reproduction program.
The memory reproduction program is a program for operating a computer as a memory reproduction unit 223.
However, the memory reproduction unit 223 may be realized by hardware such as a dedicated circuit.

実施の形態は、好ましい形態の例示であり、本発明の技術的範囲を制限することを意図するものではない。実施の形態は、部分的に実施してもよいし、他の形態と組み合わせて実施してもよい。フローチャート等を用いて説明した手順は、適宜に変更してもよい。 The embodiments are examples of preferred embodiments and are not intended to limit the technical scope of the invention. The embodiment may be partially implemented or may be implemented in combination with other embodiments. The procedure described using the flowchart or the like may be appropriately changed.

100 メモリ履歴管理システム、110 キャッシュメモリ、111 エントリ、112 キャッシュ制御回路、113 履歴記録回路、120 履歴メモリ、121 履歴情報、130 メモリ再現部、200 コンピュータ、201 プロセッサ、202 メインメモリ、211 アクセス命令リスト、212 アクセス命令リスト、220 メモリ再現装置、221 プロセッサ、222 メインメモリ、223 メモリ再現部。 100 memory history management system, 110 cache memory, 111 entries, 112 cache control circuit, 113 history recording circuit, 120 history memory, 121 history information, 130 memory reproduction unit, 200 computers, 201 processor, 202 main memory, 211 access instruction list , 212 access instruction list, 220 memory reproduction device, 221 processor, 222 main memory, 223 memory reproduction unit.

Claims (7)

1つ以上のアクセス命令が発生する前のメインメモリの状態を再現するために、キャッシュミス時に前記メインメモリからキャッシュメモリへ読み込まれるデータ値を利用することによって、1つ以上の履歴情報を管理するメモリ履歴管理システムであって、
前記キャッシュメモリは、前記メインメモリの中の複数の記憶領域に対応する複数のエントリを有し、
それぞれのエントリは、記録フラグを有し、
前記メモリ履歴管理システムは、
前記1つ以上の履歴情報が記録される履歴メモリと、
ライト命令が発生したときに、発生したライト命令の対象となる記憶領域である対象領域に対応するエントリの記録フラグを参照し、参照された記録フラグが、履歴情報の未記録を意味する未記録状態値を示す場合に、前記対象領域から前記キャッシュメモリへ読み込まれたデータ値を含む履歴情報を前記履歴メモリに記録し、且つ、参照された記録フラグに、履歴情報の記録済みを意味する記録済み状態値を設定する履歴記録回路と、を備える
メモリ履歴管理システム。
One or more history information is managed by using the data value read from the main memory to the cache memory at the time of a cache miss in order to reproduce the state of the main memory before the occurrence of one or more access instructions. It is a memory history management system
The cache memory has a plurality of entries corresponding to a plurality of storage areas in the main memory.
Each entry has a record flag
The memory history management system
A history memory in which one or more of the history information is recorded, and
When a write instruction is generated, the record flag of the entry corresponding to the target area that is the target storage area of the generated write instruction is referred to, and the referenced record flag is unrecorded, which means that the history information has not been recorded. When indicating a state value, history information including a data value read from the target area to the cache memory is recorded in the history memory, and a record indicating that the history information has been recorded is recorded in the referenced recording flag. A memory history management system equipped with a history recording circuit for setting completed state values.
前記履歴メモリに記録された1つ以上の履歴情報から各々の履歴情報を記録順とは逆順に選択し、選択された履歴情報に対応する記憶領域に選択された履歴情報に含まれるデータ値を書き込むことによって、前記1つ以上のアクセス命令が発生する前の前記メインメモリの状態を再現するメモリ再現部を備える
請求項1に記載のメモリ履歴管理システム。
Each history information is selected from one or more history information recorded in the history memory in the reverse order of the recording order, and the data value included in the history information selected in the storage area corresponding to the selected history information is selected. The memory history management system according to claim 1, further comprising a memory reproduction unit that reproduces the state of the main memory before the one or more access instructions are generated by writing.
前記履歴記録回路は、
順番に実行される複数のデータ処理のそれぞれの実行中にライト命令が発生したときに、実行中のデータ処理を識別する処理識別子をさらに含む履歴情報を前記履歴メモリに記録し、
前記複数のデータ処理のそれぞれの終了時に、それぞれのエントリの記録フラグを前記未記録状態値に更新する
請求項1に記載のメモリ履歴管理システム。
The history recording circuit
When a write instruction is generated during each execution of a plurality of data processes to be executed in order, history information including a process identifier that further identifies the data process being executed is recorded in the history memory.
The memory history management system according to claim 1, wherein the recording flag of each entry is updated to the unrecorded state value at the end of each of the plurality of data processes.
目的のデータ処理以後に実行されたデータ処理の処理識別子を含んだ1つ以上の履歴情報から各々の履歴情報を記録順とは逆順に選択し、選択された履歴情報に対応する記憶領域に選択された履歴情報に含まれるデータ値を書き込むことによって、前記目的のデータ処理が開始されたときの前記メインメモリの状態を再現するメモリ再現部を備える
請求項3に記載のメモリ履歴管理システム。
Select each history information from one or more history information including the processing identifier of the data processing executed after the target data processing in the reverse order of the recording order, and select it as the storage area corresponding to the selected history information. The memory history management system according to claim 3, further comprising a memory reproduction unit that reproduces the state of the main memory when the target data processing is started by writing a data value included in the history information.
前記履歴記録回路は、ライト命令が発生したときに、対象領域に対応する対応エントリの記録フラグを参照し、参照された記録フラグが前記未記録状態値を示す場合に、発生したライト命令のライト後のデータ値を、前記対象領域から前記キャッシュメモリへ読み込まれたライト前のデータ値と比較し、前記ライト後のデータ値が前記ライト前のデータ値と異なる場合に、前記ライト前のデータ値を含む履歴情報を前記履歴メモリに記録し、且つ、参照された記録フラグに前記記録済み状態値を設定する
請求項1から請求項4のいずれか1項に記載のメモリ履歴管理システム。
The history recording circuit refers to the recording flag of the corresponding entry corresponding to the target area when the write instruction is generated, and when the referenced recording flag indicates the unrecorded state value, the write of the generated write instruction is written. The later data value is compared with the data value before writing read from the target area into the cache memory, and when the data value after writing is different from the data value before writing, the data value before writing is described. The memory history management system according to any one of claims 1 to 4, wherein history information including the above is recorded in the history memory, and the recorded state value is set in the referenced recording flag.
前記キャッシュメモリは、ライトアロケート方式のキャッシュメモリであり、
前記履歴記録回路は、ライトミス時に前記対象領域から前記キャッシュメモリへ読み込まれたデータ値を含む履歴情報を前記履歴メモリに記録する
請求項1から請求項5のいずれか1項に記載のメモリ履歴管理システム。
The cache memory is a write-allocate type cache memory.
The memory history according to any one of claims 1 to 5, wherein the history recording circuit records history information including data values read from the target area into the cache memory at the time of a write error in the history memory. Management system.
前記メモリ履歴管理システムは、前記キャッシュメモリを備え、
前記キャッシュメモリが、前記履歴記録回路を備える
請求項1から請求項6のいずれか1項に記載のメモリ履歴管理システム。
The memory history management system includes the cache memory.
The memory history management system according to any one of claims 1 to 6, wherein the cache memory includes the history recording circuit.
JP2020549909A 2018-10-11 2018-10-11 Memory history management system Expired - Fee Related JP6818962B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/037979 WO2020075276A1 (en) 2018-10-11 2018-10-11 Memory history management system

Publications (2)

Publication Number Publication Date
JP6818962B2 true JP6818962B2 (en) 2021-01-27
JPWO2020075276A1 JPWO2020075276A1 (en) 2021-02-18

Family

ID=70164048

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020549909A Expired - Fee Related JP6818962B2 (en) 2018-10-11 2018-10-11 Memory history management system

Country Status (3)

Country Link
JP (1) JP6818962B2 (en)
TW (1) TW202014899A (en)
WO (1) WO2020075276A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118964232B (en) * 2024-10-16 2024-12-31 上海芯力基半导体有限公司 Data access method and processor

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3083786B2 (en) * 1996-09-30 2000-09-04 株式会社東芝 Memory update history storage device and memory update history storage method
JP2000181790A (en) * 1998-12-18 2000-06-30 Toshiba Corp Memory update history storage device

Also Published As

Publication number Publication date
JPWO2020075276A1 (en) 2021-02-18
WO2020075276A1 (en) 2020-04-16
TW202014899A (en) 2020-04-16

Similar Documents

Publication Publication Date Title
JP4688584B2 (en) Storage device
EP2329361B1 (en) Aggregation of write traffic to a data store
US20040010663A1 (en) Method for conducting checkpointing within a writeback cache
US8914579B2 (en) Access device, information recording device, controller, and information recording system
TWI406127B (en) How to update user data
KR100370893B1 (en) Flash memory unit and control method of flash memory
CN109902034B (en) Snapshot creating method and device, electronic equipment and machine-readable storage medium
JP2013222435A (en) Semiconductor storage device and method of controlling the same
US20210263862A1 (en) Maintaining ghost cache statistics for demoted data elements
US20100205391A1 (en) Memory system and managing method therefor
JP2010152747A (en) Storage system, cache control method and cache control program for storage
JP5286796B2 (en) Memory control device
CN104137100A (en) Database device, program, and data processing method
JP2009020696A (en) Information processing apparatus and system
JP6818962B2 (en) Memory history management system
US10430287B2 (en) Computer
CN112015159B (en) Fault record storage method based on dual-core MCU and computer system
CN115048457B (en) Method, device and storage medium for processing state data based on block chain
JP2008047155A (en) Batch erasable nonvolatile memory and mobile phone
JP2009020695A (en) Information processing apparatus and system
JP2006099802A (en) Storage controller and cache memory control method
JPH08137748A (en) Computer having copyback cache and copyback cache control method
JP7572520B1 (en) STORAGE APPARATUS, STORAGE CONTROL METHOD, AND PROGRAM
JPH0784886A (en) Cache memory control method and cache memory control device
TW201418984A (en) Method for protecting data integrity of disk and computer program product for implementing the method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201105

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20201105

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20201124

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201228

R150 Certificate of patent or registration of utility model

Ref document number: 6818962

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees