JPS6226486B2 - - Google Patents
Info
- Publication number
- JPS6226486B2 JPS6226486B2 JP55057423A JP5742380A JPS6226486B2 JP S6226486 B2 JPS6226486 B2 JP S6226486B2 JP 55057423 A JP55057423 A JP 55057423A JP 5742380 A JP5742380 A JP 5742380A JP S6226486 B2 JPS6226486 B2 JP S6226486B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- skip
- byte
- circuit
- program counter
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/22—Microcontrol or microprogram arrangements
- G06F9/26—Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
- G06F9/262—Arrangements 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)
- Executing Machine-Instructions (AREA)
- Advance Control (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 (especially 4-bit instructions) 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 taken.
If not, the next branch instruction is executed and branched to address X because the skip is not performed. Therefore, by arranging these two commands as described above,
If the A register is not 0, branch to address X,
If it is 0, do not branch (execute the next instruction)
A conditional branch instruction can be constructed.
In addition, this skip instruction can be executed by combining the next instruction with various other instructions to execute that instruction only when the conditions specified by this skip instruction are not met. When a condition is met, the command can be ignored in a wide variety of ways. By using a general conditional jump instruction and selecting the jump destination as the next instruction after this conditional jump instruction,
Although the same effect as this skip instruction can be obtained, the jump instruction has the advantage of being able to specify an arbitrary jump destination, but it is necessary to specify the address of the jump destination. 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, etc., which have fewer types of instructions. Furthermore, the above-mentioned process of ignoring instructions other than the skip instruction can 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 sequentially, one instruction at the address specified first is 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, that is, the instruction to put 4 in the A register, will Since it is the same type of instruction as the above-mentioned instruction that places 3 in the A register that was executed first (this is defined as the same type of instruction), it is ignored by the above-mentioned function and further adds 5 to the next A register. I proceeded with the order to leave. However, this instruction is also ignored because it is the same type of instruction as the previous instruction, and in the end, in this case, the subroutine is executed with the initially given 3 as the value of the A register and using that as a parameter. It turns out. 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 is defined as the same type of instructions, and the same type of instructions appear consecutively,
The above-mentioned function of executing the first command but ignoring subsequent commands will be referred to as the command stacking function.
上述のようなスキツプ命令あるいは命令のたて
積み機能を行うに当つて、しかるべき条件が成立
した場合(すなわち、スキツプ命令ではこの命令
で指定される条件が成立した場合、また命令のた
て積み機能においてはある命令の前の命令と同じ
種類の命令であるという条件が成立した場合)に
は、従来のマイクロプログラム制御装置において
は、その無視されるべき命令が実行されている期
間、命令の実行効果を禁止する禁止回路を働かせ
てその命令を無効果にするという方法をとつてい
る。このために、例えば、実行するのに6マシン
サイクルを必要とするある命令を無効果にする場
合には、従来の装置においては、無効果にする場
合でもこの命令を正規に行なうのと同じ6マシン
サイクルを費いやしてから次の命令にうつるとい
う結果になり、処理時間が必要以上に長くかかる
という欠点を有している。本発明の目的はかかる
欠点を除去したマイクロプログラム制御装置を提
供することにある。 When performing the above-mentioned skip command or command stacking function, if the appropriate conditions are met (i.e., in the case of a skip command, if the conditions specified by this command are met, or when the command stacking function is executed) In a conventional microprogram control device, the instruction is ignored during the execution of the instruction that should be ignored (if the condition is that the instruction is of the same type as the instruction before it). 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 the instruction was normally executed. This method has the disadvantage that machine cycles are expended before proceeding to the next instruction, and the processing time is longer than necessary. The object of the present invention is to provide a microprogram control device that eliminates such drawbacks.
本発明のマイクロプログラム制御装置は、メモ
リアドレスを指定するプログラムカウンタと、指
定された条件が成立した場合に次の命令を無効果
にする命令を解読するデコーダと、前記デコーダ
が該命令を解読してかつその命令で指定されてい
る条件が成立している場合に該命令の次の命令の
実行を抑止する手段と、前述の場合に前記次の命
令を該命令がない場合に正規に実行するのに必要
とするマシンサイクルよりも少ないマシンサイク
ル内に前記プログラムカウンタの内容は前記次の
命令に続く命令のアドレスを指定するようにセツ
トする手段とを含んで構成される。 The microprogram control device of the present invention includes a program counter that specifies a memory address, a decoder that decodes an instruction that makes the next instruction ineffective when a specified condition is met, and a decoder that decodes the instruction. means for suppressing the execution of the next instruction after the instruction when the condition specified by the instruction is met, and means for normally executing the next instruction when the instruction does not exist in the above-mentioned case. and means for setting the contents of the program counter to specify the address of the instruction following the next instruction within fewer machine cycles than required for the next 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バイト目を読み出し、
こうして次の新らしい命令の実行に進む。 Next, the microprogram control device of the present invention will be explained in detail using the drawings. FIG. 1 is a block diagram showing one embodiment of the present invention. Reference numeral 1 indicates a microinstruction memory circuit. When executing a certain instruction, in the first machine cycle of that instruction, from among the microinstructions stored in this instruction,
The first byte of this instruction at the address specified by the program counter 3 is first read and stored in the 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 this instruction is
Depending on whether the instruction is a byte instruction, a 2-byte instruction, or a 3-byte instruction, the control circuit 5 controls the program counter control circuit 6 to increase the program counter 3 every machine cycle required to further decode this instruction. The contents of the instruction register 2 are advanced by one and all bytes belonging to that instruction are stored in the instruction register 2.
are sequentially read and deciphered. The execution control circuit 5 executes the process specified by the microinstruction thus decoded. 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, increments the contents of the program counter 3 by one more. Then, in the next machine cycle, the first byte of the next instruction located at the address specified by the contents of this program counter 3 is read out,
In this way, execution proceeds to the next new instruction.
さていま、スキツプ命令が命令レジスタ2に読
出されたとする。これは前述のように命令デコー
ダ4で解読されるが、これがスキツプ命令である
という指定により、スキツプ命令指定ライン7の
論理レベルを“1”にする。さらにこのスキツプ
命令の中のスキツプ条件を指定する部分がスキツ
プ条件選択回路8に供給され、諸種のスキツプ条
件信号9の中からこのスキツプ命令によつて指定
された条件信号が選出される。(この条件信号9
の中には例えば前述のAレジスタの内容が0だつ
たら論理レベルが“1”になり、Aレジスタの内
容が0でなかつたら論理レベルが“0”になるよ
うな信号とか、または、指定されたポートに入力
データがある場合には論理レベルが“1”にな
り、入力データがない場合には論理レベルが
“0”になる信号等の、種々の条件信号が含まれ
ている。)前記スキツプ条件選択回路8で選出さ
れた条件信号はアンド回路10を用いて、前記ス
キツプ命令指定ライン7の信号と合成されて、フ
リツプフロツプ11のセツト端子に加えられる。 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 will be "1", and if the content of the A register is not 0, the logic level will be "0". Various condition signals are included, such as a signal whose logic level is "1" when there is input data in the port that has been input, and whose logic level is "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の1方の入力に加える。こ
の加算器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 satisfied. Now, when the control circuit 5 has finished processing the skip command as described above, it 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 started 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 portion of this signal is used to set the execution control circuit 5 to treat the byte read into the instruction register 2 in the next machine cycle as the first byte of a new instruction. .
勿論、スキツプ命令が解読されても、そのスキ
ツプ命令で指定された条件が成立しない場合には
前記フリツプフロツプ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. It always takes one machine cycle (regardless of how many machine cycles it takes to properly execute this instruction) to disable the 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番目の線図
に示す。もしスキツプ条件が成立している場合に
は、上記スキツプ命令の次の命令(前記コール命
令)が実行されるべきマシンサイクルの期間中本
来のコール命令のかわりに1−オペレーシヨン命
令(NOP)が繰り返され、実効的には何等の処
理をせずに6マシンサイクルを費やした後、次の
次の命令の実行に入る。これを第2図Aのスキツ
プ条件成立時の線図として示す。 The time relationship of the above-mentioned processing is shown in FIG. FIG. 2A shows an example of a conventional device. If the memory address where the skip instruction is stored is n, the contents of the program counter will read out the skip instruction at n first. 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, the following command requires 6
Assume that it is a 3-byte call instruction that requires machine cycles. In this case, the contents of the program counter advance to n+3 in successive machine cycles to read all three bytes of this instruction, and it takes three more 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 satisfied, a 1-operation instruction (NOP) is executed instead of the original call instruction during the machine cycle in which the next instruction (the call instruction) after the skip instruction is to be executed. This is repeated, and after 6 machine cycles are effectively spent without any processing, execution of the next next instruction begins. 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, in one machine cycle following the skip instruction, the program counter is updated by the number of bytes of the instruction following the skip instruction. (In this example, the program counter is advanced by 3 at a time.) In the next machine cycle, the next instruction after the skipped instruction is executed. It shows that you can enter.
なお、上述の実施例においては、プログラムカ
ウンタの内容とスキツプ命令の次の命令のバイト
数とを加算器を用いて加えることによつて、第2
番目の命令のアドレスを直接求め、それによつて
スキツプ処理を最小処理時間で行なつたが、その
かわりに次のように行うこともできる。すなわ
ち、前記フリツプフロツプ11の出力および前記
バイト数出力ライン12の出力を直接前記プログ
ラムカウンタ制御回路6に加え、前記フリツプフ
ロツプ11の出力が論理レベル“1”になつた場
合には、前記バイト数出力ライン12の出力で指
定されるバイト数分だけ正規の命令処理を行う場
合よりも早いサイクルでプログラムカウンタ3の
内容を進めるという構成をとることもできる。 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. 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 a faster cycle than when normal instruction processing is performed by the number of bytes specified by the output of the program counter 3.
以上述べたように、本発明を用いることによつ
て、スキツプ命令で次の命令を無効果にする場合
に、従来の装置よりも短かい処理時間で処理でき
るマイクロプログラム制御装置を提供できるとい
う効果がある。 As described above, by using the present invention, it is possible to provide a microprogram control device that can perform processing in a shorter processing time than conventional devices when a skip instruction makes the next instruction ineffective. There is.
第1図は本発明の一実施例を示すブロツク図お
よび第2図はスキツプ命令の実行経過を説明する
図である。
第1図において、1……マイクロ命令メモリ回
路、2……マイクロ命令レジスタ、3……プログ
ラムカウンタ、4……命令デコーダ、5……実行
制御回路、6……プログラムカウンタ制御回路、
7……スキツプ命令指定ライン、8……スキツプ
条件選択回路、9……スキツプ条件、10……ア
ンド回路、11……フリツプフロツプ、12……
バイト数出力ライン、13……加算器、14……
プログラムカウンタ書き込みパルスライン、15
……第2のアンド回路、16……リセツトパルス
ライン、17……命令実行抑圧信号ライン。
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG. 2 is a diagram illustrating the progress of execution of a skip instruction. In FIG. 1, 1... micro instruction memory circuit, 2... micro instruction register, 3... program counter, 4... instruction decoder, 5... execution control circuit, 6... program counter control circuit,
7... Skip command 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.
Claims (1)
ている複数バイトからなる命令を無効にして他の
命令を実行するように定義されている制御命令を
含むメモリと、前記メモリのアドレスを指定する
アドレス指定回路と、該アドレス指定回路を命令
の実行に従つて歩進するアドレス歩進回路と、前
記制御命令が前記メモリから読み出されたことを
検出する検出回路と、前記所定の条件が成立した
か否かを判定し、成立時に成立信号を発生する条
件判定回路と、加算回路とを有し、前記無効にさ
れるべき命令の第1バイト目に当該無効にされる
べき命令のバイト数を示す数情報を設け、前記条
件判定回路から前記成立信号が発生された時、前
記無効にすべき命令の前記第1バイト目に設けら
れている前記バイト数を示す数情報と前記アドレ
ス指定回路の内容とを前記加算回路で加算し、加
算結果をアドレスとして前記無効にされるべき命
令の次の命令をアクセスすることを特徴とするマ
イクロプログラム制御装置。1. Specify a memory containing a control instruction defined to invalidate a multi-byte instruction scheduled to be executed next when a predetermined condition is met and execute another instruction, and the address of the memory. an addressing circuit; an address incrementing circuit that increments the addressing circuit in accordance with execution of an instruction; a detection circuit that detects that the control instruction is read from the memory; and the predetermined condition is satisfied. the number of bytes of the instruction to be invalidated in the first byte of the instruction to be invalidated; , and when the establishment signal is generated from the condition determination circuit, the number information indicating the number of bytes provided in the first byte of the instruction to be invalidated and the address designation circuit. The microprogram control device is characterized in that the adding circuit adds the contents of the instruction and the content of the instruction to be invalidated using the addition result as an address to access an instruction next to the instruction to be invalidated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5742380A JPS56153448A (en) | 1980-04-30 | 1980-04-30 | Microprogram control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5742380A JPS56153448A (en) | 1980-04-30 | 1980-04-30 | Microprogram control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS56153448A JPS56153448A (en) | 1981-11-27 |
JPS6226486B2 true JPS6226486B2 (en) | 1987-06-09 |
Family
ID=13055236
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP5742380A Granted JPS56153448A (en) | 1980-04-30 | 1980-04-30 | Microprogram control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS56153448A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0412571U (en) * | 1990-05-18 | 1992-01-31 | ||
JPH05263455A (en) * | 1992-03-17 | 1993-10-12 | Inax Corp | Western toilet facility |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59156242A (en) * | 1983-02-28 | 1984-09-05 | Kao Corp | oil composition |
JPS62282331A (en) * | 1986-05-31 | 1987-12-08 | Canon Inc | Arithmetic processing unit |
JP2008158810A (en) * | 2006-12-22 | 2008-07-10 | Digital Electronics Corp | Instruction execution processor |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5455337A (en) * | 1977-10-12 | 1979-05-02 | Nec Corp | Logical operation processing circuit |
JPS5541558A (en) * | 1978-09-19 | 1980-03-24 | Toshiba Corp | Micro program control system |
-
1980
- 1980-04-30 JP JP5742380A patent/JPS56153448A/en active Granted
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0412571U (en) * | 1990-05-18 | 1992-01-31 | ||
JPH05263455A (en) * | 1992-03-17 | 1993-10-12 | Inax Corp | Western toilet facility |
Also Published As
Publication number | Publication date |
---|---|
JPS56153448A (en) | 1981-11-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4514804A (en) | Information handling apparatus having a high speed instruction-executing function | |
US4550369A (en) | Apparatus and method for processing macroinstructions and microinstructions | |
JPS6226486B2 (en) | ||
JPS6212529B2 (en) | ||
JPS6156822B2 (en) | ||
JPS6161411B2 (en) | ||
JP2694948B2 (en) | Micro program processor | |
JP2637070B2 (en) | Micro instruction start address generation method | |
JP2541940B2 (en) | Micro program controller | |
JP2758624B2 (en) | Speed control method of micro program | |
JPS6339928B2 (en) | ||
EP0079995B1 (en) | Information handling apparatus having an instruction-executing function at a high speed | |
JP2583506B2 (en) | Data processing device | |
JPS63200234A (en) | Data processor | |
JPS58200349A (en) | Microprogram controller | |
JPH05298088A (en) | Microcomputer | |
JPS6242301B2 (en) | ||
JP2506874B2 (en) | Micro program controller | |
JP3057732B2 (en) | Information processing device | |
CA1270572A (en) | Microprogram control device | |
JPS6341092B2 (en) | ||
JPS6236581B2 (en) | ||
JPS6232500B2 (en) | ||
JPS63163533A (en) | Microcomputer | |
JPH05181671A (en) | Emulation system for software instruction |