JPS61294551A - Computer - Google Patents

Computer

Info

Publication number
JPS61294551A
JPS61294551A JP13653685A JP13653685A JPS61294551A JP S61294551 A JPS61294551 A JP S61294551A JP 13653685 A JP13653685 A JP 13653685A JP 13653685 A JP13653685 A JP 13653685A JP S61294551 A JPS61294551 A JP S61294551A
Authority
JP
Japan
Prior art keywords
instruction
state
bit
instruction fetch
prefetch queue
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
JP13653685A
Other languages
Japanese (ja)
Inventor
Kazuo Nakamura
和夫 中村
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP13653685A priority Critical patent/JPS61294551A/en
Publication of JPS61294551A publication Critical patent/JPS61294551A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To secure the accurate generation of an instruction due to the abnormal state of an instruction fetch by providing at least two states to each tag set to an instruction prefetch queue at every minimum unit of a decoding mode and producing an instruction in the instruction fetch mode of a special state. CONSTITUTION:A tag bit 1 is provided at every minimum unit of an instruction code to an instruction prefetch queue 2 connected to an external bus 6. Then '0' and '1' are stored when the bit 1 is normal and abnormal respectively. Then an interruption is produced if the bit 1 is equal to '1' when an instruction is extracted out of the queue 2 when the instruction is executed. Thus it is possible to produce the interruption without fail owing to an abnormal state caused when the instruction is executed.

Description

【発明の詳細な説明】 (産業上の利用分野] この発明は計**に関するもので、特に、命令プリフェ
ッチキューを持つ計算機に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a computer, and particularly to a computer having an instruction prefetch queue.

[従来の技術] 第2図は、従来の命令プリフェッチキューを持つ計算機
の構成を示すブロック図である。第2図において、2は
命令プリフェッチキュー、3は命令デコーダ、4は制御
部、5は演算部、6は外部バスを示す。ここに、命令プ
リフェッチキュー2は、図示のように、プリフェッチし
た命令だけを単に保持するだけのものである。
[Prior Art] FIG. 2 is a block diagram showing the configuration of a computer having a conventional instruction prefetch queue. In FIG. 2, 2 is an instruction prefetch queue, 3 is an instruction decoder, 4 is a control section, 5 is an arithmetic section, and 6 is an external bus. As shown in the figure, the instruction prefetch queue 2 simply holds only prefetched instructions.

次に、従来の計算機の動作について説明をする。Next, the operation of a conventional computer will be explained.

この計n!Iの動作は、主に制御部4によって統御され
るが、その動作は大きく2つに分けることができる。第
1は、命令のブリフェッチであり、外部パス6を通して
命令をフェッチし、その命令は命令プリフェッチキュー
2に一時記憶される。第2は、命令の実行であり、命令
ブリフェッチキヱ−2に記憶された命令を取出し、命令
デコーダ3でデコードし、演算部5において対応する演
算を行なう。
This total is n! The operation of I is mainly controlled by the control section 4, and the operation can be roughly divided into two types. The first is instruction prefetch, which fetches instructions through external path 6 and temporarily stores them in instruction prefetch queue 2 . The second is execution of an instruction, in which the instruction stored in the instruction briefetch key 2 is retrieved, decoded by the instruction decoder 3, and the corresponding operation is performed in the arithmetic unit 5.

第3図は、命令の7エツチと実行とのタイミングを示す
図である。第3図のように、命令プリフェッチキュー2
を持つ計算機では、命令実行中により先の命令をフェッ
チするので、成る命令の7エツチとその命令の実行との
間に時間的なずれが生じる。このとき、従来の計算機の
命令フェッチキュー2は単にフェッチした命令だけを保
持しているものであるため、命令フェッチ中に起こった
異常事態、たとえばアクセスするメモリエリアがアドレ
スw11!i置によってアクセスが禁止されているメモ
リamとなったとき、アクセス中のハードウェアの異常
が生じたとき、またはデバッグ時におけるブレークポイ
ントが検出されたときなど、それら異常情報を記憶する
ことができない。このため、これらの異常に対する割込
発生は、命令フェッチ時点で行なわざるを得ないことに
なる。
FIG. 3 is a diagram showing the timing of seven etches and executions of instructions. As shown in Figure 3, instruction prefetch queue 2
In a computer with the above-described method, an earlier instruction is fetched during instruction execution, so there is a time lag between the fetching of the instruction and the execution of that instruction. At this time, since the instruction fetch queue 2 of the conventional computer simply holds only the fetched instructions, if an abnormal situation occurs during instruction fetching, for example, the memory area to be accessed is at address w11! When memory is prohibited to access due to i setting, when an error occurs in the hardware being accessed, or when a breakpoint is detected during debugging, such abnormal information cannot be stored. . Therefore, interrupt generation for these abnormalities must be performed at the time of instruction fetch.

このことを、第4図の命令の7エツチと実行とのタイミ
ング図を参照して説明をする。上述のように、従来の計
rx機では、異常状態に対する割込発生は命令フェッチ
時点で行なわれるので、本来命令実行時に発生すべき割
込がそれよりも以前に起こることになる。つまり、第4
図において、異常状態で命令5がフェッチされた場合、
命令5の7エツチに対する割込は、本来、命令4を実行
侵のP点で起こるべきなのに、実際には、命令4を実行
する前のA点で行なわれてしまうわけである。
This will be explained with reference to the timing diagram of seven etches and executions of instructions in FIG. As described above, in the conventional RX machine, an interrupt for an abnormal state is generated at the time of fetching an instruction, so that an interrupt that should normally be generated during instruction execution occurs earlier. In other words, the fourth
In the figure, if instruction 5 is fetched in an abnormal state,
Although the interrupt for the 7th etch of instruction 5 should originally occur at point P when instruction 4 is being executed, it actually occurs at point A before instruction 4 is executed.

この場合、命令4に分岐命令があった場合は、実際には
命令5は実行されず、したがって割込も行なわれる必要
がないにもかかわらず、命令4の実行前に割込が発生し
てしまうというような事態が生じる。
In this case, if instruction 4 contains a branch instruction, instruction 5 will not actually be executed and therefore there is no need for an interrupt to occur, but an interrupt will occur before instruction 4 is executed. A situation arises where it is put away.

また、上述のような欠点を克服するため、次のように改
良された計算機も存在する。すなわち、第5図のように
、フェッチ時に上記のような異常が発生したとき、その
時点では割込を発生せず、フェッチした命令5の代わり
に割込発生命令を命令プリフェッチキュー2に記憶する
ようにしたものである。このような計l1機では、割込
は異常のあった命令が割込発生命令と置換えられている
ので、それを実行するときに割込が発生し、上記のよう
な問題は起こらない。しかし、通常、転送や演算などの
一般的な命令はオブコード部とオペランド部とからなっ
ており、この計算機では、もし異常の発生した命令フェ
ッチが第6図のように命令のオブコード部分ではなくオ
ペランド部分のフェッチであった場合、置換えられた割
込発生命令は割込発生命令とm謙されず、単なるオペラ
ンドであると見なされてしまい、割込は発生しない。
In order to overcome the above-mentioned drawbacks, there are also computers that have been improved as follows. That is, as shown in FIG. 5, when the above-mentioned abnormality occurs during fetching, no interrupt is generated at that point, and instead of the fetched instruction 5, the interrupt-generating instruction is stored in the instruction prefetch queue 2. This is how it was done. In such machines, the instruction in which the interrupt occurred is replaced with the interrupt generation instruction, so that an interrupt occurs when the instruction is executed, and the above-mentioned problem does not occur. However, general instructions such as transfers and calculations usually consist of an obcode part and an operand part, and in this computer, if an error occurs in an instruction fetch, the obcode part of the instruction is processed as shown in Figure 6. If it is a fetch of the operand part instead, the replaced interrupt generation instruction will not be recognized as an interrupt generation instruction, but will be regarded as a mere operand, and no interrupt will occur.

しかも、オペランド部分が割込発生命令に相当するコー
ドのまま命令が実行されるので、元の命令としても正し
く実行されないという新たな欠点が生じることになる。
Moreover, since the instruction is executed with the operand portion of the code corresponding to the interrupt generation instruction, a new drawback arises in that the original instruction is not executed correctly.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

このように、従来の計算機の命令プリフェッチキューは
、フェッチした命令以外の情報を保持する手段がないの
で、命令の実行時に命令フェッチ中に起こった異常状態
を調べることができない。
As described above, the instruction prefetch queue of a conventional computer has no means for holding information other than the fetched instructions, so it is not possible to check for abnormal conditions that occur during instruction fetching during instruction execution.

このため、このような計算機では、本来発生すべき時間
より以前に割込が発生したり、発生する必要がない割込
が発生することになり、スルーブツトを下げたり、正し
いデバッグが行なえないことが起こるという欠点があっ
た。
For this reason, in such computers, interrupts may occur earlier than they should have occurred, or interrupts that should not have occurred may occur, reducing throughput or preventing correct debugging. The downside was that it happened.

それゆえに、この発明は、このような従来の計*mの欠
点を解消するためになされたもので、命令フェッチでの
異常状態による割込が、その命令の実行時点において確
実に発生するように構成された計算機を提供することを
目的としている。
Therefore, the present invention has been made in order to eliminate the drawbacks of the conventional system *m, and is to ensure that an interrupt due to an abnormal state in an instruction fetch occurs at the time of execution of the instruction. The purpose is to provide a structured calculator.

[問題点を解決するための手段] この発明の計算機では、命令ブリフエツーチキューにフ
ェッチした命令ごとに、命令以外のデータを記憶するダ
グビットを持たせたものである。
[Means for Solving the Problems] In the computer of the present invention, each instruction fetched into the instruction brief fetch queue is provided with a double bit for storing data other than the instruction.

[作用] 命令プリフェッチキューに設けられたダグビットには、
命令フェッチ中に起こった異常状態が記憶される。そし
て、命令実行中に、命令プリフェッチキューから異常状
態が記憶されたダグビットを持つ命令が取出されれば、
その命令を実行する代わりに割込を発生する。
[Operation] The dag bit provided in the instruction prefetch queue has
Abnormal conditions that occur during instruction fetching are stored. Then, during instruction execution, if an instruction with a dag bit in which an abnormal state is stored is retrieved from the instruction prefetch queue,
Generates an interrupt instead of executing that instruction.

[発明の実施例] 以下、この発明の実施例を図について説明をする。[Embodiments of the invention] Embodiments of the present invention will be described below with reference to the drawings.

第1図は、この発明の一実施例の計算機の構成を示すブ
ロック図である。図において、1は命令プリフェッチキ
ューに付けられたダグビット、2は命令プリフェッチキ
ュー、3は命令デコーダ、4は制御部、5は演算部、6
は外部バスである。
FIG. 1 is a block diagram showing the configuration of a computer according to an embodiment of the present invention. In the figure, 1 is a double bit attached to an instruction prefetch queue, 2 is an instruction prefetch queue, 3 is an instruction decoder, 4 is a control unit, 5 is a calculation unit, and 6
is an external bus.

ダグビット1は命令コードの最小単位ごとに設けられて
いる。たとえば、命令が1バイト単位で定義されている
計n機では1バイトごとに、2バイト単位で定義されて
いる計算機では2バイトごとに設けられているわけであ
る。
Dag bit 1 is provided for each minimum unit of instruction code. For example, in computers where instructions are defined in units of 1 byte, instructions are provided every 1 byte, and in computers where instructions are defined in units of 2 bytes, instructions are provided every 2 bytes.

そして、このダグビット1には、命令フェッチ時におけ
る異常状態が記憶される。たとえば、異常のないときは
0”、異常があったときは1′@が記憶される。そして
、命令実行段階で命令プリフェッチキュー2から命令を
取出すとき、ダグビットが“1nであれば、その命令を
実行する代わりに割込を発生する。これは取出す命令が
オブコード部分、オペランド部分のいずれでも実行され
る。したがって、この計算機では、命令フェッチ時にお
ける異常状態は命令が命令プリフェッチキュー2から取
出されるとき、つまり、命令が実行される直前に調べら
れるわけである。よって、異常状態に対する割込は、そ
の命令が実行される時点で発生することが可能となる。
In this double bit 1, an abnormal state at the time of fetching an instruction is stored. For example, 0" is stored when there is no abnormality, and 1'@ is stored when there is an abnormality. Then, when fetching an instruction from the instruction prefetch queue 2 in the instruction execution stage, if the dag bit is "1n," the instruction generates an interrupt instead of executing. This is executed whether the instruction to be fetched is an obcode part or an operand part. Therefore, in this computer, abnormal conditions during instruction fetching are checked when the instruction is taken out from the instruction prefetch queue 2, that is, immediately before the instruction is executed. Therefore, an interrupt for an abnormal state can occur at the time the instruction is executed.

[発明の効果] 以上説明したように、この発明によれば、命令プリフェ
ッチキューを持つ計算機において、命令プリフェッチキ
ューにダグビットを設け、そのダグビットに命令フェッ
チ時における異常状態を記憶し、命令実行時に命令プリ
フェッチキューから異常状態の記憶されたダグビットを
持つ命令を取出したときに割込を発生するようにしたの
で、命令フェッチ時における異常状態に対する割込は常
にその命令が実行されるときに発生させることができる
。この結果、実際は実行しない命令のフェッチに伴なう
禁止されているメモリエリアのアクセスに関する不必要
な割込の発生を防止でき、メモリアクセス時におけるハ
ードウェアの異常に関する不必要な割込の発生を防止で
き、また、デバッグ時において正しいブレークポイント
の検出ができるといった効果がある。
[Effects of the Invention] As explained above, according to the present invention, in a computer having an instruction prefetch queue, a dag bit is provided in the instruction prefetch queue, an abnormal state at the time of fetching an instruction is stored in the dag bit, and an abnormal state at the time of instruction execution is stored. An interrupt is generated when an instruction with a dag bit with an abnormal state stored is taken from the prefetch queue, so an interrupt for an abnormal state when fetching an instruction should always be generated when that instruction is executed. I can do it. As a result, it is possible to prevent unnecessary interrupts related to accessing prohibited memory areas due to fetching of instructions that are not actually executed, and to prevent unnecessary interrupts related to hardware abnormalities during memory access. This has the effect of being able to prevent this, and also allowing correct breakpoints to be detected during debugging.

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

第1図は、この発明の一実施例による計算機の構成ブロ
ック図である。第2図は、従来の計11[*の一例の構
成ブロック図である。第3図は、命令プリフェッチキュ
ーを持つ計11!!Iが命令をフェッチするタイミング
の例である。第4図、第5図および第6図は、従来の計
算機において命令をフェッチするときの問題点を説明す
るための図である。 図において、1は命令プリフェッチキューに付けられた
ダグビット、2は命令プリフェッチキュー、3は命令デ
コーダ、4は制御部、5は演算部、6は外部バスを示す
。 なお、同一符号は同一または相当部分を示す。 代理人   大  岩  増  雄 1  タグピット 2  命令プリフェッチキュ− 3、命令ヂコーグ 4、 制嗜部 5、 命令′J!打訃 6、  外部バス 2、 命令プリフェソ手キュー 3、  命令テ”コーク゛ 4  副IIp舒 544&今賞付部 6、タト郁tvス
FIG. 1 is a block diagram of the configuration of a computer according to an embodiment of the present invention. FIG. 2 is a block diagram of an example of a conventional system with a total of 11 [*]. Figure 3 shows a total of 11 instruction prefetch queues! ! This is an example of the timing when I fetches an instruction. FIG. 4, FIG. 5, and FIG. 6 are diagrams for explaining problems when fetching instructions in a conventional computer. In the figure, 1 is a double bit attached to an instruction prefetch queue, 2 is an instruction prefetch queue, 3 is an instruction decoder, 4 is a control section, 5 is an arithmetic section, and 6 is an external bus. Note that the same reference numerals indicate the same or equivalent parts. Agent Masuo Oiwa 1 Tag Pit 2 Command Prefetch Queue 3, Command Dicog 4, Control Department 5, Command 'J! Hit 6, External Bus 2, Instruction Prefeso Hand Cue 3, Instruction Te” Coke 4 Vice IIp Shu 544 & Now Award Part 6, Tato Iku TV

Claims (4)

【特許請求の範囲】[Claims] (1)命令プリフェッチキュー、 前記命令プリフェッチキューに備えられ、命令をデコー
ドするときの最小単位ごとに設けられた、少なくとも第
1と第2の2つの状態を有するダグビット、 通常の命令フェッチのときには前記ダグビットを第1の
状態にし、特別な状態での命令フェッチを行なうときは
前記ダグビットを第2の状態にする手段、および 命令の実行時に、前記命令プリフェッチキューから取出
した命令に対応するダグビットが第2の状態であれば命
令を実行する代わりに割込を発生する手段、を含むこと
を特徴とする計算機。
(1) An instruction prefetch queue, which is provided in the instruction prefetch queue and has at least two states, a first and a second state, provided for each minimum unit when decoding an instruction; means for setting the dag bit in a first state and setting the dag bit in a second state when performing an instruction fetch in a special state; and a means for setting the dag bit in a second state when performing an instruction fetch in a special state; 2. A computer comprising means for generating an interrupt instead of executing an instruction if the computer is in state 2.
(2)前記特別な状態での命令フェッチは、命令をフェ
ッチするメモリのアドレスが、別に設けられたアドレス
レジスタの内容と一致したことが検出された状態での命
令フェッチである、特許請求の範囲第1項記載の計算機
(2) The instruction fetch in the special state is an instruction fetch in a state where it is detected that the address of the memory from which the instruction is fetched matches the contents of a separately provided address register. The calculator described in paragraph 1.
(3)前記特別な状態での命令フェッチは、命令をフェ
ッチするメモリのアドレスが、別に設けられたアドレス
管理装置によつてアクセスが禁止されているメモリ領域
であることが識別された状態での命令フェッチである、
特許請求の範囲第1項記載の計算機。
(3) Instruction fetch in the special state is performed when the memory address from which the instruction is fetched is identified as a memory area that is prohibited from access by a separately provided address management device. instruction fetch,
A computer according to claim 1.
(4)前記特別な状態での命令フェッチは、別に設けら
れたメモリアクセスエラー監視装置においてハードウェ
アの異常が検出された状態での命令フェッチである、特
許請求の範囲第1項記載の計算機。
(4) The computer according to claim 1, wherein the instruction fetch in the special state is an instruction fetch in a state where a hardware abnormality is detected by a separately provided memory access error monitoring device.
JP13653685A 1985-06-21 1985-06-21 Computer Pending JPS61294551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13653685A JPS61294551A (en) 1985-06-21 1985-06-21 Computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13653685A JPS61294551A (en) 1985-06-21 1985-06-21 Computer

Publications (1)

Publication Number Publication Date
JPS61294551A true JPS61294551A (en) 1986-12-25

Family

ID=15177481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13653685A Pending JPS61294551A (en) 1985-06-21 1985-06-21 Computer

Country Status (1)

Country Link
JP (1) JPS61294551A (en)

Similar Documents

Publication Publication Date Title
US7334161B2 (en) Breakpoint logic unit, debug logic and breakpoint method for a data processing apparatus
US5537559A (en) Exception handling circuit and method
US7043416B1 (en) System and method for state restoration in a diagnostic module for a high-speed microprocessor
US6289445B2 (en) Circuit and method for initiating exception routines using implicit exception checking
EP1324190B1 (en) Data processing system having a read-modify-write unit
EP0372751B1 (en) Pipelined data-processing apparatus
US10223117B2 (en) Execution flow protection in microcontrollers
JP3260083B2 (en) Debug system and debugging method
JP2007058588A (en) Processor having program protection function
JPH1196006A (en) Information processor
JPS61294551A (en) Computer
US6772372B2 (en) System and method for monitoring unaligned memory accesses
JPH06295243A (en) Data processor
JPH1049373A (en) Method and device for operating multiplex and highly accurate event for pipeline digital processor
JPS62144246A (en) Computer
US8176301B2 (en) Millicode assist instructions for millicode store access exception checking
JPH0646380B2 (en) Information processing equipment
JP2786215B2 (en) Restart processing control method
JP2504191B2 (en) Microprocessor
JP2562838B2 (en) Processor and store buffer control method
EP0382234B1 (en) Microprocessor having improved functional redundancy monitor mode arrangement
JPH06324861A (en) System and method for controlling cpu
JPH0795288B2 (en) Microcomputer
JP3119859B2 (en) Computer system
JPH04287231A (en) Microprocessor