JPH03127133A - Computer simulation method - Google Patents

Computer simulation method

Info

Publication number
JPH03127133A
JPH03127133A JP26491489A JP26491489A JPH03127133A JP H03127133 A JPH03127133 A JP H03127133A JP 26491489 A JP26491489 A JP 26491489A JP 26491489 A JP26491489 A JP 26491489A JP H03127133 A JPH03127133 A JP H03127133A
Authority
JP
Japan
Prior art keywords
stage
instruction
computer
operation rule
transition
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
JP26491489A
Other languages
Japanese (ja)
Inventor
Satoko Koike
小池 都子
Mitsuru Nagasaka
充 長坂
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP26491489A priority Critical patent/JPH03127133A/en
Publication of JPH03127133A publication Critical patent/JPH03127133A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To curtail the model description quantity inputted by a user and to improve the efficiency of evaluation and comparison in the case the constitution of a pipeline is changed by inputting a computer operation rule group and executing a simulation of an instruction transition between stages for constituting a pipeline computer. CONSTITUTION:A user inputs the number of stages for constituting a described pipeline, a stage name in which decoding of an instruction, an address calculation, operand read-out, and an execution processing of an operation are executed, a stage name in which the processing of the number of cycles required for an operation with regard to each instruction to be processed and write and read-out to a register and a memory is executed, and a stage name in which the processing of write and read-out to the register and the memory in the case the processing of the instruction is executed precedently is executed, and generates a computer operation rule group 105. Subsequently, by inputting this computer operation rule group 105, a simulation of a pipeline computer is executed. In such a way, even in the case the constitution of the pipeline is changed, a model description can be change easily due to a comparatively small quantity, and the efficiency of evaluation can be improved.

Description

【発明の詳細な説明】[Detailed description of the invention]

【産業上の利用分野】[Industrial application field]

本発明は計算機シミュレーションに関し、特にパイプラ
イン計算機の動作を条件式からなる条件部と代入式から
なる動作部によって構成される規則で表わして行う、イ
ベントドリブン方式の計算機シミュレーションに関する
The present invention relates to computer simulation, and more particularly to event-driven computer simulation in which the operation of a pipeline computer is expressed by a rule consisting of a condition section consisting of a conditional expression and an operation section consisting of an assignment expression.

【従来の技術】[Conventional technology]

超高速プロセッサを実現するためには命令を多重に処理
するパイプライン方式が有効である。このパイプライン
方式の妥当性の検証や性能評価を行うために、評価用シ
ミュレータが必要となる。 例えば、情報処理学会第37口金国大会論文集(198
8年)第121頁から122頁rSIMP(単一命令流
/多重命令パイプライン)方式のシミュレーションによ
る評価」参照。 このシミュレータでは、パイプラインの機能をサブステ
ージと呼ばれる最小単位に分割し、分割されたサブステ
ージの集合によってステージ及びパイプライン構成を表
現している。各ステージにどのサブステージを用意する
かによって任意のパイプラインを構成する。 また、このシミュレータでは、命令間のデータ依存と制
御依存といった依存関係によるパイプラインの乱れをシ
ミュレータ中で表現している。例えば、命令間にデータ
依存がある場合は、それらの命令のリンクをとり先行命
令のデータ書き込みが終了するまではオペランドは供給
されない。制御依存は分岐命令により生じ、これがある
場合、分岐命令が終了するまで次の命令ブロックは供給
されない。
In order to realize an ultra-high-speed processor, a pipeline method that processes instructions multiplexed is effective. An evaluation simulator is required to verify the validity and evaluate the performance of this pipeline method. For example, see Proceedings of the Information Processing Society of Japan's 37th National Conference (198
8th grade) "Evaluation of rSIMP (Single Instruction Stream/Multiple Instruction Pipeline) System by Simulation" on pages 121 and 122. In this simulator, the functions of the pipeline are divided into minimum units called substages, and the stages and pipeline configuration are expressed by a set of divided substages. Configure an arbitrary pipeline depending on which substage is prepared for each stage. Additionally, this simulator expresses pipeline disturbances due to dependencies such as data dependence and control dependence between instructions. For example, if there is a data dependency between instructions, no operands will be supplied until those instructions are linked and the data writing of the preceding instruction is completed. Control dependencies are caused by branch instructions, where the next block of instructions is not provided until the branch instruction completes.

【発明が解決しようとする課題】[Problem to be solved by the invention]

上記従来技術では、計算機モデルの構成をパイプライン
の機□能をサブステージと呼ばれる最小単位に分割し、
サブステージの集合によってステージ及びパイプライン
を表現していた。集合関係を変更することで、計算機モ
デル構成のパイプライン段数の変更を行うことができる
。しかし、計算機モデルの記述量を削減して評価の効率
を向上するという問題については考慮されていない0本
発明の第一の目的は、ユーザが入力するモデル記述量を
削減してパイプラインの構成を変更した場合の評価比較
の効率を向上することにあ、る。 また上記従来技術では、新たにパイプライン計算機の高
速化方式を導入して評価を行うためにはモデル記述の変
更が複雑であった。さらに、連続する命令間でデータや
制御上の依存関係を検出する機能を備えているが、依存
関係が変わるような変更がある場合には、シミュレータ
プログラムの変更が必要になるという問題点があった。 本発明の他の目的は、パイプラインの構成を変更した場
合でもモデル記述の変更は比較的少量で容易であり、さ
らにシミュレータプログラムの変更無く評価を行うこと
を可能にして、評価の効率を向上することにある。
In the above conventional technology, the structure of the computer model is divided into the minimum units called substages, and the pipeline function is divided into the smallest units called substages.
Stages and pipelines were represented by collections of substages. By changing the set relationship, the number of pipeline stages in the computer model configuration can be changed. However, the problem of improving evaluation efficiency by reducing the amount of computer model descriptions is not considered.The first objective of the present invention is to reduce the amount of model descriptions input by the user and to configure the pipeline. The purpose is to improve the efficiency of evaluation comparison when changing. Furthermore, in the above-mentioned conventional technology, it was complicated to change the model description in order to introduce a new speed-up method of the pipeline computer and perform evaluation. Furthermore, although it has a function to detect data and control dependencies between consecutive instructions, there is a problem in that the simulator program must be changed if there is a change that changes the dependencies. Ta. Another object of the present invention is that even if the pipeline configuration is changed, the changes to the model description are relatively small and easy, and furthermore, the evaluation can be performed without changing the simulator program, thereby improving the efficiency of evaluation. It's about doing.

【課題を解決するための手段】 上記目的を達成するために、ユーザが記述したパイプラ
インを構成するステージの数と命令のデコード、アドレ
ス計算、オペランド読みだし、演算の実行処理が行われ
るステージ名と、処理される各命令について演算に要す
るサイクル数とレジスタ、メモリへの書き込み、読みだ
し処理が行われるステージ名と命令の処理が先行的に行
われる場合のレジスタ、メモリへの書き込み、読みだし
処理が行われるステージ名を入力して、計算機動作規則
群を生成し、該計算機動作規則群を入力してパイプライ
ン計算機のシミュレーションを実行する。 また、上記化の目的を達成するために、該計算機動作規
則記述群中にパイプラインを構成する各ステージごとに
該ステージで処理中の命令が次ステージへ遷移が可能な
状態か否かを表すステージ遷移制御信号を備え、次ステ
ージへ遷移が可能な条件を表す条件部と該ステージ遷移
制御信号の値を設定する動作部からなる計算機動作規則
と、該ステージ遷移制御信号の値が特定の値をとること
を表す条件部とステージ遷移処理を表す動作部からなる
計算機動作規則を生成して、シミュレーション時には該
ステージ遷移制御信号の値を判定してパイプライン計算
機を構成するステージ間の命令処理の遷移を行うか否か
を決定し。 新たな高速化方式を導入するためには、動作規則記述群
からステージ遷移制御信号名を抽出し、抽出されたステ
ージ遷移制御信号の値を設定する動作規則が複数存在す
るときには一つの動作規則記述に合威し不要になった動
作規則記述を削除して計算機規則記述を生成しなおし、
計算機動作規則記述群を入力としてシミュレーションを
実行する。
[Means for solving the problem] In order to achieve the above purpose, the number of stages that constitute the pipeline written by the user and the stage names where instruction decoding, address calculation, operand reading, and operation execution processing are performed. and the number of cycles required for the operation for each instruction to be processed, the register, the name of the stage where writing to and reading from memory is performed, and the register, writing to, and reading from memory when the instruction is processed in advance. A stage name in which processing is performed is input to generate a computer operation rule group, and a pipeline computer simulation is executed by inputting the computer operation rule group. In addition, in order to achieve the above purpose, for each stage configuring the pipeline in the computer operation rule description group, it is expressed whether the instruction being processed at the stage is in a state where it is possible to transition to the next stage. A computer operation rule that includes a stage transition control signal and includes a condition section expressing a condition under which transition to the next stage is possible, and an operation section that sets the value of the stage transition control signal, and a computer operation rule that sets the value of the stage transition control signal to a specific value. A computer operation rule is generated that consists of a condition part that indicates that the process is taken, and an operation part that indicates stage transition processing, and during simulation, the value of the stage transition control signal is determined to determine the instruction processing between the stages that make up the pipeline computer. Decide whether to make the transition or not. In order to introduce a new speed-up method, stage transition control signal names are extracted from a group of operation rule descriptions, and when there are multiple operation rules that set the values of the extracted stage transition control signals, one operation rule description is used. Delete the operation rule descriptions that are no longer necessary due to the error, and regenerate the computer rule descriptions.
A simulation is executed using the computer operation rule description group as input.

【作用】[Effect]

計算機動作規則記述部生成プログラムは、ユーザが記述
した計算機指定記述を入力して、シミュレーション実行
用の計算機動作規則記述群を生成する。パイプラインを
構成するステージ名の指定から、パイプラインを構成す
る各ステージで処理中の命令が次ステージへ遷移が可能
な状態か否かを表すステージ遷移制御信号、次ステージ
への遷移が可能な条件を満たした時に該ステージ遷移制
御信号の値を設定する計算機動作規則記述、該ステージ
遷移制御信号の値が特定の値をとった時にステージ遷移
処理を実行する計算機動作規則記述を生成する。また、
計算機上で処理される命令の属性の指定から、パイプラ
インの処理の流れを乱すオーバヘッド要因発生の発生条
件判定と発生時の動作を表す動作規則記述を生成する。 例えば。 命令には演算実行に1サイクル要する命令、3サイクル
要する命令、5サイクル要する命令の三種類があるなら
ば、r演算処理ステージに命令が入って次のタイミング
で次ステージにその命令を遷移する」ことを表す動作規
則記述、「演算処理ステージに命令が入って3サイクル
後のタイミングで次ステージにその命令を遷移する」こ
とを表す動作規則記述、「演算処理ステージに命令が入
って5サイクル後のタイミングで次ステージにその命令
を遷移する」ことを表す動作規則記述の三種類の動作規
則記述を生成する。また、例えば、ステージSNで汎用
レジスタからの読み込み処理を行う命令があると指定さ
れていれば、「シミュレーションで実行されている命令
列の中で、前の命令が書き込みを行う汎用レジスタと同
一のレジスタに対して後続の命令が書き込みを行うよう
な組合せの命令列が入ったか否かを判定し、そのような
命令列が入ったと判定された場合には、SNステージ中
で前の命令の書き込み処理が終了するのを待つ」ことを
表す動作規則記述を生成する。 ステージ遷移制御信号名抽出ルーチンは、計算機動作規
則記述群を生成する過程で、各ステージごとに備えられ
るそのステージで処理中の命令が次ステージへ遷移が可
能な状態か否かを表すステージ遷移制御信号名と、ステ
ージ中の命令処理状況を表すビジー信号名、及び、それ
らの信号の値を設定しようとする動作規則記述を抽出す
る。例えば、SNステージで処理中の命令がS(N+1
)ステージへ遷移が可能な状態か否かを表すステージ遷
移制御信号は、5NtoS(N+1)、SNステージの
命令処理状況を表すビジー信号は5Nbusy、と名付
けられている。また、それらの信号の値を設定しようと
する動作規則記述とは、その動作部中で5NtoS(N
+1)。 5Nbusyに対して何らかの値を設定することが記述
されている動作規則をさす。抽出されたステージ遷移制
御信号名と動作規則記述群は、ステージ遷移制御信号値
設定動作規則記述競合調整ルーチン中で、その信号の値
を設定する動作規則が競合してエラーを起こすことがな
いよう動作を保障さ士るために用いられる。また、ユー
ザが新たな高鎧化方式を追加する際に、このステージ遷
移制御a号の値を制御するような動作規則を記述するた
ダに用いられる。 ステージ遷移制御信号値設定動作規則記述競ぞ調整ルー
チンは、ステージ遷移制御信号名抽出ノ1−チンが抽出
した動作規則記述について、同−C処理遷移制御信号の
値を設定するような動作現員1記述が複数発生した場合
には、動作規則記述間C優先順位や並列性を考慮して、
不必要な動作現員1の削除し、遷移の条件を適切な形に
変えてまと鉱動作規則を生成しなおす。また、ユーザが
新たな高速化方式を導入して評価する際に追加記述した
動作規則記述と、計算機動作規則記述群生酸プログラム
が生成したシミュレーション実行用の計算機動作規則記
述群との開で、同一の処理遷移制御信号の値を設定する
ような動作規則が複数発生した場合にも、動作を保障す
るために同様の処理を行う。 (実施例] 本発明の詳細な説明に先立ち、まず本発明による一実施
例の計算機シミュレーション方法の全体システムの構成
を第1図を用いて説明する。第1図において、ユーザが
計算機指定記述(101)を入力し、計算機構成指定記
述の内容から計算機動作規則記述群生酸プログラム(1
02)がシミュレーション実行用の計算機動作規則記述
群(t05)を生成する。生成の過程でステージ遷移制
御信号名抽出ルーチン(104)がステージ遷移を制御
する信号名(109)を抽出する。計算機動作規則記述
群(105)を入力として、シミュレータプログラム(
106)がシミュレーションを実行して、パイプライン
計算機の各ステージでの命令処理の遷移を示すステージ
フローグラフ(107)と、パイプライン計算機のシミ
ュレーション実行結果トレース(108)を出力する。 本発明の第一の特徴は、ユーザが入力した計算機指定記
述(101)をもとに、計算機モデル記述生成プログラ
ム(102)がシミュレーション実行用計算機モデル記
述(105)を生成することにある。計算機指定記述(
101)は、パイプライン計算機のステージ構成を指定
する計算機構成指定記述(110)とパイプライン計算
機で処理される各命令の属性を指定する命令属性テーブ
ル(111)からなる、計算機構成指定記述(110)
では、パイプラインを構成するステージの数と各々の名
前、命令のデコード、アドレス計算、オペランド読みだ
し、演算の実行処理が行われるステージ名、キューを有
するステージについてはその段数を指定する。命令属性
テーブル(111)では、処理される各命令について演
算に要するサイクル数とレジスタ、メモリへの書き込み
、読みだし処理が行われるステージ名と命令の処理が先
行的に行われる場合のレジスタ、メモリへの書き込み、
読みだし処理が行われるステージ名を指定する。ユーザ
は、計算機構成指定記述(110)において、ステージ
の段数や各ステージで行われる処理の指定を変更して計
算機モデル記述生成プログラム(102)によって計算
機規則記述群を生成すれば、パイプライン構成を自由に
変えることができる。また、命令属性テーブル(111
)において、例えば命令の演算実行に要するサイクル数
を変更して計算機モデル記述生成プログラム(102)
によって計算機規則記述群を生成すれば、パイプライン
計算機の演算処理性能を変えることができる。レジスタ
、メモリへの書き込み、読みだし処理が行われるステー
ジ名を変更すればパイプラインの流れを乱すオーバヘッ
ド要因が起こった場合に命令の待ちが生じるステージと
タイミングが変わり、また、先行的に行われる命令処理
のレジスタ、メモリへの書き込み、読みだし処理が行わ
れるステージ名を変更すれば、パイプラインの流れを乱
すオーバヘッド要因が起こった場合でもバイパスを介し
て書き込み、読みだし処理を行うことができるバイパス
機能を持つパイプライン計算機とそのバイパスするタイ
ミングを表現することができる。以上のように計算機構
成指定記述(110)を変更して計算機モデル記述生成
プログラム(102)によって計算機規則記述群を生成
すれば、パイプライン計算機の構成や性能を自由に変え
ることができるので1幅広くパイプライン計算機の方式
の評価を行うことが可能である。 本発明の第二の特徴は、シミュレーション実行用計算機
モデル記述(105)を生成する計算機モデル記述生成
プログラム(102)中に、ステージ遷移制御信号値設
定動作規則記述競合調整ルーチン(103)とステージ
遷移制御信号名抽出ルーチン(104)を備えることに
ある。ここで生成されるシミュレーション実行用の計算
機動作規則記述(105)中では、次の処理ステージへ
の命令の遷移が可能な状態か否か表すステージ遷移制御
信号と、ステージ中の命令処理状況を表すビジー信号の
値に従ってステージ遷移の制御を行うように記述してい
る。ステージ遷移制御信号名抽出ルーチン(104)が
、計算機動作記述生成の過程で、ステージ遷移処理上キ
ーワードとなる、ステージ遷移制御信号名とビジー信号
名、および、それらの信号の値を設定する動作規則を抽
出する。 ステージ中の命令処理状況を表すビジー信号の値を設定
する動作規則は、オーバヘッド要因ごとに記述され、ビ
ジー信号はオーバヘッド要因が発生した時に命令処理に
待ちが生じて処理終了できなくなっているステージ、ま
たその影響でステージ中の命令が遷移できなくなってい
る他のステージに対して、値を1とする。同一のステー
ジ遷移制御信号、ビジー信号の値を設定する複数の動作
規則記述が競合するときには、不必要な動作規則は削除
、または、調整を行って生成し直さなければならない。 ステージ遷移制御信号値設定動作規則記述競合調整ルー
チン(103)が、抽出された信号名と動作規則をもと
に、その処理を行う。 また、新たに高速化方式の導入のために追加記述した動
作記述と、計算機動作規則記述群生酸プログラムが生成
したシミュレーション実行用の計算機動作規則記述群と
の間で、同一の処理遷移制御信号の値を設定するような
動作規則が複数発生した場合にも、ステージ遷移制御信
号名抽出ルーチン(104)が抽出した信号名と動作規
則をもとに、ステージ遷移制御信号値設定動作規則記述
競合調整ルーチン(103)が、動作を保障するために
同様の処理を行う。これによって、新たな動作記述の追
加、不必要な動作記述の削除を自動的に行い、ステージ
の構成や機能を容易に変更して評価を行うことが可能に
ある。一つのステージ遷移制御信号の値を設定する動作
規則が複数存在するとき、その動作が保障される。 次に、本発明による一実施例の計算機シミュレーション
方法を詳細に説明する。 まず、計算機指定記述(101)の入力例と。 計算機指定記述(101)の内容から計算機モデル記述
生成プログラム(102)が生成するシミュレーション
実行用計算機モデル記述(105)の出力例を、第2図
に示す。計算機構成指定記述(110)で指定されてい
る項目は順に、ステージの段数、各ステージの名前とそ
の並び順、命令のデコード処理を行うステージ名、アド
レス変換処理を行うステージ名、オペランド読み出し処
理を行うステージ名、演算実行処理を行うステージ名の
指定、演算ピッチサイクル数、キューを有するステージ
名とその段数といった計算機構成指定(110)である
、この例では、「パイプラインを構成するステージ数は
7段、それぞれ順に5O2SL、S2.、、、、 S6
と名前を付ける。デコードを行うステージはSO,アド
レス計算を行うステージはsi、、、、、ステージS1
には、6段分のキューがある」ようなパイプライン計算
機の構成を示している。命令の属性を記述するテーブル
は、パイプラインの構成や性能に依存しない命令の属性
を記述する基本命令属性テーブルと、パイプラインの構
成や性能に依存して変わる命令の属性を記述する命令属
性テーブルの二つに分けて記述する。パイプラインの構
成や性能に依存しない命令の属性を記述する基本命令属
性テーブルでは、命令の長さ、オペランドの長さ、汎用
レジスタを書き替える場合にはどのレジスタを書き替え
るのか、浮動小数点レジスタを書き替える場合にはどの
レジスタを書き替えるのか、汎用レジスタを読みだす場
合にはどのレジスタを読みだすのか、浮動小数点レジス
タを読みだす場合にはどのレジスタを読みだすのか、を
記述する。パイプラインの構成や性能に依存して変わる
命令の属性を記述する計算構成依存命令属性テーブルで
は(IIIA)で指定されている項目は、命令の属性と
して命令ごとに演算実行に要するサイクル数、デフード
ピッチ数、汎用レジスタ、浮動小数点レジスタ、メモリ
への書き込み処理を行うステージ名、読み出し処理を行
うステージ名、先行演算を行う場合の汎用レジスタ、浮
動小数点レジスタ、メモリへの書き込み処理を行うステ
ージ名、読み出し処理を行うステージ名である。パイプ
ラインの構成や機能を変更して評価する場合には、上記
の指定内容を変えれば良い0例えば、演算が実行するス
テージより、デコードを行うステージの方が後である等
の、論理的な誤りが起こらない範囲内で、自由に指定を
変えることが可能である。 計算機構成指定(IIOA)と計算機構成依存命令属性
テーブル(第3図の111A)を入力した時、生成され
る計算機動作規則の一部を(105A)に示す。ここで
は、デコードを行うステージに分岐命令が投入された時
の動作を表す動作規則記述と、ステージS2からステー
ジS3への命令処理の遷移を表す動作規則記述を例にし
て説明する。 分岐命令については、「デコードを行うステージに投入
された命令が、分岐条件を判定して後続の命令列を決定
するような分岐命令のときは、その分岐命令における判
定が終了して分岐先を決定した後、分岐先の命令をデコ
ードを行うステージに投入する」動作記述群を生成する
。デコードを行うステージをSOとする。ここでは二つ
の動作規則記述に分けて、「デコードステージSOに投
入された命令が分岐命令のとき、その分岐命令における
判定処理を実行する意味を持つ信号BRANCI(に値
1を設定する」ことを表す動作規則記述5etBRAN
CHと、「信号BRANCHに値1が設定されていて、
かつ、分岐判定が終了していない間(Branch−j
udgeが値1をとっている間)は1分岐先の命令をデ
コードステージSOに投入しても良いか否かを表す信号
tO3Oに値Oを代入してデコードステージへの命令の
投入を抑止する」ことを表す動作規則記述toso−s
uspend−Branchを生成する。ここでは、分
岐の動作を表す動作規則記述を生成するための動作規則
の「型」を動作規則記述生成プログラムが持っていて、
その「型」中のデコードを行うステージを表す変数にS
Oを代入して動作規則を生成している。 但し、ここで生成される動作規則記述中で表れる信号B
ranch−judgeの値は、またIIIの動作規則
中で設定されている。 ステージS2からステージS3への命令処理のステージ
遷移処理は、ステージ遷移制御信号の値によってステー
ジ遷移を行うことを表す、動作規則名5etS2toS
3の記述に従う。条件部に現れる52toS3は、ステ
ージS2で処理中の命令が次ステージS3への遷移が可
能な状態か否かを表す、ステージ遷移制御信号である。 ステージSXから次ステージS (X+1)への遷移を
制御するステージ遷移制御信号の名前は、5XtoS(
X+1)と表すものとする。52toS3の値が1の時
はステージS2からステージS3への遷移が可能な状態
であることを示しており、動作規則5etS2toS3
は、rS2toS3の値が1の時は、即ステージS2で
処理されている命令番号をステージS3に移し、ステー
ジS2中の命令番号をリセットする動作を実行する」と
いう意味を持つ。 動作規則記述生成プログラム(102)が計算機指定記
述(101)を参照しながら動作規則記述(105)を
生成する処理の部分について、その手順を第41ii1
に示す。 始めに、計算機指定記述(101)を読み込んで、計算
機指定内容テーブル(220)を生成する(221)、
この計算機指定内容テーブル(220)を参照して以降
の動作規則記述を生成していく、まず、ステージ名SN
、キューの指定Qから、各ステージに対応するステージ
遷移制御信号、ビジー信号、ステージ遷移制御動作規則
記述を生成する(222)。ここでは、ステージSXか
ら次のステージS(X+1)へのステージ遷移制御信号
名を5XtoS(X+1)、 Xデージ5X(7)ビジ
−信号名を5Xbusyと名付けて各々のステージにつ
いて信号を生成する。またステージSXから次のステー
ジS(X+1)へのステージ遷移制御動作規則は、「ス
テージSXと次のステージS(X+1)中の命令につい
てそれぞれの処理が終了したとき、ステージSXから次
のステージへのステージ遷移制御信号5XtoS(X+
1)に値1を代入する」という型に対して各々のステー
ジ名を代入して動作規則を生成する。これらは、各ステ
ージに対応して生成される動作規則記述である。 次に、デコード処理を表す動作規則を、デコード処理を
行うステージDS、命令ごとのデコードピッチ数DPか
ら生成する(223)。例えば。 計算機構成依存命令属性テーブル中にデコードピッチが
1サイクルの命令と2サイクルの命令があれば、後続の
命令が次のサイクルでデコードステージに入るような動
作規則と2サイクル後にデコードステージに入るような
動作規則とを生成する。 ここでは、rデコードステージSの処理が終了してから
、Xサイクル後に次の命令をSへ投入することができる
ことを表すステージ遷移制御信号の値を1にする」とい
うあらかじめ用意された型に対して、後続の命令をデコ
ードステージに入れる動作の実行タイミングXと、デコ
ードステージに値を代入する。つまり、「デコードステ
ージDSの処理が終了してから、次のサイクルで次の命
令をデコードステージへ投入することができることを表
す信号toO3を1にする」動作規則と、「デコードス
テージDSの処理が終了してから、1サイクル後に次の
命令をデコードステージへ投入することができることを
表す信号toDSを1にする」動作規則を生成する。こ
れは、処理される命令に対応して生成される動作規則で
ある。 次に、演算実行処理を表す動作規則を、演算実行処理を
行うステージES、演算実行ピッチ数○P、命令ごとの
演算実行サイクル数OCから生成する(224)、例え
ば、演算ピッチ○Pが1サイクル、演算実行サイクル数
oCとして2サイクル要する命令と3サイクル要する命
令があれば、「演算実行ステージS中の命令は、(oc
−op+1)サイクル分S中にいて、(oc−op)サ
イクル目でSから次ステージへのステージ遷移制御信号
を1にする」という型に対して、演算実行サイクル数O
Cと、演算実行処理を行うステージ名ES、演算ピッチ
OPの値を代入して、2サイクル要する命令に対しては
「演算実行ステージES中Φ命令は、2サイクル分だけ
ES中にいて。 3サイクル目でESから次ステージへのステージ遷移制
御信号EStoNEXTを1にする」動作規則と、3サ
イクル要する命令に対しては「演算実行ステージES中
の命令は、3サイクル分だけES中にいて、4サイクル
目でESから次ステージへのステージ遷移制御信号ES
toNEXTを1にする」動作規則を生成する。また、
演算ピッチOPが2サイクル。 演算実行サイクル数として2サイクル要する命令と3サ
イクル要する命令があれば、このときは演算ピッチOP
が2サイクルであるから、一つの命令が演算実行ステー
ジESに命令がいる時間と次ステージに命令がいる時間
という2ステ一ジ分の処理時間の和が、演算実行サイク
ル数に相当する。 この場合も、前述の型に値を代入して、「演算実行ステ
ージES中の命令は、1サイク、ル分だけES中にいて
、2サイクル目でESから次ステージへのステージ遷移
制御信号EStoNEXTを1にする」動作規則と、「
演算実行ステージES中の命令は、2サイクル分だけE
S中にいて、3サイクル目でESから次ステージへのス
テージ遷移制御信号ESt。 NEXTを1にする」動作規則を生成する。(OC−1
)サイクル分ステージESに、1サイクル分ESの次ス
テージにいることになる。これも、処理される命令に対
応して生成される動作規則である。 次に、パイプラインの流れを乱すオーバヘッド要因別に
その動作規則を生成する(225)。例えば、パイプラ
イン中を多重に流れている複数の命令が、同一の汎用レ
ジスタ、または、浮動小数点レジスタ、メモリを使用し
ようとした時の待ちを生じさせる動作規則や、分岐命令
が投入された時の分岐判定終了の待ちを生じさせる動作
規則などである。ここでは、同一の汎用レジスタの使用
の競合が起こったときの動作規則の生成について説明す
る。 まず、汎用レジスタを書き替える命令があるとき、「デ
コードステージに投入された命令が汎用レジスタを書き
替える命令であるとき、それを各々のレジスタに対応し
て持っている書替え命令登録リストに登録する」動作規
則を生成する。これは、基本命令属性テーブルで指定さ
れている、命令ごとのどの汎用レジスタを書き替えるか
の指定を参照してその内容に合わせて動作規則を生成す
る。ある命令が汎用レジスタを書き替える場合には、そ
の命令が書き替えるすべての汎用レジスタについて書替
え命令登録リストに命令番号を登録しなければならない
。ここでは、「デコードステージSに投入されている命
令が、書き替えを行う汎用レジスタがR1,、、、、R
Xであるとき、その命令番号をR1,、、、、RX用の
書替え命令登録リストに登録する」という型を用意して
いる0例えば、基本命令属性テーブル中で、汎用レジス
タORのみを書き替えると指定されている命令■1のた
めには、「デコードステージSに命令工1が投入された
とき、Ilの命令番号を汎用レジスタOR用の書替え命
令登録リストに登録する」動作規則を生成する。汎用レ
ジスタ番号GRと、(GR+1)番目を書き替える命令
■2のためには、「デコードステージSに命令I2が投
入されたとき、I2の命令番号を汎用レジスタORと(
GR+1)用の書替え命令登録リストに登録する」動作
規則を生成する。これらは、命令の属性に対応して生成
される動作規則である。 次に「汎用レジスタを書き替える命令Aが書き替えが終
了しな時(命令Aが、命令Aの汎用レジスタ書き込みス
テージから次のステージに遷移することができる条件を
満たしたとき)に、登録されでいた命令Aを書替え命令
登録リストから削除する」動作規則を生成する。基本命
令属性テーブル中の命令ごとの書き替える汎用レジスタ
の組の指定と、計算#!に構成依存命令属性テーブル中
の汎用レジスタ書き込みステージ名を参照してその内容
に合わせて動作規則を生成する。ここでは、「汎用レジ
スタ書き込みステージSである命令がステージSでの処
理が終了していて、命令が書き替える汎用レジスタがR
1,、、、、RXであるとき、その命令番号をR1,、
、、、RX用の書替え命令登録リストから削除する」と
いう型を用意している。例えば、汎用レジスタ書き込み
ステージが85で、汎用レジスタ番号GRのみを書き替
えると指定されている命令11のためには、「ステージ
S5で命令■1の処理が終了したとき、I1の命令番号
をOR用の書替え命令登録リストから削除する」動作規
則を生成する。また、汎用レジスタ書き込みステージが
85で、汎用レジスタ番号GRと、(GR+1)番目を
書き替える命令■2のためには、「ステージS5で命令
I2の処理が終了したとき、I2の命令番号をGRl(
GR+1)用の書替え命令登録リストから削除する」動
作規則を生成する。この動作規則記述は。 命令の属性に対応して生成される動作規則である。 次に「命令Aが汎用レジスタを読みだす命令で、その読
みだそうとするレジスタを書き替えようとする命令Bが
命令Aより以前に投入されていなければ、(汎用レジス
タの読みだしが可能なのでその処理を終了して次のステ
ージへ遷移することができるから)命令Aを汎用レジス
タ読み込みステージGRから次のステージへのステージ
遷移制御信号の値を1にする」動作規則を生成する。こ
こでは、「汎用レジスタ読みだしステージSXIである
命令IがステージSXIでの処理が終了していて、命令
工が汎用レジスタR1,、、、、RXを読みだす命令の
とき、R1,、、、、RX用書替え命令登録リスト中に
命令Aより以前に投入された命令の番号が残っていなけ
れば、命令Aの汎用レジスタ読み込みステージSX2か
ら次のステージへのステージ遷移制御信号の値を1にす
る」という型を用意している0例えば、汎用レジスタ読
みだしステージが84.汎用レジスタ番号ORのみを読
みだす命令11のためには、「ステージS4での命令1
1の処理が終了していて、OR用書替え命令登録リスト
中に命令工1より以前に投入された命令の番号が残って
いなければ、ステージS4から次のステージへのステー
ジ遷移制御信号54toNEXTの値を1にする」動作
規則を生成する。 また、汎用レジスタ読みだしステージが84.汎用レジ
スタ番号ORと、(GR+1)1%目を読みだす命令の
ためには、rステージS4での命令11の処理が終了し
ていて、GRと、(GR+1)用書替え命令登録リスト
中に命令11より以前に投入された命令の番号が残って
いなければ、ステージS4から次のステージへのステー
ジ遷移制御信号54toNEXTの値を1にする」動作
規則を生成する。ここで生成される動作規則は、命令の
属性に対応して生成される動作規則である。 また、第20の計算機動作規則記述(105A)のステ
ージ遷移制御信号52toS3の値は、ステージS2で
処理されている命令の処理状況を表す52busyの値
と、S2以降のあるステージSXで処理されている命令
の処理状況を表す5Xbusyの値によって決定される
。 52busyが値1をとるということは、S2で処
理中の命令についての処理が終了できずにいることを示
す。ここで、ステージS2以降のあるSXの状況を考慮
するのは、ステージS2での処理は終了していても、遷
移先のあるステージSxでの処理が終了していないため
に、ステージS2中の命令は処理終了していても処理さ
れた命令が遷移できずにいるときは、遷移を抑止しなけ
ればならないからである。ステージSNで処理されてい
る命令の処理状況を表す5Nbusyの値を設定する動
作規則記述生成のアルゴリズムを第5図に、ステージ遷
移制御信号52toS3の値を決定する動作規則記述生
成のアルゴリズムを第7図に示す。 5Nbusyの値を設定する動作規則記述生成の手順を
第5図を用いて説明する。 5Nbusyの値を1にする第一の要因は、ステージS
Nで処理中の命令について処理が終了せず、SNで待ち
を生じるようなオーバヘッド要因が発生することである
。例えば、 S2で処理中の命令がメモリに書き込まれ
ている内容を読みだすような命令で、かつメモリからの
読みだし処理を行うステージがS2であり、また、S2
中の命令より以前に現れた命令が、S2中の命令が読み
だしを行おうとしているメモリの同じ番地に対して書き
込みを行うような命令であるとき、その書き込み処理が
終了していなければ、書き込みが終了するまでステージ
S2中の命令はステージS3へ遷移せずS2で待たなけ
ればならない。このようにステージS2中で待ちが生じ
ている間は、ステージS2中の命令の処理状況を表すビ
ジー信号52busyの値は1と設定するように動作規
則を記述する。この、同一のメモリ番地への書き込みと
読みだしが競合するオーバヘッド要因を、メモリコンフ
リクトと呼ぶ、また、パイプラインの処理の流れを乱す
オーバヘッド要因としては、メモリコンフリクトの他に
も、汎用レジスタ。 浮動小数点レジスタそれぞれへの書き込みと読みだしが
競合するオペランドコンフリクト、後続の命令のための
アドレス計算に必要なレジスタへの書き込みが終了して
いないために起こるアドレス計算レジスタコンフリクト
、演算性能オーバヘッド、分岐に関するオーバヘッド要
因など、複数のオーバヘッド要因がある。それぞれのオ
ーバヘッド要因ごとに、待ちを生ずるステージについて
のビジー信号を設定する動作規則記述を作る(301)
。 5Nbusyの値を1にする第二の要因は、ステージS
Nで処理中の命令については処理が終了しているが、ス
テージS(N+1)からS(N+x)で処理されている
命令について、その処理が終了していないか、或いは何
らかの理由で次ステージに遷移できずにいるため、ステ
ージSN中の命令も次ステージS(N+1)へ遷移でき
ずにいることである。xの値は、ステージ構成の演算実
行ピッチの値である。それぞれのステージごとに、他の
ステージの影響で待ちを生じビジー信号を設定する動作
規則記述を作る(302)。 以上に述べたように複数のオーバヘッド要因があり、そ
のオーバヘッド要因が発生したときに待ちが生ずるステ
ージが同じであると定義されていれば、同一のステージ
のビジー信号の値を設定する動作規則記述が複数生成さ
れる可能性がある。 しかし、シミュレーション実行時に複数の動作規則記述
が競合した場合には、エラーとなり、動作が保障されな
い。そこで、それらの動作規則記述を調整する必要があ
る。ここで、同一のステージ中で待ちが生ずるようなオ
ーバヘッド要因が複数存在する場合で、ひとつでもオー
バヘッド要因が発生したまま解消されずに残っていると
、そのステージ中で処理中の命令は次ステージへの遷移
はできない。すべての要因が解消されたとき、初めてス
テージ遷移が可能となる。従って、複数の動作規則記述
について、その一つでもオーバヘッド検出条件が成立し
た場合には、ビジー信号の値を1にするような動作規則
を追加する(303)。 ステージによっては、そのステージ中で待ちが起こるよ
うな、オーバヘッド要因が存在しない場合もある。その
ステージに関してはビジー信号の値を設定する動作規則
記述が生成されない。 例を第6図に示す、まず、各々のオーバヘッド要因によ
ってステージ遷移が抑止される動作規則記述を生成する
。例えば、メモリコンフリクトの発生条件と1発生時の
動作を表す動作規則の条件部は、「前命令が書き込みを
行おうとしているメモリの番地と後続の命令が読み込み
を行おうとしているメモリの番地が重なった」であり、
その条件部が成立したときに実行される動作部は、「後
続の命令が読み込みを行うステージで処理の終了を待つ
」という意味を持つ。ここで、条件部に現れている肝M
ORY−READ−5USPENDは、メモリへの書き
込み、読みだし処理において競合が起こったとき、値1
をとる信号である。このとき、後続の命令についてメモ
リからの読み込みを行うステージS2で待ちを生じさせ
るために、動作部では52busyの値を1に設定する
と記述されている(・403)。次に、52busyの
値を設定しようとする動作規則が生成されたことを登録
する。この他、メモリコンフリクト以外のオーバヘッド
要因についても同様に、それぞれ待ちの生じるステージ
名に対応したビジー信号の値を設定するような動作規則
を生成する。 ここで、他のオーバヘッド要因Xxによって同じくS2
で待ちを生じ、52busyを1にするような動作規則
記述(404)が生成されたとする。これを52bus
yに登録する。 すべてのオーバヘッド要因について動作規則が生成され
た後、それらのオーバヘッドによるビジー信号が発生し
たことによる影響で待ちの生じるステージについて、動
作規則を生成する。この例では、演算実行ピッチが2サ
イクルと指定されているとすると、54busyの値が
1である間は、52busyの値も1にするような動作
規則(405)を生成しなければならない、この動作規
則についても同様に、52busyに登録する。 その後、それぞれのビジー信号について、その値を設定
しようとする動作規則が複数個あるものを調べる。この
例では、 52busyの値を設定しようとする動作規
則が複数個生成されているので、そのいずれかの動作規
則記述の条件式が成立しているときには52busyが
値1を取るような動作規則記述を生成して追加しなけれ
ばならない。まず、メモリコンフリクトによる52bu
sy設定の動作規則記述の動作部を52busylを設
定する動作規則(406)に置き換える。次に、もう一
つのオーバヘッドによる動作規則記述についても、動作
部を52busy2を設定する動作規則(407)に置
き換える。 54busyの影響を考慮して生成された動作規則記述
の動作部を52busy3を設定する動作規則(408
)に置き換える。さらに、 52busyl、 52b
usy2.52busy3のいずれかが値1を取ってい
る間は、52busyの値を1にする動作規則記述(4
09)を追加する0以上のようにして、52busyの
値を設定する動作規則記述を作る。このとき、動作規則
(409)の条件部に、二つの動作規則(406)、 
(407)、(408)の条件部をあわせて論理的OR
をとる方法も考えら軌る。しかし、これらを一つにまと
めてしまうと、シミュレーション結果トレースデータか
ら、どちらのオーバヘッド要因によってステニジS2で
待ちを生じたのかを、判定できなくなってしまう、そこ
で、その判別を可能にするために、いずれかが成り立っ
ていたら52busyを1にする動作規則(409)を
追加することにした。また、これと同時に52busy
を設定しようする動作記述として、以上の物があったこ
とを登録しておく。 ステージ遷移制御信号の値を設定する動作規則記述生成
の例を第8図に示す。前述のように、例えばステージ遷
移制御信号52toS3の値は、52busyの値と、
S2以降のあるステージSXの5Xbusyの値によっ
て設定される。 例えば、ステージS5が演算を実行するステージであり
、演算実行ピッチが2サイクルと指定されているような
パイプライン計算機構成においては、S5中の命令が命
令実行に4サイクル要する命令であるとすると、その直
後の命令はステージS3中で85中の命令実行の終了を
待ち、終了してS6に遷移するのと同時に、 S3中の
命令が84へ遷移する。つまり、ステージS5中の命令
が実行されている間は、53toS4の値をOにしてお
かなければならない、従って、 53toS4の値を1
にするためには、まずステージS3中の命令が実行終了
していること(S3busyがOである)の他に、 5
5busyの値がOであるか否かを判定する必要がある
(601)。これが、ステージS5が演算を実行するス
テージであり、PR算実行ピッチが1サイクルと指定さ
れている場合には、 53toS4の値は、53bus
yと54busyの値で決まる。 55busyの値が影響するのは、54toS5の値を
設定するときである。(602)。 さらに、ステージS5が演算を実行するステージ、演算
実行ピッチが2サイクル、かつステージS4中で待ちを
生じさせるオーバヘッド要因があり、それにより54b
usyの値を設定するような動作規則が生成されている
ときは、53toS4の値を1にするためには、まずス
テージS3中の命令が実行終了していること(S3bu
syがOである)、ステージS4中の命令が実行終了し
ていること(S4busyがOである)、S5中の命令
が実行終了していること(S5busyの値がOである
)を判定する(603)。 また、ステージS5が演算を実行するステージ、演算実
行ピッチが2サイクル、かつステージS4にキューが3
ステ一ジ分ある場合には、それぞれキューは540. 
S41. S42と名付けられるが、S5中の命令が実
行中であっても、S40. S41. S42のすべて
のキューに遷移待ちの命令が入っていなければ、S3か
ら54への遷移を行うことができる。従って、53to
S4の値を1にするためには、まずステージS3中の命
令が実行終了していて(S3busyがOである)、か
つ、ステージS4のすべてのキューステージに遷移待ち
の命令が入っていない(S42中に命令がない)か、或
いは、ステージS4のすべてのキューステージに遷移待
ちの命令が入っている(S42中に命令がある)が、S
5中の命令は実行終了していること(S5busyがO
である)を判定する(604)。 ステージ遷移制御信号設定規則生成の手順を、S2から
S3へのステージ遷移制御を例にして、第7図を用いて
説明する。 演算ピッチ数をNとする(501)、基本的には、rS
2busyが値Oをとり、かつ、S(2+N)busy
が値0をとるとき、ステージS2中の命令について、次
のステージS3への遷移が可能になるので、 S2t。 S3の値を1にする」である(502)、L、かじ、次
のステージS3からS(2+N)の間のステージsxで
待ちを生じさせるようなオーバヘッド要因が存在すると
きには1条件にrSXbusyが値Oをとること」が追
加される(503)、また、S3がキューを備えるとき
は、条件部からrS3busyが値0をとること」が削
除され、rすべでのキューステージに遷移待ちの命令が
入っていないか、あるいは、入っている場合には53b
usyが値Oをとり、かつ、54busyが値Oをとる
こと」が追加される(504)。 以上の手順に従って、ステージ遷移制御信号の値を設定
する動作規則記述を生成する。 以上のように、計算機動作規則記述部生成プログラムは
、ユーザが入力したステージ構成指定と命令属性テーブ
ルに対して、ステージ遷移制御信号名抽出ルーチンとス
テージ遷移制御信号M設定動作規則記述競合調整ルーチ
ンを用いて、シミュレーション実行用の計算機動作規則
記述群を生成する。 さらに、パイプラインの段数を変更したり、性能の向上
を考慮して計算機モデルの記述を変更するときには、命
令属性テーブル中のGPR,FPR,MEMORYの書
き込み、読みだしステージ、命令実行に要するサイクル
数などを変更した上で、再度計算機モデル記述生成プロ
グラムによってシミュレーシコン実行用計算機動作規則
記述を生成しなおせばよい。また、新たな高速化方式を
導入するために動作規則記述を追加するときのアルゴリ
ズムを第9図に示す。 新たな高速化方式を導入するために動作規則記述を追加
するときには、ステージ遷移制御信号抽出ルーチンが抽
出した、ステージ遷移制御信号。 ビジー信号の値を設定するように記述した動作規則を動
作規則記述群に追加する。追加によって、同一の信号を
設定しようとする動作規則記述が競合するときには、上
記手順と同様に、ステージ遷移制御信号値設定動作規則
記述競合調整ルーチンが、動作規則記述を生成しなおす
。この時、新しい高速化方式と入れ替わる動作規則記述
を動作規則記述群から削除する。 以上の様にして生成された動作規則記述を入力して、パ
イプライン計算機の命令処理の遷移をシミュレーション
実行するときに行われる処理の流れを述べる。パイプラ
イン計算機の処理の流れをシミュレーションするので、
一つの時刻でもそれぞれのステージについて並列にその
ステージ中での処理の進行を行う。それぞれのステージ
中にある命令それぞれの属性を命令属性テーブルから参
照して、伸動される動作規則記述を選択し実行して、そ
の結果としてそのステージから次ステージへの遷移を抑
止するステージ遷移制御信号の値がOの間は次ステージ
への遷移を抑止し、値が1になったとき次ステージへの
遷移を実行する。つまり、各ステージごと命令が遷移し
てきたときに、その命令の属性を命令属性テーブルから
参照して命令対応に生成された動作規則記述を選択し、
その動作規則記述を実行してステージ遷移制御信号の値
を決め、次にステージ対応に生成された動作規則記述を
実行してステージ遷移を行うという手順になる。 例えば、命令ごとの演算実行サイクルによって演算ステ
ージから次ステージへの遷移をシミュレーションする部
分について述べる。ある時刻で演算ステージ遷移中に命
令が入ったとき、その命令が演算実行に何すイクル要す
るかを命令属性テーブルから引く。3サイクルであれば
、動作規則記述群中から3サイクル要する命令に対応し
て生成された「2サイクル分だけ演算実行ステージES
中にいて、3サイクル目で次ステージへ遷移することが
できることを表す信号EStoNEXTを1にする」動
作規則を選び、4サイクルであれば4サイクル要する命
令に対応して生成されたr33サイクルだけ演算実行ス
テージES中にいて、4サイクル目で次ステージへ遷移
することができることを表す信号EStoNEXTを1
にする」動作規則規則を選ぶ。 選んだ動作規則を実行した結果、適当なタイミングでそ
の命令を次のステージへ遷移することができることを表
すステージ遷移制御信号EStoNEXTがlになる。 次に、EStoNEXTの値が変わったことによってス
テージESに対応して生成されたrEstoNEXTが
値1をとっている間は、ESステージからNEXTステ
ージへの遷移を実行する」動作規則が開動されES中の
命令の遷移が実行される。 同様にして、各ステージについて命令の処理の遷移を行
ってパイプラインの処理の流れをシミュレーションする
The computer operation rule description section generation program inputs the computer specification description written by the user and generates a group of computer operation rule descriptions for simulation execution. From the designation of the stage name that makes up the pipeline, to the stage transition control signal that indicates whether the instruction being processed in each stage that makes up the pipeline can transition to the next stage, and whether it is possible to transition to the next stage. A computer operation rule description that sets the value of the stage transition control signal when a condition is satisfied, and a computer operation rule description that executes the stage transition process when the value of the stage transition control signal takes a specific value are generated. Also,
Based on the specification of the attributes of instructions processed on a computer, an operation rule description is generated that determines the conditions for the occurrence of an overhead factor that disturbs the flow of pipeline processing and describes the operation when the overhead factor occurs. for example. If there are three types of instructions: instructions that require 1 cycle, instructions that require 3 cycles, and instructions that require 5 cycles to execute an operation, the instruction enters the r operation processing stage, and the instruction is transferred to the next stage at the next timing. An operation rule description that expresses ``transition of the instruction to the next stage three cycles after an instruction enters the arithmetic processing stage,'' and an operation rule description that expresses ``transition of the instruction to the next stage three cycles after the instruction enters the arithmetic processing stage''; Three types of operation rule descriptions are generated that express "transition of the instruction to the next stage at the timing of ." For example, if stage SN specifies that there is an instruction that performs a read process from a general-purpose register, "In the instruction sequence being executed in the simulation, the previous instruction writes to the same general-purpose register. It is determined whether or not a combination of instruction sequences that causes a subsequent instruction to write to a register has been entered, and if it is determined that such an instruction sequence has been entered, the writing of the previous instruction is performed during the SN stage. An operation rule description that indicates "wait for the process to complete" is generated. The stage transition control signal name extraction routine is a stage transition control signal provided for each stage that indicates whether or not the instruction being processed in that stage can transition to the next stage in the process of generating a computer operation rule description group. Signal names, busy signal names representing the instruction processing status during the stage, and operation rule descriptions for setting the values of these signals are extracted. For example, the instruction being processed at the SN stage is S(N+1
The stage transition control signal indicating whether or not a transition to the ) stage is possible is named 5NtoS(N+1), and the busy signal indicating the instruction processing status of the SN stage is named 5Nbusy. In addition, the operation rule description that attempts to set the values of those signals is 5NtoS (N
+1). Refers to an operation rule that describes setting a certain value for 5Nbusy. The extracted stage transition control signal name and operation rule description group are used in the stage transition control signal value setting operation rule description conflict adjustment routine to ensure that the operation rules for setting the signal value do not conflict and cause an error. Used to ensure operation. Also, when the user adds a new high armor method, it is used to write an operation rule for controlling the value of this stage transition control number a. The stage transition control signal value setting operation rule description competition adjustment routine performs an operation such as setting the value of the C processing transition control signal for the operation rule description extracted by the stage transition control signal name extraction node 1-chin. When multiple descriptions occur, consider C priority and parallelism between operation rule descriptions,
Delete unnecessary action member 1, change the transition conditions to an appropriate form, and regenerate the Matomine action rules. In addition, the operation rule description added by the user when introducing and evaluating a new acceleration method is the same as the computer operation rule description group for simulation execution generated by the computer operation rule description group generation program. Even if a plurality of operation rules for setting the value of the processing transition control signal occur, similar processing is performed to ensure operation. (Embodiment) Prior to a detailed explanation of the present invention, the configuration of the entire system of a computer simulation method according to an embodiment of the present invention will be explained using FIG. 1. In FIG. 101), and from the contents of the computer configuration specification description, enter the computer operation rule description group bioacid program (1
02) generates a computer operation rule description group (t05) for simulation execution. During the generation process, a stage transition control signal name extraction routine (104) extracts a signal name (109) that controls stage transition. Using the computer operation rule description group (105) as input, the simulator program (
106) executes the simulation and outputs a stage flow graph (107) showing the transition of instruction processing at each stage of the pipeline computer and a simulation execution result trace (108) of the pipeline computer. The first feature of the present invention is that a computer model description generation program (102) generates a computer model description for simulation execution (105) based on a computer specification description (101) input by the user. Computer specification description (
101) is a computer configuration specification description (110) consisting of a computer configuration specification description (110) that specifies the stage configuration of the pipeline computer and an instruction attribute table (111) that specifies the attributes of each instruction processed by the pipeline computer. )
Now, specify the number and names of stages that make up the pipeline, the names of stages where instruction decoding, address calculation, operand reading, and operation execution processing are performed, and the number of stages for stages with queues. The instruction attribute table (111) shows the number of cycles and registers required for operation for each instruction to be processed, the name of the stage where writing to and reading from memory is performed, and the registers and memory when the instruction is processed in advance. writing to,
Specify the stage name where reading processing is performed. The user can change the pipeline configuration by changing the number of stages and the process to be performed at each stage in the computer configuration specification description (110) and generating a computer rule description group using the computer model description generation program (102). You can change it freely. In addition, the instruction attribute table (111
), the computer model description generation program (102) changes, for example, the number of cycles required to execute the operation of the instruction.
By generating a group of computer rule descriptions using , it is possible to change the arithmetic processing performance of the pipeline computer. If you change the name of the stage where registers and memory writes and reads are performed, you can change the stage and timing at which instructions are waited when an overhead factor that disturbs the flow of the pipeline occurs, and the timing can also be changed in advance. By changing the stage name where instruction processing registers, memory writing, and reading processing are performed, writing and reading processing can be performed via bypass even if an overhead factor that disrupts the flow of the pipeline occurs. It is possible to express a pipeline computer with a bypass function and the timing of its bypass. By changing the computer configuration specification description (110) as described above and generating a group of computer rule descriptions using the computer model description generation program (102), the configuration and performance of the pipeline computer can be freely changed. It is possible to evaluate pipeline computer methods. The second feature of the present invention is that a stage transition control signal value setting operation rule description conflict adjustment routine (103) and a stage transition A control signal name extraction routine (104) is provided. In the computer operation rule description (105) for simulation execution generated here, a stage transition control signal indicating whether transition of an instruction to the next processing stage is possible or not, and an instruction processing status in the stage are included. It is written to control stage transition according to the value of the busy signal. The stage transition control signal name extraction routine (104) sets the stage transition control signal name and busy signal name, which are keywords for stage transition processing, and the values of these signals in the process of generating a computer behavior description. Extract. The operating rules for setting the value of the busy signal that indicates the instruction processing status during the stage are described for each overhead factor. Also, the value is set to 1 for other stages where instructions in the stage cannot transition due to this influence. When multiple operation rule descriptions that set the same stage transition control signal and busy signal values conflict, unnecessary operation rules must be deleted or adjusted and regenerated. The stage transition control signal value setting operation rule description conflict adjustment routine (103) performs the processing based on the extracted signal name and operation rule. In addition, the same processing transition control signal is used between the behavioral description added to introduce a new high-speed method and the computer behavior rule description group for simulation execution generated by the computer behavior rule description group bioacid program. Even when multiple operation rules that set values occur, stage transition control signal value setting operation rule description conflict adjustment is performed based on the signal name and operation rule extracted by the stage transition control signal name extraction routine (104). A routine (103) performs similar processing to ensure operation. This makes it possible to automatically add new behavioral descriptions, delete unnecessary behavioral descriptions, and easily change the configuration and functions of a stage for evaluation. When there are multiple operation rules for setting the value of one stage transition control signal, the operation is guaranteed. Next, a computer simulation method according to an embodiment of the present invention will be described in detail. First, an input example of the computer specification description (101). FIG. 2 shows an output example of the computer model description for simulation execution (105) generated by the computer model description generation program (102) from the contents of the computer specification description (101). The items specified in the computer configuration specification description (110) are the number of stages, the name and order of each stage, the stage name for instruction decoding, the stage name for address conversion, and the operand read processing. The computer configuration specifications (110) include the name of the stage to perform, the name of the stage to perform the calculation, the number of calculation pitch cycles, the name of the stage with a queue, and the number of stages. 7 stages, 5O2SL, S2., S6, respectively
Name it. The stage that performs decoding is SO, and the stage that performs address calculation is si,..., stage S1.
shows a pipeline computer configuration in which there is a six-stage queue. There are two tables that describe instruction attributes: a basic instruction attribute table that describes instruction attributes that do not depend on the pipeline configuration and performance, and an instruction attribute table that describes instruction attributes that change depending on the pipeline configuration and performance. This is divided into two parts. The basic instruction attribute table, which describes instruction attributes that do not depend on pipeline configuration or performance, includes information such as instruction length, operand length, which registers to rewrite when general-purpose registers are rewritten, and floating-point registers. Describe which register to rewrite when rewriting, which register to read when reading a general-purpose register, and which register to read when reading a floating-point register. In the calculation configuration-dependent instruction attribute table that describes instruction attributes that change depending on the pipeline configuration and performance, the items specified in (IIIA) include the number of cycles required to execute an operation for each instruction, and the Food pitch number, general-purpose register, floating-point register, stage name for memory write processing, stage name for read processing, general-purpose register for pre-operation, floating-point register, stage name for memory write processing , is the stage name for performing read processing. If you want to change the configuration or function of the pipeline and evaluate it, just change the above specifications. It is possible to freely change the designation within a range that does not cause errors. (105A) shows part of the computer operation rules generated when the computer configuration specification (IIOA) and the computer configuration dependent instruction attribute table (111A in FIG. 3) are input. Here, a description will be given of an operation rule description representing an operation when a branch instruction is input to a decoding stage, and an operation rule description representing a transition of instruction processing from stage S2 to stage S3. Regarding branch instructions, ``If the instruction input to the decoding stage is a branch instruction that judges the branch condition and determines the subsequent instruction sequence, the judgment for that branch instruction is completed and the branch destination is determined. After determining the branch destination, a behavioral description group is generated to input the branch destination instruction into a decoding stage. Let SO be the stage that performs decoding. Here, we divide it into two operation rule descriptions: ``When the instruction input to the decode stage SO is a branch instruction, set the value 1 to the signal BRANCI (which has the meaning of executing the judgment process for that branch instruction).'' Operation rule description 5etBRAN
CH and “signal BRANCH is set to value 1,
And, while the branch judgment is not completed (Branch-j
(while wedge takes the value 1), inputting the instruction to the decode stage is inhibited by assigning the value O to the signal tO3O, which indicates whether it is okay to input the instruction one branch ahead to the decode stage SO. ” operation rule description toso-s
Create a uspend-Branch. Here, the behavior rule description generation program has a behavior rule "type" for generating a behavior rule description that represents the branch behavior.
S to the variable representing the stage of decoding in that "type"
The operation rule is generated by substituting O. However, the signal B that appears in the operation rule description generated here
The value of ranch-judge is also set in the operating rules of III. The stage transition process of command processing from stage S2 to stage S3 is based on the operation rule name 5etS2toS, which indicates that the stage transition is performed according to the value of the stage transition control signal.
Follow the description in 3. 52toS3 appearing in the condition part is a stage transition control signal indicating whether the instruction being processed in stage S2 is in a state where transition to the next stage S3 is possible. The name of the stage transition control signal that controls the transition from stage SX to the next stage S (X+1) is 5XtoS (
X+1). When the value of 52toS3 is 1, it indicates that a transition from stage S2 to stage S3 is possible, and the operation rule 5etS2toS3
has the meaning of ``When the value of rS2toS3 is 1, the instruction number being processed in stage S2 is immediately moved to stage S3, and the operation of resetting the instruction number in stage S2 is executed.'' Regarding the processing part in which the behavior rule description generation program (102) generates the behavior rule description (105) while referring to the computer specified description (101), the procedure is described in Section 41ii1.
Shown below. First, a computer specification description (101) is read and a computer specification content table (220) is generated (221).
The following operation rule descriptions are generated by referring to this computer specification table (220). First, the stage name SN
, a stage transition control signal, a busy signal, and a stage transition control operation rule description corresponding to each stage are generated from the queue specification Q (222). Here, the stage transition control signal name from stage SX to the next stage S(X+1) is named 5XtoS(X+1), and the name of the X stage 5X(7) busy signal is named 5Xbusy, and signals are generated for each stage. In addition, the stage transition control operation rule from stage SX to the next stage S (X+1) is as follows: ``When the processing of each instruction in stage SX and the next stage S (X+1) is completed, the transition from stage SX to the next stage stage transition control signal 5XtoS(X+
Each stage name is assigned to the type "1) to be assigned the value 1" to generate an operation rule. These are operation rule descriptions generated corresponding to each stage. Next, an operation rule representing the decoding process is generated from the stage DS for performing the decoding process and the number of decoding pitches DP for each instruction (223). for example. If there are instructions with a decoding pitch of 1 cycle and instructions with a decoding pitch of 2 cycles in the computer configuration-dependent instruction attribute table, there is an operation rule that causes the subsequent instruction to enter the decode stage in the next cycle, and a rule that causes the subsequent instruction to enter the decode stage after 2 cycles. Generate behavior rules. Here, the value of the stage transition control signal indicating that the next instruction can be input to S after X cycles after the processing of the r decode stage S is completed is set to 1.'' Then, the execution timing X of the operation to put the subsequent instruction into the decode stage and the value are assigned to the decode stage. In other words, there are two operating rules: "After the processing of the decode stage DS is completed, the signal toO3 indicating that the next instruction can be input to the decode stage in the next cycle is set to 1" and "the processing of the decode stage DS is set to 1". An operation rule is generated in which the signal toDS, which indicates that the next instruction can be input to the decode stage, is set to 1 one cycle after completion of the instruction. This is an operating rule that is generated in response to the instruction being processed. Next, an operation rule representing the calculation execution process is generated from the stage ES where the calculation execution process is performed, the calculation execution pitch number ○P, and the calculation execution cycle number OC for each instruction (224). For example, the calculation pitch ○P is 1. If there are instructions that require two cycles and instructions that require three cycles as the number oC of operation execution cycles, then the instruction in the operation execution stage S is (oc
-op+1) cycles, and the stage transition control signal from S to the next stage is set to 1 in the (oc-op)th cycle.''
By substituting C, the stage name ES that performs the operation execution process, and the value of the operation pitch OP, for an instruction that requires two cycles, we can write ``The Φ instruction during the operation execution stage ES stays in ES for two cycles.'' 3 The operation rule is ``set the stage transition control signal EStoNEXT from ES to the next stage to 1 in the 1st cycle'', and for instructions that require 3 cycles, ``The instruction in the operation execution stage ES stays in ES for 3 cycles, Stage transition control signal ES from ES to the next stage in the fourth cycle
Generate an operation rule that sets toNEXT to 1. Also,
Calculation pitch OP is 2 cycles. If there are instructions that require 2 cycles and instructions that require 3 cycles as the number of operation execution cycles, then the operation pitch is OP.
Since the number of cycles is two, the sum of the processing time for two stages, that is, the time the instruction is in the operation execution stage ES and the time the instruction is in the next stage, corresponds to the number of operation execution cycles. In this case as well, by assigning a value to the above-mentioned type, "The instruction in the operation execution stage ES stays in the ES for one cycle, and in the second cycle, the stage transition control signal EStoNEXT from ES to the next stage is sent." 1” operation rule and “
Instructions in the operation execution stage ES are E for two cycles.
Stage transition control signal ESt from ES to the next stage in the third cycle. Generate an operation rule "set NEXT to 1". (OC-1
) will be in stage ES for one cycle, and will be in the next stage of ES for one cycle. This is also an operating rule that is generated in response to the instruction being processed. Next, operating rules are generated for each overhead factor that disrupts the flow of the pipeline (225). For example, when multiple instructions flowing in the pipeline try to use the same general-purpose register, floating-point register, or memory, there are operating rules that cause a wait, or when a branch instruction is inserted. These include operating rules that cause a wait for branch judgment to complete. Here, we will explain how to generate operating rules when a conflict occurs in the use of the same general-purpose register. First, when there is an instruction that rewrites a general-purpose register, "If the instruction input to the decode stage is an instruction that rewrites a general-purpose register, register it in the rewrite instruction registration list that corresponds to each register. ” Generate behavior rules. This refers to the specification of which general-purpose register is to be rewritten for each instruction, which is specified in the basic instruction attribute table, and generates an operation rule according to the contents. When a certain instruction rewrites a general-purpose register, the instruction number must be registered in the rewrite instruction registration list for all the general-purpose registers that the instruction rewrites. Here, it is assumed that the general-purpose register to be rewritten by the instruction input to the decode stage S is R1, ..., R.
For example, in the basic instruction attribute table, only the general-purpose register OR is rewritten. For instruction ■1 specified as , an operation rule is generated that says, ``When instruction 1 is input to decode stage S, register the instruction number of Il in the rewriting instruction registration list for general-purpose register OR.'' . For the instruction ■2 that rewrites the general register number GR and the (GR+1)th, "When the instruction I2 is input to the decode stage S, the instruction number of I2 is ORed with the general register and (
"Register in the rewrite command registration list for GR+1)" operation rule is generated. These are operation rules that are generated in response to the attributes of the instruction. Next, "Instruction A that rewrites a general-purpose register is registered when the rewriting is not completed (when instruction A satisfies the conditions that allow the transition from the general-purpose register write stage of instruction A to the next stage)." Generates an operation rule "Deleting instruction A that occurred from the rewrite instruction registration list." Specify a set of general-purpose registers to be rewritten for each instruction in the basic instruction attribute table and calculate #! Refers to the general-purpose register write stage name in the configuration-dependent instruction attribute table and generates an operation rule according to its contents. Here, it is assumed that the instruction in general-purpose register write stage S has finished processing in stage S, and the general-purpose register to be rewritten by the instruction is R.
1, , , , RX, the instruction number is R1, ,
, , , ``Delete from the RX rewrite instruction registration list'' type is available. For example, for instruction 11 where the general-purpose register write stage is 85 and only the general-purpose register number GR is specified to be rewritten, "When the processing of instruction 1 is completed at stage S5, OR the instruction number of I1. ``Delete from the rewrite instruction registration list'' operation rule is generated. Furthermore, when the general-purpose register write stage is 85, and for instruction ■2 that rewrites the general-purpose register number GR and the (GR+1)th (
"Delete from the rewrite command registration list for GR+1)" operation rule is generated. This behavior rule description is. These are operation rules that are generated in response to the attributes of an instruction. Next, ``If instruction A is an instruction that reads a general-purpose register, and instruction B that attempts to rewrite the register it is trying to read is not input before instruction A, (because it is possible to read a general-purpose register, Since the processing can be completed and the transition can be made to the next stage, an operation rule is generated that reads the instruction A from the general-purpose register and sets the value of the stage transition control signal from stage GR to the next stage to 1. Here, ``When instruction I, which is the general-purpose register read stage SXI, has finished processing in stage SXI and the instruction is an instruction to read general-purpose registers R1, ..., RX, R1, ... , if the number of the instruction input before instruction A does not remain in the RX rewrite instruction registration list, set the value of the stage transition control signal from general register read stage SX2 of instruction A to the next stage to 1. For example, the general register read stage is 84. For instruction 11 that reads only the general-purpose register number OR, "instruction 1 at stage S4" is required.
If the processing of step 1 has been completed and the number of the instruction input before instruction step 1 does not remain in the OR rewrite instruction registration list, the value of the stage transition control signal 54toNEXT from stage S4 to the next stage 1. Also, the general register read stage is 84. For the instruction to read the general-purpose register number OR and the (GR+1) 1%, the processing of instruction 11 in r stage S4 has been completed, and the instruction is in the rewrite instruction registration list for GR and (GR+1). If there is no remaining instruction number input before 11, an operation rule is generated that sets the value of the stage transition control signal 54toNEXT from stage S4 to the next stage to 1. The operation rules generated here are operation rules generated in accordance with the attributes of the instruction. Furthermore, the value of the stage transition control signal 52toS3 in the 20th computer operation rule description (105A) is the value of 52busy representing the processing status of the instruction being processed in stage S2, and the value of 52busy indicating the processing status of the instruction being processed in stage S2 and later. This is determined by the value of 5Xbusy, which represents the processing status of the current instruction. The fact that 52busy takes the value 1 indicates that the processing of the instruction being processed in S2 cannot be completed. Here, the reason why we consider the situation of a certain SX after stage S2 is because even though the processing at stage S2 has finished, the processing at the stage Sx where the transition destination is has not finished. This is because even if the instruction processing has been completed, if the processed instruction cannot transition, the transition must be suppressed. FIG. 5 shows an algorithm for generating an operation rule description that sets the value of 5Nbusy that represents the processing status of the instruction being processed at stage SN, and FIG. 7 shows an algorithm for generating an operation rule description that determines the value of the stage transition control signal 52toS3. As shown in the figure. The procedure for generating an operation rule description for setting the value of 5Nbusy will be explained using FIG. The first factor that makes the value of 5Nbusy 1 is the stage S
The problem is that the processing of the instruction being processed at N is not completed, and an overhead factor occurs that causes a wait at SN. For example, the instruction being processed in S2 is an instruction to read the contents written in the memory, and the stage in which the reading process is performed from the memory is S2.
If the instruction that appeared before the instruction in S2 writes to the same address in the memory that the instruction in S2 is trying to read, if the write process has not finished, The instruction in stage S2 does not transition to stage S3 and must wait in S2 until the writing is completed. The operation rule is written so that the value of the busy signal 52busy representing the processing status of the instruction in stage S2 is set to 1 while waiting occurs in stage S2. This overhead factor that causes conflicts between writing and reading to the same memory address is called a memory conflict.In addition to memory conflicts, there are other overhead factors that disrupt the flow of pipeline processing, including general-purpose registers. Operand conflicts where writes and reads to each floating-point register conflict, address calculation register conflicts that occur when writing to registers required for address calculation for subsequent instructions is not completed, computational performance overhead, and branching. There are multiple overhead factors, such as overhead factors. Create an operation rule description for setting a busy signal for a stage that causes a wait for each overhead factor (301)
. The second factor that makes the value of 5Nbusy 1 is the stage S
The processing of the instruction being processed in stage N has finished, but the processing of the instructions being processed in stages S(N+1) to S(N+x) has not finished, or for some reason the processing has not been completed in the next stage. Since the transition is not possible, the instruction in stage SN is also unable to transition to the next stage S(N+1). The value of x is the value of the calculation execution pitch of the stage configuration. For each stage, an operation rule description is created that causes a wait due to the influence of other stages and sets a busy signal (302). As mentioned above, if there are multiple overhead factors and it is defined that the stages where waiting occurs when the overhead factors occur are the same, then the operation rule description sets the value of the busy signal of the same stage. may be generated multiple times. However, if multiple operation rule descriptions conflict during simulation execution, an error will occur and the operation will not be guaranteed. Therefore, it is necessary to adjust those operation rule descriptions. If there are multiple overhead factors that cause wait times in the same stage, and if even one of the overhead factors occurs and remains unresolved, the instruction being processed in that stage will be transferred to the next stage. It is not possible to transition to Stage transition becomes possible only when all factors are resolved. Therefore, if the overhead detection condition is satisfied for even one of the plurality of operation rule descriptions, an operation rule is added that sets the value of the busy signal to 1 (303). Depending on the stage, there may be no overhead factors that would cause a wait in that stage. An operation rule description for setting the value of the busy signal is not generated for that stage. An example is shown in FIG. 6. First, an operation rule description is generated in which stage transition is suppressed due to each overhead factor. For example, the condition part of the operation rule that describes the conditions for the occurrence of a memory conflict and the behavior when one occurs is ``The memory address that the previous instruction is trying to write to and the memory address that the following instruction is trying to read from are overlapped” and
The action part that is executed when the condition part is satisfied has the meaning of ``wait for the end of processing at the stage where the subsequent instruction reads.'' Here, liver M appearing in the conditional part
ORY-READ-5USPEND has a value of 1 when a conflict occurs in memory write/read processing.
This is a signal to take. At this time, it is written that the value of 52busy is set to 1 in the operation unit in order to cause a wait at stage S2 where the subsequent instruction is read from the memory (403). Next, it is registered that an operation rule that attempts to set the value of 52busy has been generated. In addition, for overhead factors other than memory conflicts, operation rules are similarly generated to set the value of the busy signal corresponding to the stage name where waiting occurs. Here, due to other overhead factors Xx, S2
Assume that an operation rule description (404) is generated that causes a wait in , and sets 52busy to 1. This is 52bus
Register to y. After operation rules are generated for all overhead factors, operation rules are generated for stages where waiting occurs due to the generation of busy signals due to those overheads. In this example, assuming that the calculation execution pitch is specified as 2 cycles, an operation rule (405) must be generated that sets the value of 52busy to 1 while the value of 54busy is 1. Similarly, the operation rules are also registered in 52busy. Thereafter, for each busy signal, a plurality of operation rules that attempt to set its value are examined. In this example, multiple behavior rules that attempt to set the value of 52busy are generated, so if the conditional expression of any of the behavior rule descriptions is satisfied, a behavior rule description such that 52busy takes the value 1 is created. must be generated and added. First, 52bu due to memory conflict
The operation part of the operation rule description for setting sy is replaced with an operation rule (406) that sets 52 busyl. Next, regarding the other overhead-based operation rule description, the operation section is replaced with an operation rule (407) that sets 52busy2. The behavior part of the behavior rule description generated by taking into account the influence of 54busy is the behavior rule (408) that sets 52busy3.
). Furthermore, 52busyl, 52b
usy2. While any of 52busy3 takes the value 1, the operation rule description (4
Create an operation rule description that sets the value of 52busy by adding 09) to 0 or more. At this time, the condition part of the operation rule (409) contains two operation rules (406),
Logically OR the conditional parts of (407) and (408) together.
I'm also thinking of ways to get it. However, if these are combined into one, it becomes impossible to determine from the simulation result trace data which overhead factor caused the wait in Stenigi S2. Therefore, in order to make this determination possible, I decided to add an operation rule (409) that sets 52busy to 1 if either of these conditions holds true. Also, at the same time, 52busy
The above is registered as a behavioral description for setting . FIG. 8 shows an example of generating an operation rule description for setting the value of a stage transition control signal. As mentioned above, for example, the value of the stage transition control signal 52toS3 is the value of 52busy,
It is set by the value of 5Xbusy of a certain stage SX after S2. For example, in a pipeline computer configuration in which stage S5 is a stage for executing operations and the operation execution pitch is specified as 2 cycles, suppose that the instruction in S5 is an instruction that requires 4 cycles to execute. The instruction immediately after that waits in stage S3 for the completion of execution of the instruction in step 85, and at the same time as the end of the execution and transition to step S6, the instruction in step S3 transitions to step 84. In other words, while the instruction in stage S5 is being executed, the value of 53toS4 must be set to O. Therefore, the value of 53toS4 must be set to 1.
In order to do this, in addition to the fact that the instruction in stage S3 has finished executing (S3busy is O), 5
It is necessary to determine whether the value of 5busy is O (601). This is the stage where stage S5 executes calculations, and if the PR calculation execution pitch is specified as 1 cycle, the value of 53toS4 is 53bus
It is determined by the values of y and 54busy. The value of 55busy has an influence when setting the value of 54toS5. (602). In addition, stage S5 is a stage for performing calculations, the calculation execution pitch is 2 cycles, and there is an overhead factor that causes waiting in stage S4.
When an operation rule that sets the value of
sy is O), the instruction in stage S4 has finished execution (S4busy is O), and the instruction in stage S5 has finished execution (the value of S5busy is O). (603). In addition, stage S5 is a stage for performing calculations, the calculation execution pitch is 2 cycles, and stage S4 has 3 queues.
If there is one stage, each queue has 540.
S41. S42, but even if the instruction in S5 is being executed, S40. S41. If there are no instructions waiting for transition in any of the queues in S42, it is possible to transition from S3 to S54. Therefore, 53to
In order to set the value of S4 to 1, first, the instruction in stage S3 must have finished executing (S3busy is O), and all queue stages of stage S4 must have no instructions waiting for transition ( (There is no instruction in S42), or all queue stages of stage S4 contain instructions waiting for transition (there is an instruction in S42), but
The instruction in 5 has finished executing (S5busy is O
) is determined (604). The procedure for generating a stage transition control signal setting rule will be explained using FIG. 7, taking stage transition control from S2 to S3 as an example. Let the number of calculated pitches be N (501), basically, rS
2busy takes the value O, and S(2+N)busy
When S2t takes the value 0, transition to the next stage S3 is possible for the instruction in stage S2, so S2t. "set the value of S3 to 1" (502), if there is an overhead factor that causes a wait in stage sx between the next stage S3 and S(2+N), rSXbusy is set as one condition. "S3busy must take the value 0" is added (503). Also, when S3 has a queue, "rS3busy must take the value 0" is deleted from the condition part, and the instruction waiting for transition is added to all queue stages. is not included, or if it is, 53b
"usy takes the value O, and 54busy takes the value O" is added (504). According to the above procedure, an operation rule description for setting the value of the stage transition control signal is generated. As described above, the computer operation rule description generation program executes the stage transition control signal name extraction routine and the stage transition control signal M setting operation rule description conflict adjustment routine for the stage configuration designation and instruction attribute table input by the user. This is used to generate a set of computer operation rule descriptions for simulation execution. Furthermore, when changing the number of stages of the pipeline or changing the description of the computer model in consideration of performance improvement, the write and read stages of GPR, FPR, and MEMORY in the instruction attribute table, and the number of cycles required for instruction execution. etc., and then regenerate the computer operation rule description for simulator execution using the computer model description generation program. Further, FIG. 9 shows an algorithm when adding an operation rule description to introduce a new speed-up method. When adding an operation rule description to introduce a new speed-up method, the stage transition control signal extracted by the stage transition control signal extraction routine. Add an operation rule written to set the value of the busy signal to the operation rule description group. When operation rule descriptions attempting to set the same signal conflict due to the addition, the stage transition control signal value setting operation rule description conflict adjustment routine regenerates the operation rule description in the same way as the above procedure. At this time, the behavior rule description that will be replaced by the new speed-up method is deleted from the behavior rule description group. The flow of processing performed when inputting the operation rule description generated as described above and executing a simulation of the transition of instruction processing in a pipeline computer will be described. Since it simulates the processing flow of a pipeline computer,
Processing in each stage is performed in parallel even at one time. Stage transition control that refers to the attributes of each instruction in each stage from the instruction attribute table, selects and executes the operation rule description to be expanded, and, as a result, inhibits the transition from that stage to the next stage. While the value of the signal is O, the transition to the next stage is inhibited, and when the value becomes 1, the transition to the next stage is executed. In other words, when an instruction transitions at each stage, the attributes of that instruction are referred to from the instruction attribute table and the operation rule description generated corresponding to the instruction is selected.
The procedure is to execute the operation rule description to determine the value of the stage transition control signal, and then execute the operation rule description generated corresponding to the stage to perform stage transition. For example, a part will be described in which the transition from an operation stage to the next stage is simulated by an operation execution cycle for each instruction. When an instruction is entered during a calculation stage transition at a certain time, the number of cycles required for that instruction to execute the calculation is subtracted from the instruction attribute table. If it is 3 cycles, the ``operation execution stage ES for 2 cycles'' is generated corresponding to an instruction that requires 3 cycles from the operation rule description group.
"Set the signal EStoNEXT to 1, which indicates that it is possible to transition to the next stage in the 3rd cycle." If the operation rule is 4 cycles, the operation is performed in r33 cycles, which is generated in response to an instruction that requires 4 cycles. The signal EStoNEXT, which indicates that the execution stage ES is in progress and can transition to the next stage in the fourth cycle, is set to 1.
Select the action rule that you want to use. As a result of executing the selected operation rule, the stage transition control signal EStoNEXT, which indicates that the instruction can be transitioned to the next stage at an appropriate timing, becomes l. Next, while rEstoNEXT generated corresponding to stage ES takes the value 1 due to the change in the value of EStoNEXT, the operation rule ``executes the transition from the ES stage to the NEXT stage'' is activated and during ES instruction transition is executed. Similarly, the processing flow of the pipeline is simulated by transitioning the instruction processing for each stage.

【発明の効果】【Effect of the invention】

ユーザは、計算機動作規則記述群生成プログラムがシミ
ュレーション実行用の計算機動作規則記述群を生成する
ために必要な、計算機構成指定記述とテーブル形式で記
述された命令属性を入力すればよい、入力となる記述量
が、計算機動作規則記述を直接記述するのに比べ、訳4
0分の1程度に減少した。 ステージ遷移制御信号名抽出ルーチンは、計算機動作規
則記述群を生成する過程で、各ステージごとに備えられ
るそのステージで処理中の命令が次ステージへ遷移が可
能な状態か否かを表すステージ遷移制御信号名と、ステ
ージ中の命令処理状況を表すビジー信号名、及び、それ
らの信号の値を設定しようとする動作規則記述を抽出す
る。抽出されたステージ遷移制御信号名と動作規則記述
をもとに、ステージ遷移制御信号値設定動作規則記述競
合調整ルーチン中で、その信号の値を設定する動作規則
が競合してエラーを起こすことがないよう、動作規則を
調整して、不要な動作規則を削除し、必要な動作規則に
ついては調整を行って生成しなおした記述を追加するこ
とで動作を保障することができる。また、ユーザが新た
な高速化方式を追加して評価を行う際には、このステー
ジ遷移制御信号の値を制御するような動作規則を記述す
ればよいので、高速化方式の追加の記述が容易であり、
効率が良い。 ステージ遷移制御信号値設定動作規則記述競合調整ルー
チンは、ステージ遷移制御信号名抽出ルーチンが抽出し
た動作規則記述について、同一の処理遷移制御信号の値
を設定するような動作規則記述が複数発生した場合には
、優先順位や並列性を考慮して、不必要な動作規則の削
除、及び、動作規則の調整を行う。また、ユーザが新た
な高速化方式を導入して評価する際に追加記述した動作
規則記述と、計算機動作規則記述部生成プログラムが生
成したシミュレーション実行用の計算機動作規則記述群
との間で、同一の処理遷移制御信号の値を設定するよう
な動作規則が複数発生した場合にも、動作を保障するた
めに同様の処理を行う。 動作を保障するとともに、モデル再構成の効率を向上す
る。
The user only needs to input the computer configuration specification description and instruction attributes written in table format, which are necessary for the computer operation rule description group generation program to generate a computer operation rule description group for simulation execution. The amount of description is reduced compared to directly writing computer operation rule descriptions.
It decreased to about 1/0. The stage transition control signal name extraction routine is a stage transition control signal provided for each stage that indicates whether or not the instruction being processed in that stage can transition to the next stage in the process of generating a computer operation rule description group. Signal names, busy signal names representing the instruction processing status during the stage, and operation rule descriptions for setting the values of these signals are extracted. Based on the extracted stage transition control signal name and operation rule description, in the stage transition control signal value setting operation rule description conflict adjustment routine, it is determined that the operation rules for setting the value of the signal may conflict and cause an error. In order to avoid this, the operation can be guaranteed by adjusting the operation rules, deleting unnecessary operation rules, and adding the adjusted and regenerated descriptions of the necessary operation rules. In addition, when the user adds and evaluates a new speed-up method, it is easy to add a speed-up method because the user only needs to write an operation rule that controls the value of this stage transition control signal. and
Good efficiency. The stage transition control signal value setting operation rule description conflict adjustment routine adjusts the operation rule descriptions extracted by the stage transition control signal name extraction routine when multiple operation rule descriptions that set the same processing transition control signal value occur. In order to do so, delete unnecessary operation rules and adjust operation rules, taking into consideration priorities and parallelism. In addition, the operation rule description added when the user introduces and evaluates a new acceleration method is the same as the computer operation rule description group for simulation execution generated by the computer operation rule description generation program. Even if a plurality of operation rules for setting the value of the processing transition control signal occur, similar processing is performed to ensure operation. It guarantees operation and improves the efficiency of model reconstruction.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明の全体システム構成図、第2図は、計
算機動作規則記述生成プログラムの入力例と、出力とな
る計算機動作規則記述の例、第3図は、命令属性テーブ
ルの例、第4図は、計算機動作規則記述生成プログラム
が、ユーザの入力した内容を参照して動作規則記述を生
成する処理の手順、第5図は、ビジー(SNbusy)
信号の値を設定する動作規則記述生成のアルゴリズム、
第6図は、ビジー信号(SNbusy)の値を設定する
動作規則記述生成の例、第7図は、ステージ遷移制御信
号の値を設定する動作規則記述生成のアルゴリズム、第
8図は、ステージ遷移制御信号の値を設定する動作規則
記述生成の例、第9図は、新たな高速化方式を導入する
ために動作規則記述を追加す〔シ王〕 5P(:tテDE−−一 ン「/\゛コードMNEF7
 −−− ニー七ニッ7 5C−−−−ラ更j1実2テに曽13プ47+しt7D
P   −−−−テ゛′コート乙゛ヅfiZew  −
−−−:A閉しジ゛ヌタヘ0τさ込hスデーシOR−−
−−う    *′SO訛)−P出しス7−シ゛FW 
 −−−−シ3事刀・]・4乙そ1.レンスタヘ17)
畜】込hステーシーF/?  −−−一       
      カゝろの審えみ庄しステーン゛MW  −
−−一  メLソへの省!込hステージ゛t’lk  
−−−−t  カ゛らOもた1出レスデージ。 Pθpシ′−−一−ラ【1行ン察算8)の刀1困しジス
7への1き込みステージ”Pθ/? −−−一    
                寸゛らの寥是Jf出
しステーシPFW −−−一            
   二)軸中1丈、モ、レジ゛スフへの省?込みステ
ージ゛PF/?  −−−一            
            力゛うΦ喜売hホレステーシ
PMW−−−−メ乞ソへの14込みステージpm−−−
−            力゛l7(7IRh *レ
スヲーシIJ 蔓 図 茎7図 第 ? 図 第
FIG. 1 is an overall system configuration diagram of the present invention, FIG. 2 is an example of input to a computer operation rule description generation program and an example of an output computer operation rule description, and FIG. 3 is an example of an instruction attribute table. FIG. 4 shows the processing procedure in which the computer operation rule description generation program generates an operation rule description by referring to the contents input by the user.
Algorithm for generating behavior rule descriptions that set signal values;
FIG. 6 shows an example of generating an operation rule description that sets the value of a busy signal (SNbusy), FIG. 7 shows an algorithm for generating an operation rule description that sets the value of a stage transition control signal, and FIG. 8 shows a stage transition An example of generating an operation rule description for setting the value of a control signal, FIG. 9, shows how an operation rule description is added to introduce a new high-speed method. /\゛Code MNEF7
--- Knee 7 ni 7 5C---- La change j1 fruit 2 te so 13 pu 47+ and t7D
P ---
---: A close bolt inserts 0τ into H slide OR--
--U *'SO accent)-P out 7-shiFW
-----Shi 3 things sword]・4 Otsuso 1. Leinstaje17)
Animal】include h Stacey F/? ---One
Caro's Judgment Stain゛MW -
---One Ministry to MeLSo! Include h stage ゛t'lk
-----t One response from each other. Pθpshi′--1-ra [1 line and calculation 8)'s sword 1 troubled Jisu 7 stage ``Pθ/? ---1
The real thing is Jf exit station PFW ---1
2) Ministry of the middle length, mo, and cash register? Including stage PF/? ---One
Powerful Φ Kice h Horestasi PMW --- 14-inclusive stage pm to Megashio ---
- Power ゛l7 (7IRh *Reswoshi IJ Vines stem 7th figure? Fig.

Claims (1)

【特許請求の範囲】 1、パイプライン計算機の処理動作を条件部と動作部か
らなる動作規則記述で表して、条件部の条件式を判定し
成立した時に動作部の代入文を実行する計算機シミュレ
ーション方法において、パイプラインを構成するステー
ジの数とそれぞれのステージでの処理区分、計算機で実
行される各命令についての演算に要するサイクル数とレ
ジスタ、メモリへの書き込み、読みだし処理が行われる
ステージ名を入力として、命令処理がパイプライン計算
機を構成するステージ間を遷移する条件と条件成立時の
動作を表す計算機動作規則群を生成し、該計算機動作規
則群を入力してパイプライン計算機を構成するステージ
間の命令遷移のシミュレーションを実行することを特徴
としたシミュレーション方法。 2、請求項1記載の計算機シミュレーション方法におい
て、 パイプラインを構成する各ステージに対応して生成され
るステージ間の遷移条件判定と遷移を行うステージ対応
動作規則記述と、パイプライン計算機で処理される命令
に対応して命令対応動作規則記述を生成し、投入された
命令の属性によって使用する命令対応動作規則記述を決
定し該動作規則を動作させ、さらに該動作規則を動作さ
せたことによって使用するステージ対応動作規則記述を
決定し該動作規則を動作させてステージ間の命令遷移の
シミュレーションを実行することを特徴としたシミュレ
ーション方法。 3、請求項1記載の計算機シミュレーション方法におい
て、 パイプラインを構成する各ステージで処理中の命令が次
ステージへ遷移が可能な状態か否かを表すステージ遷移
制御信号と、次ステージへの遷移が可能な条件を満たし
た時に該ステージ遷移制御信号の値を設定する計算機動
作規則と、該ステージ遷移制御信号の値が特定の値をと
った時にステージ遷移処理を実行する計算機動作規則と
を生成して、シミュレーション時には該ステージ遷移制
御信号の値を判定してパイプライン計算機を構成するス
テージ間の命令遷移のシミュレーションを実行すること
を特徴としたシミュレーション方法。 4、請求項2記載の計算機シミュレーション方法におい
て、 動作規則記述群からパイプラインを構成する各ステージ
で処理中の命令が次ステージへ遷移が可能な状態か否か
を表すステージ遷移制御信号名を抽出し、抽出された該
ステージ遷移制御信号の値を設定する動作規則が複数存
在するときには一つの動作規則記述に合成し不要になっ
た動作規則記述を削除して計算機規則記述を生成しなお
し、該計算機動作規則記述群を入力してパイプライン計
算機を構成するステージ間の命令遷移のシミュレーショ
ンを実行することを特徴としたシミュレーション方法。
[Claims] 1. A computer simulation in which the processing operation of a pipeline computer is expressed by an operation rule description consisting of a condition part and an action part, and the conditional expression in the condition part is judged and when the conditional expression is satisfied, the assignment statement in the action part is executed. In the method, the number of stages that make up the pipeline and the processing divisions in each stage, the number of cycles and registers required for calculation for each instruction executed by the computer, and the stage name where writing and reading processing to memory is performed. As input, a group of computer operation rules representing conditions for instruction processing to transition between stages configuring a pipeline computer and operations when the conditions are met is generated, and the group of computer operation rules is input to configure a pipeline computer. A simulation method characterized by executing a simulation of instruction transition between stages. 2. The computer simulation method according to claim 1, comprising: a stage-corresponding operation rule description for determining transition conditions and making a transition between stages, which is generated corresponding to each stage constituting the pipeline, and which is processed by a pipeline computer. Generates an instruction-corresponding operation rule description in response to an instruction, determines the instruction-corresponding operation rule description to be used according to the attributes of the input instruction, operates the operation rule, and uses the operation rule by operating the operation rule. A simulation method characterized by determining a stage-compatible operation rule description and operating the operation rule to simulate instruction transition between stages. 3. In the computer simulation method according to claim 1, a stage transition control signal indicating whether or not an instruction being processed in each stage constituting the pipeline is in a state where it is possible to transition to the next stage; Generates a computer operation rule that sets the value of the stage transition control signal when possible conditions are met, and a computer operation rule that executes the stage transition process when the value of the stage transition control signal takes a specific value. A simulation method characterized in that during simulation, the value of the stage transition control signal is determined to execute a simulation of instruction transition between stages constituting a pipeline computer. 4. In the computer simulation method according to claim 2, extracting a stage transition control signal name indicating whether an instruction being processed in each stage constituting the pipeline is in a state where it is possible to transition to the next stage from the operation rule description group. However, if there are multiple operation rules that set the value of the extracted stage transition control signal, the computer rule description is regenerated by combining them into one operation rule description and deleting the operation rule descriptions that are no longer needed. A simulation method characterized by inputting a group of computer operation rule descriptions and executing a simulation of instruction transition between stages constituting a pipeline computer.
JP26491489A 1989-10-13 1989-10-13 Computer simulation method Pending JPH03127133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26491489A JPH03127133A (en) 1989-10-13 1989-10-13 Computer simulation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26491489A JPH03127133A (en) 1989-10-13 1989-10-13 Computer simulation method

Publications (1)

Publication Number Publication Date
JPH03127133A true JPH03127133A (en) 1991-05-30

Family

ID=17409961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26491489A Pending JPH03127133A (en) 1989-10-13 1989-10-13 Computer simulation method

Country Status (1)

Country Link
JP (1) JPH03127133A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100468472B1 (en) * 2002-09-30 2005-01-27 삼성전자주식회사 Outdoor unit of air conditioner
JP2007040604A (en) * 2005-08-03 2007-02-15 Mitsubishi Electric Corp Outdoor unit of air conditioner

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100468472B1 (en) * 2002-09-30 2005-01-27 삼성전자주식회사 Outdoor unit of air conditioner
JP2007040604A (en) * 2005-08-03 2007-02-15 Mitsubishi Electric Corp Outdoor unit of air conditioner

Similar Documents

Publication Publication Date Title
Zimmermann The MIMOLA design system: A computer aided digital processor design method
US8533642B1 (en) Hardware definition language generation for frame-based processing
US20160299998A1 (en) Logic circuit generation device and method
US8904367B1 (en) Auto pipeline insertion
JP2008176453A (en) Simulation device
JPH0348536B2 (en)
JP4204039B2 (en) Behavioral synthesis system, behavioral synthesis method, control program, readable recording medium, logic circuit manufacturing method, and logic circuit
Shapiro Validation of a VLSI chip using hierarchical colored Petri nets
Bhagwati et al. Automatic verification of pipelined microprocessors
JP3274036B2 (en) Method and apparatus for automatically generating an operation model of a processor and a test instruction sequence for logic verification
Amellal et al. Scheduling of a control data flow graph
JPH03127133A (en) Computer simulation method
JP3318051B2 (en) Translation processing method
JP2000268074A (en) Device and method for automatically generating verification program and device and method for automatically generating property
JP2007018313A (en) Circuit design program, circuit design device and circuit design method
JPH02176938A (en) Machine language instruction optimizing system
JP3108215B2 (en) Pipeline control mechanism generation apparatus and control mechanism generation method
JPH0588912A (en) Multiprocessor simulator
JP3246668B2 (en) Parallel processing program compilation device
JP3705367B2 (en) Instruction processing method
JP2002318689A (en) Vliw processor for executing instruction with delay specification of resource use cycle and method for generating delay specification instruction
JP2001022808A (en) Logic circuit reducing device, method and device for logic simulation
JP3394353B2 (en) Machine instruction scheduling device
Iwashita et al. Behavioral design and test assistance for pipelined processors
CN117453289A (en) Microprocessor, integrated circuit and electronic equipment without pipeline cavitation