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
JP7415650B2 - Load fluctuation test program and load fluctuation test method - Google Patents
[go: Go Back, main page]

JP7415650B2 - Load fluctuation test program and load fluctuation test method - Google Patents

Load fluctuation test program and load fluctuation test method Download PDF

Info

Publication number
JP7415650B2
JP7415650B2 JP2020029374A JP2020029374A JP7415650B2 JP 7415650 B2 JP7415650 B2 JP 7415650B2 JP 2020029374 A JP2020029374 A JP 2020029374A JP 2020029374 A JP2020029374 A JP 2020029374A JP 7415650 B2 JP7415650 B2 JP 7415650B2
Authority
JP
Japan
Prior art keywords
interrupt
value
timer
timer value
unit
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.)
Active
Application number
JP2020029374A
Other languages
Japanese (ja)
Other versions
JP2021135576A (en
Inventor
慶和 稲垣
楓子 馬場
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2020029374A priority Critical patent/JP7415650B2/en
Publication of JP2021135576A publication Critical patent/JP2021135576A/en
Application granted granted Critical
Publication of JP7415650B2 publication Critical patent/JP7415650B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Protection Of Static Devices (AREA)
  • Dc-Dc Converters (AREA)

Description

本発明は、負荷変動試験プログラム及び負荷変動試験方法に関する。 The present invention relates to a load variation test program and a load variation test method.

近年、コンピュータシステムのハードウェアは高密度実装となり、この結果メモリなどの各電力供給先から近距離にDC/DCコンバータ(DDC:Direct current Direct current Converter)が実装されるようになった。そのため、DDCと電源供給先との間にキャパシタなどの電圧変動抑制のための回路を配置することが困難となった。このようなコンピュータシステムにおいてDDCから電力供給先に電流を供給すると、DDCの負荷変動により供給電圧が変動し、電力供給先に悪影響を及ぼすおそれがある。 In recent years, computer system hardware has become highly densely packaged, and as a result, DC/DC converters (DDCs: Direct current Direct current Converters) have come to be mounted close to each power supply destination such as memory. Therefore, it has become difficult to arrange a circuit for suppressing voltage fluctuations, such as a capacitor, between the DDC and the power supply destination. In such a computer system, when current is supplied from the DDC to the power supply destination, the supply voltage fluctuates due to changes in the load of the DDC, which may have an adverse effect on the power supply destination.

そこで、コンピュータシステムにおけるDDCの負荷変動に起因する電源供給元の回路障害を検出することが求められており、いくつかの試験方法が提案されている。例えば、プログラムにより中央処理装置から電源供給先であるメモリと電源非供給元であるキャッシュメモリとに周期的にアクセスすることで、電圧の負荷変動を実現する従来技術がある。この従来技術では、タイマ監視を一定間隔で行うことで時間を計測して、電源をオンにしてメモリアクセスを行う時間と電源をオフにしてキャッシュアクセスを行う時間とに周期性を持たせている。 Therefore, there is a need to detect circuit failures in the power supply source caused by DDC load fluctuations in computer systems, and several testing methods have been proposed. For example, there is a conventional technique in which a central processing unit periodically accesses a memory to which power is supplied and a cache memory to which power is not supplied by a program, thereby realizing load fluctuations in voltage. This conventional technology measures time by monitoring a timer at regular intervals, and provides periodicity between the time when the power is turned on and memory access is performed, and the time when the power is turned off and cache access is performed. .

また、メモリ及びキャッシュへのアクセス処理の切り替えをタイマ割り込みによって行うことで電流負荷を上げて試験を行う従来技術がある。タイマ割り込みは、タイマ値である走行時のCPU(Central Processing Unit)クロック数が、タイマ割込値として設定したCPUクロック数よりも大きくなった際に発生する割り込みである。タイマ割込値は、作りたい周期とCPU周波数から算出される。 Furthermore, there is a conventional technique in which a test is performed by increasing the current load by switching the access processing to the memory and cache using a timer interrupt. A timer interrupt is an interrupt that occurs when the timer value, which is the number of CPU (Central Processing Unit) clocks during running, becomes greater than the number of CPU clocks set as the timer interrupt value. The timer interrupt value is calculated from the desired period and CPU frequency.

特開2007-221856号公報Japanese Patent Application Publication No. 2007-221856 特開2013-58038号公報Japanese Patent Application Publication No. 2013-58038

しかしながら、タイマ監視を一定間隔で行うことで周期を生成する従来技術の場合、メモリアクセス実行中に一定間隔での時間監視処理を行うため、メモリアクセス頻度が低下する。その結果、電力共有元であるDDCからメモリへの電源供給頻度が低下する。このように、時間監視処理とメモリアクセス頻度の両立が難しく、本来の負荷変動に起因する電源の回路障害を検出する試験を行うことが困難であった。 However, in the case of the conventional technique in which a cycle is generated by performing timer monitoring at regular intervals, the frequency of memory access decreases because time monitoring processing is performed at regular intervals while memory access is being executed. As a result, the frequency of power supply from the DDC, which is the power sharing source, to the memory decreases. As described above, it has been difficult to balance time monitoring processing and memory access frequency, and it has been difficult to perform tests to detect power supply circuit failures caused by actual load fluctuations.

また、タイマ割り込みによって周期を生成する従来技術の場合、負荷変動の周期が短い場合、割り込み処理に時間がかかるなどして、次の割り込みを発生するために設定するタイマ値が現時刻のタイマ値よりも小さくなってしまう場合がある。この場合、次回以降の割り込みの発生が停止し、期待する負荷変動の周期を継続して生成することが困難となる。 In addition, in the case of conventional technology that generates cycles using timer interrupts, if the cycles of load fluctuations are short, interrupt processing takes time, and the timer value set to generate the next interrupt is set to the current timer value. It may become smaller than that. In this case, the generation of subsequent interrupts will stop, making it difficult to continue generating the expected load fluctuation cycle.

開示の技術は、上記に鑑みてなされたものであって、電源の負荷変動試験の実効性を高める負荷変動試験プログラム及び負荷変動試験方法を提供することを目的とする。 The disclosed technology has been developed in view of the above, and aims to provide a load variation test program and a load variation test method that improve the effectiveness of power supply load variation tests.

本願の開示する負荷変動試験プログラム及び負荷変動試験方法の一つの態様において、以下の処理をコンピュータに実行させる。CPUクロックからタイマ値を生成する。設定された負荷変動周期を基に基準タイマ値を決定する。判定を行う時点の現時点タイマ値を取得する。現時点タイマ値を基に、基準タイマ値にしたがうタイミングでの割り込みの発生を遅延させるか否かを判定する。遅延させる場合、基準タイマ値にしたがうタイミングから負荷変動周期に基づく所定タイマ値分遅延させて前記割り込みを発生させる。 In one aspect of the load variation test program and load variation test method disclosed in the present application, a computer is caused to execute the following processing. Generate a timer value from the CPU clock. A reference timer value is determined based on the set load fluctuation cycle. Obtain the current timer value at the time of making the determination. Based on the current timer value, it is determined whether or not to delay the occurrence of an interrupt at the timing according to the reference timer value. In the case of delay, the interrupt is generated by delaying the timing according to the reference timer value by a predetermined timer value based on the load fluctuation cycle.

1つの側面では、本発明は、電源の負荷変動試験の実効性を高めることができる。 In one aspect, the present invention can improve the effectiveness of power supply load variation tests.

図1は、負荷変動試験の試験対象となるコンピュータのハードウェア構成図である。FIG. 1 is a hardware configuration diagram of a computer to be tested in a load variation test. 図2は、負荷変動試験の試験プログラムにより生成される各機能を表すブロック図である。FIG. 2 is a block diagram showing each function generated by the test program for the load variation test. 図3は、負荷変動試験処理のフローチャートである。FIG. 3 is a flowchart of load fluctuation test processing. 図4は、タイマ割込値の設定処理の詳細を表すフローチャートである。FIG. 4 is a flowchart showing details of the timer interrupt value setting process. 図5は、次の割り込みの発生が次の通常の負荷変動のタイミングに間に合う場合のタイマ割込値の算出を説明するための図である。FIG. 5 is a diagram for explaining calculation of a timer interrupt value when the next interrupt occurs in time for the next normal load change timing. 図6は、次の割り込みの発生が次の通常の負荷変動のタイミングに間に合わない場合のタイマ割込値の算出を説明するための図である。FIG. 6 is a diagram for explaining calculation of a timer interrupt value when the next interrupt is not generated in time for the next normal load change timing. 図7は、切り替えの周期を飛ばした場合の負荷変動試験全体における負荷変動の一例を表す図である。FIG. 7 is a diagram showing an example of load fluctuation in the entire load fluctuation test when the switching cycle is skipped. 図8は、実施例1に係る負荷変動試験プログラムを用いて行った負荷変動試験の具体例の図である。FIG. 8 is a diagram of a specific example of a load variation test conducted using the load variation test program according to the first embodiment. 図9は、実施例2に係る負荷変動試験プログラムによる負荷変動の一例を表す図である。FIG. 9 is a diagram illustrating an example of load fluctuation according to the load fluctuation test program according to the second embodiment.

以下に、本願の開示する負荷変動試験プログラム及び負荷変動試験方法の実施例を図面に基づいて詳細に説明する。なお、以下の実施例により本願の開示する負荷変動試験プログラム及び負荷変動試験方法が限定されるものではない。 Embodiments of the load variation test program and load variation test method disclosed in the present application will be described in detail below based on the drawings. Note that the load variation test program and load variation test method disclosed in the present application are not limited to the following examples.

図1は、負荷変動試験の試験対象となるコンピュータのハードウェア構成図である。コンピュータ1は、本実施例に係る負荷変動試験が実行される情報処理装置の一例である。コンピュータ1は、図1に示すように、CPU10,メモリ20、ハードディスク30及びDDC40を有する。 FIG. 1 is a hardware configuration diagram of a computer to be tested in a load variation test. The computer 1 is an example of an information processing device on which the load fluctuation test according to this embodiment is executed. The computer 1 has a CPU 10, a memory 20, a hard disk 30, and a DDC 40, as shown in FIG.

ハードディスク30は、本実施例に係る負荷変動試験を実行するための試験プログラムを含む各種プログラムが格納される。 The hard disk 30 stores various programs including a test program for executing the load fluctuation test according to this embodiment.

DDC40は、電源であり、CPU10,メモリ20及びハードディスク30に電力を要求する。DDC40は、CPU10がメモリ20にアクセスする場合、メモリ20に対して電力を供給する。この場合、キャッシュ11へのアクセス時に比べてメモリ20の分の負荷が増えるため、DDC40が流す電流は、CPU10からのメモリ20へのアクセスが無い場合に比べて多くなる。 The DDC 40 is a power source and requests power from the CPU 10, memory 20, and hard disk 30. The DDC 40 supplies power to the memory 20 when the CPU 10 accesses the memory 20. In this case, since the load on the memory 20 increases compared to when the cache 11 is accessed, the current flowing through the DDC 40 becomes larger than when the memory 20 is not accessed from the CPU 10.

CPU10は、キャッシュ11を有する。CPU10は、ハードディスク30に格納された各種プログラムを読み出してメモリ20上に展開して各種プロセスを生成する。CPU10により生成されたプロセスにより、各種機能が実現される。例えば、CPU10は、試験プログラムを読み出してメモリ20上に展開して負荷変動試験プロセスを生成する。この負荷変動試験プロセスが動作することで、後述する負荷変動試験を実行するための各種機能が実現されてDDC40に対する負荷変動試験が実行される。 The CPU 10 has a cache 11. The CPU 10 reads various programs stored in the hard disk 30 and expands them onto the memory 20 to generate various processes. Various functions are realized by processes generated by the CPU 10. For example, the CPU 10 reads a test program, expands it on the memory 20, and generates a load fluctuation test process. By operating this load variation test process, various functions for executing a load variation test, which will be described later, are realized, and the load variation test on the DDC 40 is executed.

次に、図2を参照して、負荷変動試験を実行するための試験プログラムにより実行される各処理について説明する。図2は、負荷変動試験の試験プログラムにより生成される各機能を表すブロック図である。図2に記載した各部は、負荷変動試験プロセスにより実現される。負荷変動試験プログラムは、割り込みの発生により負荷変動を実現する。以下では、直前に発生した割り込みであって現時点でコンピュータ1により処理された割り込みを、「現在の割り込み」とよぶ。この現在の割り込みが、「前の割り込み」の一例にあたる。また、現在の割り込みの次に処理される割り込みを「次の割り込み」と呼ぶ。この次の割り込みが、「割り込み」の一例にあたる。 Next, each process executed by the test program for executing the load variation test will be described with reference to FIG. 2. FIG. 2 is a block diagram showing each function generated by the test program for the load variation test. Each part described in FIG. 2 is realized through a load variation test process. The load variation test program realizes load variation by generating an interrupt. In the following, the interrupt that occurred immediately before and is currently being processed by the computer 1 will be referred to as the "current interrupt." This current interrupt is an example of a "previous interrupt." Furthermore, the interrupt that is processed next to the current interrupt is called the "next interrupt." This next interrupt is an example of an "interrupt."

CPU10は、クロック生成部300及び割込レジスタ400を有する。負荷変動試験の試験プログラムが実行されると、図2に示すように、試験条件設定部100、試験実行部200が生成される。 The CPU 10 includes a clock generation section 300 and an interrupt register 400. When the test program for the load variation test is executed, a test condition setting section 100 and a test execution section 200 are generated, as shown in FIG.

クロック生成部300は、CPU10の動作周波数であるクロックを生成する。そして、クロック生成部300は、生成したクロックを出力する。 The clock generation unit 300 generates a clock that is the operating frequency of the CPU 10. The clock generation unit 300 then outputs the generated clock.

割込レジスタ400は、割り込みを格納するレジスタである。割込レジスタ400に格納された割り込みが読み出されることで割り込みが発生し、その割り込みに対応する処理が行われる。例えば、メモリ20へのアクセスとキャッシュ11へのアクセスを切り替えさせる割り込みの場合、割込レジスタ400から読み出されてその割り込みが発生することで、メモリ20へのアクセスとキャッシュ11へのアクセスが切替えられる。 Interrupt register 400 is a register that stores interrupts. An interrupt is generated by reading the interrupt stored in the interrupt register 400, and processing corresponding to the interrupt is performed. For example, in the case of an interrupt that switches between access to the memory 20 and access to the cache 11, the access to the memory 20 and the access to the cache 11 are switched by reading from the interrupt register 400 and generating the interrupt. It will be done.

試験条件設定部100は、負荷変動試験を実行する際の各種条件を設定する。試験条件設定部100は、変動周期計算部101及びタイマ割込セット部102を有する。 The test condition setting unit 100 sets various conditions for executing a load variation test. The test condition setting section 100 includes a fluctuation period calculation section 101 and a timer interrupt setting section 102.

変動周期計算部101は、クロック生成部300から出力されたクロックを取得しCPU10の周波数を取得する。また、変動周期計算部101は、負荷変動試験のために指定された負荷変動周期の情報を取得する。例えば、変動周期計算部101は、図示しない入力装置を用いて作業者が入力した負荷変動周期の情報を取得する。ここで、負荷変動周期とは、メモリ20へのアクセス及びキャッシュ11へのアクセスが行われる周期であり、メモリ20へのアクセス時間とキャッシュ11へのアクセス時間との合計時間が1周期となる。 The fluctuation cycle calculation unit 101 acquires the clock output from the clock generation unit 300 and acquires the frequency of the CPU 10. Further, the fluctuation cycle calculation unit 101 acquires information on the load fluctuation cycle specified for the load fluctuation test. For example, the fluctuation cycle calculation unit 101 acquires information on the load fluctuation cycle input by a worker using an input device (not shown). Here, the load fluctuation cycle is a cycle in which the memory 20 and the cache 11 are accessed, and the total time of the access time to the memory 20 and the access time to the cache 11 is one cycle.

次に、変動周期計算部101は、取得した負荷変動周期及びCPU10の周波数から割り込みを発生させるタイミングの基準となる基準タイマ値を算出する。以下では、基準タイマ値を「A」として表す場合がある。この基準タイマ値(A)は、現在の割り込みの発生によりアクセス対象の切り替えが行われたタイミングから次の割り込みが発生するまでの通常時の間隔をCPU10の周波数で表した値である。すなわち、基準タイマ値(A)は、負荷変動周期をCPU10のクロック数で表した値の半分の値である。 Next, the fluctuation cycle calculation unit 101 calculates a reference timer value, which is a reference for the timing at which an interrupt is generated, from the acquired load fluctuation cycle and the frequency of the CPU 10. Below, the reference timer value may be expressed as "A". This reference timer value (A) is a value expressed in the frequency of the CPU 10 as the normal interval from the timing when the access target is switched due to the occurrence of the current interrupt until the next interrupt occurs. That is, the reference timer value (A) is a value that is half the value expressed by the number of clocks of the CPU 10 representing the load fluctuation cycle.

例えば、CPU10の周波数がFHzであり且つ指定された負荷変動周期がTp秒の場合、変動周期計算部101は、基準タイマ値(A)を(Tp×F)/2と算出する。そして、変動周期計算部101は、算出した基準タイマ値(A=(Tp×F)/2)をタイマ割込セット部102及び試験実行部200のタイマ割込値調整部203へ出力する。 For example, when the frequency of the CPU 10 is FHz and the specified load fluctuation period is Tp seconds, the fluctuation period calculation unit 101 calculates the reference timer value (A) as (Tp×F)/2. Then, the fluctuation cycle calculation unit 101 outputs the calculated reference timer value (A=(Tp×F)/2) to the timer interrupt setting unit 102 and the timer interrupt value adjustment unit 203 of the test execution unit 200.

タイマ割込セット部102は、基準タイマ値(A)の入力を変動周期計算部101から受ける。次に、タイマ割込セット部102は、負荷変動試験開始時における開始時タイマ値(B)をクロック生成部300から取得する。そして、タイマ割込セット部102は、開始時タイマ値(B)に基準タイマ値(A)を加算して次の割り込みを発生させるタイマ割込値(T=B+A)を算出する。そして、タイマ割込セット部102は、タイマ割込値(T)で割り込みが発生するように割込レジスタ400に割り込みを設定する。 The timer interrupt setting unit 102 receives input of the reference timer value (A) from the fluctuation cycle calculation unit 101. Next, the timer interrupt setting unit 102 obtains the start timer value (B) at the start of the load variation test from the clock generation unit 300. Then, the timer interrupt setting unit 102 calculates a timer interrupt value (T=B+A) for generating the next interrupt by adding the reference timer value (A) to the starting timer value (B). Then, the timer interrupt setting unit 102 sets an interrupt in the interrupt register 400 so that an interrupt occurs at the timer interrupt value (T).

また、タイマ割込セット部102は、初回の割り込み発生以降、次の割り込みを発生させるタイミングであるタイマ割込値の入力をタイマ割込値調整部203から受ける。以下では、タイマ割込値を、Tと表す場合がある。タイマ割込セット部102は、取得したタイマ割込値(T)で次の割り込みが発生するように、次の割り込みを割込レジスタ400に設定する。 Furthermore, the timer interrupt setting unit 102 receives from the timer interrupt value adjustment unit 203 an input of a timer interrupt value, which is the timing for generating the next interrupt after the first interrupt occurs. In the following, the timer interrupt value may be expressed as T. The timer interrupt setting unit 102 sets the next interrupt in the interrupt register 400 so that the next interrupt occurs with the acquired timer interrupt value (T).

例えば、次の割り込みが通常の負荷変動周期で発生する場合、タイマ割込セット部102は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算したタイマ割込値(T)の入力をタイマ割込値調整部203から受ける。次に、タイマ割込セット部102は、タイマ割込値(T=t+A)で次の割り込みが発生するように割込レジスタ400に割り込みを設定する。 For example, when the next interrupt occurs at a normal load fluctuation cycle, the timer interrupt setting unit 102 sets the timer interrupt value (T) by adding the reference timer value (A) to the current interrupt occurrence timing (t). is received from the timer interrupt value adjustment unit 203. Next, the timer interrupt setting unit 102 sets an interrupt in the interrupt register 400 so that the next interrupt occurs at the timer interrupt value (T=t+A).

一方、次の割り込みが通常の負荷変動周期で発生しない場合、タイマ割込セット部102は、基準タイマ値(A)に遅延を加えた値を現在の割り込みの発生タイミング(t)に加算したタイマ割込値(T)の入力をタイマ割込値調整部203から受ける。例えば、タイマ割込セット部102は、基準タイマ値(A)を2倍した値であるA×2を基準タイマ値(A)加えた「A×3」を現在の割り込みの発生タイミング(t)に加算したタイマ割込値(t+A×3)の入力をタイマ割込値調整部203から受ける。基準タイマ値(A)の2倍は、負荷変動周期の1周期分にあたる。そして、タイマ割込セット部102は、現在の割り込みの発生タイミング(t)にタイマ値(A×3)を加算したタイマ割込値(t+A×3)で次の割り込みが発生するように割込レジスタ400に次の割り込みを設定する。これにより、負荷変動周期を1周期飛ばした次の負荷変動のタイミングで、アクセス先の切り替えが発生する。 On the other hand, if the next interrupt does not occur in the normal load fluctuation cycle, the timer interrupt setting unit 102 sets the timer interrupt setting unit 102 to the timer interrupt setting unit 102, which adds the value obtained by adding the delay to the reference timer value (A) to the current interrupt occurrence timing (t). The input of the interrupt value (T) is received from the timer interrupt value adjustment unit 203 . For example, the timer interrupt setting unit 102 calculates the current interrupt occurrence timing (t) by adding "A x 3", which is a value obtained by doubling the reference timer value (A), to the reference timer value (A). The timer interrupt value adjustment unit 203 receives an input of the timer interrupt value (t+A×3) added to the timer interrupt value. Twice the reference timer value (A) corresponds to one cycle of the load fluctuation cycle. Then, the timer interrupt setting unit 102 sets the interrupt so that the next interrupt occurs at the timer interrupt value (t+A×3) obtained by adding the timer value (A×3) to the current interrupt occurrence timing (t). Set the next interrupt in register 400. As a result, switching of the access destination occurs at the timing of the next load change after skipping one load change cycle.

試験実行部200は、割り込みが発生する毎にメモリ20又はキャッシュ11へのアクセスを交互に実行することで、メモリ20へのアクセスとキャッシュ11へのアクセスとを周期的に行い負荷変動試験を実行する。また、試験実行部200は、次の通常の負荷変動周期において割り込みが実行可能か否かを判定し、その判定結果に応じて次の割り込みのタイマ割込値を決定する。以下に、試験実行部200の詳細について説明する。試験実行部200は、図2に示すように、メモリアクセス切替部201、タイマ値取得部202、タイマ割込値調整部203及び試験実行時間確認部204を有する。 The test execution unit 200 executes a load fluctuation test by periodically accessing the memory 20 and the cache 11 by alternately accessing the memory 20 or the cache 11 every time an interrupt occurs. do. Furthermore, the test execution unit 200 determines whether or not an interrupt can be executed in the next normal load fluctuation cycle, and determines the timer interrupt value for the next interrupt according to the determination result. Details of the test execution unit 200 will be explained below. As shown in FIG. 2, the test execution section 200 includes a memory access switching section 201, a timer value acquisition section 202, a timer interrupt value adjustment section 203, and a test execution time confirmation section 204.

メモリアクセス切替部201は、メモリ20及びキャッシュ11へのアクセスを管理する。メモリアクセス切替部201は、メモリアクセス部211及びキャッシュアクセス部212を有する。メモリアクセス切替部201は、割込レジスタ400から割り込みを取得して割り込みを発生させる。この際、メモリアクセス切替部201は、割り込みの発生をタイマ値取得部202に通知する。 The memory access switching unit 201 manages access to the memory 20 and the cache 11. The memory access switching unit 201 includes a memory access unit 211 and a cache access unit 212. The memory access switching unit 201 obtains an interrupt from the interrupt register 400 and generates the interrupt. At this time, the memory access switching unit 201 notifies the timer value acquisition unit 202 of the occurrence of the interrupt.

そして、メモリアクセス切替部201は、割り込みが発生すると、メモリアクセス部211によるメモリ20へのアクセスとキャッシュアクセス部212によるキャッシュ11へのアクセスとを切り替える。 When an interrupt occurs, the memory access switching unit 201 switches between access to the memory 20 by the memory access unit 211 and access to the cache 11 by the cache access unit 212.

例えば、キャッシュアクセス部212がキャッシュ11へのアクセスを行っている状態で、割り込みが発生した場合、キャッシュアクセス部212は、キャッシュ11へのアクセスを停止する。そして、メモリアクセス部211は、メモリ20上のキャッシュ11に載っていないデータが格納されたアドレスへのアクセスを開始する。この場合、DDC40によるメモリ20への電力供給が行われる。以下では、メモリ20上のキャッシュ11に載っていないデータが格納されたアドレスへのアクセスを、単に「メモリ20へのアクセス」と呼ぶ。その後、メモリアクセス部211は、次の割り込みが発生するまで、メモリ20へのアクセスを継続する。 For example, if an interrupt occurs while the cache access unit 212 is accessing the cache 11, the cache access unit 212 stops accessing the cache 11. Then, the memory access unit 211 starts accessing the address on the memory 20 where data not stored in the cache 11 is stored. In this case, power is supplied to the memory 20 by the DDC 40. Hereinafter, an access to an address on the memory 20 where data not stored in the cache 11 is stored will be simply referred to as an "access to the memory 20." Thereafter, the memory access unit 211 continues accessing the memory 20 until the next interrupt occurs.

一方、メモリアクセス部211がメモリ20へのアクセスを行っている状態で、割り込みが発生した場合、メモリアクセス部211は、メモリ20へのアクセスを停止する。そして、キャッシュアクセス部212は、キャッシュ11に載っているデータが格納されたアドレスへのアクセスを開始する。この場合、キャッシュアクセス部212によるアクセスは、キャッシュ11に対して行われ、メモリ20へのアクセスは行われない。そのため、DDC40によるメモリ20への電力供給は停止状態となる。以下では、キャッシュ11に載っているデータが格納されたアドレスへのアクセスを、単に「キャッシュ11へのアクセス」と呼ぶ。その後、キャッシュアクセス部212は、次の割り込みが発生するまで、キャッシュ11へのアクセスを継続する。 On the other hand, if an interrupt occurs while the memory access unit 211 is accessing the memory 20, the memory access unit 211 stops accessing the memory 20. Then, the cache access unit 212 starts accessing the address where the data in the cache 11 is stored. In this case, the cache access unit 212 accesses the cache 11 and does not access the memory 20. Therefore, the power supply to the memory 20 by the DDC 40 is stopped. Hereinafter, an access to an address where data stored in the cache 11 is simply referred to as an "access to the cache 11." Thereafter, the cache access unit 212 continues accessing the cache 11 until the next interrupt occurs.

割り込みは、通常は基準タイマ値の間隔で発生するため、メモリアクセス部211によるメモリ20へのアクセスとキャッシュアクセス部212によるキャッシュ11へのアクセスとは、通常の負荷変動周期で繰り返される。また、割り込みの発生タイミングに遅延が加えられた場合、その遅延分、メモリアクセス部211によるメモリ20へのアクセスとキャッシュアクセス部212によるキャッシュ11へのアクセスとの切り替えが遅れる。 Since interrupts normally occur at intervals of the reference timer value, the access to the memory 20 by the memory access unit 211 and the access to the cache 11 by the cache access unit 212 are repeated at normal load fluctuation cycles. Further, when a delay is added to the timing of occurrence of an interrupt, switching between access to the memory 20 by the memory access unit 211 and access to the cache 11 by the cache access unit 212 is delayed by the delay.

タイマ値取得部202は、割り込み発生の通知をメモリアクセス切替部201から受ける。そして、タイマ値取得部202は、通知を受けたタイミングのタイマ値をクロック生成部300から取得する。以下では、タイマ値取得部220が取得したタイマ値を、判定を行うタイミングを現時点として、「現時点タイマ値」と呼ぶ場合がある。以下では、現時点タイマ値を「C」と表す場合がある。そして、タイマ値取得部202は、現時点タイマ値(C)をタイマ割込値調整部203へ出力する。 The timer value acquisition unit 202 receives notification of the occurrence of an interrupt from the memory access switching unit 201. Then, the timer value acquisition unit 202 acquires the timer value at the timing of the notification from the clock generation unit 300. Hereinafter, the timer value acquired by the timer value acquisition unit 220 may be referred to as a "current timer value", with the timing of determination being the current time. Below, the current timer value may be expressed as "C". Then, the timer value acquisition unit 202 outputs the current timer value (C) to the timer interrupt value adjustment unit 203.

タイマ割込値調整部203は、基準タイマ値(A)の入力を変動周期計算部101から受ける。そして、タイマ割込値調整部203は、基準タイマ値(A)を記憶する。また、タイマ割込値調整部203は、後述するように算出した次の割り込みを発生させるタイム割込値(T)を現在の割り込みの発生タイミング(t)として保持する。この現在の割り込みの発生タイミング(t)が、「発生時タイマ値」の一例にあたる。 The timer interrupt value adjustment unit 203 receives input of the reference timer value (A) from the fluctuation period calculation unit 101. The timer interrupt value adjustment unit 203 then stores the reference timer value (A). Further, the timer interrupt value adjustment unit 203 holds a time interrupt value (T) for generating the next interrupt, which is calculated as described later, as the current interrupt generation timing (t). This current interrupt occurrence timing (t) is an example of the "occurrence timer value".

その後、次の割り込みの発生タイミングの判定を行う場合、タイマ割込値調整部203は、現時点タイマ値(C)の入力をタイマ値取得部202から受ける。次に、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算した通常の負荷変動周期での次の割り込みの発生タイミングのタイマ値を算出する。以下では通常の負荷変動周期での次の割り込みの発生タイミングのタイマ値を、「通常時タイマ値」と呼ぶ場合がある。そして、タイマ割込値調整部203は、現時点タイマ値(C)と通常時タイマ値とを比較して、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合うか否かを判定する。次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合えば、タイマ割込値調整部203は、通常時タイマ値をタイマ割込値としてタイマ割込セット部102へ出力する。 Thereafter, when determining the next interrupt generation timing, the timer interrupt value adjustment unit 203 receives the current timer value (C) from the timer value acquisition unit 202. Next, the timer interrupt value adjustment unit 203 calculates the timer value of the next interrupt occurrence timing in the normal load fluctuation cycle by adding the reference timer value (A) to the current interrupt occurrence timing (t). . Hereinafter, the timer value of the next interrupt generation timing in the normal load fluctuation cycle may be referred to as the "normal time timer value." The timer interrupt value adjustment unit 203 then compares the current timer value (C) with the normal timer value to determine whether the next interrupt will occur in time for the next load change in the normal load change cycle. Determine whether If the next interrupt occurs in time for the next load change in the normal load change cycle, timer interrupt value adjustment section 203 outputs the normal timer value as a timer interrupt value to timer interrupt setting section 102. .

これに対して、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合わない場合、タイマ割込値調整部203は、次の割り込みの発生タイミングに対する遅延の付加を決定する。そして、タイマ割込値調整部203は、基準タイマ値(A)を用いて、次の割り込みの発生させるために付加する遅延の量を決定する。そして、タイマ割込値調整部203は、決定した遅延量に基準タイマ値(A)及び現在の割り込みの発生タイミング(t)を加算した値を次の割り込みのタイマ割込値としてタイマ割込セット部102へ出力する。 On the other hand, if the occurrence of the next interrupt is not in time for the timing of the next load change in the normal load variation cycle, the timer interrupt value adjustment unit 203 determines to add a delay to the timing of the occurrence of the next interrupt. . Then, the timer interrupt value adjustment unit 203 uses the reference timer value (A) to determine the amount of delay to be added to generate the next interrupt. Then, the timer interrupt value adjustment unit 203 sets the timer interrupt as the timer interrupt value of the next interrupt by adding the reference timer value (A) and the current interrupt occurrence timing (t) to the determined delay amount. It outputs to section 102.

例えば、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算して、通常時タイマ値として「t+A」を算出する。 For example, the timer interrupt value adjustment unit 203 adds the reference timer value (A) to the current interrupt occurrence timing (t) to calculate "t+A" as the normal timer value.

そして、タイマ割込値調整部203は、通常時タイマ値(t+A)が現時点タイマ値(C)よりも後、すなわちC<t+Aか否かを判定する。通常時タイマ値(t+A)が現時点タイマ値(C)よりも後(C<t+A)であれば、次の割り込みの発生が通常の負荷変動周期の次の負荷変動のタイミングに間に合うので、タイマ割込値調整部203は、通常時タイマ値(t+A)をタイマ割込値とする。そして、タイマ割込値調整部203は、通常時タイマ値(t+A)をタイマ割込値としてタイマ割込セット部102へ出力する。 Then, the timer interrupt value adjustment unit 203 determines whether the normal timer value (t+A) is later than the current timer value (C), that is, whether C<t+A. If the normal timer value (t+A) is later than the current timer value (C) (C<t+A), the next interrupt will occur in time for the next load change in the normal load change cycle, so the timer interrupt The input value adjustment unit 203 sets the normal timer value (t+A) as the timer interrupt value. Then, the timer interrupt value adjustment unit 203 outputs the normal timer value (t+A) to the timer interrupt setting unit 102 as a timer interrupt value.

一方、通常時タイマ値(t+A)が現時点タイマ値(C)よりも先(C≧t+A)であれば、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合わないので、タイマ割込値調整部203は、次の割り込みの発生の遅延を決定する。そして、タイマ割込値調整部203は、次の負荷変動周期の1周期が経過した後の次の負荷変動のタイミングで次の割り込みを発生させるために、基準タイマ値(A)に1周期分のタイマ値(A×2)を加算したタイマ値(A×3)を算出する。そして、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に算出したタイマ値(A×3)を加算したタイマ値であるt+A×3をタイマ割込値(T)とする。タイマ割込値調整部203は、値がt+A×3であるタイマ割込値をタイマ割込セット部102へ出力する。 On the other hand, if the normal timer value (t+A) is ahead of the current timer value (C) (C≧t+A), the next interrupt will not occur in time for the next load change in the normal load change cycle. , the timer interrupt value adjustment unit 203 determines the delay in generating the next interrupt. Then, the timer interrupt value adjustment unit 203 adds one cycle to the reference timer value (A) in order to generate the next interrupt at the timing of the next load variation after one cycle of the next load variation cycle has elapsed. A timer value (A x 3) is calculated by adding the timer value (A x 2) of . Then, the timer interrupt value adjustment unit 203 sets the timer interrupt value (T) to t+A×3, which is the timer value obtained by adding the calculated timer value (A×3) to the current interrupt occurrence timing (t). . The timer interrupt value adjustment unit 203 outputs a timer interrupt value having a value of t+A×3 to the timer interrupt setting unit 102.

ここで、本実施例では、タイマ割込値調整部203は、次の割り込みの発生が次の通常の負荷変動周期のタイミングに間に合わない場合、次の割り込みを負荷変動周期の1周期経過後の次の負荷変動のタイミングで発生させた。だだし、負荷変動周期が維持可能であれば遅延の量はこれに限らず、タイマ割込値調整部203は、他のタイミングで次の割り込みを発生させてもよい。例えば、タイマ割込値調整部203は、次の割り込みを負荷変動周期の2周期経過後の次の負荷変動のタイミングで発生させてもよい。ただし、次の割り込みタイミングが遅くなると、負荷変動試験において実施される負荷変動が減るため、次の割り込みの発生はなるべく早くすることが好ましい。 Here, in the present embodiment, if the occurrence of the next interrupt is not in time for the next normal load fluctuation cycle, the timer interrupt value adjustment unit 203 transmits the next interrupt after one cycle of the load fluctuation cycle has elapsed. It occurred at the timing of the next load change. However, the amount of delay is not limited to this, and the timer interrupt value adjustment unit 203 may generate the next interrupt at another timing as long as the load fluctuation cycle can be maintained. For example, the timer interrupt value adjustment unit 203 may generate the next interrupt at the timing of the next load change after two load change cycles have elapsed. However, if the next interrupt timing is delayed, the load fluctuations performed in the load fluctuation test will be reduced, so it is preferable to generate the next interrupt as early as possible.

試験実行時間確認部204は、クロック生成部300から出力されるクロックを用いて試験開始からの経過時間を監視する。そして、試験実行時間確認部204は、経過時間が予め決められた試験実行時間に達していなければ、メモリ20及びキャッシュ11への周期的な交互のアクセスをメモリアクセス切替部201に継続させる。 The test execution time confirmation unit 204 monitors the elapsed time from the start of the test using the clock output from the clock generation unit 300. Then, if the elapsed time has not reached the predetermined test execution time, the test execution time confirmation unit 204 causes the memory access switching unit 201 to continue periodically accessing the memory 20 and the cache 11 alternately.

これに対して、経過時間が試験実行時間に達した場合、試験実行時間確認部204は、メモリアクセス切替部201によるメモリ20及びキャッシュ11へのアクセスを停止させて、試験を終了する。 On the other hand, when the elapsed time reaches the test execution time, the test execution time confirmation unit 204 stops the memory access switching unit 201 from accessing the memory 20 and the cache 11, and ends the test.

次に、図3を参照して、負荷変動試験処理の全体的な流れを説明する。図3は、負荷変動試験処理のフローチャートである。 Next, the overall flow of the load fluctuation test process will be explained with reference to FIG. FIG. 3 is a flowchart of load fluctuation test processing.

変動周期計算部101は、CPU周波数(F)をクロック生成部300から取得する(ステップS1)。 The fluctuation period calculation unit 101 acquires the CPU frequency (F) from the clock generation unit 300 (step S1).

次に、変動周期計算部101は、作業者からの入力などにより負荷変動周期(Tp)を取得する(ステップS2)。 Next, the fluctuation cycle calculation unit 101 obtains a load fluctuation cycle (Tp) based on input from the operator or the like (step S2).

次に、変動周期計算部101は、CPU周波数(F)を用いて負荷変動周期(Tp)を表すタイマ値(T×F)を求める。そして、変動周期計算部101は、メモリ20へのアクセスとキャッシュ11へのアクセスの切り替え間隔である基準タイマ値(A=(T×F)/2)を算出する(ステップS3)。そして、変動周期計算部101は、算出した基準タイマ値(A)をタイマ割込セット部102及びタイマ割込値調整部203へ出力する。タイマ割込セット部102及びタイマ割込値調整部203は、基準タイマ値(A)の入力を変動周期計算部101から受ける。 Next, the fluctuation period calculation unit 101 uses the CPU frequency (F) to obtain a timer value (T×F) representing the load fluctuation period (Tp). Then, the fluctuation cycle calculation unit 101 calculates a reference timer value (A=(T×F)/2), which is the switching interval between access to the memory 20 and access to the cache 11 (step S3). Then, the fluctuation period calculating section 101 outputs the calculated reference timer value (A) to the timer interrupt setting section 102 and the timer interrupt value adjusting section 203. The timer interrupt setting unit 102 and the timer interrupt value adjustment unit 203 receive input of the reference timer value (A) from the fluctuation cycle calculation unit 101.

次に、タイマ割込セット部102は、クロック生成部300から開始時タイマ値(B)を取得する。また、タイマ割込セット部102は、基準タイマ値(A)を変動周期計算部101から取得する。そして、タイマ割込セット部102は、開始時タイマ値(B)に基準タイマ値(A)を加算して最初の割り込みのタイマ割込値(T)を算出する。そして、タイマ割込セット部102は、タイマ割込値(T)で最初の割り込みが発生するように割込レジスタ400に設定する。これにより、アクセス先の切り替えの割り込みが開始される(ステップS4)。メモリアクセス切替部201は、割込レジスタ400に格納された割り込みをタイマ割込値(T)で取得して、アクセス先を切替える。 Next, the timer interrupt setting unit 102 obtains the start timer value (B) from the clock generation unit 300. Further, the timer interrupt setting unit 102 obtains a reference timer value (A) from the fluctuation cycle calculation unit 101. Then, the timer interrupt setting unit 102 calculates the timer interrupt value (T) of the first interrupt by adding the reference timer value (A) to the starting timer value (B). Then, the timer interrupt setting unit 102 sets the interrupt register 400 so that the first interrupt occurs at the timer interrupt value (T). As a result, an interrupt for switching the access destination is started (step S4). The memory access switching unit 201 obtains the interrupt stored in the interrupt register 400 as a timer interrupt value (T), and switches the access destination.

タイマ値取得部202は、現時点タイマ値(C)をクロック生成部300から取得する(ステップS5)。そして、タイマ値取得部202は、取得した現時点タイマ値(C)をタイマ割込値調整部203へ出力する。タイマ割込値調整部203は、現時点タイマ値(C)の入力をタイマ値取得部202から受ける。 The timer value acquisition unit 202 acquires the current timer value (C) from the clock generation unit 300 (step S5). Then, the timer value acquisition unit 202 outputs the acquired current timer value (C) to the timer interrupt value adjustment unit 203. The timer interrupt value adjustment unit 203 receives input of the current timer value (C) from the timer value acquisition unit 202.

次に、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算して、通常時タイマ値(t+A)を算出する。そして、タイマ割込値調整部203は、現時点タイマ値(C)と通常時タイマ値(t+A)とを比較して、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合うか否かを判定する(ステップS6)。 Next, the timer interrupt value adjustment unit 203 adds the reference timer value (A) to the current interrupt occurrence timing (t) to calculate the normal timer value (t+A). Then, the timer interrupt value adjustment unit 203 compares the current timer value (C) and the normal timer value (t+A), and determines whether the next interrupt will occur at the timing of the next load change in the normal load change cycle. It is determined whether or not it will be on time (step S6).

次の割り込みの発生が通常の負荷変動周期の次の負荷変動のタイミングに間に合う場合(ステップS6:肯定)、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算した通常時タイマ値(t+A)をタイマ割込値(T)として算出する。そして、タイマ割込値調整部203は、通常時タイマ値(t+A)であるタイマ割込値(T)をタイマ割込セット部102へ出力する。タイマ割込セット部102は、通常時タイマ値(t+A)であるタイマ割込値(T)をタイマ割込値調整部203から取得する。この場合、タイマ割込値(T)は、次の通常の負荷変動周期のタイミングである。そして、タイマ割込セット部102は、次の通常の負荷変動周期で発生するように次の割り込みを割込レジスタ400に設定する(ステップS7)。 If the occurrence of the next interrupt is in time for the timing of the next load variation in the normal load variation cycle (step S6: affirmative), the timer interrupt value adjustment unit 203 sets the reference timer value to the timing (t) of occurrence of the current interrupt. The normal timer value (t+A) obtained by adding (A) is calculated as the timer interrupt value (T). Then, the timer interrupt value adjustment unit 203 outputs the timer interrupt value (T), which is the normal timer value (t+A), to the timer interrupt setting unit 102. The timer interrupt setting unit 102 obtains the timer interrupt value (T), which is the normal timer value (t+A), from the timer interrupt value adjustment unit 203. In this case, the timer interrupt value (T) is the timing of the next normal load fluctuation cycle. Then, the timer interrupt setting unit 102 sets the next interrupt in the interrupt register 400 so that it will occur at the next normal load fluctuation cycle (step S7).

これに対して、次の割り込みの発生が次の通常の負荷変動周期のタイミングに間に合わない場合(ステップS6:否定)、タイマ割込値調整部203は、基準タイマ値(A)に負荷変動周期の1周期分の遅延を付加したタイマ値であるA×3を算出する。次に、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に算出したタイマ値(A×3)を加算した値(t+A×3)をタイマ割込値(T)とする。すなわち、この場合、タイマ割込値(T)は、負荷変動周期の1周期経過後の次の負荷変動のタイミングである。そして、タイマ割込値調整部203は、算出したタイマ値(t+A×3)であるタイマ割込値(T)をタイマ割込セット部102へ出力する。タイマ割込セット部102は、タイマ値(t+A×3)であるタイマ割込値(T)の入力をタイマ割込値調整部203から受ける。そして、タイマ割込セット部102は、負荷変動周期の1周期経過後の次の負荷変動のタイミングで発生するように次の割り込みを割込レジスタ400に設定する(ステップS8)。 On the other hand, if the occurrence of the next interrupt is not in time for the timing of the next normal load fluctuation cycle (step S6: negative), the timer interrupt value adjustment unit 203 adjusts the load fluctuation cycle to the reference timer value (A). A×3, which is a timer value with one cycle of delay added, is calculated. Next, the timer interrupt value adjustment unit 203 sets the timer interrupt value (T) to the value (t+A×3) obtained by adding the calculated timer value (A×3) to the current interrupt occurrence timing (t). . That is, in this case, the timer interrupt value (T) is the timing of the next load change after one load change cycle has elapsed. Then, the timer interrupt value adjustment unit 203 outputs the timer interrupt value (T), which is the calculated timer value (t+A×3), to the timer interrupt setting unit 102. The timer interrupt setting unit 102 receives an input of a timer interrupt value (T), which is a timer value (t+A×3), from the timer interrupt value adjustment unit 203. Then, the timer interrupt setting unit 102 sets the next interrupt in the interrupt register 400 so that it occurs at the timing of the next load change after one load change cycle has passed (step S8).

メモリアクセス切替部201は、設定されたタイマ割込値(T)で次の割り込みを割込レジスタ400から取得して、割り込みを発生させる。そして、メモリアクセス切替部201は、設定されたタイマ割込値(T)での割り込み発生を契機に、メモリアクセス部211によるメモリ20へのアクセスとキャッシュアクセス部212によるキャッシュ11へのアクセスとの切り替えを実行する(ステップS9)。 The memory access switching unit 201 obtains the next interrupt from the interrupt register 400 at the set timer interrupt value (T) and generates an interrupt. Then, the memory access switching unit 201 switches between access to the memory 20 by the memory access unit 211 and access to the cache 11 by the cache access unit 212, triggered by the occurrence of an interrupt at the set timer interrupt value (T). The switching is performed (step S9).

試験実行時間確認部204は、負荷変動試験開始からの経過時間をクロック生成部300から取得する。そして、試験実行時間確認部204は、負荷変動試験開始からの経過時間が試験実行時間に達したか否かにより、負荷変動試験を終了するか否かを判定する(ステップS10)。 The test execution time confirmation unit 204 acquires the elapsed time from the start of the load fluctuation test from the clock generation unit 300. Then, the test execution time confirmation unit 204 determines whether to end the load variation test based on whether the elapsed time from the start of the load variation test has reached the test execution time (step S10).

負荷変動試験を終了しない場合(ステップS10:否定)、試験実行時間確認部204は、メモリアクセス切替部201によりアクセス先の切り替え処理を継続させる。そして、負荷変動試験処理はステップS5へ戻る。 If the load fluctuation test is not completed (step S10: negative), the test execution time confirmation unit 204 causes the memory access switching unit 201 to continue the process of switching the access destination. Then, the load fluctuation test process returns to step S5.

これに対して、負荷変動試験を終了する場合(ステップS10:肯定)、試験実行時間確認部204は、メモリアクセス切替部201によるアクセス先の切り替え処理を停止させて負荷変動処理を終了させる。 On the other hand, if the load variation test is to be ended (step S10: affirmative), the test execution time confirmation unit 204 stops the access destination switching process by the memory access switching unit 201 and ends the load variation process.

次に、図4を参照して、タイマ割込値の設定処理の詳細を説明する。図4は、タイマ割込値の設定処理の詳細を表すフローチャートである。 Next, details of the timer interrupt value setting process will be described with reference to FIG. FIG. 4 is a flowchart showing details of the timer interrupt value setting process.

変動周期計算部101は、CPU周波数(F)及び負荷変動周期(Tp)を用いて基準タイマ値(A)を算出する(ステップS101)。タイマ割込セット部102及びタイマ割込値調整部203は、基準タイマ値(A)を変動周期計算部101から取得する。 The fluctuation period calculation unit 101 calculates a reference timer value (A) using the CPU frequency (F) and the load fluctuation period (Tp) (step S101). The timer interrupt setting unit 102 and the timer interrupt value adjustment unit 203 acquire the reference timer value (A) from the fluctuation cycle calculation unit 101.

次に、変動周期計算部101は、開始時タイマ値(B)に基準タイマ値(A)を加算して、最初のタイマ割込値(T=B+A)を算出する。そして、変動周期計算部101は、最初のタイマ割込値(T)で発生するように割り込みを割込レジスタ400に設定する(ステップS102)。 Next, the fluctuation cycle calculation unit 101 adds the reference timer value (A) to the starting timer value (B) to calculate the first timer interrupt value (T=B+A). Then, the fluctuation cycle calculation unit 101 sets an interrupt in the interrupt register 400 so that it occurs at the first timer interrupt value (T) (step S102).

設定されたタイマ割込値(T)で次の割り込みが発生し、DDC40は、メモリ20の電源をオンにして電力供給を開始する。キャッシュアクセス部212は、キャッシュ11へのアクセスを行っている場合、そのアクセスを停止する。そして、メモリアクセス部211は、メモリ20へのアクセスを実行する(ステップS103)。 The next interrupt occurs at the set timer interrupt value (T), and the DDC 40 turns on the power to the memory 20 and starts supplying power. If the cache access unit 212 is accessing the cache 11, it stops the access. The memory access unit 211 then accesses the memory 20 (step S103).

その後、メモリアクセス切替部201は、割込レジスタ400から割り込みを取得して、割り込みを発生させる(ステップS104)。この際、メモリアクセス切替部201は、割り込みの発生をタイマ値取得部202に通知する。 After that, the memory access switching unit 201 obtains an interrupt from the interrupt register 400 and generates the interrupt (step S104). At this time, the memory access switching unit 201 notifies the timer value acquisition unit 202 of the occurrence of the interrupt.

タイマ値取得部202は、割り込み発生の通知を受けて、現時点タイマ値(C)をクロック生成部300から取得する。タイマ割込値調整部203は、現時点タイマ値(C)の入力をタイマ値取得部202から受ける(ステップS105)。 The timer value acquisition unit 202 receives the notification of the occurrence of the interrupt and acquires the current timer value (C) from the clock generation unit 300. The timer interrupt value adjustment unit 203 receives the input of the current timer value (C) from the timer value acquisition unit 202 (step S105).

次に、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算して通常時タイマ値(t+A)を算出する。そして、タイマ割込値調整部203は、通常時タイマ値(t+A)が現時点タイマ値(C)より後か否か、すなわちCがt+Aより小さいか否かを判定する(ステップS106)。 Next, the timer interrupt value adjustment unit 203 calculates a normal timer value (t+A) by adding the reference timer value (A) to the current interrupt occurrence timing (t). Then, the timer interrupt value adjustment unit 203 determines whether the normal timer value (t+A) is after the current timer value (C), that is, whether C is smaller than t+A (step S106).

ここで、Cがt+Aより小さい場合について、図5を参照して説明する。図5は、次の割り込みの発生が次の通常の負荷変動のタイミングに間に合う場合のタイマ割込値の算出を説明するための図である。図5は、縦軸で電流を表し、横軸で時間経過を表す。電流の値は紙面の上に向かうにしたがい高くなる。電流が高い状態は、DDC40によるメモリ20に対する電源がオンの状態を表し、電流が低い状態は、DDC40によるメモリ20に対する電源がオフの状態を表す。 Here, the case where C is smaller than t+A will be explained with reference to FIG. FIG. 5 is a diagram for explaining calculation of a timer interrupt value when the next interrupt occurs in time for the next normal load change timing. In FIG. 5, the vertical axis represents current, and the horizontal axis represents the passage of time. The value of the current increases toward the top of the page. A state where the current is high represents a state where the power to the memory 20 by the DDC 40 is on, and a state where the current is low represents a state where the power to the memory 20 by the DDC 40 is off.

通常の負荷変動周期の場合、メモリ20へのアクセス期間は、基準タイマ値(A)にあたる。同様に、キャッシュ11へのアクセス期間は、基準タイマ値(A)にあたる。そこで、図5に示すように、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算したタイマ値(t+A)である通常時タイマ値の時点が、通常の負荷変動周期における次の負荷変動のタイミングとなる。この場合、次の負荷変動のタイミングは、電源オフとなるタイミングである。そして、この判定を行う時点での現時点タイマ値(C)がタイマ値(t+A)よりも小さいということは、図5に示すように、通常の負荷変動周期における次の負荷変動のタイミングよりも前で判定を行っていることを表す。すなわち、現時点であれば、通常の負荷変動のタイミングで次の割り込みを発生させることが可能である。 In the case of a normal load fluctuation cycle, the access period to the memory 20 corresponds to the reference timer value (A). Similarly, the access period to the cache 11 corresponds to the reference timer value (A). Therefore, as shown in Figure 5, the normal timer value, which is the timer value (t+A) obtained by adding the reference timer value (A) to the current interrupt occurrence timing (t), is the next time in the normal load fluctuation cycle. This is the timing of load fluctuations. In this case, the timing of the next load change is the timing at which the power is turned off. As shown in Figure 5, the current timer value (C) at the time of making this determination is smaller than the timer value (t+A), which means that the timing of the next load change in the normal load change cycle is indicates that a judgment is being made. That is, at present, it is possible to generate the next interrupt at the timing of normal load fluctuations.

そこで、図4に戻って説明を続ける。Cがt+Aより小さい場合(ステップS106:肯定)、タイマ割込値調整部203は、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合うと判定する。そして、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算したタイマ値(t+A)である通常時タイマ値をタイマ割込値としてタイマ割込セット部102へ出力する。タイマ割込セット部102は、取得したタイマ割込値(T=t+A)で発生するように次の割り込みを割込レジスタ400に設定する(ステップS107)。これにより図5に示すように、タイマ値がt+Aのタイミングで次の割り込みが発生し、DDC40が電源オフとなり、キャッシュ11へのアクセスに切り替わる。 Therefore, the explanation will be continued by returning to FIG. 4. If C is smaller than t+A (step S106: affirmative), the timer interrupt value adjustment unit 203 determines that the next interrupt will occur in time for the next load change in the normal load change cycle. Then, the timer interrupt value adjustment unit 203 sets the normal timer value (t+A), which is the timer value (t+A) obtained by adding the reference timer value (A) to the current interrupt occurrence timing (t), as the timer interrupt value. It is output to the set section 102. The timer interrupt setting unit 102 sets the next interrupt in the interrupt register 400 so that it occurs at the acquired timer interrupt value (T=t+A) (step S107). As a result, as shown in FIG. 5, the next interrupt occurs when the timer value reaches t+A, the DDC 40 is powered off, and access to the cache 11 is switched.

次に、Cがt+A以上の場合について、図6を参照して説明する。図6は、次の割り込みの発生が次の通常の負荷変動のタイミングに間に合わない場合のタイマ割込値の算出を説明するための図である。図6は、縦軸で電流を表し、横軸で時間経過を表す。 Next, the case where C is greater than or equal to t+A will be described with reference to FIG. FIG. 6 is a diagram for explaining calculation of a timer interrupt value when the next interrupt is not generated in time for the next normal load change timing. In FIG. 6, the vertical axis represents the current, and the horizontal axis represents the passage of time.

図6に示すように、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算したタイマ値(t+A)の時点が、通常の負荷変動周期の次の負荷変動のタイミングにあたる。この場合、次の負荷変動のタイミングは、電源オフとなるタイミングである。そして、この判定を行う時点での現時点タイマ値(C)がタイマ値(t+A)以上ということは、図6に示すように、この時点で通常の負荷変動周期の次の負荷変動のタイミングを既に過ぎていることを表す。すなわち、現時点では、通常の負荷変動周期のタイミングで次の割り込みを発生させることが困難である。現時点から見て、次の電源オフのタイミングは、負荷変動周期が1周期経過後の次の負荷変動のタイミングである。すなわち、タイマ値がt+A×3となるタイミングが、負荷変動周期における次の電源オフのタイミングである。 As shown in FIG. 6, the timing of the timer value (t+A) obtained by adding the reference timer value (A) to the current interrupt generation timing (t) corresponds to the timing of the next load fluctuation in the normal load fluctuation cycle. In this case, the timing of the next load change is the timing at which the power is turned off. The fact that the current timer value (C) at the time of making this determination is greater than or equal to the timer value (t+A) means that the timing of the next load change in the normal load change cycle has already been determined at this point, as shown in Figure 6. It means that it has passed. That is, at present, it is difficult to generate the next interrupt at the timing of the normal load fluctuation cycle. From the current point of view, the timing of the next power off is the timing of the next load fluctuation after one load fluctuation period has elapsed. That is, the timing at which the timer value becomes t+A×3 is the next power-off timing in the load fluctuation cycle.

そこで、図4に戻って説明を続ける。Cがt+A以上の場合(ステップS106:否定)、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合わないので、タイマ割込値調整部203は、次の割り込みの発生タイミングの遅延を決定する。次に、タイマ割込値調整部203は、基準タイマ値(A)に負荷変動周期の1周期分のタイマ値(A×2)を加算した値(A×3)を、現在の割り込みの発生タイミング(t)に加算して、加算した値(t+A×3)を次の割り込みのタイマ割込値(T)とする。そして、タイマ割込値調整部203は、算出したタイマ割込値(T=t+A×3)をタイマ割込セット部102へ出力する。タイマ割込セット部102は、取得したタイマ割込値(T=t+A×3)で発生するように次の割り込みを割込レジスタ400に設定する(ステップS108)。これにより、図6に示すように、タイマ値がt+A×3のタイミングで次の割り込みが発生し、DDC40が電源オフとなり、キャッシュ11へのアクセスに切り替わる。この場合、図6の破線50で表される負荷変動が省略される。 Therefore, the explanation will be continued by returning to FIG. 4. If C is greater than or equal to t+A (step S106: negative), the occurrence of the next interrupt will not be in time for the timing of the next load change in the normal load change cycle, so the timer interrupt value adjustment unit 203 prevents the occurrence of the next interrupt. Determine timing delays. Next, the timer interrupt value adjustment unit 203 adds the timer value (A x 2) for one cycle of the load fluctuation cycle to the reference timer value (A) and adds the value (A x 3) to the current interrupt value. It is added to the timing (t) and the added value (t+A×3) is set as the timer interrupt value (T) of the next interrupt. Then, the timer interrupt value adjustment unit 203 outputs the calculated timer interrupt value (T=t+A×3) to the timer interrupt setting unit 102. The timer interrupt setting unit 102 sets the next interrupt in the interrupt register 400 so that it occurs at the obtained timer interrupt value (T=t+A×3) (step S108). As a result, as shown in FIG. 6, the next interrupt occurs at the timing when the timer value is t+A×3, the DDC 40 is powered off, and access to the cache 11 is switched. In this case, the load fluctuation represented by the broken line 50 in FIG. 6 is omitted.

設定された次の割り込みのタイマ割込値(T)で割り込みが発生し、DDC40は、メモリ20に対する電源をオフにして電力供給を停止する。メモリアクセス部211は、メモリ20へのアクセスを停止する。キャッシュアクセス部212は、キャッシュ11へのアクセスを実行する(ステップS109)。 An interrupt occurs at the set timer interrupt value (T) of the next interrupt, and the DDC 40 turns off the power to the memory 20 and stops supplying power. The memory access unit 211 stops accessing the memory 20. The cache access unit 212 accesses the cache 11 (step S109).

その後、メモリアクセス切替部201は、割込レジスタ400から割り込みを取得して、割り込みを発生させる(ステップS110)。メモリアクセス切替部201は、割り込みの発生をタイマ値取得部202に通知する。 After that, the memory access switching unit 201 obtains an interrupt from the interrupt register 400 and generates the interrupt (step S110). The memory access switching unit 201 notifies the timer value acquisition unit 202 of the occurrence of an interrupt.

タイマ値取得部202は、割り込み発生の通知を受けて、現時点タイマ値(C)をクロック生成部300から取得する。タイマ割込値調整部203は、現時点タイマ値(C)の入力をタイマ値取得部202から受ける。また、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)をタイマ割込セット部102から取得する(ステップS111)。 The timer value acquisition unit 202 receives the notification of the occurrence of the interrupt and acquires the current timer value (C) from the clock generation unit 300. The timer interrupt value adjustment unit 203 receives input of the current timer value (C) from the timer value acquisition unit 202. Furthermore, the timer interrupt value adjustment unit 203 acquires the current interrupt occurrence timing (t) from the timer interrupt setting unit 102 (step S111).

次に、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算して通常時タイマ値(t+A)を算出する。そして、タイマ割込値調整部203は、通常時タイマ値(t+A)が現時点タイマ値(C)より後か否か、すなわちCがt+Aより小さいか否かを判定する(ステップS112)。 Next, the timer interrupt value adjustment unit 203 calculates a normal timer value (t+A) by adding the reference timer value (A) to the current interrupt occurrence timing (t). Then, the timer interrupt value adjustment unit 203 determines whether the normal timer value (t+A) is after the current timer value (C), that is, whether C is smaller than t+A (step S112).

Cがt+Aより小さい場合(ステップS112:肯定)、タイマ割込値調整部203は、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合うと判定する。そして、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に基準タイマ値(A)を加算して、加算した値(t+A)を次の割り込みのタイマ割込値(T)とする。タイマ割込値調整部203は、算出したタイマ割込値(T=t+A)をタイマ割込セット部102へ出力する。タイマ割込セット部102は、取得したタイマ割込値(T=t+A)で発生するように次の割り込みを割込レジスタ400に設定する(ステップS113)。この場合の判定処理は、図5の電源のオンオフを逆にした場合で表される。 If C is smaller than t+A (step S112: affirmative), the timer interrupt value adjustment unit 203 determines that the next interrupt will occur in time for the next load change in the normal load change cycle. Then, the timer interrupt value adjustment unit 203 adds the reference timer value (A) to the current interrupt occurrence timing (t), and sets the added value (t+A) as the timer interrupt value (T) of the next interrupt. shall be. Timer interrupt value adjustment section 203 outputs the calculated timer interrupt value (T=t+A) to timer interrupt setting section 102. The timer interrupt setting unit 102 sets the next interrupt in the interrupt register 400 so that it occurs at the acquired timer interrupt value (T=t+A) (step S113). The determination process in this case is represented by reversing the on/off state of the power supply in FIG.

これに対して、Cがt+A以上の場合(ステップS112:否定)、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合わないので、タイマ割込値調整部203は、次の割り込みの発生の遅延を決定する。そして、タイマ割込値調整部203は、基準タイマ値(A)に負荷変動周期の1周期分のタイマ値(A×2)を加算したタイマ値(A×3)を算出する。次に、タイマ割込値調整部203は、現在の割り込みの発生タイミング(t)に算出したタイマ値(A×3)を加算して算出したタイマ値(t+A×3)を次の割り込みのタイマ割込値(T)とする。タイマ割込値調整部203は、算出したタイマ割込値(T=t+A×3)をタイマ割込セット部102へ出力する。タイマ割込セット部102は、取得したタイマ割込値(T=t+A×3)で発生するように割り込みを割込レジスタ400に設定する(ステップS114)。この場合の判定処理は、図6の電源のオンオフを逆にした場合で表される。 On the other hand, if C is greater than or equal to t+A (step S112: negative), the occurrence of the next interrupt will not be in time for the timing of the next load change in the normal load change cycle, so the timer interrupt value adjustment unit 203 Determines the delay for the next interrupt to occur. Then, the timer interrupt value adjustment unit 203 calculates a timer value (A×3) by adding the timer value (A×2) for one cycle of the load fluctuation cycle to the reference timer value (A). Next, the timer interrupt value adjustment unit 203 adds the calculated timer value (A x 3) to the current interrupt occurrence timing (t) and sets the calculated timer value (t+A x 3) to the timer value of the next interrupt. Let it be the interrupt value (T). The timer interrupt value adjustment unit 203 outputs the calculated timer interrupt value (T=t+A×3) to the timer interrupt setting unit 102. The timer interrupt setting unit 102 sets an interrupt in the interrupt register 400 so that it occurs at the acquired timer interrupt value (T=t+A×3) (step S114). The determination process in this case is represented by reversing the on/off state of the power supply in FIG.

その後、試験実行時間確認部204は、試験開始からの経過時間と試験実行時間とを比較し、試験実行時間を経過したか否かを判定する(ステップS115)。試験実行時間を経過していない場合(ステップS115:否定)、処理はステップS103へ戻る。これに対して、試験実行時間を経過した場合(ステップS115:肯定)、試験実行時間確認部204は、負荷変動試験を終了させる。 Thereafter, the test execution time confirmation unit 204 compares the elapsed time from the start of the test with the test execution time, and determines whether the test execution time has elapsed (step S115). If the test execution time has not elapsed (step S115: negative), the process returns to step S103. On the other hand, if the test execution time has elapsed (step S115: affirmative), the test execution time confirmation unit 204 ends the load variation test.

図7は、切り替えの周期を飛ばした場合の負荷変動試験全体における負荷変動の一例を表す図である。タイマ割込値調整部203は、タイマ割込値を調整する場合、1周期分の切り替えを省略する。ただし、負荷変動試験において、メモリアクセス切替部201は、数万回のアクセス切り替えを行う。そのため、図7に示すように、負荷変動試験全体の負荷変動に対して省略された負荷変動は小さい。また、負荷変動試験全体に対してタイマ割込値を調整する頻度も小さいため、本実施形態に係る負荷変動試験プログラムによる負荷変動の省略の影響も小さく、負荷変動試験は正確に実施可能である。 FIG. 7 is a diagram showing an example of load fluctuation in the entire load fluctuation test when the switching cycle is skipped. When adjusting the timer interrupt value, the timer interrupt value adjustment unit 203 omits switching for one cycle. However, in the load variation test, the memory access switching unit 201 performs access switching tens of thousands of times. Therefore, as shown in FIG. 7, the omitted load variation is small compared to the load variation of the entire load variation test. Furthermore, since the frequency of adjusting the timer interrupt value for the entire load variation test is small, the effect of omitting load variation in the load variation test program according to this embodiment is small, and the load variation test can be performed accurately. .

図8は、実施例1に係る負荷変動試験プログラムを用いて行った負荷変動試験の具体例の図である。図8は、縦軸で電流を表し、横軸で時間経過を表す。ここでは、CPU10が周波数100MHzの単一プロセッサであり、作成したい負荷変動周期が1μ秒であり、試験実行時間が100秒である場合で説明する。 FIG. 8 is a diagram of a specific example of a load variation test conducted using the load variation test program according to the first embodiment. In FIG. 8, the vertical axis represents the current, and the horizontal axis represents the passage of time. Here, a case will be explained in which the CPU 10 is a single processor with a frequency of 100 MHz, the load fluctuation period to be created is 1 μsec, and the test execution time is 100 seconds.

変動周期計算部101は、CPU10の周波数から基準タイマ値を計算する。ここでは、CPU10の周波数が100MHzであり、作成したい負荷変動周期が1μ秒であるので、変動周期計算部101は、基準タイマ値を1×10-6×100/2×10-6=50として算出する。 The fluctuation cycle calculation unit 101 calculates a reference timer value from the frequency of the CPU 10. Here, since the frequency of the CPU 10 is 100 MHz and the load fluctuation cycle to be created is 1 μsec, the fluctuation cycle calculation unit 101 sets the reference timer value to 1×10 −6 ×100/2×10 −6 = 50. calculate.

タイマ割込セット部102は、周期1μの負荷変動周期での負荷変動を開始するために以下の処理を実行する。タイマ割込セット部102は、開始時タイマ値として10をクロック生成部300から取得する。次に、タイマ割込セット部102は、開始タイマ値に基準タイマ値を加算して10+50により最初の割り込みを発生させるタイマ割込値を算出する。そして、タイマ割込セット部102は、60のタイマ割込値で発生するように割込レジスタ400に割り込みを設定する。 The timer interrupt setting unit 102 executes the following process in order to start load fluctuation with a load fluctuation period of 1μ. The timer interrupt setting unit 102 obtains 10 from the clock generation unit 300 as a starting timer value. Next, the timer interrupt setting unit 102 adds the reference timer value to the start timer value and calculates the timer interrupt value for generating the first interrupt by 10+50. Then, the timer interrupt setting unit 102 sets an interrupt in the interrupt register 400 so that it occurs at a timer interrupt value of 60.

メモリアクセス部211は、開始時タイマ値であるタイマ値が10のタイミングT1から、メモリ20に対してアクセスを期間T2において繰り返す。この間、DDC40は、タイミングT3でメモリ20に対する電源をオンにする。そして、タイマ値が60のタイミングT3に達すると、割り込みが発生し、メモリアクセス部211は、メモリ20へのアクセスを停止する。DDC40は、タイミングT3でメモリ20に対する電源をオフにする。 The memory access unit 211 repeatedly accesses the memory 20 during a period T2 from timing T1 when the timer value, which is the starting timer value, is 10. During this time, the DDC 40 turns on the power to the memory 20 at timing T3. Then, when the timer value reaches timing T3 of 60, an interrupt occurs and the memory access unit 211 stops accessing the memory 20. The DDC 40 turns off the power to the memory 20 at timing T3.

キャッシュアクセス部212は、タイミングT3から割り込みが発生するまでキャッシュ11に対してアクセスを期間T4において繰り返す。この場合、DDC40は、メモリ20に対する電源をオフにする。 The cache access unit 212 repeatedly accesses the cache 11 during a period T4 from timing T3 until an interrupt occurs. In this case, the DDC 40 turns off the power to the memory 20.

次に、タイマ値取得部202は、タイミングT5で現時点タイマ値として70を取得する。 Next, the timer value acquisition unit 202 acquires 70 as the current timer value at timing T5.

タイマ割込値調整部203は、タイミングT5で次の割り込みのタイマ割込値の調整を開始する。現在の割り込みの発生タイミングが60であり、基準タイマ値が50であるので、通常時タイマ値は60+50となる。そして、現時点タイマ値が70であるので、70<60+50より、現時点タイマ値は通常時タイマ値よりも小さい。したがって、次の割り込みの発生は次の通常の負荷変動のタイミングに間に合うことから、タイマ割込値調整部203は、次の割り込みのタイマ割込値を通常時タイマ値である60+50=110とする。 The timer interrupt value adjustment unit 203 starts adjusting the timer interrupt value for the next interrupt at timing T5. Since the current interrupt generation timing is 60 and the reference timer value is 50, the normal timer value is 60+50. Since the current timer value is 70, the current timer value is smaller than the normal timer value because 70<60+50. Therefore, since the next interrupt will occur in time for the next normal load change, the timer interrupt value adjustment unit 203 sets the timer interrupt value of the next interrupt to 60+50=110, which is the normal timer value. .

そして、タイマ値が110のタイミングT6に達すると、割り込みが発生し、キャッシュアクセス部212は、キャッシュ11へのアクセスを停止する。DDC40は、タイミングT6でメモリ20に対する電源をオンにする。 Then, when the timer value reaches timing T6 of 110, an interrupt occurs and the cache access unit 212 stops accessing the cache 11. The DDC 40 turns on the power to the memory 20 at timing T6.

メモリアクセス部211は、タイミングT6からメモリ20に対してアクセスを繰り返す。この間、DDC40は、メモリ20に対する電源をオンにする。 The memory access unit 211 repeatedly accesses the memory 20 from timing T6. During this time, the DDC 40 turns on the power to the memory 20.

次に、タイマ値取得部202は、タイミングT8で現時点タイマ値として180を取得する。 Next, the timer value acquisition unit 202 acquires 180 as the current timer value at timing T8.

タイマ割込値調整部203は、タイミングT8で次の割り込みのタイマ割込値の調整を開始する。現在の割り込みの発生タイミングが110であり、基準タイマ値が50であるので、通常時タイマ値は110+50である。そして、現時点タイマ値が180であるので、180≧110+50より、現時点タイマ値は通常時タイマ値よりも大きい。すなわち、現時点で、既に次の通常の負荷変動周期のタイミングを過ぎてしまっている。したがって、次の割り込みの発生は次の通常の負荷変動のタイミングに間に合わないことから、タイマ割込値調整部203は、負荷変動周期の1周期分割り込みを発生させたにために、タイマ割込値を110+50×3=260とする。 The timer interrupt value adjustment unit 203 starts adjusting the timer interrupt value for the next interrupt at timing T8. Since the current interrupt generation timing is 110 and the reference timer value is 50, the normal timer value is 110+50. Since the current timer value is 180, the current timer value is larger than the normal timer value because 180≧110+50. That is, at this point, the timing of the next normal load fluctuation cycle has already passed. Therefore, since the occurrence of the next interrupt will not be in time for the timing of the next normal load fluctuation, the timer interrupt value adjustment unit 203 interrupts the timer interrupt in order to generate an interrupt divided into one cycle of the load fluctuation cycle. Let the value be 110+50×3=260.

試験実行時間確認部204は、現在のタイマ値を取得し、試験実行時間である100秒、すなわちタイマ値が1×10となるタイミングを超えていないかを確認する。現在のタイマ値は180であり試験実行時間を超えていないので、試験実行時間確認部204は、メモリ20及びキャッシュ11への交互のアクセスをメモリアクセス切替部201に継続させる。その後、タイマ値が260に達すると、再度割り込みが発生する。 The test execution time checking unit 204 acquires the current timer value and checks whether the test execution time of 100 seconds, that is, the timing at which the timer value becomes 1×10 8 has not been exceeded. Since the current timer value is 180 and has not exceeded the test execution time, the test execution time confirmation unit 204 causes the memory access switching unit 201 to continue alternately accessing the memory 20 and the cache 11. Thereafter, when the timer value reaches 260, an interrupt occurs again.

以上に説明したように、本実施例に係る負荷変動試験プログラムは、タイマ割り込みを用いてメモリ又はキャッシュへの周期的なアクセスを試験対象のコンピュータに行わせる。そして、負荷変動試験プログラムは、次の割り込みのタイマ割込値を決定する際に、その時点でのタイマ値と通常の負荷変動周期における次の負荷変動のタイミングとを比較して、次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合うか否かの判定をコンピュータに行わせる。次の割り込みの発生が通常の負荷変動周期における次の負荷変動のタイミングに間に合わない場合、負荷変動試験プログラムは、負荷変動周期の1周期経過後の次の負荷変動のタイミングで次の割り込みを発生させる。 As described above, the load fluctuation test program according to this embodiment causes the computer under test to periodically access the memory or cache using a timer interrupt. Then, when determining the timer interrupt value for the next interrupt, the load change test program compares the timer value at that point with the timing of the next load change in the normal load change cycle, and then determines the timer interrupt value for the next interrupt. The computer determines whether or not the occurrence of the load change is in time for the next load change in the normal load change cycle. If the next interrupt is not generated in time for the next load change in the normal load change cycle, the load change test program will generate the next interrupt at the next load change after one load change cycle. let

これにより、メモリアクセス中にタイマ監視を行わないことで、メモリアクセス頻度の低下を軽減することができ、時間監視処理とメモリアクセス処理とを遼リスさせることができる。さらに、通常の負荷変動周期のタイミングでは負荷変動が困難であっても、継続して負荷変動を作成し続けることができる。すなわち、時間監視処理と電源の負荷変動試験の実効性を高めることが可能となる。 As a result, by not performing timer monitoring during memory access, it is possible to reduce the decrease in memory access frequency, and it is possible to synchronize time monitoring processing and memory access processing. Furthermore, even if it is difficult to change the load at the timing of the normal load change cycle, it is possible to continue creating the load change. In other words, it is possible to improve the effectiveness of time monitoring processing and power supply load variation tests.

本実施例に係る負荷変動試験プログラムは、複数のコアを用いて負荷変動試験を実行する。本実施例では、コンピュータ1がCPU10としてコア#1~#3を有し、それぞれ周波数が100MHzで動作する場合で説明する。この場合も、作成したい負荷変動周期は1μ秒である。また、試験実行時間は、100秒である。 The load variation test program according to this embodiment executes a load variation test using a plurality of cores. In this embodiment, a case will be explained in which the computer 1 has cores #1 to #3 as the CPU 10, each operating at a frequency of 100 MHz. In this case as well, the load fluctuation period to be created is 1 μsec. Further, the test execution time was 100 seconds.

図9は、実施例2に係る負荷変動試験プログラムによる負荷変動の一例を表す図である。図9は紙面に向かって上から順に、コア#1~#3のそれぞれによる負荷変動を表すグラフである。また、図9の最下段のグラフは、本実施例に係る負荷変動試験におけるコンピュータ1の全体の負荷変動を表す。図9の各グラフは、縦軸で電流を表し、横軸で時間経過を表す。 FIG. 9 is a diagram illustrating an example of load fluctuation according to the load fluctuation test program according to the second embodiment. FIG. 9 is a graph showing load fluctuations for each of cores #1 to #3 in order from the top toward the page. Moreover, the graph at the bottom of FIG. 9 represents the overall load fluctuation of the computer 1 in the load fluctuation test according to this embodiment. In each graph in FIG. 9, the vertical axis represents current, and the horizontal axis represents time passage.

本実施例に係る負荷変動試験プログラムは、図2に示した各機能をコア#1~#3毎に生成する。そして、負荷変動試験プログラムは、コア#1~#3毎に、実施例1で説明した負荷変動試験をそれぞれ独立して実行させる。 The load variation test program according to this embodiment generates each function shown in FIG. 2 for each core #1 to #3. Then, the load variation test program causes each core #1 to #3 to independently execute the load variation test described in the first embodiment.

そのため、コア#1~#3のいずれかで、次の割り込みの発生が通常の負荷変動周期の次の負荷変動のタイミングに間に合わない場合でも、他のコアでは、次の割り込みの発生が通常の負荷変動周期の次の負荷変動のタイミングに間に合う場合がある。 Therefore, even if the next interrupt does not occur in time for the next load change in the normal load change cycle in any of cores #1 to #3, the next interrupt will not occur in time for the other cores. It may be possible to arrive in time for the timing of the next load change after the load change cycle.

例えば、図9では、コア#1において、タイマ値が110のタイミングでのメモリ20へのアクセスへの切り替えが行われずに負荷変動周期の1周期分が飛ばされ、通常の負荷変動周期が維持されていない。ただし、他のコア#2及び#3では、タイマ値が110のタイミングで割り込みが発生し、メモリ20へのアクセスへの切り替えが行われ、通常の負荷変動周期が維持される。 For example, in FIG. 9, core #1 does not switch to accessing the memory 20 at the time when the timer value is 110, skips one cycle of the load fluctuation cycle, and maintains the normal load fluctuation cycle. Not yet. However, in other cores #2 and #3, an interrupt occurs at the timing when the timer value is 110, switching to accessing the memory 20 is performed, and the normal load fluctuation cycle is maintained.

この場合、コンピュータ1全体の負荷変動は、最下段のグラフで示すように、負荷変動周期における2回目のメモリ20へのアクセスでは、コア1でメモリ20へのアクセスが行われなかった分、負荷が減少する。ただし、全体として、DDC40に対して負荷が欠けられており、負荷変動周期における2回目のメモリ20へのアクセスにおいても、負荷変動試験プログラムによる負荷変動試験は実行されており、試験目的は達成できている。 In this case, as shown in the graph at the bottom of the graph, the load fluctuation of the entire computer 1 is affected by the fact that the core 1 does not access the memory 20 in the second access to the memory 20 in the load fluctuation cycle. decreases. However, as a whole, there is no load on the DDC 40, and even in the second access to the memory 20 in the load variation cycle, the load variation test by the load variation test program is executed, and the test purpose cannot be achieved. ing.

また、本実施例では、3つのコアがある場合で説明したが、コアはいくつあっても本実施例に係る負荷変動試験プログラムは同様に試験を行うことができる。そして、コアの数が多いほど、いずれかのコアでの負荷変動の周期を省略した影響を低減させることができる。 Further, although the present embodiment has been described with reference to the case where there are three cores, the load variation test program according to the present embodiment can perform tests in the same way regardless of the number of cores. As the number of cores increases, the effect of omitting the cycle of load fluctuation in any one core can be reduced.

以上に説明したように、本実施例に係る負荷変動試験プログラムは、複数のコアに対して同時に負荷変動試験をそれぞれ独立させて実行させることができる。これにより、試験対象のコンピュータ全体として負荷変動の周期を省略した影響を低減することができ、時間監視処理と電源の負荷変動試験の実効性を高めることが可能となる。 As described above, the load variation test program according to the present embodiment can independently execute load variation tests on a plurality of cores at the same time. As a result, it is possible to reduce the effect of omitting the load fluctuation cycle on the entire computer to be tested, and it is possible to increase the effectiveness of time monitoring processing and power supply load fluctuation tests.

なお、図2に例示した試験条件設定部100及び試験実行部200の機能を実現するための負荷変動試験プログラムについては、必ずしも、上述のように最初からハードディスク30に記憶させておかなくてもよい。例えば、コンピュータ1に挿入されるフレキシブルディスク、いわゆるCD(Compact Disc)、DVD(Digital Versatile Disc)ディスク、光磁気ディスク、IC(Integrated Circuit)カードなどの「可搬用の物理媒体」に各プログラムを記憶させる。そして、コンピュータ1のCPU10がこれらの可搬用の物理媒体から各プログラムを取得して実行するようにしてもよい。また、公衆回線、インターネット、LAN(Local Area Network)、WAN(Wide Area Network)などを介してコンピュータ1に接続される他のコンピュータまたはサーバ装置などに各プログラムを記憶させておき、コンピュータ1がこれらから各プログラムを取得して実行するようにしてもよい。 Note that the load fluctuation test program for realizing the functions of the test condition setting section 100 and the test execution section 200 illustrated in FIG. 2 does not necessarily have to be stored in the hard disk 30 from the beginning as described above. . For example, each program is stored in a "portable physical medium" such as a flexible disk inserted into the computer 1, a so-called CD (Compact Disc), a DVD (Digital Versatile Disc), a magneto-optical disk, an IC (Integrated Circuit) card, etc. let Then, the CPU 10 of the computer 1 may acquire each program from these portable physical media and execute it. In addition, each program may be stored in another computer or server device connected to the computer 1 via a public line, the Internet, a LAN (Local Area Network), a WAN (Wide Area Network), etc., and the computer 1 may store these programs. Alternatively, each program may be obtained from and executed.

1 コンピュータ
10 CPU
11 キャッシュ
20 メモリ
30 ハードディスク
40 DDC
100 試験条件設定部
101 変動周期計算部
102 タイマ割込セット部
200 試験実行部
201 メモリアクセス切替部
202 タイマ値取得部
203 タイマ割込値調整部
204 試験実行時間確認部
211 メモリアクセス部
212 キャッシュアクセス部
300 クロック生成部
400 割込レジスタ
1 computer 10 CPU
11 Cache 20 Memory 30 Hard disk 40 DDC
100 Test condition setting section 101 Fluctuation period calculation section 102 Timer interrupt setting section 200 Test execution section 201 Memory access switching section 202 Timer value acquisition section 203 Timer interrupt value adjustment section 204 Test execution time confirmation section 211 Memory access section
212 Cache access section 300 Clock generation section 400 Interrupt register

Claims (6)

CPUクロックからタイマ値を生成し、
設定された負荷変動周期を基に基準タイマ値を決定し、
判定を行う時点の現時点タイマ値を取得し、
前記現時点タイマ値を基に、前記基準タイマ値にしたがうタイミングでの割り込みの発生を遅延させるか否かを判定し、
遅延させる場合、前記基準タイマ値にしたがうタイミングから前記負荷変動周期に基づく所定タイマ値分遅延させて割り込みを発生させる
処理をコンピュータに実行させることを特徴とする負荷変動試験プログラム。
Generate a timer value from the CPU clock,
Determine the reference timer value based on the set load fluctuation cycle,
Obtain the current timer value at the time of judgment,
Based on the current timer value, determine whether to delay the occurrence of an interrupt at a timing according to the reference timer value,
In the case of delaying, a load fluctuation test program causes a computer to execute a process of generating an interrupt by delaying the timing according to the reference timer value by a predetermined timer value based on the load fluctuation cycle.
前記基準タイマ値は、前記負荷変動周期の半分の時間であることを特徴とする請求項1に記載の負荷変動試験プログラム。 2. The load fluctuation test program according to claim 1, wherein the reference timer value is a half time of the load fluctuation cycle. 前の割り込みが発生したタイミングの発生時タイマ値を取得し、
前記発生時タイマ値に前記基準タイマ値を加算した通常時タイマ値が、前記現時点タイマ値よりも小さい場合、前記基準タイマ値にしたがうタイミングでの前記割り込みの発生を遅延させると判定する
処理をコンピュータに実行させることを特徴とする請求項1又は2に記載の負荷変動試験プログラム。
Get the timer value at the time the previous interrupt occurred,
If a normal timer value obtained by adding the reference timer value to the generation timer value is smaller than the current timer value, it is determined that the occurrence of the interrupt at a timing according to the reference timer value is to be delayed. The load fluctuation test program according to claim 1 or 2, wherein the load fluctuation test program is executed.
前記基準タイマ値にしたがうタイミングは、前記通常時タイマ値が示すタイミングであることを特徴とする請求項3に記載の負荷変動試験プログラム。 4. The load fluctuation test program according to claim 3, wherein the timing according to the reference timer value is the timing indicated by the normal timer value. 前記遅延させる場合、前記基準タイマ値にしたがうタイミングから前記負荷変動周期の1周期分遅延させたタイミングで前記割り込みを発生させる処理をコンピュータに実行させることを特徴とする請求項1~4のいずれか一つに記載の負荷変動試験プログラム。 5. When the interrupt is delayed, the computer is caused to execute the process of generating the interrupt at a timing delayed by one cycle of the load fluctuation cycle from the timing according to the reference timer value. Load fluctuation test program described in one. CPUクロックからタイマ値を生成し、
設定された負荷変動周期を基に基準タイマ値を決定し、
判定を行う時点の現時点タイマ値を取得し、
前記現時点タイマ値を基に、前記基準タイマ値にしたがうタイミングでの割り込みの発生を遅延させるか否かを判定し、
遅延させる場合、前記基準タイマ値にしたがうタイミングから前記負荷変動周期に基づく所定タイマ値分遅延させて前記割り込みを発生させる
処理をコンピュータに実行させることを特徴とする負荷変動試験方法。
Generate a timer value from the CPU clock,
Determine the reference timer value based on the set load fluctuation cycle,
Obtain the current timer value at the time of judgment,
Based on the current timer value, determine whether to delay the occurrence of an interrupt at a timing according to the reference timer value,
In the case of delaying, the load fluctuation test method is characterized by causing a computer to execute a process of generating the interrupt by delaying the timing according to the reference timer value by a predetermined timer value based on the load fluctuation cycle.
JP2020029374A 2020-02-25 2020-02-25 Load fluctuation test program and load fluctuation test method Active JP7415650B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020029374A JP7415650B2 (en) 2020-02-25 2020-02-25 Load fluctuation test program and load fluctuation test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020029374A JP7415650B2 (en) 2020-02-25 2020-02-25 Load fluctuation test program and load fluctuation test method

Publications (2)

Publication Number Publication Date
JP2021135576A JP2021135576A (en) 2021-09-13
JP7415650B2 true JP7415650B2 (en) 2024-01-17

Family

ID=77661224

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020029374A Active JP7415650B2 (en) 2020-02-25 2020-02-25 Load fluctuation test program and load fluctuation test method

Country Status (1)

Country Link
JP (1) JP7415650B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7671207B2 (en) 2021-08-23 2025-05-01 株式会社シマノ Spinning reels

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004157730A (en) 2002-11-06 2004-06-03 Renesas Technology Corp Microcomputer
JP2015082321A (en) 2013-10-24 2015-04-27 富士通株式会社 Information processing apparatus, load control method, and load control program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004157730A (en) 2002-11-06 2004-06-03 Renesas Technology Corp Microcomputer
JP2015082321A (en) 2013-10-24 2015-04-27 富士通株式会社 Information processing apparatus, load control method, and load control program

Also Published As

Publication number Publication date
JP2021135576A (en) 2021-09-13

Similar Documents

Publication Publication Date Title
US8402232B2 (en) Memory utilization tracking
CN101495958B (en) System and method for controlling processor low power states
US9459679B2 (en) Power manager and method for managing power
JP6530134B2 (en) Distribution network (PDN) droop / overshoot mitigation
JP2006004338A (en) Semiconductor integrated circuit
US8892923B2 (en) Data processing apparatus and method for maintaining a time count value in normal and power saving modes of operation
JP7408650B2 (en) Speculative termination of power-down mode for dynamic random access memory ranks
JP5263384B2 (en) Fault reproduction apparatus, fault reproduction method, and fault reproduction program in information processing apparatus
JP7193718B2 (en) Control program, information processing device and control method
JP2010524101A (en) Method and system for monitoring the reliability of a digital system
US20150082060A1 (en) Power consumption management system and method
JP7415650B2 (en) Load fluctuation test program and load fluctuation test method
KR20180078558A (en) Method of operating system on chip, system on chip performing the same and electronic system including the same
US20100070793A1 (en) Clock supply device
JP2007026095A (en) Parallel computing device
USRE48100E1 (en) Method and system for power management
JP6098418B2 (en) Signal control circuit, information processing apparatus, and duty calculation method
JP2018195243A (en) Semiconductor device and method for controlling semiconductor device
US12277020B2 (en) Default boost mode state for devices
JP2008520014A (en) Apparatus and method for controlling voltage and frequency using a plurality of reference circuits
GB2519752A (en) Method for performing built-in self-tests and electronic circuit
TWI775167B (en) Operating system and control method
JP2005011451A (en) Test device and program
US6715017B2 (en) Interruption signal generating apparatus
CN121656798A (en) Chip aging monitoring methods and systems, computer devices, media, and products

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221117

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231218

R150 Certificate of patent or registration of utility model

Ref document number: 7415650

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150