JPH01140232A - Microprogram control system - Google Patents

Microprogram control system

Info

Publication number
JPH01140232A
JPH01140232A JP62298346A JP29834687A JPH01140232A JP H01140232 A JPH01140232 A JP H01140232A JP 62298346 A JP62298346 A JP 62298346A JP 29834687 A JP29834687 A JP 29834687A JP H01140232 A JPH01140232 A JP H01140232A
Authority
JP
Japan
Prior art keywords
address
microprogram
register
return
index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62298346A
Other languages
Japanese (ja)
Inventor
Yasushi Yokoyama
康 横山
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
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP62298346A priority Critical patent/JPH01140232A/en
Publication of JPH01140232A publication Critical patent/JPH01140232A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To realize a microsequence signal whose degree of freedom is high by determining the return address of a register when an index address in an address register coincides with the address of a program language being executed. CONSTITUTION:The respective addresses of the index address and the return address are respectively read out of a control storage 2 by the specific microinstruction of a microprogram in a control storage 1, these are respectively stored into address registers 7 and 8 and next, an address coincidence is detected by a comparing circuit 9. The microprogram intends to use one part of another microprogram as a sub-routine, branches unconditionally, the return address is supplied to the microprogram by the address held by the register 8 at the time of detecting the coincidence and a return to a microprogram sequence to a main routine is attained. As this result, the microprogram steals the logic of one part of another microprogram.

Description

【発明の詳細な説明】 技術分野 本発明はマイクロプログラム制御方式に関し、特に任意
のマイクロプログラムシーケンスをあたかもサブルーテ
ィンの様にスチールして実行できるようにしたマイクロ
プログラムのシーケンス制御方式に関する。
TECHNICAL FIELD The present invention relates to a microprogram control system, and more particularly to a microprogram sequence control system that allows any microprogram sequence to be stolen and executed as if it were a subroutine.

従来技術 ソフトウェアのプログラミング手法の1つにサブルーテ
ィン法がある。これは幾つかのプログラムで共通する機
能部分を取出してサブルーデインとし、各プログラムル
ーティン(これをサブルーティンに対してメインルーテ
ィンと呼ぶ)は必要に応じてこのサブルーティンをコー
ルしてその機能を使用する方法であるが、マイクロプロ
グラムにも利用されている。
One of the conventional software programming methods is the subroutine method. This takes a functional part common to several programs and makes it a subroutine, and each program routine (this is called a main routine as opposed to a subroutine) calls this subroutine as necessary to use its functions. Although it is a method, it is also used in microprograms.

従来、マイクロプログラム制御のデータ処理装置では、
メインルーティン中においてサブルーティンからの戻り
番地をレジスタに予め設定しておき、サブルーティンの
最後にこのレジスタに格納されている戻り番地ヘジャン
ブすることを指示するマイクロ命令を置くことによりサ
ブルーティン法を実現するようになっている。
Conventionally, in microprogram-controlled data processing devices,
The subroutine method is realized by setting the return address from the subroutine in a register in advance during the main routine, and placing a microinstruction at the end of the subroutine that instructs to jump to the return address stored in this register. It is supposed to be done.

上述した従来技術による実現法では、メインルーティン
への戻りを指示するマイクロ命令をサブルーティンの出
口に用意する必要があるので、既に設計の終了している
ルーティンAの一部をサブルーティンとして利用したい
場合、このルーティンAがサブルーティンとして設計さ
れたものでなければ利用できなかったり、あるいは設計
済のサブルーティンの一部分のみをサブルーティンとし
て利用することができないといった欠点がある。
In the implementation method using the conventional technology described above, it is necessary to prepare a microinstruction at the exit of the subroutine to instruct a return to the main routine, so I would like to use a part of routine A, which has already been designed, as a subroutine. In this case, there is a drawback that this routine A cannot be used unless it is designed as a subroutine, or only a part of a designed subroutine cannot be used as a subroutine.

発明の目的 そこで、本発明は上記従来方式の欠点を解決すべくなさ
れたものであって、その目的とするところは、既存のマ
イクロプログラムルーティンの一部を、何等の変更もな
く自由に利用できるようにして、開放的でかつ自由度の
高いマイクロシーケンススチールを実現可能なマイクロ
プログラム制御方式を提供することにある。
Purpose of the Invention Therefore, the present invention was made to solve the above-mentioned drawbacks of the conventional method, and its purpose is to make it possible to freely use a part of an existing microprogram routine without any changes. In this way, it is an object of the present invention to provide a microprogram control method capable of realizing microsequence stealing in an open manner and with a high degree of freedom.

発明の構成 本発明によれば、マイクロプログラムを格納する第1の
制御記憶と、前記第1の制御記憶上の割出しアドレス及
び戻りアドレスを格納する第2の制御記憶と、前記第1
の制御記憶から読出された特定のマイクロ命令によって
前記第2の制御記憶から割出しアドレス及び戻りアドレ
スを読出寸手段と、これ等読出された割出しアドレス及
び戻りアドレスを夫々格納するレジスタと、このレジス
タに格納された割出しアドレスと実行中のマイクロプロ
グラム語のアドレスとを比較する比較手段とを設け、こ
の比較手段により一致が検出されたときに次に実行され
るべきマイクロプログラム語のアドレスを前記レジスタ
に格納されている戻りアドレスとすることを特徴とする
マイクロプログラム制御方式が得られる。
Structure of the Invention According to the present invention, a first control memory that stores a microprogram, a second control memory that stores an index address and a return address on the first control memory, and a second control memory that stores an index address and a return address on the first control memory;
a register for storing the read index address and return address, respectively, from the second control memory according to a specific microinstruction read from the control memory; Comparing means for comparing the indexed address stored in the register with the address of the microprogram word being executed is provided, and when a match is detected by the comparing means, the address of the microprogram word to be executed next is determined. A microprogram control method is obtained, characterized in that the return address is stored in the register.

友凰旦 次に、本発の一実施例について図面を参照して説明する
Next, an embodiment of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示すブロック図である。図
に示す如く、本実施例は機械命令の実行手順を示すマイ
クロプログラムを格納する第1制御記憶1、複数組の番
地を格納する第2&1jtlB記憶2、第1制御記憶1
から読出されたマイクロ命令語とそのアドレスを夫々格
納するマイクロ命令レジスタ3及びマイクロアドレスレ
ジスタ4.マイクロ命令レジスタ3のマイクロ命令を解
析するマイクロ命令デコーダ5.マイクロアドレス生成
回路61割出しアドレスレジスタ7、戻りアドレスレジ
スタ8.比較回路9.フリップフロップ10゜アンドゲ
ート11及び選択回路12から構成されている。
FIG. 1 is a block diagram showing one embodiment of the present invention. As shown in the figure, this embodiment has a first control memory 1 that stores a microprogram indicating the execution procedure of machine instructions, a second &1jtlB memory 2 that stores a plurality of sets of addresses, and a first control memory 1.
A microinstruction register 3 and a microaddress register 4, which respectively store the microinstruction word and its address read from the microinstruction register 3. A microinstruction decoder 5 that analyzes the microinstructions in the microinstruction register 3. Micro address generation circuit 61 index address register 7, return address register 8. Comparison circuit 9. It consists of a flip-flop 10° and gate 11 and a selection circuit 12.

マイクロプログラムの各マイクロ命令語は第1制御記憶
1から読出されてマイクロ命令レジスタ3に保持され、
デコーダ5によって解析されて実行部(図示せず)の制
御を行うと同時にマイクロアドレス生成回路6によって
次に実行されるべきマイクロ命令語の番地を生成し、選
択回路12を介して第1制御記憶1に読出し番地を供給
するという動作が逐次的に反復されることにより、機械
命令が実行されるようになっている。
Each microinstruction word of the microprogram is read from the first control memory 1 and held in the microinstruction register 3;
The decoder 5 analyzes and controls the execution unit (not shown), and at the same time the micro-address generating circuit 6 generates the address of the micro-instruction word to be executed next, and the address of the micro-instruction word to be executed next is sent to the first control memory via the selection circuit 12. A machine instruction is executed by sequentially repeating the operation of supplying a read address to 1.

ここで、マイクロ命令レジスタ3が保持するマイクロ命
令語の特定のフィールドは信号線31を介して第2制御
記憶2に読出しアドレスとして供給されている。いま特
定マイクロ命令(これを” S RS”マイクロ命令と
命名し、以下便宜上この表現を用いる)がデコーダ5で
解読されると、そのマイクロ命令語の特定フィールドに
示された番地の第2制御記憶2の内容をアドレスレジス
タ7及び戻りアドレスレジスタ8に格納し、同時に7リ
ツプフOツブ10が論理“1″に設定されて、アンドゲ
ート11がオープンとなって後述の比較一致信号が活性
化される。
Here, a specific field of the microinstruction word held by the microinstruction register 3 is supplied to the second control memory 2 as a read address via a signal line 31. Now, when a specific microinstruction (this is named "SRS" microinstruction and this expression is used for convenience below) is decoded by the decoder 5, the second control memory at the address indicated in the specific field of the microinstruction word is decoded by the decoder 5. The contents of 2 are stored in the address register 7 and the return address register 8, and at the same time, the 7-rip-off block 10 is set to logic "1", the AND gate 11 is opened, and a comparison match signal, which will be described later, is activated. .

比較回路9はマイクロアドレスレジスタ4と割出しアド
レスレジスタ7とに夫々保持されたアドレスを比較し、
両者が一致すれば比較一致信号を信号線91に出力して
フリップ70ツブ10をリセットする。
Comparison circuit 9 compares the addresses held in micro address register 4 and index address register 7, respectively.
If the two match, a comparison match signal is output to the signal line 91 to reset the flip 70 knob 10.

フリップ70ツブ10が論理“1”に設定されていると
きに比較回路で一致が検出されると、アンド回路11の
出力は論理値゛1”となり、この結果選択回路12はマ
イクロアドレス生成回路6により生成されたアドレスの
代りに戻りアドレスレジスタ8に保持される戻りアドレ
スを第1制御記憶1に供給することにより、メインルー
ティンへのマイクロプログラムシーケンスンの戻りを達
成する。同時に7リツプフロツプ10はリセットされる
ので、“S RS ”マイクロ命令が次に出現するまで
は上記一致検出によるマイクロプログラムシーケンスの
変更は行なわれない。
If a match is detected in the comparison circuit when the flip 70 knob 10 is set to logic "1", the output of the AND circuit 11 becomes the logic value "1", and as a result, the selection circuit 12 selects the micro address generation circuit 6. The return of the microprogram sequence to the main routine is achieved by supplying the first control memory 1 with a return address held in the return address register 8 instead of the address generated by the 7-lip-flop 10. Therefore, the microprogram sequence is not changed by the above coincidence detection until the "S RS" microinstruction appears next.

次に、第2図によって第1図に示したマイクロプログラ
ム制御方式のマイクロプログラムシーケンス1の効果を
説明する。第2図中の各ブロックはマイクロプログラム
語を示し、各ブロック間を結ぶ線は各プログラム語の実
行の流れ、換言すれば、マイクロプログラムシーケンス
を表わす。各マイクロプログラム語は並列欄理し得る複
数のマイクロ命令からなっており、たとえばステップC
はその1つとして前述の“’SR8”マイクロ命令が記
述されている。また1つのブロックから複数の線が出て
いるのはそのブロックに条件分岐マイクロ命令が記述さ
れており、分岐条件によっていずれかの線の流れに進む
ことを示すものとする。
Next, the effect of the microprogram sequence 1 of the microprogram control method shown in FIG. 1 will be explained with reference to FIG. Each block in FIG. 2 represents a microprogram word, and the lines connecting each block represent the flow of execution of each program word, in other words, the microprogram sequence. Each microprogram word consists of multiple microinstructions that can be processed in parallel, such as step C
The above-mentioned "'SR8" microinstruction is described as one of them. Also, the fact that a plurality of lines are coming out of one block indicates that a conditional branch microinstruction is written in that block, and that the flow of the line is to proceed to one of the lines depending on the branch condition.

さて、マイクロプログラム1がステップCに来ると、S
 RS ”マイクロ命令によって第2制御記憶2から割
出しアドレスとしてステップPの番地を、戻りアドレス
としてステップD′の番地を夫々読出し、これ等を第1
図の割出しアドレスレジスタ7及び戻りアドレスレジス
タ8に夫々格納し、アドレス一致チエツクを開始する。
Now, when microprogram 1 reaches step C, S
RS "The microinstruction reads out the address of step P as the index address and the address of step D' as the return address from the second control memory 2, and sets these as the first
The address is stored in the index address register 7 and return address register 8 shown in the figure, respectively, and an address match check is started.

マイクロプログラム1はマイクロプログラム2の一部を
サブルーティンとして使用することを意図してステップ
Rに無条件分岐し、ステップR−>S−+T−→Q→R
→U→■→Pと道み、ステップPにおいてアドレス一致
が生ずるため、戻りアドレスレジスタ8に保持される番
地によってマイク[1プログラム1のステップDに戻る
ことができる。
Microprogram 1 unconditionally branches to step R with the intention of using part of microprogram 2 as a subroutine, and steps R->S-+T-→Q→R
→U→■→P, and since an address match occurs at step P, it is possible to return to step D of the microphone [1 program 1] using the address held in the return address register 8.

結局、A→B−+C→R→S→T→Q→R→U→v−+
P−+D−+E→Fのステップを辿ることになり、マイ
クロプログラム1がマイクロプログラム2の一部の論理
をスチールすることができる。
In the end, A→B−+C→R→S→T→Q→R→U→v−+
The steps P-+D-+E→F are followed, and microprogram 1 can steal part of the logic of microprogram 2.

尚、ステップPでアドレス一致が生じてステップDへ戻
る際に、フリツプフロツプ10がリセットされるので、
マイクロプログラム1の終了後にマイクロプログラム2
が頭から実行されても、ステップPでアドレス一致が生
じてステップDヘジャンプすることはない。
Note that when an address match occurs in step P and the process returns to step D, the flip-flop 10 is reset.
Micro program 2 after finishing micro program 1
Even if executed from the beginning, an address match will not occur in step P and a jump to step D will not occur.

発明の詳細 な説明したように、本発明によれば、マイク[1プログ
ラムの割出しアドレスと戻りアドレスとを格納する第2
の制御記憶をもち、割出しチエツクの開始点で所望の割
出しアドレスと戻りアドレスとを取出してレジスタに格
納して割出しチエツクを行ない、割出しアドレスの一致
によって所望の戻りアドレスへ分岐することによって、
従来からのサブルーティンの構成方法の特徴であった閉
鎖性を取り除き、開放的で自由度の高いマイクロシーケ
ンススチールを実現できるという効果がある。更には既
存のマイクロプログラムルーティンの一部分を同等変更
を加えることなく自由に利用できることから、i、11
111記憶容ωの削減や開発作業の効率向−Fにも効果
がある。
DETAILED DESCRIPTION OF THE INVENTION According to the present invention, a microphone [second address storing the index address and return address of one program] is provided.
At the start point of the index check, the desired index address and return address are retrieved and stored in a register to perform the index check, and branch to the desired return address when the index addresses match. By,
This method has the effect of eliminating the closedness that was characteristic of conventional subroutine configuration methods and realizing an open microsequence steal with a high degree of freedom. Furthermore, since a part of the existing microprogram routine can be freely used without making any equivalent changes, i.11
It is also effective in reducing the 111 memory capacity ω and improving the efficiency of development work.

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

第1図は本発明の実施例のブロック図、第2図は本発明
の実施例に用いるマイクロプログラムの70−ヂャ−1
・の例を示す図である。 主要部分の符号の説明 1・・・・・・第1制御配憶 2・・・・・・第2制御記憶 7・・・・・・割出しアドレスレジスタ8・・・・・・
戻りアドレスレジスタ 9・・・・・・アドレス比較回路 12・・・・・・アドレス選択回路
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a 70-ja-1 microprogram used in the embodiment of the present invention.
・It is a figure showing an example. Explanation of symbols of main parts 1...First control memory 2...Second control memory 7...Identification address register 8...
Return address register 9...Address comparison circuit 12...Address selection circuit

Claims (1)

【特許請求の範囲】[Claims] マイクロプログラムを格納する第1の制御記憶と、前記
第1の制御記憶上の割出しアドレス及び戻りアドレスを
格納する第2の制御記憶と、前記第1の制御記憶から読
出された特定のマイクロ命令によつて前記第2の制御記
憶から割出しアドレス及び戻りアドレスを読出す手段と
、これ等読出された割出しアドレス及び戻りアドレスを
夫々格納するレジスタと、このレジスタに格納された割
出しアドレスと実行中のマイクロプログラム語のアドレ
スとを比較する比較手段とを設け、この比較手段により
一致が検出されたときに次に実行されるべきマイクロプ
ログラム語のアドレスを前記レジスタに格納されている
戻りアドレスとすることを特徴とするマイクロプログラ
ム制御方式。
a first control memory storing a microprogram; a second control memory storing an index address and a return address on the first control memory; and a specific microinstruction read from the first control memory. means for reading an index address and a return address from the second control memory by means of a register; a register for storing the read index address and return address, respectively; and an index address stored in the register; and a comparison means for comparing the address of the microprogram word being executed, and when a match is detected by the comparison means, the address of the microprogram word to be executed next is the return address stored in the register. A microprogram control method characterized by:
JP62298346A 1987-11-26 1987-11-26 Microprogram control system Pending JPH01140232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62298346A JPH01140232A (en) 1987-11-26 1987-11-26 Microprogram control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62298346A JPH01140232A (en) 1987-11-26 1987-11-26 Microprogram control system

Publications (1)

Publication Number Publication Date
JPH01140232A true JPH01140232A (en) 1989-06-01

Family

ID=17858486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62298346A Pending JPH01140232A (en) 1987-11-26 1987-11-26 Microprogram control system

Country Status (1)

Country Link
JP (1) JPH01140232A (en)

Similar Documents

Publication Publication Date Title
US3781823A (en) Computer control unit capable of dynamically reinterpreting instructions
US4131943A (en) Microprogrammed computer employing a decode read only memory (DROM) and a microinstruction read only memory (ROM)
JPH02140831A (en) Data processor
JPH01140232A (en) Microprogram control system
US4511983A (en) Apparatus for controlling microinstructions stored in a data processing unit memory
JPS5842891B2 (en) Meirei Seigiyohoushiki
JPS58200349A (en) Microprogram controller
JPS5943444A (en) Method and device for microprogram control
JPH04251331A (en) Information processor
JPH01108636A (en) Data processor with tag
JPS59737A (en) Microprogram control method
JPH064345A (en) History information storage system
JPS6028014B2 (en) microprocessor
JPS593647A (en) Data processing system
JPH02103643A (en) Interruption generation circuit for debug
JPH01130228A (en) Microprogram controller
JPS6093555A (en) Microprogram controller
JPH0635694A (en) Microprogram running stop control device and method
JPS63197247A (en) Microprogram controller
JPH05233379A (en) Execution history storage device
JPH0277942A (en) Memory and microprogram controller
JPS59218557A (en) Data processing device by microprogram control
JPH0239812B2 (en)
JPS63123137A (en) Address coincidence signal generating system
JPS63229526A (en) Information processor