JP2000011022A - Method for verifying cooperation between hardware and software - Google Patents

Method for verifying cooperation between hardware and software

Info

Publication number
JP2000011022A
JP2000011022A JP10174611A JP17461198A JP2000011022A JP 2000011022 A JP2000011022 A JP 2000011022A JP 10174611 A JP10174611 A JP 10174611A JP 17461198 A JP17461198 A JP 17461198A JP 2000011022 A JP2000011022 A JP 2000011022A
Authority
JP
Japan
Prior art keywords
simulation
instruction
processor
simulation model
logic circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10174611A
Other languages
Japanese (ja)
Inventor
Yoichiro Mae
洋一郎 前
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10174611A priority Critical patent/JP2000011022A/en
Publication of JP2000011022A publication Critical patent/JP2000011022A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a hardware/software cooperation verifying method capable of executing quick and accurate simulation in the simulation of the whole system in which a software program code and hardware can interact with each other. SOLUTION: The system is provided with plural processor simulation models 103 for simulating software instruction operation, a logical circuit simulation model 105 for simulating a logical circuit part, a model switching means 102 for dynamically switching plural processor simulation models 103, and a synchronizing means 104 for synchronizing the simulation of the processor simulation models 103 with that of the logical circuit simulation model 105.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、ソフトウェアプ
ログラムコードを処理するプロセッサ部と、このプロセ
ッサ部により制御されるプロセッサ部以外の論理回路部
を含むプリント基板または半導体集積回路において、ソ
フトウェアプログラムコードを実行するプロセッサ部
と、プロセッサ部以外を構成する論理回路部の相互に作
用を及ぼす動作のシミュレーションを高速にかつ精度良
くシミュレーションするハードウェア/ソフトウェア協
調検証方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor for processing a software program code and a software board for executing a software program code on a printed circuit board or a semiconductor integrated circuit including a logic circuit other than the processor controlled by the processor. The present invention relates to a hardware / software co-verification method for quickly and accurately simulating an interaction between a processor unit and a logic circuit unit other than the processor unit.

【0002】[0002]

【従来の技術】従来、プロセッサ部と、プロセッサ部に
より制御されるハードウェアを持ち、ソフトウェアプロ
グラムコードとハードウェアが相互に作用を及ぼす動作
の検証方法としては、実際のチップ製造後にプリント基
板上に作成された評価ボードにより行われてきた。
2. Description of the Related Art Conventionally, as a method of verifying an operation in which a software section and a hardware program interact with a processor section and hardware controlled by the processor section, a method of verifying an operation on a printed circuit board after manufacturing an actual chip is known. This has been done by the created evaluation board.

【0003】別の検証方法として、プロセッサ部と論理
回路によるハードウェア部を全て計算機上の論理シミュ
レータでクロックサイクルにおいて実際のチップと同一
動作をする(以後、サイクルアキュレート)シミュレー
ションモデルを用いて検証する方法が開示されている
(特開平7−282093号)。また、別の方法とし
て、プロセッサシミュレーションモデルを動的に切り替
えてプロセッサ自身の開発時のシミュレーション速度を
向上させる方法が開示されている(特開平9−2312
55号)。
[0003] As another verification method, a processor and a logic unit including a logic circuit are all verified using a simulation model in which a logic simulator on a computer performs the same operation as an actual chip in a clock cycle (hereinafter, cycle accurate). (Japanese Patent Application Laid-Open No. 7-282093). As another method, there is disclosed a method of dynamically switching a processor simulation model to improve a simulation speed at the time of developing the processor itself (Japanese Patent Laid-Open No. 9-2312).
No. 55).

【0004】また、別の検証方法として高速にシミュレ
ーションするためにプロセッサ部を命令レベルシミュレ
ータでシミュレートし、論理回路部をサイクルアキュレ
ートなシミュレーションモデルでシミュレーションし、
これらのシミュレーションを同期させる方法がある。ま
た、別の検証方法としてプロセッサ部をエミュレートす
るハードウェア装置を用い、このハードウェア装置と論
理回路部の論理シミュレータを同期させシミュレーショ
ンを行う方法が開示されている(特開平9−29300
2号)。
As another verification method, a processor section is simulated by an instruction level simulator for high-speed simulation, and a logic circuit section is simulated by a cycle-accurate simulation model.
There are ways to synchronize these simulations. As another verification method, there is disclosed a method of performing a simulation by using a hardware device that emulates a processor unit and synchronizing the hardware device with a logic simulator of a logic circuit unit (Japanese Patent Laid-Open No. 9-29300).
No. 2).

【0005】また、従来の命令配列方式では、ソフトウ
ェアプログラムコードが最小になるように最適化する手
法、また実際のプロセッサチップで高速に実行されるコ
ードの最適化が行われており、この命令配列方式のコン
パイラの開発が行われている。
Further, in the conventional instruction array system, a method of optimizing a software program code to be minimized and an optimization of a code executed at high speed on an actual processor chip are performed. Development of the compiler of the method has been performed.

【0006】[0006]

【発明が解決しようとする課題】評価ボードによる検証
には実際のチップの製造、評価ボードの製作が必要であ
り、検証を行う前に開発する項目が増え、また、半導体
技術の進歩により1つの半導体集積回路上にプロセッサ
部、論理回路部がまとめられつつある現状にあっては、
評価ボードを作成しても半導体集積回路内の検証を行う
ことは容易にはできない。
[0005] Verification using an evaluation board requires the production of an actual chip and the manufacture of an evaluation board, and the number of items to be developed before verification is increased. In the current situation where the processor section and the logic circuit section are being integrated on a semiconductor integrated circuit,
Even if an evaluation board is created, it is not easy to perform verification in a semiconductor integrated circuit.

【0007】また、計算機上でプロセッサ部と論理回路
部の論理シミュレーションによりクロックサイクルにお
いて実際のチップと同一動作をするシミュレーションモ
デルを用いて検証する方法では、クロックサイクルにお
いて実際のチップと同一の動作をするサイクルアキュレ
ートなシミュレーションモデルを使用しているため、実
行速度が遅く、大規模なソフトウェアプログラムコード
をシミュレーションすることは現実的なシミュレーショ
ン時間で行うことは難しい。
Further, in a method of verifying by using a simulation model that performs the same operation as an actual chip in a clock cycle by a logic simulation of a processor unit and a logic circuit unit on a computer, the same operation as that of an actual chip is performed in a clock cycle. Since a cycle-accurate simulation model is used, the execution speed is slow, and it is difficult to simulate a large-scale software program code in a realistic simulation time.

【0008】また、プロセッサ部のシミュレーションを
動的に切り替えてシミュレーションする方法では、プロ
セッサ部以外の論理回路部との相互作用をシミュレーシ
ョンすることができず、また、特定のシミュレーション
時刻において実行される命令および信号値によりシミュ
レーションモデルを切り替えるため、命令系列に依存す
る切替には対応できない状況にある。
Further, in the method of dynamically switching the simulation of the processor unit, the interaction with the logic circuit unit other than the processor unit cannot be simulated, and the instruction executed at a specific simulation time cannot be simulated. In addition, since the simulation model is switched according to the instruction value and the signal value, it is not possible to cope with the switching depending on the instruction sequence.

【0009】プロセッサ部を命令レベルシミュレータで
シミュレートし、論理回路シミュレーションモデルと同
期させてシステム全体のソフトウェアとハードウェアの
相互作用を検証するシミュレーション方法では、プロセ
ッサ部が命令レベルシミュレータであるため、高速であ
るが、命令終了時ごとにプロセッサシミュレーションモ
デルと論理回路シミュレーションモデルを同期させるた
め、論理回路部とプロセッサ部のクロックサイクルでの
ずれが、分岐、例外処理等で発生し相互作用の検証精度
に問題がある。
In a simulation method for simulating a processor unit with an instruction level simulator and synchronizing with a logic circuit simulation model to verify the interaction between software and hardware of the entire system, the processor unit is an instruction level simulator. However, in order to synchronize the processor simulation model and the logic circuit simulation model each time the instruction is completed, a difference in the clock cycle between the logic circuit unit and the processor unit occurs due to branching, exception processing, and the like. There's a problem.

【0010】プロセッサ部をハードウェアエミュレータ
でシミュレートし、論理回路部を論理シミュレータでシ
ミュレートする方法では、プロセッサ部のエミュレート
装置が必要となるが、エミュレート装置は一般に高価で
あり、実際的ではない。また、半導体技術の進歩により
1つ半導体集積回路上にプロセッサ部、論理回路部がま
とめられていく現状にあっては、物理的なエミュレーシ
ョン手段を用いるのではなく、すべて仮想的に計算機上
のシミュレーションで、高速かつ高精度なシミュレーシ
ョンが行える方法が望まれている。
In the method of simulating the processor section with a hardware emulator and simulating the logic circuit section with a logic simulator, an emulator for the processor section is required. However, the emulation apparatus is generally expensive and practical. is not. In addition, under the current situation in which a processor unit and a logic circuit unit are integrated on a single semiconductor integrated circuit due to the advancement of semiconductor technology, simulations are virtually performed on a computer instead of using physical emulation means. Therefore, a method capable of performing a high-speed and high-accuracy simulation is desired.

【0011】仮想的なプロセッサ部と論理回路部を含む
システム全体のシミュレーション方法に加えて、ハード
ウェア/ソフトウェア協調検証が高速かつ高精度にシミ
ュレーションするためのソフトウェアプログラムコード
の最適化が今後の半導体開発には必要となってくる。こ
の発明は、かかる点に鑑みてなされたものであり、その
目的は、プロセッサ部と論理回路部を含み、ソフトウェ
アプログラムコードとハードウェアが相互に作用するシ
ステム全体のシミュレーションにおいて、ソフトウェア
とハードウェアの同期ずれが発生する原因となるプロセ
ッサ部の命令系列依存、分岐、例外処理において、プロ
セッサ部のシミュレーションモデルを動的に切り替える
ことにより、高速かつ精度良くシミュレーションできる
ハードウェア/ソフトウェア協調検証方法を提供するも
のである。
In addition to a method of simulating the entire system including a virtual processor unit and a logic circuit unit, optimization of software program codes for high-speed and high-accuracy simulation of hardware / software co-verification will be developed in the future of semiconductor development. Is needed. The present invention has been made in view of the above points, and has as its object to simulate software and hardware in a simulation of an entire system including a processor unit and a logic circuit unit, in which software program codes and hardware interact with each other. Provided is a hardware / software co-verification method capable of performing high-speed and high-accuracy simulation by dynamically switching a simulation model of a processor unit in instruction sequence dependence, branching, and exception processing of the processor unit that causes a synchronization error. Things.

【0012】また、システム全体を高速かつ高精度にシ
ミュレーションするために最適化された命令配列方式を
備えたコンパイラを有することにより、システムの検証
期間を短縮し、システムの開発期間を短縮することがで
きるハードウェア/ソフトウェア協調検証方法を提供す
るものである。
Further, by having a compiler having an instruction arrangement method optimized for simulating the entire system at high speed and with high accuracy, it is possible to shorten a system verification period and a system development period. It provides a hardware / software co-verification method that can be performed.

【0013】[0013]

【課題を解決するための手段】上記目的を達成するた
め、プロセッサシミュレーションモデルと論理回路モデ
ルの同期によりシステム全体のシミュレートを行うシミ
ュレーション方法において、本発明は、あらかじめプロ
セッサシミュレーションモデルを複数種類と論理回路モ
デルを備え、シミュレーションの実行中にプロセッサシ
ミュレーションモデルを動的に切り替えることにより、
プロセッサ部と論理回路部の相互作用を分岐、例外処理
等を含め、高速にかつ高精度にシステム全体のシミュレ
ーションを行うものである。
In order to achieve the above object, a simulation method for simulating the entire system by synchronizing a processor simulation model and a logic circuit model is provided. By providing a circuit model and dynamically switching processor simulation models during simulation execution,
The simulation of the entire system is performed at high speed and with high accuracy, including branching of the interaction between the processor unit and the logic circuit unit, exception processing, and the like.

【0014】請求項1記載のハードウェア/ソフトウェ
ア協調検証方法は、プロセッサ部と、論理回路部とから
成る被検証対象回路の動作のシミュレーション手法にお
けるハードウェア/ソフトウェア協調検証方法であっ
て、プロセッサ部を制御するソフトウェアの命令動作を
計算機上でシミュレートする複数のプロセッサシミュレ
ーションモデルと、論理回路部を計算機上でシミュレー
トする論理回路シミュレーションモデルと、複数のプロ
セッサシミュレーションモデルを動的に切り替えるモデ
ル切替手段と、このモデル切替手段により選択されたプ
ロセッサシミュレーションモデルと論理回路シミュレー
ションモデルのシミュレーションを同期させる同期手段
とを備え、相互に作用を及ぼし合うプロセッサ部のソフ
トウェアの命令動作と論理回路部の動作の検証を行うこ
とを特徴とするものである。
A hardware / software co-verification method according to a first aspect is a hardware / software co-verification method in a method of simulating the operation of a circuit to be verified including a processor unit and a logic circuit unit. Processor simulation model for simulating, on a computer, an instruction operation of software for controlling a computer, a logic circuit simulation model for simulating a logic circuit section on a computer, and model switching means for dynamically switching between the plurality of processor simulation models And a synchronizing means for synchronizing the simulation of the processor simulation model selected by the model switching means and the simulation of the logic circuit simulation model, and the instruction operation of software of the processor unit interacting with each other. It is characterized in that to verify the operation of the logic circuit portion.

【0015】請求項1記載の発明のハードウェア/ソフ
トウェア協調検証方法によれば、プロセッサ部と論理回
路部とからなり、プロセッサ部で実行されるソフトウェ
アプログラムコードと論理回路部が相互に作用を及ぼし
合う被検証対象回路のシミュレーションを対象とし、複
数のプロセッサシミュレーションモデルと論理回路シミ
ュレーションモデルを備え、シミュレーションの実行中
にプロセッサシミュレーションモデルを動的に切り替え
ることにより、シミュレーション速度を落とさずにシミ
ュレーション精度を向上させることができる。
According to the hardware / software co-verification method of the first aspect of the present invention, the software / program code executed by the processor unit and the logic circuit unit interact with each other. Includes multiple processor simulation models and logic circuit simulation models for the simulation of the target circuit to be verified, and dynamically switches processor simulation models during simulation to improve simulation accuracy without reducing simulation speed Can be done.

【0016】請求項2記載のハードウェア/ソフトウェ
ア協調検証方法は、請求項1において、ソフトウェアプ
ログラムコードの命令系列により、選択するべきプロセ
ッサシミュレーションモデルを決定するシミュレーショ
ンモデル決定手段を有し、モデル切替手段は、シミュレ
ーションモデル決定手段による情報によりプロセッサシ
ミュレーションモデルを動的に切り替えるものである。
According to a second aspect of the present invention, there is provided a hardware / software co-verification method according to the first aspect, further comprising: a simulation model determining unit for determining a processor simulation model to be selected according to an instruction sequence of a software program code; Is to dynamically switch the processor simulation model based on information from the simulation model determining means.

【0017】請求項2記載のハードウェア/ソフトウェ
ア協調検証方法によれば、プロセッサ部で実行されるソ
フトウェアプログラムコードの命令系列に応じて、その
依存性を検査し、選択するべきプロセッサシミュレーシ
ョンモデルを決定し、決定されたシミュレーションモデ
ルを動的に切り替えながら、協調シミュレーションを行
うことにより、プロセッサシミュレーションモデルと命
令系列に依存するシミュレーション精度の劣化を防ぐこ
とができる。
According to the hardware / software co-verification method of the present invention, the dependence is checked according to the instruction sequence of the software program code executed by the processor unit, and the processor simulation model to be selected is determined. In addition, by performing the cooperative simulation while dynamically switching the determined simulation model, it is possible to prevent deterioration of the simulation accuracy depending on the processor simulation model and the instruction sequence.

【0018】請求項3記載のハードウェア/ソフトウェ
ア協調検証方法は、請求項1において、論理回路シミュ
レーションモデルのシミュレーション時刻をプロセッサ
シミュレーションモデルのシミュレーション時刻よりも
先に進める同期処理手段と、論理回路シミュレーション
モデルおよび検証対象回路外からプロセッサシミュレー
ションモデルに入力される例外処理信号を検知する例外
発生検知手段とを有し、モデル切替手段は例外発生検知
手段の情報によりプロセッサシミュレーションモデルを
動的に切り替えるものである。
According to a third aspect of the present invention, there is provided a hardware / software co-verification method according to the first aspect, wherein synchronization processing means for advancing the simulation time of the logic circuit simulation model ahead of the simulation time of the processor simulation model; And an exception occurrence detecting means for detecting an exception processing signal input to the processor simulation model from outside the circuit to be verified, and the model switching means dynamically switches the processor simulation model based on information of the exception occurrence detecting means. .

【0019】請求項3記載のハードウェア/ソフトウェ
ア協調検証方法によれば、請求項1と同様な効果のほ
か、プロセッサシミュレーションモデルと論理回路部の
同期処理において、論理回路部をプロセッサシミュレー
ションモデルのシミュレーション時刻よりも先に進め、
論理回路部からプロセッサシミュレーションモデルへ伝
達される割り込み等の例外処理を検知して、例外処理発
生に応じてプロセッサシミュレーションモデルを動的に
切り替えることにより、プロセッサ部と論理回路部の相
互作用の中で、例外的に発生する処理によるシミュレー
ション精度の劣化を防ぐことができる。
According to the hardware / software co-verification method of the third aspect, in addition to the same effects as those of the first aspect, in the synchronization processing of the processor simulation model and the logic circuit unit, the logic circuit unit is simulated by the processor simulation model. Advance ahead of time,
By detecting exception processing such as interrupts transmitted from the logic circuit section to the processor simulation model, and dynamically switching the processor simulation model according to the occurrence of the exception processing, the interaction between the processor section and the logic circuit section can be performed. In addition, it is possible to prevent the simulation accuracy from deteriorating due to exceptionally occurring processing.

【0020】請求項4記載のハードウェア/ソフトウェ
ア協調検証方法は、プロセッサシミュレーションモデル
を高速にシミュレーションするために最適化し、かつ論
理回路シミュレーションモデルとの協調検証の精度を高
精度に保つために最適化するように命令順序を変更する
プログラム命令配列方式を有するものである。請求項4
記載のハードウェア/ソフトウェア協調検証方法によれ
ば、プログラム命令配列方式のソフトウェアプログラム
コードを生成することにより、ソフトウェアプログラム
コードの命令配列方式をコード量の最適化や速度の最適
化で行うのではなく、実際にハードウェアを制作する前
の段階で行われるハードウェア/ソフトウェア協調検証
の高精度かつ高速化のための最適化を行うので、ハード
ウェアとソフトウェアの相互作用の検証時間を短縮する
ことができる。
According to a fourth aspect of the present invention, there is provided a hardware / software co-verification method, which is optimized to simulate a processor simulation model at high speed, and is optimized to maintain high accuracy of co-verification with a logic circuit simulation model. In order to change the order of instructions. Claim 4
According to the described hardware / software co-verification method, by generating the software program code of the program instruction arrangement method, the instruction arrangement method of the software program code is not performed by optimizing the code amount or the speed. Optimizes hardware / software co-verification, which is performed before the actual production of hardware, for high accuracy and high speed, thus shortening the verification time of the interaction between hardware and software. it can.

【0021】請求項5記載のハードウェア/ソフトウェ
ア協調検証方法は、請求項4において、プログラム命令
配列方式の命令配列の決定機能を有するコンパイラをも
つものである。請求項5記載のハードウェア/ソフトウ
ェア協調検証方法によれば、請求項4と同様な効果のほ
か、プログラム命令配列方式によりソフトウェアプログ
ラムコードを生成するコンパイラにより、実際に記述さ
れる高級言語を用いて、膨大なシステム検証を短縮する
ことができ、システムの開発期間を短縮できる。
According to a fifth aspect of the present invention, there is provided a hardware / software co-verification method according to the fourth aspect, further comprising a compiler having a function of determining an instruction array in a program instruction array system. According to the hardware / software co-verification method of the fifth aspect, in addition to the same effects as those of the fourth aspect, a high-level language that is actually described by a compiler that generates a software program code by a program instruction arrangement method is used. In addition, a huge amount of system verification can be shortened, and a system development period can be shortened.

【0022】[0022]

【発明の実施の形態】以下、この発明の実施の形態につ
いて、図を用いて説明する。 (第1の実施の形態)この発明の請求項1および請求項
2に対応する第1の実施の形態について、図1から図8
を用いて説明する。
Embodiments of the present invention will be described below with reference to the drawings. (First Embodiment) FIGS. 1 to 8 show a first embodiment corresponding to claims 1 and 2 of the present invention.
This will be described with reference to FIG.

【0023】図1は、第1の実施の形態のハードウエア
/ソフトウェア協調検証の概略概念図である。図1にお
いて、101はプロセッサシミュレーションモデル10
3に入力されるソフトウェアプログラムコードである。
102はソフトウェアプログラムコード101の命令系
列の依存性をチェックし、シミュレートするプロセッサ
シミュレートモデルを決定するシミュレーションモデル
決定手段である系列依存検出手段である。103はプロ
セッサ部を制御するソフトウエアの命令動作を計算機上
でシミュレートするプロセッサシミュレーションモデル
であり、図1では2つのプロセッサシミュレーションモ
デルを備えている。111はプロセッサ部の命令毎の処
理をシミュレートする命令レベルシミュレーションモデ
ルである。この命令レベルシミュレーションモデル11
1では実際のチップ上のプロセッサに供給されるクロッ
クを意識せず、入力される命令ごとにシミュレートされ
る。113はプロセッサに供給されるクロック毎の動作
をシミュレートするサイクルアキュレートモデルであ
る。このモデル113ではパイプラインが実現されてい
るプロセッサにおいてはそのパイプライン動作もシミュ
レートすることができる。112はプロセッサ内部のレ
ジスタデータを格納しておくレジスタ(記憶手段)であ
る。このレジスタ112は命令レベルシミュレーション
モデル111からも、サイクルアキュレートモデル11
3からもアクセスされる。このレジスタ112は同一シ
ミュレーション時刻において、命令レベルシミュレーシ
ョンモデル111とサイクルアキュレートモデル113
から同時に書き込みは行われない。104は命令レベル
シミュレーションモデル111と論理回路部を計算機上
でシミュレートする論理回路シミュレーションモデル1
05の同期をとる同期手段である。図1では論理回路部
のシミュレーションモデルは論理回路部に供給されるク
ロックに対して実際のチップと同一の動作をするサイク
ルアキュレートモデルである。同期手段104はプロセ
ッサ部に入力されるクロックと論理回路部に入力される
クロックの周期の違いがある場合でも、命令レベルシミ
ュレーションモデル111と論理回路モデル105のシ
ミュレーション時刻を同期させることができる。
FIG. 1 is a schematic conceptual diagram of the hardware / software co-verification of the first embodiment. In FIG. 1, reference numeral 101 denotes a processor simulation model 10.
3 is a software program code to be input.
Reference numeral 102 denotes a sequence dependence detection unit which is a simulation model determination unit that checks the dependence of the instruction sequence of the software program code 101 and determines a processor simulation model to be simulated. Reference numeral 103 denotes a processor simulation model for simulating, on a computer, instruction operations of software for controlling the processor unit. FIG. 1 includes two processor simulation models. An instruction level simulation model 111 simulates processing of each instruction of the processor unit. This instruction level simulation model 11
In the case of 1, the simulation is performed for each input instruction without considering the clock supplied to the processor on the actual chip. A cycle accurate model 113 simulates an operation for each clock supplied to the processor. In the model 113, in a processor in which a pipeline is realized, the pipeline operation can be simulated. Reference numeral 112 denotes a register (storage means) for storing register data inside the processor. The register 112 stores the cycle accurate model 11 from the instruction level simulation model 111.
3 is also accessed. The register 112 stores the instruction level simulation model 111 and the cycle accurate model 113 at the same simulation time.
Are not written simultaneously. Reference numeral 104 denotes an instruction level simulation model 111 and a logic circuit simulation model 1 for simulating a logic circuit unit on a computer.
Synchronization means for synchronizing 05. In FIG. 1, the simulation model of the logic circuit unit is a cycle accurate model that performs the same operation as an actual chip with respect to a clock supplied to the logic circuit unit. The synchronization unit 104 can synchronize the simulation time of the instruction level simulation model 111 with the simulation time of the logic circuit model 105 even when there is a difference between the period of the clock input to the processor unit and the period of the clock input to the logic circuit unit.

【0024】ソフトウエアプログラムコード101を入
力とし、プロセッサシミュレーションモデル103内の
複数のモデルから、命令系列の依存を検出する系列依存
検出手段102により、シミュレーション実行中に動的
に切り替え、また論理回路シミュレーションモデル10
5との同期を、分岐、割込み処理に対応した同期処理1
04により行う。
A software program code 101 is input, and a sequence dependence detecting means 102 for detecting a dependence of an instruction sequence from a plurality of models in a processor simulation model 103 dynamically switches during the execution of a simulation. Model 10
Synchronization 1 with synchronization and branch processing corresponding to 5
04.

【0025】図2は、第1の実施の形態のプロセッサシ
ミュレーションモデルと論理回路シミュレーションモデ
ルのシミュレーション処理フローである。201はプロ
セッサシミュレーションモデルの処理フローであり、2
02は論理回路シミュレーションモデルの処理フローで
ある。201と202の処理はコンカレントに実行され
る。211はプロセッサシミュレーションモデルの初期
化処理であり、212はプロセッサシミュレーションモ
デルで実行されるソフトウェアプログラムコードの読み
込み処理である。213はシミュレートさせる命令の依
存を検出する系列依存検出処理である。
FIG. 2 is a simulation processing flow of the processor simulation model and the logic circuit simulation model of the first embodiment. 201 is a processing flow of the processor simulation model,
02 is a processing flow of the logic circuit simulation model. The processing of 201 and 202 is executed concurrently. 211 is a processor simulation model initialization process, and 212 is a software program code reading process executed by the processor simulation model. Reference numeral 213 denotes a sequence dependence detection process for detecting dependence of an instruction to be simulated.

【0026】この処理で、プロセッサシミュレーション
モデルが選択される。214は選択されたプロセッサシ
ミュレーションモデルごとに論理回路シミュレーション
モデルを動作させるクロックサイクル数を判定する同期
クロック数判定処理である。215はプロセッサシミュ
レーションモデルによりソフトウェアプログラムコード
中の命令動作をシミュレートするプロセッサシミュレー
ション処理である。216はソフトウェアプログラムコ
ードが終了しているかを判定する命令終了判定処理であ
る。
In this process, a processor simulation model is selected. Reference numeral 214 denotes synchronous clock number determination processing for determining the number of clock cycles for operating the logic circuit simulation model for each selected processor simulation model. A processor simulation process 215 simulates an instruction operation in the software program code by a processor simulation model. An instruction end determination process 216 determines whether the software program code has ended.

【0027】221は論理回路モデルの初期化処理であ
り、222はプロセッサ部以外から被検証回路に入力さ
れるテストベクタ入力処理である。223は論理回路シ
ミュレーションモデルによるシミュレーション処理であ
る。第1の実施の形態ではこの処理は1クロック分の処
理である。203はプロセッサシミュレーションモデル
と論理回路シミュレーションモデルとの間でデータのや
り取りをするための共有データを記憶する手段である。
224は214のサイクルデータに基づき、論理回路シ
ミュレーションモデルをシミュレートするクロック数を
判定するクロックサイクル判定処理であり、225はシ
ミュレートするクロックサイクルを1進めるクロック制
御処理である。204は216の命令終了判定処理から
の同期信号により論理回路シミュレーションモデルのシ
ミュレーションを終わらせる終了同期信号である。
Reference numeral 221 denotes a logic circuit model initialization process, and reference numeral 222 denotes a test vector input process to be input to a circuit to be verified from other than the processor unit. Reference numeral 223 denotes a simulation process using a logic circuit simulation model. In the first embodiment, this processing is processing for one clock. 203 is means for storing shared data for exchanging data between the processor simulation model and the logic circuit simulation model.
Reference numeral 224 denotes a clock cycle determination process for determining the number of clocks for simulating the logic circuit simulation model based on the 214 cycle data, and reference numeral 225 denotes a clock control process for advancing the simulated clock cycle by one. Reference numeral 204 denotes an end synchronization signal for terminating the simulation of the logic circuit simulation model based on the synchronization signal from the instruction end determination processing in 216.

【0028】図3は、図2の215のプロセッサシミュ
レーション処理内のフローをより詳細に示した図であ
る。301は213の系列依存検出処理で選択されたプ
ロセッサシミュレーションモデルを用いてシミュレーシ
ョンモデルを実行するモデル起動処理である。301の
モデル起動処理により302の命令レベルモデルによる
シミュレーション処理と303のサイクルアキュレート
モデルによるシミュレーション処理が実行される。
FIG. 3 is a diagram showing the flow in the processor simulation process of 215 in FIG. 2 in more detail. Reference numeral 301 denotes a model activation process for executing a simulation model using the processor simulation model selected in the series dependence detection process in 213. By the model starting process of 301, the simulation process of the instruction level model of 302 and the simulation process of the cycle accurate model of 303 are executed.

【0029】表1はシミュレートされるプロセッサの命
令セットの一例である。
Table 1 is an example of a simulated processor instruction set.

【0030】[0030]

【表1】 [Table 1]

【0031】命令LDはアドレスにより指定されるメモ
リ領域のデータからレジスタAまたはレジスタBまたは
レジスタCにデータを転送するデータ転送命令である。
命令STはレジスタAまたはレジスタBまたはレジスタ
Cからアドレスにより指定されるメモリ領域にデータを
転送するデータ転送命令である。命令MOVはソースで
指定されるレジスタAまたはレジスタBまたはレジスタ
Cまたは定数値をデスティネーションで指定されるレジ
スタAまたはレジスタBまたはレジスタCに代入する算
術演算命令である。命令ADDはソースで指定されるレ
ジスタAまたはレジスタBまたはレジスタCまたは定数
値とデスティネーションで指定されるレジスタAまたは
レジスタBまたはレジスタCとを加算し、結果をデステ
ィネーションで指定されているレジスタに代入する算術
演算命令である。命令SUBはソースで指定されるレジ
スタAまたはレジスタBまたはレジスタCまたは定数値
をデスティネーションで指定されるレジスタAまたはレ
ジスタBまたはレジスタCから減算し、結果をデスティ
ネーションで指定されているレジスタに代入する算術演
算命令である。命令MULはソースで指定されるレジス
タAまたはレジスタBまたはレジスタCまたは定数値と
デスティネーションで指定されるレジスタAまたはレジ
スタBまたはレジスタCとを乗算し、結果をデスティネ
ーションで指定されるレジスタに代入する算術演算命令
である。命令CMPはソースで指定されるレジスタAま
たはレジスタBまたはレジスタCまたは定数値とデステ
ィネーションで指定されるレジスタAまたはレジスタB
またはレジスタCとを比較し、等しければ比較結果フラ
グをセットし、等しくなければ比較結果フラグをリセッ
トする比較命令である。比較結果フラグは次にCMP命
令が実行されるまで保存される。命令BEQは、比較結
果フラグがセットされていれば、ラベルで指定されてい
る命令位置に処理をジャンプさせる条件分岐命令であ
る。命令JMPはラベルで指定されている命令位置に処
理をジャンプさせる無条件分岐命令である。命令RET
Iは割り込み信号が入力された後に処理される割り込み
処理から、割り込み信号が入力される前に処理されてい
た命令位置に処理を戻す割り込み処理復帰命令である。
命令NOPは何も処理を行わない。
The instruction LD is a data transfer instruction for transferring data from data in a memory area specified by an address to a register A, a register B, or a register C.
Instruction ST is a data transfer instruction for transferring data from register A, register B, or register C to a memory area specified by an address. The instruction MOV is an arithmetic operation instruction that substitutes a register A, a register B, a register C, or a constant value specified by a source into a register A, a register B, or a register C specified by a destination. Instruction ADD adds register A, register B, register C, or a constant value specified by the source to register A, register B, or register C specified by the destination, and stores the result in the register specified by the destination. Arithmetic operation instruction to be assigned. The instruction SUB subtracts a register A, a register B, a register C, or a constant value specified by a source from a register A, a register B, or a register C, specified by a destination, and assigns the result to the register specified by the destination. Arithmetic operation instruction. The instruction MUL multiplies register A, register B, register C, or a constant value specified by the source with register A, register B, or register C specified by the destination, and assigns the result to the register specified by the destination. Arithmetic operation instruction. Instruction CMP is a register A or register B or register C specified by the source or a constant value and a register A or register B specified by the destination
Alternatively, the instruction is a comparison instruction for comparing the register C and setting the comparison result flag if they are equal, and resetting the comparison result flag if they are not equal. The comparison result flag is stored until the next CMP instruction is executed. The instruction BEQ is a conditional branch instruction that causes the processing to jump to the instruction position specified by the label if the comparison result flag is set. The instruction JMP is an unconditional branch instruction that causes the processing to jump to the instruction position specified by the label. Instruction RET
I is an interrupt processing return instruction for returning the processing from the interrupt processing performed after the input of the interrupt signal to the instruction position processed before the input of the interrupt signal.
The instruction NOP does nothing.

【0032】図4は実行するプログラムの一例である。
図4において一列が一命令を表しており、左からラベ
ル、命令、デスティネーション、ソースの順番で記述さ
れている。513、514、515、516、517、
518、519、520、521の各命令に対してはラ
ベルはつけられていない。図7は被検証対象回路の概略
図である。801は被検証対象回路全体であり、この回
路に入力が与えられる。803は命令コードを実行する
プロセッサコアであり、804は命令コードが格納され
るメモリである。805はプロセッサコアと命令メモリ
よりなるプロセッサ部である。802はプロセッサ部と
相互作用を及ぼす論理回路部である。
FIG. 4 shows an example of a program to be executed.
In FIG. 4, one column represents one instruction, and is described in the order of label, instruction, destination, and source from the left. 513, 514, 515, 516, 517,
The instructions 518, 519, 520, and 521 are not labeled. FIG. 7 is a schematic diagram of a circuit to be verified. Reference numeral 801 denotes the entire circuit to be verified, and an input is given to this circuit. A processor core 803 executes the instruction code, and a memory 804 stores the instruction code. A processor unit 805 includes a processor core and an instruction memory. A logic circuit unit 802 interacts with the processor unit.

【0033】図5は501のソフトウェアプログラムコ
ードを実行した場合の各サイクル毎、各命令毎の状態6
11〜630を表していおり、網掛け(628)はデー
タハザードによるパイプラインストールを、点線(61
8、619)は分岐命令による命令のクリアをあらわし
ている。601はクロックサイクル数である。図6は第
1の実施の形態による各プロセッサシミュレーションモ
デルがシミュレートしている命令を示した図である。
FIG. 5 shows a state 6 for each cycle and each instruction when the software program code 501 is executed.
Shading (628) indicates pipeline stall due to data hazard and dotted line (61).
8, 619) represent the clearing of the instruction by the branch instruction. 601 is the number of clock cycles. FIG. 6 is a diagram showing instructions simulated by each processor simulation model according to the first embodiment.

【0034】図8は第1の実施の形態に係るハードウェ
アの構成図の一例を示しており、図8において、901
は処理されたあらゆる情報をみるためのディスプレイ装
置、902は設計者があらゆる情報や処理命令を入力す
るためのキーボード、903はあらゆる処理を行う中央
演算処理装置、904は各情報を格納する記憶装置であ
る。
FIG. 8 shows an example of a hardware configuration diagram according to the first embodiment. In FIG.
Is a display device for viewing all processed information, 902 is a keyboard for the designer to input all information and processing instructions, 903 is a central processing unit for performing all processing, 904 is a storage device for storing each information It is.

【0035】以下、第1の実施の形態に係るハードウェ
ア/ソフトウェア協調シミュレーション方法を、図2お
よび図3のフローに基づきプログラム501を実行した
場合を例に用いて具体的に説明する。シミュレーション
の対象となるプロセッサは401の命令セットを備え、
アクセス可能なアドレス空間のうちアドレス[A0]、
[A1]、[B0]、[B1]は論理回路部のレジスタ
に割り当てられているものとする。このプロセッサは命
令フェッチ/デコードステージ、命令実行/メモリアク
セスステージ、ライトバックステージの3つのステージ
からなるパイプライン構造を持ち、分岐命令に対しては
分岐しないことを前提とする分岐予測を行う。パイプラ
イン処理上でデータハザードがある場合はパイプライン
ストールが発生する。また、論理回路部に与えられる入
力ベクタと論理回路部内の処理により、プロセッサ部か
らアクセス可能な論理回路部内のレジスタについて、ア
ドレス空間[A0]に割り当てられているレジスタには
クロックサイクル2で20、クロックサイクル10で3
0が入るものとする。また同様に[A1]にはクロック
サイクル2で10、クロックサイクル10で40が入る
ものとする。
Hereinafter, the hardware / software co-simulation method according to the first embodiment will be specifically described with reference to an example in which the program 501 is executed based on the flowcharts of FIGS. The processor to be simulated has 401 instruction sets,
Address [A0] of the accessible address space,
[A1], [B0], and [B1] are assumed to be assigned to registers of the logic circuit unit. This processor has a pipeline structure including three stages of an instruction fetch / decode stage, an instruction execution / memory access stage, and a write back stage, and performs branch prediction on the assumption that a branch instruction is not taken. If there is a data hazard in pipeline processing, pipeline stall occurs. According to the input vector given to the logic circuit unit and the processing in the logic circuit unit, the registers in the logic circuit unit accessible from the processor unit are stored in the registers allocated to the address space [A0] in clock cycle 2, 3 in clock cycle 10
0 shall be entered. Similarly, it is assumed that [A1] contains 10 in clock cycle 2 and 40 in clock cycle 10.

【0036】201のプロセッサシミュレーションモデ
ルの処理フローと202の論理回路部の処理フローは並
列に実行される。211、221の初期化処理ではプロ
セッサシミュレーションモデル、論理回路シミュレーシ
ョンモデルの初期化を行う。212のプログラム読み込
み処理ではプロセッサシミュレーションモデルによりシ
ミュレートされるソフトウェアプログラムコードを読み
込み記憶手段に格納され、シミュレートするべき命令位
置を511に設定する。また、222の入力ベクタ読み
込み処理では、論理回路シミュレーションモデルでシミ
ュレートされる入力ベクタが読み込まれ記憶手段に格納
される。
The processing flow of the processor simulation model 201 and the processing flow of the logic circuit unit 202 are executed in parallel. In the initialization processing of 211 and 221, a processor simulation model and a logic circuit simulation model are initialized. In the program reading process at 212, the software program code simulated by the processor simulation model is read and stored in the storage means, and the instruction position to be simulated is set at 511. In the input vector reading process of 222, the input vector simulated by the logic circuit simulation model is read and stored in the storage means.

【0037】213の系列依存検出処理では、まず、パ
イプラインステージ数の3つの命令が読み込まれる。こ
こでは、511、512、513の命令が読み込まれ、
1つめの命令がデータハザードを発生させるか、また、
読み込まれた3つの命令に分岐命令があるか、分岐命令
により分岐する命令かに関してチェックされる。511
の命令はMOVであり分岐命令ではなく、512,51
3に対してデータハザードを発生させない。また、51
1、512、513のいずれも分岐命令ではない。
In the sequence dependency detection process at 213, first, three instructions of the number of pipeline stages are read. Here, instructions 511, 512, and 513 are read,
Whether the first instruction causes a data hazard,
It is checked whether the read three instructions include a branch instruction or whether the instruction is a branch instruction. 511
Are MOV, not branch instructions,
No data hazard is generated for No. 3. Also, 51
None of 1, 512 and 513 are branch instructions.

【0038】214のサイクル数判定処理では、シミュ
レートする命令にかかるサイクル数が判定され、論理回
路部と同期を取るために必要なサイクル数が算出され
る。ここでは、初期状態からはじめの命令が実行されて
いるため、3が算出され、224の論理回路モデルシミ
ュレーションのクロックかサイクル数判定処理に同期デ
ータとして送られる。
In the cycle number determination process at 214, the number of cycles required for the instruction to be simulated is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, since the first instruction has been executed from the initial state, 3 is calculated, and is sent as synchronous data to the clock or cycle number determination processing of 224 in the logic circuit model simulation.

【0039】301のモデル判定起動では213の系列
依存検出処理で選択されたシミュレーションモデルを新
たな命令について実行させる。ここでは命令レベルシミ
ュレーションモデルが選択され、302によりプロセッ
サ部の動作がシミュレートされる。216の命令終了判
定処理ではまだ511の命令を実行中であるため、終了
せずに213に戻る。
In the model determination activation of 301, the simulation model selected in the series dependence detection processing of 213 is executed for a new instruction. Here, an instruction level simulation model is selected, and the operation of the processor unit is simulated by 302. In the instruction end determination processing of 216, since the instruction of 511 is still being executed, the flow returns to 213 without terminating.

【0040】並列に実行されている論理回路部の処理フ
ローでは、223により1クロックサイクル分のシミュ
レートが行われ、224、225を通して214により
算出されたクロックサイクル数3だけ223の論理回路
シミュレーションモデルのシミュレーションが実行され
る。論理回路部に与えられる入力ベクタと論理回路部な
いの処理により論理回路部内のレジスタでプロセッサ部
からアクセス可能なアドレス空間[A0]に割り当てら
れているレジスタにはクロックサイクル2で20、[A
1]には10、が入る。
In the processing flow of the logic circuit section executed in parallel, a simulation for one clock cycle is performed by 223, and the number of clock cycles calculated by 214 through 224 and 225 is three. Is executed. The input vector given to the logic circuit unit and the registers assigned to the address space [A0] accessible from the processor unit in the registers in the logic circuit unit by the processing of the logic circuit unit are 20 and [A] in clock cycle 2.
1] contains 10.

【0041】213の系列依存検出処理では、新たな命
令である514が読み込まれ、512、513、514
に関して系列依存がチェックされる。512の命令はL
Dであり、513、514対してデータハザードを発生
させない。また、分岐命令も存在しない。214のサイ
クル数判定処理では、シミュレートした命令にかかるサ
イクル数が判定され、論理回路部と同期を取るために必
要なサイクル数が算出される。ここでは、4が算出さ
れ、224の論理回路シミュレーションモデルシミュレ
ーションのクロックかサイクル数判定処理に同期データ
として送られる。
In the sequence dependency detection process at 213, a new instruction 514 is read, and 512, 513, 514 are read.
Is checked for sequence dependence. 512 instructions are L
D, no data hazard is generated for 513 and 514. Also, there is no branch instruction. In the cycle number determination process at 214, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, 4 is calculated and sent as synchronous data to the clock or cycle number determination processing of the logic circuit simulation model simulation of 224.

【0042】301のモデル判定処理では213の系列
依存検出処理よりシミュレーションモデルを選択する。
ここでも命令レベルシミュレーションモデルが選択さ
れ、302によりプロセッサ部の動作がシミュレートさ
れる。216の命令終了判定処理ではまだ511の命令
を実行中であるため、終了せずに213に戻る。
In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213.
Here also, the instruction level simulation model is selected, and the operation of the processor unit is simulated by 302. In the instruction end determination processing of 216, since the instruction of 511 is still being executed, the flow returns to 213 without terminating.

【0043】並列に実行されている論理回路部の処理フ
ローでは、223により1クロックサイクル分のシミュ
レートが行われ、224、225を通して214により
算出されたクロックサイクル数4までのシミュレーショ
ンが論理回路シミュレーションモデルに対して実行され
る。以後同様に514の命令実行であるクロックサイク
ル6まで続けられる。
In the processing flow of the logic circuit section executed in parallel, the simulation for one clock cycle is performed by 223, and the simulation up to 4 clock cycles calculated by 214 through 224 and 225 is performed by the logic circuit simulation. Performed on the model. Thereafter, the operation is similarly continued until clock cycle 6, which is the execution of instruction 514.

【0044】213の系列依存検出処理では、新たな命
令である517が読み込まれ、515、516、517
に関して系列依存がチェックされる。515の命令はC
MPであり、516、517対してデータハザードを発
生させない。しかし、517は分岐命令である。214
のサイクル数判定処理では、シミュレートした命令にか
かるサイクル数が判定され、論理回路部と同期を取るた
めに必要なサイクル数が算出される。ここでは、7が算
出され、224の論理回路シミュレーションモデルシミ
ュレーションのクロックがサイクル数判定処理に同期デ
ータとして送られる。
In the sequence dependency detection processing at 213, a new instruction 517 is read, and 515, 516, and 517 are read.
Is checked for sequence dependence. The instruction at 515 is C
MP, which does not cause data hazard for 516 and 517. However, 517 is a branch instruction. 214
In the cycle number determination process, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, 7 is calculated, and the clock of the logic circuit simulation model simulation of 224 is sent as synchronous data to the cycle number determination processing.

【0045】301のモデル判定処理では213の系列
依存検出処理よりシミュレーションモデルを選択する。
ここでは、515のCMP命令に対しては命令レベルシ
ミュレーションモデルが選択されるが、517の分岐命
令に対して、サイクルアキュレートなモデルのシミュレ
ートも選択され、302により515のCMP命令に対
する動作、303により517のBEQ命令に対する動
作がシミュレートされる。CMP命令に対するシミュレ
ートではクロックサイクル2の論理回路部のシミュレー
トで[A0]、[A1]にそれぞれ20、10が入って
おり、regA、regCに同一の値があり、比較結果
フラグはセットされる。
In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213.
Here, the instruction level simulation model is selected for the 515 CMP instruction, but the cycle-accurate model simulation is also selected for the 517 branch instruction. 303 simulates the operation for the 517 BEQ instruction. In the simulation for the CMP instruction, in the simulation of the logic circuit unit in clock cycle 2, [A0] and [A1] contain 20, 10 respectively, regA and regC have the same value, and the comparison result flag is set. You.

【0046】216の命令終了判定処理ではまだ515
の命令を実行中であるため、終了せずに213に戻る。
並列に実行されている論理回路部の処理フローでは、2
23により1クロックサイクル分のシミュレートが行わ
れ、224、225を通して214により算出されたク
ロックサイクル数7までのシミュレーションが論理回路
シミュレーションモデルに対して実行される。
In the instruction end determination processing of 216, the processing is still 515
Since the instruction is being executed, the process returns to 213 without terminating.
In the processing flow of the logic circuit unit executed in parallel, 2
The simulation for one clock cycle is performed by 23, and the simulation up to the number of clock cycles 7 calculated by 214 through 224 and 225 is performed on the logic circuit simulation model.

【0047】213の系列依存検出処理では、新たな命
令である518が読み込まれ、516、517、518
に関して系列依存がチェックされる。516の命令はN
OPであり、517、518対してデータハザードを発
生させない。しかし、517は分岐命令であり、518
は分岐命令直後の命令である。214のサイクル数判定
処理では、シミュレートした命令にかかるサイクル数が
判定され、論理回路部と同期を取るために必要なサイク
ル数が算出される。ここでは、8が算出され、224の
論理回路シミュレーションモデルシミュレーションのク
ロックがサイクル数判定処理に同期データとして送られ
る。
In the sequence dependence detection processing at 213, a new instruction 518 is read, and 516, 517, and 518 are read.
Is checked for sequence dependence. 516 instructions are N
This is an OP and does not generate a data hazard for 517 and 518. However, 517 is a branch instruction and 518
Is the instruction immediately after the branch instruction. In the cycle number determination process at 214, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, 8 is calculated, and the clock of the logic circuit simulation model simulation of 224 is sent as synchronous data to the cycle number determination processing.

【0048】301のモデル判定処理では213の系列
依存検出処理よりシミュレーションモデルを選択する。
ここでは、516のNOP命令に対しては命令レベルシ
ミュレーションモデルが選択される。517の分岐命令
に対して、すでにサイクルアキュレートなモデルのシミ
ュレートが行われている。518の命令に対しても分岐
命令直後の命令であるため、サイクルアキュレートモデ
ルのシミュレートが行われる。302により516のN
OP命令に対する動作、303により517のBEQ命
令に対する動作と並行して518のSUB命令がシミュ
レートされる。
In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213.
Here, the instruction level simulation model is selected for the 516 NOP instructions. For the 517 branch instructions, a cycle-accurate model has already been simulated. Since the instruction 518 is also the instruction immediately after the branch instruction, the simulation of the cycle accurate model is performed. N at 516 by 302
The operation for the OP instruction, 303 simulates 518 SUB instructions in parallel with the operation for the 517 BEQ instruction.

【0049】216の命令終了判定処理ではまだ515
の命令を実行中であるため、終了せずに213に戻る。
並列に実行されている論理回路部の処理フローでは、2
23により1クロックサイクル分のシミュレートが行わ
れ、224、225を通して214により算出されたク
ロックサイクル数8までのシミュレーションが論理回路
シミュレーションモデルに対して実行される。
In the instruction end determination processing at 216, the processing is still 515
Since the instruction is being executed, the process returns to 213 without terminating.
In the processing flow of the logic circuit unit executed in parallel, 2
The simulation for one clock cycle is performed by 23, and the simulation up to the number of clock cycles 8 calculated by 214 through 224 and 225 is performed on the logic circuit simulation model.

【0050】213の系列依存検出処理では、新たな命
令である519が読み込まれ、517、518、519
に関して系列依存がチェックされる。517の命令は分
岐命令であり、すでにサイクルアキュレートモデルにて
実行中の命令であり、519は分岐命令後、2つ目の命
令である。214のサイクル数判定処理では、シミュレ
ートした命令にかかるサイクル数が判定され、論理回路
部と同期を取るために必要なサイクル数が算出される。
ここでは、9が算出され、224の論理回路シミュレー
ションモデルのシミュレーションのクロックがサイクル
数判定処理214に同期データとして送られる。
In the sequence dependence detection processing at 213, a new instruction 519 is read, and 517, 518, and 519 are read.
Is checked for sequence dependence. The instruction 517 is a branch instruction, which is already being executed in the cycle accurate model, and the instruction 519 is a second instruction after the branch instruction. In the cycle number determination process at 214, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated.
Here, 9 is calculated, and the simulation clock of the logic circuit simulation model of 224 is sent to the cycle number determination processing 214 as synchronization data.

【0051】301のモデル判定処理では213の系列
依存検出処理よりシミュレーションモデルを選択する。
ここでは、517のBEQ命令に対してすでにサイクル
アキュレートなモデルのシミュレートが行われている。
519の命令に対しても分岐命令後2つ目の命令である
ため、サイクルアキュレートモデルのシミュレートが行
われる。302により比較結果フラグがセットされてい
るため分岐が発生する。このためサイクルアキュレート
なモデルでは518、519の命令の消去動作もシミュ
レートされる。
In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213.
Here, the simulation of a cycle-accurate model has already been performed for 517 BEQ instructions.
Since the instruction 519 is the second instruction after the branch instruction, the cycle accurate model is simulated. Since the comparison result flag is set by 302, a branch occurs. Therefore, in the cycle accurate model, the erasing operation of the instructions 518 and 519 is also simulated.

【0052】216の命令終了判定処理ではまだ515
の命令を実行中であるため、終了せずに213に戻る。
並列に実行されている論理回路部の処理フローでは、2
23により1クロックサイクル分のシミュレートが行わ
れ、224、225を通して214により算出されたク
ロックサイクル数9までのシミュレーションが論理回路
シミュレーションモデルに対して実行される。
In the instruction end determination processing of 216, the processing is still 515
Since the instruction is being executed, the process returns to 213 without terminating.
In the processing flow of the logic circuit unit executed in parallel, 2
The simulation for one clock cycle is performed by 23, and the simulation up to the number of clock cycles 9 calculated by 214 through 224 and 225 is executed for the logic circuit simulation model.

【0053】213の系列依存検出処理では、分岐後の
命令3つの命令が読み込まれ、512、513、514
に関して系列依存がチェックされる。512は分岐命令
517により分岐した命令である。512、513、5
14にはデータハザードは発生しない。214のサイク
ル数判定処理では、シミュレートした命令にかかるサイ
クル数が判定され、論理回路部と同期を取るために必要
なサイクル数が算出される。ここでは、12が算出さ
れ、224の論理回路シミュレーションモデルシミュレ
ーションのクロックかサイクル数判定処理に同期データ
として送られる。
In the sequence dependency detection processing at 213, three instructions after branching are read, and 512, 513, and 514 are read.
Is checked for sequence dependence. Reference numeral 512 denotes an instruction branched by the branch instruction 517. 512, 513, 5
No data hazard occurs at 14. In the cycle number determination process at 214, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, 12 is calculated and sent as synchronous data to the clock or cycle number determination processing of the logic circuit simulation model simulation of 224.

【0054】301のモデル判定処理では213の系列
依存検出処理よりシミュレーションモデルを選択する。
ここでは、512のLD命令に対して、分岐した命令で
あるためサイクルアキュレートなモデルのシミュレート
が行われる。216の命令終了判定処理ではまだ515
の命令を実行中であるため、終了せずに213に戻る。
In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213.
Here, a cycle-accurate model is simulated for 512 LD instructions because they are branched instructions. The instruction end determination processing of 216 is still 515
Since the instruction is being executed, the process returns to 213 without terminating.

【0055】並列に実行されている論理回路部の処理フ
ローでは、223により1クロックサイクル分のシミュ
レートが行われ、224、225を通して214により
算出されたクロックサイクル数12までのシミュレーシ
ョンが論理回路シミュレーションモデルに対して実行さ
れる。213の系列依存検出処理では、新たな命令51
5が命令が読み込まれ、513、514、515に関し
て系列依存がチェックされる。513、514、515
にはデータハザードも発生せず、分岐命令も存在しな
い。
In the processing flow of the logic circuit section executed in parallel, the simulation for one clock cycle is performed by 223, and the simulation up to 12 clock cycles calculated by 214 through 224 and 225 is performed by the logic circuit simulation. Performed on the model. In the sequence dependency detection process of 213, a new instruction 51
5, the instruction is read, and the sequence dependency is checked for 513, 514, and 515. 513, 514, 515
Has no data hazard and has no branch instructions.

【0056】301のモデル判定処理では213の系列
依存検出処理よりシミュレーションモデルを選択する。
ここでは、513のLD命令に対して、命令レベルモデ
ルが選択され、シミュレートされる。以後同様に、命令
の終了までシミュレートが実行される。519の命令L
Dと520の命令ADDの間には、データハザードがあ
るため、パイプラインストールが発生する。このため命
令520はサイクルアキュレートなモデルでシミュレー
トされる。
In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213.
Here, an instruction level model is selected and simulated for 513 LD instructions. Thereafter, similarly, the simulation is executed until the end of the instruction. 519 instructions L
Since there is a data hazard between the instruction ADD of D and the instruction ADD of 520, pipeline stall occurs. Therefore, the instruction 520 is simulated in a cycle-accurate model.

【0057】以上のように、この発明の第1の実施の形
態によれば、請求項1に対応するハードウェア/ソフト
ウェア協調検証方法によって、プロセッサ部のシミュレ
ーションモデルを命令レベルのモデルとサイクルアキュ
レートなモデルとを準備しておき、これらを動的に切り
替えることにより、ハードウェアとソフトウェアの相互
作用を高精度にかつ高速にシミュレーションすることが
可能となる。
As described above, according to the first embodiment of the present invention, the hardware / software co-verification method according to claim 1 converts a simulation model of a processor unit into an instruction-level model and a cycle-accurate model. By preparing various models and dynamically switching between them, it is possible to simulate the interaction between hardware and software with high accuracy and high speed.

【0058】また請求項2に対応するハードウェア/ソ
フトウェアの協調検証方法によって、プロセッサ部のシ
ミュレーションモデルを切り替えるポイントを、命令の
系列依存度に応じて動的に切り替えることにより、ハー
ドウェアとソフトウェアの相互作用を高精度にかつ高速
にシミュレーションすることが可能となる。なお、第1
の実施の形態では論理回路部にサイクルアキュレートな
モデルを用いたが、シミュレーション精度として、必要
な精度のモデルを用い、たとえば2サイクル単位でプロ
セッサ部と同期を取る場合は2サイクルごとのモデルを
用いることによりシミュレートが可能であることは言う
までもない。
Further, by the hardware / software co-verification method according to the second aspect, the point at which the simulation model of the processor section is switched is dynamically switched according to the sequence dependence of instructions, so that the hardware and software can be switched. The interaction can be simulated with high accuracy and high speed. The first
In the above embodiment, a cycle-accurate model is used for the logic circuit unit. However, a model having a required accuracy is used as the simulation accuracy. For example, when synchronization with the processor unit is performed in units of two cycles, a model for every two cycles is used. It is needless to say that the simulation can be performed by using this.

【0059】また、第1の実施の形態では、プロセッサ
部のシミュレーションモデルとして命令レベルのモデル
とサイクルアキュレートなモデルの2つを動的に切り替
えたが、さらに別のモデルを追加してシミュレートが可
能であることは言うまでもない。 (第2の実施の形態)この発明の請求項3に対応する第
2の実施の形態について図9から図12を用いて説明す
る。
In the first embodiment, two models, ie, an instruction-level model and a cycle-accurate model, are dynamically switched as simulation models of the processor unit. Needless to say, this is possible. (Second Embodiment) A second embodiment according to claim 3 of the present invention will be described with reference to FIGS.

【0060】図9は、第2の実施の形態のプロセッサシ
ミュレーションモデルと論理回路シミュレーションモデ
ルのシミュレーション処理フローである。1001はプ
ロセッサシミュレーションモデルの処理フローであり、
1002は論理回路シミュレーションモデルの処理フロ
ーである。1001と1002の処理はコンカレントに
実行される。以下、図2のフローと異なる処理のみ述べ
る。1015はソフトウェアプログラムコード中の命令
動作でライトバック以外の動作をシミュレートするプロ
セッサシミュレーションモデルによるプロセッサシミュ
レーション処理である。1016は論理回路シミュレー
ションから入力される例外処理発生を判定する例外前シ
ミュレート処理である。1017は例外発生時にシミュ
レート途中の命令動作を中止し、例外処理用ソフトウェ
アプログラムコードにシミュレートを移す例外判定処理
である。1018はプロセッサシミュレーションモデル
のライトバック処理をシミュレートするプロセッサライ
トバックシミュレート処理である。1023は論理回路
部の信号がプロセッサに例外処理を発生させるかを定義
する、例外発生指定処理である。1003はプロセッサ
シミュレーションモデルと論理回路シミュレーションモ
デルとのデータのやり取りをするための共有データを記
憶する手段である。1025は1023で指定された例
外信号の変化を記憶しプロセッサシミュレーションフロ
ーに通信する例外発生通信処理である。1015の処理
は第1の実施の形態と同様に図3により詳細に示すこと
ができる。ここで、論理回路シミュレーションモデルの
シミュレーション時刻をプロセッサシミュレーションモ
デルのシミュレーション時刻よりも先に進める同期処理
手段は、1015のプロセッサ動作シミュレーションで
ライトバック処理直前までのシミュレートが行なわれて
おり、また、この処理とコンカレントに論理回路部のシ
ミュレーションが214の同期クロック数判定処理によ
るクロック数まで、223、224、225で行なわれ
ているため、1018のプロセッサの命令動作が終了す
るライトバック処理より先に論理回路部のシミレーショ
ン時刻が進むことにより構成される。
FIG. 9 is a simulation processing flow of a processor simulation model and a logic circuit simulation model according to the second embodiment. 1001 is a processing flow of a processor simulation model,
1002 is a processing flow of the logic circuit simulation model. The processes of 1001 and 1002 are executed concurrently. Hereinafter, only processing different from the flow of FIG. 2 will be described. Reference numeral 1015 denotes a processor simulation process using a processor simulation model that simulates an operation other than write-back by an instruction operation in the software program code. Reference numeral 1016 denotes a pre-exception simulation process for determining occurrence of an exception process input from a logic circuit simulation. Reference numeral 1017 denotes an exception determination process in which the instruction operation during the simulation is stopped when an exception occurs, and the simulation is transferred to the exception processing software program code. Reference numeral 1018 denotes a processor write-back simulation process for simulating the write-back process of the processor simulation model. Reference numeral 1023 denotes exception occurrence designation processing that defines whether a signal from the logic circuit unit causes an exception to occur in the processor. A unit 1003 stores shared data for exchanging data between the processor simulation model and the logic circuit simulation model. Reference numeral 1025 denotes an exception occurrence communication process for storing a change in the exception signal specified in 1023 and communicating with the processor simulation flow. The processing of 1015 can be shown in more detail in FIG. 3 as in the first embodiment. Here, the synchronous processing means for advancing the simulation time of the logic circuit simulation model ahead of the simulation time of the processor simulation model has been simulated up to just before the write-back processing in the processor operation simulation of 1015. Simultaneously with the processing, the simulation of the logic circuit unit is performed at 223, 224, and 225 up to the number of clocks determined by the synchronous clock number determination processing at 214, so that the logic is executed before the write-back processing at which the instruction operation of the 1018 processor ends. It is configured by advancing the simulation time of the circuit section.

【0061】また論理回路シミュレーションモデルから
プロセッサシミュレーションモデルに入力される例外処
理信号を検知する例外発生検知手段は、1023で指定
された論理回路部の信号の変化を1025の例外発生通
信処理にてプロセッサシミュレーションに通信し、その
情報により1016、1017のプロセッサの例外処理
シミュレーションにより構成される。
The exception occurrence detecting means for detecting an exception processing signal input from the logic circuit simulation model to the processor simulation model detects a change in the signal of the logic circuit section designated by 1023 in the exception occurrence communication processing of 1025 by the processor. It communicates with the simulation and is configured by the exception processing simulation of the 1016 and 1017 processors according to the information.

【0062】また検証対象回路外からプロセッサシミュ
レーションモデルに入力される例外処理信号を検知する
例外発生検知手段は、1016の外部信号として例外情
報を入力することにより構成される。そしてモデル切替
手段は例外発生検知手段の情報によりプロセッサシュミ
レーションモデルを動的に切り替える。図10は割込み
発生時に実行されるソフトウェアプログラムコード11
01の一例である。図10において一列が一命令を表し
ており、コード1111では左からラベル、命令、デス
ティネーション、ソースの順番で記述されている。11
12に対してはラベルはつけられていない。
The exception occurrence detecting means for detecting an exception processing signal input to the processor simulation model from outside the circuit to be verified is constituted by inputting exception information as an external signal 1016. The model switching means dynamically switches the processor simulation model according to the information of the exception occurrence detecting means. FIG. 10 shows a software program code 11 executed when an interrupt occurs.
01 is an example. In FIG. 10, one column represents one instruction, and the code 1111 describes a label, an instruction, a destination, and a source in order from the left. 11
12 is not labeled.

【0063】第2の実施の形態に係るハードウェアの構
成は第1の実施の形態について説明する図8と同様であ
り、図8において、901は処理されたあらゆる情報を
みるためのディスプレイ装置、902は設計者があらゆ
る情報や処理命令を入力するためのキーボード、903
はあらゆる処理を行う中央演算処理装置、904は各情
報を格納する記憶装置である。
The hardware configuration according to the second embodiment is the same as that of FIG. 8 for describing the first embodiment. In FIG. 8, reference numeral 901 denotes a display device for viewing all processed information; Reference numeral 902 denotes a keyboard for the designer to input all information and processing instructions;
Is a central processing unit that performs all kinds of processing, and 904 is a storage device that stores each information.

【0064】図11は501および1101のソフトウ
ェアプログラムコードを実行した場合の各サイクル毎、
各命令毎の状態1211〜1226を表しており、網掛
け(1224)はデータハザードによるパイプラインス
トールを、点線(1214、1215)は分岐命令によ
る命令のクリアをあらわしている。1201はクロック
サイクルを示す。
FIG. 11 shows each cycle when the software program codes 501 and 1101 are executed.
The states 1211 to 1226 for each instruction are shown. Shading (1224) indicates pipeline stall due to a data hazard, and dotted lines (1214 and 1215) indicate clearing of an instruction due to a branch instruction. Reference numeral 1201 denotes a clock cycle.

【0065】図12は第2の実施の形態による各プロセ
ッサシミュレーションモデルがシミュレートしている命
令を示した図である。以下、第2の実施の形態に係るハ
ードウェア/ソフトウェア協調シミュレーション方法を
図9および図2のフローに基づきプログラム501およ
びプログラム1101を実行した場合を例に用いて具体
的に説明する。シミュレーションの対象となるプロセッ
サは401の命令セットを備え、アクセス可能なアドレ
ス空間のうちアドレス[A0]、[A1]、[B0]、
[B1]は論理回路部のレジスタに割り当てられている
ものとする。このプロセッサは命令フェッチ/デコード
ステージ、命令実行/メモリアクセスステージ、ライト
バックステージの3つのステージからなるパイプライン
構造を持つ。分岐命令に対しては分岐しないことを前提
とする分岐予測を行う。パイプライン処理上でデータハ
ザードが発生した場合はパイプラインストールが発生す
る。また、論理回路部に与えられる入力ベクタと論理回
路部ないの処理により論理回路部内のレジスタでプロセ
ッサ部からアクセス可能なアドレス空間[A0]に割り
当てられているレジスタにはクロックサイクル2で2
0、クロックサイクル10で30が入るものとする。ま
た同様に[A1]にはクロックサイクル2で10、クロ
ックサイクル10で40が入るものとする。さらに論理
回路部よりクロックサイクル6で割込み信号が発生する
ものとする。
FIG. 12 is a diagram showing instructions simulated by each processor simulation model according to the second embodiment. Hereinafter, the hardware / software co-simulation method according to the second embodiment will be specifically described using a case where the program 501 and the program 1101 are executed based on the flows of FIGS. 9 and 2 as an example. The processor to be simulated has an instruction set of 401, and addresses [A0], [A1], [B0],
[B1] is assumed to be assigned to the register of the logic circuit unit. This processor has a pipeline structure including three stages of an instruction fetch / decode stage, an instruction execution / memory access stage, and a write back stage. For branch instructions, branch prediction is performed on the assumption that no branch is taken. If a data hazard occurs during pipeline processing, pipeline stall occurs. In addition, the input vector given to the logic circuit unit and the registers in the logic circuit unit which are assigned to the address space [A0] accessible from the processor unit by the processing of the logic circuit unit have two cycles in clock cycle 2.
0, 30 in clock cycle 10 Similarly, it is assumed that [A1] contains 10 in clock cycle 2 and 40 in clock cycle 10. Further, it is assumed that an interrupt signal is generated in clock cycle 6 from the logic circuit unit.

【0066】1001のプロセッサシミュレーションモ
デルの処理フローと1002の論理回路部の処理フロー
は並列に実行される。211、221の初期化処理では
プロセッサシミュレーションモデル、論理回路シミュレ
ーションモデルの初期化を行う。212のプログラム読
み込み処理ではプロセッサシミュレーションモデルによ
りシミュレートされるソフトウェアプログラムコードを
読み込み記憶手段に格納され、シミュレートするべき命
令位置を511に設定する。また、222の入力ベクタ
読み込み処理では、論理回路シミュレーションモデルで
シミュレートされる入力ベクタが読み込まれ記憶手段に
格納される。1023では論理回路シミュレーションモ
デル内の信号について、例外発生としてプロセッサシミ
ュレーションモデルに知らせるべき信号を指定する。
The processing flow 1001 of the processor simulation model and the processing flow 1002 of the logic circuit are executed in parallel. In the initialization processing of 211 and 221, a processor simulation model and a logic circuit simulation model are initialized. In the program reading process at 212, the software program code simulated by the processor simulation model is read and stored in the storage means, and the instruction position to be simulated is set at 511. In the input vector reading process of 222, the input vector simulated by the logic circuit simulation model is read and stored in the storage means. At 1023, a signal to be notified to the processor simulation model as occurrence of an exception is specified for a signal in the logic circuit simulation model.

【0067】213の系列依存検出処理では、パイプラ
インステージ数の3つの命令が読み込まれる。ここで
は、511、512、513の命令が読み込まれ、1つ
目の命令がデータハザードを発生させるか、また、読み
込まれた3つの命令に分岐命令があるか、分岐命令によ
り分岐した命令かに関してチェックされる。511の命
令はMOVであり分岐命令ではなく、512,513に
対してデータハザードを発生させない。また、511、
512、513のいずれも分岐命令ではない。
In the sequence dependence detection process at 213, three instructions of the number of pipeline stages are read. Here, instructions 511, 512, and 513 are read, and whether the first instruction causes a data hazard, whether the read three instructions include a branch instruction, or an instruction that has been branched by a branch instruction is determined. Checked. The instruction 511 is an MOV, is not a branch instruction, and does not generate a data hazard for 512 and 513. Also, 511,
None of 512 and 513 is a branch instruction.

【0068】214のサイクル数判定処理では、シミュ
レートした命令にかかるサイクル数が判定され、論理回
路部と同期を取るために必要なサイクル数が算出され
る。ここでは、初期状態からはじめの命令が実行されて
いるため、3が算出され、224の論理回路モデルシミ
ュレーションのクロックサイクル数判定処理に同期デー
タとして送られる。
In the cycle number determination process at 214, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, since the first instruction has been executed from the initial state, 3 is calculated, and is transmitted as synchronous data to the clock cycle number determination process of 224 in the logic circuit model simulation.

【0069】301のモデル判定処理では213の系列
依存検出処理とサイクルアキュレートモデルで実行中の
命令に新たに実行する命令をシミュレートするシミュレ
ーションモデルを選択する。ここでは命令レベルシミュ
レーションモデルが選択され、302によりプロセッサ
部の動作がシミュレートされる。並列に実行されている
論理回路部の処理フローでは、223により1クロック
サイクル分のシミュレートが行われ、224、225を
通して214により算出されたクロックサイクル数3だ
け223の論理回路シミュレーションモデルのシミュレ
ーションが実行される。論理回路部に与えられる入力ベ
クタと論理回路部ないの処理により論理回路部内のレジ
スタでプロセッサ部からアクセス可能なアドレス空間
[A0]に割り当てられているレジスタにはクロックサ
イクル2で20、[A1]には10、が入る。1025
では1023で指定した信号が変化し、プロセッサシミ
ュレーションモデルへの割込み信号が発生したかを判定
し、1016の割込み判定処理にデータを送る。ここで
は割込みは発生していない。
In the model determination processing of 301, a simulation model for simulating an instruction to be newly executed for an instruction being executed in the sequence dependence detection processing in 213 and the cycle accurate model is selected. Here, an instruction level simulation model is selected, and the operation of the processor unit is simulated by 302. In the processing flow of the logic circuit unit executed in parallel, the simulation of one clock cycle is performed by 223, and the simulation of the logic circuit simulation model of 223 is performed by the number of clock cycles 3 calculated by 214 through 224 and 225. Be executed. The registers assigned to the address space [A0] accessible from the processor unit in the registers in the logic circuit unit by the processing of the input vector given to the logic circuit unit and the processing in the logic circuit unit are 20 and [A1] in clock cycle 2. Contains 10. 1025
Then, it is determined whether the signal specified in 1023 has changed and an interrupt signal to the processor simulation model has been generated, and data is sent to an interrupt determination process in 1016. Here, no interrupt has occurred.

【0070】1016、1017では割込みが発生して
いないので、何も行わず1018のライトバックシミュ
レーションが行われる。216の命令終了判定処理では
まだ511の命令を実行中であるため、終了せずに21
3に戻る。以後同様に513の命令実行まで同様に行わ
れる。213の系列依存検出処理では、新たな命令であ
る516が読み込まれ、514、515、516に関し
て系列依存がチェックされる。514の命令はADDで
あり、515、516対してデータハザードを発生させ
ない。また、分岐命令も存在しない。
In steps 1016 and 1017, since no interruption has occurred, nothing is performed and the write-back simulation of 1018 is performed. In the instruction end determination process of 216, since the instruction of 511 is still being executed, 21
Return to 3. Thereafter, the same operation is performed until the instruction 513 is executed. In the sequence dependency detection process at 213, a new instruction 516 is read, and sequence dependency is checked for 514, 515, and 516. The instruction 514 is ADD, and does not generate a data hazard for 515 and 516. Also, there is no branch instruction.

【0071】214のサイクル数判定処理では、シミュ
レートした命令にかかるサイクル数が判定され、論理回
路部と同期を取るために必要なサイクル数が算出され
る。ここでは、6が算出され、224の論理回路シミュ
レーションモデルのシミュレーションのクロックがサイ
クル数判定処理に同期データとして送られる。301の
モデル判定処理では213の系列依存検出処理よりシミ
ュレーションモデルを選択する。ここでも命令レベルシ
ミュレーションモデルが選択され、302によりプロセ
ッサ部の動作がシミュレートされる。
In the cycle number determination process at 214, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, 6 is calculated, and the simulation clock of the logic circuit simulation model of 224 is sent as synchronous data to the cycle number determination processing. In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213. Here also, the instruction level simulation model is selected, and the operation of the processor unit is simulated by 302.

【0072】並列に実行されている論理回路部の処理フ
ローでは、223により1クロックサイクル分のシミュ
レートが行われ、224、225を通して214により
算出されたクロックサイクル数6まで223の論理回路
シミュレーションモデルのシミュレーションが実行され
る。1025では1023で指定した信号が変化し、プ
ロセッサシミュレーションモデルへの割込み信号が発生
したかを判定する。この論理回路部では6サイクル目に
割込み信号が発生するため、1016の割込み判定処理
にデータを送る。ここでは割込みは発生しているため、
1017の例外発生判定処理により、1018のライト
バックが実行されずに、213に戻る。
In the processing flow of the logic circuit section executed in parallel, the simulation for one clock cycle is performed by 223, and the number of clock cycles calculated by 214 through 224 and 225 is 223. Is executed. At 1025, it is determined whether the signal designated at 1023 has changed and an interrupt signal to the processor simulation model has been generated. In this logic circuit unit, an interrupt signal is generated in the sixth cycle, so that data is sent to the interrupt determination process of 1016. Since an interrupt has occurred here,
The process returns to step 213 without performing the write back of step 1018 by the exception occurrence determination process of step 1017.

【0073】213の系列依存検出処理では、新たな命
令である1111および1112が読み込まれる。2つ
しか読み込まれないのは割込み処理であり、かつ2つ目
の命令が割込み復帰命令であるためである。割込み後の
命令系列に対して同様に系列依存がチェックされる。割
込み復帰命令は分岐命令であり、プロセッサシミュレー
ションモデルとしてはサイクルアキュレートなモデルが
選択される。
In the sequence dependence detection process at 213, new instructions 1111 and 1112 are read. The reason why only two are read is interrupt processing, and the second instruction is an interrupt return instruction. The sequence dependence is similarly checked for the instruction sequence after the interruption. The interrupt return instruction is a branch instruction, and a cycle-accurate model is selected as a processor simulation model.

【0074】214のサイクル数判定処理では、シミュ
レートした命令にかかるサイクル数が判定され、論理回
路部と同期を取るために必要なサイクル数が算出され
る。ここでは、9が算出され、224の論理回路シミュ
レーションモデルのシミュレーションのクロックがサイ
クル数判定処理に同期データとして送られる。301の
モデル判定処理では213の系列依存検出処理よりシミ
ュレーションモデルを選択する。ここでも命令レベルシ
ミュレーションモデルが選択され、302によりプロセ
ッサ部の動作がシミュレートされる。
In the cycle number determination process at 214, the number of cycles required for the simulated instruction is determined, and the number of cycles required to synchronize with the logic circuit unit is calculated. Here, 9 is calculated, and the clock of the simulation of the logic circuit simulation model of 224 is sent as synchronous data to the cycle number determination processing. In the model determination processing of 301, a simulation model is selected from the series dependence detection processing of 213. Here also, the instruction level simulation model is selected, and the operation of the processor unit is simulated by 302.

【0075】並列に実行されている論理回路部の処理フ
ローでは、223により1クロックサイクル分のシミュ
レートが行われ、224、225を通して214により
算出されたクロックサイクル数まで223の論理回路シ
ミュレーションモデルのシミュレーションが実行され
る。1025では1023で指定した信号が変化し、プ
ロセッサシミュレーションモデルへの割込み信号が発生
したかを判定する。この論理回路部では7〜9サイクル
に割込み信号は発生しないため、1025は割込み未発
生を1016の割込み判定処理にデータを送る。ここで
は割込みは発生していないため、1018のライトバッ
クが実行され、213に戻る。
In the processing flow of the logic circuit unit executed in parallel, a simulation for one clock cycle is performed by 223, and the number of clock cycles calculated by 214 through 224 and 225 is 223 of the logic circuit simulation model. A simulation is performed. At 1025, it is determined whether the signal designated at 1023 has changed and an interrupt signal to the processor simulation model has been generated. In this logic circuit unit, no interrupt signal is generated in 7 to 9 cycles, so that 1025 sends data indicating that no interrupt has occurred to the interrupt determination processing of 1016. Here, since no interrupt has occurred, the write back of 1018 is executed and the process returns to 213.

【0076】以後同様に、命令の終了までシミュレート
が実行される。1112の命令実行により、割込み発生
前の命令514が再度実行される。以上のように、この
発明の請求項3に対応する第2の実施の形態によれば、
ハードウェア/ソフトウェア協調検証方法によって、プ
ロセッサ部のシミュレーションモデルを命令レベルのモ
デルとサイクルアキュレートなモデルとを準備してお
き、これらを動的に切り替えることにより、ハードウェ
アとソフトウェアの相互作用を高精度にかつ高速にシミ
ュレーションすることが可能となる。さらに割込み判定
処理を追加することにより、たとえ命令レベルのプロセ
ッサシミュレーションモデルでシミュレート中であって
も、論理回路部のシミュレートと高精度に同期し、シミ
ュレートすることができる。
Thereafter, the simulation is similarly executed until the end of the instruction. By executing the instruction of 1112, the instruction 514 before the occurrence of the interrupt is executed again. As described above, according to the second embodiment of the present invention,
The hardware / software co-verification method prepares an instruction-level model and a cycle-accurate model for the simulation model of the processor section, and dynamically switches between them to enhance the interaction between hardware and software. Simulation can be performed accurately and at high speed. Further, by adding an interrupt determination process, even during the simulation using the processor simulation model at the instruction level, the simulation can be performed in synchronization with the simulation of the logic circuit unit with high accuracy.

【0077】なお、この例では論理回路部にサイクルア
キュレートなモデルを用いたが、シミュレーション精度
として、必要な精度のモデルを用い、たとえば2サイク
ル単位でプロセッサ部と同期を取る場合は2サイクルご
とのモデルを用いることによりシミュレートが可能であ
ることは言うまでもない。なお、この例ではプロセッサ
部のシミュレーションモデルとして命令レベルとサイク
ルアキュレートなモデルの2つを動的に切り替えたが、
さらに別のモデルを追加してシミュレートが可能である
ことは言うまでもない。
In this example, a cycle-accurate model is used for the logic circuit unit. However, a model having a required accuracy is used as the simulation accuracy. For example, when synchronization with the processor unit is performed in units of two cycles, every two cycles are used. It is needless to say that the simulation can be performed by using the model. In this example, the instruction level and the cycle-accurate model are dynamically switched as a simulation model of the processor unit.
Needless to say, simulation can be performed by adding another model.

【0078】(第3の実施の形態)この発明の請求項4
および請求項5に対応する第3の実施の形態について図
13および図14を用いて説明する。図13は第3の実
施の形態のハードウェア/ソフトウェア協調検証のため
のコンパイラの一例であり、プロセッサシミュレーショ
ンモデルを高速にシミュレーションするために最適化
し、かつ論理回路シミュレーションモデルとの協調検証
の精度を高精度に保つために最適化するように命令順序
を変更するプログラム命令配列方式を有し、かつ、プロ
グラム命令配列方式の命令配列の決定機能を有するコン
パイラをもつものである。
(Third Embodiment) Claim 4 of the present invention
A third embodiment corresponding to claim 5 will be described with reference to FIGS. FIG. 13 shows an example of a compiler for hardware / software co-verification according to the third embodiment, which optimizes a processor simulation model for high-speed simulation and improves the accuracy of co-verification with a logic circuit simulation model. It has a program instruction array system for changing the instruction order so as to optimize for maintaining high precision, and has a compiler having a function of determining an instruction array of the program instruction array system.

【0079】1401は入力されるC言語で記述された
ソースコードである。1402はソースコードから生成
された中間コード生成処理である。この処理では、すべ
ての命令にラベルを付け、ラベルにより命令の依存関係
をあらわした依存リストを各命令ごとに生成する。ここ
での依存リストは命令系列において、ある命令の依存リ
ストには、その命令以前にその命令が参照する変数に代
入を行っている命令、その命令以前にその命令が代入す
る変数に対して、参照または代入を行っている命令がリ
ストアップされる。さらに、依存リストにリストアップ
されている命令の依存リストの和集合と同じ物となる。
1403はラベル、コード、依存リストを含めた中間コ
ードが生成される。1404は命令系列の依存を解消す
るために、中間コードより命令系列の順序を入れ替える
命令順序変更処理である。1405は変更後のラベル、
コード、依存リストを含めた中間コードである。140
6は1404の順序変更によっても解除できなかったデ
ータハザードを起こす命令の依存関係を、NOP命令を
挿入することによって解消する依存解消処理である。1
407は機械語コードである。
Reference numeral 1401 denotes an input source code described in the C language. Reference numeral 1402 denotes an intermediate code generation process generated from the source code. In this process, labels are attached to all instructions, and a dependency list expressing instruction dependencies by labels is generated for each instruction. Here, the dependency list is an instruction sequence. In the dependency list of a certain instruction, for the instruction that substitutes the variable referenced by the instruction before the instruction, and for the variable that the instruction substitutes before the instruction, The instruction making reference or assignment is listed. Furthermore, it is the same as the union of the dependency lists of the instructions listed in the dependency list.
1403, an intermediate code including a label, a code, and a dependency list is generated. Reference numeral 1404 denotes an instruction order changing process for changing the order of the instruction sequence from the intermediate code in order to eliminate the dependence on the instruction sequence. 1405 is the label after the change,
Intermediate code including code and dependency list. 140
Reference numeral 6 denotes a dependency elimination process for eliminating a dependency of an instruction causing a data hazard, which cannot be canceled by the order change of 1404, by inserting a NOP instruction. 1
407 is a machine language code.

【0080】図14は1404の命令順序変更処理のフ
ローである。1501はソースコードを処理単位ごとに
分割する実行単位分割処理である。以後分割された実行
単位毎に処理が行われる。1502は実行単位を選択す
る実行単位選択処理である。ここで選択される基準はよ
り上位の実行単位から処理が行われる。1503は依存
リスト作成処理である。1504では実行単位内の命令
順序を変更する処理を行う。1504では依存関係が最
小になるまで命令順序変更を繰り返す。
FIG. 14 is a flow chart of the instruction order changing process in step 1404. Reference numeral 1501 denotes execution unit division processing for dividing a source code for each processing unit. Thereafter, the processing is performed for each of the divided execution units. Reference numeral 1502 denotes an execution unit selection process for selecting an execution unit. The criterion selected here is that processing is performed from a higher-order execution unit. Reference numeral 1503 denotes a dependency list creation process. In step 1504, a process of changing the order of instructions in the execution unit is performed. In step 1504, the instruction order change is repeated until the dependency is minimized.

【0081】表2は、コンパイラに与えられるC言語の
ソースコードの一例である。
Table 2 shows an example of C language source code given to the compiler.

【0082】[0082]

【表2】 [Table 2]

【0083】表3および表4は表2のソースコードから
作成された中間コードで、実行単位ごとに記述してい
る。表3は全体で、表4はwhileループの実行単位
の中間コードであり、表3の全体の中ではラベルL2と
なっている。
Tables 3 and 4 are intermediate codes created from the source code of Table 2 and are described for each execution unit. Table 3 is the whole, and Table 4 is the intermediate code of the execution unit of the while loop, and is labeled L2 in the whole of Table 3.

【0084】[0084]

【表3】 [Table 3]

【0085】[0085]

【表4】 [Table 4]

【0086】表5は表3の中間コードに対して、150
4の命令順序変更処理を実行した後の中間コードであ
る。L5、L4の命令および、L8、L7の命令順序が
変更されている。
Table 5 shows that the intermediate code of Table 3
This is an intermediate code after the execution of the instruction order change process of No. 4. The order of the instructions L5 and L4 and the instructions L8 and L7 have been changed.

【0087】[0087]

【表5】 [Table 5]

【0088】表6および表7は表4のwhileループ
の実行単位に対して1504の命令順序変更処理の結果
である。全体より下位の実行単位では、その単位の前後
の命令系列も加えて順序変更を行うが、変更するのは実
行単位内の命令だけで、前後に付加された命令について
は順序変更しない。表6ははじめにLB1を選択して順
序変更を行った結果であり、表7はLB2を選択して順
序変更を行った結果である。この変更結果の評価方法と
して、ある命令の直後の命令の依存リストにその命令の
ラベルがある場合は依存関係が存在する。表6の場合L
B2の直後の命令LB3の依存リストにLB2が存在す
る。表7ではそのような命令系列はない。このため表7
の命令系列が選択される。
Tables 6 and 7 show the result of the instruction order changing process of 1504 for the execution unit of the while loop in Table 4. In an execution unit lower than the whole, the order is changed in addition to the instruction sequence before and after the unit, but only the instruction in the execution unit is changed, and the order added to the instruction added before and after is not changed. Table 6 shows the result of first selecting LB1 and changing the order, and Table 7 shows the result of selecting LB2 and changing the order. As a method of evaluating the result of this change, there is a dependency if the label of the instruction is in the dependency list of the instruction immediately after the instruction. L in Table 6
LB2 exists in the dependency list of the instruction LB3 immediately after B2. In Table 7, there is no such instruction sequence. Table 7
Is selected.

【0089】[0089]

【表6】 [Table 6]

【0090】[0090]

【表7】 [Table 7]

【0091】表8および表9は、中間コードと最終的な
機械語に対応するアセンブラの一例を示し、実行単位も
展開した命令系列である。LB2とLB1、L5とL
4、L8とL7の順序が元の命令順序から変更されてい
る。このデータに対して1407を実行するが、表8の
命令順序には命令の依存関係が無いため、NOPは挿入
されない。
Tables 8 and 9 show examples of assemblers corresponding to the intermediate code and the final machine language, and are instruction sequences in which execution units are also expanded. LB2 and LB1, L5 and L
4. The order of L8 and L7 has been changed from the original instruction order. 1407 is performed on this data, but no NOP is inserted since the instruction order in Table 8 has no instruction dependency.

【0092】[0092]

【表8】 [Table 8]

【0093】[0093]

【表9】 [Table 9]

【0094】表9のソフトウェアプログラムコードをハ
ードウェア/ソフトウェア協調検証環境で実行すると、
分岐命令BEQ部ではサイクルアキュレートモデルが使
用されるが、他の命令では命令系列の依存であるデータ
ハザードを起こす系列はない。このために、ハードウェ
ア/ソフトウェア協調検証をより高速に実行できる。以
上のように、この発明の請求項4および請求項5に対応
する第3の実施の形態によれば、コンパイラ方法によっ
て、ハードウェア/ソフトウェア協調検証でより高速に
シミュレーションできる命令コードを生成することがで
きる。またハードウェアとソフトウェアの相互作用を検
証するハードウェア/ソフトウェアの協調検証では膨大
なシミュレーションを行うため、より高速な検証が可能
となる。
When the software program codes in Table 9 are executed in a hardware / software co-verification environment,
The cycle-accurate model is used in the branch instruction BEQ portion, but there is no sequence that causes a data hazard that is dependent on the instruction sequence in other instructions. Therefore, the hardware / software co-verification can be executed at higher speed. As described above, according to the third embodiment of the present invention, an instruction code that can be simulated at higher speed by hardware / software co-verification is generated by a compiler method. Can be. Further, in the hardware / software co-verification for verifying the interaction between the hardware and the software, an enormous simulation is performed, so that a higher-speed verification is possible.

【0095】[0095]

【発明の効果】請求項1記載の発明のハードウェア/ソ
フトウェア協調検証方法によれば、プロセッサ部と論理
回路部とからなり、プロセッサ部で実行されるソフトウ
ェアプログラムコードと論理回路部が相互に作用を及ぼ
し合う被検証対象回路のシミュレーションを対象とし、
複数のプロセッサシミュレーションモデルと論理回路シ
ミュレーションモデルを備え、シミュレーションの実行
中にプロセッサシミュレーションモデルを動的に切り替
えることにより、シミュレーション速度を落とさずにシ
ミュレーション精度を向上させることができる。
According to the hardware / software co-verification method according to the first aspect of the present invention, a software program code executed by the processor unit and the logic circuit unit interact with each other. For the simulation of the circuit under test
By providing a plurality of processor simulation models and a logic circuit simulation model, and dynamically switching the processor simulation model during execution of the simulation, the simulation accuracy can be improved without reducing the simulation speed.

【0096】請求項2記載のハードウェア/ソフトウェ
ア協調検証方法によれば、プロセッサ部で実行されるソ
フトウェアプログラムコードの命令系列に応じて、その
依存性を検査し、選択するべきプロセッサシミュレーシ
ョンモデルを決定し、決定されたシミュレーションモデ
ルを動的に切り替えながら、協調シミュレーションを行
うことにより、プロセッサシミュレーションモデルと命
令系列に依存するシミュレーション精度の劣化を防ぐこ
とができる。
According to the hardware / software co-verification method of the second aspect, the dependence is checked according to the instruction sequence of the software program code executed by the processor unit, and the processor simulation model to be selected is determined. In addition, by performing the cooperative simulation while dynamically switching the determined simulation model, it is possible to prevent deterioration of the simulation accuracy depending on the processor simulation model and the instruction sequence.

【0097】請求項3記載のハードウェア/ソフトウェ
ア協調検証方法によれば、請求項1と同様な効果のほ
か、プロセッサシミュレーションモデルと論理回路部の
同期処理において、論理回路部をプロセッサシミュレー
ションモデルのシミュレーション時刻よりも先に進め、
論理回路部からプロセッサシミュレーションモデルへ伝
達される割り込み等の例外処理を検知して、例外処理発
生に応じてプロセッサシミュレーションモデルを動的に
切り替えることにより、プロセッサ部と論理回路部の相
互作用の中で、例外的に発生する処理によるシミュレー
ション精度の劣化を防ぐことができる。
According to the hardware / software co-verification method of the third aspect, in addition to the same effects as those of the first aspect, in the synchronization processing of the processor simulation model and the logic circuit unit, the logic circuit unit is simulated by the processor simulation model. Advance ahead of time,
By detecting exception processing such as interrupts transmitted from the logic circuit section to the processor simulation model, and dynamically switching the processor simulation model according to the occurrence of the exception processing, the interaction between the processor section and the logic circuit section can be performed. In addition, it is possible to prevent the simulation accuracy from deteriorating due to exceptionally occurring processing.

【0098】請求項4記載のハードウェア/ソフトウェ
ア協調検証方法によれば、プログラム命令配列方式のソ
フトウェアプログラムコードを生成することにより、ソ
フトウェアプログラムコードの命令配列方式をコード量
の最適化や速度の最適化で行うのではなく、実際にハー
ドウェアを制作する前の段階で行われるハードウェア/
ソフトウェア協調検証の高精度かつ高速化のための最適
化を行うので、ハードウェアとソフトウェアの相互作用
の検証時間を短縮することができる。
According to the hardware / software co-verification method of the fourth aspect, by generating the software program code of the program instruction arrangement method, the instruction arrangement method of the software program code can be optimized for the code amount and the speed. Hardware, which is performed before the actual production of hardware,
Since optimization for high accuracy and high speed of software co-verification is performed, the verification time of the interaction between hardware and software can be reduced.

【0099】請求項5記載のハードウェア/ソフトウェ
ア協調検証方法によれば、請求項4と同様な効果のほ
か、プログラム命令配列方式によりソフトウェアプログ
ラムコードを生成するコンパイラにより、実際に記述さ
れる高級言語を用いて、膨大なシステム検証を短縮する
ことができ、システムの開発期間を短縮できる。
According to the hardware / software co-verification method of the fifth aspect, in addition to the same effects as those of the fourth aspect, a high-level language actually described by a compiler that generates a software program code by a program instruction array system By using, a huge amount of system verification can be shortened, and the system development period can be shortened.

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

【図1】この発明の第1の実施の形態におけるハードウ
ェア/ソフトウェア協調検証の概略概念図である。
FIG. 1 is a schematic conceptual diagram of hardware / software co-verification according to a first embodiment of the present invention.

【図2】この発明の第1の実施の形態におけるプロセッ
サシミュレーションモデルと論理回路シミュレーション
モデルの処理フローである。
FIG. 2 is a processing flow of a processor simulation model and a logic circuit simulation model according to the first embodiment of the present invention.

【図3】この発明の第1および第2の実施の形態におけ
るプロセッサシミュレーションモデルの切り替えフロー
である。
FIG. 3 is a switching flow of a processor simulation model in the first and second embodiments of the present invention.

【図4】この発明の第1および第2の実施の形態におけ
るプロセッサに与えられるソフトウェアプログラムコー
ドの一例である。
FIG. 4 is an example of a software program code provided to a processor according to the first and second embodiments of the present invention.

【図5】この発明の第1の実施の形態におけるプロセッ
サ部で実行される命令の流れを示した説明図である。
FIG. 5 is an explanatory diagram showing a flow of instructions executed by a processor unit according to the first embodiment of the present invention.

【図6】この発明の第1の実施の形態におけるシミュレ
ーションにおいて各プロセッサシミュレーションモデル
でシミュレートされる命令を示した説明図である。
FIG. 6 is an explanatory diagram showing instructions simulated by each processor simulation model in the simulation according to the first embodiment of the present invention.

【図7】この発明の第1および第2の実施の形態におけ
る被検証対象回路の全体概略図である。
FIG. 7 is an overall schematic diagram of a circuit to be verified according to the first and second embodiments of the present invention;

【図8】この発明のハードウェア/ソフトウェア協調検
証方法を実現するためのハードウェア構成の一例を示す
図である。
FIG. 8 is a diagram showing an example of a hardware configuration for realizing the hardware / software co-verification method of the present invention.

【図9】この発明の第2の実施の形態におけるプロセッ
サシミュレーションモデルと論理回路シミュレーション
モデルの処理フローである。
FIG. 9 is a processing flow of a processor simulation model and a logic circuit simulation model according to the second embodiment of the present invention.

【図10】この発明の第2の実施の形態におけるプロセ
ッサに与えられる割り込み処理時のソフトウェアプログ
ラムコードの一例である。
FIG. 10 is an example of a software program code at the time of interrupt processing given to a processor according to the second embodiment of the present invention.

【図11】この発明の第2の実施の形態におけるプロセ
ッサ部で実行される命令の流れを示した説明図である。
FIG. 11 is an explanatory diagram showing a flow of instructions executed by a processor unit according to the second embodiment of the present invention.

【図12】この発明の第2の実施の形態における各プロ
セッサシミュレーションモデルがシミュレートしている
命令を示した図である。
FIG. 12 is a diagram showing instructions simulated by each processor simulation model according to the second embodiment of the present invention.

【図13】この発明の第3の実施の形態におけるコンパ
イラの処理フローの一例を示す図である。
FIG. 13 is a diagram illustrating an example of a processing flow of a compiler according to the third embodiment of the present invention.

【図14】この発明の第3の実施の形態におけるコンパ
イラの処理フローの一例を示す図である。
FIG. 14 is a diagram illustrating an example of a processing flow of a compiler according to the third embodiment of the present invention.

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

103 プロセッサシミュレーションモデル 105 論理回路シミュレーションモデル 201、1001 プロセッサシミュレーションモデル
の処理フロー 202、1002 論理回路シミュレーションモデルの
処理フロー 213 命令系列依存検出処理 302 プロセッサの命令レベルシミュレーションモデ
ル 303 プロセッサのサイクルアキュレートシミュレー
ションモデル 401 プロセッサの命令セット 501 ソフトウェアプログラムコード 801 被検証対象回路 1016 例外判定処理 1023 例外信号指定処理 1025 例外発生検出処理 1101 例外処理のソフトウェアプログラムコード 1404 命令順序変更処理 1406 依存解消処理 1504 実行単位内命令順序変更処理 1701 中間コード 2002 機械語に対応するアセンブラコード
103 Processor simulation model 105 Logic circuit simulation model 201, 1001 Processor simulation model processing flow 202, 1002 Logic circuit simulation model processing flow 213 Instruction sequence dependence detection processing 302 Processor instruction level simulation model 303 Processor cycle accurate simulation model 401 Processor instruction set 501 Software program code 801 Circuit to be verified 1016 Exception determination processing 1023 Exception signal specification processing 1025 Exception occurrence detection processing 1101 Exception processing software program code 1404 Instruction order change processing 1406 Dependency resolution processing 1504 Instruction order change within execution unit Processing 1701 intermediate code 2002 corresponding to machine language Assembler code

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 プロセッサ部と、論理回路部とから成る
被検証対象回路の動作のシミュレーション手法における
ハードウェア/ソフトウェア協調検証方法であって、 前記プロセッサ部を制御するソフトウェアの命令動作を
計算機上でシミュレートする複数のプロセッサシミュレ
ーションモデルと、前記論理回路部を計算機上でシミュ
レートする論理回路シミュレーションモデルと、前記複
数のプロセッサシミュレーションモデルを動的に切り替
えるモデル切替手段と、このモデル切替手段により選択
された前記プロセッサシミュレーションモデルと前記論
理回路シミュレーションモデルのシミュレーションを同
期させる同期手段とを備え、相互に作用を及ぼし合う前
記プロセッサ部のソフトウェアの命令動作と前記論理回
路部の動作の検証を行うことを特徴とするハードウェア
/ソフトウェア協調検証方法。
1. A hardware / software co-verification method in a simulation method for an operation of a circuit to be verified including a processor unit and a logic circuit unit, wherein an instruction operation of software for controlling the processor unit is executed on a computer. A plurality of processor simulation models to be simulated; a logic circuit simulation model for simulating the logic circuit unit on a computer; a model switching unit for dynamically switching the plurality of processor simulation models; And a synchronization unit for synchronizing the simulation of the processor simulation model and the simulation of the logic circuit simulation model, and verifies the instruction operation of software of the processor unit and the operation of the logic circuit unit that interact with each other. Hardware / software co-verification method comprising Ukoto.
【請求項2】 ソフトウェアプログラムコードの命令系
列により、選択するべきプロセッサシミュレーションモ
デルを決定するシミュレーションモデル決定手段を有
し、モデル切替手段は、前記シミュレーションモデル決
定手段による情報により前記プロセッサシミュレーショ
ンモデルを動的に切り替える請求項1記載のハードウェ
ア/ソフトウェア協調検証方法。
2. A method for determining a processor simulation model to be selected according to an instruction sequence of a software program code, comprising: a simulation model determining unit configured to dynamically convert the processor simulation model based on information from the simulation model determining unit; 2. The hardware / software co-verification method according to claim 1, wherein the method is switched to:
【請求項3】 論理回路シミュレーションモデルのシミ
ュレーション時刻をプロセッサシミュレーションモデル
のシミュレーション時刻よりも先に進める同期処理手段
と、前記論理回路シミュレーションモデルおよび検証対
象回路外から前記プロセッサシミュレーションモデルに
入力される例外処理信号を検知する例外発生検知手段と
を有し、モデル切替手段は前記例外発生検知手段の情報
によりプロセッサシミュレーションモデルを動的に切り
替える請求項1記載のハードウェア/ソフトウェア協調
検証方法。
3. A synchronous processing means for advancing the simulation time of the logic circuit simulation model ahead of the simulation time of the processor simulation model, and exception processing input to the processor simulation model from outside the logic circuit simulation model and the circuit to be verified. 2. The hardware / software co-verification method according to claim 1, further comprising: an exception occurrence detecting unit that detects a signal, wherein the model switching unit dynamically switches a processor simulation model based on information of the exception occurrence detecting unit.
【請求項4】 プロセッサシミュレーションモデルを高
速にシミュレーションするために最適化し、かつ論理回
路シミュレーションモデルとの協調検証の精度を高精度
に保つために最適化するように命令順序を変更するプロ
グラム命令配列方式を有するハードウェア/ソフトウェ
ア協調検証方法。
4. A program instruction array system for optimizing a processor simulation model for high-speed simulation and changing an instruction order so as to optimize for cooperative verification with a logic circuit simulation model to maintain high accuracy. A hardware / software co-verification method having:
【請求項5】 プログラム命令配列方式の命令配列の決
定機能を有するコンパイラをもつ請求項4記載のハード
ウェア/ソフトウェア協調検証方法。
5. The hardware / software co-verification method according to claim 4, further comprising a compiler having a function of determining an instruction array in a program instruction array system.
JP10174611A 1998-06-22 1998-06-22 Method for verifying cooperation between hardware and software Pending JP2000011022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10174611A JP2000011022A (en) 1998-06-22 1998-06-22 Method for verifying cooperation between hardware and software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10174611A JP2000011022A (en) 1998-06-22 1998-06-22 Method for verifying cooperation between hardware and software

Publications (1)

Publication Number Publication Date
JP2000011022A true JP2000011022A (en) 2000-01-14

Family

ID=15981627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10174611A Pending JP2000011022A (en) 1998-06-22 1998-06-22 Method for verifying cooperation between hardware and software

Country Status (1)

Country Link
JP (1) JP2000011022A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100857903B1 (en) 2005-12-10 2008-09-10 한국전자통신연구원 Method for digital system modeling by using high-level software simulator
US7783467B2 (en) 2005-12-10 2010-08-24 Electronics And Telecommunications Research Institute Method for digital system modeling by using higher software simulator
JP2011081623A (en) * 2009-10-07 2011-04-21 Fujitsu Ltd Simulation device, method, and program
JP2012099035A (en) * 2010-11-05 2012-05-24 Fujitsu Ltd Operation verification method for processor, operation verification device for processor and operation verification program for processor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100857903B1 (en) 2005-12-10 2008-09-10 한국전자통신연구원 Method for digital system modeling by using high-level software simulator
US7783467B2 (en) 2005-12-10 2010-08-24 Electronics And Telecommunications Research Institute Method for digital system modeling by using higher software simulator
JP2011081623A (en) * 2009-10-07 2011-04-21 Fujitsu Ltd Simulation device, method, and program
JP2012099035A (en) * 2010-11-05 2012-05-24 Fujitsu Ltd Operation verification method for processor, operation verification device for processor and operation verification program for processor
US8707102B2 (en) 2010-11-05 2014-04-22 Fujitsu Limited Method and program for verifying operation of processor

Similar Documents

Publication Publication Date Title
US10360327B2 (en) Modifying a virtual processor model for hardware/software simulation
EP0453394B1 (en) Dynamic process for the generation of biased pseudo-random test patterns for the functional verification of hardware designs
Hoffmann et al. A methodology for the design of application specific instruction set processors (ASIP) using the machine description language LISA
EP1248211A2 (en) Data processing system and design system
US20080294411A1 (en) Systems and Methods for Logic Verification
US7096322B1 (en) Instruction processor write buffer emulation using embedded emulation control instructions
US20220091907A1 (en) Processor based logic simulation acceleration and emulation system
US11513818B1 (en) Method, product, and system for integrating a hardware accelerator with an extensible processor
SNOW III AUTOMATION OF MODULE SET INDEPENDENT REGISTER-TRANSFER LEVEL DESIGN.
Yang et al. Metacore: an application specific dsp development system
US7085964B2 (en) Dynamic test program generator for VLIW simulation
JP5034916B2 (en) Performance evaluation model generation method, system performance evaluation method, and performance evaluation model generation apparatus
US7228513B2 (en) Circuit operation verification device and method
CN111324948B (en) Simulation method and simulation system
US7162403B2 (en) System and method for efficiently tracing simulation data in hardware acceleration simulation systems
JP2000011022A (en) Method for verifying cooperation between hardware and software
GB2389685A (en) Accessing resources in a microprocessor having resources of varying scope, thus allowing design software to simulate multithread and multicoremicroprocessors.
WO2001035283A2 (en) System for performing parallel circuit simulation in a high level description language
JP4152659B2 (en) Data processing system and design system
Fummi et al. ISS-centric modular HW/SW co-simulation
JP2004021907A (en) Simulation system for performance evaluation
US20230229403A1 (en) Method for generating source code
Schwarz et al. Cycle-accurate software modeling for RTL verification of embedded systems
JP2004118518A (en) Simulator, and recording medium recording the simulator readable in computer
CN114357917A (en) Simulation method, device and simulation system for processor pipeline