JPS6339929B2 - - Google Patents

Info

Publication number
JPS6339929B2
JPS6339929B2 JP50368783A JP50368783A JPS6339929B2 JP S6339929 B2 JPS6339929 B2 JP S6339929B2 JP 50368783 A JP50368783 A JP 50368783A JP 50368783 A JP50368783 A JP 50368783A JP S6339929 B2 JPS6339929 B2 JP S6339929B2
Authority
JP
Japan
Prior art keywords
register
instruction
address
jump
control
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
JP50368783A
Other languages
Japanese (ja)
Other versions
JPS59502040A (en
Inventor
Karurosu Furanshisuko Hoobaato
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.)
YUNISHISU CORP
Original Assignee
YUNISHISU CORP
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 YUNISHISU CORP filed Critical YUNISHISU CORP
Priority claimed from PCT/US1983/001707 external-priority patent/WO1984001843A1/en
Publication of JPS59502040A publication Critical patent/JPS59502040A/en
Publication of JPS6339929B2 publication Critical patent/JPS6339929B2/ja
Granted legal-status Critical Current

Links

Description

請求の範囲 1 デジタルデバイスを制御するためのコントロ
ーラであつて、 マイクロ命令の同じ組をそれぞれ含む3個の制
御メモリを備え、前記マイクロ命令のそれぞれ
は、前記デジタルデバイスを制御するための制御
フイールドと、前記それぞれのマイクロ命令がサ
ブルーチンへとジヤンプすべきであるとき、また
はサブルーチン命令からリターンすべきであると
きに次のマイクロ命令のロケーシヨンを特定する
ジヤンプアドレスフイールドと、特定のマイクロ
命令がジヤンプ命令もしくはリターン命令である
かどうか、またはいずれのアクシヨンをも要求し
ていないかどうかを特定する命令フイールドとか
ら形成されており、 前記コントローラはさらに、それぞれの前記制
御メモリに関して設けられて取出すべき次のマイ
クロ命令のアドレスを含む3個のアドレスレジス
タと、 前記メモリのそれぞれと、前記デジタルデバイ
スとに結合されて、前記制御メモリのうちの1つ
から取出されたマイクロ命令の制御フイールドお
よび命令フイールドを受取る命令レジスタと、 前記制御メモリのそれぞれと、他の制御メモリ
のアドレスレジスタとの間に結合されて、ジヤン
プアドレスを前記他の制御メモリのアドレスレジ
スタへと与える相互接続手段と、 前記命令レジスタの前記命令フイールド部分と
前記アドレスレジスタとに結合されて、前記レジ
スタのうちの1つのプログラムカウンタとして特
定し、前記レジスタのうちの1つをジヤンプアド
レスレジスタとして特定し、そして前記レジスタ
のうちの1つをサブルーチンからのリターンにつ
いてのレジスタとして特定する論理手段とを備え
る、マイクロコントローラ。 2 前記論理手段は、その時点で実行されている
マイクロ命令がサブルーチン命令へのジヤンプで
あるのかそれともサブルーチン命令からのリター
ンであるかに従つて、異なるアドレスレジスタを
プログラムカウンタとして特定するように構成さ
れている、請求の範囲第1項記載のマイクロコン
トローラ。 3 前記マイクロコントローラはさらに、 前記それぞれの制御メモリと前記命令レジスタ
との間に結合されて、前記それぞれの制御メモリ
から取出されたマイクロ命令のうちの1つの命令
フイールドと制御フイールドとを選択するマルチ
プレクサを備える、請求の範囲第1項記載のマイ
クロコントローラ。 4 前記マイクロコントローラは複数個のマルチ
プレクサをさらに備え、前記マルチプレクサのそ
れぞれは前記アドレスレジスタのそれぞれと他の
制御メモリのジヤンプアドレス出力との間に接続
され、前記マルチプレクサはさらにマイクロ命令
のアドレスの外部ソースへと結合された、請求の
範囲第1項記載のマイクロコントローラ。 5 前記アドレスレジスタのそれぞれは、インク
リメントされて、それに対応する制御メモリから
のマイクロ命令のシーケンスを順番に取出すレジ
スタカウンタである、請求の範囲第1項記載のマ
イクロコントローラ。 6 前記マイクロコントローラはさらに、前記そ
れぞれのレジスタとメモリとの間に結合されて、
それぞれのクロツク時間でマイクロ命令制御フイ
ールドを前記命令レジスタへと与えるタイミング
手段を備える、請求の範囲第1項記載のマイクロ
コントローラ。 7 デジタルデバイスを制御するためのマイクロ
コントローラであつて、 マイクロ命令の同じ組をそれぞれ含む3個の制
御メモリをさらに備え、前記マイクロ命令のそれ
ぞれは、前記デジタルデバイスを制御するための
制御フイールドと、前記それぞれのマイクロ命令
がサブルーチンへとジヤンプすべきであるとき、
またはサブルーチン命令からリターンすべきであ
るときに次のマイクロ命令のロケーシヨンを特定
するジヤンプアドレスフイールドと、特定のマイ
クロ命令がジヤンプ命令もしくはリターン命令で
あるかどうか、またはいずれのアクシヨンをも要
求していないかどうかを特定する命令フイールド
から形成されており、 前記コントローラはさらに、それぞれの前記制
御メモリに関して設けられて取出すべき次のマイ
クロ命令のアドレスを含む3個のアドレスレジス
タと、 前記メモリのそれぞれと前記デジタルデバイス
とに結合されて、前記制御メモリのうちの1つか
ら取出されたマイクロ命令の制御フイールドおよ
び命令フイールドを受取る命令レジスタと、 前記制御メモリのそれぞれと、他の制御メモリ
のアドレスレジスタとの間に結合されて、ジヤン
プアドレスを前記他の制御メモリのアドレスレジ
スタへと与える相互接続手段と、 前記命令レジスタの前記命令フイールド部分と
前記アドレスレジスタとに結合されて、前記レジ
スタのうちの1つをプログラムカウンタとして特
定し、前記レジスタのうちの1つをジヤンプアド
レスレジスタとして特定し、そして前記レジスタ
のうちの1つをサブルーチンからのリターンにつ
いてのレジスタとして特定する論理手段と、 前記デジタルデバイスからの条件信号を受取つ
て、前記マイクロ命令のシーケンスの実行におい
て条件付分岐が要求されているということを特定
する条件選択手段とを備え、 前記論理手段は、前記条件選択手段と前記3個
のアドレスレジスタとの間に結合され、前記デジ
タルデバイスからの条件信号を受取つたときに次
のマイクロ命令を前記制御メモリのうちのいずれ
によつて与えるかを選択する、マイクロコントロ
ーラ。 8 前記マイクロコントローラはさらに、 前記それぞれの制御メモリと前記命令レジスタ
との間に結合されて、前記それぞれの制御メモリ
から取出されたマイクロ命令のうちの1つの命令
フイールドと制御フイールドとを選択するマルチ
プレクサを備える、請求の範囲第7項記載のマイ
クロコントローラ。 9 前記マイクロコントローラは複数個のマルチ
プレクサをさらに備え、前記マルチプレクサのそ
れぞれは前記アドレスレジスタのそれぞれと他の
制御メモリのジヤンプアドレス出力との間に接続
され、前記マルチプレクサはさらにマイクロ命令
のアドレスの外部ソースへと結合された、請求の
範囲第7項記載のマイクロコントローラ。 11 前記アドレスレジスタのそれぞれは、イン
クリメントされて、それに対応する制御メモリか
らのマイクロ命令のシーケンスを順番に取出すレ
ジスタカウンタである、請求の範囲第7項記載の
マイクロコントローラ。 関連出願 1982年11月3日にCarlos F・Horvathによつ
て出願された“パイプラインがなされたマイクロ
コントローラのための多重制御記憶装置”という
名称のアメリカ合衆国特許出願連続番号第438702
号(特表昭59―502080号) 1982年11月3日にCarlos F・Horvathによつ
て出願された“ネストされたサブルーチンを取扱
うためのパイプラインがなされたマイクロコント
ローラ中の多重制御記憶装置”という名称のアメ
リカ合衆国特許出願連続番号第438703号(特表昭
59―501998号)。 発明の分野 この発明は、パイプラインがなされたマイクロ
コントローラに関するもので、特に、多重制御記
憶装置を用いて並行動作を行なわせることによつ
て、サイクルタイムのロスを減少させるようなコ
ントローラに関する。 従来技術の説明 マイクロプログラミングは、プロセツサ中のマ
クロ命令デコード論理回路をメモリで置換える技
術であつて、このメモリには、異なつたマクロ命
令を実行することができるように、プロセツサ中
のそれぞれのゲートを能動化するための種々の制
御信号がストアされている。これらの制御信号
は、対応するマイクロ命令の所望のワード長に依
存して、全体としてエンコードされてもよく、ま
た、部分的にエンコードされもしくはエンコード
されないものであつてもよい。そして、マクロ命
令オペレータは、制御記憶装置すなわちマイクロ
命令メモリに対するアドレスとしてサービスを行
なう。このようなマイクロプログラミング技術を
用いるとアーキテクチヤにおける設計の柔軟性が
極めて大きくなる。それは、発生可能な制御信号
のタイプが、どのような特定のプロセツサに対し
ても固定されたものとなつておらず、異なつた高
位のレベルのプログラム言語が特別に製造された
メインフレームのコンピユータのために設計され
ている場合においても、その言語のホストとのエ
ミユレーシヨンやインタプリタを行なうために選
択することができるからである。設計に関してこ
のような柔軟性が存在するため、ほとんどすべて
の中小プログラミングシステムや特定のマイクロ
プロセツサが、この技術を用いて構成されてい
る。 しかしながら、制御記憶装置からのマクロ命令
のアクセスやレセプシヨンでは、同じマクロ命令
オペレータがデコーダ論理回路によつてデコード
される場合に比べて、必要とされる時間が長くな
つている。このため、大型で高速のプロセツサを
設計するにあたつては、ハードワイヤの論理回路
が好んで用いられている。 速度の面での改良を図り、マイクロ命令を実行
するために必要とされるクロツク時間を短くする
ための技術としては、マクロ命令オペレータ(マ
イクロ命令アドレス)の取出しを前のマイクロ命
令の実行とパイプラインないしはオーバラツプさ
せるという技術が存在している。このような技術
は、Ferguson等に対して与えられたアメリカ合
衆国特許第3886523号に記載されている。 しかしながら、このようなオーバラツプ技術を
用いたとしても、実行中のルーチンの中の変化に
よつてマイクロコントローラが用いられていない
ようなクロツクタイムのシーケンスがなお存在す
る。すなわち、データプロセツサはマクロ命令レ
ベルまたはマイクロ命令レベルのいずれに対して
も、命令の単一のシーケンスを実行することはな
い。周期的に、内部条件または外部条件が発生し
て、他のルーチンへの分岐を行ない、その条件に
対する適当な応答を与えるような命令シーケンス
が必要となる。さらに、多くのルーチンがネスト
されたサブルーチンのシリーズとして形成され、
これはプロセツサに対してサブルーチンへのジヤ
ンプと、このサブルーチンから、実行されていた
親ルーチンとは異なつたいくつかの他のロケーシ
ヨンへのリターンを要求する。上述したような、
パイプラインがなされたマイクロコントローラに
おいては、これは、新たなサブルーチンを取出
し、実行されているその時点でのシーケンスを再
び廃棄することを要求することになり、これによ
つてサイクルタイムが失われる。 このため、この発明の主たる目的は、クロツク
サイクルのロスを最小化するようなデータプロセ
ツサのための改良されたマイクロコントローラを
提供することである。 この発明の他の目的は、命令の取出しと条件付
分岐命令の取出しとのオーバラツプを生じさせる
ようなデータプロセツサのための改良されたマイ
クロコントローラを提供することである。 この発明のなおも他の目的は、サブルーチン命
令へのジヤンプとサブルーチン命令からのリター
ンとを、その時点での取出し命令取出しにオーバ
ラツプさせるデータプロセツサのための改良され
たマイクロコントローラを提供することである。 発明の概要 上述した目的を達成するため、この発明は、複
数の制御記憶装置から形成されたデジタルデバイ
スを制御するためのマイクロコントローラを対象
としており、前記制御記憶装置のそれぞれは、対
応する制御記憶装置の中の異なつたロケーシヨン
をアドレスするレジスタカウンタを有している。
それぞれの制御記憶装置はそれぞれのクロツクサ
イクルでアクセスされるもので、選択された制御
記憶装置から取出されたマイクロ命令のうちの1
つを受取るための命令レジスタを持つている。こ
のような方法で、前のマイクロ命令が条件付分岐
である場合、サブルーチンへのジヤンプである場
合、またはサブルーチン命令へのリターンである
場合においても、マイクロ命令がそれぞれのクロ
ツクサイクルで命令レジスタに与えられる。 サブルーチンへのジヤンプと、サブルーチン命
令からの対応するリターンとを調和させるため、
このリターンサブルーチンの対応するアドレスは
プツシユダウンスタツクの中にストアされてお
り、これらのアドレスがスタツクの先頭に置かれ
ていたオーダの反対のオーダで、上述したレジス
タカウンタのうちの選択された1つへと与えられ
るようになつている。 このため、この発明の性質は、それぞれのクロ
ツクサイクルで複数のマイクロ命令を命令レジス
タへと与え、それによつて命令レジスタがそれぞ
れのクロツクサイクルで適切なマイクロ命令を受
取ることができるような、複数のメモリを有する
マイクロコントローラに存在している。
Claim 1: A controller for controlling a digital device, comprising three control memories each containing the same set of microinstructions, each of the microinstructions having a control field for controlling the digital device. , a jump address field that specifies the location of the next microinstruction when each microinstruction is to jump to a subroutine or return from a subroutine instruction; an instruction field identifying whether the instruction is a return instruction or whether no action is requested; three address registers containing addresses of instructions; an instruction coupled to each of said memories and said digital device to receive control and instruction fields of a microinstruction retrieved from one of said control memories; registers; interconnect means coupled between each of said control memories and address registers of other control memories for providing jump addresses to address registers of said other control memories; and said instructions of said instruction registers. field portion and said address register to identify one of said registers as a program counter, to identify one of said registers as a jump address register, and to identify one of said registers as a subroutine. and logic means for specifying as a register for a return from the microcontroller. 2. The logic means is configured to identify different address registers as program counters depending on whether the microinstruction currently being executed is a jump to a subroutine instruction or a return from a subroutine instruction. 2. A microcontroller according to claim 1, wherein the microcontroller comprises: 3. The microcontroller further comprises a multiplexer coupled between the respective control memory and the instruction register to select an instruction field and a control field of one of the microinstructions retrieved from the respective control memory. A microcontroller according to claim 1, comprising: 4. The microcontroller further comprises a plurality of multiplexers, each of the multiplexers connected between each of the address registers and a jump address output of another control memory, the multiplexer further comprising an external source of the address of the microinstruction. A microcontroller according to claim 1, coupled to a microcontroller according to claim 1. 5. The microcontroller of claim 1, wherein each of said address registers is a register counter that is incremented to sequentially retrieve a sequence of microinstructions from its corresponding control memory. 6. The microcontroller is further coupled between the respective registers and memory;
2. The microcontroller of claim 1, further comprising timing means for applying a microinstruction control field to said instruction register at respective clock times. 7. A microcontroller for controlling a digital device, further comprising three control memories each containing the same set of microinstructions, each of the microinstructions having a control field for controlling the digital device; When said respective microinstruction should jump to a subroutine,
or a jump address field that identifies the location of the next microinstruction when a subroutine instruction should return, and whether a particular microinstruction is a jump or return instruction, or does not request any action. said controller further comprises: three address registers provided for each said control memory containing the address of the next microinstruction to be fetched; an instruction register coupled to a digital device to receive control and instruction fields of microinstructions retrieved from one of said control memories; and an address register of each of said control memories and the other control memory. interconnection means coupled between said instruction field portion of said instruction register and said address register for providing a jump address to said other control memory address register; a program counter, one of said registers as a jump address register, and one of said registers as a register for a return from a subroutine; condition selection means for receiving a condition signal to specify that a conditional branch is required in the execution of said sequence of microinstructions, said logic means comprising said condition selection means and said three address registers; a microcontroller coupled between said digital device for selecting which of said control memories to provide a next microinstruction upon receiving a condition signal from said digital device. 8. The microcontroller further comprises a multiplexer coupled between the respective control memories and the instruction registers for selecting an instruction field and a control field of one of the microinstructions retrieved from the respective control memories. 8. The microcontroller according to claim 7, comprising: 9. The microcontroller further comprises a plurality of multiplexers, each of the multiplexers connected between each of the address registers and a jump address output of another control memory, the multiplexer further comprising an external source of the address of the microinstruction. 8. A microcontroller as claimed in claim 7, coupled to. 11. The microcontroller of claim 7, wherein each of said address registers is a register counter that is incremented to sequentially retrieve a sequence of microinstructions from its corresponding control memory. RELATED APPLICATIONS United States Patent Application Serial No. 438702 entitled "Multiple Control Storage System for a Pipelined Microcontroller" filed by Carlos F. Horvath on November 3, 1982.
No. (Special Publication No. 59-502080) “Multiple control storage in a pipelined microcontroller for handling nested subroutines” filed by Carlos F. Horvath on November 3, 1982 United States Patent Application Serial No. 438703 entitled
59-501998). FIELD OF THE INVENTION This invention relates to pipelined microcontrollers, and more particularly to such controllers that utilize multiple control memories to perform parallel operations, thereby reducing cycle time losses. Description of the Prior Art Microprogramming is a technology that replaces the macroinstruction decoding logic circuit in a processor with memory, which includes memory for each gate in the processor so that different macroinstructions can be executed. Various control signals are stored for activating the . These control signals may be entirely encoded, partially encoded, or unencoded, depending on the desired word length of the corresponding microinstruction. The macroinstruction operator then serves as an address to control storage or microinstruction memory. The use of such microprogramming techniques provides a great deal of design flexibility in the architecture. It is important to note that the types of control signals that can be generated are not fixed for any particular processor, and that different high-level programming languages are used for specially manufactured mainframe computers. This is because even if a language is designed for a specific language, it can be selected for emulation or interpretation with a host of that language. Because of this flexibility in design, almost all small and medium-sized programming systems and certain microprocessors are constructed using this technology. However, accessing or receiving a macroinstruction from control storage requires more time than if the same macroinstruction operator were to be decoded by the decoder logic. For this reason, hardwired logic circuits are preferred when designing large, high-speed processors. A technique to improve speed and reduce the clock time required to execute a microinstruction is to pipe the fetch of a macroinstruction operator (microinstruction address) with the execution of a previous microinstruction. Techniques exist to create lines or overlaps. Such techniques are described in US Pat. No. 3,886,523 to Ferguson et al. However, even with such overlap techniques, there are still sequences of clock times in which the microcontroller is not being used due to changes in the routine being executed. That is, the data processor does not execute a single sequence of instructions at either the macro-instruction level or the micro-instruction level. Periodically, internal or external conditions occur that require a sequence of instructions to branch to other routines and provide an appropriate response to the condition. Additionally, many routines are formed as a series of nested subroutines,
This requires the processor to jump to a subroutine and return from this subroutine to some other location different from the parent routine that was being executed. As mentioned above,
In a pipelined microcontroller, this would require fetching a new subroutine and discarding the current sequence being executed again, thereby losing cycle time. Therefore, a primary object of the present invention is to provide an improved microcontroller for a data processor that minimizes clock cycle loss. Another object of the invention is to provide an improved microcontroller for a data processor that allows for overlap between instruction fetching and conditional branch instruction fetching. Yet another object of the invention is to provide an improved microcontroller for a data processor that allows jumps to and returns from subroutine instructions to overlap with current fetch instruction fetches. be. SUMMARY OF THE INVENTION To achieve the above objects, the present invention is directed to a microcontroller for controlling a digital device formed from a plurality of control stores, each of which has a corresponding control store. It has register counters that address different locations within the device.
Each control store is accessed on each clock cycle so that one of the microinstructions retrieved from the selected control store
It has an instruction register for receiving one. In this way, a microinstruction is placed in the instruction register on each clock cycle, even if the previous microinstruction was a conditional branch, a jump to a subroutine, or a return to a subroutine instruction. Given. To reconcile jumps to subroutines and corresponding returns from subroutine instructions,
The corresponding addresses of this return subroutine are stored in the pushdown stack, in the opposite order of the one in which they were placed at the top of the stack, and in the selected register counters mentioned above. It is beginning to be given to one. Therefore, the nature of the invention is such that multiple microinstructions can be provided to the instruction register on each clock cycle, so that the instruction register can receive the appropriate microinstruction on each clock cycle. Present in a microcontroller with multiple memories.

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

この発明の、上に述べた目的および他の目的と
利点や特徴は、図面を参照して行なう以下の説明
からより一層明らかとなろう。これらの図におい
て、 第1図は従来のマイクロコントローラの概念図
である。 第2図はこの発明のマイクロコントローラの概
念図である。 第3図はこの発明によつて実行されるものとし
てのプログラムセグメントを表現する命令のシー
ケンス図である。 第4図はこの発明で用いられるものとしてのア
ービトレーシヨン論理回路の概念図である。 第5図はこの発明の動作を示す真理値表が描か
れた図である。 発明の全般的な説明 この発明は、動作のクロツクサイクルのそれぞ
れの間にマイクロプログラムデータプロセツサの
中の種々のゲートやレジスタを活性化する制御信
号を与えるように構成されている。この制御信号
はコード化されていてもよく、またコード化され
ていなくてもよい。上に述べたように、従来のマ
イクロプログラムデバイスにおいては、条件付分
岐命令に出会つたとき、またはサブルーチンへの
ジヤンプ命令やサブルーチンからのリターン命令
に出会つたときには、常にクロツクタイムのロス
を生じていた。 このような従来のマイクロプログラムコントロ
ーラを第1図に示す。第1図に示すように、対応
するマイクロ命令は制御記憶装置10の中にスト
アされており、この制御記憶装置10はたとえば
リードオンリメモリ(ROM)である。以下に詳
しく説明するように、それぞれのマイクロ命令は
制御信号のフイールドを含んでおり、この制御信
号はそのすべてがコード化されていたものであつ
てもよく、また、部分的にコード化されているも
のや部分的にコード化されていないものであつて
もよい。これに加えて、それぞれのマイクロ命令
は、その時点でのマイクロ命令の次にシーケンス
の次のマイクロ命令が続くのか、それとも、サブ
ルーチン命令へのジヤンプもしくはサブルーチン
命令からのリターンのいずれかの条件付分岐命令
であるのかを特定するシーケンスフイールドを含
んでいる。このフイールドはまた、ジヤンプアド
レスまたはリターンアドレスを交互に含んでい
る。 アドレスレジスタ11によつてこの制御記憶装
置がアドレスされたときには、対応するマイクロ
命令が並列に読出されて命令レジスタ12へと与
えられ、そこからこのフイールドが取出されて、
算術論理ユニツトなどの制御の対象となるデジタ
ルデバイスを活性化ないしは能動化する。条件付
分岐やサブルーチンへのジヤンプ命令を実行して
いるときには、シーケンスフイールドが同じクロ
ツクサイクルの間にマルチプレクサ13に対して
代わりのアドレスを与える。条件付分岐命令を実
行している場合には、条件付ジヤンプ制御回路
が、付随命令の真偽を判定し、もし真であるなら
ば、マルチプレクサ13に対して信号を与え、そ
れに与えられた代わりのアドレスをアドレスレジ
スタ11へと転送させる。 マクロ命令レベルおよびマイクロ命令レベルの
いずれにおいても、データプロセツサを多く用い
るということは、プツシユダウンスタツクすなわ
ちフアーストインーラストアウト・レジスタの組
を用いるという特別の性質をもつている。このよ
うなスタツクは、サブルーチンへジヤンプしたと
きにリターンアドレスをストアしておかねばなら
ないということもあり、また他方、このサブルー
チンが他のサブルーチンへとジヤンプするときに
はリターンアドレスを必要とするということなど
の理由によつて、特に有用なものとなつている。
このようにしてネストされたサブルーチンを用い
ると、サブルーチンへのジヤンプが発生するごと
に、リターンアドレスがスタツクの先頭に置か
れ、それに続いて追加のリターンアドレスがこの
スタツクの先頭に入れられるときに、“ブツシユ”
ダウンされる。種々のサブルーチンが出ていく
と、それらが入れられた順序と逆の順序で、必要
なリターンアドレスがスタツクの先頭から与えら
れる。マイクロコントローラのためのこのような
スタツクは、第1図においては制御スタツク16
として示している。命令レジスタ12から出てそ
の時点で実行されているマイクロ命令がサブルー
チン命令からのリターンであるときには、制御ス
タツク16からマルチプレクサ13を介してアド
レスレジスタ11へと適当なアドレスが与えられ
る。 第1図に示したマイクロプロセツサは、前に取
出されたマイクロ命令の実行とオーバラツプして
制御ストアアドレスが取出されるようなタイプの
ものであり、これは、命令の通常のシーケンスの
間にそれが制御記憶装置10に対して与えられる
ごとに、アドレスレジスタ11の内容をインクリ
メントすることによつて、第1図のコントローラ
において達成される。このような動作によつて、
新たなマイクロ命令がそれぞれのクロツクタイム
において命令レジスタ12へと与えられる。しか
しながら、条件付分岐やサブルーチンへのジヤン
プ、それにサブルーチン命令からのリターンに出
会つたときには、適切なアクシヨンを実行できる
ようになるまでにアドレスレジスタ11の内容を
置換えなければならず、これによつてクロツクサ
イクルのロスが生じていた。 このクロツクサイクルのロスを減少させるた
め、この発明は、第2図に示すような方法によつ
て、それぞれのクロツクサイクルにおいて、制御
記憶装置の出力を命令レジスタに与えるように構
成されている。第2図において、3つの異なつた
記憶制御装置20a,20b,20cが存在して
おり、これらは、シーケンス情報とともに制御信
号のフイールドをマルチプレクサ22aによつて
命令レジスタ22へと与えるように構成されてい
る。しかしながら、条件付分岐やサブルーチン命
令からのリターンのためにも用いることのできる
ジヤンプアドレスJAを、それぞれの制御記憶装
置20a,20bおよび20cに対応するレジス
タカウンタ以外のレジスタカウンタ21a,21
bおよび21cのそれぞれに与えることができ
る。このために、レジスタカウンタ21a,21
b,21cにはそれぞれマルチプレクサ23a,
23b,23cが設けられており、これによつて
他の制御記憶装置からのジヤンプアドレスのうち
のいずれを受取るべきかということや、サブルー
チン命令からのリターンの場合に、メインスタツ
ク26からスタツクアドレスの先頭のものを受取
るべきか否かの選択を行なう。第2図に示したよ
うに、レジスタカウンタのそれぞれはまた、第1
図の従来のコントローラにおいて行なわれていた
と同様に、外部ソースからの次のアドレスを受取
ることもできる。 マルチプレクサ23a,23bおよび23cの
それぞれによつていずれの入力を選択したかとい
うことは、その時点で選択されている制御記憶装
置から命令レジスタ22へと与えられたシーケン
ス情報に対応する。算術論理回路27からの出力
によつて知ることができる。 制御記憶装置20a,20b,20cには、マ
イクロ命令の同じ組が与えられる。しかしなが
ら、任意の時刻を取つ見たときには、それぞれの
個々の制御記憶装置は、算術論理回路27から対
応するレジスタカウンタ21a,21b,21c
へと与えられたカウントロード情報に依存して、
3つのモードのうちの異なつた1つのモードで用
いられていることになる。これらの3つのモード
は、“プログラムカウンタレジスタ”、“ジヤンプ
アドレスレジスタ”、および“スタツクレジスタ
の先頭”である。3つのレジスタのそれぞれは、
タグレジスタとして機能する2ビツトレジスタを
伴つており、対応するこのタグレジスタの中にロ
ードされている値によつて、対応するレジスタカ
ウンタの状態や指名先を知ることができる。ここ
では第1図のアドレスレジスタ11の代わりにレ
ジスタカウンタを用いているため、第1図のイン
クリメンタ15は必要ではない。 以下に詳しく説明する動作によつて、この3つ
の制御記憶装置20a,20b,および20c
は、その時点で実行しているマイクロ命令が条件
付分岐命令、サブルーチン命令へのジヤンプまた
はサブルーチン命令からのリターンである場合に
おいては、制御情報のフイールドをそれぞれのク
ロツクサイクルにおいて命令レジスタ22へと与
え続けることができる。すなわち、レジスタカウ
ンタ21aがプログラムカウンタレジスタとして
指名されていた場合には、制御記憶装置21aへ
とアドレスを与え続けるとともに、分岐、ジヤン
プまたはリターン命令が命令レジスタ22におい
て指示されるまで、それ自身の内容のインクリメ
ントを行ない続ける。この期間においては、レジ
スタ21bおよび21cのうちの1つがジヤンプ
アドレスレジスタとして指名され、また、これら
のうちの他のレジスタはスタツクレジスタの先頭
のものとして指名されて、3つの制御記憶装置2
0a,20b,20cのすべてがマイクロ命令を
マルチプレクサ22aへと与える。取出された3
つのマイクロ命令はその時点におけるプログラム
カウントアドレス、ジヤンプアドレスおよびスタ
ツクの先頭のものすなわちサブルーチンからのリ
ターンアドレスに関するものであり、これらマイ
クロ命令のうちの1つは、アービトレーシヨン論
理回路27によつて選択されて、それぞれのクロ
ツクサイクルにおいて命令レジスタ22へと与え
られる。
The above-mentioned objects and other objects, advantages and features of the present invention will become more apparent from the following description with reference to the drawings. In these figures, FIG. 1 is a conceptual diagram of a conventional microcontroller. FIG. 2 is a conceptual diagram of the microcontroller of the present invention. FIG. 3 is a sequence diagram of instructions representing a program segment as executed by the present invention. FIG. 4 is a conceptual diagram of an arbitration logic circuit used in the present invention. FIG. 5 is a diagram depicting a truth table showing the operation of the present invention. General Description of the Invention The present invention is configured to provide control signals that activate various gates and registers within a microprogram data processor during each clock cycle of operation. This control signal may be coded or uncoded. As mentioned above, in conventional microprogram devices, whenever a conditional branch instruction is encountered, or a jump instruction to a subroutine or a return instruction from a subroutine is encountered, clock time is lost. Ta. Such a conventional microprogram controller is shown in FIG. As shown in FIG. 1, the corresponding microinstructions are stored in a control memory 10, which may be, for example, a read only memory (ROM). As explained in more detail below, each microinstruction includes a field of control signals that may be fully coded or partially coded. It may be present or partially unencoded. In addition, each microinstruction is subject to a conditional branch, whether the current microinstruction is followed by the next microinstruction in the sequence, or by a jump to or return from a subroutine instruction. Contains a sequence field that specifies whether it is an instruction. This field also alternately contains a jump address or a return address. When this control store is addressed by the address register 11, the corresponding microinstruction is read in parallel and applied to the instruction register 12, from where this field is retrieved.
Activates or activates a digital device to be controlled, such as an arithmetic logic unit. When executing a conditional branch or jump to subroutine instruction, the sequence field provides an alternate address to multiplexer 13 during the same clock cycle. When a conditional branch instruction is being executed, the conditional jump control circuit determines whether the accompanying instruction is true or false, and if true, gives a signal to the multiplexer 13 and sends a signal to the multiplexer 13, The address is transferred to the address register 11. At both the macro-instruction level and the micro-instruction level, extensive use of data processors has the special property of using a push-down stack or set of first-in-last-out registers. Such a stack may require a return address to be stored when jumping to a subroutine, and on the other hand, the subroutine may need a return address when jumping to another subroutine. It is particularly useful for a number of reasons.
With nested subroutines in this way, each time a jump into a subroutine occurs, the return address is placed at the top of the stack, and when additional return addresses are subsequently placed at the top of this stack, “Butsuyu”
Will be taken down. As the various subroutines exit, they are given the necessary return addresses starting at the top of the stack in the reverse order in which they were entered. Such a stack for a microcontroller is shown in FIG.
It is shown as When the microinstruction currently being executed from instruction register 12 is a return from a subroutine instruction, the appropriate address is provided from control stack 16 via multiplexer 13 to address register 11. The microprocessor shown in FIG. This is accomplished in the controller of FIG. 1 by incrementing the contents of address register 11 each time it is presented to control store 10. With this kind of action,
A new microinstruction is applied to the instruction register 12 at each clock time. However, when a conditional branch, jump to a subroutine, and return from a subroutine instruction is encountered, the contents of address register 11 must be replaced before the appropriate action can be taken, thereby There was a loss of clock cycles. To reduce this loss of clock cycles, the present invention is arranged to provide the output of the control store to the instruction register on each clock cycle in the manner shown in FIG. . In FIG. 2, there are three different storage controllers 20a, 20b, 20c, which are configured to provide a field of control signals along with sequence information to the instruction register 22 by a multiplexer 22a. There is. However, the jump address JA, which can also be used for conditional branches and returns from subroutine instructions, is stored in register counters 21a, 21 other than the register counters corresponding to the respective control stores 20a, 20b, and 20c.
b and 21c, respectively. For this purpose, register counters 21a, 21
b, 21c have multiplexers 23a, 21c, respectively.
23b and 23c are provided to determine which of the jump addresses from other control stores is to be received or to determine which of the jump addresses from the main stack 26 is to be received in the event of a return from a subroutine instruction. Select whether or not to receive the first one. As shown in FIG. 2, each of the register counters also has a first
It is also possible to receive the next address from an external source, as was done in the conventional controller of the figure. Which input is selected by each of multiplexers 23a, 23b and 23c corresponds to sequence information given to instruction register 22 from the control storage device selected at that time. This can be known from the output from the arithmetic logic circuit 27. Control stores 20a, 20b, 20c are provided with the same set of microinstructions. However, when looking at any given time, each individual control memory is transferred from the arithmetic logic circuit 27 to the corresponding register counter 21a, 21b, 21c.
Depending on the count load information given to
It is used in one different mode out of the three modes. These three modes are "Program Counter Register,""Jump Address Register," and "Start of Stack Register." Each of the three registers is
It has a 2-bit register that functions as a tag register, and the state of the corresponding register counter and the designated destination can be known by the value loaded into the corresponding tag register. Here, a register counter is used in place of the address register 11 in FIG. 1, so the incrementer 15 in FIG. 1 is not necessary. The operations described in detail below control the three control stores 20a, 20b, and 20c.
transfers a field of control information to the instruction register 22 on each clock cycle if the microinstruction currently being executed is a conditional branch instruction, a jump to a subroutine instruction, or a return from a subroutine instruction. You can keep giving. That is, if register counter 21a has been designated as the program counter register, it will continue to provide addresses to control storage 21a and its own contents until a branch, jump or return instruction is indicated in instruction register 22. continues to increment. During this period, one of the registers 21b and 21c is designated as the jump address register, and the other of these is designated as the first of the stack registers, so that the three control stores 2
0a, 20b, 20c all provide microinstructions to multiplexer 22a. 3 taken out
The two microinstructions concern the current program count address, jump address and the top of the stack, i.e. the return address from the subroutine; one of these microinstructions is selected by the arbitration logic 27. and provided to instruction register 22 on each clock cycle.

【発明の詳細な説明】[Detailed description of the invention]

第3図は、この発明で用いられているそれぞれ
の制御記憶装置すなわちROMの中に存在するこ
とができるような、マイクロ命令のシーケンスを
示している。ここに示したように、第1のフイー
ルドはジヤンプアドレスJAを表現しており、こ
のジヤンプアドレスJAはその時点におけるマイ
クロ命令が条件付分岐、サブルーチンへのジヤン
プまたはサブルーチンからのリターンを要求して
いる場合に、実行されるべき次のマイクロ命令の
アドレスを特定するという性質をもつている。ア
ステリスクで示した第2のフイールドは命令フイ
ールドであつて、この命令フイールドは、分岐、
ジヤンプもしくはリターンを特定し、またはこれ
らのいずれも存在しないときには、プログラムカ
ウンタレジスタとして機能するレジスタカウンタ
のシーケンスを特定するために必要な数だけのビ
ツトを含んでいる。 典型的なマイクロ命令の例を命令レジスタ22
を形成するそれぞれのフイールドによつて第2図
の中により詳しく示してある。それぞれのROM
の中にマイクロ命令の一部分としてストアされて
いるジヤンプアドレスは、命令レジスタへは与え
られないことに注意されたい。ここに示した命令
フイールドは、サブルーチンフイールドへの1ビ
ツトのジヤンプ、サブルーチンからの1ビツトの
リターン、1ビツトのジヤンプすなわち条件付分
岐フイールドおよび、ゼロによつて排他的ORゲ
ート24aを能動化して条件選択レジスタ24か
らのジヤンプ能動化信号をアービトレーシヨン論
理回路27へと伝送する1ビツトの反転フイール
ドを含んでいる。命令レジスタ22の条件コード
選択は、条件選択論理回路24へと与えられる条
件信号の任意の1つを選択するために必要とされ
る数だけのビツトを含んでいる。第3図に示した
マイクロ命令のシーケンスの中に存在する命令レ
ジスタ22の中の残りのフイールドは、制御が行
なわれているデジタルデバイスを活性化するため
に用いられる。マイクロ命令の命令フイールドの
すべてのビツトがゼロであるときには、このプロ
グラムカウンタレジスタは第3図に示した命令の
シーケンスを通してインクリメントを行ない続け
る。 特定のレジスタカウンタが“プログラムカウン
タレジスタ”として指名されているときには、そ
れに続くそれぞれのROMにおいてシーケンス的
に1だけインクリメントする。また、特定のレジ
スタカウンタが“ジヤンプアドレスレジスタ”と
して指名されると、テストされている条件が要求
している場合に次の分岐を与えなければならない
命令のアドレスをホールドする。特定のレジスタ
カウンタが“ジヤンプアドレスレジスタ”として
指名されると、それはクロツクのそれぞれにおい
てロードされて、対応するROMの出力に分岐を
与えるべき命令が常に存在するようにする。最後
に、特定のレジスタカウンタが“スタツクレジス
タの先頭”として指名されると、最初にそのアド
レスがロードされているようなコーリングプログ
ラムのリターンアドレスを含むことになる。この
“スタツクレジスタの先頭”は、“プツシユ”命令
に出会つたときのみロードされる。この場合、こ
のレジスタの古い内容は第2図のメインスタツク
26へと移されている。このレジスタカウンタは
常に、メインスタツクの最も上のエレメントの内
容をホールドしている。しかしながら、リターン
命令に出会つたときには、リターンが特定される
べきアドレスの内容をこの命令レジスタに直ちに
ロードすることができる。これはもちろん、“ス
タツクレジスタの先頭”がリターンのロケーシヨ
ンの内容を取出すことによつて可能となる。 第3図に示したようなマイクロ命令の異なつた
シーケンスに対して種々のレジスタカウンタの中
で何が起こり、第2図の対応するROMの出力と
してどのようなものが生ずるかを例示することに
よつて、この発明では、それぞれのクロツクサイ
クルにおいてマイクロ命令を(第2図の)命令レ
ジスタ22へとどのように与えるかを理解するこ
とがおそらくできるであろう。たとえば、第3図
のマイクロ命令10がその時点で実行されてお
り、第2図のレジスタ21cが“プログラムカウ
ンタレジスタ”として指名されている場合を考え
ると、レジスタカウンタ21bは“ジヤンプレジ
スタ”として指名され、また、レジスタ21aは
“スタツクレジスタの先頭”として指名されてい
ることになる。マイクロ命令10の制御フイール
ドおよび命令フイールドは、このときには、命令
レジスタ22の中に存在し、レジスタカウンタ2
1cはインクリメントされて命令11のアドレス
をホールドし、レジスタカウンタ21bはマイク
ロ命令10のジヤンプアドレスフイールドをホー
ルドし(たとえば、このジヤンプアドレスを10
0とする)、そして、レジスタカウンタ21aは
スタツクアドレスの先頭のものをホールドする
(たとえば、このレジスタの内容を90とする)。
ROM20cの出力は制御データフイールドであ
つて、ジヤンプアドレスとして(75)を有する命
令11の命令フイールドが、第2図のマルチプレ
クサ23bへと与えられる。ROM20bの出力
は命令100の制御データフイールドと命令フイ
ールドであつて、そのジヤンプアドレス(300)
が第2図のマルチプレクサ23cへと与えられる
ことになる。ROM20aの出力はマイクロ命令
90の制御データフイールドおよび命令フイール
ドであり、そのジヤンプアドレス(400)が、マ
ルチプレクサ23bおよび23cの双方へ与えら
れる。 マイクロ命令10がジヤンプ命令であつた場合
には、レジスタカウンタ21bはここで“プログ
ラムカウンタレジスタ”となり、命令レジスタ2
2はマイクロ命令100の制御データフイールド
および命令フイールドを含むことになり、また、
“ジヤンプアドレスレジスタ”となつているレジ
スタカウンタ21cへとジヤンプアドレス(300)
が与えられるが、レジスタカウンタ21aの内容
には影響が生じていない。ROM20cの出力は
この時点で、命令300の制御データフイールド
および命令フイールドとなつており、そのジヤン
プアドレス(8)がマルチプレクサ23bへと与えら
れている。ROM20bの出力はこのとき、マイ
クロ命令101の制御データフイールドおよび命
令フイールドとなつており、そのジヤンプアドレ
ス(35)がマルチプレクサ23cへと与えられ
る。ROM20aの出力には変化は生じていな
い。 マイクロ命令10がサブルーチン命令へのジヤ
ンプであるときには、レジスタカウンタ21bは
“プログラムカウンタレジスタ”となり、その内
容(100)が1だけインクリメントされるととも
に、命令レジスタ22の内容は命令100の制御
データフイールドおよび命令フイールドとなる。
レジスタカウンタ21aは今度は“ジヤンプアド
レスレジスタ”となり、マイクロ命令100のジ
ヤンプアドレス(300)を含むが、一方、レジス
タカウンタ21cは“スタツクレジスタの先頭”
となつて、その内容(11)を維持している。ROM2
0bの出力はマイクロ命令101の制御データフ
イールドおよび命令フイールドとなつており、そ
のジヤンプアドレス(35)はマルチプレクサ23
aへと伝送される。レジスタカウンタ21aはマ
イクロ命令100(300)のジヤンプアドレスを
含んでおり、レジスタカウンタ21aの出力は命
令300の制御データフイールドおよび命令フイ
ールドであつて、そのジヤンプアドレス(8)はマル
チプレクサ23bへと伝送される。ROM20c
の出力は同一のままとなつている。その間に、
(90として特定された)レジスタ21aの前の内
容が、マルチプレクサ26aを経由してメインス
タツク26の先頭に置かれる。 マイクロ命令10がサブルーチン命令からのリ
ターンであつたときには、レジスタ21aは今度
は“プログラムカウンタレジスタ”となつて、1
だけインクリメントされる。命令レジスタ20に
は命令90の制御データフイールドおよび命令フ
イールドを含み、ROM20aの出力は命令91
の制御データフイールドおよび命令フイールドと
なつているが、そのジヤンプアドレスはマルチプ
レクサ21bへと与えられる。レジスタカウンタ
21bは“ジヤンプアドレスレジスタ”となり、
ROM20bの出力は前のマイクロ命令のジヤン
プアドレスならびに対応する制御データフイール
ドおよび命令フイールドとなる。“スタツクレジ
スタの先頭”となつているレジスタカウンタ21
cの内容はレジスタの先頭に前に置かれていた内
容を含んでおり、ROM20cの出力はそのアド
レスにおけるマイクロ命令の内容を含むことにな
る。 レジスタカウンタの役割分配を定める論理回路
は第2図のアービトレーシヨン論理回路27の中
に含まれている。この論理回路はステートマシン
にほかならない。レジスタカウンタのそれぞれに
付随した2ビツトレジスタ27a,27bおよび
27c(第4図参照)は、この論理回路の中に存
在している。この論理回路を駆動する信号は第2
図の命令レジスタ22および第2図の条件選択ユ
ニツト24において発生する。アービトレーシヨ
ン論理回路27の出力を第4図により詳しく示
す。これらの出力はデータ/アドレスマルチプレ
クサ23a,23b,23cを駆動し、また、3
つのレジスタカウンタ21a,21bおよび21
cへのロード/カウント能動化入力を駆動する。 上述したように、第2図および第4図のアービ
トレーシヨン論理回路27は、本質的にはステー
トマシンであり、実行される命令のタイプと3つ
のレジスタカウンタ21a,21bおよび1cの
状態ないしはモードのそれぞれの組合わせとに対
応した。レジスタおよびレジスタカウンタの次の
状態とソース選択アクシヨンとが存在する。第2
図および第4図のアービトレーシヨン論理回路2
7によつて制御されるこの発明のそれぞれのレジ
スタとROMとの動作を、第5図の中に表に詳し
く示す。この第5図では、それぞれのレジスタカ
ウンタの現在の状態および次の状態とともに、ア
ービトレーシヨン論理回路27の入力および出力
が描かれている。 第5図の第1行はその時点で実行されている命
令のタイプを示しており、“プログラムレジスタ
カウンタ”として指名されているレジスタカウン
タがインクリメントを続けているようなノーアク
シヨンのNA,サブルーチンへのジヤンプJMS,
およびサブルーチンからのリターンRET,ジヤ
ンプまたは条件付分岐JMPを含んでいる。第2
行はそれぞれのレジスタカウンタのモードの種々
の組合わせを示しており、ここでAは第2図のレ
ジスタカウンタ21aを、Bはレジスタカウンタ
21bを、Cはレジスタカウンタ21cを、それ
ぞれ意味している。異なつたレジスタカウンタの
それぞれのモードは、“ジヤンプアドレスレジス
タ”をJで、“スタツクレジスタの先頭”をSで、
また、“プログラムカウンタレジスタ”をCで、
それぞれ表わしている。第3行は、それぞれの後
続の状態ないしはモードを示している。 第4行はレジスタカウンタのそれぞれで発生す
るアクシヨンを示し、ここで、Lはレジスタカウ
ンタに新たなアドレスがロードされていること
を、Oはレジスタカウンタがその時点における内
容を保つていること、そして、はレジスタカウ
ンタのインクリメントがなされていることを示
す。第5行は、どのROMすなわち制御記憶装置
が、ロードされたレジスタカウンタに与えられる
新たなアドレスのソースであるかを示している。
第6行は、どのROMが、第2図の命令レジスタ
22にロードされた命令フイールドおよび制御デ
ータフイールドのソースであるかを示し、そし
て、第7行は、第2図のスタツク26の先頭に置
かれたアドレスのソースが存在するときには、そ
のソースはどのレジスタカウンタであるかを示し
ている。 たとえば、命令のノーアクシヨン(NA)タイ
プにおけるモードの第1の組合わせを考えてみ
る。ARがJに等しいということは、第2図のレ
ジスタカウンタ21aが“ジヤンプアドレスレジ
スタ“モードとなつており、レジスタカウンタ2
1bが“スタツクレジスタの先頭”のモードとな
つており、そして、レジスタカウンタ21cが
“プログラムカウンタレジスタ”モードとなつて
いることを示している。同じラインの次の行は、
種々のレジスタの状態すなわちモードが変化して
いないことを示している。このラインの第4行
は、レジスタカウンタ21aに新しいアドレスが
ロードされており、レジスタカウンタ21bはそ
の内容を維持しており、そして、レジスタカウン
タ21cがインクリメントされていることを示し
ている。第5行は、レジスタ21aに第2図の
ROM20cからジヤンプアドレスがロードされ
ていることを示す。またこのラインの第6行のIS
は、第2図の命令レジスタ22がROM21cに
関してロードされていることを示し、そして、こ
のラインの最終行は、第2図のスタツク26の先
頭に何も置かれていないことを示す。 サブルーチンへのジヤンプ命令JMSの実行に
関するこの発明のアクシヨンの他の例が、第5図
の中の真理値表のJMSのカテゴリの第1ライン
に示されている。レジスタカウンタ21aは“ジ
ヤンプアドレスレジスタ“モードとなつており、
レジスタカウンタ21bは“スタツクの先頭”モ
ードであり、そして、レジスタ21cは“プログ
ラムカウントレジスタ”モードである。次のクロ
ツク時間における、種々のレジスタカウンタのそ
れぞれの状態は、レジスタカウンタ21aが“プ
ログラムカウンタレジスタ”となり、レジスタカ
ウンタ21bが“ジヤンプアドレスレジスタ”と
なり、そして、レジスタカウンタ21cが“スタ
ツクレジスタの先頭”となつている。次の行は、
レジスタカウンタ21cがインクリメントされ、
レジスタカウンタ21bに新たなアドレスがロー
ドされていることを示しており、また、その次の
行は新たなアドレスのソースがROM20aであ
ることを示している。その次の行は、第2図の命
令レジスタ22がROM20aからロードされて
おり、最後の行はレジスタ21bが第2図のスタ
ツク26の先頭に置かれていることを示してい
る。 上に述べた例によつて、第5図の中の表の残り
の部分は明らかであろう。但し、命令RETのタ
イプとなつているサブルーチンからのリターンに
おいて、第5行に存在するZは、スタツクの先頭
がそれぞれのレジスタカウンタをロードするため
のソースとなつていることを示している。 まとめ デジタルバイスのためのマイクロコントローラ
すなわち、それぞれのクロツクタイムにおいて、
3つの異なつた制御記憶装置つまりROMのうち
の1つから対応する命令レジスタへとマイクロ命
令を与えることができるように構成されたマイク
ロコントローラを開示した。この方法では、マイ
クロ命令のシーケンスは他のサブルーチンへの条
件付分岐、サブルーチンへのジヤンプおよびサブ
ルーチンからのリターンと出会うことが可能であ
つて、そこでは、次のクロツクサイクルに必要と
される正しいマイクロ命令を命令レジスタへと与
える準備が常になされているため、クロツクサイ
クルのロスは生じない。 なお、ここではこの発明の1つの実施例のみを
開示したが、請求の範囲の精神と範囲を逸脱する
ことなく、変形や変化を与えることが可能である
ということは当業者にとつては自明であろう。
FIG. 3 illustrates a sequence of microinstructions as may reside in each control memory or ROM used in the present invention. As shown here, the first field represents the jump address JA, where the current microinstruction requests a conditional branch, jump to or return from a subroutine. It has the property of specifying the address of the next microinstruction to be executed. The second field, marked with an asterisk, is the instruction field, which includes branching, branching,
It contains as many bits as necessary to identify a jump or return, or, when neither is present, to identify a sequence of register counters that function as program counter registers. An example of a typical microinstruction is the instruction register 22.
are shown in more detail in FIG. 2 by the respective fields forming the . Each ROM
Note that the jump address stored as part of a microinstruction in a microinstruction is not provided to the instruction register. The instruction field shown here includes a 1-bit jump to the subroutine field, a 1-bit return from the subroutine, a 1-bit jump or conditional branch field, and a zero to enable exclusive OR gate 24a to execute the condition. It includes a 1-bit inversion field that transmits the jump enable signal from selection register 24 to arbitration logic 27. The condition code selection in instruction register 22 includes as many bits as are needed to select any one of the condition signals applied to condition selection logic 24. The remaining fields in instruction register 22 present in the sequence of microinstructions shown in FIG. 3 are used to activate the digital device being controlled. When all bits in the instruction field of a microinstruction are zero, the program counter register continues to increment through the sequence of instructions shown in FIG. When a particular register counter is designated as a "program counter register", it is sequentially incremented by one in each subsequent ROM. Also, a particular register counter is designated as a "jump address register" to hold the address of the instruction that should take the next branch if the condition being tested requires it. When a particular register counter is designated as a "jump address register", it is loaded on each clock so that there is always an instruction to take a branch to the output of the corresponding ROM. Finally, when a particular register counter is designated as the "top of the stack register", it will contain the return address of the calling program whose address was originally loaded. This "top of the stack register" is loaded only when a "push" instruction is encountered. In this case, the old contents of this register have been moved to the main stack 26 of FIG. This register counter always holds the contents of the topmost element of the main stack. However, when a return instruction is encountered, this instruction register can be immediately loaded with the contents of the address where the return is to be specified. This is, of course, possible by retrieving the contents of the location where the "top of the stack register" returns. To illustrate what happens in the various register counters for different sequences of microinstructions as shown in FIG. 3, and what results as the output of the corresponding ROM in FIG. Thus, with the present invention, it may be possible to see how microinstructions are provided to instruction register 22 (of FIG. 2) on each clock cycle. For example, if microinstruction 10 of FIG. 3 is currently being executed and register 21c of FIG. 2 is designated as a "program counter register," then register counter 21b is designated as a "jump register." Also, register 21a is designated as the "head of the stack register." The control and instruction fields of microinstruction 10 are now in instruction register 22 and register counter 2
1c is incremented to hold the address of instruction 11, and register counter 21b holds the jump address field of microinstruction 10 (for example, this jump address is
0), and the register counter 21a holds the first stack address (for example, the contents of this register are set to 90).
The output of ROM 20c is a control data field, and the instruction field of instruction 11 having (75) as the jump address is applied to multiplexer 23b of FIG. The output of ROM20b is the control data field and instruction field of instruction 100, and its jump address (300).
is applied to multiplexer 23c in FIG. The output of ROM 20a is the control data field and instruction field of microinstruction 90, whose jump address (400) is provided to both multiplexers 23b and 23c. If the microinstruction 10 is a jump instruction, the register counter 21b becomes a "program counter register" and the instruction register 21b becomes a "program counter register".
2 will contain the control data field and instruction field of the microinstruction 100, and
Jump address (300) to register counter 21c which is “jump address register”
is given, but the contents of the register counter 21a are not affected. At this point, the output of the ROM 20c has become the control data field and instruction field of the instruction 300, and its jump address (8) has been given to the multiplexer 23b. The output of the ROM 20b is now the control data field and instruction field of the microinstruction 101, and its jump address (35) is given to the multiplexer 23c. No change has occurred in the output of the ROM 20a. When the microinstruction 10 is a jump to a subroutine instruction, the register counter 21b becomes a "program counter register" and its contents (100) are incremented by 1, and the contents of the instruction register 22 are changed to the control data field of the instruction 100 and It becomes a command field.
Register counter 21a now becomes the "jump address register" and contains the jump address (300) of microinstruction 100, while register counter 21c is the "start of stack register".
Therefore, the content (11) is maintained. ROM2
The output of 0b serves as the control data field and instruction field of the microinstruction 101, and its jump address (35) is sent to the multiplexer 23.
is transmitted to a. Register counter 21a contains the jump address of microinstruction 100 (300), and the output of register counter 21a is the control data field and instruction field of instruction 300, whose jump address (8) is transmitted to multiplexer 23b. Ru. ROM20c
The output remains the same. During,
The previous contents of register 21a (identified as 90) are placed at the beginning of main stack 26 via multiplexer 26a. When the microinstruction 10 is a return from a subroutine instruction, the register 21a now becomes the "program counter register" and is 1
is incremented by The instruction register 20 includes a control data field and an instruction field for an instruction 90, and the output of the ROM 20a is an instruction 91.
The jump address is applied to multiplexer 21b. The register counter 21b becomes a “jump address register”,
The output of ROM 20b becomes the jump address of the previous microinstruction and the corresponding control data and instruction fields. Register counter 21, which is the “head of the stack register”
The contents of c will include the contents previously placed at the beginning of the register, and the output of ROM 20c will contain the contents of the microinstruction at that address. The logic circuit that determines the role distribution of the register counters is included in the arbitration logic circuit 27 of FIG. This logic circuit is nothing but a state machine. Two bit registers 27a, 27b and 27c (see FIG. 4) associated with each register counter are present in this logic circuit. The signal that drives this logic circuit is the second
This occurs in the instruction register 22 of the figure and the condition selection unit 24 of FIG. The output of arbitration logic circuit 27 is shown in more detail in FIG. These outputs drive data/address multiplexers 23a, 23b, 23c and also
register counters 21a, 21b and 21
Drives the load/count enable input to c. As mentioned above, the arbitration logic circuit 27 of FIGS. 2 and 4 is essentially a state machine, which determines the type of instruction being executed and the state or mode of the three register counters 21a, 21b and 1c. It corresponded to each combination of. There are next states of registers and register counters and source selection actions. Second
Arbitration logic circuit 2 in Figures and Figure 4
The operation of each register and ROM of the present invention controlled by 7 is detailed in the table in FIG. In this FIG. 5, the inputs and outputs of arbitration logic circuit 27 are depicted, along with the current and next states of the respective register counters. The first line of Figure 5 shows the type of instruction currently being executed, including a no-action NA, subroutine where the register counter designated as the "program register counter" continues to increment. Jump JMS,
and returns from subroutines, RETs, jumps or conditional branches JMP. Second
The rows indicate various combinations of the modes of the respective register counters, where A means the register counter 21a in FIG. 2, B means the register counter 21b, and C means the register counter 21c, respectively. . The modes of the different register counters are as follows: "jump address register" is "J", "start of stack register" is "S",
Also, write the “program counter register” in C,
each represents. The third line shows each subsequent state or mode. The fourth line shows the actions that occur in each of the register counters, where L indicates that the register counter is being loaded with a new address, O indicates that the register counter retains its current contents, and , indicates that the register counter is being incremented. The fifth line indicates which ROM or control store is the source of the new address given to the loaded register counter.
Line 6 indicates which ROM is the source of the instruction and control data fields loaded into instruction register 22 of FIG. 2, and line 7 indicates which ROM is the source of the instruction and control data fields loaded into instruction register 22 of FIG. If the source of the placed address exists, it indicates which register counter the source is. For example, consider the first combination of modes in a no-action (NA) type of instruction. The fact that AR is equal to J means that the register counter 21a in FIG. 2 is in the "jump address register" mode, and the register counter 21a in FIG.
1b is in the "head of stack register" mode, and register counter 21c is in the "program counter register" mode. The next line on the same line is
Indicates that the states or modes of various registers have not changed. The fourth line of this line shows that register counter 21a has been loaded with a new address, register counter 21b has maintained its contents, and register counter 21c has been incremented. The fifth line is in the register 21a as shown in FIG.
Indicates that the jump address is being loaded from the ROM 20c. Also, the IS of the 6th line of this line
indicates that instruction register 22 of FIG. 2 is loaded with respect to ROM 21c, and the last line of this line indicates that nothing is placed at the beginning of stack 26 of FIG. Another example of the actions of the present invention relating to the execution of a jump instruction JMS to a subroutine is shown in the first line of the JMS category of the truth table in FIG. The register counter 21a is in "jump address register" mode,
Register counter 21b is in "top of stack" mode and register 21c is in "program count register" mode. At the next clock time, the states of the various register counters are such that register counter 21a becomes the "program counter register," register counter 21b becomes the "jump address register," and register counter 21c becomes the "start of stack register." ”. The next line is
The register counter 21c is incremented,
It shows that a new address is loaded into the register counter 21b, and the next line shows that the source of the new address is the ROM 20a. The next line shows that instruction register 22 of FIG. 2 is loaded from ROM 20a, and the last line shows that register 21b is placed at the beginning of stack 26 of FIG. With the example described above, the rest of the table in FIG. 5 will be clear. However, in the return from a subroutine of type RET instruction, the Z in the fifth line indicates that the top of the stack is the source for loading each register counter. Summary Microcontrollers for digital devices, that is, at each clock time,
A microcontroller is disclosed that is configured to be able to provide microinstructions to a corresponding instruction register from one of three different control memories or ROMs. In this way, a sequence of microinstructions can encounter conditional branches to other subroutines, jumps to subroutines, and returns from subroutines, where the correct No clock cycles are lost because microinstructions are always ready to be presented to the instruction register. Although only one embodiment of the present invention has been disclosed here, it is obvious to those skilled in the art that modifications and changes can be made without departing from the spirit and scope of the claims. Will.

JP50368783A 1982-11-03 1983-11-03 Multiple control stores in a pipelined microcontroller for jumps to and returns to subroutines Granted JPS59502040A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US438701 1982-11-03
PCT/US1983/001707 WO1984001843A1 (en) 1982-11-03 1983-11-03 Multiple control stores in a pipelined microcontroller for handling jump and return subroutines

Publications (2)

Publication Number Publication Date
JPS59502040A JPS59502040A (en) 1984-12-06
JPS6339929B2 true JPS6339929B2 (en) 1988-08-09

Family

ID=22175537

Family Applications (1)

Application Number Title Priority Date Filing Date
JP50368783A Granted JPS59502040A (en) 1982-11-03 1983-11-03 Multiple control stores in a pipelined microcontroller for jumps to and returns to subroutines

Country Status (1)

Country Link
JP (1) JPS59502040A (en)

Also Published As

Publication number Publication date
JPS59502040A (en) 1984-12-06

Similar Documents

Publication Publication Date Title
EP0124597B1 (en) Multiple control stores in a pipelined microcontroller for handling jump and return subroutines
US4399505A (en) External microcode operation in a multi-level microprocessor
US4200927A (en) Multi-instruction stream branch processing mechanism
AU628163B2 (en) Method and apparatus for detecting and correcting errors in a pipelined computer system
US5752064A (en) Computer architecture capable of concurrent issuance and execution of general purpose multiple instructions
US3735363A (en) Information processing system employing stored microprogrammed processors and access free field memories
US5371860A (en) Programmable controller
US5119483A (en) Application of state silos for recovery from memory management exceptions
US5006980A (en) Pipelined digital CPU with deadlock resolution
EP0126125B1 (en) Multiple control stores for a pipelined microcontroller
US4305124A (en) Pipelined computer
JPH03129433A (en) Device and method for parallel processing
JPS6339931B2 (en)
JPH0774991B2 (en) Operating method of pipelined processing unit in digital computer
JPH0429093B2 (en)
US5097407A (en) Artificial intelligence processor
US4551798A (en) Multiple control stores in a pipelined microcontroller for handling nester subroutines
EP0378415A2 (en) Multiple instruction dispatch mechanism
KR100210205B1 (en) Apparatus and method for providing a stall cache
US4173782A (en) Return and link mechanism
EP0010196B1 (en) Control circuit and process for digital storage devices
US5666507A (en) Pipelined microinstruction apparatus and methods with branch prediction and speculative state changing
US5363490A (en) Apparatus for and method of conditionally aborting an instruction within a pipelined architecture
US5737562A (en) CPU pipeline having queuing stage to facilitate branch instructions
JPS6339930B2 (en)