JPS63310027A - Semiconductor integrated circuit - Google Patents

Semiconductor integrated circuit

Info

Publication number
JPS63310027A
JPS63310027A JP62145715A JP14571587A JPS63310027A JP S63310027 A JPS63310027 A JP S63310027A JP 62145715 A JP62145715 A JP 62145715A JP 14571587 A JP14571587 A JP 14571587A JP S63310027 A JPS63310027 A JP S63310027A
Authority
JP
Japan
Prior art keywords
instruction
output
circuit
register
decode
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
JP62145715A
Other languages
Japanese (ja)
Inventor
Yoshiharu Funabashi
舩橋 義治
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP62145715A priority Critical patent/JPS63310027A/en
Publication of JPS63310027A publication Critical patent/JPS63310027A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To detect an abnormal operation of a CPU writing data in excess of a stack memory area by providing a register setting a permissible maximum consecutive number of time data of a CALL instruction. CONSTITUTION:A data representing the permissible maximum consecutive number of times of a CALL instruction is set to a register 3. An up-down counter 2 is cleared by a clear decode signal of a signal line 8 when an instruction decode circuit 1 decodes a counter clear instruction, counted up by a CALL decode signal of a signal line 6 when the circuit 1 decodes the CALL instruction and counted down by a RET decode signal of a signal line 7 when the circuit 1 decodes a RET instruction. A comparator circuit 4 compares an output 9 of the register 3 with an output 10 of the counter 2 and outputs a detection signal to an interruption generating circuit 5 through a signal line 11 when the output 10 of the counter 2 exceeds an output 9 of the register 3. The circuit 5 generates interrupt when the detection signal is inputted.

Description

【発明の詳細な説明】 一 [発明の目的] (産業上の利用分野) 本発明は、たとえばマイクロプロセッサやlチップマイ
クロコンピュータなどのように中央処理装置( cpu
 )機能を有する半導体集積回路に係)、%にスタック
メモリ領域へのデータ格納に際しての格納領域の良否を
監視する回路に関する。
Detailed Description of the Invention (1) [Objective of the Invention] (Industrial Application Field) The present invention is directed to a central processing unit (cpu) such as a microprocessor or an l-chip microcomputer.
2) relates to a semiconductor integrated circuit having a function of 2), and a circuit for monitoring the quality of a storage area when data is stored in a stack memory area.

(従来の技術) 一般ニ、マイクロコンピュータ(以下,マイコンと略記
する〕においては、プログラムの途中でサブルーチンを
実行し得るように、ハードウェアとしてはスタックポイ
ンタを有し、ソフトウェアとしてはサブルーチン呼出し
命令(CALL )と復帰命令(RET )とを有する
。上記スタックポインタは、通常、初期値としてメモリ
領域の上位番地が設定されている。そして、サブルーチ
ンの実行は次の手順で行われる。即ち、メインプログラ
ムの途中K CALL命令があると、このCALL命令
の次の命令のアドレス(アドレスカウンタの内容)をス
タックポインタで指示されるアドレスのメモリ領域に退
避格納し、サブルーチンの先頭アドレスに移ってサブル
ーチンの実行を開始する。このとき、スタックポインタ
はディクリメントされ、次に退避格納すべきメモリ領域
のアドレスを指示するようになる。上記サブルーチンの
最後0RET命令を実行すると、前記メモリに格納され
ているアドレス(戻シアドレス)を読み出し、このアド
レスに移ってメインプログラムの途中から実行を再開す
る。このと1!i、スタックポインタはインクリメント
され、上記サブルーチンが呼出される前の値に戻る。ま
た、前記サブルーチンの途中に再びCALL命令がある
場合には、上記したと同様に、CALL命令の次に実行
すべき命令のアドレスを、スタックポインタで指示され
るアドレスのメモリ領域に退避格納して、別のサブルー
チンの先頭アドレスに移ると共にスタックポインタをデ
ィクリメントしておく。このとき、格納先のメモリ領域
のアドレスは、元のサブルーチンを呼出したときの格納
先のメモリ領域のアドレスよりも前(小さい側)である
。そして、上記側のサブルーチンの実行を終了してその
最後のRET命令を実行すると、前記したと同様に、戻
シアドレスを読み出し、元のサブルーチンの途中から実
行を再開すると共にスタックポインタをインクリメント
しておく。
(Prior Art) In general, microcomputers (hereinafter abbreviated as microcomputers) have stack pointers as hardware and subroutine call instructions ( CALL) and a return instruction (RET).The stack pointer is usually set to an upper address in the memory area as an initial value.The subroutine is executed in the following steps.That is, the main program If there is a CALL instruction in the middle of the process, the address of the next instruction after this CALL instruction (the contents of the address counter) is saved in the memory area at the address indicated by the stack pointer, and the process moves to the start address of the subroutine and executes the subroutine. At this time, the stack pointer is decremented and points to the address of the memory area to be saved next.When the last 0RET instruction of the above subroutine is executed, the address stored in the memory ( read the return address), move to this address, and resume execution from the middle of the main program.At this time, 1!i, the stack pointer is incremented and returns to the value before the above subroutine was called.In addition, the above subroutine If there is a CALL instruction again in the middle of the process, the address of the instruction to be executed next after the CALL instruction is saved and stored in the memory area at the address indicated by the stack pointer, and another subroutine is executed. The stack pointer is decremented at the same time as moving to the first address of Then, when the execution of the above-mentioned subroutine is finished and the last RET instruction is executed, the return address is read out, and execution is resumed from the middle of the original subroutine, and the stack pointer is incremented, as described above. I'll keep it.

上記したように、サブルーチンの実行に際してCALL
命令が連続して実行されると、スタックポインタのディ
クリメントに伴って順次アドレス指定されるメモリ領域
に戻シ、アドレスが格納されていく。
As mentioned above, when executing a subroutine, CALL
When instructions are executed successively, the addresses are stored back in the memory areas that are sequentially addressed as the stack pointer is decremented.

しかし、なんらかの原因によりプログラムが暴走し、あ
るいはプログラムの誤りによ#)CALL命令の実行を
予め許容された回数以上連続して繰シ返すと、メモリ領
域への戻シアドレスの格納も繰シ返し行われ、戻シアド
レスの格納用として予め割シ当てられたメモリ領域外ま
で上記格納が行われてしまう、これによって、この部分
に予めプログラムやデータが格納されていた場合、これ
らのプログラムやデータが破壊されてしまい、マイコン
自体が制御不能状態罠なってしまうという問題があった
However, if the program runs out of control for some reason, or if the CALL instruction is repeated for more than a pre-allowed number of times, the storage of the return address in the memory area will also be repeated. This causes the above storage to be performed outside the memory area pre-allocated for storing the return address.As a result, if programs or data were previously stored in this area, these programs and data will be lost. There was a problem in that the microcomputer itself was destroyed and the microcomputer itself became uncontrollable.

なお、このような問題は、上記CALL命令とRET命
令とを用いるサブルーチン処理だけではなく、スタック
ポインタおよびメモリの一部のスタックメモリ領域を使
うその他の処理(PUSH命令とpop命令とを用いる
レジスタデータの一時退避処理なと)に際しても同様に
発生する。
Note that such problems occur not only in subroutine processing using the above-mentioned CALL and RET instructions, but also in other processing that uses the stack pointer and part of the stack memory area (register data processing using the PUSH and POP instructions). The same problem occurs during temporary save processing.

(発明が解決しようとする問題点) 本発明は、上記したようにプログラムの誤シとか暴走に
起因してスタックメモリ領域を越えてメモリに書き込み
が行われることによって、この部分のプログラムやデー
タが破壊されてしまうという問題点を解決すべくなされ
たもので、上記スタックメモリ領域を越えて沓込みを行
なおうとするCPU動作の異常を検出でき、上記スタッ
クメモリ領域外のプログラムやデータの破壊を防止し得
る半導体集積回路を提供することを目的とする。
(Problems to be Solved by the Invention) As described above, the present invention solves the problem that when writing is performed in memory beyond the stack memory area due to a program error or runaway, the program or data in this part is This was developed to solve the problem of corruption, and it can detect abnormalities in CPU operation that attempt to write beyond the stack memory area, and prevents the destruction of programs and data outside the stack memory area. An object of the present invention is to provide a semiconductor integrated circuit that can prevent the above problems.

[発明の構成コ (問題点を解決するための手段) 本発明の半導体集積回路は、CPU機能を有する半導体
集積回路において、命令デコード回路と。
[Configuration of the Invention (Means for Solving Problems) A semiconductor integrated circuit of the present invention is a semiconductor integrated circuit having a CPU function, and includes an instruction decoding circuit.

この命令デコード回路の所定のデコード出力に対応して
アップカウントあるいはダウンカウントされるアップダ
ウンカウンタと、所定のデータを格納するレジスタと、
このレジスタの出力と前記アップダウンカウンタの出力
との大小関係を比較し、この大小関係に応じ走出力を発
生する比較回路とを具備することを特徴とする・ (作用) たとえばサブルーチン実行に際して、CALL命令、R
ET命令の実行に伴ってアップダウンカウンタを逆方向
にカウントさせ、レジスJ1にはスタックメモリ領域に
対応するCALL命令の許容最大連続回数データを設定
しておけば、アップダウンカウンタのカウント値がレジ
スタの値を越えたときの比較回路によってCPU動作の
異常を検出できるようになり、この検出出力に基いて割
込みを発生させ、所定の処理ルーチンを実行させてプロ
グラムやデータの破壊、プログラムの暴走を防ぐことが
できる。また、上記CALL命令が一度も実行されてい
ないか、あるいはCALL命令とRgT命令とが同じ回
数実行された状態でRET命令を実行したときに前記カ
ウンタから得られるアンダーフロー出力をCPU動作の
異常検出出力として利用することが可能になる。
an up/down counter that counts up or down in response to a predetermined decode output of the instruction decode circuit; a register that stores predetermined data;
The present invention is characterized by comprising a comparison circuit that compares the magnitude relationship between the output of this register and the output of the up-down counter and generates a running output according to this magnitude relationship. (Function) For example, when executing a subroutine, CALL Command, R
If the up/down counter is counted in the opposite direction with the execution of the ET instruction, and the maximum allowable consecutive number of CALL instructions corresponding to the stack memory area is set in register J1, the count value of the up/down counter will be stored in the register. It is now possible to detect an abnormality in the CPU operation using a comparison circuit when the value exceeds the value of It can be prevented. Furthermore, when the CALL instruction has never been executed or the CALL instruction and the RgT instruction have been executed the same number of times, the underflow output obtained from the counter when the RET instruction is executed is used to detect an abnormality in the CPU operation. It can be used as output.

(実施例) 以下、図面を参照して本発明の一実施例を詳細に説明す
る。
(Example) Hereinafter, an example of the present invention will be described in detail with reference to the drawings.

第1図はマイクロプロセッサと同一半導体チップ上く形
成されている回路を示している。卸ち。
FIG. 1 shows a circuit formed on the same semiconductor chip as a microprocessor. Wholesale.

1は命令デコード回路であり、命令コードのうちのCA
LL命令をデコードしたときKは信号線6にCALLデ
コード信号を出力し、RET命令をデコードしたときに
は信号@7にRETデコード信号を出力し、カウンタク
リア命令(専用の命令コードでもよく、他の命令コード
を兼用するようにしてもよい)をデコードしたときにI
Ii倍号Hsにクリアデコード信号を出力する。2はア
ップダウンデータであシ、上記クリアデコード信号が入
力したときクリアし、上記CALLデコード信号が入力
したときカウントアツプし、上記RET 5″2−ド1
ぎ号が入力したときカウントダウンする。3はCALI
、命令の許容最大連続回数を表わすデータを記憶するレ
ジスタである。4は上記レジスタ3の出力9と前記アッ
プダウンカウンタ2の出力10とを大小比較し、前者9
の値を後者10の値が越えたときに信号線11に検出信
号を出力する。5は割込み発生回路であって、上記検出
信号が入力したときに割込みを発生させる。
1 is an instruction decoding circuit, and CA of the instruction code
When the LL instruction is decoded, K outputs the CALL decode signal to the signal line 6, and when the RET instruction is decoded, the RET decode signal is output to the signal @7, and the counter clear instruction (a dedicated instruction code may be used, or another instruction When decoding the I
A clear decode signal is output to Ii times Hs. 2 is up/down data, it is cleared when the above clear decode signal is input, it counts up when the above CALL decode signal is input, and the above RET 5''2-do1
Countdown when the next number is entered. 3 is CALI
, is a register that stores data representing the maximum allowable number of consecutive instructions. 4 compares the output 9 of the register 3 and the output 10 of the up/down counter 2, and the former 9
When the latter value 10 exceeds the value , a detection signal is output to the signal line 11. Reference numeral 5 denotes an interrupt generation circuit, which generates an interrupt when the detection signal is input.

次に、上記構成における動作を説明する。先ず、初期設
定としてカウンタクリア命令を命令デコード回路1に人
力することによりて信号線8にクリアデコード信号を発
生させ、アップダウンカウンタ2をクリアする。また、
レジスタ3には、CALL命令の許容最大連続回数を表
わすデータを設定しておく。この許容最大連続回数は、
実行が予定されるプログラムが正常に動作している場合
において、連続して実行される0ALL命令の最大値で
ある。
Next, the operation of the above configuration will be explained. First, as an initial setting, a clear decode signal is generated on the signal line 8 by manually inputting a counter clear command to the command decode circuit 1, and the up/down counter 2 is cleared. Also,
Register 3 is set with data representing the maximum allowable number of consecutive CALL instructions. The maximum allowed consecutive number of times is
This is the maximum number of consecutively executed 0ALL instructions when the program scheduled to be executed is operating normally.

但し、ここで連続というのは、 CALL命令とCAI
、L命令との間にRET命令が存在しないことを指して
おシ、本例では上記最大連続回数として4を設定してお
く。次に、メインのプログラムに実行を移す。メインの
プログラムの実行中において%CALL命令を実行する
と、信号線6に出力するCALLデコード信号によって
アップダウンカウンタ2がカウントアツプし、カウント
値がr l JKなる。次に、再びCALL命令を実行
すると、上記と同様にカウントアツプし、カウント値は
「2」になる0次に、RET命令を実行すると、信号1
1!!7に出力するRETデコード侶号によってアップ
ダウンカウンタ2がカウントダウンし、カウント値がr
lJになる。
However, here, continuous means CALL instruction and CAI
, L instruction, and there is no RET instruction between them. In this example, the maximum number of consecutive times is set to 4. Next, execute the main program. When the %CALL instruction is executed during execution of the main program, the up/down counter 2 counts up due to the CALL decode signal outputted to the signal line 6, and the count value becomes r l JK. Next, when the CALL instruction is executed again, the count is increased in the same way as above, and the count value becomes ``2''.Next, when the RET instruction is executed, the signal 1
1! ! The up/down counter 2 counts down according to the RET decode signal output to 7, and the count value becomes r.
Become lJ.

次に、再びuT命令を実行すると、上記と同様にカウン
トダウンし、カウント値が「0」になる。
Next, when the uT instruction is executed again, the countdown is performed in the same manner as above, and the count value becomes "0".

以上が通常の正常な動作の一例である。The above is an example of normal normal operation.

これに対して、何らかの原因でCPU動作が暴走してC
ALL命令を前記設定値4よシ大きい5回連続して実行
する場合を説明する。CALL命令を連続して4回実行
すると、実行毎に前記したようにカウントアツプし、カ
ウント値は「4」になる。この状態で、さらK CAL
L命令を実行すると、カウントアツプによシカラント値
は「5」になる。このとき、レジスタ3の値は予め「4
」に設定されているので、比較回路4は信号線11に検
出信号を出力する。これによって、割込み発生回路5が
動作して割込みが発生し、暴走防止処理のための所定の
ルーチルが実行されるようになる。
On the other hand, for some reason, the CPU operation goes out of control and C
A case will be described in which the ALL instruction is executed five times in succession, which is greater than the set value 4. When the CALL instruction is executed four times in succession, the count increases as described above each time the CALL instruction is executed, and the count value becomes "4". In this state, SaraK CAL
When the L instruction is executed, the sicant value becomes "5" due to the count up. At this time, the value of register 3 is set to "4" in advance.
”, the comparator circuit 4 outputs a detection signal to the signal line 11. As a result, the interrupt generation circuit 5 operates to generate an interrupt, and a predetermined routine for runaway prevention processing is executed.

第2図は他の実施例を示しておシ、前記実施例に比べて
、アップダウンカウンタ2のアンダーフロー出力を信号
912によ)割込み発生回路5にもう1つの入力として
導いている点が異なシ、その他は同じであるので同じ符
号を付している。この実施例において、CALL命令を
許容最大連続回数を越えて連続して実行した場合には、
前記実施例と同様な動作で割込みが発生する。さらに、
この実施例において、アップダウンカウンタ2のカウン
ト値がrolの状態でRET命令を実行する場合を説明
する。アップダウンカウンタ2のカウント値か「0」で
あるということは、アップダウンカウンタ2がクリアさ
れた後でCALL命令が一度も実行されていないか、ま
たはCALL命令とRET命令とが同じ回数実行された
かのどちらかである。従って、このように、対応するC
ALL命令が実行されていない状態で部T命令を実行す
ることは、通常の状態ではなく、何らかの原因でCPU
動作が暴走した場合であシ、このときにはアップダウン
カウンタ2のカウントダウンによシ信号線12にアンダ
ーフロー信号が出力する。そして、このアンダーフロー
信号は上記cpυ動作の暴走を検出した出力であり、こ
の信号に基いて割込み発生回路5が割込みを発生し、暴
走防止のための処理ルーチンが実行されるようになる。
FIG. 2 shows another embodiment, which differs from the previous embodiment in that the underflow output of the up/down counter 2 is led to the interrupt generation circuit 5 by the signal 912 as another input. Since the parts are different and the others are the same, they are given the same reference numerals. In this embodiment, if the CALL instruction is executed consecutively exceeding the maximum allowable number of consecutive times,
An interrupt occurs in the same manner as in the previous embodiment. moreover,
In this embodiment, a case will be described in which the RET command is executed when the count value of the up/down counter 2 is rol. If the count value of up/down counter 2 is "0", it means that the CALL instruction has never been executed after up/down counter 2 has been cleared, or that the CALL instruction and the RET instruction have been executed the same number of times. It's one or the other. Therefore, in this way, the corresponding C
Executing the part T instruction while the ALL instruction is not being executed is not a normal situation, and for some reason the CPU
If the operation goes out of control, an underflow signal is output to the signal line 12 as the up/down counter 2 counts down. This underflow signal is an output that detects the runaway of the cpυ operation, and based on this signal, the interrupt generation circuit 5 generates an interrupt, and a processing routine for preventing runaway is executed.

なお、上記各実施例の説明でfi、CPU動作の暴走に
よる異常を検出したが、この以外の原因(たとえばプロ
グラムの誤シ)Kよる異常も検出することができる。九
とえば、あるサブルーチンがそのサブルーチン自身をコ
ールする(呼出す)場合がある。この場合、ある条件が
満たされるまで上記コールが繰シ返される。ところが、
先に説明したように、 CALL命令を1口実行する毎
にスタックポインタにより指示されるスタックメモリに
戻シ。
Incidentally, in the description of each of the above embodiments, abnormalities due to fi and runaway of CPU operation were detected, but abnormalities due to other causes (for example, program errors) K can also be detected. For example, a subroutine may call itself. In this case, the above call is repeated until a certain condition is met. However,
As explained earlier, each time a CALL instruction is executed, the data is returned to the stack memory pointed to by the stack pointer.

アドレスが格納されていく。そして、前記サブルーチン
のある条件が満たされる前に上記スタックメモリとして
割)当てられた領域を越えて戻シアドレスが格納されて
しまうと、この部分に予め格納されていたプログラムや
データを破壊してしまう。しかし、上記スタックメモリ
の領域を越えて戻シアドレスが格納される前に、アップ
ダウンカウンタ2のカウント値はレジスタ3の設定値を
越えるので異常検出が行われる。即ち、たとえばスタッ
クメモリの領域が100アドレス分である場合、レジス
タ1IcrloOJを設定しておく。こつしておけば、
CALL命令を100回実回実てスタックメモリの領域
一杯に戻シアドレスを格納した後、さらにCALL命令
を実行すると、異常検出が行われる。そして、この異常
検出出力により割込みを発生させ、暴走防止のための処
理ルーチンを起動させることができる。
Addresses are stored. If the return address is stored beyond the area allocated as the stack memory before a certain condition of the subroutine is met, the program and data previously stored in this area may be destroyed. Put it away. However, before the return address is stored beyond the area of the stack memory, the count value of the up/down counter 2 exceeds the set value of the register 3, so that an abnormality is detected. That is, for example, if the stack memory area is 100 addresses, register 1IcrloOJ is set. If you get the hang of it,
After executing the CALL instruction 100 times to fill the stack memory area and storing the seat address, if the CALL instruction is further executed, an abnormality is detected. Then, an interrupt can be generated based on this abnormality detection output, and a processing routine for preventing runaway can be activated.

また、上記各実施例では、CALL命令とRET命令と
を用いるサブルーチン処理の場合を説明したが、スタッ
クポインタおよびスタックメモリを用いるその他の処理
(PUSI(命令とPOP命令との組合せ、あるいはC
PUが有するその他の特定の命令を用いてレジスタデー
タの一時退避を行う処理ンにも、命令デコード回路にお
いて上記PUS H命令等のデコードによシカウンタ制
御信号を出力するように変更することで前記実施例に準
じた動作を得ることができる。
Further, in each of the above embodiments, the case of subroutine processing using the CALL instruction and the RET instruction has been explained, but other processing using the stack pointer and stack memory (PUSI (combination of instruction and POP instruction, or C
The above implementation can also be implemented by changing the instruction decoding circuit to output a counter control signal by decoding the above-mentioned PUSH instruction etc. in a process that temporarily saves register data using other specific instructions that the PU has. You can get the behavior according to the example.

[発明の効果コ 上述したように本発明の半導体集積回路によれば、特定
の命令の組合せにおける各命令の実行時に対応してアッ
プカウント、ダウンカウントされるアップダウンカウン
タを有し、予め設定されたレジスタの値と上記カウンタ
の値とを大小比較するようにしたので、スタックメモリ
の領域を越えて書込みを行なおうとするCPU動作の異
常を検出できる。従って、この検出出力により所定の処
理ルーチンを起動させることによって、CPU動作の暴
走、上記スタックメモリ領域外のプログラムやデータの
破壊を防止することができる。
[Effects of the Invention] As described above, the semiconductor integrated circuit of the present invention has an up/down counter that counts up and down in response to the execution of each instruction in a specific combination of instructions. Since the value of the registered register and the value of the counter are compared in magnitude, it is possible to detect an abnormality in the CPU operation that attempts to write beyond the area of the stack memory. Therefore, by activating a predetermined processing routine based on this detection output, runaway CPU operation and destruction of programs and data outside the stack memory area can be prevented.

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

第1図は本発明の半導体集積回路の一実施例を示すブロ
ック図、第2図は他の実施例を示すブロック図である。 1・・・命令デコード回路、2・・・アップダウンカウ
ンタ、3・・・レジスタ、4・・・比較回路、5・・・
割込み発生回路。
FIG. 1 is a block diagram showing one embodiment of a semiconductor integrated circuit according to the present invention, and FIG. 2 is a block diagram showing another embodiment. 1... Instruction decode circuit, 2... Up/down counter, 3... Register, 4... Comparison circuit, 5...
Interrupt generation circuit.

Claims (4)

【特許請求の範囲】[Claims] (1)CPU機能を有する半導体集積回路において、命
令デコード回路と、この命令デコード回路の所定のデコ
ード出力によってアップカウンタあるいはダウンカウン
トされるアップダウンカウンタと、所定のデータを格納
するレジスタと、このレジスタの出力と前記アップダウ
ンカウンタの出力との大小関係を比較し、この大小関係
に応じた出力を発生する比較回路とを具備することを特
徴とする半導体集積回路。
(1) In a semiconductor integrated circuit having a CPU function, an instruction decode circuit, an up-counter or an up-down counter that counts up or down according to a predetermined decode output of the instruction decode circuit, a register that stores predetermined data, and this register. 1. A semiconductor integrated circuit comprising: a comparison circuit that compares the magnitude relationship between the output of the up-down counter and the output of the up-down counter, and generates an output according to the magnitude relationship.
(2)前記命令デコード回路は、スタックメモリ領域の
使用に関する特定の命令の組合せにおける各命令に対応
するデコード出力によって前記アップダウンカウンタを
カウント制御し、前記レジスタは、上記スタックメモリ
領域を使用する所定の命令が連続する回数の許容最大値
を表わすデータを格納することを特徴とする前記特許請
求の範囲第1項記載の半導体集積回路。
(2) The instruction decode circuit controls counting of the up/down counter by a decode output corresponding to each instruction in a specific combination of instructions regarding the use of the stack memory area, and the register is configured to control the up/down counter according to a decode output corresponding to each instruction in a specific combination of instructions regarding the use of the stack memory area, 2. The semiconductor integrated circuit according to claim 1, wherein data representing a maximum allowable number of consecutive instructions is stored.
(3)前記比較回路の所定の出力によりCPU動作の所
定の処理ルーチンを起動することを特徴とする前記特許
請求の範囲第1項または第2項記載の半導体集積回路。
(3) The semiconductor integrated circuit according to claim 1 or 2, wherein a predetermined processing routine of a CPU operation is activated by a predetermined output of the comparison circuit.
(4)前記比較回路の所定の出力および前記アップダウ
ンカウンタのアンダーフロー出力のそれぞれによりCP
U動作の所定の処理ルーチンを起動することを特徴とす
る前記特許請求の範囲第1項または第2項記載の半導体
集積回路。
(4) CP is determined by each of the predetermined output of the comparison circuit and the underflow output of the up/down counter.
The semiconductor integrated circuit according to claim 1 or 2, characterized in that a predetermined processing routine for U operation is activated.
JP62145715A 1987-06-11 1987-06-11 Semiconductor integrated circuit Pending JPS63310027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62145715A JPS63310027A (en) 1987-06-11 1987-06-11 Semiconductor integrated circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62145715A JPS63310027A (en) 1987-06-11 1987-06-11 Semiconductor integrated circuit

Publications (1)

Publication Number Publication Date
JPS63310027A true JPS63310027A (en) 1988-12-19

Family

ID=15391451

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62145715A Pending JPS63310027A (en) 1987-06-11 1987-06-11 Semiconductor integrated circuit

Country Status (1)

Country Link
JP (1) JPS63310027A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58200355A (en) * 1982-05-15 1983-11-21 Matsushita Electric Works Ltd Operation monitoring system of cpu

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58200355A (en) * 1982-05-15 1983-11-21 Matsushita Electric Works Ltd Operation monitoring system of cpu

Similar Documents

Publication Publication Date Title
JP3176093B2 (en) Microprocessor interrupt controller
US4703419A (en) Switchcover means and method for dual mode microprocessor system
JPS63310027A (en) Semiconductor integrated circuit
JPS599937B2 (en) information processing equipment
WO1990005951A1 (en) Method of handling unintended software interrupt exceptions
JPH0484224A (en) Stack area protection circuit
JP3182373B2 (en) Microcomputer device
JPH03208132A (en) Single chip microcomputer
JPS6118045A (en) Detecting system of program runaway
JPH01258040A (en) Saving restoring processing system for stack information
JPS63155330A (en) Microprogram controller
JPH0784786A (en) Program execution control method
JPS6014345A (en) Protecting system of program runaway
JPS6195464A (en) Data protecting system
JPH04296938A (en) Computer device
JPS61156307A (en) Sequence controller
JPS63118948A (en) Single chip microcomputer
JPH02129735A (en) Debug device
JPH04270441A (en) Data processor
JPH0194444A (en) Detector for execution level exception
JPH02245937A (en) Information processor
JPH0374771B2 (en)
JPS6325736A (en) Interruption control system for virtual computer system
JPS61194531A (en) Instruction execution controller
JPH04127333A (en) Fault detecting system for application task