JP2002007142A - Method and system for generating simulator - Google Patents

Method and system for generating simulator

Info

Publication number
JP2002007142A
JP2002007142A JP2001131569A JP2001131569A JP2002007142A JP 2002007142 A JP2002007142 A JP 2002007142A JP 2001131569 A JP2001131569 A JP 2001131569A JP 2001131569 A JP2001131569 A JP 2001131569A JP 2002007142 A JP2002007142 A JP 2002007142A
Authority
JP
Japan
Prior art keywords
simulation
code
instruction
simulator
supplemental
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
JP2001131569A
Other languages
Japanese (ja)
Inventor
Tor E Jeremiassen
イー ジェレミアッセン トール
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.)
Nokia of America Corp
Original Assignee
Lucent Technologies Inc
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 Lucent Technologies Inc filed Critical Lucent Technologies Inc
Publication of JP2002007142A publication Critical patent/JP2002007142A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method and device for generating simulators for wide range architectures and for generating an instruction level simulator for easily constituting those simulators so that detail statistics, profiling, and/or timing information can be provided. SOLUTION: In this method and device for generating an instruction level architecture simulator from the machine description of an instruction level architecture to be simulated, a user adds a complementary simulation code to a simulation mechanism for correcting, increasing, or controlling the execution of the simulation mechanism so that a further complicate target can be better simulated. In a machine description format, an instruction dispatch code section 'before' and 'after' copied to the corresponding section of a code for executing a core simulation mechanism is provided so that a method for operating the simulator can be reinforced or corrected.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、インストラクショ
ンシミュレータに係り、特に、インストラクションレベ
ルシミュレータを生成するためのツールに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to an instruction simulator, and more particularly, to a tool for generating an instruction level simulator.

【0002】[0002]

【従来の技術】埋込システムのためのソフトウェア開発
は、大幅にシミュレータの使用に依存している。汎用コ
ンピュータと異なり、埋込ハードウェアは、その性質に
より、ソフトウェア開発サイクルのためのサポートをほ
とんど提供しない。しばしば、ソフトウェア開発は、実
際のソフトウェアが利用可能になるかなり前から開始し
なければならない。したがって、シミュレータは、埋込
アプリケーションの検査、デバック、プロファイリング
および最適化のための便利なプラットフォームを提供す
る必要がある。適切に構成される場合、シミュレータ
は、いかなるハードウェアプラットフォームよりも、よ
り詳細な統計およびプロファイル情報を提供することが
できる。
BACKGROUND OF THE INVENTION Software development for embedded systems relies heavily on the use of simulators. Unlike general purpose computers, embedded hardware, by its nature, provides little support for the software development cycle. Often, software development must start well before the actual software becomes available. Therefore, simulators need to provide a convenient platform for inspection, debugging, profiling and optimization of embedded applications. When properly configured, the simulator can provide more detailed statistics and profile information than any hardware platform.

【0003】欠点は、シミュレータが、それらがシミュ
レートするハードウェアよりも遙かに遅いことである。
シミュレーションをより詳細にすると、シミュレータの
実行がより長く係る。論理的および機能的レベルシミュ
レータは、1秒あたり数十ないし数百サイクル程度のシ
ミュレーション速度しか有しない。インストラクション
レベルシミュレータは、より高速である。速度の範囲
は、1秒あたり数千から数百万のシミュレーションサイ
クルである。
A disadvantage is that simulators are much slower than the hardware they simulate.
The more detailed the simulation, the longer the simulator runs. Logical and functional level simulators only have simulation speeds on the order of tens or hundreds of cycles per second. Instruction level simulators are faster. The speed ranges from thousands to millions of simulation cycles per second.

【0004】所定の埋込アーキテクチャに対するインス
トラクションレベルシミュレータは、ベンダおよび/ま
たは1つまたは2つ以上の第三者のサプライヤから通常
入手可能である。それらは、しばしばコンプリートツー
ルチェーンの一部であるが、それらの有用性は、しばし
ばいくつかの方法に限定される。第1に、商用のシミュ
レータは、しばしば、限定されたシミュレーション能力
のみを提供する。デバッガー(debugger)インターフェ
ースがしばしば利用可能であるが、シミュレータは、典
型的には、全経過サイクルのみをレポートする。
[0004] Instruction level simulators for a given embedded architecture are commonly available from vendors and / or one or more third party suppliers. They are often part of a complete tool chain, but their usefulness is often limited to several methods. First, commercial simulators often offer only limited simulation capabilities. Simulators typically report only the entire elapsed cycle, although a debugger interface is often available.

【0005】他の統計またはプロファイリング情報は提
供されない。第2に、これらのシミュレータは、バイナ
リ形式で配布される。したがって、これらのシミュレー
タを新しい統計またはプロファイル新事象を収集するた
めに拡張またはカスタマイズすることは不可能である。
第3に、シミュレータは、典型的に、顧客の演算環境に
うまくマッチしたりまたはマッチしない少数のホストプ
ラットフォームに対してのみ利用可能である。第4に、
シミュレーション速度は、しばしば、大量のアプリケー
ション、大量のデータセットまたは頻繁な検査にとって
好都合なように十分に速くない。
No other statistical or profiling information is provided. Second, these simulators are distributed in binary form. Therefore, it is not possible to extend or customize these simulators to collect new statistics or profile new events.
Third, simulators are typically only available for a small number of host platforms that do or do not match well with the customer's computing environment. Fourth,
The simulation speed is often not fast enough to favor large applications, large data sets or frequent inspections.

【0006】例えば、European Telecommunications St
andards Institute, Digital Cellular Telecommunicat
ions System (Phase 2+); Adaptive Multi-Rate Speech
Transcoding (GSM 06.90) (Dec. 1999) に示されたG
SM−AMR(Global Systemfor Mobile Communicatio
ns-Adaptive Multi-Rate)スピーチトランスコーダーの
ためのグローバルシステムの具現化、セルラ電話におい
て、重要なアプリケーションを、標準テストベクトルの
セットに対して有効化することは、いくつかのデジタル
シグナルプロセッサ(DSP)に対して、2億個のオー
ダーのシミュレートされたインストラクションを必要と
する。1CPUウイーク(one CPU week)において
有効化を完了するために、シミュレータは、1秒あたり
約450,000個のインストラクションをシミュレー
トすることができなければならない。1CPU日(one
CPU day )における有効化を完了するために、1秒
あたりほぼ250万個のインストラクションを必要とす
る。
For example, European Telecommunications St
andards Institute, Digital Cellular Telecommunicat
ions System (Phase 2+); Adaptive Multi-Rate Speech
G shown in Transcoding (GSM 06.90) (Dec. 1999)
SM-AMR (Global System for Mobile Communicatio
(ns-Adaptive Multi-Rate) Implementation of a global system for speech transcoders, enabling important applications in a cellular telephone to a set of standard test vectors requires several digital signal processors (DSPs). ) Requires 200 million simulated instructions. In order to complete the activation in one CPU week, the simulator must be able to simulate about 450,000 instructions per second. 1 CPU day (one
Approximately 2.5 million instructions per second are required to complete the activation at CPU day).

【0007】1つの解決法は、最初から高速インストラ
クションレベルシミュレータを書くことである。しか
し、手作業でインストラクションレベルシミュレータを
書くことは、労働集約的、長時間係りかつ誤りを生じや
すい。また、T.M. Conte & C.E. Gimarc, editors, "Fa
st Simulation of Computer Architectures," Ch. 2, K
luwer Academic Publishers (1995) に示されたような
非常に高速のシミュレータを生成するために使用される
ダイナミッククロス編集(cross-compilation)のよう
ないくつかのより改良されたシミュレーション技法は、
複雑、ポータブルでなく、修正することが困難なシミュ
レータを作る。
[0007] One solution is to write a fast instruction level simulator from scratch. However, writing an instruction-level simulator manually is labor intensive, time consuming, and error prone. Also, TM Conte & CE Gimarc, editors, "Fa
st Simulation of Computer Architectures, "Ch. 2, K
Several more improved simulation techniques, such as dynamic cross-compilation, used to generate very fast simulators, as shown in luwer Academic Publishers (1995),
Make simulators that are complex, portable and difficult to modify.

【0008】インストラクションレベルアーキテクチャ
シミュレータを生成するための最新の利用可能なツール
は、より複雑なターゲットインストラクションを正確に
シミュレートするための好都合なメカニズムを提供しな
い。また、現在利用可能なインストラクションレベルシ
ミュレータジェネレータツールは、パラレルインストラ
クションをシミュレートするシミュレータを生成するた
めの適切なサポートを提供しない。典型的に、インスト
ラクションレベルシミュレータは、シミュレートされる
べき次のインストラクションのシミュレーティッドメモ
リスペース中のアドレスを含むシミュレーティッドプロ
グラムカウンタを使用する。
[0008] Modern available tools for generating instruction-level architecture simulators do not provide a convenient mechanism for accurately simulating more complex target instructions. Also, currently available instruction level simulator generator tools do not provide adequate support for generating simulators that simulate parallel instructions. Typically, the instruction level simulator uses a simulated program counter that includes the address in the simulated memory space of the next instruction to be simulated.

【0009】必要な場合、インストラクションは最初に
復号化され、そしてインストラクションの副作用(side
-effects)がシミュレートされる。プログラムカウンタ
は、典型的に、プログラムカウンター値が次の逐次的イ
ンストラクションのシミュレーティッドアドレスまたは
現在実行中のブランチインストラクションにより演算さ
れるシミュレーティッドアドレスで更新されるべきであ
るということを仮定することにより、更新される。しか
し、この仮定は、通常の方法で、多様なコンピュータア
ーキテクチャをインストラクションレベルで正しくシミ
ュレートするには十分でない可能性がある。
[0009] If necessary, the instructions are first decrypted and the side effects of the instructions (side
-effects) are simulated. The program counter typically assumes that the program counter value should be updated with the simulated address of the next sequential instruction or the simulated address computed by the currently executing branch instruction. Be updated. However, this assumption may not be sufficient to correctly simulate various computer architectures at the instruction level in the usual way.

【0010】例えば、MIPS Technologies, Inc. of Mou
ntain View, CA, から商業的に入手可能なMIPSアー
キテクチャ、および Texas Instruments Incorporated
of Dallas, TX, から商業的に入手可能なTI C62x
xアーキテクチャは、両方ともディレイド(delayed)
ブランチを具現化し、そこでは、ブランチのサイドエフ
ェクト、即ち、制御フローの変化が、ブランチの実行の
後の多数のサイクルまで有効とならない。明らかに、ブ
ランチのサイドエフェクトが即座に有効になるように、
次の逐次的インストラクションのターゲットアドレスの
リターンは正しくない。
For example, MIPS Technologies, Inc. of Mou
MIPS architecture commercially available from ntain View, CA, and Texas Instruments Incorporated
TI C62x, commercially available from of Dallas, TX,
x architectures are both delayed
Implements a branch, where the side effects of the branch, ie, changes in control flow, are not effective until a number of cycles after execution of the branch. Obviously, so that the branch side effects take effect immediately,
The return of the target address for the next sequential instruction is incorrect.

【0011】例えば、J.E. Veenstra and R.J. Fowler,
"MINT: A Front End For Efficient Simulation of Sh
ared-Memory Multiprocessors," Proc. of the 2d Int'
l Workshop on Modeling, Analysis, and Simulation o
f Computer and Telecommunication Systems (MASCOT
S), 201-207 (Jan. 1994) に示されたミント(Mint)シ
ミュレータは、インストラクション毎に2つのバージョ
ンを提供することによりディレイドブランチをシミュレ
ートするこの問題を解決する。第1のバージョンは、一
般的実行に適用可能であり、第2のバーションは、イン
ストラクションがブランチディレイスロットにおいて実
行されるときに適用可能である。
For example, JE Veenstra and RJ Fowler,
"MINT: A Front End For Efficient Simulation of Sh
ared-Memory Multiprocessors, "Proc. of the 2d Int '
l Workshop on Modeling, Analysis, and Simulation o
f Computer and Telecommunication Systems (MASCOT
The Mint simulator shown in S), 201-207 (Jan. 1994) solves this problem of simulating a delayed branch by providing two versions for each instruction. The first version is applicable for general execution, and the second version is applicable when instructions are executed in branch delay slots.

【0012】[0012]

【発明が解決しようとする課題】広範囲のアーキテクチ
ャに対するシミュレータを提供し、かつこれらのシミュ
レータを詳細な統計、プロファイリング、および/また
はタイミング情報を提供するように構成することを容易
にするインストラクションレベルシミュレータを生成す
るための方法および装置に対する必要性が存在する。多
様なホストプロットフォームに対してポータブルなシミ
ュレータを生成するインストラクションレベルシミュレ
ータ生成ツールに対する必要性も存在する。ポータビリ
ティおよびシミュレータを書くことの容易性を妥協する
ことなしに、可能な限り高速なシミュレータを作るイン
ストラクションレベルシミュレータ生成ツールに対する
更なる別の必要性が存在する。また、ディレイブランチ
において実行されるインストラクションを含む所定のイ
ンストラクションのシミュレーションおよびパラレルイ
ンストラクションのシミュレーションのタイミングの制
御を可能にするインストラクションレベルシミュレータ
生成ツールに対する別の必要性も存在する。
SUMMARY OF THE INVENTION An instruction level simulator that provides simulators for a wide variety of architectures and facilitates configuring these simulators to provide detailed statistics, profiling, and / or timing information. There is a need for a method and apparatus for producing. There is also a need for an instruction level simulator generation tool that generates a portable simulator for a variety of host plot forms. Yet another need exists for an instruction-level simulator generation tool that makes simulators as fast as possible without compromising portability and ease of writing simulators. There is also another need for an instruction level simulator generation tool that allows simulation of certain instructions, including instructions executed in delay branches, and control of the timing of simulation of parallel instructions.

【0013】[0013]

【課題を解決するための手段】シミュレートされるべき
インストラクションレベルアーキテクチャのマシンディ
スクリプションからインストラクションレベルアーキテ
クチャシミュレータを生成するための方法および装置が
開示される。開示されるシミュレータ生成ツールは、基
本シミュレータの生成を促進し、サイクルアキュレート
(cycle-accurate)シミュレーションを実行するために
シミュレータを制御しかつ拡張するために十分な柔軟性
をプログラムに提供する。開示されるシミュレータ生成
ツールは、時間の概念を維持し、かつシミュレーション
ステップのシーケンシングにおける同時性(concurrenc
y)を維持することができるインストラクションレベル
アーキテクチャシミュレータを生成する。
SUMMARY OF THE INVENTION A method and apparatus for generating an instruction level architecture simulator from an instruction level architecture machine description to be simulated is disclosed. The disclosed simulator generation tool facilitates the generation of a basic simulator and provides a program with sufficient flexibility to control and extend the simulator to perform cycle-accurate simulations. The disclosed simulator generation tool preserves the concept of time and concurrenc in the sequencing of simulation steps.
Generate an instruction-level architecture simulator that can maintain y).

【0014】本発明の一側面によれば、ユーザは、より
複雑なターゲットをよりよくシミュレートするために、
シミュレーションメカニズムの実行を修正し、増大させ
または制御するために、補足的シミュレーション行動を
シミュレーションメカニズムに追加することができる。
マシンディスクリプションフォーマットは、シミュレー
タが働くやり方を強化しまたは修正するために、コアシ
ミュレーションメカニズムを具現化する高度の対応する
セクションにコピーされた「前」および「後」のインス
トラクションディスパッチコードセクションを提供す
る。
In accordance with one aspect of the present invention, a user may be required to better simulate more complex targets.
Supplemental simulation behavior can be added to the simulation mechanism to modify, augment or control the execution of the simulation mechanism.
The machine description format provides "before" and "after" instruction dispatch code sections that are copied into corresponding sections of the advanced that embody the core simulation mechanism to enhance or modify the way the simulator works .

【0015】各ターゲットインストラクションのセマン
ティック(semantic)は、セマンティックファンクショ
ンと呼ばれるCファンクションのようなファンクション
により具現化される。復号化されたターゲットインスト
ラクションの各々は、ターゲットインストラクションを
表し、かつシミュレータ生成ツールにより使用される情
報を含むターゲットインストラクション記述子(TI
D)と呼ばれる関連づけられたデータ構造を有する。復
号化において、ターゲットインストラクションのセマン
ティックは、正しいセマンティックファンクションのア
ドレスをそのTID中のファンクションポインタに割り
当てることにより、そのTIDに結びつけられる。
The semantic of each target instruction is embodied by a function such as a C function called a semantic function. Each of the decoded target instructions represents a target instruction and includes a target instruction descriptor (TI) that contains information used by the simulator generation tool.
D) has an associated data structure called D). In decoding, the semantics of the target instruction are tied to the TID by assigning the address of the correct semantic function to the function pointer in the TID.

【0016】シミュレーションの間に、シミュレートさ
れたプログラムカウンタによりターゲットインストラク
ションが指し示すTIDのアドレスが最初に演算され
る。その後、マシンディスクリプションの「前」のセク
ションからコピーされた補足的シミュレーションコード
が、本発明に従って実行され得る。そして、インストラ
クションディスパッチ自体が、TIDにおいて特定され
たセマンティックファンクションに対する間接的ファン
クションコールを使用して、実行される。リターン値
が、シミュレートされたプログラムカウンタ(PC)に
コピーされる。最後に、マシンディスクリプションの
「後」のセクションからコピーされた追加的な補足的シ
ミュレーションコードが、本発明に従って実行され得
る。
During the simulation, the simulated program counter first computes the address of the TID pointed to by the target instruction. Thereafter, supplemental simulation code copied from the "before" section of the machine description may be executed in accordance with the present invention. Then, the instruction dispatch itself is executed using an indirect function call to the semantic function specified in the TID. The return value is copied to a simulated program counter (PC). Finally, additional supplemental simulation code copied from the "after" section of the machine description may be executed in accordance with the present invention.

【0017】そして、本発明は、ターゲットインストラ
クションディスパッチの前および/または後に、任意的
コードが導入されることを可能にする。このようにし
て、シミュレータ生成ツールが、より複雑なターゲット
アーキテクチャをよりよくシミュレートするために、シ
ミュレーションメカニズムを修正し、増大させまたは制
御することができる。
The present invention then allows optional code to be introduced before and / or after the target instruction dispatch. In this way, the simulator generation tool can modify, augment, or control the simulation mechanism to better simulate a more complex target architecture.

【0018】シミュレーションメカニズムに含まれる補
足的シミュレーションコードは、例えば、制御のフロー
のためのシミュレーションにおける正しいポイントが変
化されるまで、ブランチのターゲットアドレスをバッフ
ァするために、ディレイラインをシミュレートするため
に使用され得る。また、シミュレーションメカニズムに
含まれた補足的シミュレーションコードは、並列処理を
可能にするアーキテクチャのためのシミュレートされる
サイクルの終わりにおいて、結果のリジェスタファイル
へのシミュレートされたライトバック(weite-back)を
制御するために使用され得る。「前」および「後」のセ
クションは、シミュレートされるプログラムについての
シミュレーション統計およびプロファイリング情報を集
めるために、コードを挿入するために使用され得る。
The supplemental simulation code included in the simulation mechanism is used to simulate the delay line, for example, to buffer the target address of the branch until the correct point in the simulation for the flow of control has been changed. Can be used. Also, supplemental simulation code included in the simulation mechanism provides a simulated write-back to the resulting regestor file at the end of the simulated cycle for an architecture that allows for parallel processing. ) Can be used to control The "before" and "after" sections can be used to insert code to gather simulation statistics and profiling information for the program being simulated.

【0019】[0019]

【発明の実施の形態】図1は、本発明によるインストラ
クションレベルシミュレータ生成ツール100の一例を
示す概略ブロック図である。本発明は、シミュレートさ
れるべきインストラクションレベルアーキテクチャの図
4との関連で以下に詳細に説明するディスクリプション
400を読み出し、かつインストラクションレベルアー
キテクチャシミュレータ180を生成するシミュレータ
生成ツール100を提供する。後述するように、本発明
は、基本シミュレータの生成を容易にし、かつサイクル
アキュレートシミュレーションを実行するためにシミュ
レータを制御しかつ拡張するために十分な柔軟性をプロ
グラマーに提供する。
FIG. 1 is a schematic block diagram showing an example of an instruction level simulator generation tool 100 according to the present invention. The present invention provides a simulator generation tool 100 that reads a description 400, described in detail below in connection with FIG. 4, of an instruction level architecture to be simulated, and generates an instruction level architecture simulator 180. As described below, the present invention facilitates the creation of a basic simulator and provides a programmer with enough flexibility to control and extend the simulator to perform cycle accurate simulations.

【0020】生成されるインストラクションレベルアー
キテクチャシミュレータ180は、シミュレートされる
インストラクションをシーケンシングを含むターゲット
アーキテクチャのシミュレーションを制御するシミュレ
ーションメカニズム185を含む。本発明は、ユーザ
が、時間の概念およびシミュレーションステップのシー
ケンシングにおける同時性を維持するインストラクショ
ンレベルアーキテクチャシミュレータ180を生成する
ことを可能にする。
The generated instruction level architecture simulator 180 includes a simulation mechanism 185 that controls the simulation of the target architecture, including sequencing the simulated instructions. The present invention allows a user to create an instruction-level architecture simulator 180 that maintains concurrency in the notion of time and sequencing of simulation steps.

【0021】本発明の特徴によれば、シミュレータ生成
ツール100は、ユーザが、より複雑なターゲットをよ
りよくシミュレートするために、シミュレーションメカ
ニズム180の実行を、修正し、増大させまたは制御す
るために、補足的シミュレーションコードを追加するこ
とを可能にする。図3および4との関連で以下にさらに
説明するように、シミュレータ生成ツール100により
使用される図4に示されたマシンディスクリプションフ
ォーマット400は、「前」および「後」のインストラ
クションディスパッチコードセクション470,480
を提供する。「前」および「後」のインストラクション
ディスパッチコードセクション470,480に書き込
まれたCコードは、シミュレータ180が働くやり方を
強化または修正するために、コアシミュレーションメカ
ニズムを具現化するCコード300(図3)の対応する
セクション320,340に逐語的(verbatim)にコピ
ーされる。
In accordance with a feature of the present invention, simulator generation tool 100 allows a user to modify, augment or control the execution of simulation mechanism 180 to better simulate more complex targets. , Allowing additional supplemental simulation code to be added. As described further below in connection with FIGS. 3 and 4, the machine description format 400 shown in FIG. 4 used by the simulator generation tool 100 includes "before" and "after" instruction dispatch code sections 470. , 480
I will provide a. The C code written in the “before” and “after” instruction dispatch code sections 470, 480 is a C code 300 (FIG. 3) that embodies a core simulation mechanism to enhance or modify the way simulator 180 works. Are verbatimly copied to the corresponding sections 320, 340 of.

【0022】1つの具現化において、シミュレーション
メカニズム185に含まれる補足的シミュレーションコ
ードは、制御のフローに対するシミュレーションにおけ
る正しいポイントが変化されるまで、ブランチのターゲ
ットアドレスをバッファするために、ディレイラインを
シミュレートするために使用され得る。マシンディスク
リプション400の「後」のセクション480の別のア
プリケーションは、TI C62xxアーキテクチャの
ような並列処理を可能にするアーキテクチャに対するシ
ミュレートされるサイクルの終わりにおいて、レジスタ
ファイルに対するシミュレートされた結果のライトバッ
クを制御することである。
In one implementation, the supplemental simulation code included in the simulation mechanism 185 simulates a delay line to buffer the target address of the branch until the correct point in the simulation for the flow of control has changed. Can be used to Another application of section 480 “after” machine description 400 is to write simulated results to a register file at the end of a simulated cycle for an architecture that allows for parallel processing, such as the TI C62xx architecture. Is to control the back.

【0023】このアーキテクチャにおいて、1から8の
可変数のインストラクションが、並列に実行され得る。
シミュレータ生成ツール100のデフォルト動作は、こ
れらのインストラクションが逐次的にシミュレートされ
ることを指示する。アーキテクチャのセマンティック
は、パラレルイシュー(parallel issue)を特定するの
で、これらのインストラクションの結果およびサイドエ
フェクトは、(ユニットサイクル待ち時間を有するイン
ストラクションに対して)現在のサイクルの終わりまた
はリサイクル待ち時間を有する(乗算インストラクショ
ンのような1サイクルより多い待ち時間を有するインス
トラクションに対して)ある後続のサイクルの終わりま
で、バッファされなければならない。
In this architecture, a variable number of 1 to 8 instructions can be executed in parallel.
The default behavior of the simulator generation tool 100 indicates that these instructions are simulated sequentially. Since the semantics of the architecture identify parallel issues, the result of these instructions and the side effects have the current end-of-cycle or recycle latency (for those instructions with unit cycle latency) ( It must be buffered until the end of some subsequent cycle (for instructions with a latency of more than one cycle, such as multiply instructions).

【0024】これは、全てのインストラクションにその
結果をバッファに書き込ませ、かつシミュレートされる
サイクルの終わりを検出しかつシミュレートされるレジ
スタファイルにバッファからの正しい値をライトバック
するために、「後」のセクション480中のコードを含
むことにより具現化され得る。「前」および「後」のセ
クション470,480のさらに別のアプリケーション
は、シミュレーション統計およびシミュレートされるプ
ログラムについてのプロファイリング情報を集めるため
のコードを挿入することである。
This causes all instructions to write their results to the buffer, and to detect the end of the simulated cycle and write back the correct value from the buffer to the simulated register file. It may be embodied by including the code in the "after" section 480. Yet another application of the "before" and "after" sections 470, 480 is to insert code to gather simulation statistics and profiling information about the program being simulated.

【0025】図1は、例示的なシミュレータ生成ツール
100の概念ブロック図である。シミュレータ生成ツー
ル100は、本発明の特徴および機能を提供するように
ここで修正されたいかなる商業的に入手可能な汎用演算
装置として具体化され得る。例えば、シミュレータ生成
ツール100は、F. Larsson による"Generating Effic
ient Simulators from a Specification Language," Sw
edish Inst. of Computer Science (SICS) Technical R
eport, T97:01, ISSN 1100-3154, (1997)、S.Onder &
R. Gupta による "Automatic Generation of Microarch
itecture Simulators," 1998 IEEE Int'l Conf. on Com
puter Languages, 80-89 (May 1998)、S. Pees 等によ
る "LISA-Machine Description Language for Cycle-Ac
curate Models of Programmable DSP Architectures,"
36th Design Automation Conf., 933-38 (June 1999)、
および LISA User's Guide, Institute for Integrated
Signal Processing Systems, ISS-RWTH Aachen, Vers.
1.60 (February 17,2000)に開示されたシミュレーショ
ン生成ツールを、本発明の特徴および機能を提供するよ
うに修正して具現化され得る。
FIG. 1 is a conceptual block diagram of an exemplary simulator generation tool 100. Simulator generation tool 100 may be embodied as any commercially available general purpose computing device modified herein to provide the features and functionality of the present invention. For example, the simulator generation tool 100 is based on "Generating Effic
ient Simulators from a Specification Language, "Sw
edish Inst. of Computer Science (SICS) Technical R
eport, T97: 01, ISSN 1100-3154, (1997), S. Onder &
"Automatic Generation of Microarch by R. Gupta
itecture Simulators, "1998 IEEE Int'l Conf. on Com
puter Languages, 80-89 (May 1998), "LISA-Machine Description Language for Cycle-Ac" by S. Pees et al.
curate Models of Programmable DSP Architectures, "
36 th Design Automation Conf., 933-38 (June 1999),
And LISA User's Guide, Institute for Integrated
Signal Processing Systems, ISS-RWTH Aachen, Vers.
The simulation generation tool disclosed in 1.60 (February 17,2000) can be embodied modified to provide the features and functions of the present invention.

【0026】具体的には、図1に示されているように、
シミュレータ生成ツール100は、ここに説明される本
発明の特徴および機能を含むシミュレータ生成プロセス
150を含まなければならない。シミュレータ生成ツー
ル100は、プロセッサ120、データストレージデバ
イス130および任意的に通信ポート140のように所
定の標準的ハードウェアコンポーネントを含む。
Specifically, as shown in FIG.
Simulator generation tool 100 must include a simulator generation process 150 that includes the features and functions of the present invention described herein. The simulator generation tool 100 includes certain standard hardware components, such as a processor 120, a data storage device 130, and optionally a communication port 140.

【0027】プロセッサ120は、図1に示されている
ように、共有データバスまたは専用接続の何れかの手段
により、他の列挙されたエレメントの各々にリンクされ
得る。通信ポート140は、シミュレータ生成ツール1
00を、例えば、図示しないLANに接続する。データ
ストレージデバイス130は、本発明に従って検索し、
変換しかつ(任意的に、並列に)実行するようにプロセ
ッサ120が動作可能な1つまたは2つ以上のインスト
ラクションを記憶するように動作可能である。
The processor 120 can be linked to each of the other listed elements by means of either a shared data bus or a dedicated connection, as shown in FIG. The communication port 140 is the simulator generation tool 1
00 is connected to, for example, a LAN (not shown). The data storage device 130 searches according to the present invention,
The processor 120 is operable to store one or more instructions operable to convert and execute (optionally in parallel).

【0028】シミュレーションメカニズム 本発明により生成されるシミュレータ180は、T.M. C
onte & C.E. Gimarc,等による "Fast Simulation of Co
mputer Architectures," Ch. 2, Kluwer Academic Publ
ishers (1995)に示されたようにプレデコードシミュレ
ーションメカニズムを使用する。実行されるたび毎にタ
ーゲットインストラクションを復号化する代わりに、シ
ミュレーションメカニズムはターゲットインストラクシ
ョンを一度復号化し、復号化された情報は、使用が容易
な中間的表現で記憶される。
Simulation Mechanism The simulator 180 generated according to the present invention uses the TM C
"Fast Simulation of Co by onte & CE Gimarc, etc.
mputer Architectures, "Ch. 2, Kluwer Academic Publ
Use the pre-decode simulation mechanism as shown in ishers (1995). Instead of decoding the target instruction each time it is executed, the simulation mechanism decodes the target instruction once and the decoded information is stored in an easy-to-use intermediate representation.

【0029】インストラクションが反復的に実行される
とき、この中間的表現で記憶された情報は、再利用さ
れ、インストラクションを復号化するオーバヘッドを償
却(amortizing)し、そして全体のシミュレーション速
度を増大させる。中間的表現は、C構造タイプとして具
現化され、図2に示されたターゲットインストラクショ
ン記述子(TID)220と呼ばれる。別個のTID
が、以下に詳細に説明するキャッシュドモード(cached
mode)を使用する場合を除き、各復号化されたインス
トラクションに対し、コードメモリに維持される。
When instructions are executed iteratively, the information stored in this intermediate representation is reused, amortizing the overhead of decoding the instructions, and increasing the overall simulation speed. The intermediate representation is embodied as a C structure type and is called the target instruction descriptor (TID) 220 shown in FIG. Separate TID
But the cached mode (cached
mode) is maintained in code memory for each decoded instruction, except when using mode).

【0030】TIDは、インストラクションストア21
0と呼ばれるアレイ中に記憶される。インストラクショ
ンストア210は、エグゾースティブ(exhaustive)ま
たはキャッシュドモードの何れかで使用され得る。モー
ドは、シミュレータ生成ツール100が、求められると
きに、コマンドラインオプションにより選択され、そし
て、何れか所定の生成されたシミュレータに対して固定
される。
The TID is stored in the instruction store 21
Stored in an array called 0. The instruction store 210 may be used in either an exhaustive or a cached mode. The mode is selected by the command line option when the simulator generation tool 100 is required, and is fixed for any given generated simulator.

【0031】エグゾースティブモードにおいて、シミュ
レートされるメモリ中に全ての可能性のあるターゲット
インストラクションロケーションに対するTIDがあ
る。32ビットの、ワード整列された、MIPSのよう
なインストラクションセットアーキテクチャに対して、
1つのTIDが、シミュレートされるインストラクショ
ンメモリの4バイト毎に割当てられる。2,4および6
バイト長のインストラクションを有するSC140アー
キテクチャのようなアーキテクチャに対して、2バイト
(インストラクションアライメントユニット)毎に1つ
のTIDがある。標準的な実行可能ファイルは、プログ
ラムテキストにより占められるインストラクションメモ
リの一部以外の全てに対してTIDを割り当てなければ
ならないことを防止するために、プログラムテキストセ
クションのサイズおよびロケーションについての十分な
情報を提供する。
In the exhaustive mode, there are TIDs for all possible target instruction locations in the simulated memory. For a 32-bit, word-aligned, instruction set architecture such as MIPS,
One TID is allocated every 4 bytes of the simulated instruction memory. 2, 4 and 6
For architectures such as the SC140 architecture with byte length instructions, there is one TID for every two bytes (instruction alignment unit). A standard executable file has sufficient information about the size and location of the program text section to prevent having to assign a TID to all but some of the instruction memory occupied by the program text. provide.

【0032】エグゾースティブモードの利点は、TID
に記憶されるデータが、シミュレーション全体を通して
持続することである。これは、シミュレーションの終わ
りにレポートされまたは処理されるインストラクション
レベル統計222およびプロファイリング情報224を
記憶するための便利な場所に、TIDをする。
The advantage of the exhaustive mode is that the TID
Is persistent throughout the simulation. This makes the TID a convenient place to store instruction level statistics 222 and profiling information 224 that are reported or processed at the end of the simulation.

【0033】キャッシュドモードは、より小さなメモリ
フットプリントが望まれる場合、またはデバイスの全イ
ンストラクションストアがシミュレートされる必要があ
る場合の何れかの場合に使用され得る。キャッシュドモ
ードにおいて、インストラクションストアは、ダイレク
トマップド(direct mapped )TIDキャッシュとして
動作する。結果として、複数のターゲットインストラク
ションのためのTIDが、キャッシュ中の単一のロケー
ションにマップされ得る。これは、特定のTID中に記
憶された情報を使用する前に、TIDが有効化されなけ
ればならないことを意味する。
The cached mode can be used either when a smaller memory footprint is desired or when the entire instruction store of the device needs to be simulated. In the cached mode, the instruction store operates as a direct mapped TID cache. As a result, TIDs for multiple target instructions may be mapped to a single location in the cache. This means that the TID must be validated before using the information stored in a particular TID.

【0034】これは、ターゲットインストラクションの
アドレスをその対応するTIDにそれが復号化される時
点で記憶させることにより、そして使用する前にプログ
ラムカウンタ(PC)とそれを比較することによりなさ
れる。一致しない場合、インストラクションは、再び復
号化され、特定のキャッシュエントリに記憶されたいか
なる以前の情報もオーバライトしなければならない。T
IDはオーバライトされ得るので、それらは、何れかの
統計またはプロファイル情報を記憶するために最早有用
でなくなる。
This is done by storing the address of the target instruction in its corresponding TID at the time it is decoded, and by comparing it with the program counter (PC) before use. If there is no match, the instructions must be decoded again and overwrite any previous information stored in the particular cache entry. T
Since IDs can be overwritten, they are no longer useful for storing any statistics or profile information.

【0035】インストラクションの置き換えおよび再復
号化のために、シミュレーション速度がキャッシュモー
ドにおいて低下し得るという懸念があるが、経験によ
り、パフォーマンスインパクトは無視し得ることが分か
った。TIDキャッシュは、同様のサイズ(エントリの
数、メモリのサイズではない)および組織のプロセッサ
インストラクションキャッシュとほぼ等価なパフォーマ
ンスを有する。同様に、使用の前にTIDを有効化する
更なるオーバヘッドは、大きくない。
While there is concern that simulation speed may be reduced in cache mode due to instruction replacement and re-decoding, experience has shown that the performance impact is negligible. The TID cache has a similar size (number of entries, not the size of memory) and performance approximately equivalent to the organization's processor instruction cache. Similarly, the additional overhead of validating the TID before use is not significant.

【0036】各ターゲットインストラクションのソマン
ティックは、それ自体のCファンクションにより具現化
される。このファンクションは、特定のターゲットイン
ストラクションに対するセマンティックファンクション
230と呼ばれる。復号化において、ターゲットインス
トラクションのセマンティックは、正しいセマンティッ
クファンクション230のアドレスをそのTID中のフ
ァンクションポインタ226に割り当てることにより、
そのTID220に結びつけられる。
The semantics of each target instruction is embodied by its own C function. This function is called the semantic function 230 for the specific target instruction. In decoding, the semantics of the target instruction are determined by assigning the address of the correct semantic function 230 to the function pointer 226 in its TID.
Tied to that TID 220.

【0037】このようにして、インストラクションディ
スパッチは、J.E. Veenstra およびR.J. Fowler による
"MINT: A Front End For Efficient Simulation of Sh
ared-Memory Multiprocessors," Proc. of the 2d Int'
l Workshop on Modeling, Analysis, and Simulation o
f Computer and Telecommunication Systems (MASCOT
S), 201-207 (Jan. 1994)に示されたMintにおいて
使用されるディスパッチメカニズムに似たインダイレク
トファンクションコールとして具現化され得る。
Thus, instruction dispatch is performed by JE Veenstra and RJ Fowler.
"MINT: A Front End For Efficient Simulation of Sh
ared-Memory Multiprocessors, "Proc. of the 2d Int '
l Workshop on Modeling, Analysis, and Simulation o
f Computer and Telecommunication Systems (MASCOT
S), 201-207 (Jan. 1994), which can be embodied as an indirect function call similar to the dispatch mechanism used in Mint.

【0038】ディレイドブランチの場合において、ブラ
ンチインストラクションに対するセマンティックファン
クション230は、ブランチターゲットアドレスを「ブ
ランチターゲット(branch target)」バッファに入れ
ることになる。コードは、マシンディスクリプション4
00の後のセクション480に書き込まれ、シミュレー
ションの進行を追跡し、シミュレートされるプログラム
カウンタがインストラクションセマンティックからの次
の値で更新されるべきときを検出する。このようにし
て、インストラクションのセマンティックの具現化は、
大幅に単純化される。
In the case of a delayed branch, the semantic function 230 for the branch instruction will place the branch target address in a "branch target" buffer. The code is Machine Description 4
Written in section 480 after 00 to track the progress of the simulation and detect when the simulated program counter should be updated with the next value from the instruction semantics. In this way, the realization of the semantics of the instruction is
It is greatly simplified.

【0039】インストラクション復号化 ターゲットインストラクションの復号化は、2つのやり
方、熱心に(eagerly)または怠惰に(lazily)行われ
得る。例えば、ミントは、熱心なアプローチを使用す
る。メントは、プログラムのインストラクションを、そ
れがシミュレートされるメモリにロードされるときに復
号化する。熱心な復号化は、インストラクションがデー
タからはっきりと分離されているときに最適に働き、各
インストラクションの始まりが、プライオリ(a prior
i)に決定され得ることを必要とする。
Instruction Decoding The decoding of the target instruction can be performed in two ways, eagerly or lazily. For example, mint uses an avid approach. The statement decodes the instructions of the program as it is loaded into the simulated memory. Eager decoding works best when the instructions are clearly separated from the data, and each instruction starts at a priori
i) needs to be determined.

【0040】これは、RISC(reduced instruction
set)スタイルアーキテクチャに対して合理的であるか
も知れないが、可変長インストラクションを伴うアーキ
テクチャに対して一般に可能ではない。この理由のため
に、シミュレータ生成ツール100の例示的な実施形態
は、インストラクション復号化を怠惰に実行するための
コードを生成する。これは、復号化されていないインス
トラクションに対する特別なセマンティックファンクシ
ョン230−sを指し示すための全てのTIDエントリ
のセマンティックファンクションポインタ226を初期
化することにより行われる。
This is a RISC (reduced instruction)
set) may be reasonable for style architectures, but is generally not possible for architectures with variable length instructions. For this reason, the exemplary embodiment of the simulator generation tool 100 generates code for performing instruction decoding lazily. This is done by initializing the semantic function pointer 226 of every TID entry to point to the special semantic function 230-s for undecoded instructions.

【0041】この特別なセマンティックファンクション
230−sがコールされる場合、これは最初に復号化フ
ァンクションをコールする。これは、ターゲットインス
トラクションを復号化し、TID220中の適切なフィ
ールドを初期化する。そして、特別なセマンティックフ
ァンクション230−sは、セマンティックファンクシ
ョンポインタ226の新しい値を使用して、正しいセマ
ンティックファンクション230をコールする。何れか
の戻された値も、元のコールサイトに送られる。
When this special semantic function 230-s is called, it first calls the decoding function. This decodes the target instruction and initializes the appropriate fields in TID 220. The special semantic function 230-s then calls the correct semantic function 230 using the new value of the semantic function pointer 226. Any returned values are sent back to the call site.

【0042】怠惰な復号化アプローチは、自己修正する
または実行時に生成されるコード、または実行中にダイ
ナミックにロードされるコードを含むプログラムのシミ
ュレーションに役立つ。プログラムメモリの何れかの部
分が書き込まれるとき、影響を受けるTIDのセマンテ
ィックポインタが復号化されていないファンクションに
対して再初期化される限り、インストラクションは、再
び復号化されることになり、プログラムは正しくシミュ
レートされることになる。
The lazy decoding approach is useful for simulating programs that include self-modifying or code generated at run time, or code that is dynamically loaded during execution. When any part of the program memory is written, as long as the semantic pointer of the affected TID is reinitialized for the undecoded function, the instructions will be decoded again and the program will It will be simulated correctly.

【0043】デコーダファンクションは、ターゲットイ
ンストラクションのビットパターンをそれらが表れる順
番で、マシンディスクリプション中の全てのインストラ
クションのビットパターンと比較する一連のイフステー
トメント(if-statements)として具現化される。1つ
の一致が見いだされる場合の、アーリーリターン(earl
y return)はない。複数の一致が生じ得る。各一致は、
TID中のフィールドの初期化を生じさせる。初期化さ
れるTIDフィールドのセットは、異なるインストラク
ションについて同一である必要はない。しかし、セマン
ティックファンクションに対するポインタ226のよう
ないくらかのフィールドは、常に初期化される。そし
て、1つのインストラクションに対するセマンティック
アクションが、復号化の間に一致した最後のインストラ
クションにより特定される。
The decoder function is embodied as a series of if-statements that compare the bit patterns of the target instructions, in the order in which they appear, with the bit patterns of all the instructions in the machine description. Early return if one match is found
y return). Multiple matches can occur. Each match is
Causes the initialization of the fields in the TID. The set of TID fields that are initialized need not be the same for different instructions. However, some fields, such as the pointer 226 to the semantic function, are always initialized. Then, the semantic action for one instruction is identified by the last instruction that matched during decoding.

【0044】復号化メカニズムの複数一致特徴(multip
le match feature)は、同一のサブフィールドを伴うエ
ンコディングを有するインストラクションのクラスに対
するデフォルト初期化を実行するために使用され得る。
例えば、TI C62xxおよびアーム(Arm)アーキテ
クチャの両方は、インストラクションエンコーディング
の最初の4ビット中にエンコードされたプレディケート
(predicate)により特定される完全条件的(full cond
itional)実行を有する。また、これら4ビットの分析
(parsing)は、全てのインストラクションに対して同
一であるので、分析を一度だけ表現することが便利とな
る。
The multiple match feature (multip
le match feature) can be used to perform default initialization for classes of instructions that have encoding with the same subfield.
For example, both the TI C62xx and the Arm architecture have a full cond specified by a predicate encoded in the first four bits of the instruction encoding.
itional) having execution. Also, since the parsing of these four bits is the same for all instructions, it is convenient to express the analysis only once.

【0045】これを達成する効率的な方法は、各プレデ
ィケートに対するファンクションを最初に書き込み、こ
れらのプレディケートファンクションのうちの1つをポ
イントするためのTID中の追加的ファンクションポイ
ンタを宣言(declare)することである。この方法で、
プレディケートは、インダイレクトファンクションコー
ルにより、実行時に、評価され得る。
An efficient way to accomplish this is to first write the function for each predicate and declare an additional function pointer in the TID to point to one of these predicate functions. It is. using this method,
Predicates can be evaluated at runtime by indirect function calls.

【0046】(何れかのインストラクションに一致す
る)ディフォルトインストラクションディスクリプショ
ンは、このプレディケートファンクションポインタを正
しく初期化するために、いずれか他のインストラクショ
ンディスクリプションの前に、マシーンディスクリプシ
ョン中に挿入される。この方法で、プレディケートファ
ンクションポインタは、全てのインストラクションに対
して一度初期化される。セマンティックファンクション
ポインタ226を含むTIDの残りのフィールドは、後
続の正しく行われる(successful)デコーディングによ
り正しく初期化される。
A default instruction description (matching any instruction) is inserted into the machine description before any other instruction description to correctly initialize this predicate function pointer. In this way, the predicated function pointer is initialized once for all instructions. The remaining fields of the TID, including the semantic function pointer 226, are correctly initialized by a subsequent successful decoding.

【0047】インストラクションシグニフィカントの順
序づけを行うことの1つの重要な特徴は、これが、より
短いインストラクションがより長いインストラクション
のプレフィックス(prefixes)であり得る可変長インス
トラクションの適切なデコーディングを可能にすること
である。そのようなアーキテクチャの一例は、Microele
ctronics Group, Lucent Technologies and Motorola,
Inc., SC140 DSP CoreReference Manual (Dec. 1999)
に示された StarCore SC140DSPである。SC1
40は、いくつかの32ビットインストラクションのう
ちの最初の16ビットに一致する16ビットインストラ
クションを有する。16ビットインストラクションに対
するインストラクションディスクリプションを32ビッ
トインストラクションの前に置くことにより、正しいデ
コードが実行される。
One important feature of ordering instruction significants is that this allows for proper decoding of variable length instructions where shorter instructions may be prefixes of longer instructions. . One example of such an architecture is Microele
ctronics Group, Lucent Technologies and Motorola,
Inc., SC140 DSP CoreReference Manual (Dec. 1999)
Is a StarCore SC140 DSP. SC1
40 has a 16-bit instruction that matches the first 16 bits of some 32-bit instructions. By placing the instruction description for the 16-bit instruction before the 32-bit instruction, correct decoding is performed.

【0048】メインシミュレーションループ 図3は、本発明の特徴を含むメインシミュレーションル
ープ300を示す。ループ300は、4個のパート31
0,320,330,340に分解され得る。第1にシ
ミュレートされるプログラムカウンタにより指し示され
るターゲットインストラクションに対するTIDのアド
レスが、パート310において演算される。第2に、マ
シンディスクリプションの1つのセクションから逐語的
にコピーされたCコードが、パート320において実行
される。第3に、インストラクションディスパッチ自体
が、パート330において、TID中に特定されたセマ
ンティックファンクション230に対するインディレク
トファンクションコールを使用して、実行される。リタ
ーン値が、シミュレートされるプログラムカウンタ(P
C)にコピーされる。最後に、マシンディスクリプショ
ンの1つのセクションから逐語的にコピーされた更なる
Cコードが、パート340において実行される。
Main Simulation Loop FIG. 3 shows a main simulation loop 300 including features of the present invention. Loop 300 consists of four parts 31
0, 320, 330, 340. First, the address of the TID for the target instruction pointed to by the simulated program counter is computed in part 310. Second, C code verbatim copied from one section of the machine description is executed in part 320. Third, the instruction dispatch itself is performed, in part 330, using an indirect function call to the semantic function 230 identified in the TID. The return value is the simulated program counter (P
C). Finally, additional C code verbatim copied from one section of the machine description is executed in part 340.

【0049】そして、本発明の1つの特徴に従って、シ
ミュレータ生成ツール100が、任意的なCコードが、
ターゲットインストラクションディスパッチ(パート3
30)の前(パート320)の後(パート340)に導
入され得るようにする。このようにして、シミュレータ
生成ツール100は、より複雑なターゲットアーキテク
チャをよりよくシミュレートするために、シミュレーシ
ョンメカニズムを修正し、増大させまたは制御すること
ができる。
And according to one feature of the present invention, the simulator generation tool 100
Target instruction dispatch (Part 3
30) before (part 320) and after (part 340). In this way, the simulator generation tool 100 can modify, augment or control the simulation mechanism to better simulate a more complex target architecture.

【0050】例えば、TI C62xxは、スタティッ
クにスケジュールされた、可変幅イシュー(issue)の
VLIW(very large instruction word)のようなア
ーキテクチャである。TI C62xxインストラクシ
ョン待ち時間は、プログラマーに対して明らかとなって
おり、例えば、1つのロードは、その間にディスティネ
ーションレジスタの以前の値がアクセス可能である4個
のディレイスロットを有する。前述したように、このア
ーキテクチャを正しくシミュレートするために、インス
トラクションのパラレル問題並びにそれらの待ち時間
が、正しくモデル化されなければならない。
For example, the TI C62xx is an architecture such as a VLIW (very large instruction word) of statically scheduled, variable width issues. The TI C62xx instruction latency is apparent to the programmer, for example, one load has four delay slots during which the previous value of the destination register is accessible. As mentioned above, in order to correctly simulate this architecture, the parallel problems of instructions as well as their latencies must be correctly modeled.

【0051】シミュレータ生成ツール100の基本シミ
ュレーションメカニズムは、インストラクションのシミ
ュレーションを厳密なシーケンスで実行する。アーキテ
クチャのセマンティックはパラレル問題を特定するの
で、これらのインストラクションの結果およびサイドエ
フェクトは、単位サイクル待ち時間を有するインストラ
クションに対して現在のサイクルの終わりまで、または
1サイクルより長い待ち時間を有するインストラクショ
ン、例えばリサイクル待ち時間を有する乗算インストラ
クションに対して何らかの後続のサイクルの終わりまで
バッファされなければならない。
The basic simulation mechanism of the simulator generation tool 100 executes an instruction simulation in a strict sequence. Since the semantics of the architecture identify parallel problems, the result and side effects of these instructions may be up to the end of the current cycle for instructions with unit cycle latency, or instructions with latency greater than one cycle, for example, Multiply instructions with recycle latency must be buffered until the end of some subsequent cycle.

【0052】これを実施する1つのやり方は、全てのイ
ンストラクションのセマンティックファンクション23
0に、インストラクションのサイドエフェクトを一連の
バッファに書き込ませ、そして、1つのサイクルの終わ
りを検出するためにインストラクションディスパッチの
後に挿入されるコードを書き込み、バッファからレジス
タファイルへペンディング値をライトバック(write ba
ck)することである。
One way to do this is to use the semantic function 23 for all instructions.
0 causes the side effects of the instruction to be written to a series of buffers, and then writes the code inserted after the instruction dispatch to detect the end of one cycle, and writes the pending values from the buffer back to the register file. ba
ck).

【0053】マシンディスクリプション 図4は、マシンディスクリプション400に対する例示
的構造を示す。一般に、マシンディスクリプション40
0は、1つのシミュレータに対してアーキテクチャ従属
情報を特定する。以下にさらに説明するように、マシン
ディスクリプション400は、インストラクションセッ
ト中の各インストラクションのエンコーディングおよび
セマンティックを、並びにシミュレータ生成ツール10
0により使用される様々なデータ構造に対する追加的フ
ィールドデクラレーションを含む。また、本発明によれ
ば、マシンディスクリプション400は、インストラク
ションのVLIW問題に対するサポートまたは統計また
はプロファイリング情報の収集のような基本コアシミュ
レーションメカニズム180に対して修正または追加す
るための補足的コード185を含み得る。
Machine Description FIG. 4 shows an exemplary structure for a machine description 400. Generally, the machine description 40
0 specifies architecture dependent information for one simulator. As described further below, the machine description 400 determines the encoding and semantics of each instruction in the instruction set, as well as the simulator generation tool 10.
0 includes additional field declarations for the various data structures used. Also in accordance with the present invention, machine description 400 includes supplemental code 185 to modify or add to basic core simulation mechanism 180, such as support for instruction VLIW issues or collection of statistics or profiling information. obtain.

【0054】柔軟性に対する必要および単純な具現化に
対する必要性がある場合、マシンディスクリプション4
00は、S.C. Johnson, "YACC - Yet Another Compiler
Compiler," Computing Science Technical Report 32,
AT&T Bell Laboratories, Murray Hill, NJ (1975) に
示されたYACCのものと同様なヒロソフィに従う。C
は、可能な最大限まで使用される。
If there is a need for flexibility and a need for a simple implementation, the machine description 4
00 is SC Johnson, "YACC-Yet Another Compiler
Compiler, "Computing Science Technical Report 32,
Follows a hirosofi similar to that of YACC shown in AT & T Bell Laboratories, Murray Hill, NJ (1975). C
Is used to the maximum extent possible.

【0055】追加的統語的(syntactic)エレメントは、
マシンディスクリプション400に全体構造を与え、情
報をシミュレータジェネレータ100へ直接的に送り、
Cにおいて行うことが扱いにくくかつ冗長であるアーキ
テクチャのこれらの特徴を表すために追加されることに
なる。このアプローチは、シミュレータジェネレータ1
00の単純な具現化を可能にする。ハードウエア技術言
語を解剖(parse)しおよび分析しなければならないこ
との代わりに、Cコードが、ほとんどのコードがマシン
ディスクリプションから直接的に貼り付けられたコード
からなるように生成される。
An additional syntactic element is:
Give the machine description 400 the overall structure, send information directly to the simulator generator 100,
It will be added to represent these features of the architecture that are cumbersome and redundant to do in C. This approach is based on Simulator Generator 1
00 enables a simple implementation. Instead of having to parse and analyze the hardware technology language, C code is generated such that most code consists of code pasted directly from the machine description.

【0056】結果として、インストラクションのセマン
ティック、アーキテクチャにシミュレートされる状態、
並びにTIDおよび他の構造のユーザ定義フィールド
が、Cにおいて特定される。更なるシンタックス(synta
x)が、インストラクションのエンコーディング、インス
トラクションエンコーディングのビットフィールドの使
用および取り扱い並びに合理的かつ意味のある方法でC
コードの部分をグループ化するための手段を提供するこ
とを好都合に表すために追加された。
As a result, the semantics of the instruction, the state simulated by the architecture,
As well as TID and other structure user defined fields are specified in C. Further syntax (synta
x) is the encoding of the instructions, the use and handling of the bit fields of the instruction encoding, and the C
Added to conveniently represent providing a means for grouping parts of code.

【0057】図4は、マシンディスクリプション400
の全体構造を示す。マシンディスクリプション400
は、多数のセクションに分割されている。セクション4
05中の初期シミュレータディレクティブは、特定され
るべく整列されたバイトよりもさらに厳密な整列要求を
許容する。正しい整列(alignment)を特定すること
は、エグゾースティブ(exhaustive)モードにおいて使
用されるとき、インストラクションストアの全体的スペ
ース要求を低減する。
FIG. 4 shows a machine description 400.
Shows the overall structure of. Machine description 400
Is divided into a number of sections. Section 4
The initial simulator directive in 05 allows for more stringent alignment requirements than the bytes aligned to be specified. Specifying the correct alignment reduces the overall space requirements of the instruction store when used in exhaustive mode.

【0058】%%hdefsセクション420中に書き
込まれたCコードは、全てのセマンティックファンクシ
ョンに対するプロトタイプを含むヘッダファイルに逐語
的ににコピーされる。このファイルは、生成されたCソ
ースファイルの全てに含まれる。シミュレータソースコ
ードについて可視的であるべきタイプ、変数およびマク
ロを定義するために好都合な場所である。
The C code written in the %% hdefs section 420 is copied verbatim into a header file containing prototypes for all semantic functions. This file is included in all of the generated C source files. It is a convenient place to define types, variables and macros that should be visible for simulator source code.

【0059】%%cdefsセクション420および%
%auxセクション495は、インストラクションセマ
ンティックを具現化するCファンクションの定義のそれ
ぞれ前および後に挿入されるコードを含む。
%% cdefs section 420 and%
The% aux section 495 contains code that is inserted before and after the definition of the C function that implements the instruction semantics, respectively.

【0060】%%global、%%actionおよ
び%%runinstセクション430,440,45
0の全ては、3個のCデータ構造、即ちグローバルステ
ート、アクション記述子およびTIDへ、ユーザ定義フ
ィールドを追加するために使用される。これらのセクシ
ョンに書き込まれたテキストは、これらのデータタイプ
に対するC構造定義に付加される。グローバルステート
構造は、グローバルステート情報を記憶する。グローバ
ルステート構造は、マシンステートおよび何れかの統計
的なカウンタの両方を保持することが意図されている。
%% global, %% action and %% runinst sections 430,440,45
All of the 0s are used to add user defined fields to the three C data structures: Global State, Action Descriptor and TID. The text written in these sections is appended to the C structure definition for these data types. The global state structure stores global state information. The global state structure is intended to hold both machine states and any statistical counters.

【0061】いくつかの内部シミュレーションデータ構
造も、この構造中に記憶される。アクション(またはサ
ブインストラクション)記述子は、サブインストランク
ションに対するTIDと同様に働き、インストラクショ
ンのセマンティック分解する方法を提供する。シミュレ
ータ生成ツール100は、それぞれグローバルステー
ト、アクション記述子およびTIDデータタイプの各々
の現在の例示化(instantiation)におけるフィールド
{x}を参照するために使用されるマクロGLOBAL
(x),AP(x)およびIP(x)を提供する。
Some internal simulation data structures are also stored in this structure. Action (or subinstruction) descriptors work similarly to TIDs for subinstructions and provide a way to semantically decompose instructions. Simulator generation tool 100 generates macro GLOBAL which is used to refer to field {x} in the current instantiation of each of the global state, action descriptor and TID data types, respectively.
(X), AP (x) and IP (x).

【0062】%%opsセクションは、インストラクシ
ョンセマンティックが記述される所である。インストラ
クションセマンティックに対するシンタックスは、“イ
ンストラクションディスクリプションズ”と呼ばれるセ
クション中に詳細に示される。このセクションは、3つ
の場所、即ちinit{}460,before{}4
70およびafter{}480におけるコアシミュレ
ーションメカニズムに追加されるCコードを特定するた
めにも使用される。
The %% ops section is where instruction semantics are described. The syntax for instruction semantics is detailed in a section called "Instruction Descriptions". This section has three locations: init $ 460, before $ 4
Also used to identify C code that is added to the core simulation mechanism at 70 and after $ 480.

【0063】これらのコードの部分は、本発明に従っ
て、それぞれ、シミュレータ初期化時に、全てのインス
トラクションディスパッチの前に、かつ全てのインスト
ラクションディスパッチの後に実行される。例えば、M
ipsシミュレータにおいて、サイクル毎にレジスタを
ゼロにクリアするCコードがbefore{}に書き込
まれ、インストラクションセマンティックは、それに書
き込まれた可能性のある後続のインストラクションも、
レジスタゼロが常にゼロとなることを保証して書き込ま
れ得るようになる。
These code sections are executed according to the present invention, respectively, at the time of simulator initialization, before all instruction dispatches, and after all instruction dispatches. For example, M
In the ips simulator, the C code that clears the register to zero every cycle is written to before $, and the instruction semantics indicates that subsequent instructions that may have been written to it also
Register zero can now be written, ensuring that it is always zero.

【0064】追加的インストラクションセットについて
のインストラクションセマンティックは、任意的な%%
instsetセクション490に記述され得る。1つ
の%%instsetセパレータが、各追加的インスト
ラクションセットに対して必要とされる。
The instruction semantics for the additional instruction set are optional %%
Instset section 490 can be described. One %% instset separator is required for each additional instruction set.

【0065】インストラクションディスクリプション 最新のRISC型汎用アーキテクチャと異なり、埋込ア
ーキテクチャは、しばしば、単純なディスクリプション
で捉えることが困難なエンコーディングスキームおよび
インストラクションセマンティックを備えたインストラ
クションセットアーキテクチャ(ISA)を有する。例
は、より短いインストラクションが、複数の不連続ビッ
トフィールド、多数のインストラクションフォーマット
およびレジスタバンクを選択するためのプロセッサステ
ートに依存するレジスタスペシファイアについて分割さ
れた中間の、符号化された(signed)かつ符号化されて
いない(unsigned)より長いインストラクションの有効
なプレフィックス(prefixes)であり得るような可変長
インストラクションを含む。そして、ISAのエンコー
ディングおよびセマンティックのディスクリプション
は、使用を容易にしかつ直覚的(intuitive)にしつ
つ、非常に不規則なアーキテクチャの表現を可能にする
ように十分に柔軟でなければならない。
Instruction Description Unlike modern RISC-type general purpose architectures, embedded architectures often have an instruction set architecture (ISA) with an encoding scheme and instruction semantics that are difficult to capture with a simple description. An example is that the shorter instruction is split into a plurality of discrete bit fields, a number of instruction formats and a register state dependent processor state to select a register bank, an intermediate, signed and Includes variable length instructions that may be valid prefixes for longer instructions than unsigned. And the encoding and semantic description of the ISA must be flexible enough to allow for the representation of highly irregular architectures while making it easy to use and intuitive.

【0066】シミュレータ生成ツール100により使用
される図5に示された例示的インストラクションディス
クリプション500は、3つの部分、即ちエンコーディ
ング、(任意的な)デコードアクションに対するCソー
ス、およびインストラクションセマンティックに対する
Cソースからなる。インストラクションエンコーディン
グは、0bXの形式のストリングにより特定される。X
は、バイナリ数(0,1)、unnamed don't cares (?)
および/または named don't cares (a-zA-Z)のストリ
ングである。1つの数またはシンボルが、n回反復さ
れ、これに{n}が続く。
The exemplary instruction description 500 shown in FIG. 5 used by the simulator generation tool 100 includes three parts: encoding, C source for (optional) decode actions, and C source for instruction semantics. Become. The instruction encoding is specified by a string of the form 0bX. X
Is the binary number (0,1), unnamed don't cares (?)
And / or a string of named don't cares (a-zA-Z). A number or symbol is repeated n times, followed by {n}.

【0067】インストラクションのフィールドを可視的
に分離するために、アンダスコア(underscore)が使用
され得るが、これは他の意味を有しない。Named don't
careは、$をそのネームにプリペンド(prepend)するこ
とによりインストラクションのデコードまたはセマンテ
ィックアクションのCコード内で参照され得るビットフ
ィールドである。エンコーディングストリング中の同じ
named don't careの複数の発生が、それぞれ連続的であ
る限り許容され、フィールドが参照されるとき自動的に
連結される。不連続ビットフィールドは、それらのネー
ムの連結を参照することにより連結され得る。バイナリ
コンスタント値も、ネームドフィールドで連結され得
る。
Underscores can be used to visually separate the fields of the instruction, but this has no other significance. Named don't
Care is a bit field that can be referenced in the C code of instruction decode or semantic action by prepending $ to its name. The same in the encoding string
Multiple occurrences of named don't care are allowed as long as each is consecutive, and are automatically concatenated when a field is referenced. Discontinuous bit fields may be concatenated by referencing their name concatenation. Binary constant values can also be concatenated in named fields.

【0068】例えば、$a0bは、ビットフィールド
a、コンスタント0およびビットフィールドbのコンケ
ーティネーションの符号化されていない(unsigned)値
を指す。符号化された(signed)値は、$およびその直
後に続くa∧,即ち$∧a0bにより参照される。
For example, $ a0b indicates an unsigned value of the concatenation of bit field a, constant 0 and bit field b. The signed value is referenced by $ and immediately following a∧, ie, $ ∧a0b.

【0069】インストラクションディスクリプションの
ビットパターンがデコードされているインストラクショ
ンワードに一致したとき、デコーダアクションは、デコ
ードの間に実行されるCコードを特定するために使用さ
れる。これは、値を演算し、TID中のフィールドを初
期化し、またはいずれか他の所望のサイドエフェクトを
実行するために使用され得る。これは、シミュレータ生
成ツール100のマルチプルマッチデコードフィーチャ
ーとの関連で特に有用である。
When the bit pattern of the instruction description matches the instruction word being decoded, a decoder action is used to specify the C code to be executed during decoding. This can be used to calculate values, initialize fields in the TID, or perform any other desired side effects. This is particularly useful in connection with the multiple match decode feature of simulator generation tool 100.

【0070】インストラクションセマンティックとして
特定されるCコードは、ビットフィールドディファレン
スが可変ディファレンスにより置き換えられることを除
いて、特定されたように正確に実行される。さらに、C
コードは、デフォルトにより、次のシーケンシャルイン
ストラクションのプログラムカウンタ(PC)をリター
ンするために、セマンティックファンクションに付加さ
れる。多くのアーキテクチャに対して、ブランチが、代
わりに、新しいPCの値を明示的にリターンすることに
より実行され得る。そのディレイドブランチを備えたM
ipsアーキテクチャのような他のアーキテクチャに対
して、コードは、PCを適切に修正するために、aft
er{}セクションに書き込まれ得る。
C code specified as instruction semantics is executed exactly as specified, except that the bit field difference is replaced by a variable difference. Further, C
Code is added to the semantic function by default to return the program counter (PC) of the next sequential instruction. For many architectures, a branch may instead be performed by explicitly returning the value of the new PC. M with its delayed branch
For other architectures, such as the ips architecture, the code may require aft to properly modify the PC.
er $ section.

【0071】図5は、例示的なMips addiインストラク
ションに対するインストラクションディスクリプション
500を示す。インストラクションエンコーディング
は、4個のフィールドに分割される。第1のフィールド
510は、opcodeを特定するコンスタントである。次の
2つのフィールド520,530は、ソースおよびディ
スティネーションのレジスタオペランド(それぞれネー
ムドsおよびt)をエンコードする5ビット値である。
最後のフィールド540は、符号化された(signed)即
時(immediate)値である。インストラクションセマン
ティック中のiに対するリファレンスは、符号拡張され
た(sign-extended)値をリファレンスするために、∧を
使用する。
FIG. 5 shows an instruction description 500 for an exemplary Mips addi instruction. Instruction encoding is divided into four fields. The first field 510 is a constant that specifies an opcode. The next two fields 520, 530 are 5-bit values that encode the source and destination register operands (named s and t, respectively).
The last field 540 is a signed immediate value. The reference to i in the instruction semantics uses ∧ to refer to the sign-extended value.

【0072】サブインストラクション いくつかのアーキテクチャに対するシミュレートを簡単
に書くために、シミュレータ生成ツール100は、1つ
のインストラクションのセマンティックを複数のサブイ
ンストラクションに分解するための手段を提供する。こ
れは、サブインストラクションが、複数のインストラク
ションについて再利用され得る場合に特に有用である。
Sub-Instructions To easily write simulations for some architectures, the simulator generation tool 100 provides a means for breaking down the semantics of an instruction into multiple sub-instructions. This is particularly useful where sub-instructions can be reused for multiple instructions.

【0073】例えば、Armアーキテクチャにおいて、
(ADDおよびSUDのような)多数のバニラデータプ
ロセッシングインストラクションは、"addressing mode
1"と呼ばれるものにおいて、シフタにより、オペラン
ド、イミーディエットまたはレジスタのうちの1つを事
前処理する。シフタへの入力およびその11個のオペレ
ーションのうちの1つの仕様は、影響されるアームイン
ストラクション中の13ビットにより決定される。ビッ
ト25および12個の再機会ビット(11..0)であ
る。これらのインストラクションのこの共通部分を、サ
ブインストラクション、即ち「アクション(action
s)」のセットにファクタアウト(factor out)するこ
とが望ましい。
For example, in the Arm architecture,
Many vanilla data processing instructions (such as ADD and SUD) use the "addressing mode
In what is referred to as a 1 ", the shifter pre-processes one of the operands, immediates, or registers. The input to the shifter and the specification of one of its 11 operations is determined during the affected arm instruction. Bit 25 and 12 re-occurrence bits (11.0) .This intersection of these instructions is referred to as a sub-instruction, or "action".
s) ".

【0074】シミュレータ生成ツール100は、インス
トラクションディスクリプションフォーマットの使用を
ネームドスコープを含むように拡張することにより、こ
の分解を実行するための簡単なメカニズムを提供する。
アクションのセットは、インストラクション識別子の直
後に続く、「square brackets」により囲まれた、スコ
ープのネームをおくことにより、1つのスコープ中に一
緒にグループ化され得る。1つのスコープ内の全てのア
クション(サブインストラクション)は、同じワード幅
(1つのスコープ内の可変長アクションエンコーディン
グは許容されない)を有しなければならない。スコープ
識別子以外、1つのアクションに対するインストラクシ
ョンディスクリプションは全て、レギュラーインストラ
クションディスクリプションの同じフィーチャーを有す
る。
The simulator generation tool 100 provides a simple mechanism for performing this decomposition by extending the use of the instruction description format to include a named scope.
A set of actions can be grouped together in one scope by putting the name of the scope, enclosed by "square brackets", immediately following the instruction identifier. All actions (sub-instructions) in one scope must have the same word width (variable-length action encoding in one scope is not allowed). Except for the scope identifier, all instruction descriptions for one action have the same features of the regular instruction description.

【0075】1つのスコープは、Cファンクションコー
ルと同様のシンタックスを使用して、インストラクショ
ンディスクリプションのセマンティックセクション内で
参照され得る。“@”プレフィックスを伴うスコープ識
別子は、「ファンクションネーム」として働く。「パラ
メータ」は、上述したビットフィールドリファレンスで
ある。特定のアクションが、アクションリファレンスの
パラメータがアクションのエンコーディングと一致する
とき、リファレンスインストラクションのデコーディン
グにより、スコープリファレンスに結びつけられる。
One scope can be referenced in the semantic section of the instruction description using a syntax similar to C function calls. Scope identifiers with the “$” prefix serve as “function names”. “Parameter” is the bit field reference described above. A particular action is bound to a scope reference by decoding the reference instruction when the parameter of the action reference matches the encoding of the action.

【0076】セパレートデコードファンクションが、各
ネームドスコープに対して生成される。インストラクシ
ョンディスクリプションが1つのスコープを参照し、ア
クションがそのリファレンスにうまく結びつけられない
場合、ちょうどディスクリプションのビットパターンが
現在のインストラクションワードに一致しない場合のよ
うに、デコードを失敗する。アクションの実際のディス
パッチは、インダイレクトファンクションコールにより
実行される。
A separate decode function is generated for each named scope. If the instruction description refers to one scope and the action is not well tied to that reference, decoding will fail, just as if the bit pattern of the description did not match the current instruction word. The actual dispatch of the action is performed by an indirect function call.

【0077】1つのアクションは、他のネームドスコー
プへのリファレンスをすることができるが、再帰的リフ
ァレンスは、直接または間接に許容されない。
One action can be a reference to another named scope, but recursive references are not allowed, directly or indirectly.

【0078】図6は、上述した例示的アームシフタオペ
レーションに対するスコープドサブインストラクション
(アクション)を使用するインストラクションセマンテ
ィックの分解を示す。図6に示されているように、コー
ドは、第1のセクション610中のサブインストラクシ
ョン(アクション)のセット、およびセクション610
に定義されたアクションを求める第2のセクション65
0中のインストラクションのセットを含む。
FIG. 6 illustrates the decomposition of instruction semantics using scoped sub-instructions (actions) for the exemplary arm shifter operation described above. As shown in FIG. 6, the code includes a set of sub-instructions (actions) in a first section 610, and a section 610.
Second section 65 seeking an action defined in
Contains a set of instructions in 0.

【0079】[0079]

【発明の効果】以上説明したように、本発明によれば、
広範囲のアーキテクチャに対するシミュレータを提供
し、かつこれらのシミュレータを詳細な統計、プロファ
イリング、および/またはタイミング情報を提供するよ
うに構成することを容易にするインストラクションレベ
ルシミュレータを生成するための方法および装置を提供
することができる。
As described above, according to the present invention,
Methods and apparatus for generating instruction-level simulators that provide simulators for a wide range of architectures and that facilitate configuring these simulators to provide detailed statistics, profiling, and / or timing information can do.

【0080】特許請求の範囲の発明の要件の後に括弧で
記載した番号がある場合は本発明の一実施例の態様関係
を示すものであり、本発明の範囲を限定するものと解釈
してはならない。
The number in parentheses after the requirement of the invention in the claims indicates the relationship of the embodiments of the present invention, and should not be construed as limiting the scope of the present invention. No.

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

【図1】本発明による例示的なインストラクションレベ
ルシミュレータ生成ツールを示す概念的ブロック図。
FIG. 1 is a conceptual block diagram illustrating an exemplary instruction level simulator generation tool according to the present invention.

【図2】本発明によるインストラクションを表すために
使用される様々なデータ構造を示す図。
FIG. 2 illustrates various data structures used to represent instructions according to the present invention.

【図3】本発明のフィーチャーを含むメインシミュレー
ションループを示す図。
FIG. 3 is a diagram showing a main simulation loop including a feature of the present invention.

【図4】マシンディスクリプションに対する例示的な構
造を示す図。
FIG. 4 illustrates an exemplary structure for a machine description.

【図5】図1のシミュレータ生成ツールにより使用され
る例示的なインストラクションディスクリプションを示
す図。
FIG. 5 illustrates an exemplary instruction description used by the simulator generation tool of FIG.

【図6】例示的な動作に対するスコープドサブインスト
ラクション(アクション)を使用する本発明によるイン
ストラクションセマンティックの分解を示す図。
FIG. 6 illustrates the decomposition of instruction semantics according to the present invention using scoped sub-instructions (actions) for exemplary operations.

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

100 シミュレータ生成ツール 120 プロセッサ 130 データ記憶デバイス 140 通信ポート 150 シミュレータ生成プロセス 180 インストラクションレベルアーキテクチャシミ
ュレータ 185 シミュレーションメカニズム 210 インストラクションストア 220 TID 230 セマンティックファンクション 300 メインシミュレーションループ 400 マシンディスクリプション 500 インストラクションディスクリプション 610 第1のセクション 650 第2のセクション
REFERENCE SIGNS LIST 100 simulator generation tool 120 processor 130 data storage device 140 communication port 150 simulator generation process 180 instruction level architecture simulator 185 simulation mechanism 210 instruction store 220 TID 230 semantic function 300 main simulation loop 400 machine description 500 instruction description 610 first section 650 second section

───────────────────────────────────────────────────── フロントページの続き (71)出願人 596077259 600 Mountain Avenue, Murray Hill, New Je rsey 07974−0636U.S.A. (72)発明者 トール イー ジェレミアッセン アメリカ合衆国、08873 ニュージャージ ー州、サマーセット、オスウェストリー ウェイ 81 Fターム(参考) 5B042 HH07 HH38 5B048 DD14  ──────────────────────────────────────────────────続 き Continuation of the front page (71) Applicant 596077259 600 Mountain Avenue, Murray Hill, New Jersey 07974-0636 U.S.A. S. A. (72) Inventor Tall E Jeremiassen 81F, Oswestley Way, Somerset, 08873 New Jersey United States of America 81F Term (reference) 5B042 HH07 HH38 5B048 DD14

Claims (17)

【特許請求の範囲】[Claims] 【請求項1】 インストラクションレベルアーキテクチ
ャに対するターゲットインストラクションの実行をシミ
ュレートするシミュレータを生成するための方法におい
て、 前記インストラクションレベルアーキテクチャのディス
クリプションを受け取るステップと、 前記ターゲットインストラクションの前記シミュレーシ
ョンの前または後に実行するために、補足的シミュレー
ションコードを受け取るステップと、 前記ディスクリプションから前記シミュレータを生成す
るステップとを有し、前記シミュレータは、前記ターゲ
ットインストラクションの前記シミュレーションの前ま
たは後に、前記補足的シミュレーションコードを実行す
ることを特徴とする方法。
1. A method for generating a simulator that simulates execution of a target instruction for an instruction level architecture, comprising: receiving a description of the instruction level architecture; and executing before or after the simulation of the target instruction. Receiving the supplemental simulation code; and generating the simulator from the description, the simulator executing the supplemental simulation code before or after the simulation of the target instruction. A method comprising:
【請求項2】 前記補足的シミュレーションコードは、
前記シミュレータの実行を修正することを特徴とする請
求項1記載の方法。
2. The supplemental simulation code comprises:
The method of claim 1, wherein modifying execution of the simulator.
【請求項3】 前記補足的シミュレーションコードは、
前記シミュレータの実行を補足することを特徴とする請
求項1記載の方法。
3. The supplemental simulation code comprises:
The method of claim 1, supplementing execution of the simulator.
【請求項4】 前記補足的シミュレーションコードは、
前記シミュレータの実行を制御することを特徴とする請
求項1記載の方法。
4. The supplemental simulation code comprises:
The method of claim 1, wherein controlling execution of the simulator.
【請求項5】 前記補足的シミュレーションコードは、
制御のフローに対するシミュレーション中の正しい(cor
rect)ポイントが変更されるまで、ブランチのターゲッ
トアドレスをバッファするために、ディレイラインをシ
ミュレートすることを特徴とする請求項1記載の方法。
5. The supplemental simulation code comprises:
The correct (cor
2. The method of claim 1 wherein the delay line is simulated to buffer the branch target address until the point is changed.
【請求項6】 前記補足的シミュレーションコードは、
並列処理を可能にするアーキテクチャに対するシミュレ
ートされるサイクルの終わりにおいて、レジスタファイ
ルに対する結果のシミュレートされる結果のライトバッ
クを制御することを特徴とする請求項1記載の方法。
6. The supplemental simulation code comprises:
The method of claim 1, wherein at the end of a simulated cycle for an architecture that allows for parallel processing, controlling a simulated result write-back of the result to a register file.
【請求項7】 前記補足的シミュレーションコードは、
シミュレーション統計を集めるために、コードを挿入す
ることを特徴とする請求項1記載の方法。
7. The supplemental simulation code comprises:
The method of claim 1, wherein code is inserted to collect simulation statistics.
【請求項8】 前記補足的シミュレーションコードは、
プロファイリング情報を集めるために、コードを挿入す
ることを特徴とする請求項1記載の方法。
8. The supplemental simulation code comprises:
The method of claim 1, wherein code is inserted to collect profiling information.
【請求項9】 インストラクションレベルアーキテクチ
ャに対するターゲットインストラクションの実行をシミ
ュレートするシミュレータを生成するための方法におい
て、 前記インストラクションレベルアーキテクチャのユーザ
提供されるディスクリプションに対するディスクリプシ
ョンテンプレートを提供するステップと、 前記ターゲットインストラクションのセマンティックを
記述するためのファンクションを提供するステップと、 前記ディスクリプションから前記シミュレータを生成す
るステップと、を有し、 前記ディスクリプションテンプレートは、前記ターゲッ
トインストラクションの前記シミュレーションの前また
は後に実行するために、コードを含むための補足的シミ
ュレーションコードセクションを含み、前記シミュレー
タは、前記ターゲットインストラクションの前記シミュ
レーションの前または後に前記補足的シミュレーション
コードを実行することを特徴とする方法。
9. A method for generating a simulator that simulates execution of a target instruction for an instruction level architecture, comprising: providing a description template for a user provided description of the instruction level architecture; Providing a function for describing the semantics of: and generating the simulator from the description, wherein the description template is to be executed before or after the simulation of the target instruction. Including a supplemental simulation code section for including the code, To a method and executes the supplementary simulation code before or after the simulation of the target instruction.
【請求項10】 前記補足的シミュレーションコード
は、制御のフローに対するシミュレーション中の正しい
ポイントが変更されるまで、ブランチのターゲットアド
レスをバッファするために、ディレイラインをシミュレ
ートすることを特徴とする請求項9記載の方法。
10. The supplemental simulation code simulates a delay line to buffer a branch target address until a correct point in the simulation for the flow of control is changed. 9. The method according to 9.
【請求項11】 前記補足的シミュレーションコード
は、並列処理を可能にするアーキテクチャに対するシミ
ュレートされるサイクルの終わりにおいて、レジスタフ
ァイルへのシミュレートされる結果のライトバックを制
御することを特徴とする請求項9記載の方法。
11. The supplemental simulation code controls write back of simulated results to a register file at the end of a simulated cycle for an architecture that allows for parallel processing. Item 10. The method according to Item 9.
【請求項12】 前記補足的シミュレーションコード
は、シミュレーション統計を集めるためにコードを挿入
することを特徴とする請求項9記載の方法。
12. The method of claim 9, wherein the supplemental simulation code inserts code to collect simulation statistics.
【請求項13】 前記補足的シミュレーションコード
は、プロファイリング情報を集めるために、コードを挿
入することを特徴とする請求項9記載の方法。
13. The method of claim 9, wherein the supplemental simulation code inserts code to gather profiling information.
【請求項14】 インストラクションレベルアーキテク
チャに対するターゲットインストラクションの実行をシ
ミュレートするシミュレータを生成するためのシステム
において、 コンピュータで読み出し可能なコードを記憶するメモリ
と、 前記メモリに動作可能に結合されて、前記コンピュータ
で読み出し可能なコードを実行するように構成されたプ
ロセッサとを有し、前記コンピュータで読み出し可能な
コードは、 前記インストラクションレベルアーキテクチャのディス
クリプションを受け取り、 前記ターゲットインストラクションの前記シミュレーシ
ョンの前または後に実行するために、補足的シミュレー
ションコードを受け取り、 前記ディスクリプションから前記シミュレータを生成す
るように構成されており、前記シミュレータは、前記タ
ーゲットインストラクションの前記シミュレーションの
前または後に、前記補足的シミュレーションコードを実
行することを特徴とするシステム。
14. A system for generating a simulator that simulates execution of a target instruction for an instruction level architecture, comprising: a memory storing computer readable code; and operably coupled to the memory, the computer comprising: A processor configured to execute code readable by the computer, wherein the computer readable code receives a description of the instruction level architecture and executes before or after the simulation of the target instruction. Receiving the supplemental simulation code and generating the simulator from the description, the simulator comprising: System characterized in that before or after the simulation of said target instruction, executes the supplementary simulation code.
【請求項15】 インストラクションレベルアーキテク
チャに対するターゲットインストラクションの実行をシ
ミュレートするシミュレータを生成するためのシステム
において、 コンピュータの読み出し可能なコードを記憶するメモリ
と、 前記メモリに動作可能に結合されて、前記コンピュータ
読み出し可能なコードを実行するように構成されたプロ
セッサとを有し、前記コンピュータで読み出し可能なコ
ードは、 前記インストラクションレベルアーキテクチャのユーザ
提供されたディスクリプションに対するディスクリプシ
ョンテンプレートを提供し、前記ターゲットインストラ
クションのセマンティックを記述するためのファンクシ
ョンを提供し、 前記ディスクリプションから前記シミュレータを生成す
るように構成されており、前記ディスクリプションテン
プレートは、前記ターゲットインストラクションの前記
シミュレーションの前または後に実行するためのコード
を含むための補足的シミュレーションコードセクション
を含み、 前記シミュレータは、前記ターゲットインストラクショ
ンの前記シミュレーションの前または後に、前記補足的
シミュレーションコードを実行することを特徴とするシ
ステム。
15. A system for generating a simulator that simulates execution of a target instruction for an instruction level architecture, comprising: a memory storing computer readable code; and operably coupled to the memory, the computer comprising: A processor configured to execute the readable code, wherein the computer readable code provides a description template for a user-provided description of the instruction level architecture; Providing a function for describing semantics, configured to generate the simulator from the description, The description template includes a supplemental simulation code section for including code to execute before or after the simulation of the target instruction, wherein the simulator includes the supplemental code before or after the simulation of the target instruction. A system for executing simulation code.
【請求項16】 インストラクションレベルアーキテク
チャに対するターゲットインストラクションの実行をシ
ミュレートするシミュレータを生成するための製品にお
いて、 その上に具現化されたコンピュータ読み出し可能なコー
ド手段を有するコンピュータ読み出し可能媒体を有し、
前記コンピュータ読み出し可能プログラムコード手段、 前記インストラクションレベルアーキテクチャのディス
クリプションを受け取るためのステップと、 前記ターゲットインストラクションの前記シミュレーシ
ョンの前または後に実行するために、補足的シミュレー
ションコードを受け取るためのステップと、 前記ディスクリプションから前記シミュレータを生成す
るためのステップとを含み、前記シミュレータは、前記
ターゲットインストラクションの前記シミュレーション
の前または後に、前記補足的シミュレーションコードを
実行することを特徴とする製品。
16. A product for generating a simulator that simulates execution of a target instruction for an instruction level architecture, comprising a computer readable medium having computer readable code means embodied thereon.
The computer readable program code means; receiving a description of the instruction level architecture; receiving supplemental simulation code to execute before or after the simulation of the target instruction; and Generating the simulator from a description, the simulator executing the supplemental simulation code before or after the simulation of the target instruction.
【請求項17】 インストラクションレベルアーキテク
チャに対するターゲットインストラクションの実行をシ
ミュレートするシミュレータを生成するための製品にお
いて、 その上に具現化されたコンピュータで読み出し可能なコ
ード手段を有するコンピュータ読み出し可能媒体を有
し、前記コンピュータ読み出し可能プログラムコード手
段は、 前記インストラクションレベルアーキテクチャのユーザ
提供されたディスクリプションに対するディスクリプシ
ョンテンプレートを提供するためのステップと、 前記ターゲットインストラクションのセマンティックス
を記述するためのファンクションを提供するためのステ
ップと、 前記ディスクリプションから前記シミュレータを生成す
るためのステップとを含み、 前記ディスクリプションテンプレートは、前記ターゲッ
トインストラクションの前記シミュレーションの前また
は後に実行するために、コードを含むための補足的シミ
ュレーションコードセクションを含み、 前記シミュレータは、前記ターゲットインストラクショ
ンの前記シミュレーションの前または後に、前記補足的
シミュレーションコードを実行することを特徴とする製
品。
17. A product for generating a simulator that simulates execution of a target instruction for an instruction level architecture, comprising: a computer readable medium having computer readable code means embodied thereon. The computer readable program code means comprising: providing a description template for a user-provided description of the instruction level architecture; and providing a function for describing semantics of the target instruction. Generating the simulator from the description. The rate includes a supplemental simulation code section for including code to execute before or after the simulation of the target instruction, wherein the simulator performs the supplemental simulation before or after the simulation of the target instruction. A product characterized by executing code.
JP2001131569A 2000-05-18 2001-04-27 Method and system for generating simulator Pending JP2002007142A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US57383200A 2000-05-18 2000-05-18
US09/573832 2000-05-18

Publications (1)

Publication Number Publication Date
JP2002007142A true JP2002007142A (en) 2002-01-11

Family

ID=24293565

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001131569A Pending JP2002007142A (en) 2000-05-18 2001-04-27 Method and system for generating simulator

Country Status (1)

Country Link
JP (1) JP2002007142A (en)

Similar Documents

Publication Publication Date Title
KR100589744B1 (en) Automated processor generation system for designing a configurable processor and method for the same
Marwedel et al. Code generation for embedded processors
US10360327B2 (en) Modifying a virtual processor model for hardware/software simulation
US7313773B1 (en) Method and device for simulator generation based on semantic to behavioral translation
Zhu et al. A retargetable, ultra-fast instruction set simulator
Leupers et al. Generation of interpretive and compiled instruction set simulators
JPH04322329A (en) System and method for information processing copying with many machine types
Qin et al. A formal concurrency model based architecture description language for synthesis of software development tools
Zhu et al. An ultra-fast instruction set simulator
US9280326B1 (en) Compiler retargeting based on instruction semantic models
CN107729118A (en) Towards the method for the modification Java Virtual Machine of many-core processor
Ratsiambahotra et al. A versatile generator of instruction set simulators and disassemblers
Bezzubikov et al. Automatic dynamic binary translator generation from instruction set description
US8677312B1 (en) Generation of compiler description from architecture description
Jeremiassen Sleipnir. An instruction-level simulator generator
Chung et al. Improvement of compiled instruction set simulator by increasing flexibility and reducing compile time
Mong et al. A retargetable micro-architecture simulator
JP2002007142A (en) Method and system for generating simulator
Onder An introduction to Flexible Architecture Simulation Tool (FAST) and Architecture Description Language ADL
Van Praet et al. nML: A structural processor modeling language for retargetable compilation and ASIP design
Schützenhöfer Cycle-Accurate simulator generator for the VADL processor description language
US20040045018A1 (en) Using address space bridge in postoptimizer to route indirect calls at runtime
Graf Compiler backend generation using the VADL processor description language
Vishnoi Functional Simulation Using Sim-nML
Meyerowitz et al. A visual language for describing instruction sets and generating decoders