JPH0736732A - Logical simulator - Google Patents

Logical simulator

Info

Publication number
JPH0736732A
JPH0736732A JP5158332A JP15833293A JPH0736732A JP H0736732 A JPH0736732 A JP H0736732A JP 5158332 A JP5158332 A JP 5158332A JP 15833293 A JP15833293 A JP 15833293A JP H0736732 A JPH0736732 A JP H0736732A
Authority
JP
Japan
Prior art keywords
simulation
instruction
logic
result
instruction level
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.)
Granted
Application number
JP5158332A
Other languages
Japanese (ja)
Other versions
JP2616541B2 (en
Inventor
Katsuhiko Okada
克彦 岡田
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP5158332A priority Critical patent/JP2616541B2/en
Publication of JPH0736732A publication Critical patent/JPH0736732A/en
Application granted granted Critical
Publication of JP2616541B2 publication Critical patent/JP2616541B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To shorten simulation execution time and to reduce a required file capacity by outputting both an instruction level simulated result and a logical simulated result to a file when they are compared and do not coincide. CONSTITUTION:This simulator is constituted of an instruction level simulated result storage means 5 for storing the instruction level simulated result generated by an instruction level simulator 6 for performing simulation at an instruction set level, a logical simulation execution means 4, a simulated result comparing means 1 for comparing the logical simulated result outputted from the execution means 4 with a value held in the result storage means 5, a comparison instruction means 2 for generating the timing of comparison for the comparing means 1 and a simulated result output means 13 for outputting a logical simulation internal state history from the logical simulation execution means 4 and the instruction level simulated result to an external file 8 at the time of receiving the compared result of non-coincidence from the comparing means 1.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は命令レベルシミュレーシ
ョンと論理レベルシミュレーションの両シミュレーショ
ン結果を比較して、論理回路の誤設計を検出するための
論理シミュレータに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a logic simulator for detecting an erroneous design of a logic circuit by comparing simulation results of an instruction level simulation and a logic level simulation.

【0002】[0002]

【従来技術】従来の論理シミュレータは図2に示すよう
に、命令レベルのシミュレーションを行う命令レベルシ
ミュレータ6と、この命令レベルシミュレーションの出
力値を格納する命令レベルシミュレーション結果格納フ
ァイル9と、論理シミュレーションを行う論理シミュレ
ータ7と、この論理シミュレータの出力値を格納する論
理シミュレーション結果格納ファイル10と、両ファイ
ル9および10の不一致を検出して不一致リストを出力
する不一致検出手段11とを有していた。本構成におい
て、命令レベルシミュレーション結果と論理シミュレー
ション結果とを全てファイルに落としてから両ファイル
を突き合わせ、結果が一致しない箇所をまとめて抽出す
るようにしていた。このような従来技術としては、例え
ば、情報処理学会第37回全国大会論文集「超高速論理
シミュレータ(HAL)による効果的論理検証」(p
p.1761〜1762)がある。
2. Description of the Related Art As shown in FIG. 2, a conventional logic simulator includes an instruction level simulator 6 for performing an instruction level simulation, an instruction level simulation result storage file 9 for storing an output value of the instruction level simulation, and a logical simulation. It has a logic simulator 7 to perform, a logic simulation result storage file 10 for storing the output value of the logic simulator, and a mismatch detection means 11 for detecting a mismatch between the files 9 and 10 and outputting a mismatch list. In this configuration, the instruction level simulation result and the logic simulation result are all dropped to a file, the two files are then compared, and the portions where the results do not match are collectively extracted. As such a conventional technique, for example, the IPSJ 37th National Convention Proceedings, "Effective Logic Verification by Ultra-High Speed Logic Simulator (HAL)" (p.
p. 1761 to 1762).

【0003】[0003]

【発明が解決しようとする課題】上述のように従来の論
理シミュレータでは、命令レベルシミュレーションと論
理シミュレーションを別々に行い結果ファイルを生成し
た後、この結果ファイルを比較することにより論理の正
当性を検証していた。ところが、論理シミュレーション
の結果データは一般に膨大なものとなるため、入出力装
置に対する負荷が増し、大規模のシミュレーションが困
難であった。
As described above, in the conventional logic simulator, after the instruction level simulation and the logic simulation are separately performed to generate a result file, the result files are compared to verify the correctness of the logic. Was. However, since the result data of the logic simulation is generally enormous, the load on the input / output device is increased and it is difficult to perform a large-scale simulation.

【0004】[0004]

【課題を解決するための手段】上述した問題点を解決す
るため、本発明の論理シミュレータでは、情報処理装置
について命令セットレベルでのシミュレーションを行う
命令レベルシミュレータが生成する命令レベルシミュレ
ーション結果を格納する命令レベルシミュレーション結
果格納手段と、論理回路レベルのシミュレーションを実
行する論理シミュレーション実行手段と、この論理シミ
ュレーション実行手段から出力される論理シミュレーシ
ョン結果と前記命令レベルシミュレーション結果格納手
段に保持される値とを比較するシミュレーション結果比
較手段と、このシミュレーション結果比較手段のために
比較すべきタイミングを生成する比較指示手段と、前記
シミュレーション結果比較手段から不一致である旨の比
較結果を受け取った際に前記論理シミュレーション実行
手段からの論理シミュレーション内部状態履歴と前記命
令レベルシミュレーション結果格納手段からの命令レベ
ルシミュレーション結果を外部ファイルに出力するシミ
ュレーション結果出力手段とを備えている。
In order to solve the above-mentioned problems, the logic simulator of the present invention stores an instruction level simulation result generated by an instruction level simulator for simulating an information processing apparatus at an instruction set level. Instruction level simulation result storage means, logic simulation execution means for executing logic circuit level simulation, and logic simulation results output from this logic simulation execution means and values held in the instruction level simulation result storage means And a comparison result indicating that there is a mismatch from the simulation result comparison unit, a comparison instruction unit that generates a timing to be compared for the simulation result comparison unit, and a comparison result indicating that they do not match. Wherein and a simulation result outputting means for outputting an instruction level simulation results from the logic simulation internal state history and the instruction level simulation result storage means from the logic simulation execution means to the external file when.

【0005】[0005]

【実施例】次に本発明の一実施例について図面を参照し
て詳細に説明する。
An embodiment of the present invention will now be described in detail with reference to the drawings.

【0006】図1を参照すると、本発明の一実施例にお
いて、命令レベルシミュレータ6は情報処理装置の命令
セットレベルの命令を単位としてその情報処理装置の動
作をシミュレーションする。命令レベルシミュレーショ
ン結果格納手段5は命令レベルシミュレータ6からの命
令レベルシミュレーション結果を格納する。論理シミュ
レーション実行手段4は、情報処理装置の論理回路レベ
ルの動作をシミュレーションする。シミュレーション結
果比較手段1は、命令レベルシミュレーション結果格納
手段5からの命令レベルシミュレーション結果と論理シ
ミュレーション実行手段4からの論理シミュレーション
結果とを比較する。比較指示手段2は、シミュレーショ
ン結果比較手段1に対して比較すべきタイミングを与え
る。シミュレーション結果出力手段3は、シミュレーシ
ョン結果比較手段1で両結果が不一致であった時、論理
シミュレーション実行手段4からの論理シミュレーショ
ン内部状態履歴と命令レベルシミュレーション結果格納
手段5からの命令レベルシミュレーション結果をシミュ
レーション結果出力ファイル8に出力する。
Referring to FIG. 1, in one embodiment of the present invention, an instruction level simulator 6 simulates the operation of the information processing apparatus in units of instruction set level instructions of the information processing apparatus. The instruction level simulation result storage means 5 stores the instruction level simulation result from the instruction level simulator 6. The logic simulation executing means 4 simulates a logic circuit level operation of the information processing apparatus. The simulation result comparison means 1 compares the instruction level simulation result from the instruction level simulation result storage means 5 with the logic simulation result from the logic simulation execution means 4. The comparison instructing means 2 gives the simulation result comparing means 1 a timing to be compared. The simulation result output means 3 simulates the logic simulation internal state history from the logic simulation execution means 4 and the command level simulation result from the command level simulation result storage means 5 when the two results in the simulation result comparison means 1 do not match. Output to the result output file 8.

【0007】次に上記実施例における動作について説明
する。
Next, the operation of the above embodiment will be described.

【0008】命令レベルシミュレータ6による命令レベ
ルシミュレーション結果は、1命令分毎に命令レベルシ
ミュレーション結果格納手段5に転送される。ここで、
命令レベルシミュレーション結果とは、具体的には計算
機等の命令セット上で定義されてソフトウェアに提供さ
れているレジスタ群の値の集合である。命令レベルシミ
ュレーション結果格納手段5の容量は有限であるため、
この命令レベルシミュレーション結果格納手段5で溢れ
が起きないように、命令レベルシミュレータ6と制御信
号を出し合う必要がある。この手順を表したのが図3,
図4である。
The instruction level simulation result by the instruction level simulator 6 is transferred to the instruction level simulation result storage means 5 every one instruction. here,
The instruction level simulation result is specifically a set of register group values defined on an instruction set of a computer or the like and provided to software. Since the capacity of the instruction level simulation result storage means 5 is finite,
It is necessary to exchange control signals with the instruction level simulator 6 so that the instruction level simulation result storage means 5 will not overflow. This procedure is shown in Figure 3.
It is FIG.

【0009】図3は命令レベルシミュレータ6側が論理
シミュレータ7の命令レベルシミュレーション結果格納
手段5に命令レベルシミュレーション結果を転送する際
の処理の流れ図である。命令レベルシミュレーションが
終了するまで(301)以下の処理を繰り返す。まず、
シミュレーション結果出力手段3から中断の指示があっ
たかどうかを調べ(302)、もし中断の指示があれば
命令レベルシミュレーションを終了する。そうでなけれ
ば、命令レベルシミュレーション結果格納手段5の状態
を調べ(303)、満杯でなければ1命令分の命令レベ
ルシミュレーション結果を命令レベルシミュレーション
結果格納手段5に転送する(304)。命令レベルシミ
ュレーション結果格納手段5が満杯であれば、空きがで
るまで待機する。図4については、シミュレーション結
果比較手段1の動作の説明と併せて後述する。
FIG. 3 is a flow chart of processing when the instruction level simulator 6 side transfers the instruction level simulation result to the instruction level simulation result storage means 5 of the logic simulator 7. The processing from (301) is repeated until the instruction level simulation is completed. First,
It is checked whether there is an interruption instruction from the simulation result output means 3 (302), and if there is an interruption instruction, the instruction level simulation is ended. If not, the state of the instruction level simulation result storage means 5 is checked (303), and if not full, the instruction level simulation result for one instruction is transferred to the instruction level simulation result storage means 5 (304). If the instruction level simulation result storage means 5 is full, it waits until it becomes available. FIG. 4 will be described later together with the description of the operation of the simulation result comparing means 1.

【0010】論理シミュレーション実行手段4は、論理
回路レベルのシミュレーションを行ない、対象回路のフ
リップフロップに相当する量の内部状態を持つ。この内
部状態の中から、前述の命令セット上のレジスタ値群を
シミュレーション結果比較手段1に転送する。
The logic simulation executing means 4 performs logic circuit level simulation and has an internal state of an amount corresponding to the flip-flop of the target circuit. From the internal state, the register value group on the above-mentioned instruction set is transferred to the simulation result comparing means 1.

【0011】また、論理シミュレーション実行手段4は
その内部状態の中から、シミュレーション結果比較手段
1で比較するべきタイミングを指示するレジスタの値
を、比較指示手段2に転送する。このタイミングを指示
するレジスタは論理検証のために、論理シミュレーショ
ン実行手段4の内部状態として設けられており、予め比
較するべきタイミングを設定することができる。具体的
には、命令レベルシミュレーション上の1命令に相当す
る期間の最終となるクロックに“1”となるような1ビ
ットのレジスタを設ければ命令単位に論理検証を行うこ
とができる。また、同時にもう1ビットレジスタを設け
て、特定の命令群毎に“1”となるようにすれば、より
高度な複合命令(例えば、命令セットに乗算命令を持た
ない情報処理装置において、シフト命令と加算命令を組
合わせて乗算命令を実現しているような場合)にも対応
できるようになる。
Further, the logic simulation executing means 4 transfers to the comparison instructing means 2 the value of the register which indicates the timing to be compared by the simulation result comparing means 1 from the internal state. The register for instructing this timing is provided as an internal state of the logic simulation executing means 4 for logic verification, and the timing to be compared can be set in advance. Specifically, if a 1-bit register that becomes "1" is provided in the last clock of the period corresponding to one instruction on the instruction level simulation, the logic verification can be performed in the instruction unit. In addition, if another 1-bit register is provided at the same time so that it becomes "1" for each specific instruction group, a higher-level compound instruction (for example, a shift instruction in an information processing device that does not have a multiplication instruction in its instruction set). And a case where a multiplication instruction is realized by combining an addition instruction).

【0012】シミュレーション結果比較手段1は、命令
レベルシミュレーション結果格納手段5から1命令分毎
に命令レベルシミュレーション結果を取り出し、比較指
示手段2から指示されたタイミングに従い、論理シミュ
レーション結果との比較を行う。両シミュレーションに
よるレジスタ値群が全て一致していれば、次に比較指示
手段2から指示されるタイミングを待って次の比較を順
次行っていく。もし、両シミュレーションによるレジス
タ値群の中に一致しないものを検出すると、論理シミュ
レーション実行手段4からの論理シミュレーション内部
状態履歴と命令レベルシミュレーション結果格納手段5
からの命令レベルシミュレーション結果をシミュレーシ
ョン結果出力手段3を介して外部ファイルに出力する。
このとき出力すべき信号名(もしくはフリップフロップ
名)やシミュレーション期間(例えば、不一致の起こる
前100クロック分)等をあらかじめシミュレーション
結果出力手段3に設定しておくことができる。また、シ
ミュレーションの中断をシミュレーション結果出力手段
3に設定しておくことにより、シミュレーション結果出
力手段3から命令レベルシミュレータ6及び論理シミュ
レーション実行手段4にシミュレーション中断指示を発
行する。
The simulation result comparison means 1 retrieves the instruction level simulation result from the instruction level simulation result storage means 5 for each instruction and compares it with the logic simulation result in accordance with the timing instructed by the comparison instruction means 2. If the register value groups obtained by both simulations are all the same, the next comparison is sequentially performed after waiting for the timing instructed by the comparison instructing means 2. If a register value group that does not match in both simulations is detected, the logic simulation internal state history from the logic simulation execution means 4 and the instruction level simulation result storage means 5 are detected.
The instruction level simulation result from the above is output to an external file through the simulation result output means 3.
At this time, a signal name (or a flip-flop name) to be output, a simulation period (for example, 100 clocks before a mismatch occurs), and the like can be set in advance in the simulation result output means 3. Further, by setting the interruption of simulation in the simulation result output means 3, the simulation result output means 3 issues a simulation interruption instruction to the instruction level simulator 6 and the logic simulation execution means 4.

【0013】図4はシミュレーション結果比較手段1側
が命令レベルシミュレーション結果格納手段5から命令
レベルシミュレーション結果を受取る際の処理の流れ図
である。両シミュレーション結果の比較が終了するまで
(401)以下の処理を繰り返す。まず、シミュレーシ
ョン結果出力手段3から中断の指示があったかどうかを
調べ(402)、もし中断の指示があれば論理シミュレ
ーション実行手段4は論理シミュレーションを終了す
る。そうでなければ、命令レベルシミュレーション結果
格納手段5の状態を調べ(403)、命令レベルシミュ
レーション結果が有れば1命令分を命令レベルシミュレ
ーション結果格納手段5から取り出す(404)。命令
レベルシミュレーション結果格納手段5が空っぽであれ
ば、転送されるまで待機する。
FIG. 4 is a flow chart of processing when the simulation result comparison means 1 side receives the instruction level simulation result from the instruction level simulation result storage means 5. The processes below (401) are repeated until the comparison of both simulation results is completed. First, it is checked whether there is an interruption instruction from the simulation result output means 3 (402), and if there is an interruption instruction, the logic simulation execution means 4 ends the logic simulation. If not, the state of the instruction level simulation result storage means 5 is checked (403), and if there is an instruction level simulation result, one instruction is taken out from the instruction level simulation result storage means 5 (404). If the instruction level simulation result storage means 5 is empty, it waits until it is transferred.

【0014】本発明では、命令レベルシミュレーション
と論理レベルシミュレーションとが常に同時に進行する
必要はない。例えば、最初は命令レベルシミュレーショ
ンだけを実行して、ある命令に達した時点で命令レベル
シミュレータ6から内部論理状態(フリップフロップ値
や主記憶の内容など)を論理シミュレーション実行手段
4に転送してもよい。これにより、本当に試験したい個
所だけを重点的に試験することができ、その他の部分は
命令レベルシミュレーションだけで高速に実行すること
ができる。なお、このようなシミュレータ同士の協調動
作を伴うシミュレーション方式は従来技術であり、例え
ば、特開昭63−292337に記載されている。
In the present invention, the instruction level simulation and the logic level simulation do not always need to proceed simultaneously. For example, at first, only the instruction level simulation is executed, and when a certain instruction is reached, the internal logic state (flip-flop value, main memory content, etc.) is transferred from the instruction level simulator 6 to the logic simulation executing means 4. Good. As a result, it is possible to focus the test only on the part that is really desired to be tested, and the other parts can be executed at high speed only by the instruction level simulation. Note that such a simulation method involving cooperative operation between simulators is a conventional technique and is described in, for example, Japanese Patent Laid-Open No. 63-292337.

【0015】本発明では上述のような構成をとることに
より、以下のような効果を奏する。第1に、論理シミュ
レーション内部状態履歴と命令レベルシミュレーション
結果とを毎クロックではなく、両結果が矛盾する時にの
み外部ファイルとして出力することができ、出力される
ファイルの容量を削減できるだけでなく、シミュレーシ
ョン実行速度を向上させることができる。第2に、命令
レベルシミュレーションと論理シミュレーションとを同
期させながら実行することにより、余計なシミュレーシ
ョン結果データを転送しなくて済む。すなわち、シミュ
レーション結果を比較するために受け渡す際に、全てま
とめてではなく比較処理の進行に応じて転送するため、
受け渡しに要する記憶領域の容量に依存することなくシ
ミュレーション規模を選択することができる。第3に、
両シミュレーション結果が矛盾して、以降のシミュレー
ションが不要である場合に、各シミュレーションを中断
させることにより、CPU時間を節約することができ
る。
In the present invention, the following effects can be obtained by adopting the above-mentioned structure. First, the logic simulation internal state history and the instruction level simulation result can be output as an external file only when both results conflict, not only every clock, and the output file size can be reduced, and the simulation can be performed. The execution speed can be improved. Second, by executing the instruction level simulation and the logic simulation in synchronization with each other, it is not necessary to transfer extra simulation result data. That is, when handing over the simulation results for comparison, they are transferred according to the progress of the comparison process, not all at once.
The simulation scale can be selected without depending on the capacity of the storage area required for delivery. Third,
When both simulation results are inconsistent and subsequent simulations are unnecessary, each simulation can be suspended to save CPU time.

【0016】次に、図5,図6の具体例を用いて、本発
明を説明する。
Next, the present invention will be described with reference to the specific examples shown in FIGS.

【0017】図5はシミュレーション対象となる命令コ
ード列の一例を表している。図中「ステップ」は命令コ
ードの実行順序を、「命令」は命令コードをそれぞれ表
している。また、「IC」から右の欄は当該命令コード
実行前の各レジスタの内容を表している。ここで、「I
C」は命令カウンタを、「IR」は命令レジスタを、
「GR1」はジェネラルレジスタの1番を、「GR2」
はジェネラルレジスタの2番を、「GR3」はジェネラ
ルレジスタの3番を、「GR4」はジェネラルレジスタ
の4番をそれぞれ意味している。
FIG. 5 shows an example of an instruction code string to be simulated. In the figure, “step” represents the execution order of the instruction code, and “instruction” represents the instruction code. The column to the right of "IC" represents the contents of each register before execution of the instruction code. Here, "I
“C” is the instruction counter, “IR” is the instruction register,
"GR1" is the first general register, "GR2"
Indicates the general register No. 2, “GR3” means the general register No. 3, and “GR4” means the general register No. 4.

【0018】図6は論理シミュレーション実行結果の一
例である。図中「時刻」は論理シミュレーション開始時
を0とした場合の経過クロック値を表す。ここにいうク
ロックは論理シミュレーション上のものであり、実際の
論理回路上ではさらに分周などされている場合がある。
また、図6で「IC」から右の欄は当該シミュレーショ
ン時刻における各レジスタの内容を表している。ここ
で、「BCR」は分岐命令の条件コードを保持するレジ
スタを、「CRRY」は演算器における桁上げ発生情報
を保持するレジスタを、「命令終了REG」は各命令の
最後のクロックで“1”となるレジスタを、「試験終了
REG」は両シミュレーション結果を比較するモードの
最後のクロックで“1”となるレジスタをそれぞれ表し
ている。
FIG. 6 shows an example of the result of executing the logic simulation. In the figure, "time" represents an elapsed clock value when the logic simulation start time is set to 0. The clock mentioned here is based on the logic simulation, and may be further divided on the actual logic circuit.
Further, in FIG. 6, the column to the right of “IC” represents the contents of each register at the simulation time. Here, "BCR" is a register holding the condition code of the branch instruction, "CRRY" is a register holding the carry occurrence information in the arithmetic unit, and "instruction end REG" is "1" at the last clock of each instruction. "Registered to TEST" represents a register that becomes "" and a register that becomes "1" at the last clock of the mode in which both simulation results are compared.

【0019】図5,図6の具体例では、ステップ1から
100までを命令レベルシミュレータだけで実行し、ス
テップ101から110までを命令レベルシミュレータ
と論理シミュレータが同時にシミュレーションしながら
試験し、ステップ111以降を再び命令レベルシミュレ
ータだけで実行するという状況を仮定している。まず、
命令レベルシミュレータ6は図5に示す命令をステップ
1から順番にシミュレーションしていく。そして、ステ
ップ100で乗移り命令(switch命令)を実行し
たところで試験モードに入り、以降論理シミュレータ7
でも同時にシミュレーションしながら両結果の比較試験
を行う。試験モードに入ると、この比較試験の前準備と
して、命令レベルシミュレータ6は論理シミュレーショ
ン実行手段4に対して図5右欄のようなレジスタ値(I
C,IRなど)や主記憶領域の一部を転送する。
In the concrete example shown in FIGS. 5 and 6, steps 1 to 100 are executed only by the instruction level simulator, and steps 101 to 110 are tested while being simultaneously simulated by the instruction level simulator and the logic simulator. Is assumed to be executed again only by the instruction level simulator. First,
The instruction level simulator 6 sequentially simulates the instructions shown in FIG. 5 from step 1. Then, when the transfer instruction (switch instruction) is executed in step 100, the test mode is entered, and thereafter the logic simulator 7
However, a comparative test of both results is performed while simultaneously simulating. When the test mode is entered, the instruction level simulator 6 prepares the register values (I) shown in the right column of FIG.
(C, IR, etc.) and part of the main storage area are transferred.

【0020】試験モードで比較試験が始まると、命令レ
ベルシミュレータ6は命令レベルシミュレーション結果
格納手段5に1ステップ毎に命令レベルシミュレーショ
ンの結果(各レジスタ値など)を転送する。命令レベル
シミュレーション結果格納手段5の容量はシステムに応
じて適切な値を選択するべきであるが、ここでは説明の
便宜上、既に領域に空きがない状態であったと仮定す
る。例えば、ステップ105の結果を転送した時点で命
令レベルシミュレーション結果格納手段5に空きがなく
なったとすると、命令レベルシミュレータ6はその後の
シミュレーションを中断し、命令レベルシミュレーショ
ン結果格納手段5が新規データ格納可能になるまで待機
する(図3の303)。
When the comparison test starts in the test mode, the instruction level simulator 6 transfers the instruction level simulation result (each register value, etc.) to the instruction level simulation result storage means 5 step by step. An appropriate value should be selected for the capacity of the instruction level simulation result storage means 5 according to the system, but here, for convenience of explanation, it is assumed that the area is already full. For example, if the instruction level simulation result storage means 5 runs out of space when the result of step 105 is transferred, the instruction level simulator 6 interrupts the subsequent simulation, and the instruction level simulation result storage means 5 can store new data. It waits until it becomes (303 in FIG. 3).

【0021】一方、論理シミュレーション実行手段4で
は試験モードの先頭で転送されたレジスタ値などを基に
論理シミュレーションを行い、図6右欄のようなシミュ
レーション結果をシミュレーション結果比較手段1や比
較指示手段2に出力する。そして、この比較指示手段2
は、論理シミュレーション実行手段4から出力される命
令終了REGの値を監視し、この値が“1”になるとシ
ミュレーション結果比較手段1に比較すべき旨を指示す
る。図6の時刻=8では、命令終了REGが“1”とな
り、ステップ101の命令のシミュレーションが終了す
ることを表している。シミュレーション結果比較手段1
は、この比較指示手段2からの比較指示により、命令レ
ベルシミュレータ6による結果と論理シミュレーション
実行手段4による結果とを比較する。
On the other hand, the logic simulation executing means 4 performs a logic simulation based on the register value transferred at the head of the test mode, and the simulation result as shown in the right column of FIG. 6 is obtained by the simulation result comparing means 1 and the comparison instructing means 2. Output to. Then, this comparison instruction means 2
Monitors the value of the instruction end REG output from the logic simulation executing means 4, and instructs the simulation result comparing means 1 to compare when the value becomes "1". At time = 8 in FIG. 6, the instruction end REG becomes “1”, indicating that the instruction simulation in step 101 ends. Simulation result comparison means 1
The comparison instruction from the comparison instruction means 2 compares the result of the instruction level simulator 6 with the result of the logic simulation execution means 4.

【0022】この比較の結果、不一致を検出すると、シ
ミュレーション結果比較手段1はシミュレーション結果
出力手段3に不一致を通知する。このとき、シミュレー
ション結果出力手段3において「不一致時には両シミュ
レーションを中止する」旨があらかじめ設定されていれ
ば、シミュレーション結果出力手段3は、命令レベルシ
ミュレータ6と論理シミュレーション実行手段4に両シ
ミュレーションの中止を指示する。また、シミュレーシ
ョン結果出力手段3は、命令レベルシミュレーション結
果格納手段5と論理レベルシミュレーション実行手段4
から内部状態の履歴を受取り、シミュレーション結果出
力ファイル8として出力する。この内部状態の履歴は、
不一致の起きたステップおよびそれ以前の各ステップに
おける、各シミュレーションによるレジスタ値やフリッ
プフロップ値などである。どの項目についてどれだけの
期間分出力するか等は、利用者が指定することができ
る。
As a result of this comparison, if a mismatch is detected, the simulation result comparing means 1 notifies the simulation result outputting means 3 of the mismatch. At this time, if it is preset in the simulation result output means 3 that "the two simulations are stopped when they do not match", the simulation result output means 3 causes the instruction level simulator 6 and the logic simulation execution means 4 to stop both simulations. Give instructions. The simulation result output means 3 includes an instruction level simulation result storage means 5 and a logic level simulation execution means 4.
The history of the internal state is received from and output as the simulation result output file 8. The history of this internal state is
The register value and the flip-flop value by each simulation in the step where the mismatch occurs and each step before that. The user can specify, for each item, how many periods to output, etc.

【0023】シミュレーション結果比較手段1での比較
の結果、不一致が検出されなければ、両シミュレーショ
ンを続行する。その後、論理シミュレーション実行手段
4でステップ110の乗移り命令を実行すると、図6の
時刻=10010にあるように試験終了REGが“1”
となり、試験モードを終了する。これ以降、論理シミュ
レーション実行手段4は待機状態となり、新たな乗移り
命令により試験モードとなるのを待つ。一方、命令レベ
ルシミュレータ6だけがステップ111以降の命令のシ
ミュレーションを継続する。
If no mismatch is detected as a result of the comparison by the simulation result comparing means 1, both simulations are continued. After that, when the logic simulation executing means 4 executes the transfer instruction of step 110, the test end REG is "1" as shown at time = 10010 in FIG.
Then, the test mode ends. After that, the logic simulation executing means 4 enters the standby state and waits for the new transfer instruction to enter the test mode. On the other hand, only the instruction level simulator 6 continues the simulation of the instruction after step 111.

【0024】なお、本実施例では乗移り命令を契機に乗
移りを行っているが、命令カウンタの値があらかじめ設
定された値になった時など他の契機によるものでもよ
い。また、論理シミュレーションの対象となる命令とし
て複数の命令から成る命令群の例を説明したが、単一の
命令のみであってもよい。
In this embodiment, the transfer is triggered by the transfer instruction, but it may be triggered by another trigger, such as when the value of the instruction counter reaches a preset value. Also, although an example of an instruction group composed of a plurality of instructions has been described as an instruction to be subjected to logic simulation, only a single instruction may be used.

【0025】[0025]

【発明の効果】以上説明したように、本発明による論理
シミュレータは、論理シミュレーション内部状態履歴と
命令レベルシミュレーション結果とを毎クロックではな
く、両結果が矛盾する時にのみ外部ファイルとして出力
することができ、出力されるファイルの容量を削減でき
るだけでなく、シミュレーション実行速度を向上させる
ことができる。
As described above, the logic simulator according to the present invention can output the logic simulation internal state history and the instruction level simulation result not as every clock but as an external file only when both results conflict. Not only can the output file size be reduced, but the simulation execution speed can also be improved.

【0026】また、命令レベルシミュレーションの論理
シミュレーションとを同期させながら実行することによ
り、余計なシミュレーション結果データを転送しなくて
済む。すなわち、シミュレーション結果を比較するため
に受け渡す際に、全てまとめてではなく比較処理の進行
に応じて転送するため、受け渡しに要する記憶領域の容
量に依存することなくシミュレーション規模を選択する
ことができる。
Further, by executing the instruction level simulation in synchronization with the logic simulation, it is not necessary to transfer extra simulation result data. In other words, when the simulation results are transferred for comparison, they are transferred not collectively but according to the progress of the comparison process, so that the simulation scale can be selected without depending on the capacity of the storage area required for the transfer. .

【0027】さらに、両シミュレーション結果が矛盾し
て、以降のシミュレーションが不要である場合に、各シ
ミュレーションを中断させることにより、CPU時間を
節約することができる等の効果を有する。
Further, when the two simulation results are inconsistent and the subsequent simulations are unnecessary, each simulation is interrupted, so that the CPU time can be saved.

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】従来技術を示す図である。FIG. 2 is a diagram showing a conventional technique.

【図3】命令レベルシミュレータ6による転送処理の手
順を示す図である。
FIG. 3 is a diagram showing a procedure of transfer processing by an instruction level simulator 6.

【図4】シミュレーション結果比較手段1による受取り
処理の手順を示す図である。
FIG. 4 is a diagram showing a procedure of a receiving process by the simulation result comparing means 1.

【図5】シミュレーション対象となる命令コード列の一
例である。
FIG. 5 is an example of an instruction code string to be simulated.

【図6】論理シミュレーションによる実行結果の一例で
ある。
FIG. 6 is an example of an execution result by a logic simulation.

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

1 シミュレーション結果比較手段 2 比較指示手段 3 シミュレーション結果出力手段 4 論理シミュレーション実行手段 5 命令レベルシミュレーション結果格納手段 6 命令レベルシミュレータ 7 論理シミュレータ 8 シミュレーション結果出力ファイル 9 命令レベルシミュレーション結果格納ファイル 10 論理シミュレーション結果格納ファイル 11 不一致検出手段 1 simulation result comparison means 2 comparison instruction means 3 simulation result output means 4 logic simulation execution means 5 instruction level simulation result storage means 6 instruction level simulator 7 logic simulator 8 simulation result output file 9 instruction level simulation result storage file 10 logic simulation result storage File 11 Mismatch detection means

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 情報処理装置について命令セットレベル
でのシミュレーションを行う命令レベルシミュレータが
生成する命令レベルシミュレーション結果を格納する命
令レベルシミューレーション結果格納手段と、論理回路
レベルのシミュレーションを実行する論理シミュレーシ
ョン実行手段と、この論理シミュレーション実行手段か
ら出力される論理シミュレーション結果と前記命令レベ
ルシミュレーション結果格納手段に保持される値とを比
較するシミュレーション結果比較手段と、このシミュレ
ーション結果比較手段のために比較すべきタイミングを
生成する比較指示手段と、前記シミュレーション結果比
較手段から不一致である旨の比較結果を受け取った際に
前記論理シミュレーション実行手段からの論理シミュレ
ーション内部状態履歴と前記命令レベルシミュレーショ
ン結果格納手段からの命令レベルシミュレーション結果
とを外部ファイルに出力するシミュレーション結果出力
手段とを有することを特徴とする論理シミュレータ。
1. An instruction level simulation result storage means for storing an instruction level simulation result generated by an instruction level simulator that performs an instruction set level simulation of an information processing device, and a logical simulation for executing a logic circuit level simulation. The execution means, the simulation result comparison means for comparing the logic simulation result output from the logic simulation execution means with the value held in the instruction level simulation result storage means, and the comparison for the simulation result comparison means should be made. When the comparison instruction means for generating the timing and the comparison result indicating the non-coincidence are received from the simulation result comparison means, the logic simulation internal state information from the logic simulation execution means is received. A logic simulator having a history and a simulation result output means for outputting the instruction level simulation result from the instruction level simulation result storage means to an external file.
【請求項2】 前記シミュレーション結果出力手段にお
いて、あらかじめ設定された条件に従って前記命令レベ
ルシミュレータおよび前記論理シミュレーション実行手
段にシミュレーション中断を指示することを特徴とする
請求項1に記載の論理シミュレータ。
2. The logic simulator according to claim 1, wherein the simulation result output means instructs the instruction level simulator and the logic simulation executing means to suspend the simulation in accordance with a preset condition.
【請求項3】 前記命令レベルシミュレータの結果を前
記論理シミュレーション実行手段に転送して、この結果
を用いて前記論理シミュレーション実行手段でシミュレ
ーションを続行することを特徴とする請求項1に記載の
論理シミュレータ。
3. The logic simulator according to claim 1, wherein the result of the instruction level simulator is transferred to the logic simulation executing means, and the result is used to continue the simulation in the logic simulation executing means. .
【請求項4】 前記命令レベルシミュレータの結果を前
記論理シミュレーション実行手段に転送して、この結果
を用いて前記論理シミュレーション実行手段でシミュレ
ーションを続行することを特徴とする請求項2に記載の
論理シミュレータ。
4. The logic simulator according to claim 2, wherein the result of the instruction level simulator is transferred to the logic simulation executing means, and the result is used to continue the simulation in the logic simulation executing means. .
JP5158332A 1993-06-29 1993-06-29 Logic simulator Expired - Lifetime JP2616541B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5158332A JP2616541B2 (en) 1993-06-29 1993-06-29 Logic simulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5158332A JP2616541B2 (en) 1993-06-29 1993-06-29 Logic simulator

Publications (2)

Publication Number Publication Date
JPH0736732A true JPH0736732A (en) 1995-02-07
JP2616541B2 JP2616541B2 (en) 1997-06-04

Family

ID=15669333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5158332A Expired - Lifetime JP2616541B2 (en) 1993-06-29 1993-06-29 Logic simulator

Country Status (1)

Country Link
JP (1) JP2616541B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03158972A (en) * 1989-11-16 1991-07-08 Mitsubishi Electric Corp Simulator
JPH0431968A (en) * 1990-05-28 1992-02-04 Nec Corp Logical simulation error analyzing system
JPH0442370A (en) * 1990-06-07 1992-02-12 Koufu Nippon Denki Kk Logic simulation system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03158972A (en) * 1989-11-16 1991-07-08 Mitsubishi Electric Corp Simulator
JPH0431968A (en) * 1990-05-28 1992-02-04 Nec Corp Logical simulation error analyzing system
JPH0442370A (en) * 1990-06-07 1992-02-12 Koufu Nippon Denki Kk Logic simulation system

Also Published As

Publication number Publication date
JP2616541B2 (en) 1997-06-04

Similar Documents

Publication Publication Date Title
JPS5948424B2 (en) parallel computing system
JPS6028015B2 (en) information processing equipment
JP2715993B2 (en) Simulation method and apparatus
JP2616541B2 (en) Logic simulator
JP2828590B2 (en) Microprogram verification method
JPH1091480A (en) Simulation device/method for computer program
JPH0962720A (en) Digital signal processing circuit simulation device
US6898562B2 (en) Method and system for efficiently overriding net values in a logic simulator machine
JP6949440B2 (en) Vector generator and vector generator program
JP2006202102A (en) Simulation apparatus
JPH10187790A (en) Logic circuit simulator
JP3396365B2 (en) Method and apparatus for automatically generating an input sequence for simulation-based logic verification, and method and apparatus for outputting a state set time series for generating the input sequence for logic verification
JPH04277840A (en) Simulation system for asynchronous instruction
JP2723017B2 (en) Simulation engine
JPH02224141A (en) Logical simulation system
JPH06222939A (en) Testing system for plural pipelines
JP2004062522A (en) Circuit verification device, circuit verification program and circuit verification method
JPH0269825A (en) Pipe line control system
JP2003233634A (en) Circuit function verification method and program
JPS63229532A (en) Debug circuit
JPS63300330A (en) Debugging method for firmware
JPH10154084A (en) Instruction simulation method and instruction simulation system
JPH05108401A (en) Test pattern generating method
JPH01134539A (en) Trace system for microprogram
JPH0895817A (en) Method for testing information processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19970114