JPS62262140A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPS62262140A
JPS62262140A JP10587786A JP10587786A JPS62262140A JP S62262140 A JPS62262140 A JP S62262140A JP 10587786 A JP10587786 A JP 10587786A JP 10587786 A JP10587786 A JP 10587786A JP S62262140 A JPS62262140 A JP S62262140A
Authority
JP
Japan
Prior art keywords
instruction
condition
judgment
conditional
false
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
JP10587786A
Other languages
Japanese (ja)
Inventor
Makoto Nishino
西野 信
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 JP10587786A priority Critical patent/JPS62262140A/en
Publication of JPS62262140A publication Critical patent/JPS62262140A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To selectively execute different instructions according to the authenticity of conditions of conditional judgement instruction without executing branch instruction by providing a means that suppresses the execution of an instruction following the conditional judgement instruction according to the authenticity of the conditions. CONSTITUTION:A delay circuit 5 connected to two outputs 400 and 410 of an instruction decoder 4 is provided. Clock pulses are supplied from a reference clock generator 1 to the circuit 5, and inputted instruction is held for 1 instruction time and then an instruction prohibition signal is outputted. Accordingly, an instruction code outputted from output 410 of the decoder 4 is returned to the decoder 4 as an instruction prohibition signal through a signal line 500 after 2 instruction execution times. When the instruction is a conditional judgement instruction and the condition is true, a true judgement control signal 400 is outputted, and when the condition is false, a false judgement control signal 410 is outputted.

Description

【発明の詳細な説明】 11上ΩB亙公! 本発明はマイクロコンビ二一夕に関し、特に条件の真偽
によって、分岐命令を実行することなく、条件判断命令
に続く処理を選択的に実行し得る機能を備える新規なマ
イクロコンピュータに関する。
[Detailed Description of the Invention] 11 ΩB Yoko! The present invention relates to a microcomputer, and more particularly to a novel microcomputer having a function of selectively executing processing following a condition judgment instruction without executing a branch instruction, depending on the truth or falsehood of a condition.

従来の技術 従来の一般的なマイクロコンピュータは、条件判断命令
を実行すると、その条件が真/偽の何れであるかにより
、その条件判断命令に続く1命令のみを実行しないよう
にすることによってその条件に対応していた。
BACKGROUND OF THE INVENTION When a conventional general microcomputer executes a condition judgment instruction, it processes the condition by not executing only one instruction following the condition judgment instruction, depending on whether the condition is true or false. It met the conditions.

以下に、条件が偽のときに条件判断命令に続く次の1命
令を実行しない条件判断命令を例に挙げて具体的に説明
する。
Below, a conditional judgment instruction that does not execute the next instruction following the conditional judgment instruction when the condition is false will be specifically explained using an example.

第2図(a)はプログラム中に存在する条件判断命令と
、それに続く°命令群を示したものである。
FIG. 2(a) shows condition judgment instructions existing in the program and the following ° instruction group.

この場合には、条件判断命令を実行した結果、条件が真
のときには条件判断命令に続いて命令IO1命令11、
命令12の順で実行し、条件が偽のときには命令IOは
実行せず、命令11.命令12を実行する。
In this case, as a result of executing the conditional judgment instruction, if the condition is true, the instruction IO1 instruction 11 follows the conditional judgment instruction.
Instructions 12 are executed in order, and when the condition is false, instruction IO is not executed, and instructions 11. Execute instruction 12.

このような命令処理をフローチャートに表すと、第2図
(5)に示すような実行フローとなり、条件の真偽によ
り、命令lOを実行するかしないかによってのみ条件判
断の結果に対応していた。
If such instruction processing is represented in a flowchart, the execution flow will be as shown in Figure 2 (5), and depending on the truth or falsehood of the condition, the result of the condition judgment corresponds only to whether or not to execute the instruction IO. .

発明が解決しようとする問題点 しかしながら、第3図(a)に示すように条件判断命令
を実行した結果、条件が真のときには命令20を実行し
、条件が偽のときには命令10を実行し、しかる後に命
令11に続く命令を実行する処理が必要な場合がある。
Problems to be Solved by the Invention However, as shown in FIG. 3(a), as a result of executing the condition judgment instruction, if the condition is true, instruction 20 is executed; if the condition is false, instruction 10 is executed; After that, it may be necessary to execute the instruction following instruction 11.

このような処理を従来のマイクロコンビ二一夕で実行し
ようとすると、プログラム上では必ず余分な分岐命令を
実行する必要があった。
If such a process were to be executed by a conventional microcombination system, an extra branch instruction would necessarily need to be executed in the program.

即ち、第3図ら)にプログラム例を示すように、条件判
断命令を実行し、条件が偽のときには分岐命令1は実行
されず、命令10、命令11の順で実行する。条件が真
のときには、一旦分岐命令1を実行して他の番地に移り
、命令20を実行した後再び分岐命令2でもとの処理プ
ログラムの流れに戻り初めて命令11を実行することが
できるのである。
That is, as shown in the program example shown in FIG. 3, a condition judgment instruction is executed, and when the condition is false, branch instruction 1 is not executed, and instructions 10 and 11 are executed in this order. When the condition is true, the program can execute branch instruction 1, move to another address, execute instruction 20, and then return to the original flow of the processing program with branch instruction 2 and execute instruction 11 for the first time. .

すわなち、条件が偽の場合には分岐命令を2回実行する
ことが必要になる。
That is, if the condition is false, it is necessary to execute the branch instruction twice.

このように、従来のマイクロコンビ二一夕では、条件判
断命令の出力によって異なる操作の必要な処理では、プ
ログラムのステップ数が増加し、メモリの使用効率を下
げるのみならず、メモリの使用領域の分断化を招き、更
に、プログラムリストを非常に読み難いものにしていた
。また、処理の実行速度の面から考えても、プログラム
・ステップの増加が好ましくないことはいうまでもない
In this way, in conventional microcombiners, processing that requires different operations depending on the output of conditional judgment instructions increases the number of program steps, which not only reduces memory usage efficiency but also reduces the amount of memory used. This led to fragmentation and also made the program list very difficult to read. Furthermore, from the viewpoint of processing execution speed, it goes without saying that an increase in program steps is undesirable.

また、近年、キュー回路方式、即ち、次に実行する命令
群をあらかじめ先取りして格納する回路を備えることに
より、マイクロコンビ二一夕の処理の実行速度を実質的
に向上する方式が広く利用されている。しかしながら、
この方式は一般に、分岐命令が出現するとキューに取り
こまれた命令群を一旦放棄してキューを空にしてしまう
ため、分岐命令が頻繁に出現するプログラムでは実行速
度の向上が妨げられる。
In addition, in recent years, a queue circuit method, that is, a method that substantially improves the processing execution speed of microcomputers by providing a circuit that preemptively stores a group of instructions to be executed next, has been widely used. ing. however,
Generally, when a branch instruction appears, this method temporarily abandons a group of instructions taken into the queue and empties the queue, which hinders improvement in execution speed in programs where branch instructions frequently appear.

そこで、本発明は、上記従来技術の問題点を解決し、条
件判断命令の結果によって、異なる命令を選択的に実行
しなければならないような処理を、分岐命令を用いるこ
となく実行することのできるマイクロコンピュータを提
供することを目的としている。
Therefore, the present invention solves the problems of the prior art described above, and makes it possible to execute processing in which different instructions must be selectively executed depending on the result of a conditional judgment instruction, without using a branch instruction. The purpose is to provide microcomputers.

問題点を解決するための 段 即ち、本発明に従い、条件判断命令を備えたマイクロコ
ンピュータであって、条件の真偽により、該条件判断命
令に続く1命令の実行を抑止する手段と、該条件判断命
令に続いて2番目の命令の実行を抑止する手段とを備え
、条件の真偽によって条件判断命令に続いて実行する命
令を選択的に実行することを特徴とするマイクロコンピ
ュータが提供される。
To solve the problem, according to the present invention, a microcomputer is provided with a conditional judgment instruction, and means for inhibiting the execution of one instruction following the conditional judgment instruction depending on the truth or falsehood of the condition; Provided is a microcomputer characterized in that the microcomputer is equipped with means for inhibiting execution of a second instruction following the judgment instruction, and selectively executes the instruction to be executed following the conditional judgment instruction depending on the truth or falsehood of the condition. .

芸月 本発明に従うマイクロコンピュータは、条件判断命令を
実行すると、その条件の真偽により、条件判断命令に続
いて入力された2命令を選択的に実行する。即ち、例え
ば条件判断命令の実行により条件が真であった場合には
、条件判断命令に続く1命令の実行を抑止し、次の命令
を実行し、更に以下続く命令を順次実行する。また、条
件力(偽であった場合は条件判断命令に続く1命令を実
行し、次の命令の実行は抑止され、更に以下に続く命令
を順次実行する。
When a microcomputer according to the present invention executes a conditional judgment instruction, it selectively executes two instructions inputted subsequent to the conditional judgment instruction depending on whether the condition is true or false. That is, for example, if a condition is found to be true by executing a conditional judgment instruction, execution of one instruction following the conditional judgment instruction is inhibited, the next instruction is executed, and subsequent instructions are sequentially executed. Also, if the conditional force is false, one instruction following the condition judgment instruction is executed, the execution of the next instruction is inhibited, and the following instructions are executed sequentially.

このように、本発明に従うマイクロコンピュータは、分
岐命令を実行することなく、条件判断命令の結果に対し
て異なる処理で対応することができ、分岐命令の実行に
伴う各種の問題を排除することができる。
As described above, the microcomputer according to the present invention can respond to the result of a conditional judgment instruction with different processing without executing a branch instruction, and can eliminate various problems associated with execution of a branch instruction. can.

31り 以下に、本発明の好ましい一態様を挙げて、本発明につ
いてより具体的に詳述するが、以下に示されるものは本
発明の一実施例にすぎず、本発明の技術的範囲を何隻制
限するものではない。
Hereinafter, the present invention will be described in more detail by citing one preferred embodiment of the present invention. However, what is shown below is only one example of the present invention, and does not exceed the technical scope of the present invention. There is no limit to the number of ships.

第1図は、本発明に従うマイクロコンピュータの構成を
示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a microcomputer according to the present invention.

基準クロック発生器1はマイクロプロセッサの動作用基
本クロックパルスを発生する。プログラム・カウンタ2
はマイクロプロセッサが実行しようとする命令のアドレ
スを生成して、アドレスバス200を通してアドレス信
号を出力する。マイクロプロセッサに接続されたメモリ
から出力される命令はデータ・バス300を通して命令
を保持する命令レジスタ3に保持される。命令デコーダ
4は命令を解析してマイクロプロセッサ内の各部に動作
の支持を与える。このような動作は、従来のマイクロコ
ンピュータと同様の構成と動作である。
A reference clock generator 1 generates basic clock pulses for the operation of the microprocessor. Program counter 2
generates the address of the instruction that the microprocessor is to execute and outputs an address signal through the address bus 200. Instructions output from a memory connected to the microprocessor are held in an instruction register 3 that holds instructions through a data bus 300. The instruction decoder 4 analyzes instructions and provides operational support to each section within the microprocessor. Such operations are similar in configuration and operation to those of conventional microcomputers.

本発明に従うマイクロコンピュータは、更に、命令デコ
ーダ4の2つの出力400および410に接続された遅
延回路5を備えている。このとき、命令デコーダ4の出
力400および410は、それぞれ条件判断命令の条件
の真偽によって選択的に命令コードを出力するように構
成されている。
The microcomputer according to the invention further comprises a delay circuit 5 connected to the two outputs 400 and 410 of the instruction decoder 4. At this time, outputs 400 and 410 of the instruction decoder 4 are configured to selectively output instruction codes depending on whether the condition of the condition judgment instruction is true or false.

各々の遅延回路5は、それぞれ基準クロック発生器1か
らのクロックパルスの供給を受けており、入力された命
令を、1命令時間だけ保持した後命令実行禁止信号を出
力するように構成されている。
Each delay circuit 5 receives a clock pulse from the reference clock generator 1, and is configured to output an instruction execution prohibition signal after holding the input instruction for one instruction time. .

従って、命令デコーダ4の出力410から出力された命
令コードは、2命令実行時間後に信号線500を通じて
命令実行禁止信号として命令デコーダ゛4に返される。
Therefore, the instruction code output from the output 410 of the instruction decoder 4 is returned to the instruction decoder 4 as an instruction execution prohibition signal through the signal line 500 after two instruction execution times.

命令が条件判断命令であり、条件が真のときには真判断
制御信号400を出力し、条件が偽のときには偽判断制
御信号410を出力する。
The command is a condition judgment command, and when the condition is true, a truth judgment control signal 400 is output, and when the condition is false, a false judgment control signal 410 is output.

真判断制御信号400は遅延回路5を通して1命令実行
時間後に命令実行禁止信号500として命令デコーダ4
に人力する。
The truth judgment control signal 400 is passed through the delay circuit 5 and sent to the instruction decoder 4 as an instruction execution prohibition signal 500 after one instruction execution time.
to use human power.

上述のような構成を111行えた、本発明に従うマイク
ロコンピュータに、条件判断命令が人力された場合の、
制御信号の様子を第4図(a)および第4図(5)に示
す。
When a condition judgment instruction is manually input to a microcomputer according to the present invention that can perform the above-mentioned configuration 111,
The states of the control signals are shown in FIGS. 4(a) and 4(5).

第4図(a)は条件が真の場合の制御線400.410
および511の状態を示している。即ち、条件判断命令
が実行され、条件が真であるので真判断制御信号400
が出力される。この信号は遅延回路5によって、1命令
分の実行時間だけ遅延して命令実行禁止信号として命令
デコーダ4に返される。従っ工、条件判断命令に続(命
令20は実行を抑止され、命令10が条件判断命令に続
いて実行され、以下命令11に続く一連の命令が実行さ
れる。
Figure 4(a) shows the control line 400.410 when the condition is true.
and 511 are shown. That is, since the condition judgment command is executed and the condition is true, the truth judgment control signal 400 is
is output. This signal is delayed by the execution time of one instruction by the delay circuit 5 and is returned to the instruction decoder 4 as an instruction execution prohibition signal. Therefore, following the conditional judgment instruction (instruction 20 is inhibited from execution, instruction 10 is executed following the conditional judgment instruction, and a series of instructions following instruction 11 are executed).

第4図(5)は条件が偽の場合の制御線400.410
および500の状態を示している。即ち、条件判断命令
を実行し、条件が偽であるので偽判断制御信号410が
出力される。この信号は2段の遅延回路5によって2命
令実行時間遅延して命令実行禁止命令として命令デコー
ダ500に返される。従って、条件判断命令実行後、続
く命令20を実行し、次に続く命令10は命令レジスタ
3に取込まれても実行はきれず、その後命令11に続く
命令を実行する。
Figure 4 (5) shows the control line 400.410 when the condition is false.
and 500 states are shown. That is, the condition judgment command is executed, and since the condition is false, the false judgment control signal 410 is output. This signal is delayed by two instruction execution times by the two-stage delay circuit 5 and is returned to the instruction decoder 500 as an instruction execution prohibition instruction. Therefore, after the condition judgment instruction is executed, the following instruction 20 is executed, the next following instruction 10 cannot be executed even if it is taken into the instruction register 3, and then the instruction following the instruction 11 is executed.

このように、本発明に従うマイクロコンビ二一夕は、条
件判断命令を実行すると、該命令に続く2命令から、条
件の真偽に応じて一方を選択的に実行した後、以後の命
令を実行する。このとき分岐命令は一切実行されていな
い。
As described above, when a condition judgment instruction is executed, the microcombination unit according to the present invention selectively executes one of the two instructions following the instruction depending on the truth or falsehood of the condition, and then executes the subsequent instruction. do. At this time, no branch instructions are executed.

発明の効果 以上詳述の如く、本発明に従うマイクロコンピュータは
、分岐命令を実行することなく条件判断命令の条件の真
偽によって、異なる命令を選択的に実行することができ
る。従って、条件分岐を実行するために生じる数々の問
題、即ち、メモリの消費、利用領域の分散、処理速度の
低下、プログラムリストの複雑化を避けることができ、
実質的にマイクロコンピュータの利用をより容易で高度
なものに拡大することができる。
Effects of the Invention As detailed above, the microcomputer according to the present invention can selectively execute different instructions depending on the truth or falsehood of the condition of the condition judgment instruction without executing a branch instruction. Therefore, it is possible to avoid many problems that occur when executing conditional branches, such as memory consumption, usage area dispersion, processing speed reduction, and program list complexity.
Substantially, the use of microcomputers can be expanded to be easier and more sophisticated.

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

第1図、本発明に従うマイクロコンピュータの一実施例
の構成を示すブロック図であり、第2図(a)は、従来
のマイクロコンピュータにおいて、条件判断命令の結果
により実行される命令を有するプログラムの例を示すも
のであり、第2図(b)は、従来のマイクロコンピュー
タにおいて条件判断命令によって、ある命令を実行する
かしないかを選択する処理のフローチャートであり、 第3図(a)は、従来のマイクロコンピュータにおいて
、条件判断命令を実行した結果、条件の真偽により異な
る命令を選択的に実行する処理のフローチャートであり
、 第3図(b)は、第3図(a)に示した処理を実行する
ためのプログラムを示すものであり、 第4図は、第1図に示した本発明に従うマイクロコンピ
ュータにおいて、第3図(a)に示した処理を実行する
際の動作を示すものであり、第4図(a)は、条件判断
命令の条件が真のときの制御信号の状態遷移を示し、第
4図(b)は、条件判断命令の条件が偽のときの制御信
号の遷移を示すものである。 (主な参照番号) 1・・基準クロック発生器、 2・・プログラム・カウンタ、 3・・命令レジスタ、4・・命令デコーダ、5・・遅延
回路、 100  ・・命令クロック、 200  ・・アドレス・バス、 300  ・・データ・バス、 400  ・・真判断制御信号、 410  ・・偽判断制御信号、 500  ・・命令実行禁止信号、
FIG. 1 is a block diagram showing the configuration of an embodiment of a microcomputer according to the present invention, and FIG. An example is shown in FIG. 2(b), which is a flowchart of a process in which a conventional microcomputer selects whether or not to execute a certain instruction based on a conditional judgment instruction, and FIG. 3(a) is a FIG. 3(b) is a flowchart of a process in which a conventional microcomputer selectively executes a different instruction depending on the truth or falsehood of a condition as a result of executing a condition judgment instruction. This shows a program for executing the process, and FIG. 4 shows the operation of the microcomputer according to the present invention shown in FIG. 1 when executing the process shown in FIG. 3(a). FIG. 4(a) shows the state transition of the control signal when the condition of the conditional judgment instruction is true, and FIG. 4(b) shows the state transition of the control signal when the condition of the conditional judgment instruction is false. It indicates a transition. (Main reference numbers) 1.Reference clock generator, 2.Program counter, 3.Instruction register, 4.Instruction decoder, 5.Delay circuit, 100.Instruction clock, 200.Address. Bus, 300...Data bus, 400...True judgment control signal, 410...False judgment control signal, 500...Instruction execution prohibition signal.

Claims (1)

【特許請求の範囲】[Claims] 条件判断命令を備えたマイクロコンピュータであって、
条件の真偽により、該条件判断命令に続く1命令の実行
を抑止する手段と、該条件判断命令に続いて2番目の命
令の実行を抑止する手段とを備え、条件の真偽によって
条件判断命令に続いて実行する命令を選択的に実行する
ことを特徴とするマイクロコンピュータ。
A microcomputer equipped with conditional judgment instructions,
A means for inhibiting the execution of one instruction following the condition judgment instruction depending on the truth or falsity of the condition, and a means for suppressing the execution of a second instruction following the condition judgment instruction. A microcomputer is characterized in that it selectively executes instructions that follow one instruction.
JP10587786A 1986-05-08 1986-05-08 Microcomputer Pending JPS62262140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10587786A JPS62262140A (en) 1986-05-08 1986-05-08 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10587786A JPS62262140A (en) 1986-05-08 1986-05-08 Microcomputer

Publications (1)

Publication Number Publication Date
JPS62262140A true JPS62262140A (en) 1987-11-14

Family

ID=14419164

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10587786A Pending JPS62262140A (en) 1986-05-08 1986-05-08 Microcomputer

Country Status (1)

Country Link
JP (1) JPS62262140A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6842852B1 (en) 1999-02-08 2005-01-11 Matsushita Electric Industrial Co., Ltd. System and method for controlling conditional branching utilizing a control instruction having a reduced word length
US7010670B2 (en) 2000-07-04 2006-03-07 Matsushita Electric Industrial Co., Ltd. Data processing device that controls an overriding of a subsequent instruction in accordance with a conditional execution status updated by a sequencer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6842852B1 (en) 1999-02-08 2005-01-11 Matsushita Electric Industrial Co., Ltd. System and method for controlling conditional branching utilizing a control instruction having a reduced word length
US7010670B2 (en) 2000-07-04 2006-03-07 Matsushita Electric Industrial Co., Ltd. Data processing device that controls an overriding of a subsequent instruction in accordance with a conditional execution status updated by a sequencer

Similar Documents

Publication Publication Date Title
US5495588A (en) Programmable controller having joined relay language processor and general purpose processor
US4628449A (en) Vector interrupt system and method
US5161229A (en) Central processing unit
JPS62262140A (en) Microcomputer
JPH0612107A (en) Sequence arithmetic processor and sequence arithmetic processing unit
JPH056281A (en) Information processor
JP2002312005A (en) Prorammable controller
JPH09101889A (en) Arithmetic unit for pipeline
EP0372190A2 (en) System for accelerating execution of program instructions by a microprocessor
JPH0573296A (en) Microcomputer
JP2689914B2 (en) Information processing device
JPH01271840A (en) Microcomputer
JPS61226839A (en) Event processing system
KR100284312B1 (en) Interrupt vector generator for 8x196 microcontroller
JPS5922145A (en) Interruption control system
JPH0683640A (en) Interruption response processing system
JPH03288228A (en) Information processor
JPH10301776A (en) Information processor and pipe line processing method
JPH02263256A (en) Microcomputer and controller
JPS62226339A (en) Control system for prefetching instruction
JPH02139654A (en) Bus control system
JPS61165136A (en) Buffer access request controlling system
JPH04245333A (en) Information processor
JPS6261149A (en) Interruption control system
JPH0628183A (en) Pipeline processing mechanism of information processor