WO1993025967A1 - System for aiding debugging of integrated circuit microprocessor - Google Patents

System for aiding debugging of integrated circuit microprocessor Download PDF

Info

Publication number
WO1993025967A1
WO1993025967A1 PCT/JP1992/000743 JP9200743W WO9325967A1 WO 1993025967 A1 WO1993025967 A1 WO 1993025967A1 JP 9200743 W JP9200743 W JP 9200743W WO 9325967 A1 WO9325967 A1 WO 9325967A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
break
code
decoding
fetched
Prior art date
Application number
PCT/JP1992/000743
Other languages
French (fr)
Japanese (ja)
Inventor
Yuukou Matsumoto
Original Assignee
V.M. Technology 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 V.M. Technology Corp. filed Critical V.M. Technology Corp.
Priority to PCT/JP1992/000743 priority Critical patent/WO1993025967A1/en
Publication of WO1993025967A1 publication Critical patent/WO1993025967A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Definitions

  • the present invention relates to debugging support software for supporting program development in an integrated circuit microphone processor.
  • a debug support system called a debugger
  • a debugger which is a software alone or a combination of software and software.
  • a so-called software debugger consisting only of software often cannot handle the problem, so a debug support system using software is currently used.
  • a break is a function in which the execution of a program to be debugged is interrupted once, and control is transferred to the debug program. ( The contents of registers and memory that are being executed by debugging It is possible to check the execution history up to that point.
  • the address output by the microphone processor is checked, and if the address targeted for the break is output, the microprocessor is interrupted.
  • a method of multiplying, or a method of using hardware to overwrite an instruction to be fetched by a microprocessor when an address to be broken is output is adopted.
  • the execution inside the microprocessor is much faster when the address is detected externally.
  • the latter method of overriding an instruction that attempts to perform a fu- ture is not a problem if the starting address of the instruction is clear, but otherwise, it may cause a malfunction.
  • an instruction interpreting circuit comparable to the instruction decoder in the microprocessor must be provided externally to observe the instruction stream. In this case, the amount of hardware becomes extremely large. It will be lost.
  • the microprocessor has a cache system or the like, it will be more difficult to break at the target execution stage regardless of the method used.
  • an object of the present invention is to realize a debugging support system that can set a debugging break at an intended time without detecting an address.
  • An debugging support system for an integrated circuit microprocessor includes an instruction fetching device for fetching a machine language instruction, and an instruction decoding device for decoding a machine language instruction fetched by the instruction fetching device.
  • a command recognition device that identifies a particular operation code to the command decoding device if the operation code is a specific operation code, and a command execution device that executes the decoding result of the command decoding device.
  • the instruction decoding device when receiving the notification from the instruction recognition device, displays the machine language sequence fetched by the instruction fetching device on the platform. And interrupted the code operation, and summer to supply the predefined Deco generates an de results. Instruction execution device instructs a break.
  • the instruction execution device accepts a break and performs a debugging operation, it is desirable to control the operation of the command recognition device so that a break does not occur.
  • FIG. 1 is a schematic block diagram showing main components of an embodiment of the present invention.
  • FIG. 2 is a partial block diagram showing a part of the example of FIG. 1 in detail.
  • FIG. 3 is an explanatory diagram showing the configuration of a trap 'operation' control * register in FIG.
  • FIG. 4 shows the trap, control, register (mask) and con- trol in Fig. 2.
  • FIG. 3 is an explanatory diagram showing the configuration of a trap.
  • FIG. 1 shows a block diagram of the main components of one embodiment of the present invention.
  • This example is an example in which the debugging support system of the present invention is applied to a microprocessor implemented on a CMOS integrated circuit.
  • the machine language instruction group stored in the main storage device 1 is: Fetched by the instruction switch 3 via the 6-bit external data bus 2.
  • the machine instructions that have been flushed are transferred to the instruction decoding device 4, where they are decoded and converted into a format executable by the instruction execution device 5.
  • the converted instruction is transferred to the instruction execution device 5, where it is executed.
  • Reference numeral 6 denotes an instruction recognition device, and the machine language instruction transferred from the instruction fetch device 3 to the instruction decoding device 4 is also transferred to this instruction recognition device.
  • the instruction recognition device 6 examines the transmitted machine language sequence and determines whether or not the sequence has a specific operation code for causing a break. If it is determined that the operation code is a specific operation code, a break instruction signal S 6 is output to the instruction decoding device 4.
  • the command decoding device 4 abandons the normal command decoding operation and generates a predefined decoding result indicating a break, This is transferred to the instruction execution device 5.
  • Instruction execution unit 5 When the break operation instruction is received, the break operation is started and a break acceptance signal S5 is output to the instruction recognition device 6.
  • the command recognition device 6 interrupts the command recognition operation. That is, the fetched machine language instruction is
  • the instruction recognizing device 6 has a 32-bit width control register, which can store information on the start and restart of the break operation and the machine language instruction to be recognized, respectively. It has become.
  • FIG. 2 shows the details of the connection parts of the above-mentioned instruction switch 3, instruction decoder 4, and instruction recognition unit 6. As shown in the figure
  • the instruction switch 3 has a buffer 31 and an input selector 32.
  • the code buffer 31 is composed of two sets of 16-bit buffers, each of which has a 16-bit wide external data bus 2 to an external bus interface (not shown). Stores machine instructions aligned in 32 bits via.
  • Input selector 3 2
  • the input code and the buffer 61 latch the machine language sequence supplied through the input selector 32, and
  • the comparison result in the trap 'operation' code 'comparator 62 is supplied to 64, and the output of the later-described decode PLA is supplied from the instruction decoding device 4 side. Based on these outputs and its own mask value, it is determined whether or not a predetermined operation code for causing a break has been obtained. Note that the trap 'operation' code 'resistor register 63 and the control register (mask) ⁇ comparator 64 are connected to an instruction execution device via a 32 bit internal data bus 7. Connected to 5.
  • the decode PLA 41 of the instruction decoding device 4 receives the machine language instruction passed through the input selector 32 of the instruction fetch device 3.
  • the decode PLA41 decodes a machine language instruction and constantly determines whether or not the part of the machine language instruction to be decoded is an operation 'code part.
  • the output of the decode PLA 41 is supplied to the decoded instruction buffer control circuit 42 and also to the control register (mask) 'comparator 64 of the instruction recognition device.
  • FIG. 3 shows the bit configuration of the trap operation 'code register 63' of the instruction recognition device 6.
  • This register is an operation to be trapped. It is a register for storing code, and is a 32-bit 32-bit system divided into 4 units of 8 bits in accordance with the 6-bit system. It has a configuration.
  • the four systems of the aperture ratio are shown as “TRAP 0P-C0DE0”, “TRAP 0P-C0DE1”, These are indicated as “TRAP 0P-C0DE2" and "TRAP 0P-C0DE3".
  • the reason for making these partition units 8-bit configuration is that the machine language instructions in this example are variable-length in 8-bit units.
  • the reason for adopting the 32 bit configuration as a whole is to match the internal bus width of 32 bits, and the total number of bits varies depending on the internal bus width.
  • FIG. 4 shows the bit configuration of the control register in the control register (mask) comparator 64.
  • This in register is used to specify the type of operation code to be trapped, whether or not to execute the trap, and a trap specific to one of the four systems, called ⁇ ⁇ -CODEOJ. Used for controlling the aperture mask.
  • This register is 32 bits, of which the lower 17 bits are used for these purposes. 1 7-bit
  • the lower 8 bits are bits ( ⁇ ⁇ , ⁇ 1, ⁇ 2, ⁇ 3) for specifying the format of the operation code to be trapped. In this configuration, two bits are allocated.
  • the microprocessor of this example is capable of processing three different types of operation and code instructions.
  • the 20 bits are used to specify which of the three types of operation 'code to trap is in. If the system of machine language instructions handled is different, the bit structure for specifying the system will be different accordingly. In addition, if there is only one operation code system, such a bit group is unnecessary.
  • the middle 8 bits of the control register are a group of bits used to expand the comparison circuit. This is a group of control bits for controlling the extension performed for only one system called “0P-C0DE0”. By setting one bit of this control bit group to “1”, comparison of the corresponding bits in the ⁇ 0 ⁇ -C0DE0 ”system is prohibited. Such control can be applied to all of the four comparison systems, or can be set so as not to be applied to any of them.
  • the 17th bit (TEN) of the register is used to control the enable / disable of the entire comparison circuit. This bit can be read and written by an instruction via the internal bus 7. Also, this bit can be forcibly set to the disabled state by a signal indicating that the operation 'code * trap is accepted and executed.
  • a specific operation code that should cause a break is specified by a trap 'operation' code 'register 63 (see FIG. 3) in the instruction recognizer 6. ). Also, set the contents of the control 'register (mask) in the control' register (mask) 64 (see Fig. 4). In this state, execute the program to be debugged. During execution of the program, the machine language instruction fetched by the instruction fetch device 3 is transferred to the instruction decoding device 4 and also to the instruction recognition device 6 for n. In the trap 'operation • code' comparator 62 of the instruction recognition device 6, the operation code of the received machine language instruction is stored in the operation stored in the register 63. ⁇ Compare with code.
  • the instruction decoding device 4 generates a predefined decoding result indicating a break instead of the decoding result of the machine language instruction latched by the instruction fetching device 3,
  • the generated decoding result is transferred to the instruction execution device 5. This causes the instruction execution device 5 to start a break operation.
  • a break acceptance signal S 5 is output from the instruction execution device 5 to the instruction recognition device 6.
  • the break acceptance signal S5 is received, the 17th bit (TEN) of the trap 'control' register of the instruction recognition device 6 is forcibly set to a state indicating that comparison operation is not permitted. You. Therefore, after this, the relative narrowing operation in the instruction recognition device is not performed.
  • the output of the break acceptance signal S6 stops, and the content of the 17th bit of the trap 'control' register is returned to a state where the relative operation is permitted again.
  • the instruction recognition device is arranged to detect a specific operation code to cause a break, and when such an operation code is detected, the instruction decoding device is controlled. Then, a break operation is started. Therefore, it is possible to cause a break at an intended time and perform a program debugging operation without being based on an address generated with the execution of an instruction. Also, in this example, the operation of the instruction recognition device is set to a non-permitted state during the execution of the break operation. It is possible to avoid a break during the operation. [Industrial applicability]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

In the system, a machine instruction fetched by an instruction fetching unit (3) is transferred to an instruction recognizing unit (6) as well as to an instruction decoding unit (4). The instruction recognizing unit (6) judges whether or not the operation-code part of the transferred machine instruction is the operation-code to generate a break operation. When an affirmative decision is made, the instruction decoding unit (4) is informed of the message to that effect. The instruction decoding unit (4) transfers a predefined decode result instructing the break operation instead of the decode result of the fetched instruction to an instruction executing unit (5). Thereby, the break operation is started by the instruction executing unit. Therefore, without sensing the address generated with the execution of the instruction, a break is caused at the time intended by the program, and the debugging can be performed.

Description

明 細 書  Specification
集積回路マイクロプロセッサのデバッグ支援システム  Debugging support system for integrated circuit microprocessor
〔技術分野〕 〔Technical field〕
本発明は集積回路マイク口プロセッサにおけるプログラム開発を 支援するためのデバッグ支援 ドウエアに関するものである。  The present invention relates to debugging support software for supporting program development in an integrated circuit microphone processor.
〔背景技術〕 (Background technology)
集積回路マイクロプロセッサ用のプログラムを開発する場合、 ソ フ トウェア単独、 あるいは ドウエアおよびソフ トウエアの共同 によるデバッガと呼ばれるデバッグ支援システムが使用されること が多い。 特に、 マイクロプロセッサ応用システムを開発する途上で は、 ソフ トウェアのみからなる所謂ソフ トウエア · デバッガでは対 処できない場合が多いので、 ドウエアを使用したデバッグ支援 システムが採用されるのが現状である。  When developing a program for an integrated circuit microprocessor, a debug support system called a debugger is often used, which is a software alone or a combination of software and software. In particular, when developing a microprocessor application system, a so-called software debugger consisting only of software often cannot handle the problem, so a debug support system using software is currently used.
このハー ドウエアを使用したデバッグ支援システムは、 エミ ユ レ 一夕あるいはイ ン ' サ一キッ ト ' エミ ュレータと呼ばれ、 数々の形 態で実用化されている。 これらのデバッグ支援システムに備わって いる一般的な機能と してブレークと呼ばれるものがある。 ブレーク とは、 デバッグ対象のプログラムの実行途中において、 その実行を 一旦打切り、 制御をデバッグ · プログラムに移行させる機能である ( デバッグ · プログラムの実行によって、 実行途中のレジスタおよび メモリの内容、 まはたそれまでの実行履歴を調べることが可能であ る。 Debugging support systems that use this hardware are called emulators or emulators, and have been put into practical use in a number of forms. A general function of these debug support systems is called a break. A break is a function in which the execution of a program to be debugged is interrupted once, and control is transferred to the debug program. ( The contents of registers and memory that are being executed by debugging It is possible to check the execution history up to that point.
このブレークを外部 ドウエアによって行う場合には、 マイク 口プロセッサが出力するァ ドレスを検査して、 ブレークの対象とな るア ドレスが出力された場合に、 マイクロプロセッサに割り込みを 掛ける方法、 あるいは、 ブレークの対象となるア ドレスが出力され た場合にマイクロプロセッサがフェッチを行おう とする命令をハ一 ドウエアでオーバライ ドする方法等が採用されている。 しかし、 ァ ドレスを検出して割り込みを掛ける方法では、 内部で高度にパイプ ライ ン化されたマイクロプセッザの場合には、 外部でァ ドレスを検 出した時点ではマイクロプロセッサ内部の実行は遙に先行している ので、 意図した時点で実行を中断できない場台がある。 また、 後者 のフユツチを行おうとする命令をオーバライ ドする方法では、 命令 の先頭番地が明らかになつている場合には問題はないが、 それ以外 の場合には、 誤動作を引き起こすおそれがある。 かかる誤動作を回 避するためには、 マイクロプロセッサ内の命令デコーダに匹敵する 命令解釈回路を外部に設けて命令ス ト リームを観測せざるを得ず、 このようにするとハー ドウエア量が非常に大き く なつてしまう。 さ らに、 マイクロプロセッサがキャ ッ シュ · システム等を内蔵してい る場合には、 いずれの方法を採用しても、 目標とする実行段階でブ レークを掛けることが更に困難になる。 When this break is performed by external hardware, the address output by the microphone processor is checked, and if the address targeted for the break is output, the microprocessor is interrupted. A method of multiplying, or a method of using hardware to overwrite an instruction to be fetched by a microprocessor when an address to be broken is output is adopted. However, in the method of detecting an address and generating an interrupt, in the case of a microprocessor that is highly pipelined internally, the execution inside the microprocessor is much faster when the address is detected externally. There are platforms where execution cannot be interrupted at the intended time because it is ahead of schedule. Also, the latter method of overriding an instruction that attempts to perform a fu- ture is not a problem if the starting address of the instruction is clear, but otherwise, it may cause a malfunction. In order to avoid such malfunctions, an instruction interpreting circuit comparable to the instruction decoder in the microprocessor must be provided externally to observe the instruction stream. In this case, the amount of hardware becomes extremely large. It will be lost. Furthermore, if the microprocessor has a cache system or the like, it will be more difficult to break at the target execution stage regardless of the method used.
そこで、 ブレークを掛けるためのハー ドウェアをマイ クロプロセ ッサの内部に取り込むことが考えられている。 このようにすると、 内部の夕イ ミ ング信号を利用できるので、 高度にパイプライ ン化さ れたマイクロプロセッサ、 キャ ッシュ · システムなどを内蔵したマ イク口プロセッサにおいても、 適切な内部信号を利用して意図した 時点で実行を中断することが可能である。  Therefore, it has been considered to incorporate hardware for making a break into the microprocessor. In this way, the internal evening signal can be used, so even a microprocessor with a highly pipelined microprocessor or cache system can use the appropriate internal signal. It is possible to suspend execution at the intended time.
いずれにせよ、 一般的に利用されているデバッグ支援システムは、 そのためのハー ドウェアがマイクロプロセッサの内外のいずれに取 付けられている場合においても、 ア ドレス出力を監視して、 特定の ァ ドレス出力を検出した時点でブレークを掛けるという基本的動作 は同一である。 そこで、 本発明は、 ァ ドレスを検出することなく 、 意図する時点 でデバッグ用のブレークを掛けることの可能なデバッグ支援システ ムを実現することを目的と している。 In any case, a commonly used debug support system monitors address output and outputs a specific address, regardless of whether the hardware for that purpose is installed inside or outside the microprocessor. The basic operation of setting a break at the time of detecting is the same. Therefore, an object of the present invention is to realize a debugging support system that can set a debugging break at an intended time without detecting an address.
〔発明の開示〕 [Disclosure of the Invention]
本発明による集積回路マイ ク口プロセッサのデバッグ支援システ ムは、 機械語命令をフユ ツチする命令フ ツチ装置と、 この命令フ エ ッチ装置によってフエ ツチされた機械語命令を解読する命令デコ 一ド装置と、 命令フエ ツチ装置によってフ X ツチされた機械語命令 を受け取り、 この機械語命令のオペレーシヨ ン · コ一ドが予め設定 されている特定のオペレーシヨ ン · コ一ドであるか否かを識別し、 特定のオペレーショ ン · コー ドである場合には、 命令デコー ド装置 に対してその旨を通報する命令認識装置と、 命令デコー ド装置のデ コ一 ド結果を実行する命令実行装置とを有しており、 命令デコ一 ド 装置は、 命令認識装置から通報を受け取った場台には、 この命令フ エ ッチ装置によってフヱ ツチされた機械語命合のデコー ド動作を中 断して、 ブレークを指示する予め定義済みのデコ一 ド結果を生成し. 命令実行装置に供給するようになつている。  An debugging support system for an integrated circuit microprocessor according to the present invention includes an instruction fetching device for fetching a machine language instruction, and an instruction decoding device for decoding a machine language instruction fetched by the instruction fetching device. Receiving the machine instruction executed by the instruction fetch device and whether or not the operation code of the machine instruction is a predetermined operation code. A command recognition device that identifies a particular operation code to the command decoding device if the operation code is a specific operation code, and a command execution device that executes the decoding result of the command decoding device. The instruction decoding device, when receiving the notification from the instruction recognition device, displays the machine language sequence fetched by the instruction fetching device on the platform. And interrupted the code operation, and summer to supply the predefined Deco generates an de results. Instruction execution device instructs a break.
ここに、 命令実行装置がブレークを受け付けて、 デバッグ動作を 行っている間は、 ブレークが発生することのないように、 命合認識 装置の動作を制御することが望ま しい。  Here, while the instruction execution device accepts a break and performs a debugging operation, it is desirable to control the operation of the command recognition device so that a break does not occur.
〔図面の簡単な説明〕 ' 第 1 図は、 本発明の一実施例の主要構成部分を示す概略プロッ ク 図である。 BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic block diagram showing main components of an embodiment of the present invention.
第 2囟は、 第 1 図の例における一部分を詳細に示す部分プロッ ク 図である。 第 3図は、 第 2図における トラ ップ ' オペレーショ ン ' コン ト口 一ル * レジスタの構成を示す説明図である。 FIG. 2 is a partial block diagram showing a part of the example of FIG. 1 in detail. FIG. 3 is an explanatory diagram showing the configuration of a trap 'operation' control * register in FIG.
第 4図は、 第 2図における トラ ップ · コン トロール ' レジスタ ( マスク) · コンハ。レー夕内の トラ ップ . コン トロール ' レジス夕の 構成を示す説明図である。  Fig. 4 shows the trap, control, register (mask) and con- trol in Fig. 2. FIG. 3 is an explanatory diagram showing the configuration of a trap.
〔発明を実施するための最良の形態〕 [Best mode for carrying out the invention]
以下に、 図面を参照して本発明の実施例を説明する。  Hereinafter, embodiments of the present invention will be described with reference to the drawings.
第 1 図には、 本発明の一実施例の主要構成部分のプロッ ク図を示 してある。 本例は、 C M O S集積回路上に実現されたマイ クロプロ セッサに対して本発明のデバッグ支援システムを適用した例である, 主記憶装置 1 に格納されている機械語命令群は、 順次に、 1 6 ビッ ト幅の外部データ · バス 2を介して命令フヱ ツチ装置 3 によってフ エ ッチされる。 フヱツチされた機械語命令は、 命令デコー ド装置 4 に転送されて、 ここで、 解読されて、 命令実行装置 5が実行可能な 形式に変換される。 変換後の命令は命令実行装置 5に転送され、 こ こにおいて実行される。  FIG. 1 shows a block diagram of the main components of one embodiment of the present invention. This example is an example in which the debugging support system of the present invention is applied to a microprocessor implemented on a CMOS integrated circuit. The machine language instruction group stored in the main storage device 1 is: Fetched by the instruction switch 3 via the 6-bit external data bus 2. The machine instructions that have been flushed are transferred to the instruction decoding device 4, where they are decoded and converted into a format executable by the instruction execution device 5. The converted instruction is transferred to the instruction execution device 5, where it is executed.
6 は命令認識装置であり、 命令フ ツチ装置 3から命令デコー ド 装置 4 に転送される機械語命令が、 この命令認識装置に対しても転 送される。 命令認識装置 6においては、 転送されてきた機械語命合 を検査して、 それが、 ブレークを発生させるべき特定のオペレーシ ヨ ン · コー ドを有しているか否かを判別する。 特定のオペレーショ ン · コ一ドであることを判別した場合には、 ブレーク指示信号 S 6 を命令デコー ド装置 4 に対して出力する。 命合デコ一 ド装置 4 にお いては、 このブレーク指示信号 S 6を受け取ると、 通常の命合デコ 一ド動作を放棄して、 ブレークを指示する予め定義済みのデコー ド 結果を生成し、 これを命令実行装置 5に転送する。 命令実行装置 5 では、 このブレーク動作命令を受け取ると、 ブレーク動作を開始す ると共に、 ブレーク受付信号 S 5を命令認識装置 6 に対して出力す る。 このブレーク受付信号 S 5を受け取ると、 命合認識装置 6 は命 令認識動作を中断する。 すなわち、 フェッチされた機械語命令がブReference numeral 6 denotes an instruction recognition device, and the machine language instruction transferred from the instruction fetch device 3 to the instruction decoding device 4 is also transferred to this instruction recognition device. The instruction recognition device 6 examines the transmitted machine language sequence and determines whether or not the sequence has a specific operation code for causing a break. If it is determined that the operation code is a specific operation code, a break instruction signal S 6 is output to the instruction decoding device 4. Upon receiving the break instruction signal S6, the command decoding device 4 abandons the normal command decoding operation and generates a predefined decoding result indicating a break, This is transferred to the instruction execution device 5. Instruction execution unit 5 When the break operation instruction is received, the break operation is started and a break acceptance signal S5 is output to the instruction recognition device 6. Upon receiving the break acceptance signal S5, the command recognition device 6 interrupts the command recognition operation. That is, the fetched machine language instruction is
5 レークを発生させるべき特定のオペレ一シヨ ン · コ一ドであるか否 かの判別動作を中断する。 本例において、 命令認識装置 6 は 3 2 ビ ッ ト幅の制御レジスタを内蔵しており、 このレジスタ内に、 ブレー ク動作の開始、 再開、 および認識すべき機械語命令に関する情報が それぞれ格納可能となっている。 また、 本例では命令認識装置 6 と5 Suspends the operation to determine whether it is a specific operation code that should cause a rake. In this example, the instruction recognizing device 6 has a 32-bit width control register, which can store information on the start and restart of the break operation and the machine language instruction to be recognized, respectively. It has become. In this example, the instruction recognition device 6
, η 命令実行装置 5 とが 3 2 ビッ ト幅の内部データ · バス 7で結合され ており、 命令認識装置 6内の制御レジスタの内容を、 命令実行装置 5 において実行される命令によって読み書き可能となっている。 第 2図には、 上記の命令フ ッチ装置 3、 命令デコー ド装置 4お よび命令認識装置 6の接続部分の詳細を示してある。 図に示すよう, η Instruction execution unit 5 is connected by a 32-bit internal data bus 7 so that the contents of the control register in instruction recognition unit 6 can be read and written by the instructions executed in instruction execution unit 5. Has become. FIG. 2 shows the details of the connection parts of the above-mentioned instruction switch 3, instruction decoder 4, and instruction recognition unit 6. As shown in the figure
, 5 に、 命令フ ッチ装置 3 は ッファ 3 1 および入力セレク タ 3 2を備えている。 コー ド · バッファ 3 1 は 2組の 1 6 ビッ ト · 'ッファから構成されており、 1 6 ビッ ト幅の外部データ · バス 2 から外部バス · イ ンタ一フヱ一ス (図示せず) を介して 3 2 ビッ ト に整列された機械語命令を格納する。 入力セレクタ 3 2 は、 コー ド, 5, the instruction switch 3 has a buffer 31 and an input selector 32. The code buffer 31 is composed of two sets of 16-bit buffers, each of which has a 16-bit wide external data bus 2 to an external bus interface (not shown). Stores machine instructions aligned in 32 bits via. Input selector 3 2
2 0 くッファ 3 1 を構成する 1 6 ビッ トバッファのうちのいずれに格 納されている機械語命令を転送するのかを選択するためのマルチプ レクサ回路である。 20 Multiplexer circuit for selecting which of the 16-bit buffers that make up the buffer 31 to transfer the machine instruction stored in it.
命令認識装置 6 において、 入力コー ド , バッファ 6 1 は上記の入 力セレクタ 3 2を介して供給される機械語命合をラ ツチして、 トラ In the instruction recognition device 6, the input code and the buffer 61 latch the machine language sequence supplied through the input selector 32, and
2 5 ップ ' オペレーショ ン ' コー ド ' コ ンパレ一夕 6 2 に対する出力を. 発生する。 この トラップ ' オペレーショ ン ' コー ド ' コンパレータ 6 2 に対する出力は 4系統に分割されて供給される。 ここの トラ ッ プ ' オペレーショ ン ' コー ド ' コ ンパレー夕 6 2 において、 受け取 つた内容が、 ブレークを発生させるべきオペレ一シヨ ン ' コー ドが 格納されている トラ ップ ' オペレーショ ン ' コー ド ' レジスタ 6 3 の内容と比較される。 この比較動作は、 4系統がそれぞれ独立に行 われる。 次に、 コン トロール ' レジス夕 (マスク) ' コンパレータ2 5 Outputs for 'Operation' Code 'Comparator 6 2'. The output to this trap 'operation' code 'comparator 62 is divided into four systems and supplied. The truck here In the 'operation' code 'comparator 62, the received content is the trap' operation 'code' register 6 3 where the operation 'code' at which a break should occur is stored. Is compared with the contents of This comparison operation is performed independently for each of the four systems. Next, the control 'Register evening (mask)' comparator
6 4 には、 トラップ ' オペレーショ ン ' コー ド ' コ ンパレータ 6 2 での比較結果が供給されると共に、 命令デコー ド装置 4の側から後 述するデコー ド P L Aの出力が供給される。 これらの出力と、 自身 の持つマスク値とに基づき、 ブレークを起こすべき予め定められた オペレーショ ン · コー ドが得られたか否かの判別を行う。 なお、 ト ラ ップ ' オペレーショ ン ' コー ド ' レジス夕 6 3およびコ ン ドロー ル . レジスタ (マスク) · コンパレータ 6 4 は、 3 2 ビッ トの内部 データ · バス 7を介して、 命令実行装置 5に接続されている。 The comparison result in the trap 'operation' code 'comparator 62 is supplied to 64, and the output of the later-described decode PLA is supplied from the instruction decoding device 4 side. Based on these outputs and its own mask value, it is determined whether or not a predetermined operation code for causing a break has been obtained. Note that the trap 'operation' code 'resistor register 63 and the control register (mask) · comparator 64 are connected to an instruction execution device via a 32 bit internal data bus 7. Connected to 5.
命令デコー ド装置 4のデコー ド P L A 4 1 においては、 命令フエ ツチ装置 3の入力セレクタ 3 2を通過した機械語命令を受け取る。 このデコー ド P L A 4 1 は、 機械語命令をデコー ドする共に、 デコ ー ド対象となっている機械語命令の部分がオペレーシヨ ン ' コー ド 部分なのか否かを常時判定している。 デコー ド P L A 4 1 の出力は、 デコー ド済み命令バッファ制御回路 4 2 に供給されると共に、 上記 の命令認識装置のコン トロール · レジスタ (マスク) ' コンパレー タ 6 4 にも供袷される。  The decode PLA 41 of the instruction decoding device 4 receives the machine language instruction passed through the input selector 32 of the instruction fetch device 3. The decode PLA41 decodes a machine language instruction and constantly determines whether or not the part of the machine language instruction to be decoded is an operation 'code part. The output of the decode PLA 41 is supplied to the decoded instruction buffer control circuit 42 and also to the control register (mask) 'comparator 64 of the instruction recognition device.
第 3図には、 命令認識装置 6の トラップ · オペレーショ ン ' コ一 ド · レジスタ 6 3のビッ ト構成を示してある。 このレジスタは トラ ップすべきオペレーシヨ ン . コ一 ドを格納するためのレジス夕であ り、 4系統の.コンパレ一夕 6 2 に合わせて 8 ビッ ト毎に 4区画され た 3 2 ビッ ト構成となっている。 図においては、 比絞の 4系铳を、 最下位ビッ 卜の側から 「TRAP 0P-C0DE0 」 、 「TRAP 0P-C0DE1 」 、 「TRAP 0P-C0DE2 」 、 「TRAP 0P-C0DE3 」 と して示してある。 これ らの区画単位を 8 ビッ ト構成と した理由は、 本例における機械語命 令が 8 ビッ ト単位で可変長だからである。 従って、 機械語命令の体 系が異なれば、 これに伴ってレジスタ 6 3の構成も異なる。 同様に、 全体と して 3 2 ビッ ト構成と した理由は、 内部バス幅である 3 2 ビ ッ 卜に合わせたためであり、 内部バス幅に応じて全体のビッ ト数も 異なる。 FIG. 3 shows the bit configuration of the trap operation 'code register 63' of the instruction recognition device 6. This register is an operation to be trapped. It is a register for storing code, and is a 32-bit 32-bit system divided into 4 units of 8 bits in accordance with the 6-bit system. It has a configuration. In the figure, the four systems of the aperture ratio are shown as “TRAP 0P-C0DE0”, “TRAP 0P-C0DE1”, These are indicated as "TRAP 0P-C0DE2" and "TRAP 0P-C0DE3". The reason for making these partition units 8-bit configuration is that the machine language instructions in this example are variable-length in 8-bit units. Therefore, if the system of the machine language instruction is different, the configuration of the register 63 is different accordingly. Similarly, the reason for adopting the 32 bit configuration as a whole is to match the internal bus width of 32 bits, and the total number of bits varies depending on the internal bus width.
第 4図には、 コン トロール ' レジスタ (マスク) ' コンパレータ 6 4内のコン ト ΰ一ル . レジス夕のビッ ト構成を示してある。 この i n レジスタは、 トラ ップすべきオペレーシヨ ン · コ一ドの形式指定、 トラ ップの実行の許否、 および、 比較 4系統のうちの Γ ΟΡ- CODEOJ と呼ばれる一つの系統に特有な 卜ラップ比絞マスクの制御のために 使用される。 このレジスタは 3 2 ビッ ト構成であるが、 そのうちの 下位 1 7 ビッ 卜がこれらの目的のために使用される。 1 7 ビッ 卜の FIG. 4 shows the bit configuration of the control register in the control register (mask) comparator 64. This in register is used to specify the type of operation code to be trapped, whether or not to execute the trap, and a trap specific to one of the four systems, called ΟΡ ΟΡ-CODEOJ. Used for controlling the aperture mask. This register is 32 bits, of which the lower 17 bits are used for these purposes. 1 7-bit
1 5 うち、 下位 8 ビッ トは、 トラ ップすべきオペレーショ ン · コー ドの 形式指定を行うためのビッ ト群 (ΜΑΡΟ、 ΜΑΡ1、 ΜΑΡ2、 ΜΑΡ3) であり、 4系铳の比較回路に対して 2 ビッ トずつ割り当てられた構成となつ ている。 本例のマイクロプロセッサでは 3種類の異なるオペレーシ ヨ ン . コー ド体系の命令を処理可能となっており、 このために、 2Of these, the lower 8 bits are bits (ビ ッ, ΜΑΡ1, ΜΑΡ2, ΜΑΡ3) for specifying the format of the operation code to be trapped. In this configuration, two bits are allocated. The microprocessor of this example is capable of processing three different types of operation and code instructions.
2 0 ビッ 卜を用いて、 トラ ップすべきオペレーシヨ ン ' コー ドが 3種類 のうちのいずれの体系に属するものであるのかを指定するようにな つている。 取り扱う機械語命令の体系が異なれば、 それに応じて体 系を特定するためのビッ ト構成も異なってく る。 また、 オペレーシ ヨ ン · コー ド体系が 1種類の場合には、 かかるビッ ト群は不要となThe 20 bits are used to specify which of the three types of operation 'code to trap is in. If the system of machine language instructions handled is different, the bit structure for specifying the system will be different accordingly. In addition, if there is only one operation code system, such a bit group is unnecessary.
2 Γ> る。 2 Γ>
次に、 コン トロール · レジスタの中位 8 ビッ ト(TRAP OP-CODEO-M ASK)は、 比較回路の拡張に用いられるビッ ト群であり、 比較 4 系铳 のうちの 「0P-C0DE0」 と呼ばれる一つの系統に対してのみ実施され た拡張を制御するための制御ビッ ト群である。 この制御ビッ ト群の うちの一つのビッ トを Γ 1」 に設定することによって、 Γ 0Ρ- C0DE0 」 系統の該当するビッ 卜の比較が禁止される。 かかる制御は、 比較 4系統の全てに対して適用すること も可能であり、 またいずれに対 しても施さないように設定すること も可能である。 次に、 レジスタ の 1 7 ビッ ト目 (TEN)は、 比較回路全体の許可、 不許可を制御する ためのものである。 このビッ トは、 内部バス 7を介して命令により 読み書き可能である。 また、 このビッ トは、 オペレーシ ョ ン ' コ一 o ド * トラップの受付、 実行を示す信号によって強制的に不許可の状 態に設定可能である。 Next, the middle 8 bits of the control register (TRAP OP-CODEO-MASK) are a group of bits used to expand the comparison circuit. This is a group of control bits for controlling the extension performed for only one system called “0P-C0DE0”. By setting one bit of this control bit group to “1”, comparison of the corresponding bits in the {0} -C0DE0 ”system is prohibited. Such control can be applied to all of the four comparison systems, or can be set so as not to be applied to any of them. Next, the 17th bit (TEN) of the register is used to control the enable / disable of the entire comparison circuit. This bit can be read and written by an instruction via the internal bus 7. Also, this bit can be forcibly set to the disabled state by a signal indicating that the operation 'code * trap is accepted and executed.
本例のマイクロプロセッサにおいては、 まず、 ブレークを発生さ せるべき特定のオペレーシヨ ン · コ一ドを、 命令認識装置 6におけ る トラ ップ ' オペレーショ ン ' コー ド ' レジスタ 6 3 (図 3参照) に格納する。 また、 コン トロール ' レジスタ (マスク) コ ンパレー 夕 6 4内のコン トロール ' レジスタ (第 4図参照) の内容を設定す る。 この状態で、 デバッグ対象のプログラムを実行する。 プログラ ム実行中において、 命令フヱ ッチ装置 3でフェ ツチされた機械語命 令は、 命令デコー ド装置 4 に転送されると共に、 命令認識装置. 6 に n 対しても転送される。 命令認識装置 6の トラ ップ ' オペレーシ ョ ン • コー ド ' コ ンパレータ 6 2においては、 受け取った機械語命令の オペレーシ ョ ン · コー ドを、 レジスタ 6 3 に格納されているォペレ —シ ヨ ン · コー ドと比絞する。  In the microprocessor of this example, first, a specific operation code that should cause a break is specified by a trap 'operation' code 'register 63 (see FIG. 3) in the instruction recognizer 6. ). Also, set the contents of the control 'register (mask) in the control' register (mask) 64 (see Fig. 4). In this state, execute the program to be debugged. During execution of the program, the machine language instruction fetched by the instruction fetch device 3 is transferred to the instruction decoding device 4 and also to the instruction recognition device 6 for n. In the trap 'operation • code' comparator 62 of the instruction recognition device 6, the operation code of the received machine language instruction is stored in the operation stored in the register 63. · Compare with code.
ブレークを発生させるべき命令オペレーシヨ ン · コー ドが供給さ 5 れた場合には、.このコンパレータ 6 2において一致が得られ、 一致 'を示す信号がコン トロール · レジスタ (マ夂ク) ' コ ンパレータ 6 4 に供給される。 コ ン ト ロール ' レジスタ (マスク) ' コ ンパレー タ 6 4では、 この一致信号と、 命令デコ一 ド装置 4から得られるデ コー ド P L A出力と、 自身の持つマスク値とに基づき、 ブレークを 発生させるべき特定のオペレーシヨ ン · コ一ドが得られたか否かの 最終判別を行う。 この特定のオペレ一シヨ ン · コ一ドが得られたと 判別された場合には、 その旨を示す信号 S 6を命令デコー ド装置 4 のデコー ド済み命令バッファ制御回路 4 2に出力する。 これ以後は、 命令デコー ド装置 4では命令フヱ ッチ装置 3でフヱッチされた機械 語命令のデコー ド結果の代わりに、 ブレークを指示する予め定義済 みのデコー ド桔果を生成して、 この生成したデコー ド結果を命令実 行装置 5に転送する。 命令実行装置 5では、 これによりブレーク動 作を開始する。 When an instruction operation code for causing a break is supplied, a match is obtained in the comparator 62, and a signal indicating a match is output from the control register (control register). Supplied to 6 4. Control 'Register (mask)' Control Based on the coincidence signal, the decoded PLA output obtained from the instruction decoding device 4 and the mask value of its own, the data 64 obtains a specific operation code for generating a break. Make a final determination of whether or not it has been performed. When it is determined that the specific operation code has been obtained, a signal S6 indicating the determination is output to the decoded instruction buffer control circuit 42 of the instruction decoding device 4. Thereafter, the instruction decoding device 4 generates a predefined decoding result indicating a break instead of the decoding result of the machine language instruction latched by the instruction fetching device 3, The generated decoding result is transferred to the instruction execution device 5. This causes the instruction execution device 5 to start a break operation.
ブレーク動作が開始されると、 ブレーク受付信号 S 5が命令実行 装置 5から命令認識装置 6に出力される。 このブレーク受付信号 S 5を受け取ると、 命令認識装置 6の トラ ップ ' コン トロール ' レジ ス夕の 1 7 ビッ ト目 (TEN)が、 比較動作の不許可を示す状態に強制 的に設定される。 従って、 この後は、 命令認識装置における比絞動 作は行われない。 ブレーク動作が終了すると、 ブレーク受付信号 S 6の出力が止み、 トラップ ' コン トロール ' レジスタの 1 7 ビッ ト 目の内容が、 再び比蛟動作を許可する状態に戻される。  When the break operation is started, a break acceptance signal S 5 is output from the instruction execution device 5 to the instruction recognition device 6. When the break acceptance signal S5 is received, the 17th bit (TEN) of the trap 'control' register of the instruction recognition device 6 is forcibly set to a state indicating that comparison operation is not permitted. You. Therefore, after this, the relative narrowing operation in the instruction recognition device is not performed. When the break operation is completed, the output of the break acceptance signal S6 stops, and the content of the 17th bit of the trap 'control' register is returned to a state where the relative operation is permitted again.
このように、 本例においては命令認識装置を配置して、 ブレーク を発生させるべき特定のオペレーシヨ ン ' コー ドを検出し、 かかる オペレーショ ン . コ一 ドが検出されたときには命令デコー ド装置を 制御して、 ブレーク動作を開始させるようにしている。 よって、 命 令実行に伴って発生するァ ドレスに基づく ことなく、 意図する時点 でブレークを起こ して、 プログラムのデバッグ作業を行う ことが可 能になる。 また、 本例では、 ブレーク動作の実行中には命令認識装 置の動作を不許可の状態に設定しているので、 ブレーク動作の実行 中にブレークが発生することを回避できる。 〔産業上の利用可能性〕 As described above, in this example, the instruction recognition device is arranged to detect a specific operation code to cause a break, and when such an operation code is detected, the instruction decoding device is controlled. Then, a break operation is started. Therefore, it is possible to cause a break at an intended time and perform a program debugging operation without being based on an address generated with the execution of an instruction. Also, in this example, the operation of the instruction recognition device is set to a non-permitted state during the execution of the break operation. It is possible to avoid a break during the operation. [Industrial applicability]
以上説明したように、 本発明の集積回路マイクロプロセッサにお いては、 特定のオペレーショ ン · コードを有する機械語命令がフヱ ツチされたことを検出可能なハードウェアを内部に組み込み、 かか る特定のオペレーシ ョ ン · コードを検出したときにブレーク動作を 開始するようにしている。 従って、 本発明によれば、 命令の実行に 伴い発生するァドレスに基づき'ブレーク動作の開始を制御する必要 がなくなる。 従って、 意図する時点でブレークを発生させることが 困難であるといったァドレス検出に基づく ブレーク動作制御方法の 問題点を解消することができ、 意図するプログラムのデバッグ作業 を容易に実現することができる。  As described above, in the integrated circuit microprocessor of the present invention, hardware capable of detecting that a machine instruction having a specific operation code has been fetched is incorporated therein. Break operation is started when a specific operation code is detected. Therefore, according to the present invention, it is not necessary to control the start of the break operation based on an address generated with the execution of an instruction. Therefore, it is possible to solve the problem of the break operation control method based on address detection that it is difficult to generate a break at an intended time, and it is possible to easily realize an intended program debugging operation.

Claims

請 求 の 範 囲 The scope of the claims
1 . 機械語命令をフェ ッチする命令フ ツチ装置と、 この命令フ ニッチ装置によってフエツチされた機械語命令を解読する命令デ コー ド装置と、 前記命令フヱツチ装置によってフヱ ツチされた機 械語命令を受け取り、 この機械語命令のオペレーシヨ ン ' コー ド が予め設定されている特定のオペレーシヨ ン ' コー ドであるか否 かを識別し、 特定のオペレーショ ン · コー ドである場合には、 前 記命令デコー ド装置に対してその旨を通報する命令認識装置と、 前記命令デコー ド装置のデコ一 ド桔果を実行する命令実行装置と i o を有し、 前記命令デコー ド装置は、 前記命令認識装置から通報を 受け取った場合には、 前記命令フヱツチ装置によってフヱ ツチさ れた機械語命令のデコー ド動作を中断して、 ブレークを指示する 予め定義済みのデコー ド結果を生成し、 このデコー ド結果を前記 命令実行装置に供給するようになっていることを特徴とする集積 1. An instruction fetching device for fetching a machine language instruction, an instruction decoding device for decoding a machine language instruction fetched by the instruction witch, and a machine fetched by the instruction fetching device Language instruction, and identifies whether the operation 'code' of this machine instruction is a predetermined specific operation 'code, and if it is a specific operation code, An instruction recognition device for notifying the instruction decoding device to that effect, an instruction execution device for executing a decoding result of the instruction decoding device, and io, wherein the instruction decoding device comprises: When a message is received from the instruction recognition device, the decoding operation of the machine language instruction fetched by the instruction fetching device is interrupted, and a break is instructed in advance. It generates a defined already decode result, characterized in that is adapted to supply the decode result to the instruction execution unit integrated
1 5 回路マイクロプロセッサのデバッグ支援システム。 A debugging support system for 15-circuit microprocessors.
2 . 前記命令実行装置は、 ブレーク動作中にある旨を前記命令認 識装置に通報して、 この命令認識装置による前記のオペレーショ ン · コ一ドの識別動作を中断させるようになつていることを特徴 とする請求の範囲第 1項に記載の集積回路マイクロプロセッサの 2. The instruction execution device notifies the instruction recognition device that a break operation is being performed, and interrupts the operation code identification operation by the instruction recognition device. The integrated circuit microprocessor according to claim 1, wherein
2 Π デバッグ支援システム。 2 デ バ ッ グ Debugging support system.
PCT/JP1992/000743 1992-06-08 1992-06-08 System for aiding debugging of integrated circuit microprocessor WO1993025967A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP1992/000743 WO1993025967A1 (en) 1992-06-08 1992-06-08 System for aiding debugging of integrated circuit microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP1992/000743 WO1993025967A1 (en) 1992-06-08 1992-06-08 System for aiding debugging of integrated circuit microprocessor

Publications (1)

Publication Number Publication Date
WO1993025967A1 true WO1993025967A1 (en) 1993-12-23

Family

ID=14042383

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1992/000743 WO1993025967A1 (en) 1992-06-08 1992-06-08 System for aiding debugging of integrated circuit microprocessor

Country Status (1)

Country Link
WO (1) WO1993025967A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998047069A1 (en) * 1997-04-16 1998-10-22 Symantec Corporation Fault management during emulation-based antivirus scanning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58165148A (en) * 1982-03-26 1983-09-30 Hitachi Ltd Instruction stop circuit
JPS63163543A (en) * 1986-12-25 1988-07-07 Nec Corp Information processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58165148A (en) * 1982-03-26 1983-09-30 Hitachi Ltd Instruction stop circuit
JPS63163543A (en) * 1986-12-25 1988-07-07 Nec Corp Information processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998047069A1 (en) * 1997-04-16 1998-10-22 Symantec Corporation Fault management during emulation-based antivirus scanning

Similar Documents

Publication Publication Date Title
EP2273377B1 (en) Interrupt control apparatuses and methods
JP4703718B2 (en) Selective subroutine return structure
JPH07219809A (en) Apparatus and method for data processing
US7376820B2 (en) Information processing unit, and exception processing method for specific application-purpose operation instruction
JPS6250934A (en) Interrupting control system of processor
JP2677719B2 (en) Information processing device
WO1993025967A1 (en) System for aiding debugging of integrated circuit microprocessor
JPH08171504A (en) Emulation device
JP2001154877A (en) Device and method for controlling interruption
JP2504191B2 (en) Microprocessor
JP5012562B2 (en) Microcomputer
JP2808757B2 (en) Microprocessor for debugging
JPH04306743A (en) Debug support system for integrated circuit microprocessor
JP2870405B2 (en) Information processing device
JPH0764822A (en) Microcomputer
JP2871429B2 (en) Processor with runaway monitoring function
JPH07225681A (en) Interruption controller
JPH06103110A (en) Breakpoint setting system
JPH0954698A (en) Data processor and its interruption processing method
JP2503210B2 (en) Micro program controller
JPS61240341A (en) Microprogram controller
JPH03164945A (en) Data processor
JPH08263304A (en) Arithmetic processing unit
JPH0683983A (en) Microcomputer
JPH04290130A (en) Error control system of processor

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH DE DK ES FR GB GR IT LU MC NL SE

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase