JPH0361211B2 - - Google Patents

Info

Publication number
JPH0361211B2
JPH0361211B2 JP16463584A JP16463584A JPH0361211B2 JP H0361211 B2 JPH0361211 B2 JP H0361211B2 JP 16463584 A JP16463584 A JP 16463584A JP 16463584 A JP16463584 A JP 16463584A JP H0361211 B2 JPH0361211 B2 JP H0361211B2
Authority
JP
Japan
Prior art keywords
vector
instruction
instructions
scalar
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP16463584A
Other languages
Japanese (ja)
Other versions
JPS6143347A (en
Inventor
Tatsumi Hayashi
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP16463584A priority Critical patent/JPS6143347A/en
Publication of JPS6143347A publication Critical patent/JPS6143347A/en
Publication of JPH0361211B2 publication Critical patent/JPH0361211B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Complex Calculations (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は電子計算機のシミユレーシヨン方法に
係り、特にスカラユニツトとベクトルユニツトと
に処理が分かれているベクトルプロセツサにおけ
るベクトル命令シミユレーシヨン方法に関するも
のである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a simulation method for an electronic computer, and particularly to a vector instruction simulation method in a vector processor whose processing is divided into a scalar unit and a vector unit. .

〔従来の技術と問題点〕[Conventional technology and problems]

ベクトルプロセツサは、いわゆるスカラ命令を
処理するスカラユニツトと、一度に大量のデータ
を処理するベクトル命令を処理するベクトルユニ
ツトとからなり、スカラユニツトには、一般に汎
用電子計算機が用いられている。このため、ベク
トルプロセツサを開発中であるときなどには、ス
カラユニツトは存在しているが、ベクトルユニツ
トは未だ存在していないことがある。
A vector processor consists of a scalar unit that processes so-called scalar instructions and a vector unit that processes vector instructions that process a large amount of data at once, and a general-purpose computer is generally used for the scalar unit. For this reason, when a vector processor is being developed, a scalar unit may exist, but a vector unit may not yet exist.

このような状態のときでも、一般にベクトルプ
ロセツサ用のプログラム開発、ハードウエアの開
発に並行して進められており、該プログラムの早
期デバツグが望まれる。また、ベクトルプロセツ
サの設計確認も早期に実施する必要がある場合が
ある。このため、従来これらのことをソフトシミ
ユレータを用いて行うことがなされている。
Even in such a situation, program development for vector processors and hardware development are generally progressing in parallel, and early debugging of the programs is desired. In addition, it may be necessary to confirm the design of the vector processor at an early stage. For this reason, conventionally these things have been done using a software simulator.

第3図は従来のシミユレーシヨン方法の例を示
している。
FIG. 3 shows an example of a conventional simulation method.

従来のシミユレーシヨン方法では、シミユレー
シヨン対象命令を検出すると、いわゆるスーパバ
イザコール命令(SVC命令)またはモニタコー
ル命令(MC命令)のようにシステム割込みを用
い、割込みコードからシミユレートする命令を判
別して、その命令のシミユレートを行つていた。
即ち、例えば第3図図示の如く、予めSVCコー
ドの登録等を行つておき、シミユレート対象の命
令を例えばアセンブラ・マクロ等を用いてSVC
命令に変換する。そして、イニシヤルデータの設
定等のプログラムの実行準備を行い、プログラム
実行おいてSVC割込みが発生したならば、シミ
ユレータ内でSVC割込みコードを調べ、登録さ
れた各割込みコードに対応するシミユレーシヨン
を実行する。その後、システム制御部を介して
SVC割込み地点に復帰する。
In conventional simulation methods, when an instruction to be simulated is detected, a system interrupt such as a supervisor call instruction (SVC instruction) or monitor call instruction (MC instruction) is used, the instruction to be simulated is determined from the interrupt code, and that instruction is executed. was conducting a simulation.
That is, for example, as shown in Figure 3, the SVC code is registered in advance, and the instructions to be simulated are written to the SVC using an assembler macro, etc.
Convert to instructions. Then, prepare for program execution such as setting initial data, and if an SVC interrupt occurs during program execution, check the SVC interrupt code in the simulator and execute the simulation corresponding to each registered interrupt code. . Then, through the system control unit
Return to SVC interrupt point.

このような従来の方法であると、シミユレーシ
ヨンがシステム割込み処理となり、シミユレーシ
ヨンを行うスカラ命令群による処理ルーチンが、
オペレーテイング・システムと同等の取り扱いと
なり、システムとの通信に複雑な手続きが必要と
なるという問題がある。また、システム割込みを
利用したとき、SVC割込みおよびMC割込みの割
込みコードを各命令毎に、全て登録しなければな
らないという欠点や、シミユレーシヨン対象のプ
ログラムの命令を予めSVC命令等に変換しなけ
ればならないという欠点がある。
In this conventional method, the simulation becomes system interrupt processing, and the processing routine using a group of scalar instructions that performs the simulation is
There is a problem in that it is treated in the same way as an operating system and requires complicated procedures to communicate with the system. In addition, when using system interrupts, there is a drawback that all interrupt codes for SVC interrupts and MC interrupts must be registered for each instruction, and the instructions of the program to be simulated must be converted into SVC instructions etc. in advance. There is a drawback.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記問題点の解決を図り、シミユレー
ト時間の短縮および複雑なシステムとの通信手続
きの簡単化を可能とするため、SVC命令等によ
るシステム割込みを利用せず、プログラム例外割
込みを利用する。そして、スカラ命令はスカラユ
ニツト上で実行し、ベクトル命令は、スカラユニ
ツトにおけるプログラム例外により、スカラユニ
ツト上で実行されるスカラ命令に展開したソフト
シミユレータに制御を移行して実行するようにし
ている。即ち、本発明のベクトル命令シミユレー
シヨン方法は、スカラユニツトとベクトルユニツ
トとからなるベクトルプロセツサにおいて実行さ
れる命令のシミユレーシヨン方法であつて、シミ
ユレートモードのときにベクトル命令を識別して
プログラム例外割込みを生じさせる手段と、各ベ
クトル命令の処理を各一連のスカラ命令群によつ
て擬似するソフトシミユレータとを設け、シミユ
レートモードのもとでベクトル命令とスカラ命令
とからなるプログラムを実行するとき、スカラ命
令をそのまま上記スカラユニツト上で実行するよ
うにし、ベクトル命令についてはプログラム例外
割込みとした上記ソフトシミユレータに制御を移
行するようにし、上記ソフトシミユレータは割込
みアドレスに基づいて割込んできたベクトル命令
種別を判別し、判別したベクトル命令を擬似する
上記スカラ命令群を実行するようにしたことを特
徴としている。以下、図面を参照しつつ、実施例
に従つて説明する。
The present invention aims to solve the above problems and makes it possible to shorten simulation time and simplify communication procedures with complex systems by using program exception interrupts instead of using system interrupts such as SVC instructions. Then, scalar instructions are executed on the scalar unit, and vector instructions are executed by transferring control to the software simulator, which is expanded to a scalar instruction that is executed on the scalar unit, due to a program exception in the scalar unit. There is. That is, the vector instruction simulation method of the present invention is a method for simulating instructions executed in a vector processor consisting of a scalar unit and a vector unit, and identifies a vector instruction in the simulation mode and interrupts a program exception. and a software simulator that simulates the processing of each vector instruction by a series of scalar instructions, and executes a program consisting of vector instructions and scalar instructions in a simulate mode. When doing so, the scalar instructions are executed as they are on the above scalar unit, and the control for vector instructions is transferred to the above software simulator which is treated as a program exception interrupt. It is characterized in that the type of vector instruction that has interrupted is determined, and the above-mentioned scalar instruction group that simulates the determined vector instruction is executed. Hereinafter, embodiments will be described with reference to the drawings.

〔実施例〕〔Example〕

第1図は本発明が実施されるシステム構成例、
第2図は本発明によるシミユレーシヨン方法の実
施例を示す。
FIG. 1 shows an example of a system configuration in which the present invention is implemented.
FIG. 2 shows an embodiment of the simulation method according to the invention.

ベクトルプロセツサ1は、スカラユニツト2と
ベクトルユニツト3とからなる。ただし、本発明
の場合、ベクトルユニツト3により実行するベク
トル命令については、スカラユニツト2によりシ
ミユレートするので、ベクトルユニツト3は必ず
しも存在しなくてもよい。従つて、ベクトルプロ
セツサ1として、通常の汎用電子計算機を用いる
こともできる。
The vector processor 1 consists of a scalar unit 2 and a vector unit 3. However, in the case of the present invention, the vector instruction executed by the vector unit 3 is simulated by the scalar unit 2, so the vector unit 3 does not necessarily have to exist. Therefore, an ordinary general-purpose computer can also be used as the vector processor 1.

制御レジスタ4は、スカラユニツト2が保持す
る数多くの制御レジスタの1つであり、ベクトル
ユニツト3のバリツドフラグを有するものであ
る。このバリツドフラグをオフにすることによ
り、ベクトル命令を禁止して、ベクトル命令につ
いてはプログラム例外割込みを生じさせることが
できるようになつている。命令解読部5は、メモ
リ8からフエツチして実行する命令をデコードす
るものである。命令コードがスカラ命令であると
き、命令処理部6により、その命令を実行処理す
る。命令コードがベクトル命令であるとき、プロ
グラム例外割込み発生部7によつて、プログラム
例外割込みが起きるようになつている。
Control register 4 is one of many control registers held by scalar unit 2, and has a valid flag for vector unit 3. By turning off this valid flag, vector instructions can be prohibited and program exception interrupts can be generated for vector instructions. The instruction decoder 5 decodes instructions fetched from the memory 8 and executed. When the instruction code is a scalar instruction, the instruction processing unit 6 executes the instruction. When the instruction code is a vector instruction, the program exception interrupt generating section 7 generates a program exception interrupt.

メモリ8は、ベクトルプロセツサ1が処理する
命令およびデータを記憶する記憶装置である。シ
ミユレーシヨン対象プログラム9は、ベクトル命
令を含む命令列からなるものであるが、本発明の
場合、オブジエクトはシミユレーシヨンを行わな
い場合と同様のものでよく、予めベクトル命令を
SVC命令等に変更しておく必要はない。
Memory 8 is a storage device that stores instructions and data processed by vector processor 1. The simulation target program 9 consists of an instruction sequence including vector instructions, but in the case of the present invention, the object may be the same as in the case where no simulation is performed, and the vector instructions are pre-programmed.
There is no need to change it to SVC instruction etc.

シミユレートモード設定部10は、制御レジス
タ4をベクトル命令禁止の状態にセツトし、ベク
トル命令シミユレートモードに設定する処理を実
行するものである。また、プログラム例外割込み
が生じたときの制御移行先が、ソフトシミユレー
タ11の制御部12の先頭アドレスになるように
新PSWをセツトする。
The simulate mode setting unit 10 executes processing to set the control register 4 to a state in which vector instructions are prohibited and to set the vector instruction simulate mode. Also, a new PSW is set so that the control transfer destination when a program exception interrupt occurs is the start address of the control section 12 of the software simulator 11.

ソフトシミユレータ11は、シミユレーシヨン
の制御を行う制御部12と、各ベクトル命令対応
にベクトル命令をスカラ命令群によつて擬似する
ベクトル命令擬似処理部15a,15b…とから
なる。また、制御部12は、プログラム例外割込
みが生じたアドレスを抽出する割込みアドレス抽
出部13と、そのアドレスに格納されている命令
の種別を判定し、命令種別によつてベクトル命令
擬似処理部15a,15b…の1つを選択し起動
する命令種別判定部14とを持つ。
The software simulator 11 includes a control section 12 that controls simulation, and vector instruction simulation processing sections 15a, 15b, . . . that simulate vector instructions using a group of scalar instructions for each vector instruction. The control unit 12 also includes an interrupt address extraction unit 13 that extracts the address where a program exception interrupt has occurred, and a vector instruction pseudo processing unit 15a, which determines the type of instruction stored at that address, and depending on the instruction type, 15b... is provided.

次に、第2図に従つて、本発明によるシミユレ
ーシヨン方法の例を説明する。
Next, an example of the simulation method according to the present invention will be explained with reference to FIG.

ベクトル命令のシミユレーシヨンを行うにあた
つて、まずプログラム例外割込みの登録をシステ
ムに対して行う。そして、制御レジスタ4をベク
トル命令禁止の状態にセツトする。なお、この処
理は、ベクトル命令の実行によつて、はじめから
プログラム例外割込みが生じるようになつている
システムの場合には必要ない。
When simulating vector instructions, first a program exception interrupt is registered in the system. Then, the control register 4 is set to a state in which vector instructions are prohibited. Note that this processing is not necessary in the case of a system in which program exception interrupts are caused from the beginning by execution of vector instructions.

その後、シミユレーシヨン対象プログラム9を
実行すると、スカラ命令は、スカラユニツト2の
命令処理部によつて順に実行されていく。プログ
ラム中にベクトル命令が現れると、命令解読部5
によつてプログラム例外割込み発生部7が発動さ
れ、プログラム例外割込みが生じる。これによつ
て、ソフトシミユレータ11の制御部12に制御
が移行し、制御部12は、まず登録されたプログ
ラム例外割込みであるかどうかを判定する。登録
されていないプログラム例外割込みに関しては、
異常割込みとして処理し、ソフトシミユレータ1
1の処理を中止し、シミユレーシヨン対象プログ
ラム9の実行を終了する。
Thereafter, when the simulation target program 9 is executed, the scalar instructions are sequentially executed by the instruction processing section of the scalar unit 2. When a vector instruction appears in a program, the instruction decoder 5
The program exception interrupt generating section 7 is activated by the program exception interrupt generating section 7, and a program exception interrupt is generated. As a result, control is transferred to the control unit 12 of the software simulator 11, and the control unit 12 first determines whether it is a registered program exception interrupt. Regarding unregistered program exception interrupts,
Processed as an abnormal interrupt and software simulator 1
1 is canceled, and the execution of the simulation target program 9 is ended.

登録済みのプログラム例外割込みである場合に
は、旧PSWに従つて、割込みアドレスの調査を
行い、割込みアドレスおよび割込みコードから割
込んだベクトル命令コードを判別する。また命令
オペランドについても抽出し、命令コードに対応
するベクトル命令擬似処理部15a,15b,…
を起動して、そのベクトル命令によるデータ処理
を一連のスカラ命令群によつて擬似する。その
後、制御部12において、必要に応じて各種レジ
スタの復元など行い、ロードPSW命令等によつ
て、プログラム例外割込みを発生させた命令の次
の命令に制御を移す。以下、同様にシミユレーシ
ヨン対象プログラム9の命令を処理していき、プ
ログラムが終了したならば、シミユレートモード
を解除する。このようにすることによつて、命令
の実行が、全てスカラユニツト2上で行われるこ
とになる。
If it is a registered program exception interrupt, the interrupt address is investigated according to the old PSW, and the interrupt vector instruction code is determined from the interrupt address and interrupt code. The instruction operands are also extracted, and the vector instruction pseudo processing units 15a, 15b, . . . corresponding to the instruction code are extracted.
, and simulates data processing using vector instructions using a series of scalar instructions. Thereafter, in the control unit 12, various registers are restored as necessary, and control is transferred to the instruction following the instruction that caused the program exception interrupt by a load PSW instruction or the like. Thereafter, the instructions of the simulation target program 9 are processed in the same way, and when the program is completed, the simulation mode is canceled. By doing so, all instructions are executed on the scalar unit 2.

〔発明の効果〕〔Effect of the invention〕

以上説明した如く、本発明によれば、ベクトル
命令対応のSVCコードの登録やシミユレート対
象の命令の変換等が不要となり、またオペレーテ
イング・システム等とのソフトウエア・インタフ
エースも簡略化される。従つて、ベクトルユニツ
トが存在しない場合や障害になつた場合でも、ベ
クトルプロセツサ用のプログラムを、スカラユニ
ツトだけで効率よく実行させることが可能とな
る。例えば、ベクトルプロセツサ用プログラムの
早期開発のためにデバツクを行う場合や、ベクト
ルユニツト障害時における試験のために、実際の
ベクトルユニツトによるベクトル命令実行の処理
結果と、シミユレーシヨンによる処理結果とを比
較することにより診断を行う場合等、広く本発明
によるシミユレーシヨン方法を用いることが可能
である。
As described above, according to the present invention, there is no need to register SVC codes compatible with vector instructions or convert instructions to be simulated, and the software interface with an operating system or the like is also simplified. Therefore, even if the vector unit does not exist or becomes a failure, it is possible to efficiently execute a vector processor program using only the scalar unit. For example, when debugging a vector processor program for early development, or for testing when a vector unit fails, the processing results of vector instruction execution by the actual vector unit are compared with the processing results from simulation. The simulation method according to the present invention can be used in a wide range of applications, such as when making a diagnosis.

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

第1図は本発明が実施されるシステム構成例、
第2図は本発明によるシミユレーシヨン方法の実
施例、第3図は従来のシミユレーシヨン方法を示
す。 図中、1はベクトルプロセツサ、2はスカラユ
ニツト、4は制御レジスタ、5は命令解読部、6
は命令処理部、8はメモリ、9はシミユレーシヨ
ン対象プログラム、10はシミユレートモード設
定部、11はソフトシミユレータ、12は制御
部、13は割込みアドレス抽出部、14は命令種
別判定部、15a,15b,15cはベクトル命
令擬似処理部を表す。
FIG. 1 shows an example of a system configuration in which the present invention is implemented.
FIG. 2 shows an embodiment of the simulation method according to the present invention, and FIG. 3 shows a conventional simulation method. In the figure, 1 is a vector processor, 2 is a scalar unit, 4 is a control register, 5 is an instruction decoder, and 6 is a scalar unit.
1 is an instruction processing unit, 8 is a memory, 9 is a simulation target program, 10 is a simulation mode setting unit, 11 is a software simulator, 12 is a control unit, 13 is an interrupt address extraction unit, 14 is an instruction type determination unit, 15a, 15b, and 15c represent vector instruction pseudo processing units.

Claims (1)

【特許請求の範囲】[Claims] 1 スカラユニツトとベクトルユニツトとからな
るベクトルプロセツサにおいて実行される命令の
シミユレーシヨン方法であつて、シミユレートモ
ードのときにベクトル命令を識別してプログラム
例外割込みを生じさせる手段と、各ベクトル命令
の処理を各一連のスカラ命令群によつて擬似する
ソフトシミユレータとを設け、シミユレートモー
ドのもとでベクトル命令とスカラ命令とからなる
プログラムを実行するとき、スカラ命令をそのま
ま上記スカラユニツト上で実行するようにし、ベ
クトル命令についてはプログラム例外割込みとし
て上記ソフトシミユレータに制御を移行するよう
にし、上記ソフトシミユレータは割込みアドレス
に基づいて割込んできたベクトル命令種別を判別
し、判別したベクトル命令を擬似する上記スカラ
命令群を実行するようにしたことを特徴とするベ
クトル命令シミユレーシヨン方法。
1 A method for simulating instructions executed in a vector processor consisting of a scalar unit and a vector unit, which includes a means for identifying a vector instruction and generating a program exception interrupt in a simulation mode, and a means for generating a program exception interrupt for each vector instruction. A software simulator is provided that simulates processing using a series of scalar instructions, and when a program consisting of vector instructions and scalar instructions is executed in the simulate mode, the scalar instructions are directly transferred to the above scalar unit. For vector instructions, control is transferred to the software simulator as a program exception interrupt, and the software simulator determines the type of vector instruction that has interrupted based on the interrupt address. A vector instruction simulation method characterized in that the above-mentioned scalar instruction group that simulates the determined vector instruction is executed.
JP16463584A 1984-08-06 1984-08-06 Simulation method of vector instruction Granted JPS6143347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16463584A JPS6143347A (en) 1984-08-06 1984-08-06 Simulation method of vector instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16463584A JPS6143347A (en) 1984-08-06 1984-08-06 Simulation method of vector instruction

Publications (2)

Publication Number Publication Date
JPS6143347A JPS6143347A (en) 1986-03-01
JPH0361211B2 true JPH0361211B2 (en) 1991-09-19

Family

ID=15796943

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16463584A Granted JPS6143347A (en) 1984-08-06 1984-08-06 Simulation method of vector instruction

Country Status (1)

Country Link
JP (1) JPS6143347A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62259102A (en) * 1986-05-02 1987-11-11 Mitsubishi Electric Corp Computer system for process control
JPH03268031A (en) * 1990-03-19 1991-11-28 Fujitsu Ltd System for testing vector processor

Also Published As

Publication number Publication date
JPS6143347A (en) 1986-03-01

Similar Documents

Publication Publication Date Title
US4819234A (en) Operating system debugger
US4635193A (en) Data processor having selective breakpoint capability with minimal overhead
US5680584A (en) Simulator system for code execution and debugging within a multi-architecture environment
JP2002268914A (en) Method for monitoring execution of privileged instruction
JPH0430053B2 (en)
US6834359B2 (en) Method and system for testing a processor
US7016826B2 (en) Apparatus and method of developing software for a multi-processor chip
US20030093258A1 (en) Method and apparatus for efficient simulation of memory mapped device access
JPH0361211B2 (en)
JP2828590B2 (en) Microprogram verification method
CA1223079A (en) Data processor having selective breakpoint capability with minimal overhead
JPH06103109A (en) Data processor and debugging device using the same
CN117112027A (en) Data processing method, device, electronic equipment and readable medium
JPS61221837A (en) Computer checking method
JPS6334644A (en) Simulator with functional level
JP2000122892A (en) Emulator device
JPH02231634A (en) Method for maintaining interchangeability of software
JPH05127945A (en) Program execution situation analysis system
JPH06208480A (en) System program simulation system
JPS6214240A (en) Program inspecting system
JPS63300330A (en) Debugging method for firmware
JPH03263134A (en) Test processing system for test processor
JPH0290243A (en) Microprogram logical test system
JPH04190457A (en) Method and device for logic simulation
JPH02311947A (en) Error correction system for coprocessor