JP2001290857A - Timing simulator - Google Patents

Timing simulator

Info

Publication number
JP2001290857A
JP2001290857A JP2000104651A JP2000104651A JP2001290857A JP 2001290857 A JP2001290857 A JP 2001290857A JP 2000104651 A JP2000104651 A JP 2000104651A JP 2000104651 A JP2000104651 A JP 2000104651A JP 2001290857 A JP2001290857 A JP 2001290857A
Authority
JP
Japan
Prior art keywords
instruction
simulator
timing
execution
pipeline
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
JP2000104651A
Other languages
Japanese (ja)
Inventor
Yasuhiko Hamada
保彦 濱田
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 JP2000104651A priority Critical patent/JP2001290857A/en
Publication of JP2001290857A publication Critical patent/JP2001290857A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve the problem that a user is unable to know the contents of changes in the number of execution machine cycles of each instruction with combinations of instructions when a software simulator which debugs a program (executable program) for microcomputer control simulates the state of the pipeline of the microcomputer. SOLUTION: Design data (timing data by instructions) of the microcomputer are held in the form of a timing table of the simulator and the state of the pipeline is actualized by software by referring the timing table of a corresponding instruction each time the instruction is executed to calculate an accurate execution machine cycle; and a timing data storage part is provided and its contents as execution histories by the instructions can be viewed by the user as a function of the simulator.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、汎用コンピュータ
(パソコン、EWS)上でパイプライン構造を持つ計算
機(コンピュータ)の実行サイクル毎の状態をシミュレ
ートするパイプライン計算機のシミュレータに係わり、
特に汎用コンピュータ上でターゲットとなるコンピュー
タにおいて、1命令毎の実行におけるパイプラインの状
態を命令毎のタイミングテーブルを参照しハードウェア
と同等の動作を行うタイミングシミュレーション手法お
よび、その装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a simulator of a pipeline computer for simulating the state of a computer (computer) having a pipeline structure in each execution cycle on a general-purpose computer (personal computer, EWS).
In particular, the present invention relates to a timing simulation method and an apparatus for performing, on a target computer on a general-purpose computer, a pipeline state in execution of each instruction by referring to a timing table for each instruction and performing an operation equivalent to hardware.

【0002】[0002]

【従来の技術】図3は、従来のマイクロコンピュータ制
御用プログラム(実行形式プログラム)を解析する際の
一般的な方法例である。同図において、ステップ301
でマイクロコンピュータ制御用プログラムを作成する。
その後ステップ302においていてステップ301で作
成したプログラムをコンパイルし実行形式プログラムを
作成する。ステップ303でインサーキットエミュレー
タ(ICE)とデバッガ(以下総称してデバッガとい
う)を用い、ステップ304で実行形式プログラムをデ
バッガにロードする。その後、任意の関数(あるいは、
指定するアドレスから指定するアドレスまで)の実行時
間および実行サイクル数を調べるには、308に示すデ
バッガのトレース機能で命令毎の実行履歴を見るしかな
かった。このトレース機能は一般的な機能として通常パ
イプライン制御後の状態を示すサイクルベースのトレー
スであるため、命令の組み合わせによって発生した命令
実行サイクル(実行時間)の変化をデバッグするユーザ
は知る手段がない。しかし、ICEによっては実行サイ
クルと実行時間を同じトレース機能で実現するものもあ
るが、その場合トレースのための専用メモリを必要とす
るためにICEのコストが高くなるというデメリットが
ある。
2. Description of the Related Art FIG. 3 shows an example of a general method for analyzing a conventional microcomputer control program (executable program). Referring to FIG.
To create a microcomputer control program.
Thereafter, in step 302, the program created in step 301 is compiled to create an executable program. In step 303, an in-circuit emulator (ICE) and a debugger (hereinafter collectively referred to as a debugger) are used, and in step 304, an executable program is loaded into the debugger. Then, any function (or
The only way to check the execution time and the number of execution cycles from the designated address to the designated address) was to look at the execution history of each instruction with the trace function of the debugger shown at 308. Since this trace function is a general function that is a cycle-based trace that usually indicates a state after pipeline control, there is no way for a user who debugs a change in an instruction execution cycle (execution time) caused by a combination of instructions to know. . However, some ICEs realize the execution cycle and the execution time with the same trace function. In this case, however, there is a demerit that the cost of the ICE increases because a dedicated memory for tracing is required.

【0003】また、ソフトウェアシミュレータにおいて
もデバッグ対象となるハードウェア(マイクロコンピュ
ータ)のパイプラインを制御するシミュレータは存在す
るが、シミュレーション速度が遅いという課題がある。
[0003] In software simulators, there are simulators for controlling the pipeline of hardware (microcomputer) to be debugged, but there is a problem that the simulation speed is slow.

【0004】[0004]

【発明が解決しようとする課題】このように従来からの
シミュレータでは、パイプラインの状態をシミュレーシ
ョンして、実行サイクルがパイプランの状態の変化によ
り増加するところまでシミュレーションは可能である
が、シミュレータの機能としてパイプラインの状態をプ
ログラムをデバッグするユーザが、なぜ現在実行した命
令のサイクル数が変化したのかということがわからない
という問題があった。
As described above, in the conventional simulator, it is possible to simulate the state of the pipeline and simulate the execution cycle until the execution cycle increases due to the change in the state of the pipeline. As a result, there is a problem that a user who debugs a program in the state of the pipeline does not know why the number of cycles of the currently executed instruction has changed.

【0005】本発明はこのような問題を解決するための
もので、デバッグ対象となるターゲット(マイクロコン
ピュータ)のハードウェアの設計データをそのまま使用
することでハードウェアの動作と全く同じ動作をするシ
ミュレータを提供することを目的とする。
The present invention is intended to solve such a problem, and a simulator which operates exactly the same as the operation of hardware by directly using hardware design data of a target (microcomputer) to be debugged. The purpose is to provide.

【0006】また、パイプラインの情報をシミュレータ
本体に組み込むのではなく命令シミュレータとCPU別
に分離しテーブル化することで、タイミングシミュレー
タそのものを汎用構造としテーブルを差し替えるだけで
短期間でタイミングシミュレータの開発ができることを
目的とする。
[0006] Further, by separating the information of the pipeline into the instruction simulator and the CPU instead of incorporating it into the simulator main body and forming a table, the timing simulator itself is made into a general-purpose structure, and the timing simulator can be developed in a short time only by replacing the table. The purpose is to be able to do it.

【0007】[0007]

【課題を解決するための手段】本発明のタイミングシミ
ュレータの実現方法は上記した目的を達成するために、
コンピュータ上で該コンピュータとは異なるアーキテク
チャを持つマイクロコンピュータ制御用プログラムと、
解析対象となるマイクロコンピュータの全命令テーブル
と命令毎のタイミングテーブルを読み込み、プログラム
を1命令毎に実行する際には命令用メモリに格納されて
いる命令解析を行い命令テーブルより命令を確定し、そ
の命令のパイプライン情報をタイミングテーブルを参照
し前命令情報と自命令の情報の組み合わせにより出力結
果をタイミングテーブルより得てパイプラインを考慮し
た実行マシンサイクルを算出する。
According to the present invention, there is provided a method for realizing a timing simulator, comprising:
A microcomputer control program having a different architecture from the computer,
Reads all the instruction tables of the microcomputer to be analyzed and the timing table for each instruction, analyzes the instructions stored in the instruction memory when executing the program for each instruction, determines the instruction from the instruction table, The pipeline information of the instruction is referred to the timing table, the output result is obtained from the timing table by a combination of the previous instruction information and the information of the own instruction, and the execution machine cycle considering the pipeline is calculated.

【0008】また、タイミングシミュレータの内部構造
を解析対象となるマイクロコンピュータの種類に関わら
ず共通に出来る命令解析部と、シミュレータのコマンド
を受けて該コマンドに応じた処理を行うコマンド処理部
と、マイクロコンピュータ毎の全命令テーブルと該マイ
クロコンピュータの全命令毎のタイミングテーブルと該
マイクロコンピュータのパイプライン構造を格納した品
種依存部とに分け、パイプラインシミュレーションの対
象となるマイクロコンピュータの変更に応じて、品種依
存部を置き換えることで、全てのマイクロコンピュータ
用のシミュレーションを実現可能とするタイミングシミ
ュレータ。
[0008] Further, an instruction analysis unit capable of sharing the internal structure of the timing simulator irrespective of the type of microcomputer to be analyzed, a command processing unit that receives a command from the simulator and performs processing in accordance with the command; All instruction tables for each computer, a timing table for every instruction of the microcomputer, and a product type dependent section storing the pipeline structure of the microcomputer are divided into different sections. A timing simulator that can realize simulations for all microcomputers by replacing the model dependent part.

【0009】[0009]

【発明の実施の形態】図1は、本発明の実施の形態によ
るタイミングシミュレータの内部構成を示す図である。
FIG. 1 is a diagram showing an internal configuration of a timing simulator according to an embodiment of the present invention.

【0010】図1に示すタイミングシミュレータは、キ
ーボードまたはマウスによる入力および、CRTまたは
ファイルまたはプリンタに出力する制御を行うユーザイ
ンタフェース部107と、ユーザインタフェース部10
7より入力されたコマンドに応じた処理を実行するコマ
ンド処理部106と、解析対象実行形式プログラムを格
納するデバッグ対象ソフトウェアの命令をシミュレーシ
ョンする命令シミュレータ101と、対象デバイスの命
令毎のタイミングテーブルを示した命令タイミングテー
ブル102と、デバッグ対象のデバイスのパイプライン
構造を示したパイプライン構造部103と、命令タイミ
ングテーブル102とパイプライン構造部103をブロ
ック化したタイミングシミュレータエンジン部104
と、1命令毎の実行後のパイプラインの状態を格納する
タイミングデータ格納部105とに分けて構成される。
The timing simulator shown in FIG. 1 includes a user interface unit 107 for performing input by a keyboard or a mouse and controlling output to a CRT, a file, or a printer, and a user interface unit 10.
7 shows a command processing unit 106 for executing a process according to a command input from 7, an instruction simulator 101 for simulating an instruction of debug target software for storing an analysis target executable program, and a timing table for each instruction of the target device. Instruction timing table 102, a pipeline structure unit 103 showing a pipeline structure of a device to be debugged, and a timing simulator engine unit 104 which blocks the instruction timing table 102 and the pipeline structure unit 103.
And a timing data storage unit 105 for storing the state of the pipeline after execution of each instruction.

【0011】構成部104(102と103を含む)は
各種マイクロコンピュータ毎にファイル化することで、
新規にシミュレーション対象となるマイクロコンピュー
タが増えても、タイミングシミュレータエンジン部10
4を追加することで汎用性を図る。
The constituent unit 104 (including 102 and 103) makes a file for each of various microcomputers,
Even if the number of microcomputers to be newly simulated increases, the timing simulator engine unit 10
4 is added to improve versatility.

【0012】各構成部106(104と105含む)以
外は、デバッグ対象となるプログラムが変更されても、
内部構造(機能、形式)を変更することなくシミュレー
タとしての機能を実現可能としている。
[0012] Except for the components 106 (including 104 and 105), even if the program to be debugged is changed,
Simulator functions can be realized without changing the internal structure (function, format).

【0013】図2は、本発明の実施の形態によるパイプ
ラインシミュレータの命令実行時のフローチャートであ
る。
FIG. 2 is a flowchart at the time of instruction execution of the pipeline simulator according to the embodiment of the present invention.

【0014】同図において、まずステップ201では自
命令のコードテーブルを検索し、ステップ202では前
命令からのアドレスレジスタの状況をチェックする。ス
テップ203では自命令のオペランドアクセスをチェッ
クしブランチ命令かどうかまたはブランチ命令の場合は
次命令のフェッチアドレスの空間判定を行う。次にステ
ップ204でステップ203までの情報をタイミングテ
ーブル検索時に照会しながら実際の出力結果を得る。さ
らに、ステップ205で空間によるメモリウェイトを算
出する。次に割り込み要求があるかどうかをステップ2
06で判定し要求があれば割り込み受け付け処理207
に移行する。割り込み要求が無ければステップ207を
スキップする。次にステップ209でステップ205で
算出したメモリウェイト数を考慮した自命令の実行サイ
クル数をステップ204のタイミングテーブルより導い
たサイクル数に加算して実行サイクル数を取得する。そ
して、自命令の次の命令の実行アドレスのプリフェッチ
アドレスを計算して終了する。ステップ201からステ
ップ209までを繰り返して処理することによりハード
ウェアと同等のパイプラインシミュレーションを実現す
る。
In FIG. 1, first, at step 201, the code table of the own instruction is searched, and at step 202, the status of the address register from the previous instruction is checked. In step 203, operand access of the instruction is checked to determine whether it is a branch instruction or, in the case of a branch instruction, the fetch address of the next instruction. Next, in step 204, an actual output result is obtained while querying the information up to step 203 when searching the timing table. Further, at step 205, a memory weight by space is calculated. Next, check if there is an interrupt request in step 2
If it is determined in step 06 and there is a request, an interrupt acceptance process 207
Move to If there is no interrupt request, step 207 is skipped. Next, in step 209, the number of execution cycles of the own instruction in consideration of the number of memory waits calculated in step 205 is added to the number of cycles derived from the timing table in step 204 to obtain the number of execution cycles. Then, the prefetch address of the execution address of the instruction following the own instruction is calculated, and the processing ends. By repeating the processing from step 201 to step 209, a pipeline simulation equivalent to hardware is realized.

【0015】図4は、デバッグ対象となるマイクロコン
ピュータの1命令毎のコードテーブル例である。図4中
の項目の意味はそれぞれ、「UARN」は入力パラメー
タの命令(自命令)が、レジスタ干渉(前命令で使用し
たレジスタと同じレジスタを使用するか)を起こす可能
性のあるアドレスレジスタの番号を示し、“−1”の場
合はアドレスレジスタを使用しないことを示す。この情
報はステップ202のレジスタ干渉のチェックに用い
る。「MARN」は入力パラメータの命令が変更するア
ドレスレジスタの番号を示す。“−1”の場合はアドレ
スレジスタを変更しないことを示す。「OWT」はスト
ア命令であることを示す。I/O領域への書き込みを判
定するために用いる。“2”がリードモディファイライ
ト、“1”がライト、“0”がリード、“−1”がメモ
リへのアクセスが無いことを示す。「OASZ」はロー
ド/ストアを伴うデータ転送命令がアクセスするデータ
のサイズを示す。“0”が転送命令でない、“1”がバ
イト転送、“2”がワード転送命令であることを示す。
FIG. 4 is an example of a code table for each instruction of the microcomputer to be debugged. The meanings of the items in FIG. 4 are “UARN” and “UARN”, respectively, for the address register in which the input parameter instruction (own instruction) may cause register interference (whether the same register used in the previous instruction is used). Indicates a number, and "-1" indicates that the address register is not used. This information is used to check for register interference in step 202. "MARN" indicates the number of the address register changed by the instruction of the input parameter. "-1" indicates that the address register is not changed. “OWT” indicates a store instruction. Used to determine writing to the I / O area. “2” indicates a read modify write, “1” indicates a write, “0” indicates a read, and “−1” indicates that there is no access to the memory. “OASZ” indicates the size of data accessed by a data transfer instruction involving load / store. “0” indicates a transfer instruction, “1” indicates a byte transfer, and “2” indicates a word transfer instruction.

【0016】図5は、デバッグ対象となるマイクロコン
ピュータの1命令毎のタイミングテーブル例である。図
5中の項目の意味はそれぞれ、in側(入力パラメータ)
「FDA」が対象となる命令が最初の解読ステージにあ
る時、その実行ステージで直前命令のロードまたはスト
アが実行されていることを示す。「FARM」は、対象
となる命令が最初の実行ステージで直前命令がアドレス
レジスタを書き換えたことを示す。「IFI」は、対象
とする命令が解読ステージにある時、内蔵ROMから命
令フェッチすることを示す。「FDAI」は、FDA=
1(対象とする命令が最初の解読ステージにある時、そ
の実行ステージで直前命令のロードまたはストアが実行
されている)の時、直前命令が内蔵ROMからロードす
ることを示す。「OFSI」は、対象とする命令がロー
ドまたはストア命令で、内蔵ROMからロードすること
を示す。「IBCP」は、対象とする命令が最初の解読
ステージにある時、命令バッファに先読みされた命令の
量を示す(命令バッファにある命令の数)。「TKN」
は、対象とする命令が条件分岐命令であり、条件が成立
したことを示す。「BTO」は、対象とする命令が分岐
し、分岐先のアドレスが奇数であることを示す。out側
(出力パラメータ)「FDA」は、対象とする命令の最
終実行ステージ(次命令の最初の解読ステージ)でロード
またはストアを実行することを示す。「FARM」は、
対象とする命令の最終実行ステージ(次命令の最初の解
読ステージ)でアドレスレジスタを書きかえることを示
す。「INTR」は、割り込みにより実行をアボートで
きる最も遅い時点を示す。例えば、INTR=1の時、
対象とする命令の解読ステージまたは、その次のステー
ジでアボート割り込みのシーケンスが開始できることに
なる。「INTC」は、対象とする命令の実行が完了し
た後、受け付けることが出来る完了割り込みの最も早い
時点を示す。例えば、INTC=2の時、対象とする命
令の最初の解読ステージの2サイクル後から、完了割り
込みのシーケンスが開始できることを示す。「OFS
F」は、対象とする命令のオペランドフェッチまたは、
ストアのアクセス位置を示す。OFSP=1の時、対象
となる命令の最初の解読ステージの次のサイクル(対象
命令の実行ステージ)でオペランドをアクセスする。
「OFS」は、対象とする命令のオペランドフェッチま
たはストアの回数を示す。「IBCP」は、対象とする
命令の実行が終了した時点の命令バッファに先読みされ
た命令の量を示す。この数値が次命令の入力パラメータ
(IBCP)になる。「IF」は、対象とする命令の実
行中に命令フェッチする回数を示す。“+1”は、分岐
先のフェッチを示す。「CYCLE」は、対象とする命
令の実行サイクル数を示す。
FIG. 5 is an example of a timing table for each instruction of the microcomputer to be debugged. The meaning of each item in FIG. 5 is the in side (input parameter)
When the target instruction is in the first decryption stage, "FDA" indicates that the immediately preceding instruction is being loaded or stored in the execution stage. "FARM" indicates that the target instruction is the first execution stage and the immediately preceding instruction has rewritten the address register. "IFI" indicates that when the target instruction is in the decoding stage, the instruction is fetched from the internal ROM. “FDAI” is FDA =
When 1 (when the target instruction is in the first decoding stage, the loading or storing of the immediately preceding instruction is executed in the execution stage), it indicates that the immediately preceding instruction is loaded from the built-in ROM. “OFSI” indicates that the target instruction is a load or store instruction and is loaded from the built-in ROM. "IBCP" indicates the amount of instructions prefetched into the instruction buffer when the instruction in question is in the first decoding stage (the number of instructions in the instruction buffer). "TKN"
Indicates that the target instruction is a conditional branch instruction and the condition is satisfied. “BTO” indicates that the target instruction branches and the branch destination address is an odd number. The out side (output parameter) "FDA" indicates that the load or store is executed in the final execution stage (first decoding stage of the next instruction) of the target instruction. "FARM"
Indicates that the address register is rewritten in the final execution stage of the target instruction (the first decoding stage of the next instruction). “INTR” indicates the latest point in time at which execution can be aborted by an interrupt. For example, when INTR = 1,
The abort interrupt sequence can be started at the decoding stage of the target instruction or at the next stage. “INTC” indicates the earliest point of completion interrupt that can be accepted after the execution of the target instruction is completed. For example, when INTC = 2, it indicates that the completion interrupt sequence can be started two cycles after the first decoding stage of the target instruction. "OFS
F "is the operand fetch of the target instruction or
Indicates the access location of the store. When OFSP = 1, the operand is accessed in the cycle next to the first decoding stage of the target instruction (execution stage of the target instruction).
“OFS” indicates the number of operand fetches or stores of a target instruction. “IBCP” indicates the amount of the instruction prefetched into the instruction buffer at the time when the execution of the target instruction is completed. This numerical value becomes the input parameter (IBCP) of the next command. “IF” indicates the number of instruction fetches during execution of a target instruction. “+1” indicates a branch destination fetch. “CYCLE” indicates the number of execution cycles of the target instruction.

【0017】図6は、図2で示した命令実行時のフロー
をさらにハードウェアのイメージ図にしたものである。
FIG. 6 is a hardware image diagram of the instruction execution flow shown in FIG.

【0018】600の命令シミュレータより命令コード
を取得し、601で命令テーブルマップより該当する命
令のUARN,MARN,OASZ,OWTの情報を得
る。次に、UARN,MARN,OASZ,OWT情報
606を608のI/Oデータハンドリングに渡す系
と、オペランドアドレスは611でアドレスの空間判定
に用いる系とに分れる。次に、602のタイミングテー
ブルを検索し、自命令のFDA,FARM,IBCPを
603に出力する。次に、603のFDA,FARM,
IBCPをそのまま604へ渡し、直前命令のパラメー
タとする。次に、604のFDA,FARM,IBC
P,FDAIを605で対象命令の入力パラメータとす
る。さらに605のTKNには606からの条件分岐結
果を、OFSIとIFIには611の空間判定結果を渡
して605で必要な対象命令の入力パラメータ値が入力
されたことになる。更に602のタイミングテーブルの
入力パラメータを603のタイミングテーブル検索結果
とし、CYCL情報を609のサイクル数計算部に渡し
正確なサイクル数を算出する。更に603のINTRと
INTC情報を610の割込み有無判定および次命令実
行開始時刻計算部へ渡し610で割込みが有る場合は6
00の命令シミュレータへ状態更新要求を出す。また、
603ではOFSPを608のI/Oデータハンドリン
グ部へ出力し、608での計算結果を600の命令シミ
ュレータに対しI/Oデータであるということ、さらに
はそのI/Oの更新要求を出す。以上のステップを繰り
返して1命令毎のパイプラインの動作を忠実に再現する
タイミングシミュレーションを実現する。
An instruction code is acquired from an instruction simulator 600, and UARN, MARN, OASZ, and OWT information of a corresponding instruction is obtained from an instruction table map at 601. Next, there are a system for passing the UARN, MARN, OASZ, and OWT information 606 to the I / O data handling 608, and a system for using the operand address 611 to determine the address space. Next, the timing table of 602 is searched, and the FDA, FARM, and IBCP of its own instruction are output to 603. Next, 603 FDA, FARM,
The IBCP is passed to 604 as it is, and is used as a parameter of the immediately preceding instruction. Next, 604 FDA, FARM, IBC
P and FDAI are set as input parameters of the target instruction at 605. Further, the result of the conditional branch from 606 is passed to TKN of 605, and the result of space determination of 611 is passed to OFSI and IFI, and the necessary input parameter value of the target instruction is inputted at 605. Further, the input parameters of the timing table 602 are used as the search results of the timing table 603, and the CYCL information is passed to the cycle number calculator 609 to calculate the correct cycle number. Further, the INTR and INTC information of 603 is passed to the interrupt presence / absence determination of 610 and the next instruction execution start time calculation unit.
A status update request is issued to the 00 instruction simulator. Also,
At 603, the OFSP is output to the I / O data handling unit 608, and the result of calculation at 608 is sent to the instruction simulator 600 as I / O data, and a request for updating the I / O is issued. By repeating the above steps, a timing simulation that faithfully reproduces the operation of the pipeline for each instruction is realized.

【0019】[0019]

【発明の効果】本発明の実施の形態によって、汎用コン
ピュータ(パソコン、EWS)上でパイプライン構造を
持つ計算機(コンピュータ)の実行サイクル毎の状態を
シミュレートするタイミングシミュレータにおいて、シ
ミュレーション対象となるマイクロコンピュータに依存
する部分をシミュレータ本体と分離してファイル化する
ことにより、シミュレータシステムの汎用化が図られ新
たに開発が要求される部分を減らすことができ、デバッ
グ対象となるマイクロコンピュータのハードウェア情報
のみを追加することでタイミングシミュレータの開発期
間が短縮される。
According to the embodiment of the present invention, in a timing simulator for simulating the state of each execution cycle of a computer (computer) having a pipeline structure on a general-purpose computer (personal computer, EWS), a micro-simulator to be simulated is used. Separate the computer-dependent part from the simulator body and create a file, so that the simulator system can be generalized and the parts that need to be newly developed can be reduced, and the hardware information of the microcomputer to be debugged can be reduced. The development period of the timing simulator is shortened by adding only the above.

【0020】また、タイミングシミュレータにおいてパ
イプラインの状態を命令実行毎あるいは、プログラム停
止後にパイプラインの状態遷移としてパイプライン情報
(タイミング情報)をトレース機能(実行履歴を表示で
きることにより、命令実行毎のパイプラインの状態をユ
ーザが観測することができる。
Further, in the timing simulator, the pipeline state (timing information) is displayed as a pipeline state transition every time an instruction is executed or as a pipeline state transition after a program is stopped. The user can observe the state of the line.

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

【図1】本発明の実施の形態によるタイミングシミュレ
ータの内部構成を示す図
FIG. 1 is a diagram showing an internal configuration of a timing simulator according to an embodiment of the present invention.

【図2】本発明の実施の形態によるタイミングシミュレ
ータの1命令実行時のタイミング検索フローチャート
FIG. 2 is a timing search flowchart at the time of executing one instruction of the timing simulator according to the embodiment of the present invention;

【図3】本発明の実施の形態によるマイクロコンピュー
タ制御用プログラムのデバッグ手法の従来技術の流れを
示した図
FIG. 3 is a diagram showing a flow of a conventional technique of a debugging method of a microcomputer control program according to the embodiment of the present invention;

【図4】本発明の実施の形態によるシミュレーション対
象となるマイクロコンピュータの命令毎のコードテーブ
ル例を示す図
FIG. 4 is a diagram showing an example of a code table for each instruction of a microcomputer to be simulated according to the embodiment of the present invention;

【図5】本発明の実施の形態によるシミュレーション対
象となるマイクロコンピュータの命令毎のタイミングテ
ーブルを示す図
FIG. 5 is a diagram showing a timing table for each instruction of a microcomputer to be simulated according to the embodiment of the present invention;

【図6】本発明の実施の形態によるタイミングシミュレ
ータ構成図
FIG. 6 is a configuration diagram of a timing simulator according to the embodiment of the present invention.

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

101 命令シミュレータ 102 命令タイミングテーブル 103 パイプライン構造部 104 タイミングシミュレータエンジン部 105 タイミングデータ格納部 106 コマンド処理部 107 ユーザインタフェース部 201 命令コードテーブル検索 202 アドレスレジスタ干渉チェック 203 空間判定 204 タイミングテーブル検索 205 メモリウェイト算出 206 割込みがあるかどうか 207 割込み受け付け処理 208 サイクル数加算 209 命令プリフェッチアドレス計算 101 Instruction Simulator 102 Instruction Timing Table 103 Pipeline Structure 104 Timing Simulator Engine 105 Timing Data Storage 106 Command Processing 107 User Interface 201 Instruction Code Table Search 202 Address Register Interference Check 203 Space Judgment 204 Timing Table Search 205 Memory Weight Calculation 206 Whether there is an interrupt 207 Interrupt acceptance processing 208 Cycle number addition 209 Instruction prefetch address calculation

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 パイプライン構造を持った計算機のハー
ドウェアの動作と同じ実行を行うシミュレータにおい
て、与えられた1命令の実行毎にハードウェアのパイプ
ラインの状態と全く同じ動作をソフトウェアで実現する
ことを特徴とするタイミングシミュレータ。
1. A simulator that executes the same operation as the operation of hardware of a computer having a pipeline structure, wherein the same operation as the state of the hardware pipeline is realized by software every time a given instruction is executed. A timing simulator, characterized in that:
【請求項2】 請求項1記載のタイミングシミュレータ
において、シミュレート対象とするターゲット計算機の
パイプライン構造定義部を備え、前記パイプライン構造
定義部をシミュレート対象となる計算機に応じて追加す
ることにより、汎用的なシミュレータ構造とすることを
特徴とするタイミングシミュレータ。
2. The timing simulator according to claim 1, further comprising a pipeline structure definition unit of a target computer to be simulated, wherein said pipeline structure definition unit is added according to the computer to be simulated. A timing simulator having a general-purpose simulator structure.
【請求項3】 請求項1記載のタイミングシミュレータ
において、1命令実行毎のパイプラインの状態を格納す
る実行状態格納部を備え,プログラムの実行開始から終
了までの状態を前記実行状態格納部に保存し、プログラ
ム実行時間が低下することを防ぐとともに、実行終了後
にパイプラインの状態の動作を前記実行状態格納部から
再現できることを特徴とするタイミングシミュレータ。
3. The timing simulator according to claim 1, further comprising: an execution state storage unit for storing a state of a pipeline for each execution of one instruction, wherein a state from the start to the end of execution of the program is stored in the execution state storage unit. A timing simulator that prevents a program execution time from being shortened and that can reproduce an operation of a pipeline state from the execution state storage unit after the execution is completed.
【請求項4】 請求項1記載のタイミングシミュレータ
において、シミュレーション精度(タイミング精度)と
シミュレーション時間のどちらを優先するかシミュレー
タの起動オプションで選択可能にすることを特徴とする
タイミングシミュレータ。
4. The timing simulator according to claim 1, wherein a priority is given to one of simulation accuracy (timing accuracy) and simulation time by an activation option of the simulator.
【請求項5】 請求項2記載のタイミングシミュレータ
において、パイプライン構造定義部で定義するパイプラ
イン情報を、ターゲットとなる計算機のハードウェアの
設計データ(Verilogデータ)を加工して、高級言語の
構造化データに変換し、更にそのデータをシミュレーシ
ョン速度向上のためにバイナリ化しそのバイナリデータ
をタイミングテーブルとして内部処理するシミュレーシ
ョン方法。
5. The high-level language structure according to claim 2, wherein the pipeline information defined by the pipeline structure definition unit is processed into target computer hardware design data (Verilog data). A simulation method of converting data into binary data for further improving the simulation speed and internally processing the binary data as a timing table.
JP2000104651A 2000-04-06 2000-04-06 Timing simulator Pending JP2001290857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000104651A JP2001290857A (en) 2000-04-06 2000-04-06 Timing simulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000104651A JP2001290857A (en) 2000-04-06 2000-04-06 Timing simulator

Publications (1)

Publication Number Publication Date
JP2001290857A true JP2001290857A (en) 2001-10-19

Family

ID=18618159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000104651A Pending JP2001290857A (en) 2000-04-06 2000-04-06 Timing simulator

Country Status (1)

Country Link
JP (1) JP2001290857A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007328548A (en) * 2006-06-07 2007-12-20 Canon Inc Simulator device, simulation method and computer program
JP2008204006A (en) * 2007-02-16 2008-09-04 Fujitsu Ltd Software generation device and simulation system
JP2010086047A (en) * 2008-09-29 2010-04-15 Nec Electronics Corp Simulation device and simulation method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007328548A (en) * 2006-06-07 2007-12-20 Canon Inc Simulator device, simulation method and computer program
US8108192B2 (en) 2006-06-07 2012-01-31 Canon Kabushiki Kaisha Simulator apparatus and simulation method
JP2008204006A (en) * 2007-02-16 2008-09-04 Fujitsu Ltd Software generation device and simulation system
JP2010086047A (en) * 2008-09-29 2010-04-15 Nec Electronics Corp Simulation device and simulation method

Similar Documents

Publication Publication Date Title
US9158654B1 (en) Verification of computer-executable code generated from a model
US20070011664A1 (en) Device and method for generating an instruction set simulator
JP2003131902A (en) Software debugger, system-level debugger, debug method and debug program
US20080177527A1 (en) Simulation system, simulation method and simulation program
US20050010387A1 (en) High level synthesis device, method for generating a model for verifying hardware, method for verifying hardware, control program, and readable recording medium
EP3532936B1 (en) Debugging system and method
US7110934B2 (en) Analysis of the performance of a portion of a data processing system
CN110210046B (en) Application program and special instruction set processor integrated agility design method
JP2001290857A (en) Timing simulator
Smotherman et al. Instruction scheduling for the Motorola 88110
JPH0850554A (en) Method and device for automatically generating operation model of processor and test instruction sequence for logic verification
JP2004078599A (en) Simulation method and system for instruction scheduling
US20120185231A1 (en) Cycle-Count-Accurate (CCA) Processor Modeling for System-Level Simulation
Charvát et al. Automatic formal correspondence checking of ISA and RTL microprocessor description
JPH10320212A (en) Cache optimizing method
JP3745968B2 (en) Test system, test method, test program, and computer-readable recording medium recording the test program
US9830174B2 (en) Dynamic host code generation from architecture description for fast simulation
JP3728368B2 (en) Resource conflict check device, assemble device, link device, instruction pipeline simulation device, resource conflict check method, and medium on which resource conflict check program is recorded
JP2002014847A (en) Device for checking program and method for the same and recording medium with checking program stored
JPH07253909A (en) Microprogram verifying method
JP2000122895A (en) Method and device for analyzing stack size
JP2982418B2 (en) Functional simulation device
Le A Tightly Integrated Generic Instruction RISC-V Accelerator (TIGRA) for the Rocket Core
CN118276948A (en) Instruction calculation simulation method, system and device
CN117933167A (en) Simulation method and simulator for ultra-long instruction word heterogeneous processor