JPH02264340A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH02264340A
JPH02264340A JP1083896A JP8389689A JPH02264340A JP H02264340 A JPH02264340 A JP H02264340A JP 1083896 A JP1083896 A JP 1083896A JP 8389689 A JP8389689 A JP 8389689A JP H02264340 A JPH02264340 A JP H02264340A
Authority
JP
Japan
Prior art keywords
program
register
upper limit
lower limit
execution
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
JP1083896A
Other languages
Japanese (ja)
Inventor
Toshirou Harui
治居 敏朗
Kiyoshi Mitsune
清 三根
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
NEC Engineering Ltd
Original Assignee
NEC Corp
NEC Engineering Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp, NEC Engineering Ltd filed Critical NEC Corp
Priority to JP1083896A priority Critical patent/JPH02264340A/en
Publication of JPH02264340A publication Critical patent/JPH02264340A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To easily detect the run-away of a program through a fact that an operating range exceeds an under-mentioned boundary by providing an upper limit and a lower limit boundary registers to show the operating range of the program, and comparing them always with a program counter. CONSTITUTION:In an initial state, the maximum value of a memory is written previously in the upper limit boundary register 3, and the minimum value is written in the lower limit boundary register 4. At the start of execution, after the program writes at first the upper limit and the lower limit of the range within which it operates in the register 3 and the register 4 respectively, it sets them to start a comparing function using a comparison circuit 6. The comparison circuit 6 compares always the contents of the program counter 5 and the register 3, 4. As the result of this comparison, when the compared result exceeds this range, a sequencer 7 is informed of this state, and the function of the comparison circuit 6 is stopped. The sequencer 7 sets a special value to the counter 5, and executes a special program.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロプロセッサを使用し危システムでのプ
ログラム開発においてデバッグを容易にする回路を組み
込んだマイクロプロセッサに関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microprocessor that uses a microprocessor and incorporates a circuit that facilitates debugging during program development in a critical system.

〔従来の技術〕[Conventional technology]

通常、情報処理装置において、関預中のシステムをデバ
ッグするときは、プログラムの流れを1ステツプもしく
′は数ステップずつ順次実行させてハードウェアの動作
およびソフトウェアが意図した論理通りに動作している
かについて調査することKよって行表っている。この場
合、ハードウェアが安定して動作を始めた後は、ソフト
ウェアの論理を追いかけて行くことにより、不具合を発
見することができるが、ハードウェアが安定していない
開発の初期の段階においては、ソフトウェアの意図した
通シには動作せず、実行途中からそのプログラムの動作
範囲外のメモリ領域でプログラムが実行されることがあ
る(以下プログラムの暴走と呼ぶ)。このプログラムの
暴走は、その原因を調査することは困難であり、従来で
は回路の各部での動作波形をとり、異常な動作波形を示
しているものがないか否かを調べることにより、原因の
追跡を行なっていた。
Normally, when debugging a system under control in an information processing device, the program flow is sequentially executed one step or several steps at a time to ensure that the hardware and software operate according to the intended logic. It is indicated by K to investigate whether there are any animals. In this case, once the hardware has started operating stably, it is possible to discover defects by following the logic of the software, but in the early stages of development when the hardware is not stable, The software may not operate as intended, and the program may be executed in a memory area outside the program's operating range midway through execution (hereinafter referred to as program runaway). It is difficult to investigate the cause of this program runaway, and conventionally, the cause can be determined by taking the operating waveforms of each part of the circuit and checking whether there are any abnormal operating waveforms. I was doing a chase.

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

しかし表から、前述した従来の方法では、異常波形を捕
えることは偶然に近いことおよび小型システムで最近極
めて多く用いられるようになつ九マイクロプロセッサを
使用したシステムにおいてプロセッサの内部を調査する
ことができないため、前記プログラムの暴走の原因を突
き止めることは極めて困難であつ九。
However, the table shows that with the conventional methods described above, it is almost impossible to capture abnormal waveforms by chance, and it is not possible to investigate the inside of the processor in systems using nine microprocessors, which have recently become extremely popular in small systems. Therefore, it is extremely difficult to determine the cause of the runaway program.

(課題を解決する九めの手段〕 このような課題を解決するために本発明は、内部にプロ
グラムの動作範囲の上限、下限を示す上限、下限境界レ
ジスタと、この上限、下限境界レジスタの内容とプログ
ラム実行アドレスを有するプログラムカウンタの内容と
を常時比較する比較回路と、プログラムの実行途中に上
限、下限境界レジスタで示された動作範囲を逸脱したと
きに外部にその状態を示す信号を出力する信号端子と、
動作範囲を逸脱したときにプログラムの実行を中止し予
め設定されているプログラムを実行する手段とを有して
いる。
(Ninth Means for Solving the Problems) In order to solve these problems, the present invention internally has upper and lower boundary registers indicating the upper and lower limits of the operating range of the program, and the contents of these upper and lower boundary registers. A comparator circuit that constantly compares the contents of the program counter with the program execution address, and outputs a signal to the outside when the operating range indicated by the upper and lower boundary registers is exceeded during program execution. signal terminal,
and means for stopping execution of the program and executing a preset program when the operating range is exceeded.

〔作 用〕[For production]

本発明においては、信号端子から信号が出力さ、れると
、プログラムの暴走が検出される。
In the present invention, program runaway is detected when a signal is output from the signal terminal.

〔実施例〕〔Example〕

次に本発明にりいて図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

図は本発明の一実施例を示すブロック図である。The figure is a block diagram showing one embodiment of the present invention.

同図において、1はマイクロプロセッサ内での演算実行
などに使用される複数のレジスタから構成されるレジス
タファイル、2は演算を実行する演算回路、3はプログ
ラムの上限値を有する上限境界レジスタ、4はプログラ
ムの下限値を有する下限境界レジスタ、5はプログラム
実行アドレスを有するプログラムカウンタ、6はプログ
ラムカウンタ5の値と上限、下限境界レジスタ3,4の
値とを比較する比較回路、7はプログラムの実行順を制
御するシーケンサ、8はプログラムが境界を越したこと
を外部に通知する信号を出力する信号端子、11はマイ
クロプロセッサ内でデータを伝送するローカルデータバ
スである。
In the figure, 1 is a register file composed of a plurality of registers used for executing calculations within the microprocessor, 2 is an arithmetic circuit that executes calculations, 3 is an upper limit boundary register having the upper limit value of the program, and 4 5 is a program counter having a program execution address; 6 is a comparison circuit that compares the value of program counter 5 with the values of upper and lower boundary registers 3 and 4; 7 is a program counter; A sequencer controls the execution order; 8 is a signal terminal that outputs a signal notifying the outside that the program has crossed a boundary; 11 is a local data bus that transmits data within the microprocessor.

次に仁のように構成されたマイクロプロセッサを使用し
てデバッグするときの手法について説明する。
Next, we will explain how to debug using a microprocessor configured like Jin.

まず、初期状態において、上限境界レジスタ3にはシス
テム内のメモリの最大値が、また下限境界レジスタ4に
はシステム内のメモリの最小値がそれぞれ書き込まれて
いる。さらに比較回路6は、プログラムカウンタ5の値
との比較を実行しないように設定されている。次に実行
を開始するとき、プログラムは最初に自己の動作する範
囲の上限を上限境界レジスタ3に、その下限を下限境界
レジスタ4にそれぞれ書き込んだ後、比較回路6による
比較機能を開始するように設定する。この設定が実施さ
れた後、比較回路6は常時プログラムカウンタ5と上限
、下限境界レジスタ3.4との内容を比較する。そして
、プログラムカウンタ5の値が上限、下限境界レジスタ
3,4の示す範囲を越えたとき、比較回路6は信号端子
8を通して外部に状況を知らせる信号を出力すると同時
にシーケンサTにこの状況を知らせた後、比較回路6の
機能を停止させる。シーケンサTは境界を越えたことが
通知されたとき、予め定められている特別な値をプログ
ラムカウンタ5に設定し、その後は特別なプログラムの
実行が開始される。
First, in the initial state, the maximum memory value in the system is written in the upper boundary register 3, and the minimum memory value in the system is written in the lower boundary register 4. Further, the comparison circuit 6 is set not to perform comparison with the value of the program counter 5. Next, when starting execution, the program first writes the upper limit of its operating range to the upper limit boundary register 3 and its lower limit to the lower limit boundary register 4, and then starts the comparison function by the comparison circuit 6. Set. After this setting is carried out, the comparator circuit 6 constantly compares the contents of the program counter 5 with the upper and lower boundary registers 3.4. When the value of the program counter 5 exceeds the range indicated by the upper and lower boundary registers 3 and 4, the comparator circuit 6 outputs a signal informing the outside of the situation through the signal terminal 8, and at the same time notifies the sequencer T of this situation. After that, the function of the comparator circuit 6 is stopped. When the sequencer T is notified that the boundary has been crossed, it sets a predetermined special value in the program counter 5, and thereafter starts executing the special program.

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

以上説明したように本発明は、動作するプログラムの範
囲を示す上限、下限境界レジスタを設け、この上限、下
限境界レジスタの内容とプログラムカウンタの内容とを
常時比較するようKL、プログラムの動作範囲が設定さ
れた範囲を越えたとき、外部から知ることができるよう
に構成したことにより、プログラムの暴走を知ることが
でき 7% −ドクエアの動作とプログラムのデバッグ
とが容易にできるという極めて優れた効果が得られる。
As explained above, the present invention provides upper and lower boundary registers that indicate the range of an operating program, and constantly compares the contents of the upper and lower boundary registers with the contents of the program counter. By configuring it so that it can be known from the outside when the set range is exceeded, it is possible to know if the program is running out of control. 7% - An extremely excellent effect that allows you to easily debug the operation of Doquare and the program. is obtained.

【図面の簡単な説明】 図は本発明の一実施例によるマイクロプロセッサの構成
を示すブロック図である。 1・・・・レジスタファイル、2・・・・演算回路、3
・・・・上限境界レジスタ、4・・・・下限境界レジス
タ、5・・・・プログラムカウンタ、 ・比較回路、 ・シーケンサ ・信号端子、 0−カルデー タバス
BRIEF DESCRIPTION OF THE DRAWINGS The figure is a block diagram showing the configuration of a microprocessor according to an embodiment of the present invention. 1...Register file, 2...Arithmetic circuit, 3
...Upper limit register, 4...Lower limit register, 5...Program counter, ・Comparison circuit, ・Sequencer/signal terminal, 0-cal data bus

Claims (1)

【特許請求の範囲】[Claims] プログラムの実行範囲の上限を示す上限境界レジスタと
、前記プログラムの実行範囲の下限を示す下限境界レジ
スタと、前記上限、下限境界レジスタの内容とプログラ
ム実行アドレスを有するプログラムカウンタの値とを比
較する比較回路と、前記プログラムの実行途中に上限、
下限境界レジスタで示された実行範囲を逸脱したときに
外部にその状態を示す信号を出力する信号端子と、前記
実行範囲を逸脱したときにプログラムの実行を中止し予
め設定されているプログラムを実行させる手段とを備え
たことを特徴とするマイクロプロセッサ
Comparison that compares the upper limit boundary register indicating the upper limit of the execution range of the program, the lower limit boundary register indicating the lower limit of the execution range of the program, the contents of the upper limit and lower limit boundary registers, and the value of the program counter having the program execution address. circuit and the upper limit during execution of said program,
A signal terminal that outputs a signal indicating the state to the outside when the execution range indicated by the lower limit register is exceeded, and a signal terminal that stops the program execution and executes the preset program when the execution range is exceeded. A microprocessor characterized by comprising means for causing
JP1083896A 1989-04-04 1989-04-04 Microprocessor Pending JPH02264340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1083896A JPH02264340A (en) 1989-04-04 1989-04-04 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1083896A JPH02264340A (en) 1989-04-04 1989-04-04 Microprocessor

Publications (1)

Publication Number Publication Date
JPH02264340A true JPH02264340A (en) 1990-10-29

Family

ID=13815394

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1083896A Pending JPH02264340A (en) 1989-04-04 1989-04-04 Microprocessor

Country Status (1)

Country Link
JP (1) JPH02264340A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04123440U (en) * 1991-04-20 1992-11-09 日本電気アイシーマイコンシステム株式会社 micro computer
JPH05173840A (en) * 1991-12-20 1993-07-13 Nec Corp Microcomputer
JPH06309192A (en) * 1993-04-23 1994-11-04 Nec Corp Peripheral controller

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04123440U (en) * 1991-04-20 1992-11-09 日本電気アイシーマイコンシステム株式会社 micro computer
JPH05173840A (en) * 1991-12-20 1993-07-13 Nec Corp Microcomputer
JPH06309192A (en) * 1993-04-23 1994-11-04 Nec Corp Peripheral controller

Similar Documents

Publication Publication Date Title
US5717851A (en) Breakpoint detection circuit in a data processor and method therefor
JPH03244003A (en) Partial executing method for programmable controller and sequence program
US6321289B1 (en) Apparatus for automatically notifying operating system level applications of the occurrence of system management events
JPH02264340A (en) Microprocessor
JPH0314136A (en) Mutual diagnostic system for microprocessor system
JPH04262426A (en) Microprocessor
JPH074669Y2 (en) Interrupt request processing circuit
JPH10240571A (en) Address tracing circuit
JP2760067B2 (en) Emulation system
JPH02264339A (en) Information processor
JPH0652333A (en) Single chip microcomputer
JPH03119449A (en) Calculating device
JPS63124143A (en) Information processor
JPS62197834A (en) Microprogram controller
JPH0272457A (en) Data transfer device
JPH04262430A (en) Microprocessor
JPH04330549A (en) Controller
JPS6091458A (en) Program debug device of microprocessor
JPH04170687A (en) Microcomputer
JPS62100845A (en) Test system for information processor
JPH04107748A (en) Microcomputer
JPS63143636A (en) Break point controller
JPS5835289B2 (en) Data processing device with control program processing monitoring function
JPH0782447B2 (en) DMA data transfer control device
JPS63197247A (en) Microprogram controller