JP2943590B2 - Interpreted simulation method - Google Patents

Interpreted simulation method

Info

Publication number
JP2943590B2
JP2943590B2 JP5332998A JP33299893A JP2943590B2 JP 2943590 B2 JP2943590 B2 JP 2943590B2 JP 5332998 A JP5332998 A JP 5332998A JP 33299893 A JP33299893 A JP 33299893A JP 2943590 B2 JP2943590 B2 JP 2943590B2
Authority
JP
Japan
Prior art keywords
block
intermediate code
language
source program
object structure
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 - Lifetime
Application number
JP5332998A
Other languages
Japanese (ja)
Other versions
JPH07192034A (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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP5332998A priority Critical patent/JP2943590B2/en
Publication of JPH07192034A publication Critical patent/JPH07192034A/en
Application granted granted Critical
Publication of JP2943590B2 publication Critical patent/JP2943590B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime 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 simulation of an electric logic circuit, and more particularly to a simulation method of a logic circuit using a hardware description language.

【0002】[0002]

【従来の技術】近年、大規模化する論理回路の設計にお
いて、ゲートレベルの回路図面を書き、それを組み合わ
せることによって全体回路を作り上げていくというボト
ムアップの設計方式から、まず全体の機能設計を行い、
その段階での機能漏れやインターフェースの整合をと
り、それを機能別のブロックに分割し、それぞれのブロ
ックを更に同じようにブロックに分割していくトップダ
ウンの設計方式に移行しつつある。そのトップダウン設
計を実現するために不可欠なツールがハードウェア記述
言語である。ゲートレベルの記述から抽象的な動作記述
までをサポートするハードウェア記述言語を使用して、
最上位の機能設計を抽象的な動作レベルで記述し、全体
回路の検証を行い、次に、全体回路をブロックに分割
し、それぞれのブロックを、更に動作レベルで記述す
る。これを繰り返し、ある程度単純化された段階で人手
ないし論理合成ツールによってゲートレベルの回路に落
とし、タイミングなどの詳細な検証を行う方向に進んで
いる。しかし、ハードウェア記述言語の中には、一般の
プログラミング言語と異なり、そのソースプログラムの
解析中にオブジェクト構造を完全に決定することができ
ない言語が存在する。例として、ハードウエア記述言語
のVHDL言語においては、IEEE Std 1076-1987およ
びIEE Std 1076−1993で述べられているように elab
oration するまで、その全体構造が決定されない。例
えば、 entity A is generic ( WIDTH:integer := 8 ); port ( A : in bit vector ( 0 to WIDTH-1 ); B : out bit vector ( 0 to WIDTH-1 ) ); end A; というように entity A のインターフェースが定義されていた場合 U0: A generic map ( WIDTH => 4 ) port map ( A => sig1, B => sig2 ); という component instantiation で呼び出されると、A, B のビット幅は4にな るが、 U0: A generic map ( WIDTH => 16 ) port map ( A => sig1, B => sig2 ); だと、ビット幅は16になる。 さらに、複雑な例では、 entity B is generic ( W : integer; ); port ( C : in bit_vector ( 0 to W-1 ) D : out bit_vector ( 0 to w-1 ) ): end B: architecture arc of B is component A genric ( WIDTH : integer := 8 ); port ( A : in bit_vector ( 0 to WIDTH -1 ); B ; out bit_vector ( 0 to WIDTH-1 ) ); end component; begin U0: A generic map ( WIDTH => W ) port map ( A=> C, B=> D ); end arc; のような記述も可能である。このように多階層にわたっ
て、インターフェースが elaboration 時まで決定でき
ないような記述が可能になっている。一見通常のコンパ
イル系言語のリンクと同じようであるが、通常のコンパ
イル系言語の場合は、インターフェースが、その上位記
述によって変更されることはない。したがって、VHD
L言語のようなプログラミング言語に対して従来手法に
よるアプローチでは、その開発効率および保守性を大き
く損なってしまう。この発明は、上記の事項を解決する
ものである。 そのような言語で記述されるソースプログ
ラムでシミュレーションを行うためには、言語解析時、
実行に依存しないで作成できる部分とそれを用いて全体
の構造を作成するための任意のプログラミング言語によ
るソースプログラムを生成するだけにとどめ、そのソー
スプログラムを実行することによって、最終的なオブジ
ェクトを生成しシミュレーションを行う手順が必要であ
る。
2. Description of the Related Art In recent years, in designing a large-scale logic circuit, a functional design of an entire circuit is firstly started from a bottom-up design method in which a gate-level circuit drawing is written and an overall circuit is formed by combining the drawings. Do
At that stage, we are moving to a top-down design method in which we omit functional leaks and interfaces, divide them into functional blocks, and further divide each block into blocks in the same way. An essential tool for realizing the top-down design is a hardware description language. Using a hardware description language that supports everything from gate-level descriptions to abstract behavioral descriptions,
The top-level functional design is described at an abstract operation level, the entire circuit is verified, and then the entire circuit is divided into blocks, and each block is further described at an operation level. These steps are repeated, and after some simplification, the circuit is reduced to a gate-level circuit by hand or by a logic synthesis tool, and detailed verification such as timing is proceeding. However, some hardware description languages, unlike general programming languages, cannot completely determine the object structure during analysis of the source program. For example, a hardware description language
IEEE Std 1076-1987 and VHDL language
Elab as described in IEE Std 1076-1993
Until oration, its overall structure is not determined. An example
In example, entity A is generic (WIDTH: integer: = 8); port (A: in bit vector (0 to WIDTH-1); B: out bit vector (0 to WIDTH-1)); end A; and so on If the interface of entity A is defined U0: A generic map (WIDTH => 4) port map (A => sig1, B =>sig2); If called with component instantiation, the bit width of A, B will be ing to 4 but, U0: a generic map (wIDTH => 16) port map (a => sig1, B =>sig2);that's, the bit width becomes 16. In a more complex example, entity B is generic ( W: integer; ); port ( C: in bit_vector (0 to W-1) D: out bit_vector (0 to w-1) ): end B: architecture arc of B is component A genric ( WIDTH: integer: = 8 ); port ( A: in bit_vector (0 to WIDTH -1); B; out bit_vector (0 to WIDTH-1) ); end component; begin U0: A generic map (WIDTH => W) port map (a => C, B =>D); end arc; as described are possible. In this way, there are many layers
The interface can be determined until elaboration
It is possible to write such a description. At first glance normal compa
This is similar to a link in an
For file-based languages, the interface is
It is not changed by the statement. Therefore, VHD
Conventional method for programming languages such as L language
This approach increases development efficiency and maintainability.
It will be damaged. The present invention solves the above matters.
Things. In order to simulate with a source program written in such a language, at the time of language analysis,
Generate a final object by simply creating a source program in any programming language that can be created independently of execution and using it to create the entire structure, and then executing the source program And a procedure for performing a simulation is required.

【0003】従来の特開昭62−290939では、プ
ログラム修正に対応した動的な実行命令の置換について
扱っているが、プログラム中の記述に対応して自動的に
構造が変化するようなものについては考慮されていなか
った。
Conventional Japanese Patent Application Laid-Open No. 62-290939 deals with the replacement of a dynamic execution instruction corresponding to a program modification. Was not taken into account.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の技術
は、実行オブジェクトが自分自身を自動的に生成するよ
うな構造になっているため、実際に最終的なオブジェク
トが構成されている過程を直接制御できないで、シミュ
レータの開発工数がかかること、またデバッガのための
情報を組み入れるために再コンパイルが必要になるこ
と、更に小さなハードウェア記述言語の変更に対しても
シミュレーション再実行までの時間が長くなるという欠
点があった。
The above-mentioned prior art has a structure in which the execution object automatically generates itself, so that the process in which the final object is actually constructed is directly performed. Uncontrollable, it takes a lot of man-hours to develop the simulator, it needs to be recompiled to incorporate information for the debugger, and it takes a long time until the simulation is re-executed even if a small hardware description language is changed. There was a disadvantage of becoming.

【0005】[0005]

【課題を解決するための手段】この発明の目的は、言語
解析によってオブジェクト構造が決定できないハードウ
ェア記述言語を中間コードに変換し、中間言語インタプ
リタによってオブジェクトを実行する方法の提供であ
る。
SUMMARY OF THE INVENTION An object of the present invention is to provide a method for converting a hardware description language whose object structure cannot be determined by language analysis into intermediate code, and executing the object by an intermediate language interpreter.

【0006】そのため、コンパイラによる言語解析時に
ソースプログラムのオブジェクト構造を完全には決定で
きないで、前記言語解析結果を一部実行したときにはじ
めて前記オブジェクト構造の全体が決定されるようなハ
ードウェア記述言語の論理シミュレーションにおいて、
前記ソースプログラムのオブジェクト構造に依存しない
実行文単位に生成される中間コードブロックと前記中間
コードブロックをリンクする信号オブジェクトと前記中
間コードブロックから呼び出される各インスタンスのブ
ロック名と関数名の情報を含むヘッダ情報とを含む中間
コードを生成する段階と、前記ヘッダ情報と中間コード
ブロックを中間言語インタプリタによって解釈し、最終
的なオブジェクト構造を決定し、メモリ内に前記最終的
なオブジェクトを展開して実行する段階と、を含む。
Therefore, a hardware description language in which the object structure of a source program cannot be completely determined at the time of language analysis by a compiler, and the entire object structure is determined only when a part of the language analysis result is executed. In the logic simulation of
A header including information on an intermediate code block generated in executable statement units independent of the object structure of the source program, a signal object linking the intermediate code block, and a block name and a function name of each instance called from the intermediate code block; Generating intermediate code including information, interpreting the header information and the intermediate code block by an intermediate language interpreter, determining a final object structure, and expanding and executing the final object in a memory. And a step.

【0007】[0007]

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

【0008】この発明の一実施例の処理ステップを示す
図1を参照すると、ハードウェア記述言語によって記述
されるソースプログラムを格納するハードウェア記述言
語1と、ハードウェア記述言語1のソースプログラムを
中間コード3にコンパイラによって変換するコンパイル
段階2と、中間コード3を中間言語インタプリタによっ
て解釈し、メモリ内に展開する中間言語インタプリタ段
階4とを含む。
Referring to FIG. 1 showing the processing steps of one embodiment of the present invention, a hardware description language 1 for storing a source program described in a hardware description language and a source program of the hardware description language 1 are used as an intermediate. It includes a compiling step 2 for converting the intermediate code 3 into a code 3 by a compiler, and an intermediate language interpreter step 4 for interpreting the intermediate code 3 by an intermediate language interpreter and expanding it in a memory.

【0009】次に、この実施例の処理の各段階を説明す
る。
Next, each stage of the processing of this embodiment will be described.

【0010】ソースプログラムをコンパイラによって中
間コードに変換し、中間言語インタプリタによってメモ
リへの展開を説明する図2を参照すると、中間コードの
最上位ブロック5がサブブロック6をCOMPという名
前のインスタンス8として含み、最上位ブロック5で宣
言されたSという名前で範囲が0から4の配列シグナル
7の1から3の要素がサブブロック6のAという名前の
範囲が0から2の配列ポート9に接続されているという
内容のハードウェア記述言語1をコンパイラ2によって
中間コード3に変換し、中間言語インタプリタ4によっ
てメモリ中で最終的に展開されてオブジェクト構造が確
定した結果を示している。
[0010] Referring to FIG. 2, in which a source program is converted into intermediate code by a compiler and expansion into memory is performed by an intermediate language interpreter, the uppermost block 5 of the intermediate code converts the sub-block 6 into an instance 8 named COMP. An element 1 to 3 of an array signal 7 named S declared in the top-level block 5 and ranging from 0 to 4 is connected to an array port 9 named A of the sub-block 6 and ranging from 0 to 2. This shows the result of converting the hardware description language 1 having the following content into the intermediate code 3 by the compiler 2 and finally expanding it in the memory by the intermediate language interpreter 4 to determine the object structure.

【0011】先ず、ハードウェア記述言語1をコンパイ
ラによってコンパイルすると(ステップ2)、最上位ブ
ロック5のコンパイル時には、ヘッダ情報として名前が
Sで、かつ範囲が0から4のシグナル7がこの最上位ブ
ロック5内で使用できるという情報が書き込まれ、実行
文においてはCOMPという名前のインスタンス8を呼
び出すコードとそのインスタンスのポートに対してシグ
ナルS7の1から3を接続するという情報が書き込まれ
る。サブブロック6のコンパイル時には、ヘッダ情報と
して名前がAで範囲が0から2である配列ポート11が
このサブブロック6内で使用できるという情報が書き込
まれ、実行文が書き込まれる。このとき、最上位ブロッ
ク5と下位のサブブロック6との関係づけは行わない。
First, when the hardware description language 1 is compiled by a compiler (step 2), when the uppermost block 5 is compiled, a signal 7 whose name is S and whose range is 0 to 4 is the header information at the time of compiling the uppermost block 5. Information indicating that the signal can be used in 5 is written. In the executable statement, a code for calling the instance 8 named COMP and information indicating that signals 1 to 3 of the signal S7 are connected to the port of the instance are written. When the sub-block 6 is compiled, information that an array port 11 having a name A and a range of 0 to 2 can be used in the sub-block 6 is written as header information, and an executable statement is written. At this time,
The link between the block 5 and the lower sub-block 6 is not performed.

【0012】次に、コンパイル結果である中間コード3
が中間言語インタプリタによって読み込まれ実行される
(ステップ4)。最上位ブロックのヘッダ情報を読むと
シグナルの宣言があるので、メモリ中に5つの領域10
を確保し、シグナル4のポインタにその確保した領域の
先頭アドレスを代入する。ヘッダ情報部分の解析が終了
すると、実行文の解析に移る。実行文内にインスタンス
があるのでCOMPという名前に対して、サブブロック
6を生成したもののアドレスを対応させたらそこで最上
位ブロックの解析を一旦中断して、サブブロック6の解
析に移る。サブブロック6のヘッダ情報からAという名
前で範囲が0から2の配列ポート11があることがわか
る。この配列ポート11には最上位ブロック5のシグナ
ルSの1から3までが割り当てられているので、先ほど
確保した領域10の1の領域のアドレスをポート11の
ポインタに代入する。サブブロック6の解析が済んだら
最上位ブロック5の解析を再開する。
Next, the intermediate code 3 as a compilation result
Is read and executed by the intermediate language interpreter (step 4). When the header information of the top block is read, the signal is declared.
And the head address of the secured area is substituted for the signal 4 pointer. When the analysis of the header information part is completed, the process proceeds to the analysis of the executable statement. Since there is an instance in the executable statement, if the name of COMP is made to correspond to the address of the subblock 6 generated, the analysis of the top block is temporarily interrupted and the analysis of the subblock 6 is started. It can be seen from the header information of the sub-block 6 that there is an array port 11 having a name A and a range of 0 to 2. Since signals 1 to 3 of the uppermost block 5 are assigned to the array port 11, the address of the area 1 of the area 10 secured earlier is assigned to the port 11 pointer. When the analysis of the sub-block 6 is completed, the analysis of the uppermost block 5 is restarted.

【0013】以上のようにして全構造が確定し、メモリ
中にオブジェクトが完全に展開されると、シミュレーシ
ョンが開始できる。最上位ブロック5のヘッダに gener
ic値の WIDTH := 8 があり、シグナルSの宣言7が S(
0 TO WIDTH-1 ) である場合、S( 0 TO 7 )になり、メモ
リ中に8つの領域を確保する。このようにヘッダ部の解
析と実行文の一部を交互に実行して、全構造を確定させ
る。
When the entire structure is determined as described above and the object is completely expanded in the memory, the simulation can be started. Gener in header of top-level block 5
There is an ic value of WIDTH: = 8 and the declaration 7 of signal S is S (
(0 TO WIDTH-1), it becomes S (0 TO 7) and
Eight areas are secured in the file. Thus, the solution of the header part
Analysis and part of the executable statement are executed alternately to determine the entire structure.
You.

【0014】[0014]

【発明の効果】ブロック単位に中間コードを生成するこ
とにより構造に依存しない中間コードを生成することが
可能になり、記述言語の変更の際の再解析処理を最小限
にくい止めることができるという効果と、インスタンス
単位にブロックを複製して全体構造を作成することによ
り複雑なスタック管理を必要とせずシミュレータ開発工
数を削減することができるという効果と、デバッガの情
報が中間コード中に入るためにデバッグ時と通常実行時
とで再コンパイルする必要がないという効果を有する。
By generating an intermediate code in block units, it is possible to generate an intermediate code that does not depend on the structure, and it is possible to minimize re-analysis processing when the description language is changed. By duplicating blocks for each instance and creating the entire structure, it is possible to reduce the simulator development man-hour without the need for complicated stack management, and to debug because the debugger information enters the intermediate code. This has the effect that there is no need to recompile between time and normal execution.

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

【図1】この発明の一実施例の処理ステップを示す図で
ある。
FIG. 1 is a diagram showing processing steps of an embodiment of the present invention.

【図2】この発明の中間コードを解釈する処理を説明す
る図である。
FIG. 2 is a diagram illustrating a process of interpreting an intermediate code according to the present invention.

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

1 ハードウェア記述言語ソースプログラム 2 ハードウェア記述言語ソースプログラムを中間コ
ードに変換するコンパイラ 3 ソースプログラムをブロック単位にヘッダ情報と
実行文に分けた中間コード 4 中間コードを解析して全構造を確定しメモリ中に
オブジェクトを展開してシミュレーションを実行するた
めの中間言語インタプリタ。
1 Hardware description language source program 2 Compiler that converts hardware description language source program into intermediate code 3 Intermediate code that divides source program into header information and executable statements in block units 4 Analyzes intermediate code to determine entire structure Intermediate language interpreter for executing simulations by expanding objects in memory.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 コンパイラによる言語解析時にソースプ
ログラムのオブジェクト構造を完全に決定できないで、
前記言語解析結果を一部実行したときにはじめて前記オ
ブジェクト構造の全体が決定されるようなハードウェア
記述言語の論理シミュレーションにおいて、 前記ソースプログラムのオブジェクト構造に依存しない
実行文単位に生成される中間コードブロックと前記中間
コードブロックをリンクする信号オブジェクトと前記中
間コードブロックから呼び出される各インスタンスのブ
ロック名と関数名の情報を含むヘッダ情報とを含む中間
コードを生成する段階と、 前記ヘッダ情報と中間コードブロックを中間言語インタ
プリタによる解釈によって最終的なオブジェクト構造を
決定し、メモリ内に前記最終的なオブジェクトを展開し
論理シミュレーションを実行する段階と、 を含むインタプリタ型シミューレーション方法。
An object structure of a source program cannot be completely determined during language analysis by a compiler.
In a logic simulation of a hardware description language in which the entire object structure is determined only when a part of the language analysis result is executed, an intermediate code generated for each execution statement independent of the object structure of the source program Generating an intermediate code including a signal object linking a block and the intermediate code block, and header information including information of a block name and a function name of each instance called from the intermediate code block; and Determining a final object structure by interpreting the block by an intermediate language interpreter, expanding the final object in a memory, and executing a logic simulation , comprising the steps of:
JP5332998A 1993-12-27 1993-12-27 Interpreted simulation method Expired - Lifetime JP2943590B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5332998A JP2943590B2 (en) 1993-12-27 1993-12-27 Interpreted simulation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5332998A JP2943590B2 (en) 1993-12-27 1993-12-27 Interpreted simulation method

Publications (2)

Publication Number Publication Date
JPH07192034A JPH07192034A (en) 1995-07-28
JP2943590B2 true JP2943590B2 (en) 1999-08-30

Family

ID=18261153

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5332998A Expired - Lifetime JP2943590B2 (en) 1993-12-27 1993-12-27 Interpreted simulation method

Country Status (1)

Country Link
JP (1) JP2943590B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100771057B1 (en) * 2005-12-26 2007-10-29 주식회사 신지소프트 Device and method for transforming WIPI into intermediate language
KR101306842B1 (en) * 2012-07-10 2013-09-10 인하대학교 산학협력단 System and method for generating verification conditions of java program

Also Published As

Publication number Publication date
JPH07192034A (en) 1995-07-28

Similar Documents

Publication Publication Date Title
US7962869B2 (en) Method and system for debug and test using replicated logic
US9501269B2 (en) Automatic source code generation for accelerated function calls
US5960182A (en) Hardware-software co-simulation system, hardware-software co-simulation method, and computer-readable memory containing a hardware-software co-simulation program
US6606734B2 (en) Simulation method and compiler for hardware/software programming
JP2001515247A (en) FPGA design method for dynamic reconfiguration identifiable operation
US6285914B1 (en) Verification method by means of comparing internal state traces
JP2007087215A (en) Data structure for use in hardware model conversion processing, computer program, method and system
JPH11513512A (en) Method of manufacturing digital signal processor
US6067415A (en) System for assisting a programmer find errors in concurrent programs
Venkatakrishnan et al. High-level synthesis-based approach for accelerating scientific codes on FPGAs
US6532573B1 (en) LSI verification method, LSI verification apparatus, and recording medium
JP2943590B2 (en) Interpreted simulation method
KR0125605B1 (en) Method and device for verifying operation of machine language program
JPH10320212A (en) Cache optimizing method
JP2003330983A (en) Test facilitation design system, test facilitation design method, program and recording media
JPH08180094A (en) Architecture simulator
JPH11154093A (en) Program compiler and storage medium recording compiler program
JP2004013190A (en) Environment for software development, simulator, and recording medium
JPH09237191A (en) Programming supporting device, programming supporting method and medium recording programming supporting program
JP2001022808A (en) Logic circuit reducing device, method and device for logic simulation
JP3758991B2 (en) Method for adjusting the number of execution steps of a target program, adjusting device therefor, and recording medium storing the program
JPH06119203A (en) Debugging line deleting device
JP2005301415A (en) Compile system, simulator, emulator, and program development supporting system
JP2005332110A (en) Simulation system
JPH10333915A (en) Optimizing processing system for procedure reference

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990525