[go: up one dir, main page]

JPH02126341A - Central processing unit - Google Patents

Central processing unit

Info

Publication number
JPH02126341A
JPH02126341A JP63279721A JP27972188A JPH02126341A JP H02126341 A JPH02126341 A JP H02126341A JP 63279721 A JP63279721 A JP 63279721A JP 27972188 A JP27972188 A JP 27972188A JP H02126341 A JPH02126341 A JP H02126341A
Authority
JP
Japan
Prior art keywords
instruction
trap
register
mask
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP63279721A
Other languages
Japanese (ja)
Inventor
Hitoshi Yamahata
山畑 均
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP63279721A priority Critical patent/JPH02126341A/en
Publication of JPH02126341A publication Critical patent/JPH02126341A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To speed up a trap processing operation by providing an instruction decoding part having an instruction code register, an instruction executing part, an instruction mark register, a trap instruction register and a comparator with a mask. CONSTITUTION:An instruction decoding part 1 stores an instruction code IC to an instruction code register 11, decodes it and informs an instruction executing part 2 of decoded instruction information DINS. The executing part 2 executes an instruction INS based on information DINS and sets the value to a trap instruction register 4 and an instruction mask register 3. At this time, the value to registers 4 and 3 is set by the execution of a special instruction beforehand, and the instruction code IC stored in the register 11 is compared with a trap instruction signal TI by a comparator 5 with a mask. When the result of the comparator with the mask is all coincident, the trap is informed to the executing part 2 by a trap signal TR, and the executing part 2 immediately executes the trap processing. Thus, it is sufficient even when processing is not executed each time all instructions complete the execution and the action can be speeded up.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は中央処理装置に関し、特に命令コードの実行状
態を確認する場合、トラップ信号を発生して確認する構
成の情報処理装置の中央処理装置に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a central processing unit, and particularly to a central processing unit of an information processing device configured to generate a trap signal to check the execution status of an instruction code. Regarding.

〔従来の技術〕[Conventional technology]

従来、この種の中央処理装置においては、特定の命令コ
ードの実行状態を確認する場合、すべての命令実行終了
ごとにトラップ信号を発生させ、トラップ処理プログラ
ムにおいて次に実行する命令の命令コードをソフトウェ
アで確認していた。
Conventionally, in this type of central processing unit, when checking the execution status of a specific instruction code, a trap signal is generated every time the execution of all instructions is completed, and the instruction code of the next instruction to be executed is sent to the software in the trap processing program. I was checking it.

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

上述した従来の中央処理装置は、各命令の実行終了のた
びにトラップを発生させてソフトウェアで命令コードを
確認する構成となっているので、動作速度が遅くなると
いう欠点がある。
The above-described conventional central processing unit is configured to generate a trap each time the execution of each instruction is completed and check the instruction code using software, which has the disadvantage of slow operation speed.

本発明の目的は、動作を高速化することができる中央処
理装置を提供することにある。
An object of the present invention is to provide a central processing unit that can operate at high speed.

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

本発明の中央処理装置は、命令の命令コード及びアドレ
スフィールドのうちの少なくとも命令コードを格納する
命令レジスタを備え前記命令を解読してデコード済命令
情報を出力する命令デコード部と、前記デコード済命令
情報に従って前記命令を実行し、かつ前記命令レジスタ
の出力信号と同一ビット数をもちトラップを発生させる
ための特定のパターンのトラップ命令信号とこのトラッ
プ命令信号と同一ビット数をもちこれら各ビットごとに
マスク指定を行う命令マスク信号とを出力し、トラップ
信号が入力されるとトラップ処理を行う命令実行部と、
この命令実行部からのトラップ命令信号及び命令マスク
信号をそれぞれ対応して格納するトラップ命令レジスタ
及び命令マスクレジスタと、前記命令レジスタ、命令マ
スクレジスタ及びトラップ命令レジスタの出力信号を入
力して前記命令レジスタ及びトラップ命令レジスタの出
力信号を対応する各ビットごとに比較し、前記命令マス
ク信号の対応するビットによりマスクされない前記各ビ
ットごとの比較結果がすべて一致しなとき前記トラップ
信号を出力するマスク付比較器とを有している。
The central processing unit of the present invention includes an instruction decode section that includes an instruction register that stores at least an instruction code of an instruction code and an address field of an instruction, and that decodes the instruction and outputs decoded instruction information; A trap instruction signal of a specific pattern for executing the instruction according to the information and having the same number of bits as the output signal of the instruction register and generating a trap, and a trap instruction signal having the same number of bits as the trap instruction signal and for each of these bits. an instruction execution unit that outputs an instruction mask signal for specifying a mask and performs trap processing when a trap signal is input;
A trap instruction register and an instruction mask register respectively store a trap instruction signal and an instruction mask signal from the instruction execution unit, and output signals of the instruction register, instruction mask register, and trap instruction register are input to the instruction register. and a comparison with a mask that compares the output signals of the trap instruction register for each corresponding bit, and outputs the trap signal when the comparison results for each of the bits that are not masked by the corresponding bit of the instruction mask signal do not all match. It has a container.

〔実施例〕〔Example〕

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

第1図は本発明の第1の実施例を示すブロック図である
FIG. 1 is a block diagram showing a first embodiment of the present invention.

この実施例は、命令INSの命令コード及びアドレスフ
ィールドのうちの命令コードを格納する命令コードレジ
スタ11を備え、命令INSを解読してデコード済命令
情報DINSを出力する命令デコード部1と、デコード
済命令情報DINSに従って命令INSを実行し、かつ
命令コードレジスタ11の出力信号と同一ビット数をも
ちトラップを発生させるための特定のパターンのトラッ
プ命令信号TIとこのトラップ命令信号TIと同一ビッ
ト数をもちこれら各ビットごとにマスク指定を行う命令
マスク信号IMとを出力し、トラップ信号TRが入力さ
れるとトラップ処理を行う命令実行部2と、命令マスク
信号IMを入力して格納し出力する命令マスクレジスタ
3と、トラップ命令信号TIを入力して格納し出力する
トラップ命令レジスタ4と、命令レジスタ11.命令マ
スクレジスタ3及びトラップ命令レジスタ4の出力信号
IC,IM、TIを入力して命令レジスタ11及びトラ
ップ命令レジスタ4の出力信号IC,TIを対応する各
ビットごとに比較し、命令マスク信号IMの対応するビ
ットによりマスクされないこれら各ビットごとの比較結
果がすべて一致したときトラップ信号TRを出力するマ
スク付比較器5とを有する構成となっている。
This embodiment includes an instruction code register 11 that stores an instruction code of an instruction INS and an instruction code of an address field, an instruction decoder 1 that decodes the instruction INS and outputs decoded instruction information DINS, and an instruction decoder 1 that decodes the instruction INS and outputs decoded instruction information DINS. A trap instruction signal TI of a specific pattern for executing the instruction INS according to the instruction information DINS and having the same number of bits as the output signal of the instruction code register 11 and generating a trap, and a trap instruction signal TI having the same number of bits as the trap instruction signal TI. An instruction execution unit 2 outputs an instruction mask signal IM that specifies a mask for each of these bits, and performs trap processing when a trap signal TR is input, and an instruction mask that inputs, stores, and outputs the instruction mask signal IM. a register 3, a trap instruction register 4 for inputting, storing and outputting a trap instruction signal TI, and an instruction register 11. The output signals IC, IM, and TI of the instruction mask register 3 and the trap instruction register 4 are input, and the output signals IC, TI of the instruction register 11 and the trap instruction register 4 are compared for each corresponding bit, and the output signals IC, IM, and TI of the instruction mask register 3 and the trap instruction register 4 are compared for each corresponding bit. The configuration includes a masked comparator 5 that outputs a trap signal TR when all of the comparison results for each bit that are not masked by the corresponding bits match.

次に、この実施例の動作について説明する。Next, the operation of this embodiment will be explained.

命令デコード部1は、命令コードICを命令コードレジ
スタに格納してデコードし、デコード済命令情報DIN
Sを命令実行部2へ通知する。
The instruction decoding unit 1 stores the instruction code IC in the instruction code register, decodes it, and generates decoded instruction information DIN.
S is notified to the instruction execution unit 2.

命令実行部2は、デコード済命令情報DINSに基づい
て命令INSを実行するほかに、トラップ命令レジスタ
4及び命令マスクレジスタ3への値の設定も行う。
The instruction execution unit 2 executes the instruction INS based on the decoded instruction information DINS, and also sets values in the trap instruction register 4 and the instruction mask register 3.

あらかじめ特別な命令の実行によりトラップ命令レジス
タ4及び命令マスクレジスタ3へ値を設定しておき、命
令コードレジスタ11に格納された命令コードICがマ
スク付比較器5によりトラップ命令信号TIと比較され
る。このマスク付比較の結果がすべて一致するとトラッ
プ信号TRによって命令実行部2にトラップが通知され
、命令実行部2はただちにトラップ処理を開始する。
Values are set in the trap instruction register 4 and instruction mask register 3 in advance by executing a special instruction, and the instruction code IC stored in the instruction code register 11 is compared with the trap instruction signal TI by the comparator with mask 5. . If all the results of this masked comparison match, a trap is notified to the instruction execution unit 2 by the trap signal TR, and the instruction execution unit 2 immediately starts trap processing.

なお、トラップ命令レジスタ4.命令マスクレジスタ3
及びマスク付比較器5の組を複数用いることで、異なる
複数の命令コードを同時にチエツクすることができる。
Note that the trap instruction register 4. Instruction mask register 3
By using a plurality of sets of comparators 5 and masked comparators 5, it is possible to check a plurality of different instruction codes at the same time.

第2図はこの実施例のマスク付比較器5の具体的な回路
を示した回路図であり、命令マスク信号IMO〜IMn
のビットの値が“Onに対応するビット位置について命
令コードICO〜ICnとトラップ命令信号TIO〜T
Inとを比較して一致するか否かを検出する。すなわち
、命令マスク信号IMO〜IMnでマスクされていない
部分について比較が行なわれる。
FIG. 2 is a circuit diagram showing a specific circuit of the masked comparator 5 of this embodiment, and shows the instruction mask signals IMO to IMn.
The instruction codes ICO to ICn and the trap instruction signals TIO to T are
In is compared to detect whether or not they match. That is, the comparison is performed on the portions not masked by the instruction mask signals IMO to IMn.

第3図は本発明の第2の実施例を示すブロック図である
FIG. 3 is a block diagram showing a second embodiment of the invention.

この実施例は、命令コートレジスタ11の他に、アドレ
スフィールドレジスタ12を命令デコード部IAに設け
たものである。
In this embodiment, in addition to the instruction code register 11, an address field register 12 is provided in the instruction decode section IA.

アドレスフィールドレジスタ12は命令デコード部IA
が命令をデコードする時に、命令のうちオペランドの指
定を行うアドレスフィールドを格納するレジスタである
The address field register 12 is the instruction decode section IA.
This is a register that stores the address field that specifies the operand of the instruction when decoding the instruction.

この実施例においては、トラップ命令レジスタ4、命令
マスクレジスタ3及びマスク付比較器5のビット長は命
令コードICとアドレスフィールドAFのビット長の合
計に等しい。
In this embodiment, the bit length of trap instruction register 4, instruction mask register 3, and masked comparator 5 is equal to the sum of the bit lengths of instruction code IC and address field AF.

すなわち命令コードICとアドレスフィールドAFとを
同時にマスク付比較してトラップを発生させることがで
きる。また、マスクの値に応じては、命令コードICに
無関係にアドレスフィールドAPでのみトラップを発生
させることもできる。
That is, a trap can be generated by simultaneously comparing the instruction code IC and the address field AF with a mask. Further, depending on the value of the mask, a trap can be generated only in the address field AP, regardless of the instruction code IC.

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

以上説明したように本発明は、ビットごとにマスク指定
して特定の命令が検出されたときトラップ処理を行う構
成とすることにより、従来のようにすべての命令実行終
了ごとにトラップ処理しなくて済むので、動作を大幅に
高速化することができる効果がある。
As explained above, the present invention has a configuration in which trap processing is performed when a specific instruction is detected by specifying a mask for each bit, thereby eliminating the need to perform trap processing every time the execution of all instructions is completed as in the past. This has the effect of greatly speeding up the operation.

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

第1図は本発明の第1の実施例を示すブロック図、第2
図は第1図に示された実施例のマスク付比較器の具体的
な回路図、第3図は本発明の第2の実施例を示すブロッ
ク図である。 1、IA・・・命令デコード部、2・・・命令実行部、
3・・・命令マスクレジスタ、4・・・トラップ命令レ
ジスタ、5・・・マスク付比較器、11・・・命令コー
ドレジスタ、12・・・アドレスフィールドレジスタ、
Gll〜G、fl、 G2.〜a2Il、 G3・・・
ゲート回路。 鼻譲
FIG. 1 is a block diagram showing a first embodiment of the present invention;
This figure is a specific circuit diagram of the masked comparator according to the embodiment shown in FIG. 1, and FIG. 3 is a block diagram showing a second embodiment of the present invention. 1, IA...instruction decoding section, 2... instruction execution section,
3... Instruction mask register, 4... Trap instruction register, 5... Comparator with mask, 11... Instruction code register, 12... Address field register,
Gll~G, fl, G2. ~a2Il, G3...
gate circuit. nose concession

Claims (1)

【特許請求の範囲】[Claims]  命令の命令コード及びアドレスフィールドのうちの少
なくとも命令コードを格納する命令レジスタを備え前記
命令を解読してデコード済命令情報を出力する命令デコ
ード部と、前記デコード済命令情報に従って前記命令を
実行し、かつ前記命令レジスタの出力信号と同一ビット
数をもちトラップを発生させるための特定のパターンの
トラップ命令信号とこのトラップ命令信号と同一ビット
数をもちこれら各ビットごとにマスク指定を行う命令マ
スク信号とを出力し、トラップ信号が入力されるとトラ
ップ処理を行う命令実行部と、この命令実行部からのト
ラップ命令信号及び命令マスク信号をそれぞれ対応して
格納するトラップ命令レジスタ及び命令マスクレジスタ
と、前記命令レジスタ、命令マスクレジスタ及びトラッ
プ命令レジスタの出力信号を入力して前記命令レジスタ
及びトラップ命令レジスタの出力信号を対応する各ビッ
トごとに比較し、前記命令マスク信号の対応するビット
によりマスクされない前記各ビットごとの比較結果がす
べて一致したとき前記トラップ信号を出力するマスク付
比較器とを有することを特徴とする中央処理装置。
an instruction decode unit that includes an instruction register that stores at least an instruction code of an instruction code and an address field of an instruction, and that decodes the instruction and outputs decoded instruction information; and executes the instruction according to the decoded instruction information; and a trap command signal having the same number of bits as the output signal of the command register and having a specific pattern for generating a trap; and a command mask signal having the same number of bits as the trap command signal and specifying a mask for each of these bits. a trap instruction register and an instruction mask register that respectively store a trap instruction signal and an instruction mask signal from the instruction execution section, respectively; The output signals of an instruction register, an instruction mask register, and a trap instruction register are input, and the output signals of the instruction register and trap instruction register are compared for each corresponding bit, and each of the output signals not masked by the corresponding bit of the instruction mask signal is compared. A central processing unit comprising: a comparator with a mask that outputs the trap signal when all bit-by-bit comparison results match.
JP63279721A 1988-11-04 1988-11-04 Central processing unit Pending JPH02126341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63279721A JPH02126341A (en) 1988-11-04 1988-11-04 Central processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63279721A JPH02126341A (en) 1988-11-04 1988-11-04 Central processing unit

Publications (1)

Publication Number Publication Date
JPH02126341A true JPH02126341A (en) 1990-05-15

Family

ID=17614952

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63279721A Pending JPH02126341A (en) 1988-11-04 1988-11-04 Central processing unit

Country Status (1)

Country Link
JP (1) JPH02126341A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05173837A (en) * 1991-04-02 1993-07-13 Motorola Inc Data processing system wherein static masking and dynamic masking of information in operand are both provided
JPH05282161A (en) * 1992-03-31 1993-10-29 Nec Corp Information processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05173837A (en) * 1991-04-02 1993-07-13 Motorola Inc Data processing system wherein static masking and dynamic masking of information in operand are both provided
JPH05282161A (en) * 1992-03-31 1993-10-29 Nec Corp Information processor

Similar Documents

Publication Publication Date Title
US4181942A (en) Program branching method and apparatus
JP2005317023A (en) Breakpoint logic unit, debug logic, and breakpoint method for data processing apparatus
KR910010301A (en) Command designation method and execution device
JP2001005675A (en) Program conversion device and processor
US20080270759A1 (en) Computer Having Dynamically-Changeable Instruction Set in Real Time
US5253349A (en) Decreasing processing time for type 1 dyadic instructions
JPH02126341A (en) Central processing unit
US5724572A (en) Method and apparatus for processing null terminated character strings
US6675291B1 (en) Hardware device for parallel processing of any instruction within a set of instructions
JP2511151B2 (en) Data processing device
JPS583040A (en) Information processor
US5860155A (en) Instruction decoding mechanism for reducing execution time by earlier detection and replacement of indirect addresses with direct addresses
JP2525492B2 (en) Programmable controller
US9582619B1 (en) Simulation of a circuit design block using pattern matching
JP2001184209A (en) Device and method for decoding instruction code
JP3366278B2 (en) Execution memory area control circuit for pipeline processing
JPS62125435A (en) Microprogram control system
JP3023959B2 (en) Undefined instruction detection method
JP2671161B2 (en) Register interference check method
JP2559924B2 (en) Programmable controller
JPS58149571A (en) Processing system of vector operation in information processing device
JPS635433A (en) Branch control method
JPH04137169A (en) Information processor
JPH08292903A (en) Information processor
JPH04353927A (en) Micro processor