[go: up one dir, main page]

WO2007096981A1 - 記録制御装置および記録制御方法 - Google Patents

記録制御装置および記録制御方法 Download PDF

Info

Publication number
WO2007096981A1
WO2007096981A1 PCT/JP2006/303440 JP2006303440W WO2007096981A1 WO 2007096981 A1 WO2007096981 A1 WO 2007096981A1 JP 2006303440 W JP2006303440 W JP 2006303440W WO 2007096981 A1 WO2007096981 A1 WO 2007096981A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
recording
cache
recorded
new registration
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.)
Ceased
Application number
PCT/JP2006/303440
Other languages
English (en)
French (fr)
Inventor
Hiroyuki Kojima
Masaki Ukai
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 JP2008501538A priority Critical patent/JP4335299B2/ja
Priority to PCT/JP2006/303440 priority patent/WO2007096981A1/ja
Publication of WO2007096981A1 publication Critical patent/WO2007096981A1/ja
Priority to US12/222,377 priority patent/US7958308B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • 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/0804Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
    • 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/0897Caches characterised by their organisation or structure with two or more cache hierarchy levels

Definitions

  • the present invention relates to a recording control apparatus and a recording control method for performing data recording control on a first cache and a second cache provided in a processor.
  • processors have increased the processing speed for memory access by installing a cache therein and recording the data recorded in the memory in the cache (for example, Patent Document 1). reference).
  • a description will be given of a conventional processor configuration.
  • FIG. 8 is a functional block diagram showing a configuration of a conventional processor.
  • the processor 10 includes processor cores 20, 30, an SC (System Controller) 40, and a main memory 50.
  • the power indicating only the processor cores 20, 30 has a plurality of processor cores (a plurality of processor cores are connected to the SC 40!).
  • the SC 40 is a device that mainly acquires data recorded in the main memory 50 in response to a data request from the processor cores 20 and 30, and passes the acquired data to the processor cores 20 and 30.
  • the main memory 50 is a recording device that records data used by the processor cores 20 and 30 (instructions and data to be calculated).
  • the processor cores 20 and 30 are devices that acquire data recorded in the main memory 50 and execute predetermined processing. Since the constituent elements of the processor cores 20 and 30 are the same, here, the processor core 20 will be described with reference to the processor unit 20 (instruction control unit Z arithmetic unit) 25a, the primary cache 25b, And a secondary cache 25c.
  • the control unit 25a acquires the data recorded in the main memory 50 via the secondary cache 25c and the primary cache 25b, interprets the instruction, and performs predetermined processing (such as arithmetic processing corresponding to the instruction). ).
  • FIG. 9 shows the conventional secondary key.
  • 3 is a functional block diagram showing a configuration of a cache 25c.
  • this secondary cache 25c includes Ml port 60, arbitration circuits 61 and 62, pipeline 63, cache tag 64, move-in buffer 65, MO port 66, and MO.
  • a data buffer unit 67 and a cache data unit 68 are provided.
  • the Ml port 60 records the data corresponding to the data request from the control unit 25a (the primary cache 25b shown in FIG. 8 If not, the data request from the primary cache 25b (hereinafter referred to as Ml request) is accepted and this Ml request is output to the pipeline 63 via the arbitration circuit 61.
  • the pipeline 63 determines whether or not the data force corresponding to the Ml request exists in the secondary cache 25c based on the cache tag unit 64, and corresponds to the Ml request. If data exists, the corresponding data is retrieved from the cache data part 68 and output to the primary cache 25b.
  • the move-in buffer 65 requests data corresponding to the Ml request from the SC 40 (outputs an SC request to the SC 40).
  • Ml data data corresponding to the SC request
  • the move-in buffer 65 writes the Ml data to the Ml data buffer 65a at the same time and transfers the Ml data to the primary cache 25b as it is. To do.
  • the move-in buffer 65 starts a new registration process, and stores the Ml data recorded in the Ml data buffer 65a in the cache data unit 68. sign up.
  • the primary cache 25b that has acquired the Ml data after passing the Ml data to the control unit 25a, stores the calculation result by the control unit 25a. May hold data. If the primary cache 25b is replaced in this state, a write-back to the secondary cache 25c occurs.
  • a write-back request (hereinafter referred to as an MO request) from the primary cache 25b is acquired by the MO port 66.
  • the MO port 66 receives a write-back processing request (write-back request; WRBK) as an arbitration circuit 61. Is output to pipeline 63 via.
  • the data to be written back , MO data is registered in the MO data buffer 67.
  • the pipeline 63 When the pipeline 63 receives a write-back processing request, the pipeline 63 registers the MO data recorded in the MO data buffer 67 in the cache data unit 68 via the arbitration circuit 62, thereby enabling the cache data unit The latest data (MO data) will be registered in 68.
  • Patent Document 1 Japanese Patent Application Laid-Open No. 11 134257
  • FIG. 10 is an explanatory diagram for explaining a problem related to the prior art.
  • the move-in buffer 65 acquires Ml data from the SC 40 and registers MI data in the Ml data buffer 65a. At the same time, this Ml data is transferred to the primary cache 25b.
  • the move-in buffer 65 may delay the new registration process for registering the Ml data in the cache data unit 68 due to some reason (for example, when there are a plurality of data to be processed in addition to the Ml data). .
  • the present invention has been made in view of the above, and even when the new registration process is delayed, the primary cache power can efficiently prevent the latest data to be written back from being lost.
  • the present invention provides a first processor provided in a processor.
  • a recording control device that performs recording control of data to the first cache and the second cache, and when the first data recorded in the first cache is written back to the second cache, Determining means for determining whether or not the second data, which is the data before the update of the first data, has already been recorded at the recording position of the second cache where the data of 1 is written back; When the determination means determines that the second data is recorded at the recording position and is a bad defect, the second data is prevented from being recorded at the recording position, and the first data And recording control means for recording the data at the recording position.
  • the present invention is a recording control method for performing recording control of data to a first cache and a second cache provided in a processor, wherein the first data recorded in the first cache When the first data is written back to the second cache, the second data, which is the data before the update of the first data, is already recorded at the recording position of the second cache where the first data is written back. The second data is recorded in the recording position, and the second data is recorded in the recording position when it is determined that the second data is recorded in the recording position. And a recording control step of suppressing the recording at the position and recording the first data at the recording position.
  • the first data recorded in the first cache is written back to the second cache
  • the first data is written back to the recording position of the second cache. If it is determined whether or not the second data, which is the data before the update of the data of 1, has already been recorded, and it is determined that the second data is not recorded at the recording position, the second data Is recorded at the recording position and the first data is recorded at the recording position, so the first data force that is the latest data is overwritten by the second data that is the old data. Can be eliminated.
  • FIG. 1 is an explanatory diagram for explaining the features of the present invention.
  • FIG. 2 is an explanatory diagram for explaining the processing of the present invention when a passing case occurs.
  • FIG. 3 is a functional block diagram showing a configuration of a processor according to the present invention.
  • FIG. 4 is a functional block diagram of the configuration of the secondary cache according to the second embodiment.
  • FIG. 5 is a functional block diagram showing a configuration of a move-in buffer.
  • FIG. 6 is an explanatory diagram for explaining the information held in the control flag.
  • FIG. 7 is a diagram illustrating an example of a circuit for executing the processing described in FIG.
  • FIG. 8 is a functional block diagram showing a configuration of a conventional processor.
  • FIG. 9 is a functional block diagram showing a configuration of a conventional secondary cache.
  • FIG. 10 is an explanatory diagram for explaining a problem related to the prior art.
  • FIG. 11 is an explanatory diagram for explaining the first prior art.
  • FIG. 12 is an explanatory diagram for explaining the second prior art.
  • FIG. 13 is a functional block diagram showing a configuration of a move-in buffer according to the prior art.
  • FIG. 11 is an explanatory diagram for explaining the first prior art.
  • this first prior art when data is written back from the primary cache 25b to the secondary cache 25c, it is recorded in the Ml data buffer 65a !, and the Ml data is overwritten with MO data. To do.
  • the MO data is finally stored in the cache data part. 6 It will be written in 8, which will solve the problem.
  • Figure 12 illustrates the second prior art It is explanatory drawing for.
  • the new registration process is completed so that the write-back process (write back) of the same block is always processed after the new registration process by the move-in buffer 65. Until it is done, the write-back process is retried. Or, for simplicity, the MO data is finally written in the cache data part 68 by retrying the write-back process until the move-in buffer 65 is released.
  • FIG. 13 is a functional block diagram showing the configuration of the move-in buffer 65 that is effective in the prior art.
  • the move-in buffer 65 includes an Ml data buffer 65a, an address comparison circuit 70, and a register 71.
  • the Ml data output from the SC 40 is registered in the Ml data buffer 65a.
  • the Ml data buffer 65a outputs information to that effect to the register 71 when the registration preparation for the cache data part 68 of the Ml data is completed.
  • the register 71 acquires information indicating that the Ml data registration preparation is completed from the Ml data buffer 65a, the register 71 reflects the information in the control flag (for example, the contents of the control flag are changed from "Preparing registration” to "Registration ready”). change).
  • the move-in buffer 65 determines that the new registration process is possible according to the control flag of the register 71, the move-in buffer 65 outputs a request for the new registration process to the pipeline 63.
  • the address comparison unit 70 compares the address of the MO data with the address of the Ml data registered in the request address, and determines whether or not both addresses match. . When both addresses match (that is, when the MO data recording position matches the Ml data recording position), the information indicating that the MO data address matches the Ml data address. (Address match information) is output to pipeline 63.
  • the write-back process is retried until the new registration process is completed. In this case, however, the new registration process is completed or the move-in process is completed. Until the buffer 65 was released, the MO boat 66 resources would be occupied, and there was a problem that subsequent processing could not be executed quickly.
  • FIG. 1 is an explanatory diagram for explaining the features of the present invention.
  • the new registration process for the corresponding block is incomplete.
  • it requests the move-in buffer to cancel the new registration process.
  • the new registration process is not executed by canceling the new registration process, when the old data (Ml data) is written in the cache data part, the two problems can be solved.
  • FIG. 2 is an explanatory diagram for explaining the processing of the present invention when a case of passing has occurred.
  • the present invention when the write-back process is input to the pipeline, the new registration process for the block is completed, and it is detected that the new registration process is canceled. To write the MO data to the cache data part.
  • the new registration process has already been output to the pipeline, but since the cancel request for the new registration process is output to the move-in buffer, the new registration process cannot be retried. In such a case, the latest data (MO data) can be finally written in the cache data part by retrying the write-back process.
  • FIG. 3 is a functional block diagram showing the configuration of the processor 100 according to the present invention.
  • the processor 100 includes processor cores 200 and 300, an SC 40, and a main memory 50. It should be noted that the same components as those shown in FIG.
  • the processor cores 200 and 300 are devices that acquire data recorded in the main memory 50 and execute predetermined processing. Since the constituent elements of the processor cores 200 and 300 are the same, here, the processor core 200 will be described using the processor core 200.
  • the control unit 200a acquires the data recorded in the main memory 50 through the secondary cache 200c and the primary cache 200b, interprets the instruction, and performs predetermined processing (operation processing corresponding to the instruction). Etc.).
  • FIG. 4 is a functional block diagram of the configuration of the secondary cache 200c according to the second embodiment.
  • the secondary cache 200c includes an Ml port 60, arbitration circuits 61 and 62, a noise line 210, a cache tag unit 64, a move-in buffer 220, an MO port 66, and MO data.
  • a buffer unit 67 and a cache data unit 68 are provided.
  • the same components as those described in FIG. 9 are denoted by the same reference numerals and description thereof is omitted.
  • the pipeline 210 mainly acquires an Ml request, a write-back processing request (write knock request), a new registration processing request, and the like, and processes corresponding to the acquired request in parallel. It is a device that executes. Hereinafter, the processing of the pipeline 210 will be described in order.
  • the pipeline 210 determines whether the data corresponding to the Ml request exists in the secondary cache 200c based on the cache tag unit 64, and corresponds to the Ml request. If data exists, the corresponding data is retrieved from the cache data unit 68 and output to the primary cache 200b.
  • the pipeline 210 when the pipeline 210 obtains a write-back process request, the pipeline 210 cooperates with the move-in buffer 220 to determine whether or not to retry the MO data write-back process. Based on the process. Then, when retrying the MO data write-back processing, the pipeline 210 causes the MO data recorded in the MO data buffer 67 to be rewritten to the cache data unit 68. That is, pipeline 210 is The MO data recorded in the MO data buffer 67 is repeatedly recorded in the cache data section 68.
  • the move-in buffer 220 is a recording device that records Ml data output from the SC 40.
  • the move-in buffer 220 manages information that is a criterion for determining whether or not to cancel the new registration process or whether or not to retry the MO data write-back process.
  • FIG. 5 is a functional block diagram showing a configuration of move-in buffer 220.
  • the move-in buffer 220 includes an Ml data buffer 220a, an address comparison circuit 221, a register 222, and a retry determination circuit 223.
  • the address comparison circuit 221 when the address comparison circuit 221 acquires pipeline input information including the address information of the MO data to be written back, the address comparison circuit 221 obtains the MO data address and the address of the Ml data held in the register 222. It is a device that determines whether or not both addresses match by comparison. When the address comparison circuit 221 determines that the MO data address and the Ml data address match (when the MO data recording position and the Ml data recording position match), Is output to the register 222 and the retry determination circuit 223.
  • the register 222 includes valid information (VALID), a request address indicating the address of the Ml data, and a control flag indicating whether to retry the write-back process or whether to execute a new registration process.
  • VALID valid information
  • the register 222 executes a process for canceling the new registration process when the address comparison circuit 221 has acquired the address match information.
  • the register 222 manipulates the control flag to forcibly set the completion flag of the new registration process to this control flag. (Separately, a flag indicating that the new registration process is forcibly completed may be provided by canceling the new registration process.)
  • the retry determination circuit 223 registers whether or not it is necessary to retry the write-back process due to the difference between the write-back process and the new registration process. This is a device for determining based on the control flag 222.
  • the retry determination circuit 223 determines that it is necessary to retry the write-back process, it outputs a retry request to the pipeline 210.
  • the retry determination unit 223 determines whether or not to retry the write-back process based on information held in the control flag, but the information held in the control flag changes every moment.
  • FIG. 6 is an explanatory diagram for explaining the information held in the control flag.
  • each stage XPn of write-back processing and new registration processing executed by pipeline 210 (the number of n indicates the number of processing steps) and held in the control flag It shows the relationship with the information to be used.
  • the information held in the control flag is set to one of “new registration process in progress”, “new registration process complete”, “new registration process forced completion” or “retry period”. .
  • the timing at which the address comparison circuit 221 shown in FIG. 5 performs address comparison is assumed to be executed in XP2 of the write-back process.
  • the "new registration process in progress" is controlled until the move-in buffer 220 issues a new registration process request to the pipeline 210 until the new registration process result is returned from the pipeline 210.
  • This information is set in the flag and indicates that a new registration process is being executed.
  • New registration processing complete indicates that the new registration processing is processed by the pipeline 210 and the Ml data is registered in the cache data part 68 and then the control flag is set until the move-in buffer 220 is released. This is information to be set, and is used as a condition for releasing the move-in buffer 220 when the new registration process is completed, while inhibiting the start of the new registration process.
  • Formd completion of new registration process is information set in the control flag in order to cancel the unprocessed new registration information in the same block by the write back process according to the present invention.
  • Move-in buffer 2 after canceling new registration process Enabled until 20 is released.
  • the cancellation of the new registration process by the write-back process occurs when the register 222 acquires the address match information from the address comparison circuit 221 (at the time of XP2 in the write-back process).
  • the control flag is set until the move-in buffer 220 is released from XP3 in the write-back process. When this new registration process forced completion information is set in the control flag, the subsequent new registration process is canceled.
  • the "retry period” is from when preparation for registering Ml data to the cache data unit 68 is completed by the Ml data buffer 220a shown in FIG. 5 until a request for new registration processing is issued to the pipeline 210. This is information set in the control flag. During the period when the “retry period” is set in the control flag, the pipeline 210 retries the write-back process.
  • (1) to (4) shown in FIG. 6 show the operation when a new registration processing request is output to the pipeline 210 before and after the write-back processing. This is expressed by the timing when the request is output to the pipeline 210.
  • the register 222 changes the information set in the control flag from the “retry period” to “new”. Change to “Registration process in progress”.
  • FIG. 7 is a diagram illustrating an example of a circuit for executing the processing described in FIG. This circuit is assumed to be incorporated in the register 222 shown in FIG. 5, for example. As shown in FIG. 7, this circuit includes set / reset circuits 230 to 233, OR circuits 240 to 242 and AND circuits 250 to 252.
  • the set Z reset circuit 230 outputs “High” when the preparation for registering Ml data in the Ml data buffer 220a is completed, and outputs “Low” when “High” is input from the OR circuit 241. It is a device that outputs.
  • the set Z reset circuit 231 outputs “High” when a request for new registration processing is output to the pipeline 210, and when the new registration processing shifts to XP5 shown in FIG. It is a device that outputs “Low”. During the period when “High” is output from the set Z reset circuit 231, “in process of new registration processing” is set in the control flag held in the register 222.
  • the set Z reset circuit 232 outputs “High” when the new registration process is completed (when the new registration process has shifted to XP5 shown in FIG. 6), and the move-in buffer 220 is released. It is a device that outputs “Low” when During the period when “High” is output from the set Z reset circuit 232, “completion of new registration processing” is set in the control flag held in the register 222.
  • the set Z reset circuit 233 outputs “High” when the address match information is output from the address comparison circuit 221 (the timing of XP2 in the write-back process shown in FIG. 6), and the move-in buffer 220 This is a device that outputs “Low” when is opened. During the period when “High” is output from the set Z reset circuit 233, “forcibly completed new registration processing” is set in the control flag held in the register 222.
  • the OR circuit 240 outputs “High” when the output from the set Z reset circuit 231 or the set Z reset circuit 232 becomes “High”, and the set Z reset circuit 231 and the set Z reset circuit This is a device that outputs “Low” when both outputs from “232” are “Low”.
  • the OR circuit 241 outputs “High” when the output from the set Z reset circuit 232 or the set Z reset circuit 233 becomes “High”, and the set Z reset circuit 232 and the set Z reset circuit This is a device that outputs “Low” when both output from the 233 are “Low”.
  • the OR circuit 242 outputs “High” when the output of any one of the set Z reset circuit 231, the set / reset circuit 232, or the set reset circuit 233 becomes “High”. This is a device that outputs “Low” when all outputs of Z reset circuit 231, set Z reset circuit 232 and set reset circuit 233 are “Low”. Note that the new registration process is suppressed during the period when the OR circuit 242 also outputs “High”.
  • the AND circuit 250 outputs “High” when the output from the set Z reset circuit 230 becomes “High” and the output from the OR circuit 240 becomes “Low”. In this case, it is a device that outputs “Low”. During the period when “High” is output from the AND circuit 250, the “retry period” is set in the control flag held in the register 222.
  • the AND circuit 251 outputs “High” from the AND circuit 250 and when the address match information is output from the address comparison circuit 221 (the timing of XP2 in the write-back process shown in FIG. 6). It is a device that outputs “High” and the other devices output “Low”. AND When “High” is output from the circuit 251, the move-in buffer 220 outputs a retry request to the pipeline 210.
  • the AND circuit 252 outputs "High” when the output from the set Z reset circuit 230 is “High” and the output from the OR circuit 242 is “Low”, otherwise, This circuit outputs “Low”. When “High” is output from the AND circuit 252, a request for new registration processing is output to the pipeline 210.
  • the MO data When the new registration process of Ml data for the recording position is completed, it is determined whether or not it is based on the information set in the control flag. If the new registration process is not completed, the new registration process is performed. Cancels and suppresses requests for new registration processing from being output to the pipeline 210, so the latest data (MO data) registered in the cache data section 68 is overwritten by old data (Ml data) and lost. Can be solved.
  • the pipeline 210 executes the write-back process many times, and the cache data unit Since the MO data is written to 68 many times, the latest data (MO data) will eventually be recorded in the cache data section 68 even if the new registration process is delayed. Can be eliminated.
  • the above-described processing can be realized without using a special data path or the like, so that it is possible to suppress the manufacturing cost that is applied to the processor.
  • the pipeline 210 capable of processing a plurality of processes in parallel causes the write-back process to be retried, so that the MO port 66 can be prevented from being occupied and retried quickly. Processing other than processing can also be executed.
  • the recording control apparatus and the recording control method according to the present invention have the primary cache. This is useful for a processor that performs processing to write back the data in the primary cache to the secondary cache, especially when the secondary cache processing is delayed. It is suitable for recording properly in the secondary cache.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

 2次キャッシュ(200c)は、1次キャッシュにリプレースが発生し、書き戻し対象となるMOデータを取得した場合に、このMOデータの記録位置に対するMIデータの新規登録処理が完了しているか否かを、レジスタ(222)の制御フラグに設定された情報を基にして判定する。そして、新規登録処理が完了していない場合に、この新規登録処理をキャンセルして、新規登録処理の要求がパイプライン(210)に出力されないように抑制する。

Description

明 細 書
記録制御装置および記録制御方法
技術分野
[0001] 本発明は、プロセッサが備える第 1のキャッシュおよび第 2のキャッシュに対するデ ータの記録制御を行う記録制御装置および記録制御方法に関するものである。 背景技術
[0002] 近年、プロセッサは、その内部にキャッシュを設置し、メモリに記録されたデータを ー且キャッシュに記録させることによって、メモリアクセスにかかる処理速度を向上さ せている(例えば、特許文献 1参照)。ここで、従来に力かるプロセッサの構成につい て説明する。
[0003] 図 8は、従来のプロセッサの構成を示す機能ブロック図である。同図に示すように、 このプロセッサ 10は、プロセッサコア 20, 30と、 SC (System Controller) 40と、メイン メモリ 50とを備えて構成される。なお、ここでは、説明の便宜上、プロセッサコア 20, 3 0のみを示す力 このプロセッサは、複数のプロセッサコアを有する(複数のプロセッ サコアが SC40に接続されて!、る)。
[0004] このうち、 SC40は、主に、プロセッサコア 20, 30からのデータ要求に応じて、メイン メモリ 50に記録されたデータを取得し、取得したデータをプロセッサコア 20, 30に渡 す装置であり、メインメモリ 50は、プロセッサコア 20, 30が用いるデータ (命令および 演算対象となるデータなど)を記録する記録装置である。
[0005] プロセッサコア 20, 30は、メインメモリ 50に記録されたデータを取得し、所定の処理 を実行する装置である。プロセッサコア 20, 30の構成要素は同一であるため、ここで は、プロセッサコア 20を用いて説明すると、プロセッサコア 20は、制御部 (命令制御 部 Z演算部) 25aと、 1次キャッシュ 25bと、 2次キャッシュ 25cとを備えて構成される。
[0006] 制御部 25aは、メインメモリ 50に記録されたデータを、 2次キャッシュ 25cおよび 1次 キャッシュ 25bを介して取得し、命令を解釈して、所定の処理 (命令に対応する演算 処理など)を実行する装置である。
[0007] 続いて、従来の 2次キャッシュ 25cの構成について説明する。図 9は、従来の 2次キ ャッシュ 25cの構成を示す機能ブロック図である。同図に示すように、この 2次キヤッシ ュ 25cは、 Mlポート 60と、調停回路 61, 62と、ノ ィプライン 63と、キャッシュタグ咅 64 と、ムーブインバッファ 65と、 MOポート 66と、 MOデータバッファ部 67と、キャッシュ データ部 68とを備えて構成される。
[0008] ここで、 2次キャッシュ 25cの構成要素の各処理を説明すると、 Mlポート 60は、(図 8に示した 1次キャッシュ 25bが、制御部 25aからのデータ要求に対応するデータを 記録していない場合に、) 1次キャッシュ 25bからのデータ要求(以下、 Mlリクエスト) を受付け、この Mlリクエストを、調停回路 61を介して、パイプライン 63に出力する。
[0009] パイプライン 63は、 Mlリクエストを取得した場合に、 Mlリクエストに該当するデータ 力 S 2次キャッシュ 25cに存在するか否かをキャッシュタグ部 64に基づいて判定し、 Ml リクエストに該当するデータが存在する場合には、該当するデータをキャッシュデータ 部 68から検索し、 1次キャッシュ 25bに出力する。
[0010] 一方、 Mlリクエストに該当するデータが存在しない場合には、 Mlリクエストに該当 するデータが存在しない旨の情報をムーブインバッファ 65に出力する。この場合、ム 一ブインバッファ 65は、 Mlリクエストに対応するデータを SC40に要求する(SCリクェ ストを SC40に出力する)。そして、ムーブインバッファ 65は、 SC40力ら SCリクエスト に対応するデータ(以下、 Mlデータ)を取得すると、 Mlデータを Mlデータバッファ 6 5aに書き込むと同時に、そのまま Mlデータを 1次キャッシュ 25bに転送する。
[0011] その後、ムーブインバッファ 65は、 Mlデータをキャッシュデータ部 68に記録する準 備が整うと、新規登録処理を起動し、 Mlデータバッファ 65aに記録された Mlデータ をキャッシュデータ部 68に登録する。
[0012] ところで、 Mlデータを取得した 1次キャッシュ 25bは、 Mlデータを制御部 25aに渡し た後に、制御部 25aによる演算結果がストアされるなどして、 2次キャッシュ 25cと比べ て最新のデータを保持する場合がある。この状態で、 1次キャッシュ 25bのリプレース が発生すると、 2次キャッシュ 25cへの書き戻し (ライトバック)が発生する。
[0013] 1次キャッシュ 25bからの書き戻し要求(以下、 MOリクエスト)は、 MOポート 66が取 得し、 MOポート 66は、書き戻し処理の要求(ライトバックリクエスト; WRBK)を、調停 回路 61を介してパイプライン 63に出力する。なお、書き戻し対象となるデータ (以下 、 MOデータ)は、 MOデータバッファ 67に登録される。
[0014] パイプライン 63は、書き戻し処理の要求を取得した場合に、 MOデータバッファ 67 に記録された MOデータを、調停回路 62を介してキャッシュデータ部 68に登録する ことで、キャッシュデータ部 68に最新のデータ (MOデータ)力登録されることになる。
[0015] 特許文献 1 :特開平 11 134257号公報
発明の開示
発明が解決しょうとする課題
[0016] しかしながら、上述した従来技術では、 1次キャッシュ 25bから 2次キャッシュ 25cに 対してデータが書き戻される際に、ムーブインバッファ 65による新規登録処理が何ら かの原因で完了して ヽな 、場合があり、キャッシュデータ部 68に登録された最新の データが消失してしまうという問題があった。
[0017] 図 10は、従来技術に力かる問題を説明するための説明図である。同図に示すよう に、ムーブインバッファ 65は、 SC40から Mlデータを取得し、 Mlデータバッファ 65a に MIデータを登録する。同時に、この Mlデータは、 1次キャッシュ 25bに転送される 。ここで、ムーブインバッファ 65は、何らかの原因(例えば、 Mlデータの他に処理す べきデータが複数存在する場合など)で、 Mlデータをキャッシュデータ部 68へ登録 する新規登録処理が遅れることがある。
[0018] この間に、 Mlデータに対して演算結果が反映されるなどした最新のデータ(MOデ ータ)力 1次キャッシュ 25bのリプレース処理により、書き戻される(ライトバック)と、 2 次キャッシュ 25c上では、キャッシュデータ部 68に MOデータが記録された後に Ml データが記録される、すなわち、最新のデータ力 古いデータによって上書きされて しまうという問題があった。
[0019] 本発明は、上記に鑑みてなされたものであって、新規登録処理が遅れた場合であ つても、 1次キャッシュ力 書き戻される最新のデータが消失してしまうことを効率よく 防止することができる記録制御装置および記録制御方法を提供することを目的とする 課題を解決するための手段
[0020] 上述した課題を解決し、目的を達成するために、本発明は、プロセッサが備える第 1のキャッシュおよび第 2のキャッシュに対するデータの記録制御を行う記録制御装 置であって、前記第 1のキャッシュに記録された第 1のデータを前記第 2のキャッシュ に書き戻す場合に、前記第 1のデータが書き戻される前記第 2のキャッシュの記録位 置に、前記第 1のデータの更新前のデータである第 2のデータが既に記録されている か否かを判定する判定手段と、前記判定手段によって、前記第 2のデータが前記記 録位置に記録されて ヽな ヽと判定された場合に、前記第 2のデータが前記記録位置 に記録されることを抑制し、前記第 1のデータを当該記録位置に記録する記録制御 手段と、を備えたことを特徴とする。
[0021] また、本発明は、プロセッサが備える第 1のキャッシュおよび第 2のキャッシュに対す るデータの記録制御を行う記録制御方法であって、前記第 1のキャッシュに記録され た第 1のデータを前記第 2のキャッシュに書き戻す場合に、前記第 1のデータが書き 戻される前記第 2のキャッシュの記録位置に、前記第 1のデータの更新前のデータで ある第 2のデータが既に記録されているか否かを判定する判定工程と、前記判定ェ 程によって、前記第 2のデータが前記記録位置に記録されて 、な 、と判定された場 合に、前記第 2のデータが前記記録位置に記録されることを抑制し、前記第 1のデー タを当該記録位置に記録する記録制御工程と、を含んだことを特徴とする。
発明の効果
[0022] 本発明によれば、第 1のキャッシュに記録された第 1のデータを第 2のキャッシュに 書き戻す場合に、第 1のデータが書き戻される第 2のキャッシュの記録位置に、第 1の データの更新前のデータである第 2のデータが既に記録されている力否かを判定し、 当該第 2のデータが記録位置に記録されていないと判定した場合に、第 2のデータ が記録位置に記録されることを抑制し、第 1のデータを記録位置に記録するので、最 新のデータである第 1のデータ力 古いデータである第 2のデータによって上書きさ れてしまう問題を解消することができる。
図面の簡単な説明
[0023] [図 1]図 1は、本発明の特徴を説明するための説明図である。
[図 2]図 2は、すれ違いのケースが発生した場合の本発明の処理を説明するための 説明図である。 [図 3]図 3は、本発明にかかるプロセッサの構成を示す機能ブロック図である。
[図 4]図 4は、本実施例 2にかかる 2次キャッシュの構成を示す機能ブロック図である。
[図 5]図 5は、ムーブインバッファの構成を示す機能ブロック図である。
圆 6]図 6は、制御フラグに保持される情報を説明するための説明図である。
[図 7]図 7は、図 6において説明した処理を実行するための回路の一例を示す図であ る。
[図 8]図 8は、従来のプロセッサの構成を示す機能ブロック図である。
[図 9]図 9は、従来の 2次キャッシュの構成を示す機能ブロック図である。
[図 10]図 10は、従来技術に力かる問題を説明するための説明図である。
圆 11]図 11は、第 1の従来技術を説明するための説明図である。
[図 12]図 12は、第 2の従来技術を説明するための説明図である。
[図 13]図 13は、従来技術にカゝかるムーブインバッファの構成を示す機能ブロック図で ある。
符号の説明
10, 100 プロセッサ
20, 30, 200, 300 プロセッサコア
25a, 200a 制御部 (命令制御部 Z演算部)
25b, 200b 1次キャッシュ
25c, 200c 2次キャッシュ
40 SC
50 メインメモリ
60 Mlポート
61, 62 調停回路
63, 210 パイプライン
64 キャッシュタグ部
65, 220 ムーブインバッファ
65a, 220a MIデータノッファ
66 MOポート 67 MOデータバッファ
68 キャッシュデータ部
70, 221 アドレス比較回路
71, 222 レジスタ
223 リトライ判定回路
230, 231, 232, 233 セット Zリセット回路
240, 241, 242 OR回路
250, 251, 252 AND回路
発明を実施するための最良の形態
[0025] 以下に、本発明にかかる記録制御装置および記録制御方法の実施例を図面に基 づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない
実施例
[0026] まず、本発明の特徴について従来技術と比較して説明する。従来技術では、図 8に 示した 1次キャッシュ 25bから 2次キャッシュ 25cに対してデータが書き戻される際に、 図 9に示したムーブインバッファ 65による新規登録処理が何らかの原因で完了してい な ヽ場合があり、キャッシュデータ部 68に登録された最新のデータが古 、データによ つて上書きされてしまうという問題があった。そこで、従来では、この問題を解消すベ ぐ様々な技術が考案されている。ここでは、その一例として、 2つの従来技術を示す
[0027] まず、第 1の従来技術について説明する。図 11は、第 1の従来技術を説明するため の説明図である。同図に示すように、この第 1の従来技術では、 1次キャッシュ 25bか ら 2次キャッシュ 25cへの書き戻し処理時に、 Mlデータバッファ 65aに記録されて!、る Mlデータを MOデータによって上書きする。このように、 Mlデータバッファ 65aに記 録された Mlデータを MOデータで上書きすることによって、ムーブインバッファ 65の 新規登録処理が遅れた場合であっても、最終的に MOデータがキャッシュデータ部 6 8に書き込まれることになり、問題解決となる。
[0028] 続いて、第 2の従来技術について説明する。図 12は、第 2の従来技術を説明する ための説明図である。同図に示すように、この第 2の従来技術では、ムーブインバッフ ァ 65による新規登録処理の後に同一ブロックの書き戻し処理 (ライトバック)が必ず処 理されるように、新規登録処理が終了するまで、書き戻し処理をリトライさせる。あるい は、簡単のため、ムーブインバッファ 65が開放されるまで書き戻し処理をリトライさせ ることによって、最終的に MOデータがキャッシュデータ部 68に書き込まれるようにす る。
[0029] ところで、上述した、第 1の従来技術および第 2の従来技術のいずれにおいても、 問題回避を行うか否かの検出機構が必要である。ここで、従来技術にかかるムーブイ ンバッファ 65の構成について説明する。図 13は、従来技術に力かるムーブインバッ ファ 65の構成を示す機能ブロック図である。同図に示すように、このムーブインバッフ ァ 65は、 Mlデータバッファ 65aと、アドレス比較回路 70と、レジスタ 71とを備えて構 成される。
[0030] ここで、図 13に示した各構成要素の各処理を説明すると、レジスタ 71は、パイプラ イン 63によってキャッシュミスと判定された場合に、キャッシュミスが検出された旨の情 報および Mlデータのアドレス力もなるパイプライン結果情報をパイプライン 63から取 得し、有効情報 (VALID)と、 Mlデータのアドレスを示す要求アドレスと、新規登録処 理の実行時に参照する制御フラグをセットする(この時点で、ムーブインバッファ 65は 、 SC40に対して SCリクエストを出力する)。
[0031] SC40から出力される Mlデータは、 Mlデータバッファ 65aに登録される。そして、
Mlデータバッファ 65aは、 Mlデータのキャッシュデータ部 68に対する登録準備が完 了した場合に、その旨の情報をレジスタ 71に出力する。レジスタ 71は、 Mlデータバ ッファ 65aから、 Mlデータの登録準備が完了した旨の情報を取得すると、制御フラグ に反映させる (例えば、制御フラグの内容を「登録準備中」から「登録準備完了」に変 更する)。ムーブインバッファ 65は、レジスタ 71の制御フラグにより、新規登録処理が 可能であると判定すると、新規登録処理の要求をパイプライン 63に出力する。
[0032] 一方、 2次キャッシュ 25cに対する書き戻し (ライトバック)が発生した場合には、書き 戻し処理の要求がパイプライン 63に出力されるとともに、ライトバック対象となる MO データのアドレス情報を有するパイプライン投入情報が、アドレス比較部 70に出力さ れる。
[0033] アドレス比較部 70は、パイプライン投入情報を取得すると、 MOデータのアドレスと 要求アドレスに登録された Mlデータのアドレスとを比較して、双方のアドレスが一致 するか否かを判定する。そして、双方のアドレスが一致した場合 (すなわち、 MOデー タの記録位置と Mlデータの記録位置が一致する場合)には、 MOデータのアドレスと 、 Mlデータのアドレスとがー致した旨の情報 (アドレス一致情報)をパイプライン 63に 出力する。
[0034] ここで、図 11に示した第 1の従来技術では、書き戻し処理の要求がパイプライン 63 に入力された場合に、アドレス一致情報を受け取ることで、 Mlデータバッファ 65aに 存在する同一ブロックのデータ(Mlデータ)を最新のデータ(MOデータ)に上書きす る必要があることを検出することができる。
[0035] また、図 12に示した第 2の従来技術では、書き戻し処理の要求がパイプライン 63に 入力された場合に、アドレス一致情報を受け取ることで、ムーブインバッファ 65が開 放されるまで (新規登録処理が完了するまで)、 MOデータの書き戻し処理をリトライ することを検出することができる。
[0036] 続いて、上述した第 1の従来技術、第 2の従来技術の順で、その従来技術の問題 点について説明する。まず、第 1の従来技術では、 MOデータバッファ 67に記録され た MOデータを Mlデータバッファ 65aに上書きする場合に、図 9の破線で示すような 新たなデータパスを用意しなければならず、余分なコストがかかってしまうという問題 があった。また、ライトバックリクエストがパイプライン 63に入力された直後に、新規登 録処理の要求が入力されるようなケースでは、ライトバックによる Mlデータバッファ 65 aの上書きが間に合わずに新規登録処理が実行されてしまうため、最終的に、古い データ(Mlデータ)がキャッシュデータ部 68に登録されてしまうという問題があった。
[0037] このため、書き戻し処理の要求が、ノ ィプライン 63に入力された直後は、パイプライ ン 63に対する新規登録処理の出力を禁止するなどして、上記した問題を解決してい る力 ムーブインバッファ 65の処理が滞ってしまうなどの新たな問題が発生していた。
[0038] 一方、第 2の従来技術では、新規登録処理が完了するまで、書き戻し処理をリトライ させるものであつたが、この場合、新規登録処理が完了するまで、あるいは、ムーブイ ンバッファ 65が開放されるまで、 MOボート 66の資源を占有することになり、後続の 処理が迅速に実行できないなどの問題があった。
[0039] そこで、本発明では、上述した従来技術による問題を解消する。図 1は、本発明の 特徴を説明するための説明図である。同図に示すように、 1次キャッシュから 2次キヤ ッシュへの書き戻し処理によりキャッシュデータ部に最新のデータ(MOデータ)が書 き込まれる場合に、該当ブロックに対する新規登録処理が未完了であることを検出す ると、ムーブインバッファに対して新規登録処理のキャンセルを要求する。このように 、新規登録処理をキャンセルすることによって、新規登録処理が実行されないので、 キャッシュデータ部に古 、データ(Mlデータ)が書き込まれると 、つた問題を解消す ることがでさる。
[0040] また、新規登録処理をキャンセルする時点で、既に、新規登録処理力パイプライン に出力されているケース(すれ違いのケース)が考えられる。図 2は、すれ違いのケー スが発生した場合の本発明の処理を説明するための説明図である。同図に示すよう に、本発明では、書き戻し処理がパイプラインに入力された際に、当該ブロックに対 する新規登録処理が完了して 、な 、ことを検出して、新規登録処理のキャンセルを 行い、 MOデータをキャッシュデータ部に書き込む。
[0041] 一方、新規登録処理は、既に、パイプラインに出力済みであるが、新規登録処理の キャンセル要求をムーブインバッファに出力しているため、新規登録処理のリトライは 起こりえない。このような場合には、書き戻し処理をリトライさせることによって、最終的 にキャッシュデータ部に最新のデータ(MOデータ)を書き込むことを可能とする。
[0042] 次に、本発明に力かるプロセッサの構成について説明する。図 3は、本発明にかか るプロセッサ 100の構成を示す機能ブロック図である。同図に示すように、このプロセ ッサ 100は、プロセッサコア 200, 300と、 SC40と、メインメモリ 50とを備えて構成され る。なお、図 8において示した構成要素と同一の構成要素には同一の符号を付して 説明を省略する。
[0043] プロセッサコア 200, 300は、メインメモリ 50に記録されたデータを取得し、所定の 処理を実行する装置である。プロセッサコア 200, 300の構成要素は同一であるため 、ここでは、プロセッサコア 200を用いて説明すると、プロセッサコア 200は、制御部( 命令制御部 Z演算部) 200aと、 1次キャッシュ 200bと、 2次キャッシュ 200cとを備え て構成される。
[0044] 制御部 200aは、メインメモリ 50に記録されたデータを、 2次キャッシュ 200cおよび 1 次キャッシュ 200bを介して取得し、命令を解釈して、所定の処理 (命令に対応する演 算処理など)を実行する装置である。
[0045] 続いて、本実施例に力かる 2次キャッシュ 200cの構成について説明する。図 4は、 本実施例 2にかかる 2次キャッシュ 200cの構成を示す機能ブロック図である。同図に 示すように、この 2次キャッシュ 200cは、 Mlポート 60と、調停回路 61, 62と、ノィプラ イン 210と、キャッシュタグ部 64と、ムーブインバッファ 220と、 MOポート 66と、 MO データバッファ部 67と、キャッシュデータ部 68とを備えて構成される。なお、図 9にお いて説明した構成要素と同一の構成要素には同一の符号を付して説明を省略する。
[0046] ノ ィプライン 210は、本実施例では主に、 Mlリクエスト、書き戻し処理の要求 (ライト ノ ックリクェスト)、あるいは新規登録処理の要求などを取得し、取得したリクエストに 対応する処理を並列して実行する装置である。以下、パイプライン 210の処理を順に 説明する。
[0047] パイプライン 210は、 Mlリクエストを取得した場合に、 Mlリクエストに該当するデー タが 2次キャッシュ 200cに存在するか否かをキャッシュタグ部 64に基づいて判定し、 Mlリクエストに該当するデータが存在する場合には、該当するデータをキャッシュデ ータ部 68から検索し、 1次キャッシュ 200bに出力する。
[0048] 一方、 Mlリクエストに該当するデータが存在しない場合には、キャッシュミスが検出 された旨の情報および Mlデータのアドレス力 なるパイプライン結果情報をムーブイ ンバッファ 220に出力する。この場合、ムーブインバッファ 220は、 SCリクエストを SC 40に出力することになる。
[0049] また、パイプライン 210は、書き戻し処理の要求を取得した場合には、ムーブインバ ッファ 220と協働して、 MOデータの書き戻し処理をリトライする力否かを判定し、判定 結果に基づいた処理を実行する。そして、パイプライン 210は、 MOデータの書き戻 し処理をリトライする場合には、 MOデータバッファ 67に記録された MOデータをキヤ ッシュデータ部 68に書き戻す処理をリトライさせる。すなわち、パイプライン 210は、 MOデータバッファ 67に記録された MOデータを繰り返し、キャッシュデータ部 68に 記録させる。
[0050] ムーブインバッファ 220は、 SC40から出力される Mlデータを記録する記録装置で ある。また、ムーブインバッファ 220は、新規登録処理をキャンセルするか否か、ある いは、 MOデータの書き戻し処理をリトライする力否かの判断基準となる情報を管理 している。
[0051] 図 5は、ムーブインバッファ 220の構成を示す機能ブロック図である。同図に示すよ うに、このムーブインバッファ 220は、 Mlデータバッファ 220aと、アドレス比較回路 22 1と、レジスタ 222と、リトライ判定回路 223とを備えて構成される。
[0052] このうち、アドレス比較回路 221は、書き戻し対象となる MOデータのアドレス情報を 有するパイプライン投入情報を取得すると、 MOデータのアドレスと、レジスタ 222に 保持された Mlデータのアドレスとを比較して、双方のアドレスが一致する力否かを判 定する装置である。そして、アドレス比較回路 221は、 MOデータのアドレスと、 Mlデ ータのアドレスが一致すると判定した場合 (MOデータの記録位置と Mlデータの記 録位置とがー致した場合)には、アドレスが一致した旨の情報 (アドレス一致情報)を レジスタ 222およびリトライ判定回路 223に出力する。
[0053] レジスタ 222は、有効情報(VALID)と、 Mlデータのアドレスを示す要求アドレスと、 書き戻し処理をリトライするか否か、あるいは新規登録処理を実行するか否かを示す 制御フラグとを保持'管理する装置である。このレジスタ 222は、アドレス比較回路 22 1力 アドレス一致情報を取得した場合には、新規登録処理をキャンセルするための 処理を実行する。この場合、レジスタ 222は、制御フラグを操作して、この制御フラグ に新規登録処理の完了フラグを強制的にセットする。(別途、新規登録処理のキャン セルにより、強制的に新規登録処理が完了したことを示すフラグを設けてもよい。 )
[0054] レジスタ 222の制御フラグに新規登録処理の完了フラグを強制的にセットすることに よって、 Mlデータバッファ 220aから Mlデータの登録準備が完了した旨の情報をレ ジスタ 222が受け取った時点で、本来実行される新規登録処理がキャンセルされるこ とになり、ムーブインバッファ 220は、新規登録処理の要求をパイプライン 210に出力 することはなぐキャッシュデータ部 68に古いデータ(Mlデータ)が記録されることを 抑帘 Uすることができる。
[0055] リトライ判定回路 223は、アドレス一致情報をアドレス比較回路 221から取得した場 合に、書き戻し処理と新規登録処理とのすれ違いにより、書き戻し処理をリトライする 必要がある力否かをレジスタ 222の制御フラグに基づいて判定する装置である。リトラ ィ判定回路 223は、書き戻し処理をリトライする必要があると判定した場合には、リトラ ィ要求をパイプライン 210に出力する。リトライ判定部 223は、制御フラグに保持され る情報によって、書き戻し処理をリトライする力否かを判定することになるが、制御フラ グに保持される情報は刻々と変化する。
[0056] ここで、制御フラグに保持される情報について説明する。図 6は、制御フラグに保持 される情報を説明するための説明図である。同図に示すように、この図では、パイプ ライン 210によって実行される書き戻し処理および新規登録処理の各ステージ XPn ( nの数字は、処理が何段目かを示す)と、制御フラグに保持される情報との関係を示 している。また、制御フラグに保持される情報には、「新規登録処理実行中」、「新規 登録処理完了」、「新規登録処理強制完了」あるいは「リトライ期間」のうち、いずれか の情報が設定される。なお、図 5に示したアドレス比較回路 221が、アドレスの比較を 行うタイミングは、書き戻し処理の XP2で実行されるものとする。
[0057] ここで、「新規登録処理実行中」は、ムーブインバッファ 220が、新規登録処理の要 求をパイプライン 210に発行してから、パイプライン 210から新規登録処理の結果が 返るまで制御フラグに設定される情報であり、新規登録処理が実行中である旨を示 す。
[0058] 「新規登録処理完了」は、新規登録処理がパイプライン 210によって処理され、 Ml データがキャッシュデータ部 68に対する登録が完了してから、ムーブインバッファ 22 0が開放されるまで制御フラグに設定される情報であり、新規登録処理の起動を抑止 するとともに、新規登録処理が完了したことによるムーブインバッファ 220の開放条件 として使用される。
[0059] 「新規登録処理強制完了」は、本発明により、書き戻し処理によって、同一ブロック における未処理の新規登録情報をキャンセルするために制御フラグに設定される情 報であり、書き戻し処理による新規登録処理のキャンセル以降、ムーブインバッファ 2 20が開放されるまで有効となる。書き戻し処理による新規登録処理のキャンセルは、 レジスタ 222がアドレス比較回路 221からアドレス一致情報を取得した時点(書き戻し 処理における XP2の時点)で発生するので、この新規登録処理強制完了の情報は、 書き戻し処理の XP3からムーブインバッファ 220が開放されるまで制御フラグに設定 される。この新規登録処理強制完了の情報が制御フラグに設定されると、以降の新 規登録処理はキャンセルされる。
[0060] 「リトライ期間」は、図 5に示した Mlデータバッファ 220aによって Mlデータをキヤッシ ュデータ部 68に登録する準備が整ってから、新規登録処理の要求がノ ィプライン 21 0に発行されるまで制御フラグに設定される情報である。制御フラグに「リトライ期間」 が設定されている期間は、パイプライン 210は、書き戻し処理をリトライする。
[0061] ところで、図 6に示す(1)〜(4)は、書き戻し処理に対してその前後で新規登録処 理の要求がパイプライン 210に出力された場合の動作を、新規登録処理の要求がパ ィプライン 210に出力されたタイミング別に表したものである。
[0062] (1)のケースでは、新規登録処理の後に、書き戻し処理が実行されるため、問題は 無い。なぜなら、新規登録処理によって Mlデータがキャッシュデータ部 68に記録さ れた後に、書き戻し処理によって MOデータがキャッシュデータ部 68に記録されるた め、最終的に、最新のデータがキャッシュデータ部 68に登録されるためである。また 、(1)のケース以前に、新規登録処理が実行される場合も当然問題とならない。
[0063] 一方、(2)〜(4)のケースでは、書き戻し処理の要求(ライトバックリクエスト)がパイ プライン 210に出力された後に、新規登録処理の要求がパイプライン 210に出力さ れる場合のケースを示している力 書き戻し処理の XP3のタイミング以降は、制御フ ラグに「新規登録処理強制完了」が設定されているため、(4)以降のケースでは、新 規登録処理の要求がパイプライン 210に出力されることは無いため、問題とならない
[0064] すなわち、(2)、(3)に示すケースにおいてすれ違い(新規登録処理のキャンセル が間に合わず、書き戻し処理が行われた後に、新規登録処理が実行されてしまうケ ース)が発生する。この期間だけ、書き戻し処理のリトライを行うようにする。リトライ判 定を行うタイミングは、書き戻し処理における XP2のタイミングであるため、このタイミ ングで、リトライ判定回路 223が制御フラグを参照した場合に、制御フラグに「リトライ 期間」が設定されて 、るように制御フラグを操作してやればょ 、。
[0065] なお、新規登録処理のキャンセルによって、新規登録処理が抑止された場合には、 制御フラグに設定された情報が「リトライ期間」から「新規登録処理実行中」に変更さ れない。その場合には、新規登録処理のキャンセル時にアドレス比較回路 221から 入力されるアドレス一致情報をレジスタ 222が取得するタイミングで、レジスタ 222は、 制御フラグに設定される情報を「リトライ期間」から「新規登録処理実行中」に変更す る。
[0066] なお、(4)のケースにおいて、書き戻し処理の要求がノ ィプライン 210に出力される 際に、 Mlデータバッファ 220aによる Mlデータの登録準備が既に整って 、る場合に は、制御フラグに「リトライ期間」が設定されているので、この場合には、書き戻し処理 を 1回のみリトライする。書き戻し処理によるアドレス処理回路 221の比較処理によつ て、「リトライ期間」が解除され、それ以上、書き戻し処理がリトライされることはない。
[0067] 続いて、図 6において説明した処理を実行するための回路について説明する。図 7 は、図 6において説明した処理を実行するための回路の一例を示す図である。この 回路は、例えば、図 5に示したレジスタ 222に内蔵されているものとする。図 7に示す ように、この回路は、セット/リセット回路 230〜233と、 OR回路 240〜242と、 AND 回路 250〜252とを備えて構成される。
[0068] セット Zリセット回路 230は、 Mlデータバッファ 220aにおける Mlデータの登録準備 が完了した場合に、「High」を出力し、 OR回路 241から「High」を入力された時点で「 Low」を出力する装置である。
[0069] セット Zリセット回路 231は、新規登録処理の要求がパイプライン 210に出力された 時点で、「High」を出力し、新規登録処理が図 6に示した XP5まで移行した時点で、「 Low」を出力する装置である。このセット Zリセット回路 231から「High」が出力されて いる期間中は、レジスタ 222が保持する制御フラグに「新規登録処理実行中」が設定 される。
[0070] セット Zリセット回路 232は、新規登録処理が完了した時点 (新規登録処理が図 6に 示した XP5まで移行した時点)で、「High」を出力し、ムーブインバッファ 220が開放さ れた時点で、「Low」を出力する装置である。このセット Zリセット回路 232から「High」 が出力されて!、る期間中は、レジスタ 222が保持する制御フラグに「新規登録処理完 了」が設定される。
[0071] セット Zリセット回路 233は、アドレス比較回路 221からアドレス一致情報が出力さ れた時点(図 6に示す書き戻し処理の XP2のタイミング)で、「High」を出力し、ムーブ インバッファ 220が開放された時点で、「Low」を出力する装置である。このセット Zリ セット回路 233から「High」が出力されて 、る期間中は、レジスタ 222が保持する制御 フラグに「新規登録処理強制完了」が設定される。
[0072] OR回路 240は、セット Zリセット回路 231またはセット Zリセット回路 232からの出 力が「High」となった場合に、「High」を出力し、セット Zリセット回路 231およびセット Zリセット回路 232からの出力が双方とも「Low」となった場合に、「Low」を出力する装 置である。
[0073] OR回路 241は、セット Zリセット回路 232またはセット Zリセット回路 233からの出 力が「High」となった場合に、「High」を出力し、セット Zリセット回路 232およびセット Zリセット回路 233からの出力が双方とも「Low」となった場合に、「Low」を出力する装 置である。
[0074] OR回路 242は、セット Zリセット回路 231、セット/リセット回路 232またはセットリセ ット回路 233のいずれか一つの出力が「High」となった場合に、「High」を出力し、セッ ト Zリセット回路 231、セット Zリセット回路 232およびセットリセット回路 233のすベて の出力が「Low」となった場合に、「Low」を出力する装置である。なお、 OR回路 242 力も「High」が出力されている期間中は、新規登録処理が抑制される。
[0075] AND回路 250は、セット Zリセット回路 230からの出力が「High」となり、かつ OR回 路 240からの出力が「Low」となった場合に、「High」を出力し、それ以外の場合には、 「Low」を出力する装置である。なお、 AND回路 250から「High」が出力されている期 間中は、レジスタ 222が保持する制御フラグに「リトライ期間」が設定される。
[0076] AND回路 251は、 AND回路 250からの出力力「High」となり、かつ、アドレス比較 回路 221からアドレス一致情報が出力された時点(図 6に示す書き戻し処理の XP2 のタイミング)で、「High」を出力し、それ以外は、「Low」を出力する装置である。 AND 回路 251から「High」が出力された時点で、ムーブインバッファ 220はパイプライン 21 0にリトライ要求を出力する。
[0077] AND回路 252は、セット Zリセット回路 230からの出力が「High」となり、かつ、 OR 回路 242からの出力が「Low」となった場合に「High」を出力し、それ以外は、「Low」を 出力する回路である。 AND回路 252から「High」が出力された時点で、新規登録処 理の要求が、ノ ィプライン 210に出力される。
[0078] 図 7に示すように、回路を構成することによって、本発明に力かる新規登録処理の キャンセルと、書き戻し処理のリトライを適切に実行することができる。
[0079] 上述してきたように、本実施例に力かる 2次キャッシュ 200cは、 1次キャッシュ 200b にリプレースが発生し、書き戻し対象となる MOデータを取得した場合に、この MOデ ータの記録位置に対する Mlデータの新規登録処理が完了して 、る力否かを、制御 フラグに設定された情報を基にして判定し、新規登録処理が完了していない場合に 、この新規登録処理をキャンセルして、新規登録処理の要求がパイプライン 210に出 力されないように抑制するので、キヤッシデータ部 68に登録された最新のデータ (M Oデータ)が古いデータ(Mlデータ)によって上書きされ、消失してしまうという問題を 解消することができる。
[0080] また、本実施例によれば、 2次キャッシュ 200cは、新規登録処理のキャンセルが間 に合わない場合には、パイプライン 210が、書き戻し処理を何度も実行し、キャッシュ データ部 68に MOデータを何度も書き込むので、新規登録処理が遅れた場合であ つても、最終的に、キャッシュデータ部 68に最新のデータ(MOデータ)が記録される ことになり、最新のデータが消失してしまうという問題を解消することができる。
[0081] また、本実施例によれば、上述した処理を、特別なデータパスなどを使用することな く実現することができるので、プロセッサに力かる製造コストを抑えることができる。
[0082] また、本実施例によれば、複数の処理を並列処理可能なパイプライン 210が、書き 戻し処理をリトライさせるので、 MOポート 66を占有してしまうことを防止し、迅速にリト ライ処理以外の処理も実行することができる。
産業上の利用可能性
[0083] 以上のように、本発明にかかる記録制御装置および記録制御方法は、 1次キヤッシ ュにリプレースが発生し、 1次キャッシュのデータを 2次キャッシュに書き戻す処理を 実行するプロセッサなどに有用であり、特に、 2次キャッシュの処理が遅れた場合でも 、最新のデータを消失させることなく適切に 2次キャッシュに記録させる場合に適して いる。

Claims

請求の範囲
[1] プロセッサが備える第 1のキャッシュおよび第 2のキャッシュに対するデータの記録 制御を行う記録制御装置であって、
前記第 1のキャッシュに記録された第 1のデータを前記第 2のキャッシュに書き戻す 場合に、前記第 1のデータが書き戻される前記第 2のキャッシュの記録位置に、前記 第 1のデータの更新前のデータである第 2のデータが既に記録されているか否かを 判定する判定手段と、
前記判定手段によって、前記第 2のデータが前記記録位置に記録されて 、な 、と 判定された場合に、前記第 2のデータが前記記録位置に記録されることを抑制し、前 記第 1のデータを当該記録位置に記録する記録制御手段と、
を備えたことを特徴とする記録制御装置。
[2] 前記判定手段によって、前記第 2のデータが前記記録位置に記録されて 、な 、と 判定された時点で、前記記録位置に対する前記第 2のデータの記録が開始されて 、 る場合に、前記第 1のデータを前記記録位置に繰り返し記録させる記録手段を更に 備えたことを特徴とする請求項 1に記載の記録制御装置。
[3] 前記第 1のデータが書き戻される前記第 2のキャッシュの記録位置に対する前記第 2のデータの記録状況を管理し、当該第 2のデータの記録状況の情報を記録する管 理手段を更に備え、前記判定手段は、前記第 2のデータの記録状況を基にして、前 記第 1のデータが書き戻される前記第 2のキャッシュの記録位置に、前記第 2のデー タが既に記録されている力否かを判定することを特徴とする請求項 2に記載の記録制 御装置。
[4] 前記記録手段は、前記第 2のデータの記録状況を基にして、前記記録位置に対す る前記第 2のデータの記録が開始されている力否かを判定し、当該第 2のデータの記 録が開始されている場合に、前記第 1のデータを前記記録位置に繰り返し記録させ ることを特徴とする請求項 3に記載の記録制御装置。
[5] プロセッサが備える第 1のキャッシュおよび第 2のキャッシュに対するデータの記録 制御を行う記録制御方法であって、
前記第 1のキャッシュに記録された第 1のデータを前記第 2のキャッシュに書き戻す 場合に、前記第 1のデータが書き戻される前記第 2のキャッシュの記録位置に、前記 第 1のデータの更新前のデータである第 2のデータが既に記録されているか否かを 判定する判定工程と、
前記判定工程によって、前記第 2のデータが前記記録位置に記録されて ヽな ヽと 判定された場合に、前記第 2のデータが前記記録位置に記録されることを抑制し、前 記第 1のデータを当該記録位置に記録する記録制御工程と、
を含んだことを特徴とする記録制御方法。
前記判定工程によって、前記第 2のデータが前記記録位置に記録されて ヽな ヽと 判定された時点で、前記記録位置に対する前記第 2のデータの記録が開始されて 、 る場合に、前記第 1のデータを前記記録位置に繰り返し記録させる記録工程を更に 含んだことを特徴とする請求項 5に記載の記録制御方法。
PCT/JP2006/303440 2006-02-24 2006-02-24 記録制御装置および記録制御方法 Ceased WO2007096981A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2008501538A JP4335299B2 (ja) 2006-02-24 2006-02-24 記録制御装置および記録制御方法
PCT/JP2006/303440 WO2007096981A1 (ja) 2006-02-24 2006-02-24 記録制御装置および記録制御方法
US12/222,377 US7958308B2 (en) 2006-02-24 2008-08-07 Recording controller and recording control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/303440 WO2007096981A1 (ja) 2006-02-24 2006-02-24 記録制御装置および記録制御方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/222,377 Continuation US7958308B2 (en) 2006-02-24 2008-08-07 Recording controller and recording control method

Publications (1)

Publication Number Publication Date
WO2007096981A1 true WO2007096981A1 (ja) 2007-08-30

Family

ID=38437043

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/303440 Ceased WO2007096981A1 (ja) 2006-02-24 2006-02-24 記録制御装置および記録制御方法

Country Status (3)

Country Link
US (1) US7958308B2 (ja)
JP (1) JP4335299B2 (ja)
WO (1) WO2007096981A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013001632A1 (ja) * 2011-06-29 2013-01-03 富士通株式会社 キャッシュ制御装置及びパイプライン制御方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5012016B2 (ja) * 2006-12-28 2012-08-29 富士通株式会社 キャッシュメモリ装置、演算処理装置及びキャッシュメモリ装置の制御方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6111865A (ja) * 1984-06-27 1986-01-20 Hitachi Ltd メモリアクセス制御方式
JPH0683703A (ja) * 1992-04-20 1994-03-25 Internatl Business Mach Corp <Ibm> データ転送制御システム及びコンピユータ・システムの動作方法
JPH07234819A (ja) * 1993-12-27 1995-09-05 Matsushita Electric Ind Co Ltd キャッシュメモリ

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5535358A (en) * 1993-12-27 1996-07-09 Matsushita Electric Industrial Co., Ltd. Cache memory control circuit and method for controlling reading and writing requests
JPH09223118A (ja) * 1996-02-14 1997-08-26 Oki Electric Ind Co Ltd スヌープキャッシュメモリ制御システム
JPH11134257A (ja) 1997-10-31 1999-05-21 Nec Corp キャッシュメモリ制御装置
US6574709B1 (en) * 1999-09-30 2003-06-03 International Business Machine Corporation System, apparatus, and method providing cache data mirroring to a data storage system
US7120755B2 (en) * 2002-01-02 2006-10-10 Intel Corporation Transfer of cache lines on-chip between processing cores in a multi-core system
US7062611B2 (en) * 2002-02-07 2006-06-13 Sun Microsystems, Inc. Dirty data protection for cache memories
US7350027B2 (en) * 2006-02-10 2008-03-25 International Business Machines Corporation Architectural support for thread level speculative execution

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6111865A (ja) * 1984-06-27 1986-01-20 Hitachi Ltd メモリアクセス制御方式
JPH0683703A (ja) * 1992-04-20 1994-03-25 Internatl Business Mach Corp <Ibm> データ転送制御システム及びコンピユータ・システムの動作方法
JPH07234819A (ja) * 1993-12-27 1995-09-05 Matsushita Electric Ind Co Ltd キャッシュメモリ

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013001632A1 (ja) * 2011-06-29 2013-01-03 富士通株式会社 キャッシュ制御装置及びパイプライン制御方法
JP5637312B2 (ja) * 2011-06-29 2014-12-10 富士通株式会社 キャッシュ制御装置及びパイプライン制御方法

Also Published As

Publication number Publication date
US7958308B2 (en) 2011-06-07
JPWO2007096981A1 (ja) 2009-07-09
JP4335299B2 (ja) 2009-09-30
US20080301368A1 (en) 2008-12-04

Similar Documents

Publication Publication Date Title
JP7716401B2 (ja) ストアからロードへの転送を実行するための技術
JP7403541B2 (ja) メモリ順序付け違反チェックバッファの排出遅延を許容するための投機的命令ウェイクアップ
US20100023667A1 (en) High availability system and execution state control method
JPH0227441A (ja) コンピュータ・システム
JP4490745B2 (ja) ホットスタンバイシステム
US8850129B2 (en) Memory ordered store system in a multiprocessor computer system
WO2014173090A1 (zh) 一种恢复内部存储器中的异常数据的方法及装置
JP6634083B2 (ja) データ処理装置におけるシステムエラー処理
JP2008112403A (ja) データ転送装置、データ転送方法、及びコンピュータ装置
US20110161594A1 (en) Information processing device and cache memory control device
JPH09330237A (ja) プロセス切り替え装置およびプロセス切り替え方法
JP4335299B2 (ja) 記録制御装置および記録制御方法
JP7084382B2 (ja) ロック命令の後のスペキュレーティブリタイア
US7953962B2 (en) Multiprocessor system and control method thereof
US10169234B2 (en) Translation lookaside buffer purging with concurrent cache updates
JP2000293391A (ja) 大規模メモリシステム管理方法および装置
JP3102119B2 (ja) ホストコンピュータ装置
US20060026369A1 (en) Store data control device and store data control method
WO2007096980A1 (ja) 記録制御装置および記録制御方法
JP2005122337A (ja) バスシステム、ホストブリッジ、バスシステムのオンライン再立ち上げ方法及びプログラム
JP2024541869A (ja) 履歴ベースの選択的キャッシュライン無効化要求
KR20160086746A (ko) 인터커넥트 및 인터커넥트의 작동방법
JP3251148B2 (ja) パイプラインデ−タ処理装置
JP2933888B2 (ja) 双方向バスの機能検査方法
JP2002149438A (ja) リカバリ制御用バッファ記憶の制御方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
ENP Entry into the national phase

Ref document number: 2008501538

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06714579

Country of ref document: EP

Kind code of ref document: A1