JP2896315B2 - Logic simulation method - Google Patents

Logic simulation method

Info

Publication number
JP2896315B2
JP2896315B2 JP6221631A JP22163194A JP2896315B2 JP 2896315 B2 JP2896315 B2 JP 2896315B2 JP 6221631 A JP6221631 A JP 6221631A JP 22163194 A JP22163194 A JP 22163194A JP 2896315 B2 JP2896315 B2 JP 2896315B2
Authority
JP
Japan
Prior art keywords
simulation
signal
signal value
value
time
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.)
Expired - Fee Related
Application number
JP6221631A
Other languages
Japanese (ja)
Other versions
JPH0887534A (en
Inventor
太市郎 山中
浩 酒井
雄一 黒澤
庄三 磯部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP6221631A priority Critical patent/JP2896315B2/en
Publication of JPH0887534A publication Critical patent/JPH0887534A/en
Application granted granted Critical
Publication of JP2896315B2 publication Critical patent/JP2896315B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、論理シミュレーション
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a logic simulation method.

【0002】[0002]

【従来の技術】ディジタル回路の設計では、回路モジュ
ールの動作あるいはその内部構造をハードウェア記述言
語を使って記述し、論理シミュレーション装置を用いて
シミュレーションを実施し、上記回路記述が正しいこと
を検証するという方法が用いられる。
2. Description of the Related Art In the design of a digital circuit, the operation of a circuit module or its internal structure is described using a hardware description language, a simulation is performed using a logic simulation device, and it is verified that the above circuit description is correct. Is used.

【0003】ここで、シミュレーションによる回路記述
の検証においては、トレース処理がしばしば用いられ
る。トレース処理とは、上記回路記述中で、設計者が観
測したい信号を指定することにより、シミュレーション
時刻あるいはシミュレーションサイクルが更新された時
点でシミュレータが上記信号の値を出力する機能であ
る。設計者は、トレースされた信号値を見るあるいは、
シミュレーション期待値データと比較することによっ
て、所望のシミュレーション結果が得られているか否か
を確認する。トレース結果が期待値と異った場合、設計
者は、異常の原因となる可能性がある他の信号をトレー
ス対象信号として追加し、信号値が異常になった時刻ま
で、再度シミュレーションを実行し、回路記述の誤りを
特定する。
Here, in verification of a circuit description by simulation, trace processing is often used. The trace processing is a function in which a simulator specifies a signal to be observed by a designer in the circuit description, and the simulator outputs the value of the signal at a time when a simulation time or a simulation cycle is updated. The designer can look at the traced signal value or
By comparing with the simulation expected value data, it is confirmed whether or not a desired simulation result is obtained. If the trace result is different from the expected value, the designer adds another signal that may cause an error as a signal to be traced, and executes the simulation again until the time when the signal value becomes abnormal. Identify an error in the circuit description.

【0004】トレースの収集は、特許第1665055
号で示されているような、値が変化した信号に対して、
信号識別子と信号値をペアで格納し出力する方法が一般
的である。この方法では、トレース結果および信号の特
定の時刻の値からそれより後の時刻の信号値を高速に求
めることができ、トレースするデータ量を少量とするこ
とができる。
[0004] The collection of traces is disclosed in Japanese Patent No. 1665055.
The signal whose value has changed, as shown by the symbol,
In general, a method of storing and outputting a signal identifier and a signal value as a pair is common. According to this method, a signal value at a later time can be obtained at high speed from a trace result and a signal at a specific time value, and the amount of data to be traced can be reduced.

【0005】一方、回路記述のデバッグでは、ある時刻
でシミュレーションを中断し、その時刻で注目する信号
値を観測して期待値と異なっていたとき、1時刻ずつ遡
って信号値を見る機能があれば、どの時刻から信号値の
異常が起きているかを知ることができ、デバッグ作業の
効率を上げることが期待できる。
On the other hand, in debugging a circuit description, a function is provided in which a simulation is interrupted at a certain time, and a signal value of interest is observed at that time, and when the signal value is different from an expected value, the signal value is looked back one time at a time. For example, it is possible to know from which time the signal value abnormality has occurred, and it can be expected to improve the efficiency of the debugging work.

【0006】ところが、上記トレース収集方式では、確
認したい時刻で注目する信号値に変化が起こっていなけ
れば、その時刻より以前で最後に更新された時刻および
その時刻での値を探索せねばならず、シミュレーション
中断時刻から直ちに1時刻ずつ前の値まで遡ることがで
きないという問題点がある。
However, in the above trace collection method, if the signal value of interest does not change at the time to be confirmed, the last updated time before that time and the value at that time must be searched. In addition, there is a problem that it is not possible to immediately go back one time at a time from the simulation interruption time to the previous value.

【0007】さらに、トレース処理はシミュレーション
速度に大きな影響を与え、トレース出力量が多いほどシ
ミュレーション速度は遅くなる。そのためトレース出力
量をさらに少なくする方法が要求されている。
Further, the trace processing has a large effect on the simulation speed, and the simulation speed becomes slower as the amount of trace output increases. Therefore, a method for further reducing the amount of trace output is required.

【0008】[0008]

【発明が解決しようとする課題】以上のように、従来の
論理シミュレーション方法では、シミュレーション結果
から確認したい時刻での注目する信号の値を得るために
は、その時刻で信号値に変化が起こっていなければ、そ
の時刻より以前で最後に更新された時刻およびその時刻
での値を探索せねばならず、所望の時刻における信号値
を高速に得ることはできなかった。
As described above, in the conventional logic simulation method, in order to obtain a value of a signal of interest at a time desired to be confirmed from a simulation result, a change occurs in the signal value at that time. Otherwise, the last updated time before that time and the value at that time had to be searched, and the signal value at the desired time could not be obtained at high speed.

【0009】本発明は、上記事情に鑑みてなされたもの
であり、論理シミュレーションによる回路記述の検証に
おいて、トレース結果および信号の特定の時刻の値から
それより前の時刻に遡った時刻の信号値を高速に求める
ことができる論理シミュレーション方法を提供すること
を目的とする。また、本発明は、トレース出力量を小さ
くすることを目的とする。
The present invention has been made in view of the above circumstances, and in verification of a circuit description by a logic simulation, a trace result and a signal value at a time preceding a specific time value of a signal to a time earlier than the specific time value. It is an object of the present invention to provide a logic simulation method capable of obtaining a high speed. Another object of the present invention is to reduce the amount of trace output.

【0010】[0010]

【課題を解決するための手段】本発明(請求項1)は、
第1の信号値を一時記憶する第1のバッファ手段と、第
2の信号値を一時記憶する第2のバッファ手段と、前記
第1および第2のバッファ手段からの前記第1、第2の
信号値を比較する比較手段と、前記比較手段の出力結果
からトレース情報を求め、そのトレース情報を格納する
格納手段と、特定のシミュレーション時刻における信号
値を一時記憶する第3のバッファ手段からの前記信号値
と前記トレース情報とに基づき、直前の信号値に復元す
る復元手段とを有し、論理回路を記述した情報に基づ
き、論理シミュレーションを所定のシミュレーション単
位時間ずつ進めながら繰り返し実行する論理シミュレー
ション方法であって、前記比較手段の出力結果から、少
なくともシミュレーション時刻と各信号値とからなるシ
ミュレーション結果を出力するステップと、前記ステッ
プにて得られたシミュレーション結果のうち、少なくと
も一つの信号値が直前のシミュレーション結果における
値から変化した場合、当該シミュレーション結果におけ
るシミュレーション時刻に対応して、変化した信号を特
定する情報と、前記変化した信号について変化前の信号
値と現時刻の信号値との差分情報を前記トレース情報と
して前記格納手段に格納するステップと、前記ステップ
で格納されたトレース情報に基づき、特定のシミュレー
ション時刻における信号値から直前のシミュレーション
時刻での信号値を前記復元手段によって復元するステッ
プとを具備することを特徴とする。本発明(請求項2)
は、第1の信号値を一時記憶する第1のバッファ手段
と、第2の信号値を一時記憶する第2のバッファ手段
と、前記第1および第2のバッファ手段からの前記第
1、第2の信号値の差を信号値範囲で割った剰余を求め
て比較する比較手段と、前記比較手段の出力結果からト
レース情報を求め、そのトレース情報を格納する格納手
段と、特定のシミュレーション時刻における信号値を一
時記憶する第3のバッファ手段と前記第1の信号値と前
記第2の信号値の差分情報を記憶したテーブルとを有し
て、前記トレース情報に基づき前記テーブルを参照して
前記特定のシミュレーション時刻における信号値から直
前の信号値に復元する復元手段とを有し、論理回路を記
述した情報に基づき、論理シミュレーションを所定のシ
ミュレーション単位時間ずつ進めながら繰り返し実行す
る論理シミュレーション方法であって、前記比較手段の
出力結果から、少なくともシミュレーション時刻と各信
号値とからなるシミュレーション結果を出力するステッ
プと、前記ステップにて得られたシミュレーション結果
のうち、少なくとも一つの信号値が直前のシミュレーシ
ョン結果における値から変化した場合、当該シミュレー
ション結果におけるシミュレーション時刻に対応して、
変化した信号を特定する情報と、前記変化した信号につ
いて変化前の信号値と現時刻の信号値との差を信号値範
囲で割った剰余から得られる差分情報とを前記トレース
情報として前記格納手段に格納するステップと、前記ス
テップで格納されたトレース情報から前記テーブルを参
照して、特定のシミュレーション時刻における信号値か
ら直前のシミュレーション時刻での信号値を前記復元手
段によって復元するステップとを具備することを特徴と
する。
Means for Solving the Problems The present invention (claim 1) provides:
First buffer means for temporarily storing a first signal value, second buffer means for temporarily storing a second signal value, and the first and second signals from the first and second buffer means. Comparing means for comparing the signal value, trace information obtained from the output result of the comparing means, storing means for storing the trace information, and third buffer means for temporarily storing the signal value at a specific simulation time. A logic simulation method comprising: restoring means for restoring to the immediately preceding signal value based on a signal value and the trace information, and repeatedly executing a logic simulation by a predetermined simulation unit time based on information describing a logic circuit. A simulation result comprising at least a simulation time and each signal value from an output result of the comparing means. Outputting, and when at least one signal value of the simulation results obtained in the step has changed from the value in the immediately preceding simulation result, identifying the changed signal in accordance with the simulation time in the simulation result. And storing the difference information between the signal value before the change and the signal value at the current time in the storage means as the trace information, based on the trace information stored in the step. Restoring the signal value at the immediately preceding simulation time from the signal value at the simulation time by the restoring means. The present invention (Claim 2)
Comprises a first buffer means for temporarily storing a first signal value, a second buffer means for temporarily storing a second signal value, and the first and second signals from the first and second buffer means. A comparing means for calculating a remainder obtained by dividing a difference between the signal values of the two in the signal value range, a trace information obtained from an output result of the comparing means, and a storage means for storing the trace information; A third buffer unit for temporarily storing signal values, and a table storing difference information between the first signal value and the second signal value, and referring to the table based on the trace information, Restoring means for restoring from a signal value at a specific simulation time to a signal value immediately before, and executing a logic simulation in a predetermined simulation unit time based on information describing a logic circuit. A logic simulation method that is repeatedly executed while proceeding, wherein a step of outputting a simulation result comprising at least a simulation time and each signal value from an output result of the comparing means; and a step of outputting a simulation result obtained in the step. When at least one signal value changes from the value in the immediately preceding simulation result, corresponding to the simulation time in the simulation result,
The storage means as the trace information, wherein information for specifying a changed signal and difference information obtained from a remainder obtained by dividing a difference between a signal value before the change and a signal value at the current time for the changed signal by a signal value range. And restoring the signal value at the immediately preceding simulation time from the signal value at a specific simulation time by the restoration means with reference to the table from the trace information stored in the step. It is characterized by the following.

【0011】一方、本発明は、論理回路のシミュレーシ
ョンを行う論理シミュレーション装置において、少くと
も一つの信号値が変化したシミュレーション時刻と、前
記シミュレーション時刻で値が変化した各信号につい
て、変化前と変化後の信号値の差分をトレース結果とし
て出力するトレース結果出力手段と、特定の時刻におけ
る信号値から前記差分を用いて直前の時刻での信号値を
復元する復元手段を有することを特徴とする。
On the other hand, the present invention provides a logic simulation apparatus for simulating a logic circuit, wherein a simulation time at which at least one signal value has changed, and each signal whose value has changed at the simulation time are before and after the change. And a restoring means for restoring the signal value at the immediately preceding time from the signal value at a specific time by using the difference from the signal value at a specific time.

【0012】また、好ましくは、トレース結果出力手段
が、値が変化した信号に対応するオフセットと、前記信
号に対応する差分を出力することを特徴とする。また、
好ましくは、トレース出力手段が、値が変化した信号に
対応するオフセットと、オフセットから連続する差分の
個数と、前記オフセットから前記個数分連続して差分を
出力することを特徴とする。
Preferably, the tracing result output means outputs an offset corresponding to the signal whose value has changed and a difference corresponding to the signal. Also,
Preferably, the trace output means outputs the offset corresponding to the signal whose value has changed, the number of the difference that continues from the offset, and the difference continuously from the offset by the number.

【0013】また、好ましくは、トレース出力手段が、
値が変化した信号に対応する識別子と、前記信号に対応
する差分を出力することを特徴とする。また、好ましく
は、トレース出力手段が、各信号に対する信号値変化の
有無を表すビットマップと、値が変化した信号の差分を
出力することを特徴とする。また、好ましくは、トレー
ス出力手段が、値が変化した信号の差分と、前記差分と
一致する差分を持つ信号の識別子列を出力することを特
徴とする。
[0013] Preferably, the trace output means includes:
An identifier corresponding to the signal whose value has changed and a difference corresponding to the signal are output. Preferably, the trace output means outputs a difference between a bitmap indicating presence / absence of a signal value change for each signal and a signal whose value has changed. Preferably, the trace output means outputs a difference between the signal whose value has changed and an identifier sequence of a signal having a difference corresponding to the difference.

【0014】[0014]

【作用】本発明によれば、論理シミュレーションの際の
トレース収集において、信号値の変化したものについ
て、各シミュレーション時刻での信号値の差分値をトレ
ース収集し、あるシミュレーション時刻までシミュレー
ションが進んだ時点で、トレース結果に含まれる信号値
の差分と、その時点での信号値とを用いて、信号の直前
値を復元することができる。
According to the present invention, in the trace collection at the time of the logic simulation, the difference value of the signal value at each simulation time is trace-collected for a signal whose value has changed, and when the simulation has advanced to a certain simulation time. Thus, the previous value of the signal can be restored using the difference between the signal values included in the trace result and the signal value at that time.

【0015】したがって、従来のように最後に更新され
た時刻とその時刻での値を探索するような処理は完全に
排除されるので、直前の時刻における信号値を高速に得
ることができる。
Therefore, the process of searching for the last updated time and the value at that time, as in the conventional case, is completely eliminated, so that the signal value at the immediately preceding time can be obtained at high speed.

【0016】さらには、トレース結果に含まれる信号値
の差分を辿っていくことによって、所望の時刻における
信号値を容易にかつ高速に得ることができる。また、ト
レース収集の際にトレース対象の信号のうちどの信号が
変化したかを指定するトレース出力形式を変更すること
によって、トレース量を従来法と比較して更に小さく抑
えることができるとともに、トレース処理を高速に行う
ことができ、シミュレーション実行をより高速にするこ
とが可能となる。
Further, by following the difference between the signal values included in the trace result, it is possible to easily and quickly obtain a signal value at a desired time. In addition, by changing the trace output format that specifies which of the signals to be traced has changed during trace collection, the trace amount can be further reduced as compared with the conventional method, and the trace processing can be suppressed. Can be performed at high speed, and the simulation can be performed at higher speed.

【0017】[0017]

【実施例】以下、図面を参照しながら本発明の実施例を
説明する。 (第1の実施例)まず、本発明の第1の実施例を説明す
る。
Embodiments of the present invention will be described below with reference to the drawings. (First Embodiment) First, a first embodiment of the present invention will be described.

【0018】(第1の実施例の主な構成・作用)本実施
例に関わる論理シミュレーション装置は、少くとも一つ
の信号値が変化したシミュレーション時刻と、前記シミ
ュレーション時刻で値が変化した各信号について、変化
前と変化後の信号値の排他的論理和(XOR)をトレー
ス結果として出力するトレース結果出力手段と、特定の
時刻における信号値から前記差分を用いて直前の信号値
を復元する手段を有する。
(Main Configuration and Operation of the First Embodiment) The logic simulation apparatus according to the present embodiment comprises a simulation time at which at least one signal value changes, and a signal at each value whose value changes at the simulation time. A trace result output unit that outputs an exclusive OR (XOR) of the signal values before and after the change as a trace result, and a unit that restores the immediately preceding signal value from the signal value at a specific time using the difference. Have.

【0019】本実施例によれば、あるシミュレーション
時刻までシミュレーションが進んだ時点で、トレース結
果出力手段が出力した信号値のXORとその時点での信
号値を用いて信号の直前値を復元することが可能とな
る。
According to this embodiment, at the time when the simulation has proceeded to a certain simulation time, the immediately preceding value of the signal is restored using the XOR of the signal value output by the trace result output means and the signal value at that time. Becomes possible.

【0020】また、トレース出力形式を変更することで
トレース出力量を小さくし、シミュレーション実行速度
の低下を低減することが可能となる。 (第1の実施例の効果)従来のトレース収集方法では、
値の変化した信号の識別値とその信号値をペアとして出
力していたが、シミュレーション実行を中断して、前時
刻の信号値を観測したい場合に直ちにその値を求めるこ
とができないという欠点があった。本実施例では、各シ
ミュレーション時刻で前時刻の信号値のXORをトレー
ス情報とすることによって、時刻を遡って信号値を計算
することが可能になる。
Further, by changing the trace output format, it is possible to reduce the amount of trace output and reduce the decrease in simulation execution speed. (Effect of First Embodiment) In the conventional trace collection method,
Although the identification value of the signal whose value has changed and the signal value are output as a pair, there is a disadvantage that when the simulation execution is interrupted and the signal value at the previous time is desired to be observed, the value cannot be obtained immediately. Was. In this embodiment, by using the XOR of the signal value of the previous time at each simulation time as trace information, it is possible to calculate the signal value retrospectively.

【0021】(第1の実施例の具体的説明)図1は、本
実施例に係る論理シミュレーション装置の概略構成を表
した図である。
(Specific Description of First Embodiment) FIG. 1 is a diagram showing a schematic configuration of a logic simulation apparatus according to this embodiment.

【0022】シミュレーション実行部11は、論理回路
のシミュレーションを実行する。トレース制御部12
は、シミュレーション実行部11からトレース対象の信
号値を受け取り、信号値の格納先を制御する。
The simulation executing section 11 executes a simulation of a logic circuit. Trace control unit 12
Receives the signal value of the trace target from the simulation execution unit 11 and controls the storage destination of the signal value.

【0023】第1のバッファ13と第2のバッファ14
は、トレース制御部12から出力される信号値を一時的
に保持する。トレース情報出力部15は、バッファ1
3、14が保持する信号値を比較してXOR値を計算す
る比較部151と、XOR値が0であるか否かを判定す
る判定部152とからなる。
First buffer 13 and second buffer 14
Temporarily holds the signal value output from the trace control unit 12. The trace information output unit 15
The comparison unit 151 compares the signal values held by the units 3 and 14 to calculate an XOR value, and the determination unit 152 determines whether the XOR value is 0.

【0024】トレース情報格納部16は、トレース制御
部12またはトレース情報出力部15からのトレース出
力を格納する。信号値復元部17は、シミュレーション
実行の停止後シミュレーションサイクルを遡って過去の
シミュレーションサイクルでの信号値を復元するもので
あり、復元済信号値を保持する第3のバッファ171
と、1時刻遡って信号値を計算する信号計算部172と
からなる。
The trace information storage section 16 stores a trace output from the trace control section 12 or the trace information output section 15. The signal value restoring unit 17 restores the signal value in the past simulation cycle by going back to the simulation cycle after the simulation execution is stopped, and the third buffer 171 holding the restored signal value.
And a signal calculation unit 172 that calculates a signal value going back one time.

【0025】本実施例では、信号は4値(0,1,X,
Z)の信号列とする。信号1個は、1バイトで表されて
いるとする。すなわち、信号値0、1、X、Zがそれぞ
れ“00000000”、“00000001”、“00000010”、“0000
0011”のビットパターンで表現されているとする。以
下、簡単のために、信号値は0、1、X、Zと書く。以
下では、AからPまでの16個の信号値がシミュレーシ
ョンサイクル0から5まで図2のような値をとる場合
に、これらの信号をトレース対象とした場合を例として
説明を行う。
In this embodiment, the signal has four values (0, 1, X,
Z). It is assumed that one signal is represented by one byte. That is, the signal values 0, 1, X, and Z are “00000000”, “00000001”, “00000010”, and “0000”, respectively.
0011 ". For simplicity, signal values are written as 0, 1, X, and Z. In the following, 16 signal values from A to P correspond to simulation cycle 0. In the case where these signals take values as shown in FIG. 2 from FIG.

【0026】これらの信号は上記のバイト表現で、図3
のように表されている。この16個の信号は4ワードで
表現されている。ここで、特許第1665055号で示
されているような、値が変化した信号に対して、信号識
別子と信号値をペアで格納する従来方式でトレースを収
集すると、トレース情報格納部16に格納されるトレー
ス結果は、図4のようになる。シミュレーションサイク
ル0では、すべての信号値が格納され、例えばシミュレ
ーションサイクル1では、0から1に変わった信号E、
Jの情報が格納される。
These signals are represented in the above byte representation,
It is represented as These 16 signals are represented by 4 words. Here, when a trace is collected by a conventional method of storing a signal identifier and a signal value as a pair for a signal whose value has changed as shown in Japanese Patent No. 1665055, the trace information is stored in the trace information storage unit 16. The trace result is as shown in FIG. In the simulation cycle 0, all signal values are stored. For example, in the simulation cycle 1, the signals E, which have changed from 0 to 1,
J information is stored.

【0027】本実施例では、トレース情報の収集のため
に、各時刻における信号の現在値と前時刻の信号値との
XOR値を用いる。図5に、図2の信号に対するXOR
値を示す。
In this embodiment, the XOR value of the current value of the signal at each time and the signal value at the previous time is used for collecting trace information. FIG. 5 shows an XOR for the signal of FIG.
Indicates a value.

【0028】本実施例におけるトレース処理の処理フロ
ーを図6を用いて説明する。まず、シミュレーションの
開始サイクルではステップS61で、シミュレーション
サイクルiを0として、信号値“0001000100010100”を
バッファ13とトレース情報格納部16に書き込む。次
に、ステップS62でシミュレーションサイクルiは1
に進む。ステップS63,S64で、バッファ14にシ
ミュレーションサイクル1での信号値“00011001010101
00”が格納される。次に、ステップS66により、比較
部151においてバッファ13とバッファ14の保持す
る信号値が比較され、XOR値“0000100001000000”が
S’に入る。ここで、ステップS67においてS’は0
でないのでNOとなり、ステップS68へ進んで、S’
の中で変化のあったワードに対応する信号値のみ格納す
る。具体的には、バッファ内のオフセットとそのワード
のXORの内容をトレース情報格納部16に出力する。
すなわち、図7に示すように変化のあったワードのバッ
ファ内オフセットを表す1ワードの整数とその部分のワ
ードのXOR値を組とする形式で出力する。シミュレー
ションサイクル1の場合では、1ワード目と2ワード目
に変化があるため、1,1ワード目のXOR値,2,2
ワード目のXOR値の順に出力する。すなわち、 00000000000000000000000000000001 00000001000000000000000000000000 00000000000000000000000000000010 00000000000000010000000000000000 となる。これを以下では、“1 1000 2 0100 ”のよう
に、オフセットの部分は10進数、ワードのXOR値の
部分は先に説明した0、1、X、Zの4値を用いて表現
する。図8に示すトレース出力結果の表示もこの表現に
基づいている。以後のシミュレーションサイクルでも同
様にして、ステップS62からステップS68までの処
理を行う。ここで、図8のようなトレースシミュレーシ
ョンサイクル3のように、前サイクルと値に変化が無い
場合は、ステップS66においてXOR値が0であるの
で、ステップS67においてYESとなり、トレース情
報としては何も出力しない。
The processing flow of the trace processing in this embodiment will be described with reference to FIG. First, in a simulation start cycle, a simulation cycle i is set to 0 and a signal value “0001000100010100” is written to the buffer 13 and the trace information storage unit 16 in step S61. Next, in step S62, the simulation cycle i is 1
Proceed to. In steps S63 and S64, the signal value “00011001010101” in the simulation cycle 1 is stored in the buffer 14.
Next, in step S66, the comparison unit 151 compares the signal values held in the buffers 13 and 14 and enters the XOR value “0000100001000000” in S ′. 'Is 0
Therefore, the answer is NO, and the process proceeds to step S68, where S ′
Only the signal value corresponding to the word that has changed in is stored. Specifically, the offset in the buffer and the contents of the XOR of the word are output to the trace information storage unit 16.
That is, as shown in FIG. 7, the data is output in a format in which an integer of one word indicating the offset in the buffer of the changed word and the XOR value of the part of the word are set. In the case of the simulation cycle 1, since there is a change in the first word and the second word, the XOR value of the first and first words, 2, 2
It outputs in the order of the XOR value of the word. That is, 00000000000000000000000000000001 00000001000000000000000000000000 00000000000000000000000000000010 00000000000000010000000000000000. In the following description, the offset portion is represented by a decimal number, and the word XOR value portion is represented by the four values of 0, 1, X, and Z described above, such as “1 1000 2 0100”. The display of the trace output result shown in FIG. 8 is also based on this expression. In the subsequent simulation cycle, the processing from step S62 to step S68 is similarly performed. Here, as in the trace simulation cycle 3 as shown in FIG. 8, when there is no change in the value from the previous cycle, the XOR value is 0 in step S66, so that the result in step S67 is YES, and there is no trace information. Do not output.

【0029】ここで、シミュレーションサイクル4でシ
ミュレーション実行を停止し、直前のサイクル3での信
号値を基にデバッグをしようとしたとする。シミュレー
ションサイクル4でI、Pの信号が更新されているが、
サイクル3での信号Pの値は、サイクル4での信号値お
よびトレース情報から得ようとすると、前記の従来方式
ではサイクル4以前で最後に信号Pが更新されたサイク
ル0まで遡らなくてはならない。つまり、直前のサイク
ルの信号値を得るために現時点での信号値およびトレー
ス情報だけでなく得ようとするサイクルよりさらに前の
サイクルの信号値およびトレース情報が必要になるので
ある。
Here, it is assumed that the simulation execution is stopped in the simulation cycle 4 and debugging is attempted based on the signal value in the immediately preceding cycle 3. Although the signals of I and P are updated in the simulation cycle 4,
In order to obtain the value of the signal P in the cycle 3 from the signal value and the trace information in the cycle 4, in the above-described conventional method, the signal P must be traced back to the last cycle 0 in which the signal P was updated before the cycle 4. . That is, in order to obtain the signal value of the immediately preceding cycle, not only the signal value and the trace information at the present time but also the signal value and the trace information of the cycle earlier than the cycle to be obtained are required.

【0030】一方、本方式ではシミュレーション停止時
にトレース制御部12に格納されているシミュレーショ
ンサイクル4での信号Pの値Zを信号値復元部17のバ
ッファ171に格納したのち、信号値計算部172でバ
ッファ171の内容Zと、シミュレーションサイクル4
でのトレース情報“2 X000 3 000Z ”から取り出した信
号Pの前時刻とのXORの内容ZとのXORを計算する
ことにより、シミュレーションサイクル3での信号Pの
値0を直ちに求めることができる。
On the other hand, in this method, when the simulation is stopped, the value Z of the signal P in the simulation cycle 4 stored in the trace control unit 12 is stored in the buffer 171 of the signal value restoration unit 17, and then the signal value calculation unit 172. The contents Z of the buffer 171 and the simulation cycle 4
The value 0 of the signal P in the simulation cycle 3 can be immediately obtained by calculating the XOR of the content Z of the XOR with the previous time of the signal P extracted from the trace information “2 X000 3 000Z” in the above.

【0031】つまり、本方式では前時刻の信号値と現時
刻の信号値のXOR値をトレース情報として持つため、
シミュレーションサイクルを1時刻遡るときには、まず
トレース情報格納部16に注目する信号のトレース情報
が出力されているかどうかを判断し、トレース情報格納
部16に出力がある場合は、バッファ171に保持され
ている現時刻の値とトレース情報格納部16に格納され
ているトレース情報とのXORを信号値計算部172で
計算し、トレース情報格納部16に出力がない場合には
バッファ171に保持されている現時刻の信号値をその
まま前時刻での信号値とすることにより直ちに前時刻の
信号値を取り出すことができる。また、得られた前時刻
の信号値をバッファ171に書き戻した後、上記処理を
繰り返すことにより、これより順次1時刻ずつ前の値に
遡ることが可能である。
That is, in this method, since the XOR value of the signal value at the previous time and the signal value at the current time is held as trace information,
When the simulation cycle goes back one time, first, it is determined whether or not the trace information of the signal of interest is output to the trace information storage unit 16. If the trace information storage unit 16 has the output, it is held in the buffer 171. The XOR of the current time value and the trace information stored in the trace information storage unit 16 is calculated by the signal value calculation unit 172. If there is no output in the trace information storage unit 16, the current value held in the buffer 171 is stored. If the signal value at the time is used as it is as the signal value at the previous time, the signal value at the previous time can be immediately extracted. Further, after the obtained signal value at the previous time is written back to the buffer 171, the above processing is repeated, whereby it is possible to sequentially go back to the previous value one time at a time.

【0032】さらに、本方式では、現時刻の信号値とそ
の直前値の変化しているワードのみをトレース情報とす
るため、従来法よりトレース情報が少なくなることが期
待できるが、特に値が変化した信号が特定ワード内に集
中しているときには、その効果が顕著に現れることが期
待される。
Further, in the present system, since only the word at which the signal value at the current time and the value immediately before it change are used as trace information, it can be expected that the trace information will be less than in the conventional method. When such a signal is concentrated in a specific word, the effect is expected to be prominent.

【0033】なお、本実施例では1時刻ごとにトレース
収集を行うようにしたが、N 時刻ごとにのみトレース収
集を行うこともできる。例えば、シミュレーションサイ
クルが1nsで、100nsのクロック周期の論理回路
をクロック変化のときのみ信号値を知りたいときにはN
=50とすればよい。これは、トレース制御部12をN
時刻ごとにバッファに出力するように変更することで容
易に実現できる。このようにするとトレース量は1/N
になる。
In this embodiment, the trace is collected every hour, but the trace can be collected only every N times. For example, if the simulation cycle is 1 ns and the logic circuit of a clock cycle of 100 ns wants to know the signal value only when the clock changes, N
= 50. This means that the trace control unit 12
This can be easily realized by changing the output to the buffer for each time. In this case, the trace amount is 1 / N
become.

【0034】また、本実施例ではシミュレーション開始
サイクル0からトレース収集を開始するようにしたが、
シミュレーションの途中からトレース収集を開始するこ
とも可能である。これもトレース制御部12の変更によ
り容易に実現できる。
In this embodiment, trace collection is started from the simulation start cycle 0.
It is also possible to start the trace collection in the middle of the simulation. This can also be easily realized by changing the trace control unit 12.

【0035】以上のようにすれば、シミュレーション速
度の低下をさらに小さく抑えることができる。 (第1の実施例の変形例(その1))図1のトレース情
報出力部15は、トレース情報格納部16に出力する情
報として、シミュレーションサイクル1以降でバッファ
内のオフセット(1ワードの整数)とそのワードのXO
Rの内容を出力するかわりに、図9に示すような形式で
バッファ内のオフセット(1ワードの整数)とワード数
(1ワードの整数)とそのワード数分のXORの内容
(32ビット×ワード数分のビット列)を出力する。
In this manner, the reduction in the simulation speed can be further suppressed. (Modification 1 of the First Embodiment (Part 1)) The trace information output unit 15 in FIG. 1 uses, as information to be output to the trace information storage unit 16, an offset (an integer of one word) in a buffer after the simulation cycle 1. And the XO of that word
Instead of outputting the contents of R, the offset in the buffer (an integer of one word), the number of words (an integer of one word), and the XOR contents (32 bits × word) for the number of words in the format shown in FIG. (A bit string of several minutes) is output.

【0036】図2の信号をトレースの対象とした場合の
トレース情報格納部16への出力は図10のようにな
る。シミュレーションサイクル1の場合では、1ワード
目から2ワード目までの2ワード分変化があるので1,
変化分ワード数(2),1ワード目のXOR値,2ワー
ド目のXOR値の順に出力する。すなわち、 00000000000000000000000000000001 00000000000000000000000000000010 00000001000000000000000000000000 00000000000000010000000000000000 を出力する。これを以下では、“1 2 1000 0100 ”のよ
うに、オフセットおよびワード数の部分は10進数、ワ
ードのXOR値の部分は先に説明した0、1、X、Zの
4値で表現する。図10のトレース出力結果の表示もこ
の表現に基づいている。シミュレーションサイクル3の
ように、前サイクルと値に変化が無いときは、第1の実
施例と同様にトレース情報としては何も出力しない。
When the signal of FIG. 2 is to be traced, the output to the trace information storage section 16 is as shown in FIG. In the case of the simulation cycle 1, since there is a change of two words from the first word to the second word,
The number of words corresponding to the change (2), the XOR value of the first word, and the XOR value of the second word are output in this order. That is, 00000000000000000000000000000001 00000000000000000000000000000010 00000001000000000000000000000000 00000000000000010000000000000000 is output. In the following, the offset and the number of words are represented by a decimal number, and the XOR value of the word is represented by the four values of 0, 1, X, and Z described above, such as "1 2 1000 0100". The display of the trace output result in FIG. 10 is also based on this expression. When there is no change in the value from the previous cycle as in the simulation cycle 3, nothing is output as trace information as in the first embodiment.

【0037】本方式では、値が変化した信号が連続する
ワード内に集中しているときには、トレース情報を少な
くする効果が顕著になると考えられる。 (第1の実施例の変形例(その2))図1のトレース情
報出力部15は、トレース情報格納部16に出力する情
報として、シミュレーションサイクル1以降でバッファ
内のオフセット(1ワードの整数)とそのワードのXO
Rの内容を出力するかわりに、図11に示すような形式
でバッファ内のどのワードが変化したかを示すビットマ
ップ(4ビット)と、変化したワードのXORの内容
(32ビット)を出力する。
In the present system, when signals whose values have changed are concentrated in continuous words, the effect of reducing trace information is considered to be significant. (Modification of First Embodiment (No. 2)) The trace information output unit 15 in FIG. 1 uses, as information to be output to the trace information storage unit 16, an offset (an integer of one word) in the buffer after the simulation cycle 1. And the XO of that word
Instead of outputting the contents of R, a bitmap (4 bits) indicating which word in the buffer has changed in the format shown in FIG. 11 and the contents of the XOR of the changed word (32 bits) are output. .

【0038】図2の信号をトレースの対象とした場合の
トレース情報格納部16への出力は図12のようにな
る。シミュレーションサイクル1では、1ワード目と2
ワード目に変化があるため、ビットマップ,1ワード目
のXOR値,2,2ワード目のXOR値の順に出力す
る。ビットマップは上位1ビット目と上位2ビット目に
“1”を記した4ビットの“0110”となり、従って
0110 00000001000000000000000
000000000 00000000000000010000000000000000 を出力
する。これを以下では、“0110 1000 0100”のようにビ
ットマップの部分は2進数、ワードのXOR値の部分は
先に説明した0、1、X、Zの4値で表現する。
When the signal shown in FIG. 2 is to be traced, the output to the trace information storage section 16 is as shown in FIG. In simulation cycle 1, the first word and the second word
Since there is a change in the word, the bit map, the XOR value of the first word, and the XOR value of the second and second words are output in this order. The bit map is a 4-bit “0110” with “1” written in the upper first bit and the upper 2 bits.
0110 00000001000000000000000
000000000 00000000000000010000000000000000 is output. In the following, the bitmap portion is represented by a binary number, such as “0110 1000 0100”, and the word XOR value portion is represented by the four values of 0, 1, X, and Z described above.

【0039】図12のトレース出力結果の表示もこの表
現に基づいている。シミュレーションサイクル3のよう
に、前サイクルと値に変化が無いときは、第1の実施例
と同様にトレース情報としては何も出力しない。
The display of the trace output result in FIG. 12 is also based on this expression. When there is no change in the value from the previous cycle as in the simulation cycle 3, nothing is output as trace information as in the first embodiment.

【0040】本方式では、値が変化したワードを指定す
るためのビット数が信号値の個数分で済むため、一般的
に上記3方式よりさらにトレース情報が少なくなること
が期待できる。
In this method, the number of bits for designating the word whose value has changed is only required to be equal to the number of signal values, so that generally less trace information can be expected than in the above three methods.

【0041】なお、本方式の説明ではビットマップは、
変化したワードを上位からのビットと対応させたが、変
化したワードを下位からのビットと対応させることも考
えられる。
In the description of this method, the bitmap is
Although the changed word is made to correspond to the bit from the high order, the changed word may be made to correspond to the bit from the low order.

【0042】(第1の実施例の変形例(その3))図1
のトレース情報出力部15は、トレース情報格納部16
に出力する情報として、シミュレーションサイクル1以
降でバッファ内のオフセット(1ワードの整数)とその
ワードのXORの内容を出力するかわりに、図13に示
すような形式で変化した信号の識別子(文字列)とその
信号のXORの内容(ビット列)を出力する。
(Modification of First Embodiment (Part 3)) FIG.
The trace information output unit 15 of the
Instead of outputting the offset (an integer of one word) in the buffer and the contents of the XOR of the word after the simulation cycle 1 as the information to be output, the identifier (character string) of the signal changed in the format shown in FIG. ) And the content of XOR of the signal (bit string).

【0043】図2の信号をトレースの対象とした場合の
トレース情報格納部16への出力は図14のようにな
る。シミュレーションサイクル1では、信号Eと信号J
に変化があるため、E,EのXOR値,J,JのXOR
値の順に出力する。すなわち、 E 00000001 J 00000001 をトレース情報格納部16に出力する。これを以下で
は、“E1 J1 ”のように信号のXOR値の部分は先に説
明した0、1、X、Zの4値で表現する(識別子はその
まま文字列で表現する)。図14のトレース出力結果の
表示もこの表現に基づいている。シミュレーションサイ
クル3のように、前サイクルと値に変化が無いときは、
第1の実施例と同様にトレース情報としては何も出力し
ない。
When the signal of FIG. 2 is to be traced, the output to the trace information storage unit 16 is as shown in FIG. In simulation cycle 1, signal E and signal J
, The XOR value of E, E, the XOR of J, J
Output in order of value. That is, E 00000001 and J 00000001 are output to the trace information storage unit 16. In the following, the XOR value portion of the signal, such as "E1 J1", is represented by the four values of 0, 1, X, and Z described above (the identifier is represented by a character string as it is). The display of the trace output result in FIG. 14 is also based on this expression. As in simulation cycle 3, when there is no change in the value from the previous cycle,
Nothing is output as trace information as in the first embodiment.

【0044】本方式は、トレース情報の量に関しては、
従来方式とは変わらないが、従来方式では通常不可能で
あった直前値を直ちに求めることが可能な方式である。
また、上記4方式と比較すると、ワード単位でトレース
情報を持たないため、値が変化する信号の個数が極めて
少ない場合には、上記4方式(従来法、第1の実施例と
その変形例(その1)〜(その2))よりさらにトレー
ス情報が少なくなることが期待できる。
In this method, the amount of trace information is
Although this is not different from the conventional method, it is a method that can immediately obtain the immediately preceding value, which is usually impossible in the conventional method.
Further, compared with the above four methods, since there is no trace information in word units, if the number of signals whose values change is extremely small, the four methods (conventional method, the first embodiment and its modifications ( It can be expected that the trace information is further reduced as compared to 1) and 2).

【0045】(第1の実施例の変形例(その4))本方
式では、図1のトレース情報出力部15の構成は、比較
部151と判定部152に、同じXOR内容を持つ信号
の個数をカウントするカウンタ153を追加した図15
に置き換わる。
(Modification of First Embodiment (Part 4)) In the present system, the configuration of the trace information output unit 15 in FIG. 1 is such that the comparison unit 151 and the determination unit 152 determine the number of signals having the same XOR content. FIG. 15 with a counter 153 for counting
Is replaced by

【0046】図15のトレース情報出力部15は、トレ
ース情報格納部16に出力する情報として、シミュレー
ションサイクル1以降でバッファ内のオフセットとその
ワードのXORの内容を出力するかわりに、図16に示
すような形式でトレースの対象の信号が取り得るXOR
値(ビット列)と、XORの内容がその値に等しい信号
の個数(1ワードの整数)と、その信号の識別子(文字
列)を出力する。
The trace information output unit 15 shown in FIG. 15 outputs, as information to be output to the trace information storage unit 16, the offset in the buffer and the contents of the XOR of the word after the simulation cycle 1, instead of the contents shown in FIG. XOR that the signal to be traced can take in such a format
It outputs a value (bit string), the number of signals whose XOR content is equal to the value (an integer of one word), and an identifier (character string) of the signal.

【0047】図2の信号をトレースの対象とした場合の
トレース情報格納部16への出力は図17のようにな
る。シミュレーションサイクル1では、信号Eと信号J
に変化があり、しかもそのXOR値はともにビット列
“00000001”となるため、XOR値,2,E,Jの順に
出力する。すなわち、 00000001 00000000000000000000000000000010 E J をトレース情報格納部16に出力する。これを以下で
は、“1 2 EJ”のように信号のXOR値の部分は先に説
明した0、1、X、Zの4値、信号の個数の部分は10
進数で表現する(識別子はそのまま文字列で表現す
る)。
The output to the trace information storage unit 16 when the signal in FIG. 2 is to be traced is as shown in FIG. In simulation cycle 1, signal E and signal J
, And their XOR values are both bit strings “00000001”, so that XOR values, 2, E, and J are output in that order. That is, 00000001 00000000000000000000000000000010 EJ is output to the trace information storage unit 16. In the following, the XOR value part of the signal is the four values of 0, 1, X, and Z described above and the signal number part is 10 like “1 2 EJ”.
Expressed as a base number (identifiers are expressed as strings as they are).

【0048】図17のトレース出力結果の表示も、この
表現に基づいている。シミュレーションサイクル3のよ
うに、前サイクルと値に変化が無いときは、第1の実施
例と同様にトレース情報としては何も出力しない。
The display of the trace output result in FIG. 17 is also based on this expression. When there is no change in the value from the previous cycle as in the simulation cycle 3, nothing is output as trace information as in the first embodiment.

【0049】本方式では、同一時刻において同一の差分
値が多数含まれるような場合には上記5方式(従来法、
第1の実施例、その変形例(その1〜その3))よりさ
らにトレース情報が少なくなることが期待できる。
In this method, when a large number of the same difference values are included at the same time, the above five methods (conventional method,
It can be expected that the trace information is further reduced as compared with the first embodiment and its modifications (Nos. 1 to 3).

【0050】(第2の実施例)次に、本発明の第2の実
施例を説明する。 (第2の実施例の主な構成・作用)本実施例に関わる論
理シミュレーション装置は、少くとも一つの信号値が変
化したシミュレーション時刻と、前記シミュレーション
時刻で値が変化した各信号について、変化前と変化後の
信号値の差分をトレース結果として出力するトレース結
果出力手段と、特定の時刻における信号値から前記差分
を用いて直前の信号値を復元する手段を有する。ここで
の差分は、信号の最新値から直前値を引き、それを信号
値範囲で割った剰余である。
(Second Embodiment) Next, a second embodiment of the present invention will be described. (Main Configuration and Operation of the Second Embodiment) The logic simulation apparatus according to the present embodiment includes a simulation time when at least one signal value changes, and a signal before the change at each signal whose value changes at the simulation time. A trace result output means for outputting a difference between the signal value after the change and the signal value after the change as a trace result, and means for restoring the immediately preceding signal value from the signal value at a specific time using the difference. The difference here is a remainder obtained by subtracting the immediately preceding value from the latest value of the signal and dividing the result by the signal value range.

【0051】本実施例によれば、あるシミュレーション
時刻までシミュレーションが進んだ時点で、トレース結
果出力手段が出力した信号値のXORとその時点での信
号値を用いて信号の直前値を復元することが可能とな
る。
According to this embodiment, at the time when the simulation has proceeded to a certain simulation time, the immediately preceding value of the signal is restored using the XOR of the signal value output by the trace result output means and the signal value at that time. Becomes possible.

【0052】また、トレース出力形式を変更することで
トレース出力量を小さくし、シミュレーション実行速度
の低下を低減することが可能になる。 (第2の実施例の効果)従来のトレース収集方法では、
値の変化した信号の識別値とその信号値をペアとして出
力していたが、シミュレーション実行を中断して、前時
刻の信号値を観測したい場合に直ちにその値を求めるこ
とができないという欠点があった。本実施例では、各シ
ミュレーション時刻での前記剰余をトレース情報とする
ことによって、時刻を遡って信号値を計算することを可
能にする。
Further, by changing the trace output format, it is possible to reduce the amount of trace output and reduce the reduction in simulation execution speed. (Effect of the Second Embodiment) In the conventional trace collection method,
Although the identification value of the signal whose value has changed and the signal value are output as a pair, there is a disadvantage that when the simulation execution is interrupted and the signal value at the previous time is desired to be observed, the value cannot be obtained immediately. Was. In the present embodiment, by using the remainder at each simulation time as trace information, it is possible to calculate a signal value retrospectively.

【0053】(第2の実施例の具体的説明)図18は、
本実施例に係る論理シミュレーション装置の概略構成を
表した図である。本実施例は、第1の実施例とは異なる
方法で、現シミュレーションサイクルの信号値と前シミ
ュレーションサイクルの信号値を比較して差分情報を取
得するものである。
(Specific Description of the Second Embodiment) FIG.
FIG. 2 is a diagram illustrating a schematic configuration of a logic simulation apparatus according to the embodiment. This embodiment is different from the first embodiment in that the signal value of the current simulation cycle is compared with the signal value of the previous simulation cycle to obtain difference information.

【0054】図18のシミュレーション実行部181、
第1のバッファ183、第2のバッファ184、トレー
ス情報格納部186は、それぞれ図1のシミュレーショ
ン実行部11、第1のバッファ13、第2のバッファ1
4、トレース情報格納部16と同様である。
The simulation execution unit 181 shown in FIG.
The first buffer 183, the second buffer 184, and the trace information storage unit 186 are respectively the simulation execution unit 11, the first buffer 13, and the second buffer 1 of FIG.
4. Same as the trace information storage unit 16.

【0055】トレース情報出力部185は、第1のバッ
ファ183と第2のバッファ184が保持する信号値の
差を取り、それを信号値範囲で割った剰余を計算する比
較部1851と、比較部1851で計算された値が0で
あるか否かを判定する判定部1852とからなる。
The trace information output unit 185 calculates a difference between the signal values held by the first buffer 183 and the second buffer 184 and calculates a remainder obtained by dividing the difference by a signal value range. A determination unit 1852 for determining whether or not the value calculated in 1851 is 0.

【0056】信号値復元部187は、復元実行時にシミ
ュレーションサイクル0に最も近い時刻の復元済信号値
を保持する第3のバッファ1871と、さらに1時刻前
の信号値を計算する信号値計算部1872と、信号値計
算部1872が参照するテーブルを格納するテーブル格
納部1873とからなる。
The signal value restoring section 187 has a third buffer 1871 for holding the restored signal value at the time closest to the simulation cycle 0 at the time of restoration execution, and a signal value calculating section 1872 for calculating the signal value one time earlier. And a table storage unit 1873 that stores a table referred to by the signal value calculation unit 1872.

【0057】本実施例では、信号Sの時刻tにおける信
号値St と、前時刻の信号値St-1から次の式(1)で
表される値を計算し、それをトレース情報の収集のため
に用いる。
In this embodiment, a value represented by the following equation (1) is calculated from the signal value St at time t of the signal S and the signal value St-1 at the previous time, and the calculated value is used to collect trace information. Used for

【0058】 (St −St-1 ) mod Rs (1) ここで、Rsは信号Sの信号値範囲である。本実施例で
は4値の信号を用いているため、Rs=4である。信号
値0、1、X、Zに対して式(1)により求められる値
を図19に示す。本実施例では、テーブル格納部187
3に、この図19のテーブルが格納される。
(St−St−1) mod Rs (1) where Rs is a signal value range of the signal S. In this embodiment, Rs = 4 because a quaternary signal is used. FIG. 19 shows values obtained by Expression (1) for the signal values 0, 1, X, and Z. In the present embodiment, the table storage unit 187
3 stores the table shown in FIG.

【0059】本実施例では、トレース対象の信号は第1
の実施例と同様、図2に示す16個の信号とする。図2
0は、図2の信号に対する式(1)の計算結果を表して
いる。
In this embodiment, the signal to be traced is the first signal.
As in the case of the first embodiment, the 16 signals shown in FIG. FIG.
0 represents the calculation result of the equation (1) for the signal of FIG.

【0060】本実施例の処理フローは、上記第1の実施
例と同様に、図6に従う。ステップS61において、シ
ミュレーションサイクルiを0として、シミュレーショ
ンの開始サイクル0でトレース情報格納部186に出力
する情報は上記第1の実施例と同じであり、サイクル0
でのAからPの16個の信号値列“0001000100010100”
(各信号の値を0、1、X、Zを用いて表記する;以後
も、信号値列の表記法は同じとする)をバッファ183
に格納する点も同じである。
The processing flow of this embodiment follows FIG. 6, as in the first embodiment. In step S61, the simulation cycle i is set to 0, and the information to be output to the trace information storage unit 186 at the start cycle 0 of the simulation is the same as that of the first embodiment.
Sequence of 16 signal values from A to P at “0001000100010100”
(The value of each signal is represented by using 0, 1, X, and Z; the notation of the signal value sequence is the same hereinafter.)
Is the same.

【0061】次に、ステップS62によりシミュレーシ
ョンサイクルiを1として、ステップS63,S64に
よってサイクル1では、バッファ184に信号値列“00
01100101010100”が格納される。ステップS66によ
り、比較部1851において式(1)の計算を実行す
る。シミュレーションサイクル1の場合では“00001000
01000000”になる。ここで、ステップS67においてN
Oとなるため、ステップS68へ進んで、変化のあった
ワードに対応する信号値のみ格納する。具体的には、バ
ッファ内のオフセット(整数)とそのワードの式(1)
の結果(ビット列)をトレース情報格納部186に出力
する。
Next, the simulation cycle i is set to 1 in step S62, and in the cycle 1 in steps S63 and S64, the signal value sequence "00" is stored in the buffer 184.
01100101010100 "is stored. In step S66, the calculation of the expression (1) is performed in the comparing unit 1851. In the case of the simulation cycle 1," 00001000 "
01000000 ". Here, in step S67, N
Since the result is O, the process proceeds to step S68, and only the signal value corresponding to the changed word is stored. Specifically, the offset (integer) in the buffer and the expression (1) of the word
Is output to the trace information storage unit 186.

【0062】すなわち、図21に示すような変化のあっ
たワードのバッファ内オフセットを表す1ワードの整数
とその部分のワードの式(1)の計算結果を組とする形
式で出力する。シミュレーションサイクル1の場合で
は、1ワード目と2ワード目に変化があるため、1,1
ワード目の式(1)の結果,2,2ワード目の式(1)
の順に出力する。すなわち、 00000000000000000000000000000001 00000001000000000000000000000000 00000000000000000000000000000010 00000000000000010000000000000000 となる。これを以下では、“1 1000 2 0100 ”のよう
に、オフセットの部分は10進数、ワードの式(1)の
結果の部分は先に説明した0、1、X、Zの4値を用い
た16進数で表現する。図22に示すトレース出力結果
の表示もこの表現に基づいている。以後のシミュレーシ
ョンサイクルでも同様にして、ステップS62からステ
ップS68までの処理を行う。ここで、図22のような
トレースシミュレーションサイクル3のように、前サイ
クルと値に変化が無い場合は、ステップS66において
式(1)の結果が0であるので、ステップS67におい
てYESとなり、トレース情報としては何も出力しな
い。
That is, as shown in FIG. 21, an integer of one word representing the offset in the buffer of the changed word and the calculation result of the expression (1) of the word in that part are output as a set. In the case of the simulation cycle 1, there is a change in the first word and the second word.
As a result of expression (1) of the word, expression (1) of the second and second words
Output in the order of That is, 00000000000000000000000000000001 00000001000000000000000000000000 00000000000000000000000000000010 00000000000000010000000000000000. In the following, the offset part uses a decimal number, and the result part of the word equation (1) uses four values of 0, 1, X, and Z described above, such as "1 1000 2 0100". Expressed in hexadecimal. The display of the trace output result shown in FIG. 22 is also based on this expression. In the subsequent simulation cycle, the processing from step S62 to step S68 is similarly performed. Here, as in the trace simulation cycle 3 as shown in FIG. 22, when there is no change in the value from the previous cycle, since the result of the equation (1) is 0 in step S66, the result is YES in step S67, and the trace information Does not output anything.

【0063】本方式では注目する時刻より1時刻前の信
号値を次のようにして求めることができる。例えば、シ
ミュレーションサイクル4でシミュレーションの実行を
停止し、直前のシミュレーションサイクル3での信号I
の値を求める場合を考える。まずトレース情報格納部1
86への出力がその信号に関してあるかどうかを判断
し、トレース情報格納部186に出力がある場合は、信
号値計算部1872が図19のテーブルを格納するテー
ブル格納部1873を参照し、図19のテーブルの最新
値の部分に対応するxの項目が最新値に等しく、かつ式
(1)の部分に対応する(x−y) mod 4の項目
が、トレース情報格納部186に出力されている式
(1)の値と等しいエントリを見つけ、そのエントリの
yの値を直前値とし、トレース情報格納部186に出力
がない場合は、バッファ1871に保持されている現時
刻の信号値をそのまま前時刻での信号値とすることによ
り直ちに直前値を得ることができる。
In this method, the signal value one time before the time of interest can be obtained as follows. For example, the simulation execution is stopped in the simulation cycle 4 and the signal I in the immediately preceding simulation cycle 3 is stopped.
Consider the case of finding the value of First, the trace information storage unit 1
It is determined whether there is an output to the signal 86 or not, and if there is an output in the trace information storage unit 186, the signal value calculation unit 1872 refers to the table storage unit 1873 that stores the table of FIG. The item of x corresponding to the portion of the latest value in the table is equal to the latest value, and the item of (xy) mod 4 corresponding to the portion of Expression (1) is output to the trace information storage unit 186. When an entry equal to the value of the expression (1) is found, the value of y of the entry is set as the immediately preceding value, and when there is no output in the trace information storage unit 186, the signal value of the current time held in the buffer 1871 is used as it is. The immediately preceding value can be obtained immediately by setting the signal value at the time.

【0064】この場合では、シミュレーションサイクル
4での信号Iの値1およびトレース情報格納部186へ
の出力値Xを用いて、図19のテーブルのxの項目がシ
ミュレーションサイクル4での信号Iの値1に等しく、
かつ、(x−y) mod4の項目がトレース情報格納
部186への出力値Xに等しいエントリを見つけ、シミ
ュレーションサイクル3での信号Iの値をy=Zより直
ちに求めることができる。
In this case, using the value 1 of the signal I in the simulation cycle 4 and the output value X to the trace information storage unit 186, the item x in the table of FIG. Equal to one,
In addition, an entry in which the item of (xy) mod 4 is equal to the output value X to the trace information storage unit 186 is found, and the value of the signal I in the simulation cycle 3 can be immediately obtained from y = Z.

【0065】なお、上記第1の実施例のようにN時刻ご
とにのみトレース収集を行う、またはシミュレーション
の途中からトレース収集を開始するようにトレース制御
部182を変更することも容易であり、このようにすれ
ばシミュレーション速度の低下をさらに小さく抑えるこ
とができる。
Note that it is easy to perform trace collection only at every N times as in the first embodiment, or to change the trace control unit 182 so as to start trace collection in the middle of a simulation. By doing so, the decrease in the simulation speed can be further suppressed.

【0066】(第2の実施例の変形例(その1))第2
の実施例でトレース情報出力形式を上記第1の実施例の
変形例(その1)と同様に変形する。
(Modification of the Second Embodiment (Part 1))
In the third embodiment, the trace information output format is modified in the same manner as the first modification of the first embodiment.

【0067】(第2の実施例の変形例(その2))第2
の実施例でトレース情報出力形式を上記第1の実施例の
変形例(その2)と同様に変形する。
(Modification of Second Embodiment (Part 2))
In the third embodiment, the trace information output format is modified in the same manner as the modification (part 2) of the first embodiment.

【0068】(第2の実施例の変形例(その3))第2
の実施例でトレース情報出力形式を上記第1の実施例の
変形例(その3)と同様に変形する。
(Modification of Second Embodiment (Part 3))
In the third embodiment, the trace information output format is modified in the same manner as the modification (part 3) of the first embodiment.

【0069】(第2の実施例の変形例(その4))第2
の実施例でトレース情報出力形式を上記第1の実施例の
変形例(その4)と同様に変形する。また、本発明は上
述した各実施例に限定されるものではなく、その要旨を
逸脱しない範囲で、種々変形して実施することができ
る。
(Modification of the Second Embodiment (Part 4))
In the embodiment, the trace information output format is modified in the same manner as the modification (part 4) of the first embodiment. Further, the present invention is not limited to the above-described embodiments, and can be implemented with various modifications without departing from the scope of the invention.

【0070】[0070]

【発明の効果】以上説明したように本発明によれば、論
理シミュレーションの際のトレース収集において、各シ
ミュレーション時刻での信号値の差分値をトレース収集
することによって、特定の時刻の信号値から論理回路の
デバッグ作業を容易にすることが可能となる。
As described above, according to the present invention, in the trace collection at the time of the logic simulation, the difference value of the signal value at each simulation time is trace-collected, so that the logic value is calculated from the signal value at a specific time. This makes it easier to debug the circuit.

【0071】また、トレース収集の際、トレース対象の
信号のうちどの信号が変化したかを指定する方式を変更
することによって、トレース量を従来法と比較して更に
小さく抑えることができ、トレース処理を高速に行うこ
とができ、シミュレーション実行をより高速にすること
が可能となる。
Further, by changing the method of designating which of the signals to be traced has changed during trace collection, the amount of trace can be further reduced as compared with the conventional method. Can be performed at high speed, and the simulation can be performed at higher speed.

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

【図1】本発明の第1の実施例の構成を示すブロック図FIG. 1 is a block diagram showing a configuration of a first exemplary embodiment of the present invention.

【図2】トレース対象の信号の一例を示す図FIG. 2 is a diagram illustrating an example of a signal to be traced;

【図3】図2の信号値のバイト表現を示す図FIG. 3 shows a byte representation of the signal values of FIG. 2;

【図4】従来法による図2の信号値に対するトレース情
報を示す図
FIG. 4 is a diagram showing trace information for the signal values of FIG. 2 according to a conventional method.

【図5】図2の信号値における前サイクルとのXOR値
を示す図
FIG. 5 is a diagram showing an XOR value of a signal value of FIG. 2 with a previous cycle.

【図6】トレース情報出力の処理の流れを示すフローチ
ャート
FIG. 6 is a flowchart showing a flow of processing for outputting trace information;

【図7】第1の実施例におけるトレース出力形式を示す
FIG. 7 is a diagram showing a trace output format according to the first embodiment;

【図8】第1の実施例に基づく図2の信号値に対するト
レース情報を示す図
FIG. 8 is a diagram showing trace information for the signal values of FIG. 2 based on the first embodiment.

【図9】第1の実施例の変形例(その1)におけるトレ
ース出力形式を示す図
FIG. 9 is a diagram showing a trace output format in a modification (part 1) of the first embodiment;

【図10】変形例(その1)に基づく図2の信号値に対
するトレース情報を示す図
FIG. 10 is a diagram showing trace information with respect to the signal values of FIG. 2 based on a modification (No. 1);

【図11】第1の実施例の変形例(その2)におけるト
レース出力形式を示す図
FIG. 11 is a diagram showing a trace output format in a modified example (part 2) of the first embodiment;

【図12】変形例(その2)に基づく図2の信号値に対
するトレース情報を示す図
FIG. 12 is a diagram showing trace information for the signal values of FIG. 2 based on a modification (No. 2);

【図13】第1の実施例の変形例(その3)におけるト
レース出力形式を示す図
FIG. 13 is a diagram showing a trace output format in a modified example (part 3) of the first embodiment;

【図14】変形例(その3)に基づく図2の信号値に対
するトレース情報を示す図
FIG. 14 is a diagram showing trace information for the signal values of FIG. 2 based on a modification (No. 3);

【図15】第1の実施例の変形例(その4)におけるト
レース情報出力部の構成を示すブロック図
FIG. 15 is a block diagram showing a configuration of a trace information output unit according to a modification (part 4) of the first embodiment;

【図16】変形例(その4)におけるトレース出力形式
を示す図
FIG. 16 is a diagram showing a trace output format in a modified example (4).

【図17】変形例(その4)に基づく図2の信号値に対
するトレース情報を示す図
FIG. 17 is a diagram showing trace information for the signal values in FIG. 2 based on a modification (No. 4);

【図18】本発明の第2の実施例の構成を示すブロック
FIG. 18 is a block diagram showing a configuration of a second exemplary embodiment of the present invention.

【図19】第2の実施例において取り得る信号の値に対
応してトレース情報格納部に出力される差分値の組み合
せを示す図
FIG. 19 is a diagram illustrating a combination of difference values output to a trace information storage unit corresponding to possible signal values in the second embodiment.

【図20】第2の実施例において図18のトレース情報
出力部の比較部において計算される前時刻の信号との差
分値を示す図
20 is a diagram showing a difference value between a signal at a previous time and a signal calculated in a comparison unit of the trace information output unit in FIG. 18 in the second embodiment.

【図21】第2の実施例におけるトレース出力形式を示
す図
FIG. 21 is a diagram showing a trace output format in the second embodiment.

【図22】第2の実施例に基づく図2の信号値に対する
トレース情報を示す図
FIG. 22 is a diagram showing trace information for the signal values of FIG. 2 based on the second embodiment.

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

11,181…シミュレーション実行部、12,182
…トレース制御部、13,14,183,184…バッ
ファ、15,185…トレース情報出力部、151,1
851…比較部、152,1852…判定部、153…
カウンタ、16,186…トレース情報格納部、17,
187…信号値復元部、171,1871…バッファ、
172,1872…信号計算部、1873…テーブル格
納部
11, 181: simulation execution unit, 12, 182
... Trace control unit, 13, 14, 183, 184. Buffer, 15, 185. Trace information output unit, 151, 1
851 comparison section, 152, 1852 determination section, 153
Counter, 16, 186... Trace information storage unit, 17,
187: signal value restoring unit; 171, 1871: buffer;
172, 1872: signal calculation unit, 1873: table storage unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 磯部 庄三 神奈川県川崎市幸区小向東芝町1番地 株式会社東芝研究開発センター内 (56)参考文献 特開 昭59−154374(JP,A) 特開 平4−293167(JP,A) 特開 平5−151305(JP,A) 特開 平6−68192(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06F 17/50 JICSTファイル(JOIS)──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Shozo Isobe 1 Toshiba, Komukai Toshiba-cho, Saiwai-ku, Kawasaki-shi, Kanagawa Prefecture (56) References JP-A-59-154374 (JP, A) JP-A-4-293167 (JP, A) JP-A-5-151305 (JP, A) JP-A-6-68192 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G06F 17/50 JICST file (JOIS)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】第1の信号値を一時記憶する第1のバッフ
ァ手段と、第2の信号値を一時記憶する第2のバッファ
手段と、前記第1および第2のバッファ手段からの前記
第1、第2の信号値を比較する比較手段と、前記比較手
段の出力結果からトレース情報を求め、そのトレース情
報を格納する格納手段と、特定のシミュレーション時刻
における信号値を一時記憶する第3のバッファ手段から
の前記信号値と前記トレース情報とに基づき、直前の信
号値に復元する復元手段とを有し、論理回路を記述した
情報に基づき、論理シミュレーションを所定のシミュレ
ーション単位時間ずつ進めながら繰り返し実行する論理
シミュレーション方法であって、 前記比較手段の出力結果から、少なくともシミュレーシ
ョン時刻と各信号値とからなるシミュレーション結果を
出力するステップと、 前記ステップにて得られたシミュレーション結果のう
ち、少なくとも一つの信号値が直前のシミュレーション
結果における値から変化した場合、当該シミュレーショ
ン結果におけるシミュレーション時刻に対応して、変化
した信号を特定する情報と、前記変化した信号について
変化前の信号値と現時刻の信号値との差分情報を前記ト
レース情報として前記格納手段に格納するステップと、 前記ステップで格納されたトレース情報に基づき、特定
のシミュレーション時刻における信号値から直前のシミ
ュレーション時刻での信号値を前記復元手段によって復
元するステップとを具備することを特徴とする論理シミ
ュレーション方法。
A first buffer for temporarily storing a first signal value;
And a second buffer for temporarily storing a second signal value
Means from said first and second buffer means.
Comparing means for comparing first and second signal values;
Trace information is obtained from the output result of the stage, and the trace information is obtained.
Information storing means, and a specific simulation time
From the third buffer means for temporarily storing the signal value at
Of the immediately preceding signal based on the signal value of
And a restoring means for restoring the logic value, and the logic circuit is described.
Based on the information, a logic simulation can be performed
Logic that executes repeatedly while moving forward by unit time
A simulation method, wherein at least a simulation is performed based on an output result of the comparing means.
Simulation results consisting of the
And outputting a simulation result obtained in the step
In other words, at least one signal value is
If it changes from the value in the result,
Corresponding to the simulation time in the
Information specifying the changed signal and the changed signal
The difference information between the signal value before the change and the signal value at the current time is stored in the
A step of storing the information as race information in the storage means, and specifying the information based on the trace information stored in the step.
From the signal value at the simulation time
The signal value at the time of
Logic stains comprising the steps of:
Method.
【請求項2】第1の信号値を一時記憶する第1のバッフ
ァ手段と、第2の信号値を一時記憶する第2のバッファ
手段と、前記第1および第2のバッファ手段からの前記
第1、第2の信号値の差を信号値範囲で割った剰余を求
めて比較する比較手段と、前記比較手段の出力結果から
トレース情報を求め、そのトレース情報を格納する格納
手段と、特定のシミュレーション時刻における信号値を
一時記憶する第3のバッファ手段と前記第1の信号値と
前記第2の信号値の差分情報を記 憶したテーブルとを有
して、前記トレース情報に基づき前記テーブルを参照し
て前記特定のシミュレーション時刻における信号値から
直前の信号値に復元する復元手段とを有し、論理回路を
記述した情報に基づき、論理シミュレーションを所定の
シミュレーション単位時間ずつ進めながら繰り返し実行
する論理シミュレーション方法であって、 前記比較手段の出力結果から、少なくともシミュレーシ
ョン時刻と各信号値とからなるシミュレーション結果を
出力するステップと、 前記ステップにて得られたシミュレーション結果のう
ち、少なくとも一つの信号値が直前のシミュレーション
結果における値から変化した場合、当該シミュレーショ
ン結果におけるシミュレーション時刻に対応して、変化
した信号を特定する情報と、前記変化した信号について
変化前の信号値と現時刻の信号値との差を信号値範囲で
割った剰余から得られる差分情報とを前記トレース情報
として前記格納手段に格納するステップと、 前記ステップで格納されたトレース情報から前記テーブ
ルを参照して、特定のシミュレーション時刻における信
号値から直前のシミュレーション時刻での信号値を前記
復元手段によって復元するステップとを具備することを
特徴とする論理シミュレーション方法。
2. A first buffer for temporarily storing a first signal value.
And a second buffer for temporarily storing a second signal value
Means from said first and second buffer means.
Calculate the remainder obtained by dividing the difference between the first and second signal values by the signal value range
And a comparison means for comparing
Find trace information and store the trace information
Means and the signal value at a particular simulation time
Third buffer means for temporarily storing the first signal value;
Yes a table memorize the differential information of the second signal value
And refer to the table based on the trace information.
From the signal value at the specific simulation time
Restoration means for restoring to the immediately preceding signal value,
Based on the described information, perform a logic simulation
Repeated execution while proceeding by simulation unit time
A logic simulation method based on an output result of the comparing means.
Simulation results consisting of the
And outputting a simulation result obtained in the step
In other words, at least one signal value is
If it changes from the value in the result,
Corresponding to the simulation time in the
Information specifying the changed signal and the changed signal
The difference between the signal value before the change and the signal value at the current time in the signal value range
The difference information obtained from the divided remainder and the trace information
Wherein the step of storing in the storage means, the table from the trace information stored in the step as
File at the specified simulation time
From the signal value at the previous simulation time
Restoring by restoring means.
A featured logic simulation method.
JP6221631A 1994-09-16 1994-09-16 Logic simulation method Expired - Fee Related JP2896315B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6221631A JP2896315B2 (en) 1994-09-16 1994-09-16 Logic simulation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6221631A JP2896315B2 (en) 1994-09-16 1994-09-16 Logic simulation method

Publications (2)

Publication Number Publication Date
JPH0887534A JPH0887534A (en) 1996-04-02
JP2896315B2 true JP2896315B2 (en) 1999-05-31

Family

ID=16769800

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6221631A Expired - Fee Related JP2896315B2 (en) 1994-09-16 1994-09-16 Logic simulation method

Country Status (1)

Country Link
JP (1) JP2896315B2 (en)

Also Published As

Publication number Publication date
JPH0887534A (en) 1996-04-02

Similar Documents

Publication Publication Date Title
US5051911A (en) Apparatus for effecting simulation of a logic circuit and method for producing a semiconductor device using the simulation approach
JPH07177005A (en) Bit pattern detector circuit and bit pattern detecting method
JP2896315B2 (en) Logic simulation method
JP3061486B2 (en) Data sort processing system
JP2853431B2 (en) Delay analysis result display method
JP2001060240A (en) Format correcting method and data converting method
JP2970600B2 (en) Logic simulation method
JPH04239338A (en) Measuring system for microprogram comprehension rate
JP3596696B2 (en) Information retrieval device
JP2845478B2 (en) Logic circuit delay time analyzer
JP3847836B2 (en) Character string search method and apparatus
JP2724235B2 (en) Variable name inference device
JP2806459B2 (en) A logic simulation device that can evaluate flip-flops
JP3064552B2 (en) Arithmetic control simulation method
JPH06348539A (en) Microprogram check system
JP2610028B2 (en) Voiced and semi-voiced sound conversion processor
US6484288B1 (en) Statistics signature generation and analysis
JP3670681B2 (en) Functional simulation method
JPH0744560A (en) Logical structure recognition processing system in document processor
JPH0916635A (en) Logic simulation device
JPS63205760A (en) Test coverage system for logical simulation
JPH0573635A (en) Tracing back system for event driven logical circuit simulator
JPH07110830A (en) Method for simulating logical circuit
JPH07141178A (en) Object accessing device
JPH06149635A (en) Method for additional processing of record

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees