JPS6161411B2 - - Google Patents

Info

Publication number
JPS6161411B2
JPS6161411B2 JP55057422A JP5742280A JPS6161411B2 JP S6161411 B2 JPS6161411 B2 JP S6161411B2 JP 55057422 A JP55057422 A JP 55057422A JP 5742280 A JP5742280 A JP 5742280A JP S6161411 B2 JPS6161411 B2 JP S6161411B2
Authority
JP
Japan
Prior art keywords
instruction
skip
program counter
byte
register
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.)
Expired
Application number
JP55057422A
Other languages
Japanese (ja)
Other versions
JPS56153447A (en
Inventor
Manabu Kimoto
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
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP5742280A priority Critical patent/JPS56153447A/en
Publication of JPS56153447A publication Critical patent/JPS56153447A/en
Publication of JPS6161411B2 publication Critical patent/JPS6161411B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/262Arrangements for next microinstruction selection

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 マイクロコンピユータ(特に4ビツト系)で使
用される命令の中にスキツプ命令がある。これ
は、このスキツプ命令の中で指定されている条件
が成立したときに、このスキツプ命令の次におか
れた命令をスキツプして(次におかれた命令を無
視して)さらにその次の命令(スキツプ命令から
数えて2番目の命令)の実行にうつるような処理
を行う命令である。例えばいま「Aレジスタが0
のときにはスキツプせよ」というスキツプ命令
と、このスキツプ命令の次に、「X番地に分岐せ
よ」という分岐命令とを順序にならべておくと、
Aレジスタが0のときには分岐命令をスキツプす
るため分岐が行なわれないが、Aレジスタが0で
ないときにはスキツプしないため次の分岐命令が
実行されてX番地に分岐する。従がつて、この2
つの命令を上述のように並べることによつて、A
レジスタが0でないときにはX番地に分岐し、0
のときには分岐しない(次の命令を実行する)と
いう条件付分岐命令を構成することができる。ま
たこのスキツプ命令は、次の命令にその他の種々
の命令を組合せることによつて、このスキツプ命
令で指定される条件が成立しないときだけにその
命令を実行し、スキツプ命令で指定される条件が
成立したときにはその命令を無視するという処理
を廣く行なうことができる。一般の条件付ジヤン
プ命令を用いて、ジヤンプ先をこの条件付ジヤン
プ命令の次の次の命令にえらぶことにより、この
スキツプ命令と同じ効果が得られるが、ジヤンプ
命令の場合には、任意のジヤンプ先を指定できる
というメリツトがあるかわりに、必らずそのジヤ
ンプ先のアドレスを指定する必要がある。一方ス
キツプ命令の方は、無視すべき次の命令が何バイ
ト命令であろうとも、スキツプ命令の次の次の命
令のアドレスを全く指定しないで用いることがで
きるというメリツトをもつている。このような処
理を行うスキツプ命令は、とくに命令の種類の少
ない4ビツト系のマイクロコンピユータ等に廣く
便利に使用されている。さらにまた上述のスキツ
プ命令以外に、ある命令を無視するという処理は
次のような場合にも有効に使用される。
DETAILED DESCRIPTION OF THE INVENTION Among the instructions used in microcomputers (particularly 4-bit systems) is a skip instruction. This means that when the condition specified in this skip instruction is met, the instruction placed next to this skip instruction is skipped (ignoring the next instruction), and then the next instruction is executed. This is an instruction that performs processing that leads to the execution of an instruction (second instruction counting from the skip instruction). For example, now "A register is 0"
If we arrange in order a skip instruction that says "skip when ," and a branch instruction that follows this skip instruction that says "branch to address X," we get
When the A register is 0, the branch instruction is skipped and the branch is not executed, but when the A register is not 0, the next branch instruction is executed and the branch is executed to the X address. Accordingly, these two
By arranging the two instructions as above, A
If the register is not 0, branch to address
It is possible to configure a conditional branch instruction that does not branch (executes the next instruction) when . This skip instruction also executes the next instruction only when the condition specified by the skip instruction is not met by combining various other instructions. When this holds true, the command can be ignored. By using a general conditional jump instruction and selecting the next instruction after this conditional jump instruction as the jump destination, the same effect as this skip instruction can be obtained. Although there is the advantage of being able to specify the jump destination, it is necessary to specify the jump destination address. On the other hand, the skip instruction has the advantage that it can be used without specifying the address of the next instruction after the skip instruction at all, no matter how many bytes the next instruction to ignore is. Skip instructions for performing such processing are widely and conveniently used, especially in 4-bit microcomputers that have fewer types of instructions. Furthermore, in addition to the above-mentioned skip command, the process of ignoring a certain command can also be effectively used in the following cases.

すなわち今、同じ種類の命令を順序にならべて
メモリに格納した場合、最初に指定されたアドレ
スにあるある1つの命令を実行し、もしその次の
命令が最初の命令と同じ種類の命令と定義された
命令である場合には、この命令(第2番目の命
令)を無視して(この命令を実行しないで)次の
命令に進むという処理を行なう機能である。この
ような機能があると次のように便利に使用するこ
とができる。例えば今あるサブルーチンのはじめ
に、Aレジスタに3をおくという命令をおき、第
2番目の命令にAレジスタに4をおくという命令
をおき、さらに第3番目の命令にAレジスタに5
をおくという命令を並べておく。そのあとにAレ
ジスタの内容をパラメータとして、処理を行うル
ーチンをおいたとする。今このサブルーチンに入
るときに第1番目の、Aレジスタに3をおくとい
う命令から入ると、このサブルーチンはまずAレ
ジスタに3をおくが、次の命令すなわちAレジス
タに4をおくという命令は上述の最初に実行され
たAレジスタに3をおくという命令と同じ種類の
命令(これを同じ種類の命令と定義する)である
ために上述の機能により無視されてさらに次のA
レジスタに5をおくという命令にすすむ。ところ
がこの命令も前の命令と同じ種類の命令であるた
め無視され、結局この場合には、Aレジスタの値
として、最初に与えられた3をもつて、それをパ
ラメータとしてこのサブルーチンを実行すること
になる。ところが、最初このサブルーチンに入る
ときに、第2番目のAレジスタに4をおくという
命令から入ると、上述と同様な処理のために、こ
の場合には4をパラメータとしてこのサブルーチ
ンを実行することになる。同様に第3番目のAレ
ジスタに5をおくという命令からこのサブルーチ
ンに入ると、5をパラメータとしてこのサブルー
チンを実行する。このようにあるサブルーチンに
入るとき、最初の入口のアドレスを変えて指定す
るだけで異なるパラメータで処理を行なうサブル
ーチンを簡単に作ることができる。このようにあ
る一群の命令を同じ種類の命令と定義して、同じ
種類の命令が続いて現われた場合には、最初のも
のは実行するがそれ以降はこの命令を無視すると
いう上述の機能を命令のたて積み機能と呼ぶこと
にする。
In other words, if instructions of the same type are stored in memory in order, one instruction at the address specified first will be executed, and if the next instruction is defined as the same type of instruction as the first instruction. If the command has been executed, this function ignores this command (the second command) and proceeds to the next command (without executing this command). With such a function, you can use it conveniently as follows. For example, at the beginning of the current subroutine, put an instruction to put 3 in the A register, the second instruction put 4 in the A register, and then the third instruction put 5 in the A register.
Line up the commands to place . Suppose that a routine is then placed that performs processing using the contents of the A register as a parameter. When entering this subroutine now, if you enter from the first instruction to put 3 in the A register, this subroutine will first put 3 in the A register, but the next instruction, which is the instruction to put 4 in the A register, is as described above. Since it is the same type of instruction (this is defined as the same type of instruction) as the first executed instruction to place 3 in the A register, it is ignored by the above function and the next A
Proceed with the instruction to place 5 in the register. However, since this instruction is of the same type as the previous instruction, it is ignored, and in this case, the subroutine is executed with the initially given 3 as the value of the A register and that as a parameter. become. However, when entering this subroutine for the first time, if it is entered from an instruction to place 4 in the second A register, the subroutine will be executed with 4 as a parameter because of the same processing as described above. Become. Similarly, when this subroutine is entered from an instruction to place 5 in the third A register, this subroutine is executed with 5 as a parameter. In this way, when entering a subroutine, you can easily create a subroutine that performs processing with different parameters simply by changing and specifying the first entry address. In this way, if a group of instructions are defined as instructions of the same type, and instructions of the same type appear consecutively, the above-mentioned function executes the first instruction but ignores the subsequent instructions. We will call this the command stacking function.

上述のようなスキツプ命令あるいは命令のたて
積み機能を行うに当つて、しかるべき条件が成立
した場合(すなわち、スキツプ命令ではこの命令
で指定される条件が成立した場合、また命令のた
て積み機能においてはある命令が前の命令と同じ
種類の命令であるという条件が成立した場合)に
は、従来のマイクロプログラム制御装置において
は、その無視されるべき命令が実行されている期
間、命令の実行効果を禁止する禁止回路を働かせ
てその命令を無効果にするという方法をとつてい
る。このために、例えば、実行するのに6マシン
サイクルを必要とするある命令を無効果にする場
合には、従来の装置においては、無効果にする場
合でもこの命令を正規に行なうのと同じ6マシン
サイクルを費いやしてから次の命令にうつるとい
う結果になり、処理時間が必要以上に長くかかる
という欠点を有している。本発明の目的はかかる
欠点を除去したマイクロプログラム制御装置を提
供することにある。
When performing the above-mentioned skip command or instruction stacking function, if the appropriate conditions are met (i.e., in the case of a skip instruction, if the conditions specified by this command are met, and if the instruction stacking function is executed) In a conventional microprogram control device, when the condition that an instruction is the same type of instruction as the previous instruction is established, the instruction is ignored during the execution of the instruction that should be ignored. The method is to activate a prohibition circuit that prohibits the execution effect, thereby rendering the command ineffective. For this reason, for example, if you want to make an instruction that requires 6 machine cycles to execute have no effect, in conventional devices, even if you make it have no effect, it will take the same 6 machine cycles as if it were executed normally. This method has the disadvantage that machine cycles are expended before proceeding to the next instruction, and the processing time is longer than necessary. It is an object of the present invention to provide a microprogram control device that eliminates such drawbacks.

本発明はメモリから読み出された命令が無効に
されるべき命令であるか否かを判別する判別回路
と、該判別回路によつて無効にされるべきである
ことが判別された場合、当該命令が本来必要とさ
れるマシンサイクル数よりも少ないマシンサイク
ル数でプログラムカウンタの内容を更新する回路
とを有することを特徴とする。
The present invention includes a determination circuit that determines whether an instruction read from a memory is an instruction that should be invalidated, and a determination circuit that determines whether an instruction read from a memory is an instruction that should be invalidated. and a circuit that updates the contents of a program counter in a smaller number of machine cycles than the number of machine cycles originally required for the instruction.

次に本発明のマイクロプログラム制御装置を図
面を用いて詳細に説明する。まず最初にスキツプ
命令の場合について説明し、次に本発明の一実施
例について説明する。第1図はスキツプ命令の場
合を説明するためのブロツク図である。参照数字
1はマイクロ命令メモリ回路を示す。ある命令を
実行する場合、その命令の第1マシンサイクルに
おいてこの中に格納されているマイクロ命令の中
から、プログラムカウンタ3で指定されるアドレ
スにあるこの命令の第1バイト目がまず読出され
て命令レジスタ2に格納される。マイクロ命令の
第1バイト目がこうして命令レジスタ2に読出さ
れると、これはデコーダ4で解読され、この命令
が1バイト命令か2バイト命令かあるいは3バイ
ト命令か等に応じて制御回路5が、プログラムカ
ウンタ制御回路6を制御して、この命令をさらに
解読していくのに必要なマシンサイクルごとにプ
ログラムカウンタ3の内容を1つづつ進めて、そ
の命令に属するすべてのバイトを前記命令レジス
タ2に順次に読み出し解読する。こうして、解読
されたこのマイクロ命令で指定される処理を実行
制御回路5が実行する。かくして、さらにこの命
令の実行に必要な数のマシンサイクルが経過する
と、制御回路5は、プログラムカウンタ制御回路
6を介してプログラムカウンタ3の内容をさらに
1だけ進める。そして、次のマシンサイクルにお
いてこのプログラムカウンタ3の内容で指定され
るアドレスにある次の命令の第1バイト目を読み
出し、こうして次の新らしい命令の実行に進む。
さていま、スキツプ命令が命令レジスタ2に読み
出されたとする。これは前述のように命令デコー
ダ4で解読されるが、これがスキツプ命令である
という指定により、スキツプ命令指定ライン7の
論理レベルを“1”にする。さらにこのスキツプ
命令の中のスキツプ条件を指定する部分がスキツ
プ条件選択回路8に供給され、諸種のスキツプ条
件信号9の中からこのスキツプ命令によつて指定
された条件信号が選出される。(この条件信号9
の中には例えば前述のAレジスタの内容が0だつ
たら論理レベルが“1”になり、Aレジスタの内
容が0でなかつたら論理レベルが“0”になるよ
うな信号とか、または、指定されたポートに入力
データがある場合には論理レベルが“1”にな
り、入力データがない場合には論理レベルが
“0”になる信号等の種々の条件信号が含まれて
いる。)前記スキツプ条件選択回路8で選出され
た条件信号はアンド回路10を用いて、前記スキ
ツプ命令指定ライン7の信号と合成されて、フリ
ツプフロツプ11のセツト端子に加えられる。
Next, the microprogram control device of the present invention will be explained in detail using the drawings. First, the case of a skip instruction will be explained, and then one embodiment of the present invention will be explained. FIG. 1 is a block diagram for explaining the case of a skip instruction. Reference numeral 1 indicates a microinstruction memory circuit. When a certain instruction is executed, the first byte of this instruction at the address specified by program counter 3 is first read from among the microinstructions stored in this instruction in the first machine cycle of that instruction. Stored in instruction register 2. When the first byte of the microinstruction is thus read into the instruction register 2, it is decoded by the decoder 4, and the control circuit 5 decodes it depending on whether this instruction is a 1-byte, 2-byte, or 3-byte instruction, etc. , controls the program counter control circuit 6 to increment the contents of the program counter 3 by one for each machine cycle required to further decode this instruction, and stores all bytes belonging to the instruction in the instruction register. 2 are sequentially read and decoded. In this way, the execution control circuit 5 executes the process specified by this decoded microinstruction. Thus, after a further number of machine cycles necessary for the execution of this instruction have elapsed, the control circuit 5, via the program counter control circuit 6, further increments the contents of the program counter 3 by one. Then, in the next machine cycle, the first byte of the next instruction at the address specified by the contents of the program counter 3 is read out, and execution proceeds to the next new instruction.
Now, suppose that a skip instruction is read into instruction register 2. This is decoded by the instruction decoder 4 as described above, but by specifying that this is a skip instruction, the logic level of the skip instruction designation line 7 is set to "1". Further, a portion of this skip instruction specifying a skip condition is supplied to a skip condition selection circuit 8, and the condition signal specified by this skip instruction is selected from among various skip condition signals 9. (This condition signal 9
For example, if the content of the A register mentioned above is 0, the logic level becomes "1", and if the content of the A register is not 0, the logic level becomes "0", or a specified signal. Various condition signals are included, such as a signal whose logic level becomes "1" when there is input data in the port that has been input, and a signal whose logic level becomes "0" when there is no input data. ) The condition signal selected by the skip condition selection circuit 8 is combined with the signal on the skip instruction designation line 7 using an AND circuit 10 and applied to the set terminal of the flip-flop 11.

従つて、フリツプフロツプ11は、スキツプ命
令が解読され、かつそのスキツプ命令で指定され
た条件が成立しているとセツトされる。さて、前
記制御回路5は、以上によるスキツプ命令の処理
がすむとプログラムカウンタ制御回路6を介し
て、プログラムカウンタ3の内容を1だけ進め
る。そして次のマシンサイクルで、このスキツプ
命令の次のアドレスからはじまる命令の第1バイ
ト目を命令レジスタ2に読出す。このようにある
命令の第1バイト目をデコードすることにより、
この命令が何バイトで構成されている命令かの情
報が得られるので、この命令のバイト数を指定す
る情報をとり出し、これをバイト数出力ライン1
2を介して加算器13の一方の入力に加える。こ
の加算器13のもう一方の入力にはプログラムカ
ウンタ3の内容が供給されている。さて、実行制
御回路5は、こうして命令の1バイト目を読み、
その命令のバイト数の解読が完了し、かつ加算器
13によるそのバイト数入力とプログラムカウン
タ3の内容との加算が完了した時点で、プログラ
ムカウンタ書き込みパルスライン14を介してプ
ログラムカウンタ書き込みパルスを出力する。こ
のプログラムカウンタ書き込みパルスライン14
と、前記フリツプフロツプ11の出力ラインとは
第2のアンド回路15で合成され、かくして前記
フリツプフロツプ11がセツトされている場合に
かぎり(すなわち前の命令がスキツプ命令でかつ
そのスキツプ条件が成立しているときにかぎり)
第2のアンド回路15の出力側に、前記プログラ
ムカウンタ書き込みパルス出力ライン14を介し
て出力された書き込みパルスが現われる。この書
き込みパルスは前記プログラムカウンタ制御回路
6を制御して前記加算器13の出力をプログラム
カウンタ3に書き込む。かくしてこのプログラム
カウンタ3の内容は、前記スキツプ命令から数え
て第2番目の命令の第1バイト目を指定すること
になる。以上の処理は一般に前記スキツプ命令の
次の命令の第1バイト目を読み出したマシンサイ
クル内に完了する。さて、こうして指定された第
2番目の命令の第1バイト目が、次のマシンサイ
クルで、命令レジスタ2に読出されて、あらため
て、この命令の第1マシンサイクルに入ることに
なる。
Therefore, flip-flop 11 is set when the skip instruction is decoded and the condition specified by the skip instruction is met. Now, when the above skip command processing is completed, the control circuit 5 increments the contents of the program counter 3 by 1 via the program counter control circuit 6. Then, in the next machine cycle, the first byte of the instruction starting from the address next to this skip instruction is read into the instruction register 2. By decoding the first byte of a certain instruction in this way,
Information on how many bytes this instruction consists of can be obtained, so extract the information that specifies the number of bytes of this instruction and add it to the byte count output line 1.
2 to one input of the adder 13. The other input of this adder 13 is supplied with the contents of the program counter 3. Now, the execution control circuit 5 reads the first byte of the instruction in this way,
When the byte number of the instruction has been decoded and the adder 13 has completed adding the byte number input and the contents of the program counter 3, a program counter write pulse is output via the program counter write pulse line 14. do. This program counter write pulse line 14
and the output line of the flip-flop 11 are combined in a second AND circuit 15, and thus only when the flip-flop 11 is set (i.e., the previous instruction is a skip instruction and the skip condition is satisfied). only occasionally)
At the output of the second AND circuit 15, the write pulse outputted via the program counter write pulse output line 14 appears. This write pulse controls the program counter control circuit 6 to write the output of the adder 13 into the program counter 3. Thus, the contents of the program counter 3 specify the first byte of the second instruction counted from the skip instruction. The above processing is generally completed within the machine cycle when the first byte of the instruction following the skip instruction is read. Now, the first byte of the second instruction thus specified is read out to the instruction register 2 in the next machine cycle, and the first machine cycle of this instruction is entered again.

なお、前記実行制御回路5は、前記プログラム
カウンタ書き込みパルスライン14に書き込みパ
ルスを発生した後、このマシンサイクルの終りに
近い時点でリセツトパルスを発生し、それをリセ
ツトパルスライン16を介して前記フリツプフロ
ツプ11のリセツト端子に供給して、このフリツ
プフロツプ11をリセツトする。なおまた、フリ
ツプフロツプ11の出力は、前記第2のアンド回
路15の一方の入力となると共に、命令実行抑圧
信号として、命令実行抑圧信号ライン17を介し
て前記実行制御回路5に供給され、この信号ライ
ンの論理レベルが“1”の期間は、実行制御回路
5が行なう前述のプログラムカウンタ書き込みパ
ルスの発生とリセツトパルスの発生とを除いて、
それ以外の第1バイト目の解読の結果行うべき処
理を抑圧する。それと同時に、この信号の後縁部
分は、次のマシンサイクルで、命令レジスタ2に
読み出されるバイトを、新らしい命令の第1バイ
ト目として処理するように実行制御回路5をセツ
トするのに使用される。
After generating a write pulse on the program counter write pulse line 14, the execution control circuit 5 generates a reset pulse near the end of this machine cycle, and sends it to the flip-flop via a reset pulse line 16. 11 to reset the flip-flop 11. Furthermore, the output of the flip-flop 11 becomes one input of the second AND circuit 15, and is also supplied as an instruction execution suppression signal to the execution control circuit 5 via the instruction execution suppression signal line 17. During the period when the logic level of the line is "1", except for the generation of the program counter write pulse and reset pulse, which are performed by the execution control circuit 5,
Other processing that should be performed as a result of decoding the first byte is suppressed. At the same time, the trailing edge of this signal is used to set the execution control circuit 5 to treat the byte read into the instruction register 2 as the first byte of a new instruction in the next machine cycle. Ru.

勿論、スキツプ命令が解読されても、そのスキ
ツプ命令で指定された条件が成立しない場合には
前記フリツプフロツプ11がセツトされないた
め、スキツプ命令の次の命令は最初に述べた正規
のプロセス従つて実行される。
Of course, even if the skip instruction is decoded, if the condition specified by the skip instruction is not satisfied, the flip-flop 11 will not be set, so the instruction following the skip instruction will be executed according to the normal process mentioned above. Ru.

このようにして、前述したスキツプ命令の機能
が実現されるが、上の説明で明らかなように、も
しスキツプ命令のスキツプ条件が成立した場合に
はスキツプ命令の次の命令の如何にかかわらず
(この命令を正規に実行するのに何マシンサイク
ル必要であるかにかかわらず)常に1マシンサイ
クルでその命令を無効果にして第2番目の命令に
進むことができる。
In this way, the function of the skip instruction described above is realized, but as is clear from the above explanation, if the skip condition of the skip instruction is satisfied, regardless of the instruction following the skip instruction ( Regardless of how many machine cycles it takes to properly execute this instruction, it always takes one machine cycle to disable that instruction and proceed to the second instruction.

上述の処理の時間関係を第2図に示す。第2図
Aは従来の装置の例を示す。スキツプ命令の格納
されているメモリアドレスをnとすると、プログ
ラムカウンタの内容は最初nでスキツプ命令を読
みだす。今スキツプ条件が成立していなかつたと
仮定する。次のマシンサイクルでプログラムカウ
ンタの内容はn+1になり次の命令の第1バイト
目を読み出す。例えば次の命令が、実行するのに
6マシンサイクルを要する3バイトのコール命令
であつたと仮定する。この場合、プログラムカウ
ンタの内容は次のマシンサイクルでn+3まで進
んでこの命令の3バイト分を全部読み出し、さら
に3マシンサイクルを費やしてこの命令の実行を
完了する。そして次のマシンサイクルでプログラ
ムカウンタはn+4に進みスキツプ命令の次の次
の命令の第1バイト目を読み出して、新らしくこ
の命令の実行に入る。この場合の処理を、スキツ
プ条件不成立時として第2図Aの第2番目の線図
に示す。もしスキツプ条件が成立していない場合
には、上記スキツプ命令の次の命令(前記コール
命令)が実行されるべきマシンサイクルの期間中
本来のコール命令のかわりにノーオペレーシヨン
が繰り返され、実効的には何等の処理をせずに6
マシンサイクルを費やした後、次の次の命令の実
行に入る。これを第2図Aのスキツプ条件成立時
の線図として示す。
The time relationship of the above-mentioned processing is shown in FIG. FIG. 2A shows an example of a conventional device. Assuming that the memory address where the skip instruction is stored is n, the contents of the program counter are such that the skip instruction is first read out at n. Assume that the skip condition is not satisfied. In the next machine cycle, the contents of the program counter become n+1 and the first byte of the next instruction is read. For example, suppose the next instruction is a 3-byte call instruction that takes 6 machine cycles to execute. In this case, the contents of the program counter advance to n+3 in the next machine cycle, read all three bytes of this instruction, and take another three machine cycles to complete execution of this instruction. Then, in the next machine cycle, the program counter advances to n+4, reads the first byte of the next instruction following the skip instruction, and starts executing this instruction anew. The processing in this case is shown in the second diagram of FIG. 2A when the skip condition is not satisfied. If the skip condition is not satisfied, a no-operation is repeated instead of the original call instruction during the machine cycle in which the instruction following the skip instruction (the call instruction) is to be executed, resulting in an effective no-operation. 6 without any processing
After spending a machine cycle, it begins executing the next next instruction. This is shown as a diagram when the skip condition is met in FIG. 2A.

一方、本実施例の場合を第2図Bに示す。この
場合にもスキツプ条件不成立時には、図に示す通
り従来例の場合と全く同様である。しかしスキツ
プ条件が成立した場合には、第2図Bのスキツプ
条件成立時の線図で示すように、スキツプ命令の
次の1マシンサイクルで、プログラムカウンタを
スキツプ命令の次の命令のバイト成分(スキツプ
される命令のバイト数分)だけ一挙に進めて、
(この例においてはプログラムカウンタを一挙に
3だけ進めて)その次のマシンサイクルには、ス
キツプ命令の次の次の命令の実行に入ること示し
ている。
On the other hand, the case of this embodiment is shown in FIG. 2B. In this case as well, when the skip condition is not satisfied, the process is exactly the same as in the conventional example, as shown in the figure. However, if the skip condition is met, as shown in the diagram when the skip condition is met in Figure 2B, the byte component of the instruction following the skip instruction ( advance by the number of bytes of the skipped instruction) at once,
(In this example, the program counter is incremented by 3 at once) to indicate that execution of the next instruction following the skip instruction will begin in the next machine cycle.

なお、上述の実施例においては、プログラムカ
ウンタの内容とスキツプ命令の次の命令のバイト
数とを加算器を用いて加えることによつて、第2
番目の命令のアドレスを直接求め、それによつて
スキツプ処理を最小処理時間で行なつたが、その
かわりに次のように行うこともできる。
Note that in the above embodiment, by adding the contents of the program counter and the number of bytes of the next instruction after the skip instruction using an adder, the second
Although the address of the th instruction is directly obtained and thereby the skip processing is performed in the minimum processing time, it is also possible to perform the skip processing as follows instead.

すなわち、前記フリツプフロツプ11の出力お
よび前記バイト数出力ライン12の出力を直接前
記プログラムカウンタ制御回路6に加え、前記フ
ロツプフロツプ11の出力が論理レベル“1”に
なつた場合には、前記バイト数出力ライン12の
出力で指定されるバイト数分だけ正規の命令処理
を行う場合よりも早くサイクルでプログラムカウ
ンタ3の内容を進めるという構成をとることもで
きる。こうすることによつてスキツプ条件が満足
された場合のスキツプ処理を従来の装置よりも短
かくすることができる。
That is, the output of the flip-flop 11 and the output of the byte number output line 12 are directly applied to the program counter control circuit 6, and when the output of the flip-flop 11 reaches logic level "1", the byte number output line It is also possible to adopt a configuration in which the contents of the program counter 3 are advanced in cycles faster than when normal instruction processing is performed by the number of bytes specified by the output of 12. By doing so, the skip processing when the skip conditions are satisfied can be made shorter than in the conventional device.

以上はスキツプ命令を使用する場合の、スキツ
プされる命令を無効果にする構成について述べた
が、同様な命令を無効果にするための構成を、前
述の命令のたて積み機能を実施する場合に使用す
ることができる。
The above has described a configuration that makes a skipped instruction ineffective when using a skip instruction.However, a configuration for making a similar instruction ineffective is implemented when implementing the above-mentioned instruction stacking function. It can be used for.

第3図は本発明の一実施例を示すブロツク図で
ある。参照数字24は第1図の命令デコーダ4と
同様な機能を有するデコーダであるが、さらに下
記のような機能が追加されている。すなわち、あ
る命令の第1バイト目が命令レジスタ2に読み出
されたとすると、デコーダ24は内部に記憶され
ているその命令の1つ前の命令の第1バイト目に
関する情報と比較して新らしい命令が一つ前の命
令と同じ種類の命令と定義されている命令か否か
を検査する。何をもつて同じ種類の命令と定義す
るかは、前述の命令のたて積み機能をなるべく有
効に使用できるように定義する。そし、このよう
にして定義された同じ種類の命令を、前述のよう
にして検出できるようにデコーダを構成する。
FIG. 3 is a block diagram showing one embodiment of the present invention. Reference numeral 24 is a decoder having the same functions as the instruction decoder 4 in FIG. 1, but the following functions are added. In other words, when the first byte of a certain instruction is read into the instruction register 2, the decoder 24 determines whether the first byte of an instruction is newer than the information stored internally regarding the first byte of the instruction immediately before the instruction. Check whether the instruction is defined as the same type of instruction as the previous instruction. What is defined as the same type of instructions is defined so that the above-mentioned function of stacking instructions can be used as effectively as possible. Then, the decoder is configured to be able to detect the same type of instructions defined in this way as described above.

こうして現在の命令がその一つ前の命令と同じ
種類の命令として検出されると、たて積命令検出
ライン27に論理レベル“1”のパルスを出力す
る。この検出ライン27は第1図と同様な機能を
有するフリツプフロツプ11のセツト端子に供給
されこれをセツトする。そしてこのフリツプフロ
ツプ11がセツトされると、あとは第1図で説明
したのと殆んど同様にして、プログラムカウンタ
3の現在の内容に、この命令のバイト数を出力す
るバイト数出力ライン12の出力を加える加算器
13の出力を、プログラムカウンタ3に書き込
み、かつこの命令の実行を命令抑圧信号ライン1
7を介して抑圧する。かくして第1図を用いて説
明したのと同様にして、この命令の第1バイトを
読み出したのと同じマシンサイクル内に以上の処
理を完了し、次のマシンサイクルでは、次の命令
の第1バイト目をインストラクシヨンレジスタ2
に読み出し、直ちにその命令のマシンサイクルに
入ることができる。
When the current instruction is detected as the same type of instruction as the previous instruction, a pulse of logic level "1" is output to the stacked instruction detection line 27. This detection line 27 is supplied to the set terminal of flip-flop 11, which has the same function as that in FIG. 1, to set it. Once this flip-flop 11 is set, the current contents of the program counter 3 are changed to the byte number output line 12, which outputs the number of bytes of this instruction, in much the same manner as described in FIG. The output of the adder 13 that adds the output is written to the program counter 3, and the execution of this instruction is sent to the instruction suppression signal line 1.
Suppress via 7. Thus, in the same way as explained using FIG. 1, the above processing is completed within the same machine cycle in which the first byte of this instruction is read, and in the next machine cycle, the first byte of the next instruction is Set byte to instruction register 2
can be read and immediately enter the machine cycle for that instruction.

また、前記第1図に関連して述べたように、前
記第2図の加算器13を用いて行うかわりに、前
記フリツプフロツプ11の出力および前記バイト
数出力ライン12の出力を直接前記プログラムカ
ウンタ制御回路6に加え、前記フリツプフロツプ
11の出力が論理レベル“1”になつた場合に
は、前記バイト数出力ライン12の出力で指定さ
れるバイト数分だけ、正規の命令処理を行う場合
よりも早いサイクルでプログラムカウンタ3の内
容を進めるという構成をとることもできる。
Furthermore, as described in connection with FIG. 1, instead of using the adder 13 in FIG. 2, the output of the flip-flop 11 and the output of the byte number output line 12 are directly controlled by the program counter. In addition to the circuit 6, when the output of the flip-flop 11 becomes logic level "1", it is faster than normal instruction processing by the number of bytes specified by the output of the byte number output line 12. It is also possible to adopt a configuration in which the contents of the program counter 3 are advanced in cycles.

以上述べたように本発明を用いることによつ
て、命令のたて積み機能を用いて同じ種類の次の
命令を無効果にする場合に、従来の装置よりも短
かい処理時間で処理できるマイクロプログラム制
御装置を提供できるという効果がある。
As described above, by using the present invention, when using the instruction stacking function to make the next instruction of the same type ineffective, it is possible to use a microprocessor that can process in a shorter processing time than conventional devices. This has the effect of providing a program control device.

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

第1図は本発明を説明するためのブロツク図、
および第2図はスキツプ命令の実行経過を説明す
る図および第3図は本発明の一実施例を示すブロ
ツク図である。 図において、1……マイクロ命令メモリ回路、
2……マイクロ命令レジスタ、3……プログラム
カウンタ、4……命令デコーダ、5……実行制御
回路、6……プログラムカウンタ制御回路、7…
…スキツプ命令指定ライン、8……スキツプ条件
選択回路、9……スキツプ条件、10……アンド
回路、11……フリツプフロツプ、12……バイ
ト数出力ライン、13……加算器、14……プロ
グラムカウンタ書き込みパルスライン、15……
第2のアンド回路、16……リセツトパルスライ
ン、17……命令実行抑圧信号ライン、24……
命令デコーダ、27……たて積み命令検出ライ
ン。
FIG. 1 is a block diagram for explaining the present invention.
2 is a diagram illustrating the progress of execution of a skip instruction, and FIG. 3 is a block diagram showing an embodiment of the present invention. In the figure, 1... microinstruction memory circuit;
2...Micro instruction register, 3...Program counter, 4...Instruction decoder, 5...Execution control circuit, 6...Program counter control circuit, 7...
... Skip instruction designation line, 8 ... Skip condition selection circuit, 9 ... Skip condition, 10 ... AND circuit, 11 ... Flip-flop, 12 ... Byte number output line, 13 ... Adder, 14 ... Program counter Write pulse line, 15...
Second AND circuit, 16... Reset pulse line, 17... Instruction execution suppression signal line, 24...
Instruction decoder, 27...Vertical stack instruction detection line.

Claims (1)

【特許請求の範囲】[Claims] 1 マイクロ命令が格納されているメモリのアド
レスを指定するプログラムカウンタと、これによ
つて読出されたマイクロ命令がその前に読み出さ
れた命令と同じ機能をもつ命令であるか否かを判
定するデコーダと、前記読み出された命令がその
前の命令と同じ機能をもつ命令であると判定され
た場合、当該マイクロ命令に基く処理を無効にす
る手段と、前記無効にされた命令の第1語目に設
定されている当該命令の語数を示す数情報と前記
プログラムカウンタの内容とを加算することによ
つて前記命令の実行に必要とされるサイクル数よ
りも少ないサイクル数で前記プログラムカウンタ
の内容を更新し、次の命令をアクセスする手段と
を有することを特徴とするマイクロプログラム制
御装置。
1. A program counter that specifies the address of the memory where the microinstruction is stored, and determines whether the microinstruction read by this is an instruction with the same function as the previously read instruction. a decoder; when it is determined that the read instruction is an instruction having the same function as the previous instruction, means for disabling processing based on the microinstruction; and a first microinstruction of the disabled instruction. By adding the number information indicating the number of words of the instruction set in the word column and the contents of the program counter, the program counter is increased in a number of cycles less than the number of cycles required to execute the instruction. A microprogram control device comprising means for updating contents and accessing a next instruction.
JP5742280A 1980-04-30 1980-04-30 Microprogram control device Granted JPS56153447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5742280A JPS56153447A (en) 1980-04-30 1980-04-30 Microprogram control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5742280A JPS56153447A (en) 1980-04-30 1980-04-30 Microprogram control device

Publications (2)

Publication Number Publication Date
JPS56153447A JPS56153447A (en) 1981-11-27
JPS6161411B2 true JPS6161411B2 (en) 1986-12-25

Family

ID=13055208

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5742280A Granted JPS56153447A (en) 1980-04-30 1980-04-30 Microprogram control device

Country Status (1)

Country Link
JP (1) JPS56153447A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5455337A (en) * 1977-10-12 1979-05-02 Nec Corp Logical operation processing circuit
JPS54163641A (en) * 1978-06-15 1979-12-26 Matsushita Electric Ind Co Ltd Instruction execution system
JPS5541558A (en) * 1978-09-19 1980-03-24 Toshiba Corp Micro program control system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5455337A (en) * 1977-10-12 1979-05-02 Nec Corp Logical operation processing circuit
JPS54163641A (en) * 1978-06-15 1979-12-26 Matsushita Electric Ind Co Ltd Instruction execution system
JPS5541558A (en) * 1978-09-19 1980-03-24 Toshiba Corp Micro program control system

Also Published As

Publication number Publication date
JPS56153447A (en) 1981-11-27

Similar Documents

Publication Publication Date Title
JPS645330B2 (en)
US4885682A (en) Microprogram controller for detecting the occurrence of an interrupt request or a termination of a string instruction
JPS6212529B2 (en)
JPS6156822B2 (en)
JPS6226486B2 (en)
JPS6161411B2 (en)
JP3055999B2 (en) Microprogram control device group
JP2694948B2 (en) Micro program processor
JP2637070B2 (en) Micro instruction start address generation method
JPS6339928B2 (en)
JP2758624B2 (en) Speed control method of micro program
JP2541940B2 (en) Micro program controller
JPS6242301B2 (en)
JP3057732B2 (en) Information processing device
JP2506874B2 (en) Micro program controller
JP2689894B2 (en) Micro program control type information processing device
JPS58200349A (en) Microprogram controller
CA1270572A (en) Microprogram control device
JPS5842891B2 (en) Meirei Seigiyohoushiki
JPH0683986A (en) Single chip microcomputer
JP2723642B2 (en) Emulation method of software instructions
JPS62237530A (en) Program counter circuit
JPH0810429B2 (en) Micro program controller
JPS6131895B2 (en)
JPH0435779B2 (en)