JPH0535613A - Runaway preventing circuit for microcomputer - Google Patents

Runaway preventing circuit for microcomputer

Info

Publication number
JPH0535613A
JPH0535613A JP3186750A JP18675091A JPH0535613A JP H0535613 A JPH0535613 A JP H0535613A JP 3186750 A JP3186750 A JP 3186750A JP 18675091 A JP18675091 A JP 18675091A JP H0535613 A JPH0535613 A JP H0535613A
Authority
JP
Japan
Prior art keywords
memory
instruction
program counter
output
address
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
JP3186750A
Other languages
Japanese (ja)
Inventor
Takamasa Uchida
隆政 内田
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 IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems Co 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 IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP3186750A priority Critical patent/JPH0535613A/en
Publication of JPH0535613A publication Critical patent/JPH0535613A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Retry When Errors Occur (AREA)
  • Debugging And Monitoring (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

PURPOSE:To prevent a runaway even if the fluctuation of a power supply voltage, etc., is generated. CONSTITUTION:A first program counter 1 for designating the address of a memory 5 is provided, a second program counter 2 for outputting a counted value being always more by N than that of a first program counter 1 is provided, a selector 3 for selecting and outputting alternately the outputs of the first and the second program counters 1, 2 is provided, an address register for decoding the output of the selector 3 and setting it as the address input of a memory 5 is provided, so that the memory outputs data by the value of the address register, a first instruction latch 7 for latching the output of the memory 5 conforming to the value of a first program 1 in the outputs of the memory is provided, a second instruction latch 6 for latching the output of the memory 5 conforming to the value of a second program counter 2 and constituting a shift register of N stages is provided, and a comparator for comparing the values of a first instruction latch 7 with a second instruction latch 6 is provided.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はマイクロコンピュータの
暴走防止回路に関し、特にリード・オンリ・メモリ(R
OM)のデータの読み違いによる暴走を防止する回路に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a runaway prevention circuit for a microcomputer, and more particularly to a read only memory (R).
The present invention relates to a circuit for preventing runaway due to misreading of OM data.

【0002】[0002]

【従来の技術】従来のマイクロコンピュータは、図4に
示す様に、メモリ(ROM)5のアドレスを指定するプ
ログラムカウンタ1と、このプログラムカウンタ1の出
力を入力し、デコードするアドレスデコーダ(DEC)
4と、このアドレスデコーダ4でデコードされたアドレ
スに従って命令のデータを出力するメモリ(ROM)5
と、メモリ(ROM)5のデータをクロックパルス(C
K1)のタイミングでラッチし、命令デコーダ4へデー
タを出力する命令ラッチ7とにより構成されていた。
2. Description of the Related Art As shown in FIG. 4, a conventional microcomputer has a program counter 1 for designating an address of a memory (ROM) 5 and an address decoder (DEC) for inputting and decoding the output of the program counter 1.
4 and a memory (ROM) 5 for outputting instruction data in accordance with the address decoded by the address decoder 4.
And the data of the memory (ROM) 5 with the clock pulse (C
The instruction latch 7 latches at the timing K1) and outputs data to the instruction decoder 4.

【0003】次に動作について、図5も用いて説明す
る。先づ、プログラムカウンタ1(PC1)により、メ
モリ(ROM)5の読み出しを行なうアドレスが出力さ
れる。このアドレスは、デコーダ(DEC)4によりデ
コードされ、メモリ(ROM)5に入力される。このメ
モリ(ROM)5においては、プリチャージ信号(PR
E)終了後、アドレスに従ったデータが出力される。
Next, the operation will be described with reference to FIG. First, the program counter 1 (PC1) outputs an address for reading the memory (ROM) 5. This address is decoded by the decoder (DEC) 4 and input to the memory (ROM) 5. In this memory (ROM) 5, the precharge signal (PR
E) After the end, data according to the address is output.

【0004】次に、命令ラッチ7では、CK1のタイミ
ングでメモリ(ROM)5のデータをラッチし、命令デ
コーダ4へ出力していた。
Next, the instruction latch 7 latches the data in the memory (ROM) 5 at the timing of CK1 and outputs it to the instruction decoder 4.

【0005】従って、従来の構成においては、プリチャ
ージ信号(PRE)終了後、命令ラッチ7でCK1のタ
イミングでラッチされるまでの間は、データはダイナミ
ック保持されている。
Therefore, in the conventional configuration, the data is dynamically held until the instruction latch 7 latches it at the timing of CK1 after the end of the precharge signal (PRE).

【0006】[0006]

【発明が解決しようとする課題】従来のマイクロコンピ
ュータの構成は、メモリ(ROM)5の出力を1回だけ
ラッチし、命令デコードを行なっていた為、次の様な欠
点を持っていた。
The configuration of the conventional microcomputer has the following drawbacks because the output of the memory (ROM) 5 is latched only once and the instruction is decoded.

【0007】これを図5のタイミング図を用いて説明す
ると、従来よりのダイナミックROM14を用いるマイ
クロコンピュータでは、アドレス(PC1)が決定した
後、プリチャージ信号(PRE)が“L”になり、この
プリチャージが終了するとメモリ5よりアドレスに従っ
た出力が出る。
This will be described with reference to the timing chart of FIG. 5. In a conventional microcomputer using the dynamic ROM 14, the precharge signal (PRE) becomes "L" after the address (PC1) is determined. When the precharge is completed, the output according to the address is output from the memory 5.

【0008】このメモリ5の出力を、命令ラッチ7でC
K1のタイミングでラッチする。従って、プリチャージ
終了後、命令ラッチ7のラッチクロック(CK1)の間
ダイナミック保持している。
The output of this memory 5 is C by an instruction latch 7.
Latch at the timing of K1. Therefore, after the precharge is completed, it is dynamically held during the latch clock (CK1) of the instruction latch 7.

【0009】従って、ダイナミック保持中に電源電圧の
変動等が生じると、データが変化してしまい、誤ったデ
ータをラッチした。この事により、期待した命令と異な
る命令を実行し、暴走の原因となっていた。
Therefore, if the power supply voltage fluctuates or the like during the dynamic holding, the data changes and the wrong data is latched. Due to this, an instruction different from the expected instruction was executed, causing a runaway.

【0010】本発明の目的は、前記問題点を解決し、電
源電圧の変動等が生じても暴走しないようにしたマイク
ロコンピュータの暴走防止回路を提供することにある。
An object of the present invention is to solve the above-mentioned problems and to provide a runaway prevention circuit for a microcomputer which prevents runaway even if a change in power supply voltage occurs.

【0011】[0011]

【課題を解決するための手段】本発明の暴走防止回路の
構成は、第1回目に出力されたメモリの内容をラッチす
る第1の命令ラッチと、第2回目に出力された前記メモ
リの内容をラッチする第2の命令ラッチと、前記第1,
第2の命令ラッチの値を互いに比較して前記値が一致し
た時のみ命令を実行するようになしたことを特徴とす
る。
The runaway prevention circuit of the present invention has a first instruction latch for latching the contents of the memory output at the first time and the contents of the memory output for the second time. A second instruction latch for latching the
The values of the second instruction latch are compared with each other, and the instruction is executed only when the values match.

【0012】[0012]

【実施例】図1は本発明の第1の実施例のマイクロコン
ピュータの暴走防止回路を示すブロック図である。
1 is a block diagram showing a runaway prevention circuit for a microcomputer according to a first embodiment of the present invention.

【0013】図3は図1の動作を示すタイミング図であ
る。
FIG. 3 is a timing diagram showing the operation of FIG.

【0014】図1において、本実施例の暴走防止回路
は、メモリ(ROM)5と、デコーダ(DEC)4と、
セレクタ(SEL)3と、プログラムカウンタ1,2
と、命令ラッチ6,7と、比較器8とを備えている。
In FIG. 1, the runaway prevention circuit of the present embodiment comprises a memory (ROM) 5, a decoder (DEC) 4,
Selector (SEL) 3 and program counters 1 and 2
, Instruction latches 6 and 7, and a comparator 8.

【0015】即ち、本実施例のマイクロコンピュータの
暴走防止回路の構成は、ダイナミック保持型リード・オ
ンリ・メモリ5を用いるマイクロコンピュータの暴走防
止回路において、前記メモリ5のアドレスを指定する為
の第1のプログラムカウンタ1と、前記第1のプログラ
ムカウンタ1より常にNだけ多いカウント値を出す第2
のプログラムカウンタ2と、前記第1および第2のプロ
グラムカウンタ1,2の出力を交互に選択して出力とす
るセレクタ3と、前記セレクタ3の出力をデコードして
前記メモリ5のアドレス入力とするアドレスレジスタと
を備え、前記アドレスレジスタの値によって前記メモリ
がデータを出力するようになし、前記メモリの出力の内
前記第1のプログラムカウンタ1の値に従ったメモリ5
の出力をラッチする第1の命令ラッチ7と、前記第2の
プログラムカウンタ2の値に従った前記メモリ5の出力
をラッチし、N段のシフトレジスタを構成する第2の命
令ラッチ6と前記第1,第2の命令ラッチ7,6の値を
比較する比較器8とを有し、前記比較器8の出力が一致
した時のみ命令を実行するようになしたことを特徴とす
る。
That is, the configuration of the runaway prevention circuit of the microcomputer of the present embodiment is the first one for designating the address of the memory 5 in the runaway prevention circuit of the microcomputer using the dynamic holding type read only memory 5. Program counter 1 and a second program counter 1 that constantly outputs a count value larger than the first program counter 1 by N.
Program counter 2 and a selector 3 which alternately selects and outputs the outputs of the first and second program counters 1 and 2, and an output of the selector 3 is decoded and used as an address input of the memory 5. An address register, the memory outputs data according to the value of the address register, and the memory 5 according to the value of the first program counter 1 among the outputs of the memory.
A first instruction latch 7 for latching the output of the memory 5 and a second instruction latch 6 for latching the output of the memory 5 according to the value of the second program counter 2 and forming an N-stage shift register; And a comparator 8 for comparing the values of the first and second instruction latches 7 and 6, and the instruction is executed only when the outputs of the comparator 8 match.

【0016】図1,図2において、本実施例の暴走防止
回路は、プログラムカウンタ1とプログラムカウンタ2
が、命令実行サイクルと同じ周期でカウントを行ない、
かつプログラムカウンタ2が、プログラムカウンタ1よ
りも2カウント多い値をカウントする。またプログラム
カウンタ2はプログラムカウンタ1に対し、1/2周期
位相がずれている。
1 and 2, the runaway prevention circuit according to the present embodiment has a program counter 1 and a program counter 2.
However, it counts at the same cycle as the instruction execution cycle,
In addition, the program counter 2 counts a value that is two counts more than the program counter 1. Further, the program counter 2 is out of phase with the program counter 1 by 1/2 cycle.

【0017】プログラムカウンタ1,2の出力は、セレ
クタ3により、交互に選択される。
The outputs of the program counters 1 and 2 are alternately selected by the selector 3.

【0018】セレクタ3の出力は、デコーダ4によりデ
コードされ、メモリ(ROM)5にアドレスとして入力
される。従ってメモリ5は、命令実行サイクルの2倍の
速さで読み出しを行なう。
The output of the selector 3 is decoded by the decoder 4 and input to the memory (ROM) 5 as an address. Therefore, the memory 5 reads data at twice the speed of the instruction execution cycle.

【0019】このメモリ5の出力は、プログラムカウン
タ1に従ったデータが、CK1のクロックにより命令ラ
ッチ7にラッチされ、プログラムカウンタ2に従ったデ
ータがCK2のクロックにより、命令ラッチ6にラッチ
される。ここで命令ラッチ6は、2段のシフトレジスタ
より構成され、出力には1つ前のデータが出る。
As for the output of the memory 5, the data according to the program counter 1 is latched in the instruction latch 7 by the clock of CK1, and the data according to the program counter 2 is latched in the instruction latch 6 by the clock of CK2. . Here, the instruction latch 6 is composed of two stages of shift registers, and the previous data is output to the output.

【0020】次に比較器8により、命令ラッチ6と命令
ラッチ7とのデータをSTBのタイミングにより比較す
る。
Next, the comparator 8 compares the data in the instruction latch 6 and the instruction latch 7 at the timing of STB.

【0021】この比較結果が一致している時にのみ、命
令を実行する。
The instruction is executed only when the comparison results match.

【0022】ただし、ジャンプや割り込み等により、プ
ログラムカウンタの値が切り換った直後は、命令ラッチ
6のデータが古い為、比較を行なわないで、命令を実行
する。
However, immediately after the value of the program counter is switched due to a jump or an interrupt, the data in the instruction latch 6 is old, so that the instruction is executed without making a comparison.

【0023】図2は本発明の第2の実施例のマイクロコ
ンピュータの暴走防止回路を示すブロック図である。
FIG. 2 is a block diagram showing a runaway prevention circuit for a microcomputer according to a second embodiment of the present invention.

【0024】図2において、本実施例の暴走防止回路
は、メモリ(ROM)5と、デコーダ4と、加算器9
と、プログラムカウンタ1と、命令ラッチ6,7と、比
較器8とを備えている。
In FIG. 2, the runaway prevention circuit of this embodiment is provided with a memory (ROM) 5, a decoder 4, and an adder 9.
, A program counter 1, instruction latches 6 and 7, and a comparator 8.

【0025】図2において、本実施例は、図1でプログ
ラムカウンタを2つ用いていた代りに、プログラムカウ
ンタ1を1つだけ用い、その後にセレクタ3の代りに加
算器9を用いる事により、プログラムカウンタ1と、そ
れより2カウントだけ多いカウントを行なったものであ
る。その他は、前述した図1の説明と同じである。
In FIG. 2, the present embodiment uses only one program counter 1 instead of using two program counters in FIG. 1, and thereafter uses an adder 9 instead of the selector 3, The program counter 1 and a counter that is two more than that are counted. Others are the same as the description of FIG. 1 described above.

【0026】また図1,図2において、比較器8で不一
致信号が出た場合には、暴走したと判断し、システムに
リセットをかける事も可能である。
Further, in FIGS. 1 and 2, when the comparator 8 outputs a mismatch signal, it is possible to judge that a runaway has occurred and reset the system.

【0027】[0027]

【発明の効果】以上説明したように、本発明は、メモリ
からの読み出しを異なるタイミングで2回行ない、その
値を比較して一致した時のみ命令を実行する様にしたの
で、電源の急激な変動等によりメモリのデータが変化
し、誤ったデータをラッチしたとしても、異なるタイミ
ングで2回とも同一データに化ける確率は非常に低くな
り、そのまま命令を実行し、暴走する事はなくなるとい
う効果がある。
As described above, according to the present invention, the reading from the memory is performed twice at different timings, the values are compared, and the instruction is executed only when the values match. Even if the data in the memory changes due to fluctuations and the wrong data is latched, the probability that the same data will be changed twice at different timings will be very low, and the instruction will be executed as it is and there will be no runaway. is there.

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

【図1】本発明の第1の実施例のマイクロコンピュータ
の暴走防止回路を示すブロック図である。
FIG. 1 is a block diagram showing a runaway prevention circuit of a microcomputer according to a first embodiment of the present invention.

【図2】本発明の第2の実施例のマイクロコンピュータ
の暴走防止回路を示すブロック図である。
FIG. 2 is a block diagram showing a runaway prevention circuit of a microcomputer according to a second embodiment of the present invention.

【図3】図1に示した実施例の各部における信号波形を
示すタイミング図である。
FIG. 3 is a timing chart showing signal waveforms in various parts of the embodiment shown in FIG.

【図4】従来の暴走防止回路を示すブロック図である。FIG. 4 is a block diagram showing a conventional runaway prevention circuit.

【図5】図4に示した回路の信号波形を示すタイミング
図である。
5 is a timing diagram showing signal waveforms of the circuit shown in FIG.

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

1,2 プログラムカウンタ 3 セレクタ 4 デコーダ 5 読み出し専用メモリ(ROM) 6,7 命令ラッチ 8 比較器 9 加算器 1, 2 Program counter 3 Selector 4 Decoder 5 Read-only memory (ROM) 6, 7 Instruction latch 8 Comparator 9 Adder

Claims (1)

【特許請求の範囲】 【請求項1】 第1回目に出力されたメモリの内容をラ
ッチする第1の命令ラッチと、第2回目に出力された前
記メモリの内容をラッチする第2の命令ラッチと、前記
第1,第2の命令ラッチの値を互いに比較して前記値が
一致した時のみ命令を実行するようになしたことを特徴
とするマイクロコンピュータの暴走防止回路。
Claim: What is claimed is: 1. A first instruction latch for latching the contents of the memory output at the first time, and a second instruction latch for latching the contents of the memory output at the second time. And the values of the first and second instruction latches are compared with each other, and the instruction is executed only when the values match each other.
JP3186750A 1991-07-26 1991-07-26 Runaway preventing circuit for microcomputer Pending JPH0535613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3186750A JPH0535613A (en) 1991-07-26 1991-07-26 Runaway preventing circuit for microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3186750A JPH0535613A (en) 1991-07-26 1991-07-26 Runaway preventing circuit for microcomputer

Publications (1)

Publication Number Publication Date
JPH0535613A true JPH0535613A (en) 1993-02-12

Family

ID=16193993

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3186750A Pending JPH0535613A (en) 1991-07-26 1991-07-26 Runaway preventing circuit for microcomputer

Country Status (1)

Country Link
JP (1) JPH0535613A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10240088A1 (en) * 2002-08-30 2004-03-18 Infineon Technologies Ag Data processing device
US7634640B2 (en) 2002-08-30 2009-12-15 Infineon Technologies Ag Data processing apparatus having program counter sensor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10240088A1 (en) * 2002-08-30 2004-03-18 Infineon Technologies Ag Data processing device
DE10240088B4 (en) * 2002-08-30 2007-11-29 Infineon Technologies Ag Data processing device
US7634640B2 (en) 2002-08-30 2009-12-15 Infineon Technologies Ag Data processing apparatus having program counter sensor

Similar Documents

Publication Publication Date Title
JPH0535613A (en) Runaway preventing circuit for microcomputer
JP2561750B2 (en) Pulse generation circuit
EP0839424B1 (en) Extended chip select reset apparatus and method
JPS62233932A (en) Decoding circuit for bch code
SU488200A1 (en) Binary sequence generator
JP2546137B2 (en) Parity error monitor circuit
JPH0969286A (en) Semiconductor memory device
JP2979653B2 (en) Information processing device
JP2757714B2 (en) Frame pulse generation circuit
JP3074790B2 (en) Microprocessor
JP2555882B2 (en) Signal processor
JPH09205349A (en) Pulse width selection signal output device
JP3201445B2 (en) Chattering prevention circuit
JP3565449B2 (en) Data phase change circuit
SU1327104A1 (en) Microprogram control device
KR100294344B1 (en) Column decoding device in ddr(double data rate) sdram
JPH06110576A (en) Semiconductor integrated circuit device
JPS6133721Y2 (en)
CN117912512A (en) Control circuit
JP2679471B2 (en) Clock switching circuit
JPS63181035A (en) Generating circuit for instruction of signal processor
JPH05120005A (en) Processor having repeat instruction of preceding instruction
JPH0317768A (en) Wait control system
JPS6245243A (en) Header detection circuit
JPH04291654A (en) Interruption control circuit