JP2000293557A - Simulation method for power consumption - Google Patents

Simulation method for power consumption

Info

Publication number
JP2000293557A
JP2000293557A JP11097318A JP9731899A JP2000293557A JP 2000293557 A JP2000293557 A JP 2000293557A JP 11097318 A JP11097318 A JP 11097318A JP 9731899 A JP9731899 A JP 9731899A JP 2000293557 A JP2000293557 A JP 2000293557A
Authority
JP
Japan
Prior art keywords
power consumption
cache
instruction
bus
consumption information
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.)
Pending
Application number
JP11097318A
Other languages
Japanese (ja)
Inventor
Hiroshi Mizuno
洋 水野
Takahide Baba
貴英 馬場
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP11097318A priority Critical patent/JP2000293557A/en
Publication of JP2000293557A publication Critical patent/JP2000293557A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method which can fast estimate the power consumption of a semiconductor integrated circuit when this circuit is designed with reuse of a processor core, etc., by calculating the power consumption that is needed for a processor to execute a program code from the power consumption of a CPU core part and a cache part. SOLUTION: In a cache part power consumption calculation process 104, the electric power consumed at a cache part is calculated from the power consumption information on every cache operation and in accordance with the operation of the cache part which is simulated in an instruction reading process 103. In an instruction execution process 105, the processor operation of a read instruction is simulated. In a CPU part power consumption calculation process 106, the power consumption is calculated in response to the instruction that is simulated in the process 105. In a power consumption calculation process 107, the power consumption necessary for the current execution cycle of a processor model is calculated from the power consumption which are calculated in both processes 104 and 106.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、計算機を用いた半
導体集積回路の消費電力のシミュレーション方法に関
し、特に、プロセッサコアやメガセルコアと呼ばれる既
に設計されたコアライブラリを再利用し、集積して大規
模な半導体集積回路を設計する時に、その半導体集積回
路の回路動作を模擬すると共に、その消費電力を高速に
見積もるシミュレーション方法を提供するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for simulating power consumption of a semiconductor integrated circuit using a computer, and more particularly, to a method of reusing and integrating a core library already designed, such as a processor core or a megacell core, and integrating it. It is an object of the present invention to provide a simulation method which simulates the circuit operation of the semiconductor integrated circuit when designing the semiconductor integrated circuit and estimates the power consumption at high speed.

【0002】[0002]

【従来の技術】従来、計算機を用いた半導体集積回路の
消費電力のシミュレーション方法としては、回路レベル
やゲートレベルのものが用いられてきた。
2. Description of the Related Art Heretofore, as a method of simulating power consumption of a semiconductor integrated circuit using a computer, a circuit level or gate level method has been used.

【0003】回路レベルの消費電力のシミュレーション
では、対象の半導体集積回路のトランジスタレベルのネ
ットリストを、SPICE等の回路レベルのシミュレー
ション方法により解析し、その結果の電圧値と電流値と
より電力を算出するものである。
In a circuit-level power consumption simulation, a transistor-level netlist of a target semiconductor integrated circuit is analyzed by a circuit-level simulation method such as SPICE, and power is calculated from the resulting voltage value and current value. Is what you do.

【0004】また、ゲートレベルの消費電力のシミュレ
ーション方法としては、特許公報第2518553号、
特開平2−171861号、特開平3−127180
号、等に開示されている。これらで開示されている方法
は、シミュレーション対象回路中に含まれる回路の構成
要素に対して、予め、前記の回路レベルの消費電力シミ
ュレーション方法により、回路中のゲートの入力/出力
や、ネット等のノードの信号変化あたりの消費電力を求
めておく。そして、対象の半導体集積回路のゲートレベ
ルの論理シミュレーションを行ない、回路中のゲートの
入力/出力や、ネット等のノードの信号変化を求め、そ
の信号変化と前記の予め求めた信号変化あたりの消費電
力とから、回路全体の消費電力を算出するものである。
As a method for simulating power consumption at the gate level, Japanese Patent Publication No. 2518553 discloses a method.
JP-A-2-171861, JP-A-3-127180
No., etc. The methods disclosed in these publications use a circuit-level power consumption simulation method for the components of a circuit included in a circuit to be simulated in advance, such as input / output of gates in the circuit and nets and the like. The power consumption per signal change of the node is obtained in advance. Then, a gate-level logic simulation of the target semiconductor integrated circuit is performed to determine input / output of gates in the circuit and signal changes at nodes such as nets. The power consumption of the entire circuit is calculated from the power.

【0005】これら従来の消費電力のシミュレーション
方法は、半導体集積回路の設計工程において、ゲートレ
ベル、又はトランジスタレベルの設計を行なう時点で利
用できるものである。
[0005] These conventional power consumption simulation methods can be used when designing at the gate level or at the transistor level in the design process of a semiconductor integrated circuit.

【0006】また、キャッシュメモリ、特に、命令キャ
ッシュを備えたプロセッサの消費電力を求める方法とし
ては、特開平9−218731号、特開平10−401
44号、及び特開平10−254944号等に開示され
ている。特開平9−218731号により開示されてい
る方法は、命令キャッシュがミスする場合とヒットした
場合の消費電力を各々求め、キャッシュのページサイ
ズ、命令分岐等を考慮しCPU動作の統計的な情報から
消費電力の見積もりを行う。特開平10−40144号
に開示されている方法は、実際のマイクロプロセッサに
おいてキャッシュがミスする場合とヒットする場合に関
して複数命令を実行し、その時の消費電力を測定するこ
とによりキャッシュを考慮した命令毎の消費電力を求め
る。特開平10−254944号に開示されている方法
は、プロセッサのストールを考慮して命令レベルでの消
費電力を求めている。
Japanese Patent Application Laid-Open Nos. 9-218731 and 10-401 disclose a method for determining the power consumption of a cache memory, particularly a processor having an instruction cache.
No. 44 and JP-A-10-254944. The method disclosed in Japanese Patent Application Laid-Open No. 9-218731 calculates power consumption when an instruction cache misses and when an instruction cache hits, and uses statistical information of CPU operation in consideration of a cache page size, instruction branch, and the like. Estimate power consumption. The method disclosed in Japanese Patent Application Laid-Open No. H10-40144 executes a plurality of instructions for a cache miss and a cache hit in an actual microprocessor, and measures the power consumption at that time to determine each instruction in consideration of the cache. Find the power consumption of The method disclosed in Japanese Patent Application Laid-Open No. H10-254944 finds power consumption at the instruction level in consideration of the stall of the processor.

【0007】これらの従来のプロセッサの消費電力のシ
ミュレーション方法及び装置は、命令メモリに着目し、
命令レベルでのプロセッサの消費電力を統計的に求める
ものである。
[0007] These conventional methods and apparatuses for simulating power consumption of a processor focus on an instruction memory,
The power consumption of the processor at the instruction level is statistically obtained.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、近年、
半導体集積回路の設計においては、対象回路を全て新規
設計するのではなく、プロセッサコアやメガセルコアと
呼ばれる過去に一度以上設計した設計データを再利用可
能なコアライブラリ化し、それらを再利用、集積して大
規模な半導体集積回路を設計するコアベース設計又はI
P(IntellectualProperty)ベース設計と呼ばれる設計
が行なわれる様になってきた。このコアベース設計で
は、複数のコアライブラリを組み合わせて所望の速度、
面積、消費電力の仕様を持つ半導体集積回路を実現でき
るかを設計早期に見積もる必要があるが、前記従来のゲ
ートレベルや回路レベルの消費電力のシミュレーション
方法では、設計がゲートレベルや回路レベルまで進んで
からでないと消費電力を見積もれないという問題点を有
している。
However, in recent years,
In the design of semiconductor integrated circuits, instead of designing a new target circuit, the design data that was designed at least once in the past, called a processor core or megacell core, is converted into a reusable core library, which is then reused and integrated. Core-based design or I for designing large-scale semiconductor integrated circuits
A design called P (Intellectual Property) base design has come to be performed. This core-based design combines multiple core libraries to achieve the desired speed,
It is necessary to estimate at an early stage whether or not a semiconductor integrated circuit having the specifications of the area and the power consumption can be realized. However, in the conventional method of simulating the power consumption at the gate level or the circuit level, the design advances to the gate level or the circuit level. There is a problem that the power consumption cannot be estimated unless the power is used.

【0009】また、近年の半導体集積回路設計では、単
にハードウエアとしてコアライブラリを組み合わせるの
ではなく、必要な機能をプロセッサコア上のソフトウエ
アで実現した場合と、メガセルコアを利用したハードウ
エアで実現した場合とのトレードオフを行ないながら所
望の半導体集積回路を設計するハードウエア/ソフトウ
エア協調設計が必要になってきた。このハードウエア/
ソフトウエア協調設計においては、速度や面積はもちろ
ん、1チップ化においては消費電力を見積もることが重
要であるが、数多くのプロセッサコア、メガセルコア等
のコアライブラリの中から必要なコアライブラリを選択
し、ソフトウエアを含め、大規模な半導体集積回路に対
して、ゲートレベルや回路レベルで消費電力の見積りを
行なうには膨大な計算時間が必要であるという問題点を
有している。さらに、半導体回路の高速化、システムL
SI化により、キャッシュメモリを備えたプロセッサコ
アの利用や、チップ上のバスを用いて多数のコアを統合
することが可能となり、様々なアーキテクチャ面のトレ
ードオフを行い、最適なシステム構成の探索を行う必要
がある。この場合も、プロセッサで実行されるソフトウ
エアの様々な動作に対して動的に消費電力を求め、同一
の機能をハードウエアで実行した場合の動作速度及び消
費電力を比較し、ある部分のソフトウエアはハードウエ
ア化する等の検討を行う。この場合、統計的な情報のみ
で電力を求めるのではなく、実際に使用するソフトウエ
アのモジュール毎に動的に消費電力を評価して、トレー
ドオフを行う必要がある。
In recent semiconductor integrated circuit designs, not only a combination of a core library as hardware but also a case where necessary functions are realized by software on a processor core and a case where hardware is realized by hardware using a megacell core A hardware / software co-design for designing a desired semiconductor integrated circuit while making a trade-off with the case has become necessary. This hardware /
In software co-design, it is important to estimate power consumption in a single chip, as well as speed and area.However, by selecting the necessary core library from many core libraries such as processor cores and megacell cores, Estimation of power consumption of a large-scale semiconductor integrated circuit including software at a gate level or a circuit level requires a huge amount of calculation time. Furthermore, the speeding up of the semiconductor circuit, the system L
The use of SI makes it possible to use processor cores with cache memory and to integrate many cores using buses on the chip, making various architectural trade-offs and searching for the optimal system configuration. There is a need to do. Also in this case, the power consumption is dynamically determined for various operations of software executed by the processor, and the operation speed and power consumption when the same function is executed by hardware are compared. The hardware will be considered as hardware. In this case, it is necessary to make a trade-off by dynamically evaluating the power consumption for each software module actually used, instead of using only the statistical information to calculate the power.

【0010】本発明は、かかる点に鑑みてなされたもの
であり、その目的は、プロセッサコアやメガセルコアと
呼ばれる既に設計されたコアライブラリを再利用し、集
積して大規模な半導体集積回路を設計する時に、その半
導体集積回路の回路動作を模擬すると共に、その消費電
力を高速に見積もるシミュレーション方法を提供するこ
とにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and an object of the present invention is to design a large-scale semiconductor integrated circuit by reusing and integrating an already designed core library called a processor core or a megacell core. It is another object of the present invention to provide a simulation method for simulating the circuit operation of the semiconductor integrated circuit and estimating the power consumption at a high speed.

【0011】[0011]

【課題を解決するための手段】前記の目的を達成するた
め、本発明は、予め、プロセッサの命令レベルの各命令
に対しては命令毎の消費電力情報を、キャッシュメモリ
に対してはキャッシュ動作毎の消費電力情報を、バスに
対してはバスのアドレス空間に対して個々のアドレス領
域毎の消費電力情報を備え、シミュレーション実行中又
はシミュレーション実行後に、前記の消費電力情報より
シミュレーション対象の回路全体で消費される電力を計
算するものである。
SUMMARY OF THE INVENTION To achieve the above object, the present invention provides a method for storing, in advance, power consumption information for each instruction at an instruction level of a processor and a cache operation for a cache memory. Power consumption information for each bus, the power consumption information for each address area in the bus address space for the bus, and during or after the simulation, the entire circuit to be simulated from the power consumption information. Is used to calculate the power consumed by.

【0012】具体的に請求項1の発明のシミュレーショ
ン方法は、キャッシュメモリを備えたプロセッサの命令
動作を計算機中でシミュレートする方法を対象とし、シ
ミュレーション実行前に予め、前記のプロセッサの命令
セットに対して、各々の命令が実行される時に消費され
る電力を求め、命令毎の消費電力情報として記憶すると
共に、前記のキャッシュメモリの複数の動作に対して、
各々の動作に消費される電力を求め、キャッシュ動作毎
の消費電力情報として記憶しておき、与えられたプログ
ラムコードに対するシミュレーション実行時に、各々の
命令に対して、命令動作及びキャッシュ動作をシミュレ
ートすると同時に、前記の命令毎の消費電力情報より実
行中の命令に対応するCPUコア部の消費電力を求め、
前記のキャッシュ動作毎の消費電力情報より、バスアク
セスにより発生するキャッシュ動作に対応したキャッシ
ュ部の消費電力を求め、前記のCPUコア部の消費電力
と、前記のキャッシュ部の消費電力とから、前記のプロ
セッサが前記のプログラムコード実行時の消費電力を求
めることを特徴とする。
Specifically, the simulation method according to the first aspect of the present invention is directed to a method for simulating the instruction operation of a processor having a cache memory in a computer. On the other hand, the power consumed when each instruction is executed is obtained, stored as power consumption information for each instruction, and for a plurality of operations of the cache memory,
When the power consumed for each operation is obtained and stored as power consumption information for each cache operation, the instruction operation and the cache operation are simulated for each instruction when a simulation is performed for a given program code. At the same time, the power consumption of the CPU core unit corresponding to the instruction being executed is obtained from the power consumption information for each instruction,
From the power consumption information for each of the cache operations, the power consumption of the cache unit corresponding to the cache operation generated by the bus access is obtained, and the power consumption of the CPU core unit and the power consumption of the cache unit are obtained. Of the present invention calculates the power consumption during execution of the program code.

【0013】請求項1記載の発明では、シミュレーショ
ン実行前に、プロセッサの命令セットの個々の命令及び
キャッシュメモリの複数の動作に対して、回路レベル又
はゲートレベルのシミュレーション、又は実際に試作し
た実チップの評価結果より、各命令が実行される時に消
費される電力を求め命令毎の消費電力情報に、各キャッ
シュ動作が実行される時に消費される電力を求めキャッ
シュ動作毎の消費電力情報に格納しておく。この処理
は、命令セット中の命令個数分及びキャッシュ動作種類
の個数分の処理を行なえば良いので、回路レベルやゲー
トレベルのシミュレーションを用いても現実的な時間内
に計算することが可能である。そして、シミュレーショ
ン実行中に与えられたプログラムコードに対する命令動
作をシミュレートすると共に、実行された命令に対応す
る消費出力の値を命令毎の消費電力情報から検索する。
キャッシュに関しては、実行される命令のフェッチ及
び、一部の命令に関してはデータの書き込み又は読み出
しのバスアクセスのキャッシュ動作をシミュレートする
と共に、実行されたキャッシュ動作に対応する消費電力
の値をキャッシュ動作毎の消費電力情報から検索する。
これらの消費電力の値を一定時間毎に集計していくこと
により、与えられたプログラムコードで動作する時にプ
ロセッサのCPUコア部とキャッシュ部が消費する電力
の時間遷移を求める。ここで、プログラムコードに従っ
て実行されるサイクル数は通常数千、数百万サイクル以
上の膨大なサイクル数になるが、命令毎の消費電力情報
は計算機中では表形式や関数形式等で保持することによ
り簡単に検索、計算することが可能であり、また一定時
間毎の消費電力を計算する場合も簡単な積算及び平均計
算等により、高速に行なうことが可能である。
According to the first aspect of the present invention, before execution of the simulation, simulation of a circuit level or a gate level, or a real chip actually manufactured on a trial basis, for each instruction of an instruction set of a processor and a plurality of operations of a cache memory. From the evaluation result, the power consumed when each instruction is executed is obtained and stored in the power consumption information for each instruction, and the power consumed when each cache operation is executed is obtained and stored in the power consumption information for each cache operation. Keep it. In this process, it is sufficient to perform processes for the number of instructions in the instruction set and the number of cache operation types, so that calculations can be performed within a realistic time even by using a circuit-level or gate-level simulation. . Then, while simulating the instruction operation for the program code given during the execution of the simulation, the value of the consumption output corresponding to the executed instruction is searched from the power consumption information for each instruction.
With respect to the cache, the cache operation simulates the cache operation of fetching an instruction to be executed and, for some instructions, writing or reading of data, and the value of the power consumption corresponding to the executed cache operation. Search from the power consumption information for each.
By summing up these power consumption values at regular intervals, a time transition of the power consumed by the CPU core unit and the cache unit of the processor when operating with the given program code is obtained. Here, the number of cycles executed according to the program code is usually a huge number of thousands or millions of cycles or more, but the power consumption information for each instruction must be held in a table format or function format in the computer. Can be easily searched and calculated, and the power consumption for each fixed time can be calculated at high speed by simple integration and average calculation.

【0014】請求項2記載の発明は、前記請求項1に記
載のシミュレーション方法において、前記のキャッシュ
動作毎の消費電力情報が、少なくとも、キャッシュがヒ
ットした場合の動作とミスした場合の動作とを区別した
消費電力情報であり、与えられたプログラムコードに対
するシミュレーション実行時に、各々の命令に対して、
発生したバスアクセスに対してキャッシュがヒットした
場合には前記のキャッシュ動作毎の消費電力情報中のヒ
ットした場合の動作に対する消費電力情報によりキャッ
シュ部の消費電力を求め、キャッシュがミスした場合に
はミスした場合の動作の消費電力情報によりキャッシュ
部の消費電力を求めることを特徴とする。
According to a second aspect of the present invention, in the simulation method according to the first aspect, the power consumption information for each cache operation includes at least an operation when the cache hits and an operation when the cache misses. Power consumption information that is distinguished, and when executing a simulation for a given program code, for each instruction,
When the cache hits for the generated bus access, the power consumption information of the cache unit is obtained from the power consumption information for the hit operation in the power consumption information for each cache operation. The power consumption of the cache unit is obtained from the power consumption information of the operation in the case of a miss.

【0015】請求項3記載の発明は、請求項1に記載の
シミュレーション方法において、前記のキャッシュ動作
毎の消費電力情報が、少なくとも、キャッシュの動作が
書き込み処理である場合と読み出し処理である場合とを
区別した消費電力情報であり、かつ、書き込み処理と読
み出し処理の各々に対して、キャッシュがヒットした場
合の動作とミスした場合の動作とを区別した消費電力情
報であり、与えられたプログラムコードに対するシミュ
レーション実行時に、各々の命令に対して、発生したバ
スアクセスが読み出し処理であるか書き込み処理である
かと、キャッシュがヒットしたかミスしたかとを判断
し、前記のキャッシュ動作毎の消費電力情報の該当する
消費電力情報よりキャッシュ部の消費電力を求めること
を特徴とする。
According to a third aspect of the present invention, in the simulation method of the first aspect, the power consumption information for each cache operation includes at least a case where the cache operation is a write operation and a case where the cache operation is a read operation. And power consumption information that distinguishes between an operation when a cache hits and an operation when a cache miss occurs for each of a write process and a read process. When a simulation is performed for each instruction, it is determined for each instruction whether the generated bus access is a read operation or a write operation, and whether the cache has hit or missed. The power consumption of the cache unit is obtained from the corresponding power consumption information.

【0016】請求項4記載の発明は、請求項1に記載の
シミュレーション方法において、前記のキャッシュ動作
毎の消費電力情報として、命令キャッシュ用とデータキ
ャッシュ用とを備え、命令キャッシュ用のキャッシュ動
作毎の消費電力情報は、少なくとも、キャッシュがヒッ
トした場合の動作とミスした場合の動作とを区別した消
費電力情報であり、データキャッシュ用のキャッシュ動
作毎の消費電力情報は、少なくとも、キャッシュの動作
が書き込み処理である場合と読み出し処理である場合と
を区別した消費電力情報であり、かつ、書き込み処理と
読み出し処理の各々に対して、キャッシュがヒットした
場合の動作とミスした場合の動作とを区別した消費電力
情報であり、与えられたプログラムコードに対するシミ
ュレーション実行時に、各々の命令に対して、発生した
バスアクセスが、命令キャッシュに対する場合には、前
記の命令キャッシュ用のキャッシュ動作毎の消費電力情
報より、キャッシュがヒットしたかを判断し命令キャッ
シュ部の消費電力を求め、発生したバスアクセスが、デ
ータキャッシュに対する場合には、発生したバスアクセ
スが読み出し処理であるか書き込み処理であるかと、キ
ャッシュがヒットしたかミスしたかとを判断し、前記の
データキャッシュ用のキャッシュ動作毎の消費電力情報
の該当する消費電力情報よりデータキャッシュ部の消費
電力を求め、前記の命令キャッシュ部の消費電力と前記
のデータキャッシュ部の消費電力とからキャッシュ部全
体の消費電力を求めることを特徴とする。
According to a fourth aspect of the present invention, in the simulation method of the first aspect, the power consumption information for each cache operation includes an instruction cache data and a data cache information, and the power consumption information for each cache operation. Power consumption information is power consumption information that distinguishes between an operation when a cache hits and an operation when a cache miss occurs, and the power consumption information for each cache operation for a data cache includes at least a cache operation Power consumption information that distinguishes between write processing and read processing, and distinguishes between cache hit operations and cache miss operations for each of the write and read processes. Power consumption information and execute simulation for given program code When the generated bus access is to the instruction cache for each instruction, it is determined whether or not the cache has been hit based on the power consumption information for each cache operation for the instruction cache, and the consumption of the instruction cache unit is determined. When power is obtained and the generated bus access is to the data cache, it is determined whether the generated bus access is a read process or a write process, and whether the cache has hit or missed. The power consumption of the data cache unit is obtained from the corresponding power consumption information of the power consumption information for each cache operation, and the power consumption of the entire cache unit is calculated from the power consumption of the instruction cache unit and the power consumption of the data cache unit. It is characterized by seeking.

【0017】請求項5記載の発明は、1個以上のバスマ
スター及びバススレーブがバスで接続された回路のアー
キテクチャレベルの動作を計算機中でシミュレートする
方法において、シミュレーション実行前に予め、前記の
バスマスターが動作する時に消費する電力をバスマスタ
ー毎の消費電力情報に、前記のバススレーブが動作する
時に消費する電力をバススレーブ毎の消費電力情報に、
前記のバスのアドレス空間に対して、個々のアドレス領
域毎に、そのアドレス領域へのバスアクセス時にバス部
で消費される電力をアドレス領域毎の消費電力情報とし
て記憶しておき、前記の回路に対するシミュレーション
実行時に、各バスアクセスに対して、バスの動作をシミ
ュレートすると同時に、前記のバスマスター毎の消費電
力情報より、バスマスターの消費電力を求め、前記のバ
ススレーブ毎の消費電力情報より、バススレーブの消費
電力を求め、前記のアドレス領域毎の消費電力情報よ
り、発生したバスアクセスのアドレス値に対応するバス
部の消費電力を求め、前記のバスマスターの消費電力
と、前記のバススレーブの消費電力と、及び前記のバス
部の消費電力とから、前記の回路の動作時の消費電力を
求めることを特徴とする。
According to a fifth aspect of the present invention, there is provided a method for simulating, in a computer, an architecture-level operation of a circuit in which one or more bus masters and bus slaves are connected by a bus, the method comprising: The power consumed when the bus master operates is described in power consumption information for each bus master, and the power consumed when the bus slave operates is described in power consumption information for each bus slave.
With respect to the address space of the bus, for each address area, the power consumed by the bus unit at the time of bus access to the address area is stored as power consumption information for each address area. At the time of executing the simulation, for each bus access, at the same time as simulating the operation of the bus, the power consumption of the bus master is obtained from the power consumption information of each bus master, and the power consumption information of each bus slave is obtained. The power consumption of the bus slave is determined, and the power consumption of the bus unit corresponding to the generated address value of the bus access is determined from the power consumption information for each address area, and the power consumption of the bus master and the bus slave are determined. And the power consumption of the bus unit is obtained from the power consumption of the circuit unit and the power consumption of the bus unit. .

【0018】請求項5記載の発明では、シミュレーショ
ン実行前に、回路中の個々のバスマスター、バススレー
ブ、及びバス部に対して、回路レベル又はゲートレベル
のシミュレーション、又は実際に試作した実チップの評
価結果より、バスサイクルあたりに消費される電力を求
め、各々、バスマスター毎の消費電力情報、バススレー
ブ毎の消費電力情報、及びアドレス領域毎の消費電力情
報に格納しておく。バスマスターとは、プロセッサ、D
SP、及びDMAコントローラ等であり、バスを獲得し
てバスに接続されたバススレーブやバスを獲得していな
いバスマスターに対して、バスを介して読み書きの処理
を行う。このバスマスターがバスを獲得して、バスサイ
クルを実行する時に内部で消費する電力を前記のバスマ
スター毎の消費電力情報に格納する。バススレーブは、
メモリ、タイマー、シリアルI/F、及び専用ハードウ
エア等である。また、バスマスターでバス非獲得時に外
部から内部レジスタ等をアクセスできる様に設計されて
いるものも含まれる。このバススレーブが前記のバスマ
スターからバスを介して選択されアクセスされる時に内
部で消費する電力を前記のバススレーブ毎の消費電力情
報に格納する。バス部は、バスアービタ、バスデコー
ダ、バスアダプタ、及びバス信号線等である。このバス
部は、アドレス空間等のバスサイクル実行時の条件によ
り消費される電力が異なるため、個々のアドレス領域毎
にバスサイクル時の消費電力を求め、前記のアドレス領
域毎の消費電力情報に格納する。この処理は、バスマス
ター、バススレーブ、及びバス部の複数のアドレス領域
の個数分、また、その中で場合により複数の動作状態が
ありその動作状態により消費される電力が異なる場合で
も、さらにその動作状態の個数分の処理を行うが、これ
らの個数は高々数十から数百までの有限個数であり、関
数化を行えば個数を減らすことができ、回路レベルやゲ
ートレベルのシミュレーションを用いても現実的な時間
内に計算することが可能である。そして、シミュレーシ
ョン実行中は、前記のバスマスター毎の消費電力情報、
バススレーブ毎の消費電力情報、及びアドレス領域毎の
消費電力情報から、各バスサイクルの動作状態に応じた
消費電力を検索し、検索した消費電力より回路全体の消
費電力を求める。ここで、シミュレーションで実行され
るバスサイクル数は通常数千、数百万サイクル以上の膨
大なサイクル数になるが、前記の各消費電力情報は計算
機中では表形式や関数形式等で保持することにより簡単
に検索、計算することが可能であり、また一定時間毎の
消費電力を計算する場合も簡単な積算及び平均計算等に
より、高速に行なうことが可能である。
According to the fifth aspect of the present invention, before execution of the simulation, simulation of a circuit level or a gate level or an actual chip actually produced on a trial basis is performed for each bus master, bus slave, and bus unit in the circuit. From the evaluation result, the power consumed per bus cycle is obtained and stored in the power consumption information for each bus master, the power consumption information for each bus slave, and the power consumption information for each address area. The bus master is a processor, D
An SP, a DMA controller, and the like, perform read / write processing via the bus for a bus slave that has acquired the bus and connected to the bus or a bus master that has not acquired the bus. The bus master acquires the bus and stores the power consumed internally when executing a bus cycle in the power consumption information for each bus master. The bus slave is
These are a memory, a timer, a serial I / F, and dedicated hardware. Also included are bus masters that are designed so that internal registers and the like can be accessed externally when the bus is not acquired. The power consumed internally when the bus slave is selected and accessed from the bus master via the bus is stored in the power consumption information for each bus slave. The bus unit includes a bus arbiter, a bus decoder, a bus adapter, a bus signal line, and the like. Since the power consumed by the bus section differs depending on the conditions at the time of executing the bus cycle such as the address space, the power consumption at the time of the bus cycle is obtained for each address area and stored in the power consumption information for each address area. I do. This processing is performed even if the number of the address areas of the bus master, the bus slave, and the bus unit is different, and even if there are a plurality of operation states in the case where the power consumption differs depending on the operation state, the processing is further performed. Processing is performed for the number of operating states, but these numbers are a finite number of at most several tens to several hundreds, and the number can be reduced by functionalization, using circuit-level and gate-level simulations. Can be calculated in a realistic time. During the execution of the simulation, the power consumption information for each bus master,
From the power consumption information for each bus slave and the power consumption information for each address area, power consumption corresponding to the operation state of each bus cycle is searched, and the power consumption of the entire circuit is obtained from the searched power consumption. Here, the number of bus cycles executed in the simulation is usually a huge number of thousands or more than a few million cycles, but the above-mentioned power consumption information should be held in a table format or a function format in a computer. Can be easily searched and calculated, and the power consumption for each fixed time can be calculated at high speed by simple integration and average calculation.

【0019】請求項6記載の発明は、請求項5に記載の
シミュレーション方法において、前記のアドレス領域毎
の消費電力情報が、少なくとも、バスアクセスのビット
幅を区別した消費電力情報であり、前記の回路に対する
シミュレーション実行時に、各バスアクセスに対して、
バスアクセスが発生する場合には、前記のアドレス領域
毎の消費電力情報より、発生したバスアクセスのアドレ
ス値とそのビット幅に対応したバス部の消費電力を求め
ることを特徴とする。
According to a sixth aspect of the present invention, in the simulation method according to the fifth aspect, the power consumption information for each address area is at least power consumption information distinguishing a bit width of a bus access. When executing the simulation for the circuit, for each bus access,
When a bus access occurs, the power consumption of the bus section corresponding to the address value of the generated bus access and its bit width is obtained from the power consumption information for each address area.

【0020】請求項7記載の発明は、請求項5に記載の
シミュレーション方法において、前記のアドレス領域毎
の消費電力情報が、少なくとも、バスアクセスが読み出
し処理である場合と書き込み処理である場合とを区別し
た消費電力情報であり、前記の回路に対するシミュレー
ション実行時に、各バスアクセスに対して、バスアクセ
スが発生する場合には、前記のアドレス領域毎の消費電
力情報より、発生したバスアクセスのアドレス値と読み
出し処理又は書き込み処理に対応したバス部の消費電力
を求めることを特徴とする。
According to a seventh aspect of the present invention, in the simulation method according to the fifth aspect, the power consumption information for each address area includes at least a case where a bus access is a read process and a case where a bus access is a write process. When the bus access occurs for each bus access during the simulation of the circuit, the address value of the generated bus access is obtained from the power consumption information for each address area. And the power consumption of the bus unit corresponding to the read processing or the write processing.

【0021】請求項8記載の発明は、請求項5に記載の
シミュレーション方法において、前記のアドレス領域毎
の消費電力情報が、少なくとも、バスの転送モード及び
転送ワード数に基づいた消費電力情報であり、前記の回
路に対するシミュレーション実行時に、各バスアクセス
に対して、バスアクセスが発生する場合には、前記のア
ドレス領域毎の消費電力情報より、発生したバスアクセ
スのアドレス値、転送モード、及び転送ワード数に対応
したバス部の消費電力を求めることを特徴とする。
According to an eighth aspect of the present invention, in the simulation method according to the fifth aspect, the power consumption information for each address area is at least power consumption information based on a bus transfer mode and a transfer word number. If a bus access occurs for each bus access during the simulation of the circuit, the address value of the generated bus access, the transfer mode, and the transfer word are obtained from the power consumption information for each address area. The power consumption of the bus unit corresponding to the number is obtained.

【0022】請求項9記載の発明は、CPUコアとキャ
ッシュメモリとから成るプロセッサと、バススレーブと
が、バスで接続された回路のアーキテクチャレベルの動
作を計算機中でシミュレートする方法を対象とし、与え
られたプログラムコードに対して、CPUコア部の消費
電力を、請求項1に記載の方法により求め、キャッシュ
部の消費電力を、請求項2、請求項3、又は請求項4に
記載の方法のいずれかの方法により求め、バス部の消費
電力及びバススレーブ部の消費電力を、請求項5、請求
項6、請求項7、及び請求項8に記載の方法の少なくと
も1個以上の方法により求め、前記のCPUコア部の消
費電力と、前記のキャッシュ部の消費電力と、前記のバ
ススレーブ部の電力と、及び前記のバス部の消費電力と
から、前記の回路アーキテクチャに対して前記のプログ
ラムコード実行時の消費電力を求めることを特徴とす
る。
A ninth aspect of the present invention is directed to a method in which a processor comprising a CPU core and a cache memory and a bus slave simulate, in a computer, an architecture-level operation of a circuit connected by a bus, The method according to claim 1, wherein the power consumption of a CPU core unit is obtained by a method according to claim 1 for a given program code, and the power consumption of a cache unit is calculated by a method according to claim 2, 3, or 4. And the power consumption of the bus unit and the power consumption of the bus slave unit are determined by at least one of the methods described in claim 5, claim 6, claim 7, and claim 8. The power consumption of the CPU core unit, the power consumption of the cache unit, the power of the bus slave unit, and the power consumption of the bus unit. And it obtains the power consumption during the program code executed on the architecture.

【0023】請求項10記載の発明は、請求項1、請求
項2、請求項3、請求項4、請求項5、請求項6、請求
項7、請求項8、又は請求項9に記載のシミュレーショ
ン方法において、シミュレーション実行中には、消費電
力計算に必要な情報を記憶装置に保存しておき、シミュ
レーション実行後に、前記の記憶装置に保存しておいた
消費電力計算に必要な情報を元に、当該シミュレーショ
ンで求めた回路動作時の回路の消費電力を求めることを
特徴とする。
The invention according to claim 10 is the invention according to claim 1, claim 2, claim 3, claim 4, claim 5, claim 6, claim 7, claim 8, or claim 9. In the simulation method, during the execution of the simulation, information necessary for the power consumption calculation is stored in a storage device, and after the simulation, the information necessary for the power consumption calculation stored in the storage device is stored. The power consumption of the circuit during the circuit operation obtained by the simulation is obtained.

【0024】[0024]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図を用いて説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0025】(第1の実施の形態)第1の実施の形態で
は、請求項1及び請求項2に係る発明について図を用い
て説明する。
(First Embodiment) In a first embodiment, the invention according to claims 1 and 2 will be described with reference to the drawings.

【0026】図1は本実施の形態に係る消費電力のシミ
ュレーション方法のシミュレーション実行時の処理の流
れを示すフローチャートである。図1において、101
は命令動作をシミュレートするプロセッサモデルのCP
Uコア部やキャッシュメモリ部の内部変数等を初期値に
設定する初期化処理である。102はシミュレートする
プロセッサモデルに与えるプログラムコードを読み込
み、シミュレーションを開始する命令の位置とシミュレ
ーションを終了する命令の位置を設定するプログラム読
み込み処理である。103は与えられたプログラムコー
ドより、プロセッサモデルが現在の実行サイクルにおい
て実行する命令を読み込む命令読み込み処理である。命
令はCPU部からはキャッシュメモリを介して読み込ま
れるので、キャッシュ部の動作のシミュレーションもこ
こで行う。104は命令読み込み処理103でシミュレ
ートされたキャッシュ部の動作に従ってキャッシュ動作
毎の消費電力情報からキャッシュ部で消費される電力を
求めるキャッシュ部消費電力計算処理である。105は
命令読み込み処理103で読み込まれた命令のプロセッ
サ動作をシミュレートする命令実行処理である。106
は命令毎の消費電力情報より命令実行処理105でシミ
ュレートされた命令に対応する消費電力を求めるCPU
部消費電力計算処理である。107はキャッシュ部消費
電力計算処理104及びCPU部消費電力計算処理10
6で求められた消費電力よりプロセッサモデルで現在の
実行サイクルで消費される消費電力を求める消費電力計
算処理である。108はプログラム読み込み処理102
により設定されている終了命令位置によりシミュレート
すべきプログラムコードが終了しているかを判断するプ
ログラムコード終了判断処理である。109はプログラ
ムコード終了処理108でプログラムコードのシミュレ
ーションが終了していないと判断された時に、シミュレ
ーションを行う実行サイクルを1だけ進める実行サイク
ル更新処理であり、実行サイクルの更新後に命令読み込
み処理103に戻り次の実行サイクルの処理を継続す
る。110はプログラムコード終了判断処理108によ
りシミュレートすべきプログラムコードが終了している
時に消費電力計算処理107で計算した消費電力の情報
を出力する消費電力出力処理である。
FIG. 1 is a flowchart showing the flow of processing when a simulation is performed in the power consumption simulation method according to the present embodiment. In FIG.
Is the CP of the processor model that simulates the instruction operation
This is initialization processing for setting internal variables and the like of the U core unit and the cache memory unit to initial values. A program reading process 102 reads a program code given to a processor model to be simulated, and sets a position of an instruction to start a simulation and a position of an instruction to end a simulation. An instruction reading process 103 reads an instruction to be executed by the processor model in the current execution cycle from the given program code. Since the instruction is read from the CPU unit via the cache memory, the simulation of the operation of the cache unit is also performed here. Reference numeral 104 denotes a cache unit power consumption calculation process for obtaining power consumed by the cache unit from power consumption information for each cache operation in accordance with the operation of the cache unit simulated in the instruction reading process 103. An instruction execution process 105 simulates a processor operation of the instruction read in the instruction reading process 103. 106
Is a CPU that obtains power consumption corresponding to an instruction simulated in the instruction execution processing 105 from power consumption information for each instruction.
This is a part power consumption calculation process. 107 is a cache unit power consumption calculation process 104 and a CPU unit power consumption calculation process 10
This is a power consumption calculation process for calculating the power consumption consumed in the current execution cycle by the processor model from the power consumption obtained in 6. 108 is a program reading process 102
Is a program code end determination process for determining whether or not the program code to be simulated is ended based on the end instruction position set by the above. An execution cycle update process 109 advances the execution cycle for performing the simulation by one when it is determined in the program code end process 108 that the simulation of the program code is not completed. Processing of the next execution cycle is continued. Reference numeral 110 denotes a power consumption output process for outputting information on the power consumption calculated in the power consumption calculation process 107 when the program code to be simulated by the program code completion determination process 108 has been completed.

【0027】図2はシミュレートされるプロセッサの命
令セットの一例である。201は命令セットの一覧を示
した命令テーブルである。命令LDはアドレスにより指
定されるメモリ領域のデータからレジスタにデータを転
送するデータロード命令である。命令STはレジスタか
らアドレスにより指定されるメモリ領域にデータを転送
するデータストア命令である。命令MOVはソースで指
定されるレジスタからデスティネーションで指定される
レジスタに代入するデータ転送命令である。命令ADD
はソースで指定されるレジスタの値とデスティネーショ
ンで指定されるレジスタの値とを加算し、結果をデステ
ィネーションで指定されるレジスタに代入する加算命令
である。命令SUBはデスティネーションで指定される
レジスタの値からソースで指定されるレジスタの値を減
算し、結果をデスティネーションで指定されるレジスタ
に代入する減算命令である。命令MULはソースで指定
されるレジスタの値とデスティネーションで指定される
レジスタの値の乗算を行い、結果をデスティネーション
で指定されるレジスタに代入する乗算命令である。命令
CMPはソースで指定されるレジスタの値又は定数値と
デスティネーションで指定されるレジスタの値とを比較
し、等しければ比較結果フラグをリセットし、等しくな
ければ比較結果フラグをセットする比較命令である。命
令BNEは、比較結果フラグがセットされていればラベ
ルで指定される命令位置に処理をジャンプさせる条件分
岐命令である。命令JMPはラベルで指定される命令位
置に処理をジャンプさせる無条件分岐命令である。
FIG. 2 is an example of a simulated processor instruction set. 201 is an instruction table showing a list of instruction sets. The instruction LD is a data load instruction for transferring data from data in a memory area specified by an address to a register. The instruction ST is a data store instruction for transferring data from a register to a memory area specified by an address. The instruction MOV is a data transfer instruction for substituting a register specified by the source into a register specified by the destination. Instruction ADD
Is an addition instruction for adding the value of the register specified by the source and the value of the register specified by the destination, and assigning the result to the register specified by the destination. The instruction SUB is a subtraction instruction for subtracting the value of the register specified by the source from the value of the register specified by the destination, and assigning the result to the register specified by the destination. The instruction MUL is a multiplication instruction that multiplies the value of the register specified by the source by the value of the register specified by the destination, and assigns the result to the register specified by the destination. The instruction CMP is a comparison instruction that compares the value of a register or a constant value specified by a source with the value of a register specified by a destination, resets a comparison result flag if they are equal, and sets a comparison result flag if they are not equal. is there. The instruction BNE is a conditional branch instruction that causes the processing to jump to the instruction position specified by the label if the comparison result flag is set. The instruction JMP is an unconditional branch instruction that causes the processing to jump to the instruction position specified by the label.

【0028】図3はシミュレーション対象となるプロセ
ッサの命令毎の消費電力情報を示す。301は命令毎の
消費電力テーブルであり、命令テーブル201で定義さ
れている命令毎に、その命令が一度実行される時の消費
電力値が格納されている。
FIG. 3 shows power consumption information for each instruction of a processor to be simulated. Reference numeral 301 denotes a power consumption table for each instruction, which stores a power consumption value when the instruction is executed once for each instruction defined in the instruction table 201.

【0029】図4はシミュレーションの対象となるプロ
セッサで実行するプログラムの一例である。401はプ
ログラム全体であり、411から420の各一行が一命
令を表わしており、各行は左の列より、ラベル、命令、
デスティネーション(分岐命令ではラベル)、ソースを
示す。LD命令411のソースの[80]は、アドレス
空間上のアドレス80を示す。他のLD命令、ST命令
でも同様である。
FIG. 4 shows an example of a program executed by a processor to be simulated. Reference numeral 401 denotes the entire program, and each line from 411 to 420 represents one instruction, and each line includes a label, an instruction,
Indicates the destination (label for a branch instruction) and source. [80] of the source of the LD instruction 411 indicates the address 80 in the address space. The same applies to other LD and ST instructions.

【0030】図5は、キャッシュ動作毎の消費電力情報
の一例である。501は、キャッシュ動作毎の消費電力
テーブルであり、502にキャッシュ動作としてヒット
とミスが定義され、予めキャッシュ動作がヒットした場
合とミスした場合について、回路シミュレータ等で求
め、このキャッシュ動作毎の消費電力テーブル501に
格納しておく。ここでは、ヒット時に20[μW/MH
z]、ミス時に100[μW/MHz]の値が格納され
ている。
FIG. 5 shows an example of power consumption information for each cache operation. Reference numeral 501 denotes a power consumption table for each cache operation. A hit and a miss are defined as cache operations in 502. The cache operation hits and misses are obtained in advance by a circuit simulator or the like, and the power consumption table for each cache operation is obtained. It is stored in the power table 501. Here, at the time of hit, 20 [μW / MH
z], and a value of 100 [μW / MHz] at the time of mistake.

【0031】図15は、本実施の形態に係るシミュレー
ション処理を実行する計算機のハードウエアの構成図の
一例である。1501は処理されたあらゆる情報を見る
ためのディスプレイ装置、1502は設計者があらゆる
情報や処理命令を入力するためのキーボード、1503
はあらゆる処理を行う中央演算処理装置、1504は各
種情報を格納する記憶装置である。
FIG. 15 is an example of a hardware configuration diagram of a computer that executes the simulation processing according to the present embodiment. 1501 is a display device for viewing all processed information, 1502 is a keyboard for the designer to input all information and processing instructions, 1503
Is a central processing unit that performs all kinds of processing, and 1504 is a storage device that stores various information.

【0032】以下、本実施の形態に係る消費電力のシミ
ュレーション方法を図1のフォローに基づき、プログラ
ム401を実行した場合を一例に用いて具体的に説明す
る。
Hereinafter, a method of simulating power consumption according to the present embodiment will be specifically described with reference to the follow-up of FIG.

【0033】初期化処理101ではプログラムの実行を
行うための初期化を行う。ここでは、プロセッサモデル
のCPU部やキャッシュメモリ部の各種レジスタ等が設
定される。メモリの内容は、[80]は2、[A0]は
5が設定されているとする。プログラム読み込み処理1
02では、プログラムコード401が記憶手段に読み込
まれ、411からプログラムの実行を開始する様にプロ
グラムカウンタレジスタが設定される。また、420に
達した場合にプログラムの実行を終了する様に設定され
る。命令読み込み処理103では、プログラムカウンタ
レジスタが指す命令をフェッチする。この場合、キャッ
シュを介してLD命令411がフェッチされるが、キャ
ッシュにはこのアドレスへのアクセスは初回なのでキャ
ッシュはミスとなる。そして、キャッシュ部消費電力計
算処理104により、キャッシュ動作毎の消費電力テー
ブル501より、ミスした場合の100[μW/MH
z]が求められる。ここで、消費電力の計算はキャッシ
ュ毎の消費電力テーブル104から該当するキャッシュ
動作の消費電力値を引くだけの簡単な処理であり、容易
に高速に計算される。次に命令実行処理105によりL
D命令411の動作がシミュレートされ、メモリアドレ
ス[80]の値2がレジスタreg0に読み込まれる。
次に、CPU部消費電力計算処理106により命令毎の
消費電力テーブル301よりLD命令に相当する50
[μW/MHz]が求められる。そして、消費電力計算
処理107により、キャッシュ部消費電力計算処理10
4で求められた100[μW/MHz]とCPU部消費
電力計算処理106で求められた50[μW/MHz]
が加算され、150[μW/MHz]がサイクル1での
消費電力として求められる。次に、プログラムコード終
了判定処理108によりシミュレーション終了条件のコ
ードに達しているかが判断され、この場合達していない
ので、実行サイクル更新処理109でサイクル数が2に
設定され、プログラムカウンタレジスタも1進められ、
次の命令コード412が命令読み込み処理103でフェ
ッチされる。以下、命令読み込み処理から実行サイクル
更新処理109までが終了条件のコードに達するまで繰
り返される。図6にその結果を示す。
In an initialization process 101, initialization for executing a program is performed. Here, the CPU unit of the processor model and various registers of the cache memory unit are set. It is assumed that the contents of the memory are set to 2 for [80] and 5 for [A0]. Program reading processing 1
In 02, the program code 401 is read into the storage means, and the program counter register is set so as to start the execution of the program from 411. Further, it is set so that the execution of the program is terminated when the number reaches 420. In the instruction reading process 103, the instruction pointed to by the program counter register is fetched. In this case, the LD instruction 411 is fetched via the cache, but the cache accesses the address for the first time, so the cache misses. Then, the cache unit power consumption calculation processing 104 uses the power consumption table 501 for each cache operation to calculate 100 [μW / MH] when a miss occurs.
z] is required. Here, the calculation of the power consumption is a simple process of simply subtracting the power consumption value of the corresponding cache operation from the power consumption table 104 for each cache, and is easily and quickly calculated. Next, L
The operation of the D instruction 411 is simulated, and the value 2 of the memory address [80] is read into the register reg0.
Next, the CPU unit power consumption calculation processing 106 calculates a value corresponding to the LD instruction from the power consumption table 301 for each instruction.
[ΜW / MHz] is required. Then, the cache unit power consumption calculation processing 10 is performed by the power consumption calculation processing 107.
100 [μW / MHz] obtained in step 4 and 50 [μW / MHz] obtained in the CPU unit power consumption calculation processing 106.
Are added, and 150 [μW / MHz] is obtained as the power consumption in cycle 1. Next, it is determined whether or not the code of the simulation end condition has been reached by the program code end determination processing 108. Since the code has not been reached in this case, the cycle number is set to 2 in the execution cycle update processing 109, and the program counter register is also advanced by one. And
The next instruction code 412 is fetched in the instruction reading processing 103. Hereinafter, the processing from the instruction reading processing to the execution cycle updating processing 109 is repeated until the code of the end condition is reached. FIG. 6 shows the result.

【0034】図6において、601はサイクル数、60
2は実行された命令、603はCPU部で消費された電
力である。604は命令読み込み703での命令フェッ
チでのキャッシュ部の動作であり、「ミス」はミス、
「ヒット」はヒットを表わす。605は604のキャッ
シュ動作に応じてキャッシュ動作毎の消費電力情報から
求めた消費電力、606は実行した命令でバスアクセス
が発生した場合のキャッシュ部の動作であり、「Rミ
ス」は読み出しでミス、「Rヒット」は読み出しでヒッ
ト、「Wミス」は書き込みでミス、「Wヒット」は書き
込みでヒット、及び空欄はバスアクセス非発生を表わ
す。606は、603及び605の消費電力を加算した
プロセッサ全体での消費電力である。
In FIG. 6, reference numeral 601 denotes the number of cycles;
Reference numeral 2 denotes an executed instruction, and reference numeral 603 denotes power consumed by the CPU unit. Reference numeral 604 denotes an operation of the cache unit in the instruction fetch in the instruction read 703.
"Hit" represents a hit. Reference numeral 605 denotes the power consumption obtained from the power consumption information for each cache operation in accordance with the cache operation of 604, 606 denotes the operation of the cache unit when a bus access occurs due to the executed instruction, and "R miss" , "R hit" indicates a read hit, "W miss" indicates a write miss, "W hit" indicates a write hit, and a blank indicates no bus access. Reference numeral 606 denotes the power consumption of the entire processor obtained by adding the power consumptions of 603 and 605.

【0035】シミュレーション終了条件のコードに達す
ると、消費電力出力処理110により、消費電力のシミ
ュレーション結果をディスプレイ装置1501に出力さ
れるか、記憶手段1504に出力される。
When the simulation termination condition code is reached, the power consumption output processing 110 outputs a simulation result of the power consumption to the display device 1501 or to the storage means 1504.

【0036】以上の様に、本発明に係る実施の形態によ
れば、請求項1又は請求項2に係る発明である消費電力
のシミュレーション方法によって、シミュレーション実
行前に、予め求められている各々の命令及びキャッシュ
部の動作状態に対して、命令毎の消費電力情報及びキャ
ッシュ動作毎の消費電力情報に格納しておき、検索集計
するのみで高速に与えられたプログラムコード実行時に
対する消費電力を求めることができる。特に請求項2に
係る発明では、キャッシュ動作毎の消費電力として、ヒ
ットとミスとを考慮したものであるため、命令キャッシ
ュを備えたプロセッサに最適なアーキテクチャレベルで
の消費電力のシミュレーション方法を提供することがで
きる。
As described above, according to the embodiment of the present invention, the power consumption simulation method according to the first or second aspect of the present invention allows each of the power consumption For the instruction and the operation state of the cache unit, the power consumption information for each instruction and the power consumption information for each cache operation are stored. be able to. In particular, the invention according to claim 2 provides a simulation method of power consumption at an architectural level that is optimal for a processor having an instruction cache because hits and misses are considered as power consumption for each cache operation. be able to.

【0037】なお、本実施の形態ではキャッシュ動作毎
の消費電力情報として単純なテーブル形式を用いたが、
キャッシュ動作がヒットかミスかにより関数として定義
しても同様の効果が得られることは言うまでも無い。
In this embodiment, a simple table format is used as power consumption information for each cache operation.
It goes without saying that the same effect can be obtained even if the function is defined as a function depending on whether the cache operation is a hit or a miss.

【0038】(第2の実施の形態)第2の実施の形態で
は、請求項1及び請求項3に係る発明について図を用い
て説明する。
(Second Embodiment) In a second embodiment, the invention according to claims 1 and 3 will be described with reference to the drawings.

【0039】図7は本実施の形態に係る消費電力のシミ
ュレーション方法のシミュレーション実行時の処理の流
れを示すフローチャートである。図7において、701
は命令動作をシミュレートするプロセッサモデルのCP
Uコア部やキャッシュメモリ部の内部変数等を初期値に
設定する初期化処理である。702はシミュレートする
プロセッサモデルに与えるプログラムコードを読み込
み、シミュレーションを開始する命令の位置とシミュレ
ーションを終了する命令の位置を設定するプログラム読
み込み処理である。703は与えられたプログラムコー
ドより、プロセッサモデルが現在の実行サイクルにおい
て実行する命令を読み込む命令読み込み処理である。命
令はCPU部からはキャッシュメモリを介して読み込ま
れるので、キャッシュ部の動作のシミュレーションもこ
こで行う。704は命令読み込み処理703でシミュレ
ートされたキャッシュ部の動作に従って読み出し処理用
のキャッシュ動作毎の消費電力情報からキャッシュ部で
消費される電力を求める第1のキャッシュ部消費電力計
算処理である。705は命令読み込み処理703で読み
込まれた命令のプロセッサ動作をシミュレートする命令
実行処理である。706は命令毎の消費電力情報より命
令実行処理705でシミュレートされた命令に対応する
消費電力を求めるCPU部消費電力計算処理である。7
07は命令実行処理705においてシミュレートされた
命令でデータアクセスのバスアクセスが発生した場合、
データアクセスが書き込みの場合には書き込み処理用の
キャッシュ動作毎の消費電力情報より、データアクセス
が読み出しの場合には読み出し処理用のキャッシュ動作
毎の消費電力情報より、キャッシュ部で消費される消費
電力を計算する第2のキャッシュ部消費電力計算処理で
ある。708は第1のキャッシュ部消費電力計算処理7
04、CPU部消費電力計算処理706、及び第2のキ
ャッシュ部消費電力計算処理707で求められた消費電
力よりプロセッサモデルで現在の実行サイクルで消費さ
れる消費電力を求める消費電力計算処理である。709
はプログラム読み込み処理702により設定されている
終了命令位置によりシミュレートすべきプログラムコー
ドが終了しているかを判断するプログラムコード終了判
断処理である。710はプログラムコード終了判断処理
709でプログラムコードのシミュレーションが終了し
ていないと判断された時に、シミュレーションを行う実
行サイクルを1だけ進める実行サイクル更新処理であ
り、実行サイクルの更新後に命令読み込み処理703に
戻り次の実行サイクルの処理を継続する。711はプロ
グラムコード終了判断処理709によりシミュレートす
べきプログラムコードが終了している時に消費電力計算
処理708で計算した消費電力の情報を出力する消費電
力出力処理である。
FIG. 7 is a flowchart showing the flow of processing when a simulation of the power consumption simulation method according to the present embodiment is executed. In FIG.
Is the CP of the processor model that simulates the instruction operation
This is initialization processing for setting internal variables and the like of the U core unit and the cache memory unit to initial values. Reference numeral 702 denotes a program reading process for reading the program code given to the processor model to be simulated, and setting the position of the instruction to start the simulation and the position of the instruction to end the simulation. 703 is an instruction reading process for reading an instruction to be executed by the processor model in the current execution cycle from the given program code. Since the instruction is read from the CPU unit via the cache memory, the simulation of the operation of the cache unit is also performed here. Reference numeral 704 denotes a first cache unit power consumption calculation process for calculating the power consumed by the cache unit from the power consumption information for each cache operation for the read process in accordance with the operation of the cache unit simulated in the instruction reading process 703. An instruction execution process 705 simulates a processor operation of the instruction read in the instruction read process 703. Reference numeral 706 denotes CPU unit power consumption calculation processing for obtaining power consumption corresponding to the instruction simulated in the instruction execution processing 705 from the power consumption information for each instruction. 7
07 is a command simulated in the instruction execution processing 705, when a data access bus access occurs.
When the data access is a write, the power consumed by the cache unit is based on the power consumption information for each cache operation for the write process, and when the data access is a read, the power consumption is based on the power consumption information for each cache operation for the read process. Is a second cache unit power consumption calculation process for calculating 708 denotes a first cache unit power consumption calculation process 7
04, a CPU unit power consumption calculation process 706, and a power consumption calculation process of calculating the power consumption consumed in the current execution cycle by the processor model from the power consumption obtained in the second cache unit power consumption calculation process 707. 709
Is a program code end judging process for judging whether the program code to be simulated is ended based on the end instruction position set by the program reading process 702. 710 is an execution cycle update process for advancing the execution cycle for performing the simulation by one when it is determined in the program code end determination process 709 that the simulation of the program code is not completed. Return The process of the next execution cycle is continued. Reference numeral 711 denotes a power consumption output process for outputting information on the power consumption calculated in the power consumption calculation process 708 when the program code to be simulated by the program code end determination process 709 has finished.

【0040】シミュレートされるプロセッサの命令セッ
トとしては、図2で示した第1の実施の形態で用いたも
のと同じものを例に用いる。
As the instruction set of the processor to be simulated, the same instruction set as that used in the first embodiment shown in FIG. 2 is used as an example.

【0041】図8はシミュレーション対象となるプロセ
ッサの命令毎の消費電力情報を示す。801は命令毎の
消費電力テーブルであり、命令テーブル801で定義さ
れている命令毎に、その命令が一度実行される時の消費
電力値が格納されている。
FIG. 8 shows power consumption information for each instruction of a processor to be simulated. Reference numeral 801 denotes a power consumption table for each instruction, which stores a power consumption value when the instruction is executed once for each instruction defined in the instruction table 801.

【0042】シミュレーションの対象となるプロセッサ
で実行するプログラムとしては、図4で示した第1の実
施の形態で用いたものを例に用いる。
As a program executed by the processor to be simulated, the program used in the first embodiment shown in FIG. 4 is used as an example.

【0043】図9は、キャッシュ動作毎の消費電力情報
の一例である。901は、キャッシュ動作毎の消費電力
テーブルであり、902にキャッシュ動作として、書き
込み処理と読み出し処理とがあり、かつ、各々に対して
ヒットとミスが定義される。書き込み処理用のキャッシ
ュ動作毎の消費電力情報が910であり、読み出し処理
用のキャッシュ動作毎の消費電力情報が911である。
予め、各キャッシュ動作について、回路シミュレータ等
で求め、このキャッシュ動作毎の消費電力テーブル90
1に格納しておく。ここでは、書き込み処理用のキャッ
シュ動作毎の消費電力情報としては、ヒット時に100
[μW/MHz]、ミス時に80[μW/MHz]、読
み出し処理用のキャッシュ動作毎の消費電力情報として
は、ヒット時に20[μW/MHz]、ミス時に100
[μW/MHz]の値が格納されている。
FIG. 9 shows an example of power consumption information for each cache operation. Reference numeral 901 denotes a power consumption table for each cache operation. A cache operation 902 includes a write process and a read process, and a hit and a miss are defined for each. The power consumption information for each cache operation for write processing is 910, and the power consumption information for each cache operation for read processing is 911.
A power consumption table 90 for each cache operation is obtained in advance by a circuit simulator or the like for each cache operation.
1 is stored. Here, the power consumption information for each write operation cache operation is 100 at the time of hit.
[ΜW / MHz], 80 [μW / MHz] at the time of a miss, and 20 [μW / MHz] at the time of a hit and 100 at the time of a miss as the power consumption information for each cache operation for read processing.
The value of [μW / MHz] is stored.

【0044】本実施の形態に係るシミュレーション処理
を実行する計算機のハードウエアの構成図としては、図
15で示した第1の実施の形態と同じものを用いる。
The same hardware configuration as that of the first embodiment shown in FIG. 15 is used as a hardware configuration diagram of a computer that executes the simulation processing according to the present embodiment.

【0045】以下、本実施の形態に係る消費電力のシミ
ュレーション方法を図7のフォローに基づき、プログラ
ム401を実行した場合を一例に用いて具体的に説明す
る。
Hereinafter, the method of simulating power consumption according to the present embodiment will be described in detail with reference to the example shown in FIG.

【0046】初期化処理701ではプログラムの実行を
行うための初期化を行う。ここでは、プロセッサモデル
のCPU部やキャッシュメモリ部の各種レジスタ等が設
定される。メモリの内容は、[80]は2、[A0]は
5が設定されているとする。プログラム読み込み処理7
02では、プログラムコード401が記憶手段に読み込
まれ、411からプログラムの実行を開始する様にプロ
グラムカウンタレジスタが設定される。また、420に
達した場合にプログラムの実行を終了する様に設定され
る。命令読み込み処理703では、プログラムカウンタ
レジスタが指す命令をフェッチする。この場合、キャッ
シュを介してLD命令411がフェッチされるが、キャ
ッシュにはこのアドレスへのアクセスは初回なのでキャ
ッシュはミスとなる。そして、命令読み込みでは読み出
し処理であるので、第1のキャッシュ部消費電力計算処
理704により、読み出し処理用のキャッシュ動作毎の
消費電力情報910より、ミスした場合の100[μW
/MHz]が求められる。ここで、消費電力の計算は消
費電力テーブル901から該当するキャッシュ動作の消
費電力値を引くだけの簡単な処理であり、容易に高速に
計算される。次に命令実行処理705によりLD命令4
11の動作がシミュレートされ、メモリアドレス[8
0]の値2がレジスタreg0に読み込まれる。次に、
CPU部消費電力計算処理706により命令毎の消費電
力テーブル801よりLD命令に相当する20[μW/
MHz]が求められる。次に、命令実行処理705で、
バスアクセスが発生した場合には、第2のキャッシュ部
消費電力計算処理707により、バスアクセスで動作す
るキャッシュの消費電力を求める。LD命令では読み出
しのバスアクセスが発生し、アドレス[80]へのアク
セスはプログラム開始時より始めてであり、キャッシュ
はミスとなる、読み出し用のキャッシュ動作毎の消費電
力情報911より100[μW/MHz]が求められ
る。そして、消費電力計算処理708により、第1のキ
ャッシュ部消費電力計算処理704で求められた100
[μW/MHz]、CPU部消費電力計算処理706で
求められた20[μW/MHz]、及び第2のキャッシ
ュ部消費電力計算処理707で求められた100[μW
/MHz]を加算し、220[μW/MHz]がサイク
ル1での消費電力として求められる。次に、プログラム
コード終了判定処理709によりシミュレーション終了
条件のコードに達しているかが判断され、この場合達し
ていないので、実行サイクル更新処理710でサイクル
数が2に設定され、プログラムカウンタレジスタも1進
められ、次の命令コード412が命令読み込み処理70
3でフェッチされる。以下、命令読み込み処理から実行
サイクル更新処理710までが終了条件のコードに達す
るまで繰り返される。図10にその結果を示す。
In an initialization process 701, initialization for executing a program is performed. Here, the CPU unit of the processor model and various registers of the cache memory unit are set. It is assumed that the contents of the memory are set to 2 for [80] and 5 for [A0]. Program reading processing 7
In 02, the program code 401 is read into the storage means, and the program counter register is set so as to start the execution of the program from 411. Further, it is set so that the execution of the program is terminated when the number reaches 420. In the instruction reading process 703, an instruction indicated by the program counter register is fetched. In this case, the LD instruction 411 is fetched via the cache, but the cache accesses the address for the first time, so the cache misses. Then, since the instruction reading is a reading process, the first cache unit power consumption calculation process 704 uses the power consumption information 910 for each cache operation for the reading process to calculate 100 [μW
/ MHz] is required. Here, the calculation of the power consumption is a simple process of simply subtracting the power consumption value of the corresponding cache operation from the power consumption table 901 and is easily and quickly calculated. Next, by the instruction execution processing 705, the LD instruction 4
11 is simulated and the memory address [8
0] is read into the register reg0. next,
From the power consumption table 801 for each instruction, 20 [μW /
MHz]. Next, in an instruction execution process 705,
When a bus access occurs, the second cache unit power consumption calculation processing 707 determines the power consumption of the cache operated by the bus access. In the LD instruction, a read bus access occurs, access to the address [80] is started from the start of the program, and a cache miss occurs. ] Is required. Then, in the power consumption calculation processing 708, the 100 calculated in the first cache unit power consumption calculation processing 704 is calculated.
[ΜW / MHz], 20 [μW / MHz] obtained in the CPU unit power consumption calculation processing 706, and 100 [μW] obtained in the second cache unit power consumption calculation processing 707.
/ MHz], and 220 [μW / MHz] is obtained as the power consumption in cycle 1. Next, it is determined by the program code end determination processing 709 whether or not the code of the simulation end condition has been reached. In this case, since the code has not been reached, the cycle number is set to 2 in the execution cycle update processing 710 and the program counter register is also advanced by one. And the next instruction code 412 is
Fetched at 3. Hereinafter, the processing from the instruction reading processing to the execution cycle updating processing 710 is repeated until the end condition code is reached. FIG. 10 shows the result.

【0047】図10において、1001はサイクル数、
1002は実行された命令、1003はCPU部で消費
された電力である。1004は命令読み込み703での
命令フェッチでのキャッシュ部の動作であり、「Rミ
ス」は読み出しでミス、「Rヒット」は読み出しでヒッ
トを表わす。1005は1004のキャッシュ動作に応
じてキャッシュ動作毎の消費電力情報から求めた消費電
力、1006は実行した命令でバスアクセスが発生した
場合のキャッシュ部の動作であり、「Rミス」は読み出
しでミス、「Rヒット」は読み出しでヒット、「Wミ
ス」は書き込みでミス、「Wヒット」は書き込みでヒッ
ト、及び空欄はバスアクセス非発生を表わす。1007
は、1006でバスアクセスが発生した場合にキャッシ
ュ動作毎の消費電力情報から求めた消費電力、1008
は1003、1005、及び1007の消費電力を加算
したプロセッサ全体での消費電力である。
In FIG. 10, 1001 is the number of cycles,
1002 is an executed instruction, and 1003 is power consumed by the CPU unit. Reference numeral 1004 denotes an operation of the cache unit in the instruction fetch in the instruction read 703, where “R miss” indicates a read miss and “R hit” indicates a read hit. 1005 is the power consumption obtained from the power consumption information for each cache operation according to the cache operation of 1004, 1006 is the operation of the cache unit when a bus access is caused by the executed instruction, and "R miss" is a read error. , "R hit" indicates a read hit, "W miss" indicates a write miss, "W hit" indicates a write hit, and a blank indicates no bus access. 1007
Is power consumption obtained from power consumption information for each cache operation when a bus access occurs in 1006;
Is the power consumption of the entire processor obtained by adding the power consumptions of 1003, 1005, and 1007.

【0048】シミュレーション終了条件のコードに達す
ると、消費電力出力処理711により、消費電力のシミ
ュレーション結果をディスプレー装置1501に出力さ
れるか、記憶手段1504に出力される。
When the simulation end condition code is reached, the power consumption output processing 711 outputs a simulation result of the power consumption to the display device 1501 or to the storage means 1504.

【0049】以上の様に、本発明に係る実施の形態によ
れば、請求項1又は請求項3に係る発明である消費電力
のシミュレーション方法によって、シミュレーション実
行前に、予め求められている各々の命令及びキャッシュ
部の動作状態に対して、命令毎の消費電力情報及びキャ
ッシュ動作毎の消費電力情報に格納しておき、検索集計
するのみで高速に与えられたプログラムコード実行時に
対する消費電力を求めることができる。特に請求項3に
係る発明では、キャッシュ動作毎の消費電力として、書
き込み用と読み出し用とを備えているため、ユニファイ
ド形式の命令/データキャッシュ付きプロセッサに最適
なアーキテクチャレベルでの消費電力のシミュレーショ
ン方法を提供することができる。
As described above, according to the embodiment of the present invention, by the power consumption simulation method according to the first or third aspect of the present invention, each of the previously obtained respective The power consumption information for each instruction and the cache operation is stored in the power consumption information for each instruction and the cache operation for the operation state of the cache unit. be able to. In particular, in the invention according to claim 3, since power consumption for each cache operation is provided for writing and reading, simulation of power consumption at an architectural level optimal for a processor with an instruction / data cache of a unified type is provided. A method can be provided.

【0050】なお、本実施の形態ではキャッシュ動作毎
の消費電力情報として単純なテーブル形式を用いたが、
キャッシュ動作がヒットかミスかにより関数として定義
しても同様の効果が得られることは言うまでも無い。
In this embodiment, a simple table format is used as power consumption information for each cache operation.
It goes without saying that the same effect can be obtained even if the function is defined as a function depending on whether the cache operation is a hit or a miss.

【0051】(第3の実施の形態)第3の実施の形態で
は、請求項1及び請求項4に係る発明について図を用い
て説明する。
(Third Embodiment) In a third embodiment, the invention according to claims 1 and 4 will be described with reference to the drawings.

【0052】図7は本実施の形態に係る消費電力のシミ
ュレーション方法のシミュレーション実行時の処理の流
れを示すフローチャートである。このフローチャート
は、第2の実施の形態で用いたフローチャートと同じも
のである。
FIG. 7 is a flowchart showing the flow of processing when a simulation of the power consumption simulation method according to the present embodiment is performed. This flowchart is the same as the flowchart used in the second embodiment.

【0053】シミュレートされるプロセッサの命令セッ
トとしては、図2で示した第1の実施の形態で用いたも
のと同じものを例に用いる。
As the instruction set of the processor to be simulated, the same instruction set as that used in the first embodiment shown in FIG. 2 is used as an example.

【0054】シミュレーション対象となるプロセッサの
命令毎の消費電力情報としては、図8で示した第2の実
施の形態で用いたものと同じものを例に用いる。
As the power consumption information for each instruction of the processor to be simulated, the same information as that used in the second embodiment shown in FIG. 8 is used as an example.

【0055】シミュレーションの対象となるプロセッサ
で実行するプログラムとしては、図4で示した第1の実
施の形態で用いたものを例に用いる。
As the program executed by the processor to be simulated, the program used in the first embodiment shown in FIG. 4 is used as an example.

【0056】図11は、本実施の形態に係るキャッシュ
動作毎の消費電力情報の一例である。1101は、キャ
ッシュ動作毎の消費電力テーブルであり、1102は命
令キャッシュ用のキャッシュ動作毎の消費電力情報、1
103はデータキャッシュ用のキャッシュ動作毎の消費
電力情報である。1104にキャッシュ動作として、命
令キャッシュ用にはヒットとミス、データキャッシュ用
には書き込み処理と読み込み処理とがあり、かつ、各々
に対してヒットとミスとが定義される。予め、各キャッ
シュ動作について、回路シミュレータ等で求め、このキ
ャッシュ動作毎の消費電力テーブル1101に格納して
おく。ここでは、命令キャッシュ用のキャッシュ動作毎
の消費電力情報としては、ヒット時に30[μW/MH
z]、ミス時に120[μW/MHz]、データキャッ
シュ用の書き込み処理用のキャッシュ動作毎の消費電力
情報としては、ヒット時に100[μW/MHz]、ミ
ス時に80[μW/MHz]、読み出し処理用のキャッ
シュ動作毎の消費電力情報としては、ヒット時に20
[μW/MHz]、ミス時に90[μW/MHz]の値
が格納されている。
FIG. 11 shows an example of power consumption information for each cache operation according to the present embodiment. Reference numeral 1101 denotes a power consumption table for each cache operation. Reference numeral 1102 denotes power consumption information for each instruction cache operation.
103 is power consumption information for each data cache operation. The cache operation 1104 includes a hit and a miss for the instruction cache, a write process and a read process for the data cache, and defines a hit and a miss for each. Each cache operation is obtained in advance by a circuit simulator or the like, and stored in the power consumption table 1101 for each cache operation. Here, the power consumption information for each instruction cache operation is 30 [μW / MH] at the time of hit.
z], 120 [μW / MHz] at the time of miss, 100 [μW / MHz] at the time of hit, 80 [μW / MHz] at the time of miss, and read processing as power consumption information for each cache operation for write processing for data cache. Power consumption information for each cache operation
[ΜW / MHz], and a value of 90 [μW / MHz] at the time of mistake.

【0057】本実施の形態に係るシミュレーション処理
を実行する計算機のハードウエアの構成図としては、図
15で示した第1の実施の形態と同じものを用いる。
The same hardware configuration as that of the first embodiment shown in FIG. 15 is used as the configuration diagram of the computer that executes the simulation processing according to the present embodiment.

【0058】以下、本実施の形態に係る消費電力のシミ
ュレーション方法を図7のフォローに基づき、プログラ
ム401を実行した場合を一例に用いて具体的に説明す
る。
Hereinafter, the method of simulating power consumption according to the present embodiment will be specifically described with reference to the follow-up of FIG.

【0059】初期化処理701ではプログラムの実行を
行うための初期化を行う。ここでは、プロセッサモデル
のCPU部やキャッシュメモリ部の各種レジスタ等が設
定される。メモリの内容は、[80]は2、[A0]は
5が設定されているとする。プログラム読み込み処理7
02では、プログラムコード401が記憶手段に読み込
まれ、411からプログラムの実行を開始する様にプロ
グラムカウンタレジスタが設定される。また、420に
達した場合にプログラムの実行を終了する様に設定され
る。命令読み込み処理703では、プログラムカウンタ
レジスタが指す命令をフェッチする。この場合、キャッ
シュを介してLD命令411がフェッチされるが、キャ
ッシュにはこのアドレスへのアクセスは初回なのでキャ
ッシュはミスとなる。そして、命令読み込みでは読み出
し処理であるので、第1のキャッシュ部消費電力計算処
理704により、命令キャッシュ用のキャッシュ動作毎
の消費電力情報1102より、ミスした場合の120
[μW/MHz]が求められる。ここで、消費電力の計
算は消費電力テーブル1101から該当するキャッシュ
動作の消費電力値を引くだけの簡単な処理であり、容易
に高速に計算される。次に命令実行処理705によりL
D命令411の動作がシミュレートされ、メモリアドレ
ス[80]の値2がレジスタreg0に読み込まれる。
次に、CPU部消費電力計算処理706により命令毎の
消費電力テーブル801よりLD命令に相当する20
[μW/MHz]が求められる。次に、命令実行処理7
05で、バスアクセスが発生した場合には、第2のキャ
ッシュ部消費電力計算処理707により、バスアクセス
で動作するキャッシュの消費電力を求める。LD命令で
は読み出しのバスアクセスが発生し、アドレス[80]
へのアクセスはプログラム開始時より始めてであり、キ
ャッシュはミスとなる。第2のキャッシュ部消費電力計
算処理707ではデータアクセスであり、データキャッ
シュが動作しするので、データキャッシュ用のキャッシ
ュ動作毎の消費電力情報1103より消費電力を求め
る。ここでは、読み出しでミスなので、90[μW/M
Hz]が求められる。そして、消費電力計算処理708
により、第1のキャッシュ部消費電力計算処理704で
求められた120[μW/MHz]、CPU部消費電力
計算処理706で求められた20[μW/MHz]、及
び第2のキャッシュ部消費電力計算処理707で求めら
れた90[μW/MHz]を加算し、230[μW/M
Hz]がサイクル1での消費電力として求められる。次
に、プログラムコード終了判定処理709によりシミュ
レーション終了条件のコードに達しているがが判断さ
れ、この場合達していないので、実行サイクル更新処理
710でサイクル数が2に設定され、プログラムカウン
タレジスタも1進められ、次の命令コード412が命令
読み込み処理703でフェッチされる。以下、命令読み
込み処理から実行サイクル更新処理710までが終了条
件のコードに達するまで繰り返される。図12にその結
果を示す。
In the initialization processing 701, initialization for executing a program is performed. Here, the CPU unit of the processor model and various registers of the cache memory unit are set. It is assumed that the contents of the memory are set to 2 for [80] and 5 for [A0]. Program reading processing 7
In 02, the program code 401 is read into the storage means, and the program counter register is set so as to start the execution of the program from 411. Further, it is set so that the execution of the program is terminated when the number reaches 420. In the instruction reading process 703, an instruction indicated by the program counter register is fetched. In this case, the LD instruction 411 is fetched via the cache, but the cache accesses the address for the first time, so the cache misses. Since the instruction reading is a reading process, the first cache unit power consumption calculating process 704 obtains, based on the power consumption information 1102 for each cache operation for the instruction cache, 120
[ΜW / MHz] is required. Here, the calculation of the power consumption is a simple process of simply subtracting the power consumption value of the corresponding cache operation from the power consumption table 1101, and is easily and quickly calculated. Next, L by instruction execution processing 705
The operation of the D instruction 411 is simulated, and the value 2 of the memory address [80] is read into the register reg0.
Next, according to the CPU unit power consumption calculation processing 706, the power consumption table 801 corresponding to each instruction indicates that 20
[ΜW / MHz] is required. Next, instruction execution processing 7
At 05, when a bus access occurs, the second cache unit power consumption calculation processing 707 determines the power consumption of the cache operated by the bus access. In the LD instruction, a read bus access occurs, and the address [80]
Is accessed from the beginning of the program, and the cache misses. In the second cache unit power consumption calculation processing 707, data access is performed, and the data cache operates. Therefore, the power consumption is calculated from the power consumption information 1103 for each data cache operation. In this case, because of a mistake in reading, 90 [μW / M
Hz] is required. Then, the power consumption calculation processing 708
As a result, 120 [μW / MHz] obtained in the first cache power consumption calculation processing 704, 20 [μW / MHz] obtained in the CPU power consumption calculation processing 706, and the second cache power consumption calculation 90 [μW / MHz] obtained in process 707 is added, and 230 [μW / M] is added.
Hz] is obtained as the power consumption in cycle 1. Next, it is determined by the program code end determination processing 709 that the code of the simulation end condition has been reached. In this case, the code has not been reached. Then, the next instruction code 412 is fetched in the instruction read processing 703. Hereinafter, the processing from the instruction reading processing to the execution cycle updating processing 710 is repeated until the end condition code is reached. FIG. 12 shows the result.

【0060】図12において、1201はサイクル数、
1202は実行された命令、1203はCPU部で消費
された電力である。1204は命令読み込み703での
命令フェッチでのキャッシュ部の動作であり、「Rミ
ス」は読み出しでミス、「Rヒット」は読み出しでヒッ
トを表わす。1205は1204のキャッシュ動作に応
じてキャッシュ動作毎の消費電力情報から求めた消費電
力、1206は実行した命令でバスアクセスが発生した
場合のキャッシュ部の動作であり、「Rミス」は読み出
しでミス、「Rヒット」は読み出しでヒット、「Wミ
ス」は書き込みでミス、「Wヒット」は書き込みでヒッ
ト、及び空欄はバスアクセス非発生を表わす。1207
は、1206でバスアクセスが発生した場合にキャッシ
ュ動作毎の消費電力情報から求めた消費電力、1208
は1203、1205、及び1207の消費電力を加算
したプロセッサ全体での消費電力である。
In FIG. 12, reference numeral 1201 denotes the number of cycles;
Reference numeral 1202 denotes an executed instruction, and reference numeral 1203 denotes power consumed by the CPU unit. Reference numeral 1204 denotes an operation of the cache unit in the instruction fetch in the instruction read 703, where "R miss" indicates a read miss and "R hit" indicates a read hit. Reference numeral 1205 denotes the power consumption obtained from the power consumption information for each cache operation in accordance with the cache operation of 1204; 1206, the operation of the cache unit when a bus access occurs due to the executed instruction; , "R hit" indicates a read hit, "W miss" indicates a write miss, "W hit" indicates a write hit, and a blank indicates no bus access. 1207
Are power consumption obtained from power consumption information for each cache operation when a bus access occurs in 1206,
Is the power consumption of the entire processor obtained by adding the power consumptions of 1203, 1205, and 1207.

【0061】シミュレーション終了条件のコードに達す
ると、消費電力出力処理711により、消費電力のシミ
ュレーション結果をディスプレー装置1501に出力さ
れるか、記憶手段1504に出力される。
When the simulation end condition code is reached, the power consumption output processing 711 outputs a simulation result of the power consumption to the display device 1501 or to the storage means 1504.

【0062】以上の様に、本発明に係る実施の形態によ
れば、請求項1又は請求項4に係る発明である消費電力
のシミュレーション方法によって、シミュレーション実
行前に、予め求められている各々の命令及びキャッシュ
部の動作状態に対して、命令毎の消費電力情報及びキャ
ッシュ動作毎の消費電力情報に格納しておき、検索集計
するのみで高速に与えられたプログラムコード実行時に
対する消費電力を求めることができる。特に請求項4に
係る発明では、キャッシュ動作毎の消費電力として、命
令キャッシュ用とデータキャッシュ用とを備えているた
め、ハーバード形式の命令/データキャッシュ付きプロ
セッサに最適なアーキテクチャレベルでの消費電力のシ
ミュレーション方法を提供することができる。
As described above, according to the embodiment of the present invention, by the power consumption simulation method according to the first or fourth aspect of the present invention, each of the previously determined respective values before the simulation is executed. The power consumption information for each instruction and the cache operation is stored in the power consumption information for each instruction and the cache operation for the operation state of the cache unit. be able to. In particular, in the invention according to claim 4, since the power consumption for each cache operation is provided for the instruction cache and the data cache, the power consumption at the architectural level optimal for the Harvard type processor with the instruction / data cache is provided. A simulation method can be provided.

【0063】なお、本実施の形態ではキャッシュ動作毎
の消費電力情報として単純なテーブル形式を用いたが、
キャッシュ動作がヒットかミスかにより関数として定義
しても同様の効果が得られることは言うまでも無い。
In this embodiment, a simple table format is used as power consumption information for each cache operation.
It goes without saying that the same effect can be obtained even if the function is defined as a function depending on whether the cache operation is a hit or a miss.

【0064】(第4の実施の形態)第4の実施の形態で
は、請求項10に係る発明について図を用いて説明す
る。
(Fourth Embodiment) In a fourth embodiment, the invention according to claim 10 will be described with reference to the drawings.

【0065】本実施の形態に係るシミュレーション処理
を実行する計算機のハードウエアの構成図としては、図
15で示した第1の実施の形態と同じものを用いる。
As the configuration diagram of the hardware of the computer that executes the simulation processing according to the present embodiment, the same configuration as that of the first embodiment shown in FIG. 15 is used.

【0066】図13は本実施の形態に係る消費電力のシ
ミュレーション方法のシミュレーション実行時の処理の
流れを示すフローチャートである。図13において、1
301は命令動作をシミュレートするプロセッサモデル
のCPUコア部やキャッシュメモリ部の内部変数等を初
期値に設定する初期化処理である。1302はシミュレ
ートするプロセッサモデルに与えるプログラムコードを
読み込み、シミュレーションを開始する命令の位置とシ
ミュレーションを終了する命令の位置を設定するプログ
ラム読み込み処理である。1303は与えられたプログ
ラムコードより、プロセッサモデルが現在の実行サイク
ルにおいて実行する命令を読み込む命令読み込み処理で
ある。命令はCPU部からはキャッシュメモリを介して
読み込まれるので、キャッシュ部の動作のシミュレーシ
ョンもここで行う。1304は命令読み込み処理130
3でシミュレートされたキャッシュ部の動作と現在の現
在のサイクルを記憶手段1504に出力する第1のキャ
ッシュ部動作保存処理である。1305は命令読み込み
処理1303で読み込まれた命令のプロセッサ動作をシ
ミュレートする命令実行処理である。1306は命令実
行処理1305でシミュレートされた命令の種類と現在
のサイクルを記憶手段1504に出力するCPU部動作
保存処理である。1307は命令実行処理1305にお
いてシミュレートされた命令でデータアクセスのバスア
クセスが発生した場合、発生したキャッシュ動作と現在
のサイクルを記憶手段1504に出力する第2のキャッ
シュ部動作保存処理である。1308はプログラム読み
込み処理1302により設定されている終了命令位置に
よりシミュレートすべきプログラムコードが終了してい
るかを判断するプログラムコード終了判断処理である。
1309はプログラムコード終了判断処理1308でプ
ログラムコードのシミュレーションが終了していないと
判断された時に、シミュレーションを行う実行サイクル
を1だけ進める実行サイクル更新処理であり、実行サイ
クルの更新後に命令読み込み処理1303に戻り次の実
行サイクルの処理を継続する。1310はプログラムコ
ード終了判断処理1308によりシミュレートすべきプ
ログラムコードが終了している時に、第1のキャッシュ
動作保存処理1304、CPU部動作保存処理130
6、及び第2のキャッシュ動作保存処理1307によ
り、記憶手段1504に保存された各サイクル毎のCP
U部の動作とキャッシュ部の動作と、命令毎の消費電力
及びキャッシュ動作毎の消費電力とから、与えられたプ
ログラムコードが実行された時の消費電力を求める消費
電力計算処理である。
FIG. 13 is a flowchart showing the flow of processing when a simulation of the power consumption simulation method according to the present embodiment is executed. In FIG. 13, 1
Reference numeral 301 denotes initialization processing for setting internal variables and the like of a CPU core unit and a cache memory unit of a processor model for simulating an instruction operation to initial values. Reference numeral 1302 denotes a program reading process for reading the program code given to the processor model to be simulated and setting the position of the instruction to start the simulation and the position of the instruction to end the simulation. Reference numeral 1303 denotes an instruction reading process for reading an instruction to be executed by the processor model in the current execution cycle from the given program code. Since the instruction is read from the CPU unit via the cache memory, the simulation of the operation of the cache unit is also performed here. 1304 is an instruction reading process 130
3 is a first cache unit operation saving process of outputting the simulated operation of the cache unit and the current current cycle to the storage unit 1504. Reference numeral 1305 denotes an instruction execution process for simulating the processor operation of the instruction read in the instruction reading process 1303. Reference numeral 1306 denotes a CPU unit operation storage process for outputting the type of the instruction simulated in the instruction execution process 1305 and the current cycle to the storage unit 1504. Reference numeral 1307 denotes a second cache unit operation storing process for outputting the generated cache operation and the current cycle to the storage unit 1504 when a bus access for data access occurs by an instruction simulated in the instruction execution process 1305. Reference numeral 1308 denotes a program code end determining process for determining whether the program code to be simulated has ended based on the end instruction position set by the program reading process 1302.
An execution cycle update process 1309 advances the execution cycle for performing the simulation by one when it is determined in the program code end determination process 1308 that the simulation of the program code has not been completed. Return The process of the next execution cycle is continued. Reference numeral 1310 denotes a first cache operation saving process 1304 and a CPU unit operation saving process 130 when the program code to be simulated by the program code end determining process 1308 has ended.
6 and the second cache operation storing process 1307, the CP for each cycle stored in the storage unit 1504
This is a power consumption calculation process for obtaining the power consumption when a given program code is executed from the operation of the U unit, the operation of the cache unit, the power consumption for each instruction, and the power consumption for each cache operation.

【0067】シミュレートされるプロセッサの命令セッ
トとしては、図2で示した第1の実施の形態で用いたも
のと同じものを例に用いる。
As the instruction set of the simulated processor, the same instruction set as that used in the first embodiment shown in FIG. 2 is used as an example.

【0068】プロセッサの命令毎の消費電力情報として
は、図8に示した第2の実施の形態で使用したものと同
じものを例に用いる。
As the power consumption information for each instruction of the processor, the same information as that used in the second embodiment shown in FIG. 8 is used as an example.

【0069】シミュレーションの対象となるプロセッサ
で実行するプログラムとしては、図4で示した第1の実
施の形態で用いたものを例に用いる。
As the program executed by the processor to be simulated, the program used in the first embodiment shown in FIG. 4 is used as an example.

【0070】キャッシュ動作毎の消費電力情報として
は、図9で示した第2の実施の形態で用いたものを例と
して用いる。
As power consumption information for each cache operation, the information used in the second embodiment shown in FIG. 9 is used as an example.

【0071】以下、本実施の形態に係る消費電力のシミ
ュレーション方法を図13のフォローに基づき、プログ
ラム401を実行した場合を一例に用いて具体的に説明
する。
Hereinafter, a method of simulating power consumption according to the present embodiment will be described in detail by taking as an example a case where the program 401 is executed based on the follow-up of FIG.

【0072】初期化処理1301ではプログラムの実行
を行うための初期化を行う。ここでは、プロセッサモデ
ルのCPU部やキャッシュメモリ部の各種レジスタ等が
設定される。メモリの内容は、[80]は2、[A0]
は5が設定されているとする。プログラム読み込み処理
1302では、プログラムコード401が記憶手段に読
み込まれ、411からプログラムの実行を開始する様に
プログラムカウンタレジスタが設定される。また、42
0に達した場合にプログラムの実行を終了する様に設定
される。命令読み込み処理1303では、プログラムカ
ウンタレジスタが指す命令をフェッチする。この場合、
キャッシュを介してLD命令411がフェッチされる
が、キャッシュにはこのアドレスへのアクセスは初回な
のでキャッシュはミスとなる。そして、第1のキャッシ
ュ部動作保存処理1304により、サイクル1のフェッ
チでは読み出しミスしたことを記憶手段1504に保存
する。次に命令実行処理1305によりLD命令411
の動作がシミュレートされ、メモリアドレス[80]の
値2がレジスタreg0に読み込まれる。次に、CPU
部動作保存処理1306により、サイクル1でLD命令
が実行されたことを記憶手段1305に保存する。次
に、命令実行処理1305で、バスアクセスが発生した
場合には、第2のキャッシュ部動作保存処理1307に
より発生したキャッシュ動作を記憶手段に保存するが、
LD命令では読み出しのバスアクセスが発生し、アドレ
ス[80]へのアクセスはプログラム開始時より始めて
であり、キャッシュはミスとなる。よって、サイクル1
のデータのバスアクセスが発生しミスしたことを記憶手
段1504に保存する。次に、プログラムコード終了判
定処理1308によりシミュレーション終了条件のコー
ドに達しているがが判断され、この場合達していないの
で、実行サイクル更新処理1309でサイクル数が2に
設定され、プログラムカウンタレジスタも1進められ、
次の命令コード412が命令読み込み処理1303でフ
ェッチされる。以下、命令読み込み処理から実行サイク
ル更新処理1309までが終了条件のコードに達するま
で繰り返される。
In an initialization process 1301, initialization for executing a program is performed. Here, the CPU unit of the processor model and various registers of the cache memory unit are set. The contents of the memory are [80] = 2, [A0]
Is set to 5. In the program reading process 1302, the program code 401 is read into the storage means, and the program counter register is set so that the program execution is started from 411. Also, 42
It is set so that the execution of the program is terminated when it reaches 0. In the instruction reading process 1303, the instruction pointed to by the program counter register is fetched. in this case,
Although the LD instruction 411 is fetched via the cache, the cache accesses this address for the first time, so the cache misses. Then, in the first cache unit operation storage processing 1304, the fact that a read error occurred in the fetch in cycle 1 is stored in the storage unit 1504. Next, LD instruction 411 is executed by instruction execution processing 1305.
Is simulated, and the value 2 of the memory address [80] is read into the register reg0. Next, CPU
The execution of the LD instruction in cycle 1 is stored in the storage unit 1305 by the unit operation storage processing 1306. Next, when a bus access occurs in the instruction execution processing 1305, the cache operation generated by the second cache unit operation storage processing 1307 is stored in the storage unit.
In the LD instruction, a read bus access occurs, access to the address [80] is started from the start of the program, and a cache miss occurs. Therefore, cycle 1
The fact that the bus access of the data has occurred and a mistake has occurred is stored in the storage means 1504. Next, it is determined by the program code end determination processing 1308 that the code of the simulation end condition has been reached. In this case, however, the code has not been reached. Proceeded,
The next instruction code 412 is fetched in the instruction reading processing 1303. Hereinafter, the processing from the instruction reading processing to the execution cycle updating processing 1309 is repeated until the code of the end condition is reached.

【0073】図14にその計算経過を示す。1401は
サイクル数、1402はCPU部動作保存処理1306
により保存された命令、1403は第1のキャッシュ部
動作保存処理1304で保存されたフェッチでのキャッ
シュの動作、1404は第2のキャッシュ部動作保存処
理1307で保存されたデータの読み込み又は書き込み
処理でのキャッシュの動作である。プログラムコード終
了判定処理1308でシミュレーション終了条件のコー
ドに達していると判断された時点では、1410の部分
のデータが記憶手段1504に保存されている。この1
410の情報から消費電力計算処理1310により、1
402の実行された命令と命令毎の消費電力テーブル8
01より1405のCPU部消費電力、1403のフェ
ッチ時のキャッシュ動作とキャッシュ動作毎の消費電力
情報901より1406の命令フェッチ時の消費電力、
1404のデータアクセス時のキャッシュ動作とキャッ
シュ動作毎の消費電力情報901より1407のデータ
アクセス時の消費電力を求め、1405、1406、及
び1407の消費電力より、全体の消費電力1408を
求める。消費電力計算処理1310において、全てのサ
イクルに対してこれらの処理が行なうと、1411の部
分の計算が行われる。
FIG. 14 shows the calculation process. 1401 is the number of cycles, 1402 is CPU unit operation saving processing 1306
1403 is a cache operation in the fetch saved in the first cache unit operation saving process 1304, and 1404 is a read or write process of the data saved in the second cache unit operation saving process 1307. This is the operation of the cache. When it is determined in the program code end determination processing 1308 that the code of the simulation end condition has been reached, the data of the portion 1410 is stored in the storage unit 1504. This one
The power consumption calculation processing 1310 from the information of 410
402 executed instructions and power consumption table 8 for each instruction
CPU power consumption from 1 to 1405, cache operation at the time of fetch of 1403, and power consumption information at the time of instruction fetch from 1901 to 1406 from the power consumption information 901 for each cache operation,
The power consumption at the time of data access of 1407 is obtained from the cache operation at the time of data access at 1404 and the power consumption information 901 for each cache operation, and the total power consumption 1408 is obtained from the power consumption of 1405, 1406, and 1407. In power consumption calculation processing 1310, when these processings are performed for all cycles, calculation of 1411 is performed.

【0074】例えば、サイクル1では、LD命令が保存
されているので命令毎の消費電力情報801より20
[μW/MHz]、命令フェッチ時のキャッシュ動作1
403として「Rミス」つまり読み出しでミスが保存さ
れているのでキャッシュ動作毎の消費電力情報901よ
り100[μW/MHz]、データアクセス時のキャッ
シュ動作1404として「Rミス」つまり読み出しミス
が保存されているのでキャッシュ動作毎の消費電力情報
901より100[μW/MHz]が求められ、これら
の値を加算し1408の全体の消費電力として220
[μW/MHz]が求められる。求められた消費電力
は、消費電力のシミュレーション結果をディスプレー装
置1501に出力されるか、記憶手段1504に出力さ
れる。
For example, in cycle 1, since the LD instruction is stored, the power consumption information
[ΜW / MHz], cache operation 1 at instruction fetch
Since an “R miss”, that is, a miss in reading is stored as 403, 100 [μW / MHz] is obtained from the power consumption information 901 for each cache operation, and an “R miss”, that is, a reading miss is stored as the cache operation 1404 during data access. Therefore, 100 [μW / MHz] is obtained from the power consumption information 901 for each cache operation.
[ΜW / MHz] is required. The obtained power consumption is output to the display device 1501 as a result of the simulation of the power consumption or to the storage unit 1504.

【0075】以上の様に、本発明に係る実施の形態によ
れば、請求項10に係る発明である消費電力のシミュレ
ーション方法によって、シミュレーション実行前に、予
め求められている各々の命令及びキャッシュ部の動作状
態に対して、命令毎の消費電力情報及びキャッシュ動作
毎の消費電力情報に格納しておき、シミュレーション中
は、各サイクルで実行された命令及びキャッシュ動作を
記憶手段に保存しておき、シミュレーション終了後に保
存されたCPU部及びキャッシュ部の動作と、命令毎の
消費電力情報及びキャッシュ動作毎の消費電力情報より
動作時の動的な消費電力を求めることが可能である。本
発明では、シミュレーション処理と消費電力計算処理と
を分離できるため、市販のシミュレータ等を用いるた
め、シミュレータ内部に消費電力計算機能を組み込むこ
とが困難な場合等でも、後処理により消費電力をシミュ
レートする方法を提供することができる。
As described above, according to the embodiment of the present invention, by the power consumption simulation method according to the tenth aspect, each instruction and the cache unit which are obtained in advance before the simulation is executed. For the operation state, the power consumption information for each instruction and the power consumption information for each cache operation are stored, and during the simulation, the instruction and the cache operation executed in each cycle are stored in the storage unit. Dynamic power consumption during operation can be obtained from the operations of the CPU unit and the cache unit saved after the simulation, power consumption information for each instruction, and power consumption information for each cache operation. In the present invention, since the simulation process and the power consumption calculation process can be separated, a commercially available simulator or the like is used. Can be provided.

【0076】(第5の実施の形態)第5の実施の形態で
は請求項5、請求項6、請求項7、請求項8に係る消費
電力シミュレーション方法について説明する。
(Fifth Embodiment) In a fifth embodiment, a power consumption simulation method according to claims 5, 6, 7, and 8 will be described.

【0077】図20は本実施形態に係る消費電力のシミ
ュレーション方法のシミュレーション実行時の処理流れ
を示すフローチャートである。2001はシミュレーシ
ョン対象となる回路内の各部の初期化を行う初期化処理
である。バスマスター部に対しては命令動作をシミュレ
ーションする内部状態を初期化し、当該モデルのシミュ
レーションにより計算される消費電力を記憶する手段を
初期化する初期化処理である。2002はシミュレート
するバスマスターに与えるプログラムコードを読み込
み、シミュレーションを開始する命令の位置とシミュレ
ーションを終了する命令の位置を設定する。2003は
与えられたプログラムコードより、バスマスターのモデ
ルが現実行サイクルにおいて実行する命令を読み込む処
理である。2004は命令読み込みにおけるバスモデル
の状態のアドレス、bit幅、転送モード、読み出しまた
は書き込みアクセスのいずれかであるかの情報を読み出
す処理である。2005は前記2004においてシミュ
レーションモデルより抽出したパラメータから消費電力
を計算し、実行されている実行サイクルとともに記憶す
る消費電力計算処理である。2006は読み込まれた命
令の動作をシミュレートする実行処理であり、2007
は命令実行におけるバスモデルの状態のアドレス、bit
幅、転送モード、読み出しまたは書き込みアクセスのい
ずれかであるかの情報を読み出す処理である。2008
は前記2007においてシミュレーションモデルより抽
出したパラメータから消費電力を計算し、実行されてい
る実行サイクルとともに記憶する消費電力計算処理であ
る。2009は2002により設定されている終了命令
位置によりシミュレートするべきプログラムコードが終
了しているかを判定する終了判定処理である。
FIG. 20 is a flowchart showing a processing flow when executing the simulation of the power consumption simulation method according to the present embodiment. Reference numeral 2001 denotes initialization processing for initializing each unit in a circuit to be simulated. For the bus master unit, this is an initialization process for initializing an internal state for simulating an instruction operation and initializing means for storing power consumption calculated by simulation of the model. 2002 reads the program code given to the bus master to be simulated, and sets the position of the instruction to start the simulation and the position of the instruction to end the simulation. Reference numeral 2003 denotes processing for reading an instruction to be executed by the bus master model in the current execution cycle from a given program code. Reference numeral 2004 denotes a process of reading information on an address, a bit width, a transfer mode, and one of read and write accesses in the state of a bus model in reading an instruction. A power consumption calculation process 2005 calculates the power consumption from the parameters extracted from the simulation model in the above-described 2004 and stores the power consumption along with the execution cycle being executed. An execution process 2006 simulates the operation of the read instruction.
Is the address of the state of the bus model during instruction execution, bit
This is a process of reading information on the width, the transfer mode, and whether the access is read or write access. 2008
Is a power consumption calculation process of calculating the power consumption from the parameters extracted from the simulation model in 2007 and storing the calculated power consumption together with the execution cycle being executed. 2009 is an end determination process for determining whether the program code to be simulated has ended based on the end instruction position set by 2002.

【0078】図21は、シミュレーション対象となる一
回路例である。同図の2101、2102は読み出しま
たは書き込みバスアクセス処理を発生させることのでき
る装置バスマスター1、バスマスター2、であり、21
03は複数のバスを接続する装置バスアダプタである。
FIG. 21 shows an example of a circuit to be simulated. In the figure, reference numerals 2101 and 2102 denote device bus masters 1 and 2 which can generate a read or write bus access process.
03 is a device bus adapter for connecting a plurality of buses.

【0079】また、2107、2108はバスであり、
制御信号線、アドレス信号線、データ信号線によって構
成されている。2107はバスマスタ2101及び21
02に接続されているメインバスである。2108はメ
インバスに対してバスアダプタ2103を介して接続さ
れたサブバスである。2104、2105、2106は
バスマスターからアクセスを受けるバススレーブであ
り、メインバスまたはサブバスに接続されている。21
04はアドレスによって区別して複数のデータを記憶し
ておけることのできる記憶装置であり、メインバス21
07に接続されている。2105,2106は機能ブロ
ック1及び機能ブロック2であり、内部に記憶回路を内
蔵し、接続されたバスによって読み出し及び書き込みが
可能である。2109はメインバスに接続された外部バ
スインターフェースであり、チップ外部の外部記憶装置
2110に接続されている。
Also, 2107 and 2108 are buses,
It is composed of control signal lines, address signal lines, and data signal lines. 2107 is a bus master 2101 or 21
02 is a main bus. Reference numeral 2108 denotes a sub-bus connected to the main bus via a bus adapter 2103. Bus slaves 2104, 2105, and 2106 are accessed by the bus master, and are connected to the main bus or the sub bus. 21
Reference numeral 04 denotes a storage device capable of storing a plurality of pieces of data distinguished by addresses.
07. Reference numerals 2105 and 2106 denote a functional block 1 and a functional block 2, which have a built-in storage circuit therein and can read and write data via a connected bus. Reference numeral 2109 denotes an external bus interface connected to the main bus, which is connected to an external storage device 2110 outside the chip.

【0080】図22は図21で示した回路例におけるア
ドレス構成例である。図22において2202で示され
た領域が本回路例におけるアドレス領域全体であり、ア
ドレス領域2203、2204、2205、2206で
構成されている。アドレス領域2203はバスマスタ2
101の内部記憶領域、アドレス領域2204は機能ブ
ロック1(2105)及び機能ブロック2(2106)
の内部記憶領域、アドレス領域2205は記憶装置21
04の記憶領域、アドレス領域2206は外部記憶装置
2110の記憶領域をそれぞれ示している。2201は
アドレス番号における記憶領域の境を示しており、0か
ら100までが記憶領域2203を、100から200
までが記憶領域2204を200から300までが記憶
領域2205を、300から500までが記憶領域22
06をしめすアドレス番号である。
FIG. 22 shows an example of an address configuration in the circuit example shown in FIG. In FIG. 22, an area indicated by 2202 is the entire address area in the present circuit example, and is constituted by address areas 2203, 2204, 2205, and 2206. Address area 2203 is bus master 2
The internal storage area 101 and the address area 2204 are a functional block 1 (2105) and a functional block 2 (2106).
The internal storage area and address area 2205 of the storage device 21
A storage area 04 and an address area 2206 indicate storage areas of the external storage device 2110, respectively. Reference numeral 2201 denotes a boundary of the storage area in the address number, and 0 to 100 indicates the storage area 2203, and 100 to 200
Is the storage area 2204, 200 to 300 is the storage area 2205, and 300 to 500 is the storage area 22.
06 is the address number.

【0081】図23、図24、図25は本実施形態にお
ける図20で示した回路に対する消費電力情報の一例を
示す図である。図23は前記図22におけるアドレス領
域2203、2204、2205、2206の消費電力
情報であり、2301は読み出しアクセスに対する1バ
スサイクル、8bitあたりの消費電力情報であり、23
02は書き込みアクセスに対する1バスサイクル、8bi
tあたりの消費電力情報である。図24は前記図21に
おけるバスマスター1及びバスマスター2の内部におい
て消費される消費電力情報である。図25はバススレー
ブである記憶装置2104および、機能ブロック1、機
能ブロック2内部で消費される消費電力情報である。
FIGS. 23, 24 and 25 are diagrams showing an example of power consumption information for the circuit shown in FIG. 20 in the present embodiment. FIG. 23 shows the power consumption information of the address areas 2203, 2204, 2205, and 2206 in FIG.
02 is one bus cycle for write access, 8 bi
Power consumption information per t. FIG. 24 shows power consumption information consumed inside the bus master 1 and the bus master 2 in FIG. FIG. 25 shows power consumption information consumed inside the storage device 2104 which is a bus slave and the function blocks 1 and 2.

【0082】また、本例では連続転送における最初の1
回目の転送は単転送相当である。
In this example, the first one in the continuous transfer is
The first transfer is equivalent to a single transfer.

【0083】これらの消費電力は、予め、シミュレーシ
ョンを行う前に各ブロックをゲートレベルやトランジス
タレベルで実現したデータを基に、ゲートレベルシミュ
レーションや回路シミュレーション等により評価し、消
費電力を求めておいたものである。
These power consumptions are evaluated in advance by a gate level simulation or a circuit simulation based on data obtained by realizing each block at a gate level or a transistor level before the simulation, and the power consumption is obtained. Things.

【0084】図16はシミュレートされるバスマスター
1の命令セットの1例である。命令LDRはアドレスによ
り指定される記憶領域のデータからレジスタaまたはレ
ジスタbにアドレスにより指定される記憶領域にデータ
を32bit幅で単転送するデータ転送命令である。単転
送とはアドレスのインクリメントを伴わないでアクセス
が開始し、終了する転送である。命令LDRBはアドレスに
より指定される記憶領域のデータからレジスタaまたは
レジスタbにアドレスにより指定される記憶領域にデー
タを8bit幅で単転送するデータ転送命令である。命令L
DRHアドレスにより指定される記憶領域のデータからレ
ジスタaまたはレジスタbにアドレスにより指定される
記憶領域にデータを16bit幅で単転送するデータ転送
命令である。命令STRはレジスタaまたはレジスタbか
らアドレスにより指定される記憶領域にデータを32bi
t幅で単転送するデータ転送命令である。命令STRBはレ
ジスタaまたはレジスタbからアドレスにより指定され
る記憶領域にデータを8bit幅で単転送するデータ転送
命令である。命令STRHはレジスタaまたはレジスタbか
らアドレスにより指定される記憶領域にデータを16bi
t幅で単転送するデータ転送命令である。命令LDMはアド
レスルより指定されるアドレス番号を先頭にした記憶領
域のデータをレジスタaからレジスタbにいたる複数の
レジスタに順次32bit幅で連続転送するデータ転送命
令である。連続転送とは転送開始から終了までの間にア
ドレスがインクリメントし複数ワード長のデータを一度
の転送で行う転送である。命令LDMBはアドレスにより指
定されるアドレス番号を先頭にした記憶領域のデータを
レジスタaからレジスタbにいたる複数のレジスタに順
次8bit幅で連続転送するデータ転送命令である。命令L
DMHはアドレスにより指定されるアドレス番号を先頭に
した記憶領域のデータをレジスタaからレジスタbにい
たる複数のレジスタに順次16bit幅で連続転送するデ
ータ転送命令である。命令STMはレジスタaからレジス
タbに至る複数のレジスタからアドレスにより指定され
た記憶領域を先頭にした一連の記憶領域にデータを順次
32bit幅で連続転送するデータ転送命令である。命令S
TMHはレジスタaからレジスタbに至る複数のレジスタ
からアドレスにより指定された記憶領域を先頭にした一
連の記憶領域にデータを順次16bit幅で連続転送する
データ転送命令である。命令STMBはレジスタaからレジ
スタbに至る複数のレジスタからアドレスにより指定さ
れた記憶領域を先頭にした一連の記憶領域にデータを順
次8bit幅で連続転送するデータ転送命令である。命令N
OPは何の処理も行わない。
FIG. 16 shows an example of the instruction set of the bus master 1 to be simulated. The instruction LDR is a data transfer instruction for single-transferring data with a 32-bit width from the data in the storage area specified by the address to the storage area specified by the address in the register a or the register b. A single transfer is a transfer in which access starts and ends without incrementing the address. The instruction LDRB is a data transfer instruction for single-transferring data in 8-bit width from data in a storage area specified by an address to a storage area specified by an address in a register a or a register b. Instruction L
This is a data transfer instruction for single-transferring data with a 16-bit width from the data in the storage area specified by the DRH address to the storage area specified by the address in the register a or the register b. The instruction STR stores data in the storage area specified by the address from the register a or the register b in 32 bits.
This is a data transfer instruction for single transfer in t width. The instruction STRB is a data transfer instruction for single-transferring data from a register a or a register b to a storage area specified by an address with a width of 8 bits. The instruction STRH stores data in the storage area specified by the address from the register a or the register b in 16 bits.
This is a data transfer instruction for single transfer in t width. The instruction LDM is a data transfer instruction for sequentially transferring data in a storage area starting with an address number designated by an address to a plurality of registers from a to a in a 32-bit width. The continuous transfer is a transfer in which the address is incremented from the start to the end of the transfer and data of a plurality of word lengths is transferred in one transfer. The instruction LDMB is a data transfer instruction for sequentially transferring data of a storage area starting from an address number designated by an address to a plurality of registers from a register a to a register b in an 8-bit width. Instruction L
DMH is a data transfer instruction for sequentially transferring data in a storage area starting from an address number designated by an address to a plurality of registers from register a to register b in a 16-bit width. The instruction STM is a data transfer instruction for sequentially transferring data at a 32-bit width from a plurality of registers from the register a to the register b to a series of storage areas starting from a storage area specified by an address. Instruction S
TMH is a data transfer instruction for sequentially transferring data with a 16-bit width to a series of storage areas starting from a storage area designated by an address from a plurality of registers from a register a to a register b. The instruction STMB is a data transfer instruction for sequentially transferring data with a 8-bit width from a plurality of registers from the register a to the register b to a series of storage areas starting from a storage area specified by an address. Instruction N
The OP does nothing.

【0085】図17はシミュレーションの対象になるバ
スマスターが実行するプログラムの一例であり、図17
において一列が一命令を表しており、左から命令、ディ
スティネーション、ソースの順番で記述されている。
FIG. 17 shows an example of a program executed by the bus master to be simulated.
, One column represents one instruction, and is described in order of the instruction, the destination, and the source from the left.

【0086】図18は図17で示したプログラムコード
が図21の記憶装置2104内部に記憶されているアド
レスと命令であり、行1801はアドレス200に「LD
RHreg#a 350」に対応するコードが記憶されており、行
1802はアドレス201に「STRB 120 reg#a」に対
応するコードが記憶されており、行1803はアドレス
202に「LDM [reg#a reg#b] 250」に対応するコード
が記憶されていることを示す。
FIG. 18 shows addresses and instructions in which the program code shown in FIG. 17 is stored in the storage device 2104 of FIG.
The code corresponding to “RHreg # a 350” is stored, the line 1802 stores the code corresponding to “STRB 120 reg # a” at the address 201, and the line 1803 stores the code “LDM [reg # a]” at the address 202. reg # b] 250 "is stored.

【0087】以下、本実施の形態に係る消費電力のシミ
ュレーション方法を図20で示した処理の流れに基づ
き、図17で示されたプログラムを実行した場合を一例
に用いて具体的に説明する。本例においてreg#aとreg#b
は32bitレジスタで、reg#bはreg#aに対して4ワード
離れているとする。図17で示したプログラムコードが
バスマスター1によって実行されるものとし、バスマス
ター1及びバスマスター2からの命令フェッチは32bi
t単サイクル転送で行われるとして説明する。
Hereinafter, the method of simulating power consumption according to the present embodiment will be specifically described based on the flow of the processing shown in FIG. 20, using the case where the program shown in FIG. 17 is executed as an example. In this example, reg # a and reg # b
Is a 32-bit register, and reg # b is 4 words away from reg # a. It is assumed that the program code shown in FIG. 17 is executed by the bus master 1, and the instruction fetch from the bus master 1 and the bus master 2 is 32 bi.
Description will be made assuming that the transfer is performed by t single cycle transfer.

【0088】2001の初期化処理ではプログラムの実
行を行うための初期化を行う。本実施の形態では、命令
の実行位置を示すバスマスター1内のレジスタはアドレ
ス200を示す値に設定される。2002のプログラム
読み込み処理ではシミュレートするべきプログラムを読
み込み、記憶装置2104に読み込み図18に示したア
ドレスにプログラムコードが格納される。
In the initialization processing of 2001, initialization for executing a program is performed. In the present embodiment, the register in the bus master 1 indicating the execution position of the instruction is set to a value indicating the address 200. In the program reading process of 2002, a program to be simulated is read, read into the storage device 2104, and the program code is stored at the address shown in FIG.

【0089】2003の命令読み込みでは、記憶装置2
104からアドレス200番に格納された命令コードを
読み込む。
In reading the instruction of 2003, the storage device 2
The instruction code stored at address 200 is read from 104.

【0090】2004では前記2003でのバスアクセ
スの状態を読み込む。この場合、アドレス領域2204
へのアクセスであり32bit幅読み出し、単アクセスで
あり、1バスサイクルで読み込みは終了することが読み
出される。
In step 2004, the state of the bus access in step 2003 is read. In this case, the address area 2204
, Which is a 32-bit width read, and a single access, and is read to be completed in one bus cycle.

【0091】2005では前記2004で読み出したバ
スアクセス状態と図23、24、25に示した消費電力
情報から消費電力値が算出される。図23の2302よ
り0.3μW/MHz/8bit、32bitアクセスが1バ
スアクセスで完了したので1.2μW、さらにバスマス
ター1のバス接続部で消費される消費電力、図24の2
401より1μWおよび記憶装置2104のバス接続部
で消費される消費電力図25の2501より0.1μ
W、合計2.3μWと算出される。
In step 2005, the power consumption value is calculated from the bus access state read in step 2004 and the power consumption information shown in FIGS. Since the access of 0.3 μW / MHz / 8 bits and 32 bits was completed by one bus access from 2302 in FIG. 23, 1.2 μW, and the power consumption in the bus connection part of the bus master 1, 2 in FIG.
25 and 1 μW from 2501 in FIG.
W, a total of 2.3 μW.

【0092】2006では前記2003にて読み込んだ
命令1701が実行される。
In 2006, the instruction 1701 read in 2003 is executed.

【0093】2007で命令実行時のバス状態がシミュ
レーションモデルから読み出され、アドレス領域220
6からreg#aに8bit幅で単転送され、読み出されている
ことを算出する。
In 2007, the bus state at the time of instruction execution is read from the simulation model, and the address area 220 is read.
It is calculated that the data is transferred from 6 to reg # a with a single 8-bit width and read.

【0094】2008において2006における消費電
力が2007で読み出したバス情報を基に算出され、図
23の2303より0.3μW/Hz/8bitという消
費電力情報が読み出され、2401より0.1μW、2
504より0.1μWがそれぞれ消費電力情報として読
み出され、合計消費電力量として0.5μWとして算出
される。
In 2008, the power consumption in 2006 is calculated based on the bus information read in 2007, the power consumption information of 0.3 μW / Hz / 8 bits is read out from 2303 in FIG.
From 504, 0.1 μW is read as power consumption information, and is calculated as 0.5 μW as the total power consumption.

【0095】2009においてプログラムコード170
1は終了位置でないため、命令サイクルを1進めて20
03に戻り、2命令サイクル目として2003が処理さ
れる。
In 2009, the program code 170
Since 1 is not the end position, the instruction cycle is advanced by 1 to 20
Returning to 03, 2003 is processed as the second instruction cycle.

【0096】2サイクル目の実行サイクルにおいて、2
003において1802に相当する命令コードが記憶装
置2104から命令読み出しされる。
In the second execution cycle, 2
At 003, an instruction code corresponding to 1802 is read from the storage device 2104.

【0097】2004において命令読み出しの際のバス
アクセスの状態が読み出される。この場合、アドレス領
域2204へのアクセスであり32bit幅読み出し、単
アクセスであり、1バスサイクルで読み込みは終了する
ことが読み出される。
In 2004, the state of the bus access at the time of reading the instruction is read. In this case, it is read that the access to the address area 2204 is a 32-bit width read, a single access, and that the read is completed in one bus cycle.

【0098】2005では前記2004で読み出したバ
スアクセス状態と図23、24、25に示した消費電力
情報から消費電力値が算出される。図23の2301よ
り0.3μW/MHz/8bit、32bitアクセスが1バ
スアクセスで完了したので1.2μW、さらにバスマス
ター1のバス接続部で消費される消費電力、図24の2
401より1μWおよび記憶装置2104のバス接続部
で消費される消費電力図25の2501より0.1μ
W、合計2.3μWと算出される。
In 2005, a power consumption value is calculated from the bus access state read in 2004 and the power consumption information shown in FIGS. Since the access of 0.3 μW / MHz / 8 bits and 32 bits has been completed by one bus access from 2301 in FIG.
25 and 1 μW from 2501 in FIG.
W, a total of 2.3 μW.

【0099】2006では前記2003にて読み込んだ
命令1702が実行される。
In 2006, the instruction 1702 read in 2003 is executed.

【0100】2007で命令実行時のバス状態がシミュ
レーションモデルから、reg#aからアドレス領域220
4への16ビット幅での単転送であることが読み出され
る。
In 2007, the bus state at the time of executing the instruction is changed from the simulation model to the address area 220 from reg # a.
4 is read as a single transfer with a 16-bit width.

【0101】2008において2006における消費電
力が2007で読み出したバス情報を基に算出され、図
23の2301より0.6μW/Hz/8bitという消
費電力情報が読み出され、2401から1μWが、25
02より0.2μWが消費電力情報として読み出され、
合計消費電力量として2.4μWとして算出される。
In 2008, the power consumption in 2006 is calculated based on the bus information read in 2007, the power consumption information of 0.6 μW / Hz / 8 bits is read from 2301 in FIG. 23, and 1 μW from 2401 is 25
02, 0.2 μW is read as power consumption information,
It is calculated as 2.4 μW as the total power consumption.

【0102】2009においてプログラムコード170
1は終了位置でないため、命令サイクルを1進めて20
03に戻り、3命令サイクル目として2003が処理さ
れる。
In 2009, the program code 170
Since 1 is not the end position, the instruction cycle is advanced by 1 to 20
Returning to 03, 2003 is processed as the third instruction cycle.

【0103】3サイクル目の実行サイクルにおいて、2
003において1803に相当する命令コードが記憶装
置2104から命令読み出しされる。
In the third execution cycle, 2
At 003, an instruction code corresponding to 1803 is read from the storage device 2104.

【0104】2004において命令読み出しの際のバス
アクセスの状態が読み出される。この場合、アドレス領
域2204へのアクセスであり32bit幅読み出し、単
アクセスであり、1バスサイクルで読み込みは終了する
ことが読み出される。
In 2004, the state of the bus access at the time of reading the instruction is read. In this case, it is read that the access to the address area 2204 is a 32-bit width read, a single access, and that the read is completed in one bus cycle.

【0105】2005では前記2004で読み出したバ
スアクセス状態と図23、24、25に示した消費電力
情報から消費電力値が算出される。図23の2301よ
り0.3μW/MHz/8bit、32bitアクセスが1バ
スアクセスで完了したので1.2μW、さらにバスマス
ター1のバス接続部で消費される消費電力、図24の2
401より1μWおよび記憶装置2104のバス接続部
で消費される消費電力図25の2501より0.1μ
W、合計2.3μWと算出される。
In step 2005, the power consumption value is calculated from the bus access state read in step 2004 and the power consumption information shown in FIGS. Since the access of 0.3 μW / MHz / 8 bits and 32 bits has been completed by one bus access from 2301 in FIG.
25 and 1 μW from 2501 in FIG.
W, a total of 2.3 μW.

【0106】2006では前記2003にて読み込んだ
命令1702が実行される。
In 2006, the instruction 1702 read in 2003 is executed.

【0107】2007において命令実行時のバス状態が
シミュレーションモデルから読み出される。reg#aからr
eg#bにいたる一連のレジスタは4ワードでありアドレス
番号250すなわちアドレス領域2005から4ワード
が32ビット幅で連続転送で、読み出される。
In 2007, the bus state at the time of executing the instruction is read from the simulation model. reg # a to r
A series of registers up to eg # b are four words, and four words are read out from the address number 250, that is, the address area 2005, by continuous transfer with a 32-bit width.

【0108】2008において2006における消費電
力が2007で読み出したバス情報を基に算出され、図
23の2302より単転送0.3μWが1転送と連続転
送0.1μWが3転送行われ、32ビット幅アクセスの
為に4倍される。2401より1μW、2501より
0.1μWが消費電力情報として読み出され、合計消費
電力情報として5.7μWと算出される。
In 2008, the power consumption in 2006 is calculated based on the bus information read out in 2007. One transfer of 0.3 μW for single transfer and three transfers for 0.1 μW of continuous transfer are performed from 2302 in FIG. Multiplied by 4 for access. 1 μW from 2401 and 0.1 μW from 2501 are read as power consumption information, and are calculated as 5.7 μW as total power consumption information.

【0109】図19は以上の方法によりプログラム17
01の実行をシミュレートする事により得られる結果で
ある。
FIG. 19 shows the program 17 by the above method.
This is the result obtained by simulating the execution of S.01.

【0110】以上のような実施の形態によれば請求項5
に係る発明である消費電力のシミュレーション方法によ
って、シミュレーション実行前に、予め求められている
アドレス領域に対してバスアクセスが実行される時に消
費される電力値をアドレス領域毎の消費電力情報として
記憶しておき、シミュレーション実行時に与えられたプ
ログラムコードに対する命令動作をシミュレートすると
同時にアクセスアドレス領域毎の消費電力情報により実
行されるバスアクセスに対応する消費電力値を求め、シ
ミュレートするプログラムにおいて消費される消費電力
値をサイクル毎に求めることができる。通常アドレス領
域は32bitプロセッサにおいて4GBにも及ぶが、ア
ドレス領域毎の消費電力情報は計算機中で表形式などで
保持することにより、簡単に検索することが可能なた
め、消費電力の見積もりを高速に行うことができる。
According to the above embodiment, claim 5
According to the power consumption simulation method of the present invention, before executing the simulation, a power value consumed when a bus access is performed to a predetermined address area is stored as power consumption information for each address area. In addition, at the same time as simulating the instruction operation for the program code given at the time of executing the simulation, a power consumption value corresponding to the bus access executed based on the power consumption information for each access address area is obtained and consumed in the simulated program. The power consumption value can be obtained for each cycle. Normally, the address area reaches 4 GB in a 32-bit processor, but the power consumption information for each address area can be easily searched by holding it in a table or the like in a computer, so that the power consumption can be estimated quickly. It can be carried out.

【0111】また、請求項6に係る発明であるシミュレ
ートするバスマスターが複数のビット幅アクセスをする
ことが可能な場合、バスアクセスの際のビット幅を考慮
して消費電力を算出するために、複数のビット幅でのア
クセスをすることが可能なバスマスターに対しても正確
な消費電力の見積もりを行うことができる。
Further, when the simulated bus master according to the sixth aspect of the present invention can access a plurality of bit widths, the power consumption is calculated in consideration of the bit width at the time of the bus access. It is also possible to accurately estimate power consumption even for a bus master that can access with a plurality of bit widths.

【0112】また請求項7に係る発明であるシミュレー
トするバスアクセスにおいて、読み出しアクセスと書き
込みアクセスに置ける消費電力情報を区別することで、
読み出し、書き込みいずれのバスアクセスにおいても高
精度の消費電力の見積もりを行うことが可能である。
In the simulated bus access according to the seventh aspect of the present invention, power consumption information for read access and write access is distinguished,
High-precision power consumption estimation can be performed for both read and write bus accesses.

【0113】また、請求項8に係る発明であるシミュレ
ートするバスアクセスにおいて、転送モード別に消費電
力情報を記憶しておくことで、複数の転送モードを持つ
バスに対して、より正確な見積もりを行うことが可能に
なる。
In the simulated bus access according to the eighth aspect, by storing power consumption information for each transfer mode, a more accurate estimate can be made for a bus having a plurality of transfer modes. It is possible to do.

【0114】さらにまた、本実施の形態では、説明の簡
易化のためバスマスターとして通常の単にプロセッサと
しているが、実際には、前記の第1の実施の形態、第2
の実施の形態、第3の実施の形態、及び第4の実施の形
態で示したキャッシュを考慮した方法と組み合わせるこ
とにより、より高精度の消費電力の見積もりを行えるこ
とは言うまでもない。
Furthermore, in this embodiment, for simplicity of explanation, an ordinary processor is merely used as a bus master. However, actually, the bus master is actually a processor.
It is needless to say that the power consumption can be estimated with higher accuracy by combining with the method in consideration of the cache described in the third embodiment, the third embodiment and the fourth embodiment.

【0115】[0115]

【発明の効果】以上説明した様に、請求項1、請求項
2、請求項3、請求項4、請求項9、及び請求項10記
載の発明によれば、シミュレーション実行前に、プロセ
ッサの命令セットの個々の命令及びキャッシュメモリの
複数の動作に対して、回路レベル又はゲートレベルのシ
ミュレーション、又は実際に試作した実チップの評価結
果より各命令が実行される時に消費される電力を求め命
令毎の消費電力情報及びキャッシュ動作毎の消費電力情
報に格納しておき、シミュレーション実行中に与えられ
たプログラムコードに対する命令動作及びキャッシュ動
作をシミュレートすると共に、実行された命令に対応す
る消費電力の値を命令毎の消費電力情報から、実行され
たキャッシュ動作に対応する消費電力の値をキャッシュ
動作毎の消費電力情報から検索し、一定時間毎に集計し
ていくことにより、与えられたプログラムコードで動作
する時にプロセッサ部が消費する電力の時間遷移を求め
る。ここで、プログラムコードに従って実行されるサイ
クル数は通常数千、数百万サイクル以上の膨大なサイク
ル数になるが、命令毎の消費電力情報は計算機中では表
形式等で保持することにより簡単に検索することが可能
であり、また一定時間毎の消費電力を計算する場合も簡
単な積算及び平均計算等により、高速に行なうことが可
能である。よって、キャッシュメモリを備えたプロセッ
サを含む半導体集積回路の回路動作を模擬すると共に、
その消費電力を高速に見積もるシミュレーション方法を
提供することができる。
As described above, according to the first, second, third, fourth, ninth, and tenth aspects of the present invention, the instruction of the processor is executed before executing the simulation. For each instruction of the set and a plurality of operations of the cache memory, the power consumed when each instruction is executed is determined from the simulation result at the circuit level or the gate level or from the evaluation result of the actual chip actually manufactured for each instruction. Power consumption information and power consumption information for each cache operation, and simulates an instruction operation and a cache operation for a program code given during simulation execution, and a value of power consumption corresponding to the executed instruction. From the power consumption information for each instruction, the power consumption value corresponding to the executed cache operation is calculated based on the power consumption information for each cache operation. Retrieved from, by going aggregated at predetermined time intervals, determining the time transition of power processor unit consumes when operating in a given program code. Here, the number of cycles executed according to the program code is usually a huge number of thousands or millions of cycles or more, but the power consumption information for each instruction can be easily stored in a computer in a table format or the like. It is possible to search, and also to calculate the power consumption for each fixed time, it is possible to perform the calculation at high speed by simple integration and average calculation. Therefore, while simulating the circuit operation of a semiconductor integrated circuit including a processor having a cache memory,
A simulation method for quickly estimating the power consumption can be provided.

【0116】特に、請求項2記載の発明では、キャッシ
ュがヒットした場合の動作とミスした場合の動作とを区
別して消費電力を算出するため、命令キャッシュを備え
たプロセッサに対して最適な消費電力のシミュレーショ
ンを実現できる。
In particular, according to the second aspect of the present invention, since the power consumption is calculated by distinguishing between the operation when the cache hits and the operation when the cache misses, the optimum power consumption for the processor having the instruction cache is calculated. Simulation can be realized.

【0117】また、請求項3記載の発明では、キャッシ
ュの動作が書き込み処理である場合と読み出し処理であ
る場合とを区別し、かつ、書き込み処理と読み出し処理
の各々に対してキャッシュがヒットした場合の動作とミ
スした場合の動作とを区別して消費電力を算出するた
め、ユニファイト形式の命令/データキャッシュを備え
たプロセッサに対して最適な消費電力のシミュレーショ
ンを実現できる。
According to the third aspect of the present invention, it is possible to distinguish between a case where the cache operation is a write operation and a case where the cache operation is a read operation, and that the cache is hit for each of the write operation and the read operation. Since the power consumption is calculated by discriminating between the operation of (1) and the operation in the case of a mistake, an optimal power consumption simulation can be realized for a processor having a unified instruction / data cache.

【0118】また、請求項4記載の発明では、命令キャ
ッシュ用とデータキャッシュ用の消費電力情報を備え、
命令キャッシュではヒットした場合とミスした場合、デ
ータキャッシュでは書き込み処理と読み出し処理とを区
別し、かつ、各々に対してキャッシュがヒットした場合
とミスした場合とを区別して消費電力を算出するため、
ハーバード形式の命令/データキャッシュを備えたプロ
セッサに対して最適な消費電力のシミュレーションを実
現できる。
Further, according to the present invention, power consumption information for instruction cache and data cache is provided.
In order to calculate the power consumption when the instruction cache hits and misses, and in the data cache, the write process and the read process are distinguished, and the cache hit and miss are distinguished for each.
An optimal power consumption simulation can be realized for a processor having a Harvard-type instruction / data cache.

【0119】また、請求項5、請求項6、請求項7、請
求項8、請求項9、及び請求項10記載の発明によれ
ば、シミュレーション実行前に、回路中の個々のバスマ
スター、バススレーブ、及びバス部に対して、回路レベ
ル又はゲートレベルのシミュレーション、又は実際に試
作した実チップの評価結果より、バスサイクルあたりに
消費される電力を求め、各々、バスマスター毎の消費電
力情報、バススレーブ毎の消費電力情報、及びアドレス
領域毎の消費電力情報に格納しておき、シミュレーショ
ン実行中は、前記のバスマスター毎の消費電力情報、バ
ススレーブ毎の消費電力情報、及びアドレス領域毎の消
費電力情報から、各バスサイクルの動作状態に応じた消
費電力を検索し、検索した消費電力より回路全体の消費
電力を求める。ここで、シミュレーションで実行される
バスサイクル数は通常数千、数百万サイクル以上の膨大
なサイクル数になるが、前記の各消費電力情報は計算機
中では表形式や関数形式等で保持することにより簡単に
検索、計算することが可能であり、また、一定時間毎の
消費電力を計算する場合も簡単な積算及び平均計算等に
より、高速に行なうことが可能である。よって、バスに
より、バスマスターやバススレーブが統合された半導体
集積回路の回路動作を模擬すると共に、その消費電力を
高速に見積もるシミュレーション方法を提供することが
できる。
According to the fifth, sixth, seventh, eighth, ninth, and tenth aspects of the present invention, the individual bus masters and buses in the circuit before the simulation is executed. For the slave and the bus unit, the power consumed per bus cycle is obtained from the circuit-level or gate-level simulation or the evaluation result of the actual chip actually produced, and the power consumption information for each bus master, The power consumption information for each bus slave and the power consumption information for each address area are stored in advance. During the simulation, the power consumption information for each bus master, the power consumption information for each bus slave, and the power consumption information for each address area are stored. Power consumption according to the operation state of each bus cycle is searched from the power consumption information, and the power consumption of the entire circuit is obtained from the searched power consumption. Here, the number of bus cycles executed in the simulation is usually a huge number of thousands or millions of cycles or more, but the above-mentioned power consumption information should be stored in a computer in a table format or a function format. Can be easily searched and calculated, and the power consumption for each fixed time can be calculated at high speed by simple integration and average calculation. Therefore, it is possible to provide a simulation method that simulates the circuit operation of a semiconductor integrated circuit in which a bus master and a bus slave are integrated by using a bus, and estimates the power consumption at high speed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施の形態におけるシミュレー
ション実行時の処理の流れを示すフローチャート
FIG. 1 is a flowchart showing a flow of processing when a simulation is executed according to a first embodiment of the present invention.

【図2】本発明の第1、第2、第3、及び第4の実施の
形態におけるシミュレートされるプロセッサの命令セッ
トの一例を示す図
FIG. 2 is a diagram illustrating an example of an instruction set of a simulated processor according to the first, second, third, and fourth embodiments of the present invention;

【図3】本発明の第1の実施の形態におけるシミュレー
ション対象となるプロセッサの命令毎の消費電力情報を
示す図
FIG. 3 is a diagram showing power consumption information for each instruction of a processor to be simulated according to the first embodiment of the present invention;

【図4】本発明の第1、第2、第3、及び第4の実施の
形態におけるシミュレーションの対象となるプロセッサ
で実行するプログラムの一例を示す図
FIG. 4 is a diagram illustrating an example of a program executed by a processor to be simulated according to the first, second, third, and fourth embodiments of the present invention;

【図5】本発明の第1の実施の形態におけるキャッシュ
動作毎の消費電力情報の一例を示す図
FIG. 5 is a diagram illustrating an example of power consumption information for each cache operation according to the first embodiment of the present invention.

【図6】本発明の第1の実施の形態における消費電力計
算の過程及び結果を示す図
FIG. 6 is a diagram showing a process and a result of power consumption calculation according to the first embodiment of the present invention.

【図7】本発明の第2、第3及び第4の実施の形態にお
ける消費電力のシミュレーション方法のシミュレーショ
ン実行時の処理の流れを示すフローチャート
FIG. 7 is a flowchart showing the flow of processing at the time of executing a simulation in the power consumption simulation method according to the second, third, and fourth embodiments of the present invention;

【図8】本発明の第2、第3及び第4の実施の形態にお
けるシミュレーション対象となるプロセッサの命令毎の
消費電力情報を示す図
FIG. 8 is a diagram illustrating power consumption information for each instruction of a processor to be simulated in the second, third, and fourth embodiments of the present invention.

【図9】本発明の第2及び第4の実施の形態におけるキ
ャッシュ動作毎の消費電力情報の一例を示す図
FIG. 9 is a diagram illustrating an example of power consumption information for each cache operation according to the second and fourth embodiments of the present invention.

【図10】本発明の第2の実施の形態における消費電力
計算の過程及び結果を示す図
FIG. 10 is a diagram showing a process and a result of power consumption calculation according to the second embodiment of the present invention.

【図11】本発明の第3の実施の形態におけるキャッシ
ュ動作毎の消費電力情報の一例を示す図
FIG. 11 is a diagram illustrating an example of power consumption information for each cache operation according to the third embodiment of the present invention.

【図12】本発明の第3の実施の形態における消費電力
計算の過程及び結果を示す図
FIG. 12 is a diagram illustrating a process and a result of power consumption calculation according to the third embodiment of the present invention.

【図13】本発明の第4の実施の形態における消費電力
のシミュレーション方法のシミュレーション実行時の処
理の流れを示すフローチャート
FIG. 13 is a flowchart showing the flow of processing when a simulation is performed in the power consumption simulation method according to the fourth embodiment of the present invention.

【図14】本発明の第4の実施の形態における消費電力
計算の過程及び結果を示す図
FIG. 14 is a diagram illustrating a process and a result of power consumption calculation according to the fourth embodiment of the present invention.

【図15】本実施の形態に係るシミュレーション処理を
実行する計算機のハードウエアの構成図の一例を示す図
FIG. 15 is a diagram illustrating an example of a hardware configuration diagram of a computer that executes a simulation process according to the present embodiment;

【図16】本発明の第5の実施の形態におけるバスマス
ターの命令セットの一例を示す図
FIG. 16 is a diagram showing an example of an instruction set of a bus master according to the fifth embodiment of the present invention.

【図17】本発明の第5の実施の形態におけるバスマス
ターに与えるプログラムの一例を示す図
FIG. 17 is a diagram showing an example of a program given to a bus master according to the fifth embodiment of the present invention.

【図18】本発明の第5の実施の形態においてプログラ
ムコードが記憶領域に格納された形態の一例を示す図
FIG. 18 is a diagram illustrating an example of a form in which a program code is stored in a storage area according to the fifth embodiment of the present invention.

【図19】本発明の第5の実施の形態における動作シミ
ュレーション結果の一例を示す図
FIG. 19 is a diagram illustrating an example of an operation simulation result according to the fifth embodiment of the present invention.

【図20】本発明の第5の実施の形態におけるシミュレ
ーション実行時の処理の流れを示すフローチャート
FIG. 20 is a flowchart showing the flow of processing when executing a simulation according to the fifth embodiment of the present invention.

【図21】本発明の第5の実施の形態におけるシミュレ
ーション対象となる回路の一例を示す図
FIG. 21 is a diagram illustrating an example of a circuit to be simulated according to a fifth embodiment of the present invention.

【図22】本発明の第5の実施の形態におけるシミュレ
ーションの対象となる回路のアドレス構成の一例を示す
FIG. 22 is a diagram illustrating an example of an address configuration of a circuit to be simulated according to the fifth embodiment of the present invention.

【図23】本発明の第5の実施の形態におけるアドレス
領域毎の電力情報の一例を示す図
FIG. 23 is a diagram illustrating an example of power information for each address area according to the fifth embodiment of the present invention.

【図24】本発明の第5の実施の形態におけるバスマス
ターでのバスアクセスに伴う消費電力情報の一例を示す
FIG. 24 is a diagram showing an example of power consumption information associated with bus access by a bus master according to the fifth embodiment of the present invention.

【図25】本発明の第5の実施の形態における各周辺機
能ブロックでのバスアクセスに伴う消費電力情報の一例
を示す図
FIG. 25 is a diagram showing an example of power consumption information associated with bus access in each peripheral function block according to the fifth embodiment of the present invention.

【符号の説明】[Explanation of symbols]

101、701、1301 初期化処理 104、704、707、1304、1307 キャッ
シュ部消費電力計算処理 105、705 命令実行処理 106、706、1306 CPU部消費電力計算処理 107、708 消費電力計算処理 301、801 命令毎の消費電力情報 501、901、1101 キャッシュ動作毎の消費電
力情報 2001 初期化処理 2002 プログラム読み込み処理 2003 命令読み込み処理 2004 バス状態読み込み処理 2005、2007 消費電力計算処理 2006 命令実行処理 2301 アドレス領域、転送モード、読み書きに依存
する消費電力情報 2302 アドレス領域、転送モード、読み書きに依存
する消費電力情報 2303 アドレス領域、転送モード、読み書きに依存
する消費電力情報
101, 701, 1301 Initialization processing 104, 704, 707, 1304, 1307 Cache part power consumption calculation processing 105, 705 Instruction execution processing 106, 706, 1306 CPU part power consumption calculation processing 107, 708 Power consumption calculation processing 301, 801 Power consumption information for each instruction 501, 901, 1101 Power consumption information for each cache operation 2001 Initialization processing 2002 Program reading processing 2003 Instruction reading processing 2004 Bus state reading processing 2005, 2007 Power consumption calculation processing 2006 Instruction execution processing 2301 Address area, Power consumption information depending on transfer mode and read / write 2302 Address area, transfer mode, power consumption information depending on read / write 2303 Address area, transfer mode, power consumption information depending on read / write

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B005 JJ00 MM01 VV24 5B046 AA08 BA02 JA04 JA05 5F064 AA04 BB09 BB12 HH09 HH12 HH14  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5B005 JJ00 MM01 VV24 5B046 AA08 BA02 JA04 JA05 5F064 AA04 BB09 BB12 HH09 HH12 HH14

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 キャッシュメモリを備えたプロセッサの
命令動作を計算機中でシミュレートする方法において、 シミュレーション実行前に予め、 前記のプロセッサの命令セットに対して、各々の命令が
実行される時に消費される電力を求め、命令毎の消費電
力情報として記憶すると共に、 前記のキャッシュメモリの複数の動作に対して、各々の
動作に消費される電力を求め、キャッシュ動作毎の消費
電力情報として記憶しておき、 与えられたプログラムコードに対するシミュレーション
実行時に、各々の命令に対して、 命令動作及びキャッシュ動作をシミュレートすると同時
に、 前記の命令毎の消費電力情報より実行中の命令に対応す
るCPUコア部の消費電力を求め、 前記のキャッシュ動作毎の消費電力情報より、バスアク
セスにより発生するキャッシュ動作に対応したキャッシ
ュ部の消費電力を求め、 前記のCPUコア部の消費電力と、前記のキャッシュ部
の消費電力とから、前記のプロセッサが前記のプログラ
ムコード実行時の消費電力を求めることを特徴とするシ
ミュレーション方法。
1. A method for simulating the instruction operation of a processor having a cache memory in a computer, wherein the instruction is consumed when each instruction is executed with respect to an instruction set of the processor before execution of the simulation. Power for each instruction, and store it as power consumption information for each instruction. For a plurality of operations of the cache memory, obtain the power consumed for each operation and store it as power consumption information for each cache operation. At the time of executing a simulation for a given program code, at the same time as simulating an instruction operation and a cache operation for each instruction, the CPU core unit corresponding to the instruction being executed based on the power consumption information for each instruction is described. From the power consumption information for each cache operation described above, The power consumption of the cache unit corresponding to the generated cache operation is determined, and the power consumption of the processor when executing the program code is determined from the power consumption of the CPU core unit and the power consumption of the cache unit. A simulation method, characterized in that:
【請求項2】 前記のキャッシュ動作毎の消費電力情報
が、少なくとも、キャッシュがヒットした場合の動作と
ミスした場合の動作とを区別した消費電力情報であり、 与えられたプログラムコードに対するシミュレーション
実行時に、各々の命令に対して、 発生したバスアクセスに対してキャッシュがヒットした
場合には前記のキャッシュ動作毎の消費電力情報中のヒ
ットした場合の動作に対する消費電力情報によりキャッ
シュ部の消費電力を求め、キャッシュがミスした場合に
はミスした場合の動作の消費電力情報によりキャッシュ
部の消費電力を求めることを特徴とする請求項1に記載
のシミュレーション方法。
2. The power consumption information for each cache operation is at least power consumption information that distinguishes between an operation when a cache hits and an operation when a cache miss occurs. For each instruction, when the cache hits for the generated bus access, the power consumption of the cache unit is obtained from the power consumption information for the hit operation in the power consumption information for each cache operation. 2. The simulation method according to claim 1, wherein when the cache misses, the power consumption of the cache unit is obtained from the power consumption information of the operation when the miss occurs.
【請求項3】 前記のキャッシュ動作毎の消費電力情報
が、少なくとも、キャッシュの動作が書き込み処理であ
る場合と読み出し処理である場合とを区別した消費電力
情報であり、かつ、書き込み処理と読み出し処理の各々
に対して、キャッシュがヒットした場合の動作とミスし
た場合の動作とを区別した消費電力情報であり、 与えられたプログラムコードに対するシミュレーション
実行時に、各々の命令に対して、 発生したバスアクセスが読み出し処理であるか書き込み
処理であるかと、キャッシュがヒットしたかミスしたか
とを判断し、前記のキャッシュ動作毎の消費電力情報の
該当する消費電力情報よりキャッシュ部の消費電力を求
めることを特徴とする請求項1に記載のシミュレーショ
ン方法。
3. The power consumption information for each cache operation is at least power consumption information that distinguishes between a case where a cache operation is a write operation and a case where a cache operation is a read operation, and a write operation and a read operation. Is the power consumption information that distinguishes between the operation when the cache hits and the operation when the cache misses, and the bus access generated for each instruction when the simulation is executed for the given program code. Is a read process or a write process, and determines whether the cache hits or misses, and calculates the power consumption of the cache unit from the corresponding power consumption information of the power consumption information for each cache operation. The simulation method according to claim 1, wherein
【請求項4】 前記のキャッシュ動作毎の消費電力情報
として、命令キャッシュ用とデータキャッシュ用とを備
え、 命令キャッシュ用のキャッシュ動作毎の消費電力情報
は、少なくとも、キャッシュがヒットした場合の動作と
ミスした場合の動作とを区別した消費電力情報であり、 データキャッシュ用のキャッシュ動作毎の消費電力情報
は、少なくとも、キャッシュの動作が書き込み処理であ
る場合と読み出し処理である場合とを区別した消費電力
情報であり、かつ、書き込み処理と読み出し処理の各々
に対して、キャッシュがヒットした場合の動作とミスし
た場合の動作とを区別した消費電力情報であり、 与えられたプログラムコードに対するシミュレーション
実行時に、各々の命令に対して、 発生したバスアクセスが、命令キャッシュに対する場合
には、前記の命令キャッシュ用のキャッシュ動作毎の消
費電力情報より、キャッシュがヒットしたかを判断し命
令キャッシュ部の消費電力を求め、 発生したバスアクセスが、データキャッシュに対する場
合には、発生したバスアクセスが読み出し処理であるか
書き込み処理であるかと、キャッシュがヒットしたかミ
スしたかとを判断し、前記のデータキャッシュ用のキャ
ッシュ動作毎の消費電力情報の該当する消費電力情報よ
りデータキャッシュ部の消費電力を求め、 前記の命令キャッシュ部の消費電力と前記のデータキャ
ッシュ部の消費電力とからキャッシュ部全体の消費電力
を求めることを特徴とする請求項1に記載のシミュレー
ション方法。
4. The power consumption information for each cache operation includes information for an instruction cache and data for a data cache. The power consumption information for each cache operation for an instruction cache includes at least an operation when a cache hit occurs. This is power consumption information that distinguishes the operation in the case of a miss, and the power consumption information for each cache operation for the data cache is at least consumption power that distinguishes between the case where the cache operation is a write operation and the case where the cache operation is a read operation. This is power information and power consumption information that distinguishes between an operation when a cache hits and an operation when a cache miss occurs for each of a write process and a read process. For each instruction, the generated bus access is In this case, it is determined whether or not a cache hit has occurred based on the power consumption information for each cache operation for the instruction cache, and the power consumption of the instruction cache unit is obtained. It is determined whether the generated bus access is a read process or a write process, and whether the cache has hit or missed. Based on the power consumption information for each cache operation for the data cache, the data cache 2. The simulation method according to claim 1, wherein the power consumption of the entire cache unit is obtained from the power consumption of the instruction cache unit and the power consumption of the data cache unit.
【請求項5】 1個以上のバスマスター及びバススレー
ブがバスで接続された回路のアーキテクチャレベルの動
作を計算機中でシミュレートする方法において、 シミュレーション実行前に予め、 前記のバスマスターが動作する時に消費する電力をバス
マスター毎の消費電力情報に、 前記のバススレーブが動作する時に消費する電力をバス
スレーブ毎の消費電力情報に、 前記のバスのアドレス空間に対して、個々のアドレス領
域毎に、そのアドレス領域へのバスアクセス時にバス部
で消費される電力をアドレス領域毎の消費電力情報とし
て記憶しておき、 前記の回路に対するシミュレーション実行時に、各バス
アクセスに対して、バスの動作をシミュレートすると同
時に、 前記のバスマスター毎の消費電力情報より、バスマスタ
ーの消費電力を求め、 前記のバススレーブ毎の消費電力情報より、バススレー
ブの消費電力を求め、 前記のアドレス領域毎の消費電力情報より、発生したバ
スアクセスのアドレス値に対応するバス部の消費電力を
求め、 前記のバスマスターの消費電力と、前記のバススレーブ
の消費電力と、及び前記のバス部の消費電力とから、前
記の回路の動作時の消費電力を求めることを特徴とする
シミュレーション方法。
5. A method for simulating, in a computer, an architecture-level operation of a circuit in which one or more bus masters and bus slaves are connected by a bus, the method comprising: The consumed power is used as power consumption information for each bus master, the power consumed when the bus slave operates is used as power consumption information for each bus slave, and the address space of the bus is used for each address area. The power consumed by the bus unit at the time of bus access to the address area is stored as power consumption information for each address area, and the bus operation is simulated for each bus access at the time of executing the simulation for the circuit. At the same time as the power consumption information of each bus master. From the power consumption information for each bus slave, the power consumption of the bus slave is obtained.From the power consumption information for each address area, the power consumption of the bus unit corresponding to the address value of the generated bus access is obtained. A simulation method comprising: obtaining power consumption during operation of the circuit from power consumption of the bus master, power consumption of the bus slave, and power consumption of the bus unit.
【請求項6】 前記のアドレス領域毎の消費電力情報
が、少なくとも、バスアクセスのビット幅を区別した消
費電力情報であり、 前記の回路に対するシミュレーション実行時に、各バス
アクセスに対して、 バスアクセスが発生する場合には、前記のアドレス領域
毎の消費電力情報より、発生したバスアクセスのアドレ
ス値とそのビット幅に対応したバス部の消費電力を求め
ることを特徴とする請求項5に記載のシミュレーション
方法。
6. The power consumption information for each address area is at least power consumption information in which a bit width of a bus access is distinguished. 6. The simulation according to claim 5, wherein when the power consumption occurs, the power consumption of the bus unit corresponding to the generated address value of the bus access and the bit width thereof is obtained from the power consumption information for each address area. Method.
【請求項7】 前記のアドレス領域毎の消費電力情報
が、少なくとも、バスアクセスが読み出し処理である場
合と書き込み処理である場合とを区別した消費電力情報
であり、 前記の回路に対するシミュレーション実行時に、各バス
アクセスに対して、 バスアクセスが発生する場合には、前記のアドレス領域
毎の消費電力情報より、発生したバスアクセスのアドレ
ス値と読み出し処理又は書き込み処理に対応したバス部
の消費電力を求めることを特徴とする請求項5に記載の
シミュレーション方法。
7. The power consumption information for each address area is at least power consumption information that distinguishes between a case where a bus access is a read process and a case where a bus access is a write process. When a bus access occurs for each bus access, the address value of the generated bus access and the power consumption of the bus unit corresponding to the read processing or the write processing are obtained from the power consumption information for each address area. 6. The simulation method according to claim 5, wherein:
【請求項8】 前記のアドレス領域毎の消費電力情報
が、少なくとも、バスの転送モード及び転送ワード数に
基づいた消費電力情報であり、 前記の回路に対するシミュレーション実行時に、各バス
アクセスに対して、 バスアクセスが発生する場合には、前記のアドレス領域
毎の消費電力情報より、発生したバスアクセスのアドレ
ス値、転送モード、及び転送ワード数に対応したバス部
の消費電力を求めることを特徴とする請求項5に記載の
シミュレーション方法。
8. The power consumption information for each address area is at least power consumption information based on a bus transfer mode and a transfer word number. When a bus access occurs, the power consumption of the bus section corresponding to the address value of the generated bus access, the transfer mode, and the number of transfer words is obtained from the power consumption information for each address area. The simulation method according to claim 5.
【請求項9】 CPUコアとキャッシュメモリとから成
るプロセッサと、バススレーブとが、バスで接続された
回路のアーキテクチャレベルの動作を計算機中でシミュ
レートする方法において、 与えられたプログラムコードに対して、CPUコア部の
消費電力を、請求項1に記載の方法により求め、 キャッシュ部の消費電力を、請求項2、請求項3、又は
請求項4に記載の方法のいずれかの方法により求め、 バス部の消費電力及びバススレーブ部の消費電力を、請
求項5、請求項6、請求項7、及び請求項8に記載の方
法の少なくとも1個以上の方法により求め、 前記のCPUコア部の消費電力と、前記のキャッシュ部
の消費電力と、前記のバススレーブ部の電力と、及び前
記のバス部の消費電力とから、前記の回路アーキテクチ
ャに対して前記のプログラムコード実行時の消費電力を
求めることを特徴とするシミュレーション方法。
9. A method in which a processor comprising a CPU core and a cache memory and a bus slave simulates, in a computer, an architecture-level operation of a circuit connected by a bus, wherein: The power consumption of the CPU core is obtained by the method according to claim 1, and the power consumption of the cache is obtained by the method according to any one of claims 2, 3, or 4. The power consumption of the bus unit and the power consumption of the bus slave unit are obtained by at least one of the methods described in claim 5, claim 6, claim 7, and claim 8. From the power consumption, the power consumption of the cache unit, the power of the bus slave unit, and the power consumption of the bus unit, Simulation method and obtains the power consumption during the program code execution.
【請求項10】請求項1、請求項2、請求項3、請求項
4、請求項5、請求項6、請求項7、請求項8、又は請
求項9に記載のシミュレーション方法において、 シミュレーション実行中には、消費電力計算に必要な情
報を記憶装置に保存しておき、 シミュレーション実行後に、前記の記憶装置に保存して
おいた消費電力計算に必要な情報を元に、当該シミュレ
ーションで求めた回路動作時の回路の消費電力を求める
ことを特徴とするシミュレーション方法。
10. The simulation method according to claim 1, 2, 3, 4, 5, 5, 6, 7, 8, or 9, wherein a simulation is performed. During the simulation, information necessary for the power consumption calculation is stored in the storage device, and after the simulation is performed, the information is obtained by the simulation based on the information necessary for the power consumption calculation stored in the storage device. A simulation method characterized by determining the power consumption of a circuit during circuit operation.
【請求項11】請求項1、請求項2、請求項3、請求項
4、請求項5、請求項6、請求項7、請求項8、請求項
9、又は請求項10に記載のシミュレーション方法を記
録した記録媒体。
11. The simulation method according to claim 1, claim 2, claim 3, claim 4, claim 5, claim 6, claim 7, claim 8, claim 9, or claim 10. Recording medium on which is recorded.
JP11097318A 1999-04-05 1999-04-05 Simulation method for power consumption Pending JP2000293557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11097318A JP2000293557A (en) 1999-04-05 1999-04-05 Simulation method for power consumption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11097318A JP2000293557A (en) 1999-04-05 1999-04-05 Simulation method for power consumption

Publications (1)

Publication Number Publication Date
JP2000293557A true JP2000293557A (en) 2000-10-20

Family

ID=14189147

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11097318A Pending JP2000293557A (en) 1999-04-05 1999-04-05 Simulation method for power consumption

Country Status (1)

Country Link
JP (1) JP2000293557A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007021392A2 (en) * 2005-08-17 2007-02-22 Sun Microsystems, Inc. Inferential power monitor without voltage/current transducers
JP2009157909A (en) * 2007-12-05 2009-07-16 Fujitsu Ltd Power consumption estimation program, computer readable recording medium with the program recorded thereon, power consumption estimation device, and power consumption estimation method
JP2010231633A (en) * 2009-03-27 2010-10-14 Fujitsu Ltd Program, apparatus and method for supporting verification
KR101243513B1 (en) 2011-02-23 2013-03-20 성균관대학교산학협력단 Method for simulating processor power and system for simulating processor power
JP2014021572A (en) * 2012-07-13 2014-02-03 Meidensha Corp Simulator for digital circuit and program thereof
US9495272B2 (en) 2009-06-11 2016-11-15 Oracle America, Inc. Method and system for generating a power consumption model of at least one server
US10663991B2 (en) 2015-11-12 2020-05-26 Oracle International Corporation Determining parameters of air-cooling mechanisms

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007021392A2 (en) * 2005-08-17 2007-02-22 Sun Microsystems, Inc. Inferential power monitor without voltage/current transducers
WO2007021392A3 (en) * 2005-08-17 2007-11-29 Sun Microsystems Inc Inferential power monitor without voltage/current transducers
US7869965B2 (en) 2005-08-17 2011-01-11 Oracle America, Inc. Inferential power monitor without voltage/current transducers
JP2009157909A (en) * 2007-12-05 2009-07-16 Fujitsu Ltd Power consumption estimation program, computer readable recording medium with the program recorded thereon, power consumption estimation device, and power consumption estimation method
JP2010231633A (en) * 2009-03-27 2010-10-14 Fujitsu Ltd Program, apparatus and method for supporting verification
US9495272B2 (en) 2009-06-11 2016-11-15 Oracle America, Inc. Method and system for generating a power consumption model of at least one server
KR101243513B1 (en) 2011-02-23 2013-03-20 성균관대학교산학협력단 Method for simulating processor power and system for simulating processor power
JP2014021572A (en) * 2012-07-13 2014-02-03 Meidensha Corp Simulator for digital circuit and program thereof
US10663991B2 (en) 2015-11-12 2020-05-26 Oracle International Corporation Determining parameters of air-cooling mechanisms

Similar Documents

Publication Publication Date Title
US7558719B1 (en) System and method for runtime analysis of system models for variable fidelity performance analysis
CN1885295B (en) Building integrated circuits using logical units
US7472361B2 (en) System and method for generating a plurality of models at different levels of abstraction from a single master model
US5941991A (en) Method of estimating power consumption of each instruction processed by a microprocessor
US8073669B2 (en) Method and apparatus for detecting clock gating opportunities in a pipelined electronic circuit design
US20080208555A1 (en) Simulation method and simulation apparatus
JP6448195B2 (en) Method for randomly accessing signal values of FPGA at runtime, data processing apparatus, computer program, digital storage medium, and method of implementing FPGA build
JP5014920B2 (en) Circuit design method and integrated circuit manufactured by the method
JPS5975347A (en) Simulation device of logical circuit
JP5034916B2 (en) Performance evaluation model generation method, system performance evaluation method, and performance evaluation model generation apparatus
JP2000293557A (en) Simulation method for power consumption
JP5040625B2 (en) LSI power estimation method and apparatus
JP7036814B2 (en) Debugging system and method
US8340952B2 (en) Power estimation method and device therefor
JPH11161692A (en) Simulation method for power consumption
US7308548B2 (en) Processor organizing apparatus and method for organize a pipeline processor
JP2002334128A (en) Method for simulating power consumption of semiconductor integrated circuit
JPH1173329A (en) Software development support system
JP3214459B2 (en) Simulation method and apparatus
Neffe et al. Energy estimation based on hierarchical bus models for power-aware smart cards
KR100326843B1 (en) A method for generating Register Transfer Level Instruction Simulator for a Chip
JP2000242529A (en) Device and system for assisting program development and recording medium
Ravishankar An observable data cache model for fpga prototyping
Bejo et al. GAMA32 processor modeling using SystemC
JP2001256079A (en) Debug method for software and debug method for logic circuit