JPS61134852A - Microcomputer - Google Patents
MicrocomputerInfo
- Publication number
- JPS61134852A JPS61134852A JP59257811A JP25781184A JPS61134852A JP S61134852 A JPS61134852 A JP S61134852A JP 59257811 A JP59257811 A JP 59257811A JP 25781184 A JP25781184 A JP 25781184A JP S61134852 A JPS61134852 A JP S61134852A
- Authority
- JP
- Japan
- Prior art keywords
- program
- counter
- program counter
- interruption
- comparison
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロコンピュータに関する。[Detailed description of the invention] [Industrial application field] The present invention relates to microcomputers.
従来、マイクロコンピュータは、第2図に示すように、
内部回路3で処理されるプログラムの流れを制御するプ
ログラム・カウンタ1を有している。従来のマイクロコ
ンピュータのプログラム・カウンタはただ一つで、バイ
ナリ・カウンタで構成され1命令実行するごとにプログ
ラムカウンタ制御回路4で自動的にインクリメント(十
l)されます。プログラムカウンタ制御回路4は割込み
制御回路2から出力される割込み信号でも動作して、プ
ログラムカウンタlの内容を制御します。Conventionally, microcomputers, as shown in Figure 2,
It has a program counter 1 that controls the flow of programs processed by an internal circuit 3. Conventional microcomputers have only one program counter, which is a binary counter and is automatically incremented (10 l) by the program counter control circuit 4 every time one instruction is executed. The program counter control circuit 4 also operates with the interrupt signal output from the interrupt control circuit 2 to control the contents of the program counter l.
上述した従来のマイクロコンピュータを使用したシステ
ムにおいてに、ノイズ、サージ等なんらかの要因でプロ
グラム・カウンタlが正常な動作をしない場合、プログ
ラムが暴走してしまう欠点があった。The above-mentioned conventional system using a microcomputer has the disadvantage that if the program counter l does not operate normally due to some reason such as noise or surge, the program may run out of control.
本発明の目的は、上記欠点を除去し、プログラムが暴走
した場合に、強制的にプログラムの流れを変えることが
出来るマイクロコンピユータラ提供することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide a microcomputer that can eliminate the above drawbacks and forcibly change the flow of a program when the program goes out of control.
本発明のマイクロコンピュータは、複数のブロダラム・
カウンタの内容を強制的にあらかじめ定めた値にする回
路とを有している。The microcomputer of the present invention includes a plurality of brodarums and
and a circuit that forcibly sets the contents of the counter to a predetermined value.
次に、本発明について図面を用いて説明する。 Next, the present invention will be explained using the drawings.
第1図は本発明の一男施例の要部のブロック図である。FIG. 1 is a block diagram of the main parts of an embodiment of the present invention.
この−実施例のマイクロコンビエータは、従来のプログ
ラム・カウンタに相当するプログラム会カウンタ1と、
今回新しく付は加えらnたプログラムカウンタ5と、こ
のプログラム・カウンタ1の内容とプログラム・カウン
タ5の内容を反転回路7で反転した内容とを比較して異
なっていれば割込み制御回路2VC判定信号8を出力す
る比較判定回路6と1割込み処理として同時に、プログ
ラム・カウンタlとプログラムカウンタ5の初期設定を
制御するプログラムΦカウンタ制御回路4とを含んで構
成される。なお、プログラム・カウンタ5はプログラム
・カウンタlとコンブリメントな値を保持し、動作は1
命令賽行すると自動的にディクリメ7ト(−1)さnる
。The micro combinator of this embodiment includes a program counter 1 corresponding to a conventional program counter;
The newly added program counter 5 is compared with the content of the program counter 1 and the content of the program counter 5 inverted by the inversion circuit 7, and if they are different, the interrupt control circuit 2 VC judgment signal is sent. 8 and a program Φ counter control circuit 4 that simultaneously controls the initial settings of the program counter 1 and the program counter 5 as 1 interrupt processing. Note that program counter 5 holds a value that is congruent with program counter l, and the operation is 1.
When the command is executed, it is automatically decremented (-1).
次に、この実施例の動作について説明する。Next, the operation of this embodiment will be explained.
プログラムカウンタ1は、従来のマイクロコンビエータ
と同様の動作を行なう。プログラムカウンタ5は、プロ
グラム会カウンタ1とまったく逆の動作を行なう。今、
プログラム・カウンタlの内容が0OIIBとすると、
プログラムカウンタ5の内容は、コンブリメントな値1
100Bである。The program counter 1 operates similarly to a conventional micro combinator. The program counter 5 operates in exactly the opposite way to the program session counter 1. now,
If the contents of program counter l are 0OIIB,
The content of program counter 5 is a concomplimentary value of 1.
It is 100B.
l命令賽行後は、プログラムカウンタは+1さ牡010
0Bになり、プログラムカウンタ5は−1されて101
1nになる。そして、こ詐らの出力が比較判定回路6に
入力される。プログラム・カウンタ5の出力は反転回路
7により反転さnて比較判定回路6に入力される。比較
判定回路6は、プログラムカウンタlの内容とプログラ
ム・カウンタ50反転内4とを比較す机比較t−1結果
”同じ ]であれば、プログラムカウンタlk
このマイクロコンピュータのプログラムカウンタとして
、プログラムの流t14−制御する。After executing the l instruction, the program counter increases by 1010.
It becomes 0B, and the program counter 5 is decremented by 1 and becomes 101.
It becomes 1n. Then, the outputs of these detectors are input to the comparison/judgment circuit 6. The output of the program counter 5 is inverted by an inverting circuit 7 and input to a comparison/judgment circuit 6. The comparison/judgment circuit 6 compares the contents of the program counter l and the program counter 50 inversion 4. If the result of comparison t-1 is "same", the program counter lk
The program counter of this microcomputer controls the program flow t14.
今、ノイズ・サージ等によりプログラムカウンタ1とプ
ログラムカウンタ5の内容が異なったとすると、比較判
定回路60判定信号8が出力され割込み制御回路2によ
り5割込みが発生する。プログラム・カウンタ制御回路
4が1割込みアドレスをプログラム−カウンタ1とプロ
グラム・カウンタ5に設定する。従って5割込みアドレ
スに暴走対策のプログラムを1いておけば良い。Now, if the contents of the program counter 1 and the program counter 5 are different due to noise/surge or the like, the comparison/determination circuit 60 outputs the determination signal 8 and the interrupt control circuit 2 generates 5 interrupts. Program counter control circuit 4 sets one interrupt address to program counter 1 and program counter 5. Therefore, it is sufficient to place one program to prevent runaway at the 5th interrupt address.
以上説明したように、本発明によnば、複数のプログラ
ム・カウンタを持ち、比較しながらプログラムラ賽行し
、比較した結果が一致していなければ1割込みによりプ
ログラムの流れを強制的に変える機能を有することによ
り、暴走を防止することが可能なマイクロコンビエータ
が笑現できるという効果が得られる。As explained above, according to the present invention, a plurality of program counters are provided, and the program is run while being compared, and if the comparison results do not match, the flow of the program is forcibly changed by one interrupt. By having this function, it is possible to realize a micro combinator that can prevent runaway.
第1図は本発明の一実施例の要部のブロック図である。
第2図は従来のマイクロコンピュータの要部ノブロック
図である。
l・・・・・・プログラム・カウンタ、2・・・・・・
割込み制御回路、3・・・・・・内部回路、4・・・・
・・プログラム・カウンタ制御回路、5・・・・・・プ
ログラムカウンタ、6・・・・・・比較判定回路、7・
・・・・・反転回路、8・・・・・・判定信号である。FIG. 1 is a block diagram of essential parts of an embodiment of the present invention. FIG. 2 is a block diagram of the main parts of a conventional microcomputer. l...Program counter, 2...
Interrupt control circuit, 3... Internal circuit, 4...
. . . Program counter control circuit, 5 . . . Program counter, 6 . . . Comparison judgment circuit, 7.
. . . Inverting circuit, 8 . . . Judgment signal.
Claims (1)
カウンタの内容を比較して前記複数のプログラムカウン
タの内容が所定の関係にないことを検出する比較判定回
路と、この比較判定回路からの出力により前記複数のプ
ログラムカウンタの内容をあらかじめ定められた値にす
る回路とを含むことを特徴とするマイクロコンピュータ
。a plurality of program counters; a comparison judgment circuit that compares the contents of the plurality of program counters and detects that the contents of the plurality of program counters do not have a predetermined relationship; and an output from the comparison judgment circuit that compares the contents of the plurality of program counters; A microcomputer comprising: a circuit for setting the contents of a program counter to a predetermined value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59257811A JPS61134852A (en) | 1984-12-06 | 1984-12-06 | Microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59257811A JPS61134852A (en) | 1984-12-06 | 1984-12-06 | Microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS61134852A true JPS61134852A (en) | 1986-06-21 |
Family
ID=17311445
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP59257811A Pending JPS61134852A (en) | 1984-12-06 | 1984-12-06 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS61134852A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2381088A (en) * | 2001-10-15 | 2003-04-23 | Jacobs Rimell Ltd | State recovery and counter increments and decrements |
-
1984
- 1984-12-06 JP JP59257811A patent/JPS61134852A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2381088A (en) * | 2001-10-15 | 2003-04-23 | Jacobs Rimell Ltd | State recovery and counter increments and decrements |
GB2381088B (en) * | 2001-10-15 | 2006-02-08 | Jacobs Rimell Ltd | State recovery |
US7580997B2 (en) | 2001-10-15 | 2009-08-25 | Jacobs Rimell Limited | State recovery |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0221018B2 (en) | ||
JPS61134852A (en) | Microcomputer | |
JPS5914005A (en) | Sequence controlling system by microcomputer | |
JP2557629B2 (en) | Interrupt method | |
JPH04241032A (en) | System call execution device | |
JPS63111535A (en) | Data processor | |
JPS6398010A (en) | Method for distinguishing power application and reset of microcomputer | |
JP2503210B2 (en) | Micro program controller | |
JPS6327930A (en) | Interruption control circuit | |
JPS62117044A (en) | Program intermission system | |
JPH0212345A (en) | Microcomputer | |
JPS61253503A (en) | Sequence controller | |
JPH04148331A (en) | Microcomputer | |
JPH03282626A (en) | Interruption selection system | |
JPH04246755A (en) | Microcomputer | |
JPH01232438A (en) | Interruption control system | |
JPS61237137A (en) | Interruption controlling system | |
JPS63129426A (en) | Timer module for data flow type computer | |
JPH04267438A (en) | Double exception detector | |
JPS60170870A (en) | Controller of copying machine | |
JPS61235951A (en) | One chip microcomputer | |
JPH10143462A (en) | Microcomputer | |
JPS63106027A (en) | Reset control circuit | |
JPH01229332A (en) | Information processor | |
JPH03257629A (en) | Interruption restoring device |