JP2924968B2 - Time interactive simulation device - Google Patents

Time interactive simulation device

Info

Publication number
JP2924968B2
JP2924968B2 JP1186125A JP18612589A JP2924968B2 JP 2924968 B2 JP2924968 B2 JP 2924968B2 JP 1186125 A JP1186125 A JP 1186125A JP 18612589 A JP18612589 A JP 18612589A JP 2924968 B2 JP2924968 B2 JP 2924968B2
Authority
JP
Japan
Prior art keywords
time
memory
simulation
counter
signal
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
JP1186125A
Other languages
Japanese (ja)
Other versions
JPH0352037A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1186125A priority Critical patent/JP2924968B2/en
Publication of JPH0352037A publication Critical patent/JPH0352037A/en
Application granted granted Critical
Publication of JP2924968B2 publication Critical patent/JP2924968B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Description

【発明の詳細な説明】 〔概要〕 過去の論理値を検証するための時間双方向シミュレー
ション方式に関し、 回路動作を時間方向に進めるばかりでなく、過去に遡
ることも可能な時間双方向シミュレーション方式を提供
することを目的とし、 論理回路をシミュレーションモデルに変換し、該シミ
ュミレーションモデルを用いて該論理回路をシミュレー
ションするシミュミレーション装置であって、元々のシ
ミュレーション対象である論理回路内の各レジスタ部
を、メモリと,クロック時刻を計時するカウンタと,前
記メモリと前記カウンタを制御する制御手段とからなる
シミュレーションモデルに変換する変換手段を有し、前
記制御手段は、任意のシミュレーション開始クロック時
刻を前記カウンタに初期設定し、前記クロック時刻を前
記カウンタに計時させながら、該計時クロック時刻にお
ける前記各レジスタ部のとるべき値を変化させ、前記カ
ウンタが計時する各クロック時刻Tにおける前記各レジ
スタ部のとるべき状態を,前記メモリのアドレスTに書
き込み・記憶させると共に、前記メモリの指定された任
意のアドレス内容を読み出し可能な構成を有し、任意の
クロック時刻Nにおける前記各レジスタ部のシミュレー
ション結果を前記メモリのアドレスNから読み出すこと
により、前記論理回路の任意のクロック時刻のシミュレ
ーション結果をランダムに検証すること、前記論理回路
のシミュレーション結果を任意のクロック時刻から順方
向に検証すること、及び前記論理回路のシミュレーショ
ン結果を該シミュレーションの流れとは逆の方向に遡り
ながら検証するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] Regarding a time bidirectional simulation method for verifying a past logical value, a time bidirectional simulation method that can not only advance the circuit operation in the time direction but also go back to the past. A simulation device for converting a logic circuit into a simulation model and simulating the logic circuit using the simulation model, wherein each register in the logic circuit to be originally simulated is provided. Unit for converting a simulation start clock time into a simulation model including a memory, a counter for measuring a clock time, and a control means for controlling the memory and the counter. Initialize the counter and set the clock time to the While the timer is counting, the value to be taken by each of the register units at the clock time is changed, and the state to be taken by each of the register units at each clock time T counted by the counter is written into the address T of the memory. The memory has a configuration capable of reading an arbitrary specified address content of the memory, and reading a simulation result of each of the register units at an arbitrary clock time N from an address N of the memory, thereby obtaining the logic. Verifying the simulation result of the circuit at an arbitrary clock time at random, verifying the simulation result of the logic circuit in a forward direction from the arbitrary clock time, and reversing the simulation result of the logic circuit in the reverse of the simulation flow. To verify while going back to To.

〔産業上の利用分野〕[Industrial applications]

本発明は、論理回路の動作を計算機上で実現するため
の論理シミュレーション方式に係り、更に詳しくは、過
去の論理値を検証するための時間双方向シミュレーショ
ン方式に関する。
The present invention relates to a logic simulation method for realizing the operation of a logic circuit on a computer, and more particularly, to a time bidirectional simulation method for verifying a past logic value.

論理シミュレーションは設計された論理回路を集積回
路上で実現する前にその機能を計算機上で実現する技術
である。
Logic simulation is a technique for realizing a designed logic circuit on a computer before realizing the function on an integrated circuit.

一般に、論理回路は、組み合わせ回路と、組み合わせ
回路の結果を保持するレジスタ部から成る順序回路であ
って、論理シミュレーションは回路内に生ずる任意の時
刻の論理状態、すなわち各レジスタ部にセットされた論
理状態を検証するものである。対象回路を忠実に表現す
る論理シミュレーションは回路の設計ミスを発見した
り、修正するために用いられるが、シミュレーション途
中で誤動作を発見してからその原因を摘出する過程にお
ける検査の良さが重要となる。従って、回路動作を時間
方向に進めたり、戻したりすることが可能な、時間双方
向シミュレーション方式の要求が極めて重要となる。
In general, a logic circuit is a sequential circuit including a combinational circuit and a register unit for holding a result of the combinational circuit. A logic simulation is performed at a logic state at an arbitrary time generated in the circuit, that is, a logic state set in each register unit. Verify the state. Logic simulation that faithfully represents the target circuit is used to find and correct circuit design errors, but good inspection in the process of finding a malfunction during the simulation and then extracting the cause is important. . Therefore, a demand for a time bidirectional simulation method capable of advancing or returning a circuit operation in the time direction is extremely important.

〔従来の技術〕[Conventional technology]

論理シミュレーションの方式には、コンパイル方式と
イベント駆動方式がある。コンパイル方式は各素子毎に
その演算の命令コードを素子の実行順序のレベル付けを
行って順に生成する方式であり、イベント駆動方式は現
時点での信号値の変化する集合と、その集合の影響で次
に変化する信号の信号線と信号値の対の集合を論理回路
の接続状態を含めて忠実に計算機内で表現する方式であ
る。
The logic simulation method includes a compilation method and an event drive method. The compile method is a method in which the instruction code of the operation for each element is sequentially generated by assigning the level of the execution order of the elements, and the event drive method is based on a set in which the signal value changes at the present time and the influence of the set. Then, a set of pairs of signal lines and signal values of changing signals is faithfully represented in the computer including the connection state of the logic circuit.

イベント駆動方式では、シミュレーション内に対象回
路の構造を記述するためのメモリのデータ構造の表現が
あり、時刻T0で求められた信号値がそれ以前に求められ
た値と異なっている時に事象が発生したものとして、そ
の事象の発生を時間の中で記述する。そのために、メモ
リ内に各時刻において発生する事象のつながりをポイン
タで結合した事象リストを作成することになる。
In event-driven system, there is representation of the data structure of the memory for describing the structure of the target circuit in the simulation, an event when the signal value obtained at time T 0 is different from the value obtained before that As occurrence, the occurrence of the event is described in time. For this purpose, an event list is created in the memory in which a series of events occurring at each time is linked by a pointer.

しかし、従来方式では回路動作を時間方向に進める論
理シミュレータを用いており、回路内部のレジスタの内
容は各時刻でセットされた内容のみを記憶するので、時
刻を遡るシミュレーションにはなっていない。例えば、
時刻100の点で時刻99に戻したい場合であっても、改め
て、時刻0から時刻99までのシミュレーションを再実行
する必要がある。
However, in the conventional method, a logic simulator that advances the circuit operation in the time direction is used, and since the contents of the registers in the circuit store only the contents set at each time, the simulation does not go back to the time. For example,
Even if it is desired to return to time 99 at the point of time 100, it is necessary to re-execute the simulation from time 0 to time 99.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

従って、従来方式は対象となる論理回路が大規模化
し、入力系列が長くなると、非常に時間がかかるという
問題点がある。事象リストによって回路の動作の大部分
をすべての時刻について記憶する方式であっても、回路
動作を時間方向に進めるだけであるので、非常に大容量
の記憶装置が必要になるばかりでなく、回路の設計ミス
を発見修正するための検索時間に非常に多くの時間がか
かるという問題点が生じていた。
Therefore, the conventional method has a problem that it takes much time when the target logic circuit becomes large-scale and the input sequence becomes long. Even in the method in which most of the circuit operation is stored for all times by the event list, the circuit operation is only advanced in the time direction, so that not only a very large capacity storage device is required, but also the circuit There has been a problem that it takes a lot of time to search and find design errors.

本発明は回路動作を時間方向に進めるばかりでなく、
過去に遡ることも可能な時間双方向シミュレーション方
式を目的とする。
The present invention not only advances the circuit operation in the time direction,
It aims at a time bidirectional simulation method that can go back to the past.

〔課題を解決するための手段〕[Means for solving the problem]

第1図は本発明の原理図である。 FIG. 1 is a diagram illustrating the principle of the present invention.

変換手段12は、元々のシミュレーション対象である論
理回路10内の各レジスタ部11を、メモリ2と,クロック
時刻を計時するカウンタ1と,前記メモリ2と前記カウ
ンタ1を制御する制御手段6とからなるシミュレーショ
ンモデルに変換する。
The conversion unit 12 converts each register unit 11 in the logic circuit 10 to be originally simulated from the memory 2, the counter 1 that measures clock time, and the control unit 6 that controls the memory 2 and the counter 1. Into a simulation model.

前記制御手段6は、任意のシミュレーション開始クロ
ック時刻を前記カウンタ1に初期設定し、前記クロック
時刻を前記カウンタ1に計時させながら、該計時クロッ
ク時刻における前記各レジスタ部11のとるべき値を変化
させ、前記カウンタ1が計時する各クロック時刻Tにお
ける前記各レジスタ部11のとるべき状態を,前記メモリ
2のアドレスTに書き込み・記憶させると共に、前記メ
モリ2の指定された任意のアドレスの内容を読み出し可
能な構成を有する。
The control means 6 initializes an arbitrary simulation start clock time in the counter 1 and changes the value to be taken by each of the register units 11 at the clock time while causing the counter 1 to time the clock time. The state to be taken by each of the register sections 11 at each clock time T counted by the counter 1 is written and stored in an address T of the memory 2 and the contents of a specified arbitrary address in the memory 2 are read out. Has a possible configuration.

そして、任意のクロック時刻Nにおける前記各レジス
タ部11のシミュレーション結果を前記メモリ2のアドレ
スNから読み出すことにより、前記論理回路10の任意の
クロック時刻のシミュレーション結果をランダムに検証
すること、前記論理回路10のシミュレーション結果を任
意のクロック時刻から順方向に検証すること、及び前記
論理回路10のシミュレーション結果を該シミュレーショ
ンの流れとは逆の方向に遡りながら検証することを可能
とする。
Then, by reading the simulation result of each register unit 11 at an arbitrary clock time N from the address N of the memory 2, the simulation result of the logic circuit 10 at an arbitrary clock time is randomly verified. It is possible to verify the simulation result of the logic circuit 10 in the forward direction from an arbitrary clock time and to verify the simulation result of the logic circuit 10 while going back in the direction opposite to the flow of the simulation.

〔作用〕[Action]

本発明では、元々のシミュレーション対象である論理
回路10内の各レジスタ部11を、変換手段12により、メモ
リ2と,クロック時刻を計時するカウンタ1と,前記メ
モリ2と前記カウンタ1を制御する制御手段6とからな
るシミュレーションモデルに変換する。そして、前記制
御手段6が、任意のシミュレーション開始クロック時刻
を前記カウンタ1に初期制定し、前記クロック時刻を前
記カウンタ1に計時させながら、該計時クロック時刻に
おける前記各レジスタ部11のとるべき値を変化させ、前
記カウンタ1が計時する各クロック時刻Tにおける前記
各レジスタ部11のとるべき状態を,前記メモリ2のアド
レスTに書き込み・記憶させると共に、前記メモリ2の
指定された任意のアドレスの内容を読み出すように制御
する。そして、任意のクロック時刻Nにおける前記各レ
ジスタ部11のシミュレーション結果を前記メモリ2のア
ドレスNから読み出すことにより、前記論理回路10の任
意のクロック時刻のシミュレーション結果をランダムに
検証すること、前記論理回路10のシミュレーション結果
を任意のクロック時刻から順方向に検証すること、及び
前記論理回路10のシミュレーション結果を該シミュレー
ションの流れとは逆の方向に遡りながら検証することを
可能としている。
In the present invention, each register unit 11 in the logic circuit 10 to be originally simulated is converted by the conversion unit 12 into a memory 2, a counter 1 for measuring clock time, and a control for controlling the memory 2 and the counter 1. It is converted into a simulation model comprising the means 6. Then, the control means 6 initializes an arbitrary simulation start clock time in the counter 1 and causes the counter 1 to count the clock time while determining the value to be taken by each of the register units 11 at the measured clock time. The state to be taken by each register section 11 at each clock time T counted by the counter 1 is written and stored in an address T of the memory 2, and the content of a specified arbitrary address in the memory 2 is changed. Is controlled to be read. Then, by reading the simulation result of each register unit 11 at an arbitrary clock time N from the address N of the memory 2, the simulation result of the logic circuit 10 at an arbitrary clock time is randomly verified. It is possible to verify the simulation result of 10 in the forward direction from an arbitrary clock time and to verify the simulation result of the logic circuit 10 while going back in the direction opposite to the flow of the simulation.

〔実施例〕〔Example〕

次に本発明の実施例を図面を参照して詳細に説明す
る。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

第2図は本発明の概念を説明する実施例図である。同
図において(a)は論理シミュレーションを行う対象回
路に含まれるレジスタであり、同図(b)はそのレジス
タをモデル化した場合のレジスタモデルである。レジス
タはNビットのデータのDin1,Din2,・・・,DinNをクロ
ックの立ち上がりでセットするレジスタであり、その出
力はDout1,Dout2,・・・,DoutNで表現される。ビットi
のデータDiniは、DタイプのフリップフロップDFFiのDi
入力に接続され、クロック信号はclkに入力され、出力
信号DoutiはQiから出力される。clkに入力されるクロッ
ク信号が立ち上がると、その時点での入力信号Diniがフ
リップフロップDFFiにセットされ、Doutiがセットされ
た内容として出力される。このようにDタイプのフリッ
プフロップから構成されるnビットのレジスタは実際に
設計されているものであり、論理シミュレーション上で
もシミュレーションされる対象のレジスタである。本発
明では、このレジスタは(b)図に示されるレジスタモ
デルにモデル化される。(b)図のレジスタモデルはカ
ウンタ1とメモリ2及びランダム回路6から構成され
る。カウンタ1はメモリ2に対するアドレスカウンタで
あり、カウンタ出力D0がメモリADRSに接続され、カウン
タ1の内容によって指定されるアドレスに対してメモリ
2は書き込み、または読み出しが行われる。すなわち、
カウンタ内容によって指定されるアドレスにライトイネ
ーブル(WE)がイネーブル状態であるならば、そのアド
レスにDin1からDinNの入力信号が書き込まれる。ライト
イネーブルがディスイネーブルであって読み出し状態で
あるならば、そのカウンタ1の内容によって指定される
アドレスの内容がメモリ2の出力Dout1からDoutNに出力
される。ただし、メモリはチップセレクタ端子CSが1の
とき、読み出しまたは書き込みの出来る状態であるとす
る。
FIG. 2 is an embodiment diagram for explaining the concept of the present invention. In the figure, (a) shows a register included in a target circuit for performing a logic simulation, and (b) shows a register model when the register is modeled. The register is a register for setting N-bit data D in 1, D in 2,..., D in N at the rising edge of the clock, and outputs D out 1, D out 2 ,. Expressed by N. Bit i
D in i is the D type flip-flop DFFi Di
Connected to the input, the clock signal is input to clk and the output signal D out i is output from Qi. When the clock signal input to clk rises, the input signal D in i at that time is set in the flip-flop DFFi, is outputted as the descriptions D out i is set. As described above, the n-bit register composed of the D-type flip-flop is actually designed, and is a register to be simulated in the logic simulation. In the present invention, this register is modeled on the register model shown in FIG. (B) The register model shown in the figure comprises a counter 1, a memory 2, and a random circuit 6. The counter 1 is an address counter for the memory 2, the counter output D 0 is connected to the memory ADRS, and the memory 2 writes or reads to an address specified by the contents of the counter 1. That is,
If the write enable (WE) is enabled at the address specified by the counter contents, the input signals D in 1 to D in N are written to that address. If the write enable is disabled and in the read state, the contents of the address specified by the contents of the counter 1 are output to the outputs D out 1 to D out N of the memory 2. However, it is assumed that the memory is in a readable or writable state when the chip selector terminal CS is 1.

このように、本発明は対象回路内部である同期回路の
レジスタ部分を(b)のようにメモリ2とクロック時刻
を表すカウンタ1でモデル化する。そしてあるクロック
時刻Tの状態をそのメモリ2のアドレスTに格納するよ
うに動作させる。すなわち、時間方向に進める場合は、
クロックによりカウンタ1が1加算され、その内容をア
ドレスとして入力の値をWE=1の時にメモリに書き込
み、WE=0で出力に放出する。すなわち、カウンタ1は
CLOCKのクロックがカウンタのclk端子に入力されている
ので、時間方向に進める場合は、クロックが入力される
とカウンタが1加算され、その内容がD0を介して出力さ
れ、メモリ2のADRS端子に与えられる。クロックが立ち
上がってから反転回路4の出力にはその遅延時間後にク
ロック信号の反転信号が生じる。そして、反転回路3の
出力が1であるならば、クロック信号そのものもアンド
回路5の入力端子に入力され、その反転出力もそのアン
ド回路5に入力されているので、アンド回路5の出力の
ライトイネーブル信号WEは正のパルスが発生し、ライト
イネーブル状態になる。従って、クロックによりカウン
タが1加算され、それをアドレスとしてのDin1からDinN
の値をWE=1の時にメモリ2を書き込むことになる。そ
して、ラインイネーブルWEの1の期間はわずかなパルス
幅であるから、パルス生成後にWE=0となってDout1か
らDoutNにそのメモリ2の内容が放出される。
As described above, in the present invention, the register part of the synchronous circuit inside the target circuit is modeled by the memory 2 and the counter 1 representing the clock time as shown in FIG. Then, an operation is performed so that the state at a certain clock time T is stored in the address T of the memory 2. In other words, when proceeding in the time direction,
The counter 1 is incremented by 1 according to the clock, and the content of the counter is used as an address to write the input value into the memory when WE = 1, and to output it to the output when WE = 0. That is, the counter 1
Since the clock of the CLOCK is input to the clk terminal of the counter, if the clock is input, the counter is incremented by 1 when the clock is input, the content is output via D0, and the content is output to the ADRS terminal of the memory 2. Given. After the clock rises, an inverted signal of the clock signal is generated at the output of the inverting circuit 4 after a delay time. If the output of the inverting circuit 3 is 1, the clock signal itself is also input to the input terminal of the AND circuit 5, and the inverted output is also input to the AND circuit 5, so that the output of the AND circuit 5 is written. The enable signal WE generates a positive pulse and enters a write enable state. Thus, the counter is incremented by one by the clock, D in N it from D in 1 as an address
Is written into the memory 2 when WE = 1. Then, since the first period of the line enable WE is a small pulse width, the contents of the memory 2 from D out 1 becomes WE = 0 to D out N is released after the pulse generator.

任意のクロック時間に戻したい場合には、カウンタ1
に設定時刻のTをD1に入力させる。そして、MOD端子に
入力する時刻設定信号7を1としてカウンタ1をセット
モードにする事により、その設定時刻Tの内容をカウン
タに書き込む。時刻設定信号7が1である場合には、反
転回路3の出力は0となってアンド回路5の出力も0と
なり、WE=0、すなわち、読み出しモードになる。従っ
て、メモリ2のアドレスは設定された時刻Tを表現する
カウンタ1のアドレスTによってアドレスされ、その内
容がDout1からDoutNに読み出される。この事は、任意の
クロック時間に戻すことが可能であることを表現し、時
刻Tのレジスタの内容がメモリ2から読み出されること
を意味する。すなわち、時刻Tの内容がメモリ2から出
力されることにより、(a)図のレジスタの出力に接続
された組込合わせ回路に対する論理シミュレーションを
行うことができる。この時刻Tの論理シミュレーション
結果が出力され、このことより、簡単に過去の時刻Tの
状態に復帰することができることになる。
To return to an arbitrary clock time, use the counter 1
Input the T of the set time to D1. By setting the time setting signal 7 input to the MOD terminal to 1 and setting the counter 1 to the set mode, the contents of the set time T are written in the counter. When the time setting signal 7 is 1, the output of the inverting circuit 3 becomes 0 and the output of the AND circuit 5 also becomes 0, and WE = 0, that is, the read mode is set. Therefore, the address of the memory 2 is addressed by the address T of counter 1 which represent the time T set, the contents of which are read out from the D out 1 to D out N. This means that it is possible to return to an arbitrary clock time, which means that the contents of the register at time T are read from the memory 2. That is, by outputting the contents of the time T from the memory 2, it is possible to perform a logic simulation for the built-in combination circuit connected to the output of the register in FIG. The result of the logic simulation at the time T is output, which makes it possible to easily return to the state at the time T in the past.

第3図(a)は本発明の論理シミュレーション方式に
用いられる対象回路の実施例図であり、第3図(b)は
第3図(a)の実施例図に対する時間双方向シミュレー
ションモデルの実施例図である。第3図(a)の回路に
おいて、DFF1、DFF2、DFF3はDタイプのフリップフロッ
プで全体として3ビットのレジスタを構成している。CL
OCK信号は各フリップフロップのclkに入力されるクロッ
ク信号である。D1,D2,D3はその入力端子であり、そのう
ちD2とD3は外部から入力される*ENABLEとDATA−INとい
う信号を受ける。D1に入力される信号はDATA−OUTとい
う信号であり、この信号はナンドゲートg4の出力であ
る。下のランダム回路8は入力がレジスタの出力に接続
され、その出力が同じレジスタの第1番目のDFF1の入力
になっている。反転回路g1の入力はQ2であり、そのQ2は
ナンドゲートg2の一方の端子に接続され、g2の他の入力
はQ3である。またナンドゲートg3はg1の出力及びQ1に接
続されている。g2とg3の出力がナンドゲートg4の入力で
あり、そのg4の出力がDATA−OUTとしてフィードバック
された形でDFF1の入力になっている。このように与えら
れた順序回路は、ランダム回路8すなわち、組み合わせ
回路であるg1,g2,g3,g4とその組み合わせ回路に接続さ
れた同期回路のレジスタから構成される。
FIG. 3 (a) is an embodiment diagram of a target circuit used in the logic simulation method of the present invention, and FIG. 3 (b) is an implementation of a time bidirectional simulation model for the embodiment diagram of FIG. 3 (a). It is an example figure. In the circuit of FIG. 3 (a), DFF1, DFF2, and DFF3 are D-type flip-flops and constitute a 3-bit register as a whole. CL
The OCK signal is a clock signal input to clk of each flip-flop. D1, D2, and D3 are input terminals of which D2 and D3 receive externally input signals * ENABLE and DATA-IN. The signal input to D1 is a signal called DATA-OUT, which is the output of the NAND gate g4. The input of the lower random circuit 8 is connected to the output of the register, and its output is the input of the first DFF1 of the same register. The input of the inverting circuit g1 is Q2, which is connected to one terminal of the NAND gate g2, and the other input of g2 is Q3. The NAND gate g3 is connected to the output of g1 and Q1. The outputs of g2 and g3 are the inputs of the NAND gate g4, and the output of g4 is the input of DFF1 in the form of being fed back as DATA-OUT. The sequential circuit provided in this manner is composed of the random circuit 8, that is, g1, g2, g3, and g4, which are combination circuits, and a register of a synchronous circuit connected to the combination circuit.

このような順序回路を本発明の時間双方向シミュレー
ションを用いた場合のモデルが第3図(b)である。対
象回路にもともと含まれる組み合わせ回路のg1,g2,g3,g
4はそのまま写像されているが、対象回路に含まれる3
つのDタイプのフリップフロップ、すなわちレジスタは
(b)図のレジスタモデルに置き換えられ、カウンタと
メモリの接続に変換される。メモリ20の入力は3ビット
であり、D1,D2,D3である。入力D1は、組み合わせ回路の
出力であるg4の出力線に接続され、入力D2,D3はそれぞ
れ対象回路の外部入力である*ENABLEとDATA−INとなっ
ている。また対象回路の出力はQ1,Q2,Q3であるから、そ
れに対応してメモリ20の出力もQ1,Q2,Q3となっている。
すなわち、Q1はg3の入力になり、Q2はg1とg2の入力にな
り、Q3はg2の他方の入力となっている。メモリ20の出力
であるQ1,Q2,Q3は第3図(a)のDタイプのフリップフ
ロップの出力であるQ1,Q2,Q3と対応している。そしてこ
のメモリ20のアドレスを与えるのがカウンタ19であり、
それを制御するものが反転回路22,22及びアンドゲート2
4である。カウンタ19のD1端子は設定時刻を入力し、MOD
は時刻設定端子である。メモリ20にはクロック時刻Tの
状態をアドレスTに格納するように動作する。時間方向
に進める場合は、時刻設定モードは0であり、従って、
アンドゲート24の中央の端子には1が入力される。この
時カウンタ19は設定時刻をセットできない状態であり、
クロックが入力されるたびにカウントアップの状態にな
る。クロックが立ち上がるとクロック信号はそのままア
ントゲート24に入力され、さらに、その反転出力が同じ
アンドゲート24に入力されるため、メモリ20のWE信号、
すなわち、ライトイネーブル信号には反転回路23の遅延
時間に対応するWE=1のパルスが入力される。この時、
メモリ20の入力であるD1,D2,D3にはそれぞれg4の出力及
び外部入力である*ENABLEとDATA−INの信号が書き込ま
れる。これはちょうど、第3図(a)の回路においてク
ロック信号が立ち上がった状態でのレジスタに入力され
るDATA−OUT信号、ENABLE信号及びDATA−INの信号のセ
ットに対応する。対象回路ではこれらセットされた内容
はQ1,Q2,Q3に出力される。これと同様に、第3図(b)
の回路ではメモリ20からの内容がQ1,Q2,Q3として与えら
れる。この場合、レジスタの遅延時間とメモリの遅延時
間とが対応することになる。対象回路ではDタイプフリ
ップフロップの出力はランダム回路8に入力され、Q1,Q
2,Q3の論理状態に対応する論理がナンドゲートg4から出
力される。これと同様に第3図(b)においてもg4の出
力端子にはメモリ20から出力されるQ1,Q2,Q3の論理状態
で決まる内容が出力される。メモリ20の出力状態Q1,Q2,
Q3は対象回路のQ1,Q2,Q3と同じ論理状態であるから、g4
から出力される論理状態も対象回路の出力と同じにな
る。g4の出力は対象回路ではD1に入力される。それに対
応して第3図(b)の出力はメモリ20のD1端子に入力さ
れる。対象回路では次のクロックの立ち上がりによっ
て、このD1の論理状態がDFF1にセットされ、前のDFF1の
内容は消された状態になる。しかし、第3図(b)の時
間双方向シミュレーションモデルではカウンタ19の値は
アドレスカウントとして+1されている。すなわち、再
びクロックが立ち上がり、ライトイネーブルがパルスと
して出力されるため、そのクロックの立ち上がりでカウ
ントアップされたアドレス、すなわち前のアドレスより
も1だけインクリメントされたアドレスにD1の内容が書
き込まれる。この時もし、外部入力のDATA−INや*ENAB
LE信号も更新されていればカウントアップされたアドレ
スに新しい内容が書き込まれる。前のクロックの状態の
D1,D2,D3は対象回路ではDタイプのフリップフロップか
ら消えてしまうが、モデル上ではメモリ20を用いている
ために前のアドレスに保持されて残ることになる。従っ
て、もしカウンタ19の内容を更新する前の値に設定しな
おせば、過去の時刻における対象回路のレジスタ内容が
再び設定できることになる。すなわち、カウンタ19に設
定時刻として任意の値Tをセットすれば、そのセットし
た設定時刻Tに対応する内容をメモリ20から出力するこ
とが可能となる。すなわち、時刻設定端子を1にしてそ
の時の設定時刻をD1からセットすれば、セットされた内
容がD0からメモリのアドレスに与えられ、その時の内容
がメモリ20の出力Q1,Q2,Q3から出力される。なお、時刻
設定端子が1である場合には反転回路22の出力は0であ
るからWE=0となって読み出しモードとなる。
FIG. 3 (b) shows a model when such a sequential circuit uses the time bidirectional simulation of the present invention. G1, g2, g3, g of the combinational circuit originally included in the target circuit
4 is mapped as it is, but 3 included in the target circuit
The two D-type flip-flops, ie, registers, are replaced by the register model shown in FIG. The input of the memory 20 is 3 bits and is D1, D2, D3. The input D1 is connected to the output line of g4 which is the output of the combinational circuit, and the inputs D2 and D3 are * ENABLE and DATA-IN which are external inputs of the target circuit. Since the outputs of the target circuit are Q1, Q2, and Q3, the outputs of the memory 20 are correspondingly Q1, Q2, and Q3.
That is, Q1 is the input of g3, Q2 is the input of g1 and g2, and Q3 is the other input of g2. The outputs Q1, Q2, and Q3 of the memory 20 correspond to the outputs Q1, Q2, and Q3 of the D-type flip-flop in FIG. The counter 19 gives the address of the memory 20.
What controls it is the inverting circuits 22, 22 and AND gate 2.
4 The set time is input to the D1 terminal of the counter 19 and the MOD
Is a time setting terminal. The memory 20 operates to store the state at the clock time T at the address T. When proceeding in the time direction, the time setting mode is 0, and therefore,
1 is input to the center terminal of the AND gate 24. At this time, the counter 19 cannot set the set time,
Each time a clock is input, it counts up. When the clock rises, the clock signal is directly input to the ant gate 24, and its inverted output is input to the same AND gate 24.
That is, a pulse of WE = 1 corresponding to the delay time of the inversion circuit 23 is input to the write enable signal. At this time,
The output of g4 and the signals of * ENABLE and DATA-IN, which are external inputs, are written into the inputs D1, D2, and D3 of the memory 20, respectively. This corresponds to a set of the DATA-OUT signal, the ENABLE signal, and the DATA-IN signal input to the register when the clock signal rises in the circuit of FIG. In the target circuit, these set contents are output to Q1, Q2, and Q3. Similarly, FIG. 3 (b)
In this circuit, the contents from the memory 20 are given as Q1, Q2, and Q3. In this case, the delay time of the register corresponds to the delay time of the memory. In the target circuit, the output of the D-type flip-flop is input to the random circuit 8, and Q1, Q
2, The logic corresponding to the logic state of Q3 is output from the NAND gate g4. Similarly, in FIG. 3B, the contents determined by the logic states of Q1, Q2, and Q3 output from the memory 20 are output to the output terminal of g4. The output states Q1, Q2,
Since Q3 has the same logical state as Q1, Q2, and Q3 of the target circuit, g4
Is also the same as the output of the target circuit. The output of g4 is input to D1 in the target circuit. Correspondingly, the output of FIG. 3B is input to the D1 terminal of the memory 20. In the target circuit, the logical state of D1 is set to DFF1 at the next rising edge of the clock, and the contents of the previous DFF1 are erased. However, in the time bidirectional simulation model of FIG. 3B, the value of the counter 19 is incremented by 1 as the address count. That is, since the clock rises again and the write enable is output as a pulse, the contents of D1 are written to the address counted up at the rise of the clock, that is, the address incremented by one from the previous address. At this time, if the external input DATA-IN or * ENAB
If the LE signal has also been updated, new contents are written to the counted up address. Of the previous clock state
D1, D2, and D3 disappear from the D-type flip-flop in the target circuit, but remain at the previous address because the memory 20 is used in the model. Therefore, if the content of the counter 19 is reset to the value before updating, the register content of the target circuit at the past time can be set again. That is, if an arbitrary value T is set as the set time in the counter 19, the content corresponding to the set time T can be output from the memory 20. That is, if the time setting terminal is set to 1 and the set time at that time is set from D1, the set contents are given to the memory address from D0, and the contents at that time are output from the outputs Q1, Q2, Q3 of the memory 20. You. When the time setting terminal is 1, the output of the inverting circuit 22 is 0, so that WE = 0 and the read mode is set.

このように、本発明では対象とする論理回路のシミュ
レーションを時間方向に進めたり、時刻を遡って任意の
時刻Tに設定することが可能であり、その時の時刻Tに
おける内容をメモリ20から出力できる。この出力は同じ
論理回路内部にある組み合わせ回路g1,g2,g3,g4の入力
になるのでその時の出力状態をその組み合わせ回路から
生成できる。このことは、対象回路の任意の時刻におけ
る論理状態を再現することが可能であることを表してい
る。すなわち、本発明では時刻100の時点で時刻99に戻
りたい場合には、設定時刻99にし、時刻設定信号に1を
入れることにより、簡単に時刻99に戻すことが可能であ
る。従来のように、時刻時刻0から改めて99まで時間方
向を進めるシミュレーションを再実行する必要は全くな
い。
As described above, in the present invention, it is possible to advance the simulation of the target logic circuit in the time direction, or to set the time T back to an arbitrary time T, and to output the contents at that time T from the memory 20. . Since this output becomes the input of the combination circuit g1, g2, g3, g4 in the same logic circuit, the output state at that time can be generated from the combination circuit. This means that the logic state of the target circuit at any time can be reproduced. That is, in the present invention, when it is desired to return to time 99 at time 100, the time can be easily returned to time 99 by setting the time to the set time 99 and inserting 1 into the time setting signal. Unlike the conventional case, there is no need to re-execute the simulation that advances the time direction from time 0 to 99 again.

このように、本発明では論理回路内部にあるすべての
レジスタをカウンタとメモリの接続によってモデル化し
て、クロック時刻のカウンタ内容によってアドレスされ
るメモリの番地にレジスタの内容を格納するようにし、
時間双方向のシミュレーションの実現を可能にしてい
る。
As described above, in the present invention, all the registers in the logic circuit are modeled by the connection between the counter and the memory, and the contents of the register are stored at the address of the memory addressed by the counter content of the clock time.
It enables realization of simulation in both directions.

〔発明の効果〕〔The invention's effect〕

本発明では、対象回路のレジスタをモデルとしてカウ
ンタとメモリのカスケード結合にすることにより、回路
動作を時間方向に進めるばかりでなく、簡単に過去の状
態に戻すことが可能となる。そのため、論理シミュレー
ションによる回路の設計ミスの発見修正時にその誤動作
を容易に発見でき、しかもその原因となる具体的な設計
ミスを摘出する過程における操作性が極めて良く、時間
双方向シミュレーションが容易、かつ高速にできる。
According to the present invention, not only the circuit operation is advanced in the time direction but also the state can be easily returned to the past state by forming the register of the target circuit as a model and cascading the counter and the memory. Therefore, when a circuit design error is found and corrected by logic simulation, the malfunction can be easily found at the time of correction, and the operability in the process of extracting the specific design error that causes the error is extremely good, and the time bidirectional simulation is easy, and Can be fast.

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

第1図は本発明の原理図、 第2図(a)は本発明のシミュレーションの対象となる
レジスタの回路図、 第2図(b)は本発明のレジスタモデルの回路図、 第3図(a)は本発明の一実施例のブロック図、 第3図(b)は本発明に係る双方向時間シミュレーショ
ンモデルの回路図である。 1……カウンタ 2……メモリ 6……制御手段 10……論理回路 11……レジスタ部 12……交換手段
FIG. 1 is a principle diagram of the present invention, FIG. 2 (a) is a circuit diagram of a register to be simulated by the present invention, FIG. 2 (b) is a circuit diagram of a register model of the present invention, FIG. FIG. 3A is a block diagram of one embodiment of the present invention, and FIG. 3B is a circuit diagram of a bidirectional time simulation model according to the present invention. 1 ... Counter 2 ... Memory 6 ... Control means 10 ... Logic circuit 11 ... Register unit 12 ... Exchange means

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 17/50 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 17/50

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】論理回路をシミュレーションモデルに変換
し、該シミュレーションモデルを用いて該論理回路をシ
ミュレーションするシミュレーション装置であって、 元々のシミュレーション対象である論理回路内の各レジ
スタ部を、メモリと,クロック時刻を計時するカウンタ
と,前記メモリと前記カウンタを制御する制御手段とか
らなるシミュレーションモデルに変換する変換手段を有
し、 前記制御手段は、任意のシミュレーション開始クロック
時刻を前記カウンタに初期設定し、前記クロック時刻を
前記カウンタに計時させながら、該計時クロック時刻に
おける前記各レジスタ部のとるべき値を変化させ、前記
カウンタが計時する各クロック時刻Tにおける前記各レ
ジスタ部のとるべき状態を,前記メモリのアドレスTに
書き込み・記憶させると共に、前記メモリの指定された
任意のアドレス内容を読み出し可能な構成を有し、 任意のクロック時刻Nにおける前記各レジスタ部のシミ
ュレーション結果を前記メモリのアドレスNから読み出
すことにより、前記論理回路の任意のクロック時刻のシ
ミュレーション結果をランダムに検証すること、前記論
理回路のシミュレーション結果を任意のクロック時刻か
ら順方向に検証すること、及び前記論理回路のシミュレ
ーション結果を該シミュレーションの流れとは逆の方向
に遡りながら検証することを可能とする時間双方向シミ
ュレーション装置。
1. A simulation apparatus for converting a logic circuit into a simulation model and simulating the logic circuit using the simulation model, wherein each register unit in the logic circuit to be originally simulated includes a memory, A conversion unit configured to convert into a simulation model including a counter that measures a clock time and a control unit that controls the memory and the counter; the control unit initializes an arbitrary simulation start clock time in the counter; While the clock time is being counted by the counter, the value to be taken by each of the register units at the counted clock time is changed, and the state to be taken by each of the register units at each clock time T counted by the counter is determined by Write / write to memory address T And at the same time, has a configuration capable of reading an arbitrary specified address content of the memory, and by reading a simulation result of each register unit at an arbitrary clock time N from the address N of the memory, Verifying a simulation result at an arbitrary clock time at random, verifying a simulation result of the logic circuit in a forward direction from an arbitrary clock time, and verifying a simulation result of the logic circuit in a direction opposite to the flow of the simulation. Time bidirectional simulation device that enables verification while going back to
【請求項2】前記シミュレーションモデルにおいて、前
記メモリのデータ書き込み信号とデータ読み出し信号線
は、それぞれ、前記各レジスタ部のデータ入力信号線と
データ出力信号線に対応し、前記カウンタの出力信号が
前記メモリにアドレス信号として入力されること、 を特徴とする請求項1記載の時間双方向シミュレーショ
ン装置。
2. In the simulation model, a data write signal and a data read signal line of the memory correspond to a data input signal line and a data output signal line of each of the register units, respectively, and the output signal of the counter is 2. The time bidirectional simulation apparatus according to claim 1, wherein the time bidirectional simulation apparatus is input to a memory as an address signal.
【請求項3】前記シミュレーションモデルにおいて、前
記カウンタは、前記クロック時刻に同期したクロック信
号、設定値信号、及び時刻設定モードの有無を指定する
モード設定信号を入力し、該モード設定信号が該時刻設
定モードでない場合には、前記クロック信号の入力パル
ス数を計数し、該計数値を前記メモリに書き込みアドレ
ス信号として出力し、該時刻設定モードである場合に
は、該設定値信号により指定される値をセットし、その
セット値をメモリに読み出しアドレス信号として出力す
ること、 を特徴とする請求項1記載の時間双方向シミュレーショ
ン装置。
3. The simulation model, wherein the counter inputs a clock signal synchronized with the clock time, a set value signal, and a mode setting signal for designating the presence / absence of a time setting mode. When the mode is not the setting mode, the number of input pulses of the clock signal is counted, and the counted value is output to the memory as a write address signal. When the time setting mode is set, the count value is designated by the setting value signal. The time bidirectional simulation apparatus according to claim 1, wherein a value is set, and the set value is output to a memory as a read address signal.
【請求項4】前記制御手段は、前記モード設定信号が時
刻設定モードでないときには、前記クロック信号とその
遅延した反転信号とからパルスを生成し、該パルスをラ
イトイネーブル信号として前記メモリに出力することに
より、前記メモリを読み出しモードに設定し、前記メモ
リから前記読み出し信号の示すアドレスに格納されてい
る値を読み出し可能となるように制御すること、 を特徴とする請求項3記載の時間双方向シミュレーショ
ン装置。
4. When the mode setting signal is not the time setting mode, the control means generates a pulse from the clock signal and its delayed inverted signal, and outputs the pulse to the memory as a write enable signal. 4. The time bidirectional simulation according to claim 3, wherein the memory is set to a read mode, and control is performed so that a value stored at an address indicated by the read signal can be read from the memory. apparatus.
【請求項5】論理回路をシミュレーションモデルに変換
し、該シミュレーションモデルを用いて該論理回路をシ
ミュレーションするシミュレーション装置であって、 シミュレーション対象としての論理回路内の各レジスタ
部を、メモリと、クロック時刻を計時するカウンタと、
前記メモリと前記カウンタを制御する制御手段とからな
るシミュレーションモデルに変換する変換手段を有し、 前記制御手段は、シミュレーション開始の任意のクロッ
ク時刻を前記カウンタに初期設定し、前記クロック時刻
を,前記カウンタに計時させながら、あるクロック時刻
における前記各レジスタ部の値を変化させ、前記カウン
タが計時する各クロック時刻Tにおける前記各レジスタ
部の値を,前記メモリのアドレスTに書き込み・記憶さ
せると共に、前記メモリの各クロック時刻Tにおける入
力信号を、前記論理回路の一部である組み合わせ回路部
に入力信号として供給させると共に、前記組み合わせ回
路部の出力信号が前記メモリのアドレス(T+1)に格
納されるように制御する構成を有し、 前記カウンタに任意のクロック時刻Nを設定することに
より、前記メモリのアドレスNに格納されている前記任
意のクロック時刻Nにおける各レジスタ部部の値を前記
組み合わせ回路部に入力させて、前記組み合わせ回路部
に前記任意のクロック時刻Nの動作を再シミュレーショ
ンさせることにより、前記論理回路の任意のクロック時
刻におけるシミュレーション結果をランダムに検証する
こと、前記論理回路のシミューレーション結果を任意の
クロック時刻から順方向に検証すること、及び前記論理
回路のシミュレーション結果を任意のクロック時刻から
該シミュレーションの流れとは逆の方向に遡りながら検
証することを可能とする時間双方向シミュレーション装
置。
5. A simulation apparatus for converting a logic circuit into a simulation model and simulating the logic circuit using the simulation model, wherein each register in the logic circuit to be simulated includes a memory, a clock A counter that measures
A conversion unit configured to convert into a simulation model including the memory and a control unit configured to control the counter, wherein the control unit initializes an arbitrary clock time of a simulation start in the counter, and sets the clock time to the The value of each of the register units at a certain clock time is changed while the counter is counting time, and the value of each of the register units at each clock time T counted by the counter is written and stored in an address T of the memory. An input signal at each clock time T of the memory is supplied as an input signal to a combinational circuit unit which is a part of the logic circuit, and an output signal of the combinational circuit unit is stored at an address (T + 1) of the memory. So that the counter can be set to an arbitrary clock. By setting N, the value of each register unit at the arbitrary clock time N stored in the address N of the memory is input to the combinational circuit unit, and the arbitrary clock time is supplied to the combinational circuit unit. N by re-simulating the operation of N to randomly verify a simulation result of the logic circuit at an arbitrary clock time, verify a simulation result of the logic circuit in a forward direction from an arbitrary clock time, and A time bidirectional simulation apparatus that enables a simulation result of the logic circuit to be verified from an arbitrary clock time while going back in a direction opposite to the flow of the simulation.
JP1186125A 1989-07-20 1989-07-20 Time interactive simulation device Expired - Fee Related JP2924968B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1186125A JP2924968B2 (en) 1989-07-20 1989-07-20 Time interactive simulation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1186125A JP2924968B2 (en) 1989-07-20 1989-07-20 Time interactive simulation device

Publications (2)

Publication Number Publication Date
JPH0352037A JPH0352037A (en) 1991-03-06
JP2924968B2 true JP2924968B2 (en) 1999-07-26

Family

ID=16182803

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1186125A Expired - Fee Related JP2924968B2 (en) 1989-07-20 1989-07-20 Time interactive simulation device

Country Status (1)

Country Link
JP (1) JP2924968B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637464B (en) * 2022-02-24 2024-05-14 中国大唐集团科学技术研究院有限公司西北电力试验研究院 Flexibly-controlled ten-clock staged timing and data storage method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62114040A (en) * 1985-11-13 1987-05-25 Nec Corp Event simulator
JPS6441975A (en) * 1987-08-07 1989-02-14 Nec Corp Simulator

Also Published As

Publication number Publication date
JPH0352037A (en) 1991-03-06

Similar Documents

Publication Publication Date Title
EP0242599A2 (en) Method and apparatus for simulating memory arrays in a logic simulation machine
JPS6063644A (en) Method and apparatus for modeling operation of digital device
JPS60164848A (en) Modeling method and apparatus
JPH0230056B2 (en)
JPH04215316A (en) Sequential finite state machine circuit and integrated circuit having such circuit
US7228513B2 (en) Circuit operation verification device and method
JP2924968B2 (en) Time interactive simulation device
GB2099618A (en) Algorithmic word generator
US6339751B1 (en) Circuit design support apparatus and a method
SU1133589A1 (en) Multibit testing sequence generator
JPH0345580B2 (en)
SU1509901A1 (en) Arrangement for monitoring digital devices
JPH0458070B2 (en)
SU832558A1 (en) Device for simulating digital objects
JP2532718B2 (en) Semiconductor integrated circuit device
JP2581214B2 (en) Logic simulator
SU1513622A1 (en) Code-to-time interval converter
JP2970834B2 (en) Test basic data generator
SU1583884A1 (en) Apparatus for functional check of digital circuits
SU1543408A1 (en) Device for shaping tests
SU1520534A1 (en) Device for modeling terminal automatic apparatus
SU746488A1 (en) Interface
SU1488809A1 (en) Device for simulating failures and digital computer malfunctions
JP3048969B2 (en) Cycle-based simulator
JP3027765B2 (en) Time mechanism controller

Legal Events

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