JPH05224985A - Microprogram controller - Google Patents

Microprogram controller

Info

Publication number
JPH05224985A
JPH05224985A JP4059242A JP5924292A JPH05224985A JP H05224985 A JPH05224985 A JP H05224985A JP 4059242 A JP4059242 A JP 4059242A JP 5924292 A JP5924292 A JP 5924292A JP H05224985 A JPH05224985 A JP H05224985A
Authority
JP
Japan
Prior art keywords
address
microprocessor
memory
output
circuit
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
JP4059242A
Other languages
Japanese (ja)
Inventor
Masaaki Chinju
正昭 鎮守
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 JP4059242A priority Critical patent/JPH05224985A/en
Publication of JPH05224985A publication Critical patent/JPH05224985A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To early detect and analyze such a bug that a microprogram may have a runaway when the reading address of a memory shows an unused area of the microprogram and a memory access is carried out. CONSTITUTION:An address holding circuit 3 holds the address which is outputted to an internal memory 2 from a memory processor 1. A comparator 5 compares the output of a constant circuit 4 which set the address of an unused area of the memory 2 as a parameter with the output of the circuit 3. If the coincidence is secured by the comparison, a stop request signal is outputted to the microprocessor 1. Thus, the microprocessor 1 stops its instructions to keep a state set right after the output of an abnormal address and can early detect and analyze the bugs.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はマイクロプログラム制御
装置に係り、特にプログラムデバッグ時またはプログラ
ムの異常防止を実現するためのマイクロプログラム制御
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a micro program control device, and more particularly to a micro program control device for program debugging or for preventing program abnormalities.

【0002】[0002]

【従来の技術】従来のこの種のマイクロプログラム制御
装置は、マイクロプログラム走行時、マイクロプロセッ
サ(MPU)から外部にメモリアドレスを出力し、メモ
リ上に格納されているマイクロプログラムをフェッチし
て次の命令を実行しているが、プログラムデバッグ時は
プログラム設計ミスが起因して、メモリ内にマイクロプ
ログラムが格納されていないアドレスを出力し命令のフ
ェッチを行う場合があり、プログラムの走行が異常にな
り暴走してしまうことがある。
2. Description of the Related Art A conventional microprogram control device of this type outputs a memory address from a microprocessor (MPU) to the outside when a microprogram is running and fetches the microprogram stored in the memory to Although an instruction is being executed, during program debugging, an instruction may be fetched by outputting an address where the microprogram is not stored in the memory due to a program design mistake, which causes abnormal program running. It may run out of control.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のマイク
ロプログラム制御装置では、デバッグ時にメモリ内のマ
イクロプログラム未実装領域をアクセスすると不定のプ
ログラムを実行し、その結果管理テーブル等を破壊する
ため、プログラムが暴走してしまい、解析にプログラム
のトレースを採集して解析していたが、プログラムが暴
走をはじめてからプログラムをストップさせるまで時間
が経過しているため、異常となったときの状態が変化し
ており、原因究明に至るまで多大な解析時間を要すると
いう課題があった。また、この課題は、マイクロプログ
ラム制御装置自身のハードウェアが故障し、ハードウェ
ア/マイクロプログラムにてエラー検出等ができないよ
うな障害の場合も同様にマイクロプログラムが暴走する
可能性がある。
In the above-described conventional microprogram control device, when a microprogram unimplemented area in the memory is accessed during debugging, an undefined program is executed and, as a result, the management table or the like is destroyed. Runaway, and I was collecting and analyzing the program trace for analysis, but since the time has elapsed from the start of the program until the program was stopped, the state when it became abnormal changed. However, there is a problem that it takes a lot of time to analyze the cause. Further, this problem may also cause the microprogram to run out of control in the case where the hardware of the microprogram control device itself fails and the hardware / microprogram cannot detect an error.

【0004】[0004]

【課題を解決するための手段】本発明のマイクロプログ
ラム制御装置は、マイクロプログラムで走行するマイク
ロプロセッサと、上記マイクロプログラムが格納されて
いるメモリと、上記マイクロプロセッサが外部に出力す
るアドレスを保持するアドレス保持回路と、予めメモリ
の未使用領域のアドレスを定数として格納している定数
回路と、上記アドレス保持回路の出力と上記定数回路の
出力とを比較する比較回路と、この比較回路で一致した
際は上記マイクロプロセッサのプログラム走行を停止
(HALT)させる停止手段を備え、上記マイクロプロ
セッサが命令フェッチする際に外部に出力されるアドレ
スをメモリの未使用領域を示す上記定数回路と比較し一
致した際は上記マイクロプロセッサを停止させてプログ
ラムの暴走を防止できるようにしたものである。
A microprogram control device according to the present invention holds a microprocessor running by a microprogram, a memory storing the microprogram, and an address output to the outside by the microprocessor. The address holding circuit, a constant circuit that stores the address of an unused area of the memory as a constant in advance, a comparison circuit that compares the output of the address holding circuit with the output of the constant circuit, and this comparison circuit match. In this case, a stop means for stopping (HALT) the program running of the microprocessor is provided, and an address output to the outside when the microprocessor fetches an instruction is compared with the constant circuit indicating an unused area of the memory and coincides with each other. In this case, stop the above microprocessor to prevent program runaway. In which was to so that.

【0005】[0005]

【作用】本発明においては、内部メモリ内の未使用領域
のアドレスを予め定数回路に設定しておき、マイクロプ
ロセッサからメモリアクセス時出力させるアドレスを定
数回路内のパラメータと比較し、一致したらマイクロプ
ロセッサを停止(HALT)させる。
According to the present invention, the address of the unused area in the internal memory is set in advance in the constant circuit, and the address output from the microprocessor at the time of memory access is compared with the parameter in the constant circuit. HALT.

【0006】[0006]

【実施例】図1は本発明の一実施例を示すブロック図で
ある。この図1において、1はマイクロプログラムで走
行するマイクロプロセッサ(MPU)、2はマイクロプ
ログラムが格納されている内部メモリ、3はマイクロプ
ロセッサ1が外部に出力するアドレスを保持するアドレ
ス保持回路、4は予めメモリの未使用領域のアドレスを
定数として格納している定数回路、5はこのアドレス保
持回路3の出力と定数回路4の出力とを比較する比較回
路、6はマイクロプログラム制御装置内の内部バスであ
る。7はマイクロプロセッサ1に対して比較回路5でパ
ラメータ比較を行った結果一致している際に出力される
停止(HALT)指示信号を示し、この径路は、比較回
路5で一致した際はマイクロプロセッサ1のプログラム
走行を停止(HALT)させる停止手段を構成してい
る。そして、マイクロプロセッサ(MPU)1が命令フ
ェッチする場合に外部に出力されるアドレスをメモリの
未使用領域を示す定数回路4と比較し一致した場合は、
マイクロプロセッサ1を停止(HALT)させてプログ
ラムの暴走を防止できるように構成されている。
FIG. 1 is a block diagram showing an embodiment of the present invention. In FIG. 1, reference numeral 1 is a microprocessor (MPU) that runs with a microprogram, 2 is an internal memory in which the microprogram is stored, 3 is an address holding circuit that holds an address output from the microprocessor 1 to the outside, and 4 is A constant circuit which stores the address of an unused area of the memory as a constant in advance, 5 is a comparison circuit for comparing the output of the address holding circuit 3 and the output of the constant circuit 4, and 6 is an internal bus in the microprogram controller. Is. Reference numeral 7 denotes a stop (HALT) instruction signal that is output when the comparison results from the comparison of the parameters of the microprocessor 1 by the comparison circuit 5, and this path is the microprocessor when the comparison circuit 5 matches. The stop means for stopping (HALT) the program running of No. 1 is configured. Then, when the microprocessor (MPU) 1 fetches an instruction, the address output to the outside is compared with the constant circuit 4 indicating the unused area of the memory, and if they match,
The microprocessor 1 is stopped (HALT) to prevent a program runaway.

【0007】図2は図1における内部メモリ2の構成例
を示す説明図である。この図2において、アドレス00
000(H)〜3FFFF(H)およびE0000
(H)〜EFFFF(H)は実際にマイクロプロセッサ
1が使用しているマイクロプログラムの格納域または制
御テーブル等のエリアを示す。そして、アドレス400
00(H)〜7FFFF(H)は、ハードウェアとして
のメモリエリアは存在するがマイクロプログラムの未使
用領域を示す。アドレス80000(H)〜DFFFF
(H)はハードウェアとしてのメモリの存在しないエリ
アである。
FIG. 2 is an explanatory diagram showing a configuration example of the internal memory 2 in FIG. In FIG. 2, address 00
000 (H) to 3FFFF (H) and E0000
(H) to EFFFF (H) indicate storage areas of micro programs actually used by the microprocessor 1 or areas such as control tables. And the address 400
00 (H) to 7FFFF (H) indicate unused areas of the microprogram although the memory area as hardware exists. Address 80000 (H) ~ DFFFF
(H) is an area where a memory as hardware does not exist.

【0008】つぎに図1に示す実施例の動作を図2を参
照して説明する。まず、マイクロプログラム走行時、マ
イクロプロセッサ1は命令をフェッチするため外部にア
ドレス出力する。この出力されたアドレスはアドレス保
持回路3に保持されて内部メモリ2に対してアドレスを
供給する。そして、与えられたアドレスにより内部メモ
リ2内のデータ(命令)が読み出され、内部バス6を介
してマイクロプロセッサ1内に取り込む。このマイクロ
プロセッサ1は取り込まれたデータ(命令)をキューイ
ングし、キューを順次処理し命令を実行している。
Next, the operation of the embodiment shown in FIG. 1 will be described with reference to FIG. First, when the micro program is running, the microprocessor 1 outputs an address to fetch an instruction. The output address is held in the address holding circuit 3 to supply the address to the internal memory 2. Then, the data (instruction) in the internal memory 2 is read at the given address and is taken into the microprocessor 1 via the internal bus 6. The microprocessor 1 queues the fetched data (instruction), sequentially processes the queue, and executes the instruction.

【0009】つぎに、プログラムデバッグ時、マイクロ
プログラムの設計ミス(例えばジャンプ先アドレスの設
定ミス)により、内部メモリ2内にマイクロプログラム
が存在しないアドレス(40000(H)〜7FFFF
(H))をマイクロプロセッサ1が出力した場合、内部
メモリ2から出力されたデータはメモリクリア後のオー
ル「0」の値または不定の値が出力されマイクロプロセ
ッサ1にキューイングされる。キューが順次処理され不
定データを命令として処理する。マイクロプロセッサ1
は、内部メモリ2よりフェッチした命令が実行できる命
令コードに当てはまる場合はこの命令を実行し、その結
果、マイクロプロセッサ1の管理している制御情報の更
新および次の命令のフェッチを行う。ただし、この命令
実行後の結果は誤った処理を行っていることになり、次
々に正常な制御情報を破壊してしまう。そして、異常処
理を行ったことが判明し、トレース情報を解析しても有
効なデータが無い場合がある。本発明では、内部メモリ
2の未使用領域のアドレスの最上位桁(MSB):4ビ
ット(図2のメモリ構成では8/9/A/B/C/Dの
値,8/9/A/B/C/D:頭の桁数)をパラメータ
として定数回路4内に設定しておき、マイクロプロセッ
サ1から内部メモリ2をアクセス時に保持されているア
ドレス保持回路3の出力とそれぞれのパラメータを比較
回路5で比較し、一致したらマイクロプロセッサ1のH
ALT/STOPの入力端子への信号を活性化する。そ
して、このマイクロプロセッサ1は内部メモリ2の命令
を命令キューに取り込んだ時HALT端子からの割込み
を処理し命令停止を実行する。その結果マイクロプロセ
ッサ1は内部メモリ2からの読み込んだ誤った命令を実
行せず、命令がストップすることになり、マイクロプロ
セッサ1の管理している制御情報等を破壊するというこ
とはなく、異常アドレスのメモリアクセス直後の状態を
保持することになる。
Next, at the time of program debugging, an address (40000 (H) to 7FFFF) where the micro program does not exist in the internal memory 2 due to a design error of the micro program (for example, a jump destination address setting error).
When (H)) is output from the microprocessor 1, the data output from the internal memory 2 is queued in the microprocessor 1 with a value of all "0" after memory clear or an indefinite value. The queue is processed sequentially and indefinite data is processed as an instruction. Microprocessor 1
If the instruction fetched from the internal memory 2 is applicable to an executable instruction code, the instruction is executed, and as a result, the control information managed by the microprocessor 1 is updated and the next instruction is fetched. However, the result after the execution of this instruction means that erroneous processing is performed, and normal control information is destroyed one after another. Then, it may become clear that abnormal processing has been performed, and there may be no valid data even if the trace information is analyzed. In the present invention, the most significant digit (MSB) of the address of the unused area of the internal memory 2 is 4 bits (8/9 / A / B / C / D in the memory configuration of FIG. 2, 8/9 / A / B / C / D: number of leading digits) is set in the constant circuit 4 as a parameter, and the output of the address holding circuit 3 held when the internal memory 2 is accessed from the microprocessor 1 is compared with each parameter. Circuit 5 compares and if they match, H of microprocessor 1
Activates the signal to the ALT / STOP input terminal. When the instruction of the internal memory 2 is fetched into the instruction queue, the microprocessor 1 processes the interrupt from the HALT terminal and executes the instruction stop. As a result, the microprocessor 1 does not execute the erroneous instruction read from the internal memory 2, the instruction stops, and the control information managed by the microprocessor 1 is not destroyed. The state immediately after the memory access is retained.

【0010】[0010]

【発明の効果】以上説明したように本発明は、内部メモ
リ内の未使用領域のアドレスを予め定数回路に設定して
おき、マイクロプロセッサからメモリアクセス時出力さ
れるアドレスを定数回路内のパラメータと比較し、一致
したらマイクロプロセッサを停止(HALT)させるよ
うにしたので、異常アドレス出力直後で状態を保持でき
るため、デバッグ時のマイクロプログラムの暴走および
ハードウェア故障による出力アドレスの異常時にも、障
害解析の時間を短縮することができる効果がある。
As described above, according to the present invention, the address of the unused area in the internal memory is set in advance in the constant circuit, and the address output at the time of memory access from the microprocessor is set as the parameter in the constant circuit. By comparing and matching, the microprocessor is halted (HALT), so the state can be retained immediately after the abnormal address is output. Therefore, even when the output address is abnormal due to a runaway of the microprogram during debugging or a hardware failure, failure analysis is possible. There is an effect that the time can be shortened.

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】図1における内部メモリの構成例を示す説明図
である。
FIG. 2 is an explanatory diagram showing a configuration example of an internal memory in FIG.

【符号の説明】[Explanation of symbols]

1 マイクロプロセッサ(MPU) 2 内部メモリ(メモリ) 3 アドレス保持回路 4 定数回路 5 比較回路 1 Microprocessor (MPU) 2 Internal memory (memory) 3 Address holding circuit 4 Constant circuit 5 Comparison circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 マイクロプログラムで走行するマイクロ
プロセッサと、前記マイクロプログラムが格納されてい
るメモリと、前記マイクロプロセッサが外部に出力する
アドレスを保持するアドレス保持回路と、予めメモリの
未使用領域のアドレスを定数として格納している定数回
路と、前記アドレス保持回路の出力と前記定数回路の出
力とを比較する比較回路と、この比較回路で一致した際
は前記マイクロプロセッサのプログラム走行を停止させ
る停止手段を備え、前記マイクロプロセッサが命令フェ
ッチする際に外部に出力されるアドレスをメモリの未使
用領域を示す前記定数回路と比較し一致した際は前記マ
イクロプロセッサを停止させてプログラムの暴走を防止
するようにしたことを特徴とするマイクロプログラム制
御装置。
1. A microprocessor running on a micro program, a memory in which the micro program is stored, an address holding circuit for holding an address output from the microprocessor to the outside, and an address of an unused area of the memory in advance. Is stored as a constant, a comparison circuit for comparing the output of the address holding circuit with the output of the constant circuit, and a stopping means for stopping the program running of the microprocessor when the comparison circuit matches. When the instruction fetches by the microprocessor, the address output to the outside is compared with the constant circuit indicating the unused area of the memory, and when the addresses match, the microprocessor is stopped to prevent program runaway. A microprogram controller characterized in that
JP4059242A 1992-02-14 1992-02-14 Microprogram controller Pending JPH05224985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4059242A JPH05224985A (en) 1992-02-14 1992-02-14 Microprogram controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4059242A JPH05224985A (en) 1992-02-14 1992-02-14 Microprogram controller

Publications (1)

Publication Number Publication Date
JPH05224985A true JPH05224985A (en) 1993-09-03

Family

ID=13107729

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4059242A Pending JPH05224985A (en) 1992-02-14 1992-02-14 Microprogram controller

Country Status (1)

Country Link
JP (1) JPH05224985A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838952A (en) * 1996-05-28 1998-11-17 Mitsubishi Electric Semiconductor Software Co., Ltd. Emulator apparatus to break running program when variable is read without being initialized

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838952A (en) * 1996-05-28 1998-11-17 Mitsubishi Electric Semiconductor Software Co., Ltd. Emulator apparatus to break running program when variable is read without being initialized

Similar Documents

Publication Publication Date Title
JP4094724B2 (en) Apparatus and method for identifying exceptions when debugging software
EP0702297B1 (en) A data processor with breakpoint circuit
JPH10333939A (en) Microprocessor
EP1125199B1 (en) Method of debugging a program thread
JPH05224985A (en) Microprogram controller
US6990569B2 (en) Handling problematic events in a data processing apparatus
JP2754899B2 (en) Return address monitoring circuit of debug device
JPS60207935A (en) Detecting system of illegal instruction
JPH06202907A (en) Debug support device
JP2002116926A (en) Program processor and program processing method
JPH04367902A (en) Programmable controller
JPH02150933A (en) Debug controller
JPH0258135A (en) Information processor
JPS6270947A (en) Control system for debug interruption
JPH0314148A (en) Program breakdown detecting device
JPH05108402A (en) Debugging device
JPS63196952A (en) Information processor
JPH08263324A (en) Debug facilitation device
JPH04284544A (en) Micro-controller
JPH02263243A (en) Runaway processor for computer
JPH0784826A (en) Microprocessor
JPH06324911A (en) Interrupting method for program execution
JPH02188840A (en) Data processor
JPH11242613A (en) Microprocessor
JPH01240941A (en) Information processor