JP3464048B2 - Multi-channel processing microprogram control circuit - Google Patents

Multi-channel processing microprogram control circuit

Info

Publication number
JP3464048B2
JP3464048B2 JP17146594A JP17146594A JP3464048B2 JP 3464048 B2 JP3464048 B2 JP 3464048B2 JP 17146594 A JP17146594 A JP 17146594A JP 17146594 A JP17146594 A JP 17146594A JP 3464048 B2 JP3464048 B2 JP 3464048B2
Authority
JP
Japan
Prior art keywords
channel
stack
processing
program
value
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 - Fee Related
Application number
JP17146594A
Other languages
Japanese (ja)
Other versions
JPH0836540A (en
Inventor
高詩 石黒
昭 石沢
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.)
Nippon Telegraph and Telephone Corp
Oki Electric Industry Co Ltd
Original Assignee
Nippon Telegraph and Telephone Corp
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp, Oki Electric Industry Co Ltd filed Critical Nippon Telegraph and Telephone Corp
Priority to JP17146594A priority Critical patent/JP3464048B2/en
Publication of JPH0836540A publication Critical patent/JPH0836540A/en
Application granted granted Critical
Publication of JP3464048B2 publication Critical patent/JP3464048B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、チャネルをプログラム
の途中で切り替えながら、同一のマイクロプログラムに
より多チャネル処理を行なうプロセッサの多チャネル処
理マイクロプログラム制御回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multi-channel processing microprogram control circuit for a processor which performs multichannel processing by the same microprogram while switching channels in the middle of a program.

【0002】[0002]

【従来の技術】図2は、従来の多チャネル処理マイクロ
プログラム制御回路(プロセッサの一部)の一構成例を
示すブロック図である。
2. Description of the Related Art FIG. 2 is a block diagram showing a configuration example of a conventional multi-channel processing microprogram control circuit (a part of a processor).

【0003】この多チャネル処理マイクロプログラム制
御回路は、後述するプログラムカウンタ7の値(プログ
ラムアドレス)を退避させるLIFO(Last In First
Out)構造のスタック2と、処理しているチャネルを示
すチャネルレジスタ5と、チャネルレジスタ5の格納値
を1インクリメントする加算器4と、シーケンスによっ
て次のマシンサイクルで処理するプログラムアドレスを
選択するアドレス選択手段6と、処理しているプログラ
ムアドレスに1加算する加算器8と、その加算後の値を
保持するプログラムカウンタ7と、マイクロプログラム
格納用ROM9と、処理しているプログラムを記憶する
命令レジスタ10と、命令レジスタ10の値から演算部
等への制御信号を作成するデコーダ11より構成され
る。
This multi-channel processing microprogram control circuit saves a value (program address) of a program counter 7 which will be described later, in a LIFO (Last In First).
Out) stack 2, a channel register 5 indicating the channel being processed, an adder 4 that increments the value stored in the channel register 5 by 1, and an address that selects a program address to be processed in the next machine cycle by a sequence. Selector 6, adder 8 for adding 1 to the program address being processed, program counter 7 for holding the value after the addition, microprogram storing ROM 9, and instruction register for storing the program being processed 10 and a decoder 11 that creates a control signal from the value of the instruction register 10 to the arithmetic unit and the like.

【0004】通常のシーケンスでは、アドレス選択手段
6は、命令レジスタ10の一部格納値又はデコーダ11
からの一部デコード値に基づいて、処理しているプログ
ラムアドレスに1加算したプログラムカウンタ7の出力
値を選択し、これによりROM9はアドレス選択手段6
が選択したプログラムアドレスに格納されているプログ
ラムを出力し、命令レジスタ10は次のマシンサイクル
の開始時点でROM9が出力したプログラムを読み込
み、加算器8が処理するプログラムアドレスを1インク
リメントしてプログラムカウンタ7に保持させる。
In a normal sequence, the address selection means 6 uses the partially stored value of the instruction register 10 or the decoder 11.
The output value of the program counter 7, which is obtained by adding 1 to the program address being processed, is selected based on the partial decoded value from, and the ROM 9 causes the address selecting means 6 to select the output value.
Outputs the program stored in the selected program address, the instruction register 10 reads the program output from the ROM 9 at the start of the next machine cycle, increments the program address processed by the adder 1 by one, and increments the program counter. Hold at 7.

【0005】ジャンプするシーケンスでは、アドレス選
択手段6は、命令レジスタ10の一部格納値又はデコー
ダ11からの一部デコード値に基づいて、ジャンプ先の
プログラムアドレスを示す命令レジスタ10の出力値を
選択して次のマシンサイクルのプログラムアドレスとす
る。
In the jump sequence, the address selecting means 6 selects the output value of the instruction register 10 indicating the program address of the jump destination based on the partially stored value of the instruction register 10 or the partially decoded value from the decoder 11. And set it as the program address of the next machine cycle.

【0006】サブルーチンを呼び出すシーケンスでは、
ジャンプ時の動作に加えてプログラムカウンタ7の値を
スタック2にプッシュする。リターン(RET)するシ
ーケンスでは、アドレス選択手段6はスタック2のトッ
プの値を選択して、次のマシンサイクルのプログラムア
ドレスとし、このときスタック2はポップ動作する。
In the sequence of calling a subroutine,
In addition to the jump operation, the value of the program counter 7 is pushed onto the stack 2. In the sequence of returning (RET), the address selecting means 6 selects the top value of the stack 2 and sets it as the program address of the next machine cycle. At this time, the stack 2 performs the pop operation.

【0007】このようなマイクロプログラム制御回路を
含むプロセッサは、複数の入出力チャネルを持ってお
り、処理しているチャネルを示すチャネルレジスタ5に
より入出力チャネルやフラグを選択する。以下では、チ
ャネル数をNとして、チャネルを0から(N−1)まで
の番号で切り分けるものとする。通常、加算器4は入力
に1加算した値を出力するが、(N−1)を入力した場
合は0を出力するものとする。
A processor including such a microprogram control circuit has a plurality of input / output channels, and an input / output channel or a flag is selected by a channel register 5 indicating a channel being processed. In the following, it is assumed that the number of channels is N and the channels are divided by numbers from 0 to (N-1). Normally, the adder 4 outputs a value obtained by adding 1 to the input, but outputs 0 when (N-1) is input.

【0008】ここで、図3に示す1チャネル用処理(一
例である)を、Nチャネルで処理することを検討してみ
る。多チャネル処理の場合、マイクロプログラム格納用
ROM9には、多チャネル処理マイクロプログラムが格
納されるが、ここでは、その前提となる1チャネル用の
マイクロプログラムが図3に示すものとする。
Here, let us consider processing the 1-channel processing (which is an example) shown in FIG. 3 with N channels. In the case of multi-channel processing, the micro-program storing ROM 9 stores a multi-channel processing micro program. Here, the pre-requisite micro program for one channel is shown in FIG.

【0009】まず、図3に示す1チャネル用の処理自体
を説明する。一連の処理を開始すると(F1)、フラグ
の内容を確認する(F2)。フラグが1ならばサブルー
チンSA1をコールし、そのサブルーチン処理SA1を
実行した後、メインルーチンにリターンし、さらに、サ
ブルーチンSA2をコールし、そのサブルーチン処理S
A2を実行した後、メインルーチンにリターンして一連
の処理を終了する(F3〜F9)。フラグが0ならばサ
ブルーチンSB1をコールし、そのサブルーチン処理S
B1を実行した後、メインルーチンにリターンし、さら
に、サブルーチンSB2をコールし、そのサブルーチン
処理SB2を実行した後、メインルーチンにリターンし
て一連の処理を終了する(F3〜F9)。
First, the processing itself for one channel shown in FIG. 3 will be described. When a series of processes is started (F1), the contents of the flag are confirmed (F2). If the flag is 1, the subroutine SA1 is called, the subroutine process SA1 is executed, then the process returns to the main routine, the subroutine SA2 is called, and the subroutine process S is executed.
After executing A2, the process returns to the main routine to end the series of processes (F3 to F9). If the flag is 0, the subroutine SB1 is called and the subroutine processing S
After executing B1, the process returns to the main routine, further calls the subroutine SB2, executes the subroutine process SB2, and then returns to the main routine to end the series of processes (F3 to F9).

【0010】このような1チャネル分の処理を、次の仮
定下でNチャネルで処理するとする。チャネル毎に上述
したフラグを持ち、フラグはプロセッサが処理を行なっ
ている間変化しないものとする。なお、フラグは、外部
より与えられて図2には図示しない部分で保持されてい
るものとし、入出力チャネルに対応しているものとす
る。また、サブルーチンSA1及びSB1は、サブルー
チンSA2及びSB2よりも処理のプライオリティが高
く、全てのチャネルについてサブルーチンSA1又はS
B1が終了した後にサブルーチンSA2又はSB2を行
なうものとする。
It is assumed that the processing for one channel is processed by N channels under the following assumptions. It is assumed that each channel has the above-mentioned flag, and the flag does not change while the processor is performing processing. Note that the flags are given from the outside and are held in a portion not shown in FIG. 2, and correspond to the input / output channels. Further, the subroutines SA1 and SB1 have higher processing priority than the subroutines SA2 and SB2, and the subroutines SA1 and S1 are used for all channels.
Subroutine SA2 or SB2 is executed after B1 is completed.

【0011】なお、このようにプログラムの途中でチャ
ネルを切り替えながら多チャネル処理を行なうことによ
り、複数の入出力チャネルに対してリアルタイム処理を
行なうことが可能になる。また、入出力チャネルに接続
される機器のデータ転送速度が遅いときなどは、プログ
ラムの途中でチャネルを切り替えながら多チャネル処理
を行なうことによりプロセッサの待ち時間を短縮して、
全体の処理時間を短くすることができる。さらに、条件
分岐によりチャネル毎に異なる処理を行なうことが可能
である。
By performing the multi-channel processing while switching the channels in the middle of the program, it is possible to perform the real-time processing for a plurality of input / output channels. Also, when the data transfer rate of the device connected to the I / O channel is slow, the waiting time of the processor can be shortened by performing multi-channel processing while switching channels in the middle of the program.
The overall processing time can be shortened. Furthermore, it is possible to perform different processing for each channel by conditional branching.

【0012】図4は、図3に示す1チャネル分の処理用
マイクロプログラムに基づいて形成された、図2のマイ
クロプログラム格納用ROM9に格納された多チャネル
処理マイクロプログラムを示すフローチャートである。
図4のマイクロプログラムは、当然に、図2に示す構成
が考慮されて形成されたものである。
FIG. 4 is a flowchart showing a multi-channel processing microprogram stored in the microprogram storing ROM 9 shown in FIG. 2, which is formed based on the processing microprogram for one channel shown in FIG.
The microprogram of FIG. 4 is naturally formed in consideration of the configuration shown in FIG.

【0013】なお、CH(以下、チャネルパラメータと
呼ぶ)は、処理しているチャネルを示すチャネルレジス
タ5の出力値とする。また、フラグ[CH]はチャネルパ
ラメータCHが規定するチャネルのフラグを示す。
CH (hereinafter referred to as channel parameter) is an output value of the channel register 5 which indicates the channel being processed. Also, the flag [CH] indicates a flag of the channel defined by the channel parameter CH.

【0014】フラグ[0] が1、フラグ[1] が0であった
として、図4のフローチャートを図2をも参照しながら
説明する。
Assuming that the flag [0] is 1 and the flag [1] is 0, the flowchart of FIG. 4 will be described with reference to FIG.

【0015】チャネルパラメータCHを0にしてプログ
ラムを開始する(F1)。チャネル0の処理を開始す
る。フラグ[0] により条件分岐する(F2)。例えば、
チャネルレジスタ5の出力によってそのチャネル用フラ
グの保持レジスタ(図示せず)の値を読み出して条件分
岐する。フラグ[0] は1なので、サブルーチンSA1を
呼び出すとともにプログラムカウンタ7の値をスタック
2にプッシュする(F3)。サブルーチンSA1の処理
を行なう(F4)。サブルーチンSA1の処理が終了す
るとRET(リターン)命令により、スタック2のトッ
プの値が次のマシンサイクルのプログラムアドレスとな
り、スタック2がポップ動作する(F5)。これによ
り、チャネルパラメータCHを1インクリメントして1
とする(F10)。チャネルパラメータCHは1なので
上述した処理F2へ進む(F11)。
The program is started by setting the channel parameter CH to 0 (F1). The processing of channel 0 is started. The condition is branched by the flag [0] (F2). For example,
The output of the channel register 5 reads the value of the holding register (not shown) for the channel flag, and the condition is branched. Since the flag [0] is 1, the subroutine SA1 is called and the value of the program counter 7 is pushed onto the stack 2 (F3). The processing of the subroutine SA1 is performed (F4). When the processing of the subroutine SA1 is completed, the value of the top of the stack 2 becomes the program address of the next machine cycle by the RET (return) instruction, and the stack 2 performs the pop operation (F5). As a result, the channel parameter CH is incremented by 1
(F10). Since the channel parameter CH is 1, the process proceeds to the above-mentioned process F2 (F11).

【0016】チャネル1の処理を開始する。フラグ[1]
により条件分岐する(F2)。フラグ[1] は0なので、
サブルーチンSB1を呼び出すとともにスタック2にプ
ログラムカウンタ7の値をプッシュする(F3)。サブ
ルーチンSB1の処理を行なう(F4)。サブルーチン
SB1の処理が終了するとRET命令により、スタック
2のトップ値が次のマシンサイクルのプログラムアドレ
スとなり、スタック2がポップ動作する(F5)。チャ
ネルパラメータCHを1インクリメントして2とする
(F10)。チャネルパラメータCHは2なので上述し
た処理F2へ進む(F11)。
Channel 1 processing is started. Flag [1]
The condition is branched by (F2). Flag [1] is 0, so
The subroutine SB1 is called and the value of the program counter 7 is pushed onto the stack 2 (F3). The processing of the subroutine SB1 is performed (F4). When the processing of the subroutine SB1 is completed, the top value of the stack 2 becomes the program address of the next machine cycle by the RET instruction, and the stack 2 performs the pop operation (F5). The channel parameter CH is incremented by 1 to 2 (F10). Since the channel parameter CH is 2, the process proceeds to the above-mentioned process F2 (F11).

【0017】同様にして、ループ処理F2−F3−F4
−F5−F10−F11を繰返し、全てのチャネルにつ
いてサブルーチンSA1又はSB1の処理を行なう。
Similarly, loop processing F2-F3-F4
-F5-F10-F11 are repeated to perform the processing of the subroutine SA1 or SB1 for all the channels.

【0018】チャネル(N−1)のサブルーチンSA1
又はSB1の処理が終了すると、チャネルパラメータC
Hを再び0とする(F10)。チャネルパラメータCH
は0なので次の処理F12へ進む(F11)。
Channel (N-1) subroutine SA1
Or, when the processing of SB1 is completed, the channel parameter C
H is set to 0 again (F10). Channel parameter CH
Is 0, the process proceeds to the next process F12 (F11).

【0019】チャネル0の処理を再開する。ここで、再
度フラグ[0] を参照して条件分岐する(F12)。フラ
グ[0] は1なので、サブルーチンSA2を呼び出すとと
もにプログラムカウンタ7の値をスタック2にプッシュ
する(F6)。サブルーチンSA2の処理を行なう(F
7)。サブルーチンSA2の処理が終了するとRET命
令により、スタック2のトップの値が次のマシンサイク
ルのプログラムアドレスとなり次の処理F13へ進み、
スタック2がポップ動作する(F8)。チャネルパラメ
ータCHを1インクリメントして1とする(F13)。
チャネルパラメータCHは1なので上述した処理F12
へ進む(F14)。
The processing of channel 0 is restarted. Here, the condition is branched again by referring to the flag [0] (F12). Since the flag [0] is 1, the subroutine SA2 is called and the value of the program counter 7 is pushed onto the stack 2 (F6). Perform processing of subroutine SA2 (F
7). When the processing of the subroutine SA2 is completed, the value of the top of the stack 2 becomes the program address of the next machine cycle by the RET instruction, and the processing proceeds to the next processing F13.
The stack 2 performs a pop operation (F8). The channel parameter CH is incremented by 1 to 1 (F13).
Since the channel parameter CH is 1, the above process F12
Proceed to (F14).

【0020】チャネル1の処理を再開する。ここで、再
度フラグ[1] を参照して条件分岐する(F12)。フラ
グ[1] は0なので、サブルーチンSB2を呼び出すとと
もにプログラムカウンタ7の値をスタック2にプッシュ
する(F6)。サブルーチンSB2の処理を行なう(F
7)。サブルーチンSB2の処理が終了するとRET命
令により、スタック2のトップの値が次のマシンサイク
ルのプログラムアドレスとなり、処理F13へ進み、ス
タック2がポップ動作する(F8)。チャネルパラメー
タCHを1インクリメントして2とする(F13)。チ
ャネルパラメータCHは2なので処理F12へ進む(F
14)。
The processing of channel 1 is restarted. Here, the condition is branched again by referring to the flag [1] again (F12). Since the flag [1] is 0, the subroutine SB2 is called and the value of the program counter 7 is pushed onto the stack 2 (F6). Perform processing of subroutine SB2 (F
7). When the processing of the subroutine SB2 ends, the value of the top of the stack 2 becomes the program address of the next machine cycle by the RET instruction, the process proceeds to the process F13, and the stack 2 performs the pop operation (F8). The channel parameter CH is incremented by 1 to 2 (F13). Since the channel parameter CH is 2, the process proceeds to F12 (F
14).

【0021】同様にして、ループ処理F12−F6−F
7−F8−F13−F14を繰返し、全てのチャネルに
ついてサブルーチンSA2又はSB2の処理を行なう。
Similarly, loop processing F12-F6-F
7-F8-F13-F14 are repeated to perform the processing of subroutine SA2 or SB2 for all channels.

【0022】チャネル(N−1)のサブルーチンSA2
又はSB2の処理が終了すると、チャネルパラメータC
Hを再び0とする(F13)。チャネルパラメータCH
は0なので次の処理F9へ進む(F14)。そして、一
連のプログラムは終了する(F9)。
Channel (N-1) subroutine SA2
Or, when the processing of SB2 ends, the channel parameter C
H is set to 0 again (F13). Channel parameter CH
Is 0, the process proceeds to the next process F9 (F14). Then, the series of programs ends (F9).

【0023】この図4の多チャネル処理マイクロプログ
ラムが、図3の1チャネル用マイクロプログラムより増
加している処理は、すなわちチャネル切替えを導入する
ことで増大した処理は、処理F10、F11、F12、
F13及びF14である。従って、各処理F10、F1
1、F12、F13、F14がそれぞれ1ステップであ
ったとすると、チャネル切替えにより増加する処理ステ
ップ数は、処理全体で(チャネル数×5)ステップであ
る。また、チャネル切り替えによるプログラム格納用R
OM9の容量の増加は、増加する処理が処理F10、F
11、F12、F13及びF14の5個であるので少な
くとも5ワードである。
The multi-channel processing microprogram of FIG. 4 has increased processing over the one-channel microprogram of FIG. 3, that is, the processing increased by introducing the channel switching is processing F10, F11, F12,
F13 and F14. Therefore, each processing F10, F1
Assuming that each of 1, F12, F13, and F14 is one step, the number of processing steps increased by channel switching is (the number of channels × 5) steps in the entire processing. R for program storage by channel switching
The increase in the capacity of the OM9 is due to the increasing processes F10 and F.
There are at least 5 words, because there are 5 of 11, F12, F13 and F14.

【0024】このプログラム例では、1チャネル分の処
理で条件分岐が1か所であるが、条件分岐がさらに多く
なるほどプログラムの構成が複雑になったり、演算結果
など保持されない条件により分岐したり、更にチャネル
切り替えが多くなったりするので、チャネル切り替えに
必要となる処理ステップ数やプログラム格納用ROM9
の容量が大幅に増加し、1チャネルを処理するプログラ
ムを多チャネルを処理するプログラムに変更するのが煩
雑な作業となるのは明らかである。
In this program example, there is one conditional branch in the processing for one channel, but the more conditional branches there are, the more complicated the program structure is, and the branch is performed depending on the condition such as the operation result not being held. Since the number of channel switching increases, the number of processing steps required for channel switching and the program storage ROM 9
It is obvious that the capacity of 1 is greatly increased, and changing a program for processing one channel to a program for processing multiple channels becomes a complicated task.

【0025】[0025]

【発明が解決しようとする課題】上記構成の回路ではチ
ャネル切り替えにより処理ステップ数が増加してプロセ
ッサの処理能力が低下するという問題点と、プログラム
ROMの容量が増加してハードウェア量が増加し多チャ
ネル処理による低コスト化の効果が低減してしまうとい
う問題点と、1チャネルを処理するプログラムを多チャ
ネルを処理するプログラムに変更するのが煩雑な作業に
なるとともにミスが生じやすいという問題点があった。
In the circuit having the above configuration, the number of processing steps increases due to channel switching and the processing capacity of the processor decreases, and the capacity of the program ROM increases and the amount of hardware increases. There is a problem that the cost reduction effect due to multi-channel processing is reduced, and that changing a program that processes one channel into a program that processes multiple channels is a complicated task and easily causes an error. was there.

【0026】本発明は、チャネル切り替えによる処理ス
テップ数の増加を最小限に抑え、プログラム格納用RO
Mの容量の増加も最小限に抑え、容易に多チャネルを処
理するプログラムを作成できる簡単な構成の多チャネル
処理マイクロプログラム制御回路を提供することを目的
とする。
The present invention minimizes an increase in the number of processing steps due to channel switching, and enables RO for program storage.
It is an object of the present invention to provide a multi-channel processing micro program control circuit having a simple structure that can minimize the increase in the capacity of M and easily create a program for processing multiple channels.

【0027】[0027]

【課題を解決するための手段】本発明の多チャネル処理
マイクロプログラム制御回路は、1つのチャネルの処理
が終了する毎に格納値が変更されるチャネルレジスタを
有し、このチャネルレジスタの値に従ってチャネルを切
り替えながら同一のマイクロプログラムにより多チャネ
ル処理を行なうプロセッサにおいて、プログラムカウン
タによるプログラムアドレスを退避させるスタックとし
てチャネル毎のスタックを設けると共に、チャネルレジ
スタの値に応じたチャネルのスタックを選択して、プロ
グラムアドレスをプッシュ又はポップさせるスタック選
択手段とを設け、チャネルを切り替える毎に切り替える
チャネルのスタックのトップからプログラムアドレスを
与える動作を繰り返して多チャネル処理を実行すること
を特徴としたものである。
A multi-channel processing microprogram control circuit of the present invention has a channel register whose stored value is changed each time the processing of one channel is completed, and the channel is changed according to the value of the channel register. In a processor that performs multi-channel processing by the same microprogram while switching between, the stack for each channel is provided as a stack for saving the program address by the program counter, and the stack of the channel is selected according to the value of the channel register to Stack selection means for pushing or popping addresses is provided, and multi-channel processing is executed by repeating the operation of giving a program address from the top of the stack of channels to be switched each time the channels are switched. A.

【0028】[0028]

【作用】本発明は、プログラムアドレスを退避させるス
タックとしてチャネル毎のスタックを用意し、チャネル
指示値を適宜変更するチャネルレジスタの値に従ってス
タック選択手段がチャネル毎のスタックを選択してプッ
シュ動作やポップ動作させることにより、できるだけ簡
単なハードウェア構成によって、しかも1チャネル用の
マイクロプログラムとできるだけ近似したステップ数が
少ない同一のマイクロプログラムによって多チャネル処
理を行なうことができるようにしたものである。
According to the present invention, a stack for each channel is prepared as a stack for saving the program address, and the stack selecting means selects the stack for each channel according to the value of the channel register that appropriately changes the channel instruction value, and pushes or pops. By operating it, it is possible to perform multi-channel processing with a hardware configuration that is as simple as possible, and with the same micro program that has a minimum number of steps that is as close as possible to the micro program for one channel.

【0029】[0029]

【実施例】【Example】

(A)第1実施例 以下、本発明による多チャネル処理マイクロプログラム
制御回路の第1実施例を図面を参照しながら詳述する。
ここで、図1が、この第1実施例のマイクロプログラム
制御回路の構成を示すものであり、上述した図2との同
一、対応部分には同一符号を付して示している。
(A) First Embodiment Hereinafter, a first embodiment of a multi-channel processing microprogram control circuit according to the present invention will be described in detail with reference to the drawings.
Here, FIG. 1 shows the configuration of the microprogram control circuit of the first embodiment, and the same or corresponding portions as those in FIG. 2 described above are designated by the same reference numerals.

【0030】図1及び図2の比較より明らかなように、
第1実施例のマイクロプログラム制御回路は、従来のマ
イクロプログラム制御回路に比較して、(1) サブルーチ
ン処理の開始時等にプログラムカウンタ7の値を退避す
るためのLIFO構造のスタックとしてチャネル毎のス
タック2-[CH] を設けている点、(2) チャネルレジスタ
5に格納された値(チャネルパラメータ)CHに応じた
スタック2-[CH] にプログラムカウンタ7の値をプッシ
ュするプッシュスタック選択手段1を設けている点、
(3) チャネルパラメータCHに応じたスタック2-[CH]
のトップの値を選択してアドレス選択手段6に出力する
出力スタック選択手段3を設けている点、及び、(4) R
ET命令時に選択されたスタック2-[CH] がポップ動作
するようにした点が異なっている。なお、各チャネル毎
のスタック2-[CH] は、1レベル以上であれば何レベル
でも良い。
As is clear from the comparison between FIGS. 1 and 2,
The microprogram control circuit of the first embodiment is different from the conventional microprogram control circuit in that (1) each channel is a stack of a LIFO structure for saving the value of the program counter 7 at the start of subroutine processing. (2) Push stack selection means for pushing the value of the program counter 7 to the stack 2- [CH] corresponding to the value (channel parameter) CH stored in the channel register 5 Point 1 is provided,
(3) Stack 2- [CH] according to channel parameter CH
Of the output stack selecting means 3 for selecting the top value of the above and outputting it to the address selecting means 6, and (4) R
The difference is that the stack 2- [CH] selected at the time of the ET instruction is pop-operated. The stack 2- [CH] for each channel may be of any level as long as it has one level or more.

【0031】次に、この第1実施例の多チャネル処理マ
イクロプログラム制御回路の動作を、図示しないプロセ
ッサの他の部分の動作とも対応させながら説明する。
Next, the operation of the multi-channel processing microprogram control circuit of the first embodiment will be described in correspondence with the operation of the other parts of the processor (not shown).

【0032】ここでも、1チャネル分の処理だけを考慮
したマイクロプログラムが、上述した図3に示すもので
あったとして説明する。
Also here, the description will be made assuming that the microprogram considering only the processing for one channel is the one shown in FIG. 3 described above.

【0033】第1実施例の多チャネル処理マイクロプロ
グラム制御回路のハードウェア構成を考慮すると、図3
に示す1チャネル分の処理をNチャネルで処理するよう
にしたマイクロプログラム、従って、マイクロプログラ
ム格納用ROM9に格納されているマイクロプログラム
は、例えば、図5に示すようなものとなる。図6は、こ
の図5に示すマイクロプログラムが実行されたときの処
理の流れを示すフローチャートである。
Considering the hardware configuration of the multi-channel processing microprogram control circuit of the first embodiment, FIG.
The microprogram for performing the processing for one channel shown in (1) by N channels, that is, the microprogram stored in the microprogram storing ROM 9 is as shown in FIG. 5, for example. FIG. 6 is a flow chart showing the flow of processing when the microprogram shown in FIG. 5 is executed.

【0034】以下、フラグ[0] が1、フラグ[1] が0で
あったとして、図1を参照しながら、図6のフローチャ
ートに示すようになる処理の流れを順に説明する。
Hereinafter, assuming that the flag [0] is 1 and the flag [1] is 0, the flow of the process shown in the flowchart of FIG. 6 will be sequentially described with reference to FIG.

【0035】最初に、全チャネルのスタック2-[0]〜2
-[N-1]のトップに、プログラムの開始アドレス(図5の
処理F2のアドレス)を入力しておき、チャネルパラメ
ータCHを0にして処理を開始する(F1)。
First, stacks 2- [0] to 2 of all channels
-At the top of [N-1], the start address of the program (the address of the process F2 in FIG. 5) is input, the channel parameter CH is set to 0, and the process is started (F1).

【0036】これにより、チャネル0の処理を開始す
る。フラグ[0] に基づいた条件分岐を行なう(F2)。
フラグ[0] は1なので、サブルーチンSA1を呼び出す
とともにスタック2-[0]にプログラムカウンタ7の値
(リターン時のメインルーチンのアドレス;フラグ[0]
=1に係る処理F6のアドレス)をプッシュする(F
3)。サブルーチンSA1の処理を行なう(F4)。サ
ブルーチンSA1の処理が終了すると、チャネルパラメ
ータCHを1インクリメントして1とした後(F1
0)、RET命令を実行し、これににより、スタック2
-[1]のトップの値が次のマシンサイクルのプログラムア
ドレスとなり、処理F2へ進み、スタック2-[1]がポッ
プ動作する(F5)。
As a result, channel 0 processing is started. A conditional branch based on the flag [0] is performed (F2).
Since the flag [0] is 1, the value of the program counter 7 (the address of the main routine at the time of return; flag [0] is called in the stack 2- [0] while calling the subroutine SA1.
= 1 for processing F6 address) is pushed (F
3). The processing of the subroutine SA1 is performed (F4). When the processing of the subroutine SA1 is completed, the channel parameter CH is incremented by 1 to 1 (F1
0), execute the RET instruction, which causes stack 2
-The top value of [1] becomes the program address of the next machine cycle, the process proceeds to F2, and the stack 2- [1] performs a pop operation (F5).

【0037】これにより、チャネル1の処理を開始す
る。フラグ[1] に基づいた条件分岐を行なう(F2)。
フラグ[1] は0なので、サブルーチンSB1を呼び出す
とともにスタック2-[1]にプログラムカウンタ7の値
(リターン時のメインルーチンのアドレス;フラグ[1]
=0に係る処理F6のアドレス)をプッシュする(F
3)。サブルーチンSB1の処理を行なう(F4)。サ
ブルーチンSB1の処理が終了すると、チャネルパラメ
ータCHを1インクリメントして2とした後(F1
0)、RET命令を実行し、これにより、スタック2-
[2]のトップの値が次のマシンサイクルのプログラムア
ドレスとなり、処理F2へ進み、スタック2-[2]がポッ
プ動作する(F5)。
As a result, the processing of channel 1 is started. A conditional branch is performed based on the flag [1] (F2).
Since the flag [1] is 0, the value of the program counter 7 (the address of the main routine at the time of return; flag [1] is called on the stack 2- [1] when the subroutine SB1 is called.
= 0 processing address of F6) is pushed (F
3). The processing of the subroutine SB1 is performed (F4). When the processing of the subroutine SB1 is completed, the channel parameter CH is incremented by 1 to 2 (F1
0), RET instruction is executed, which causes stack 2-
The top value of [2] becomes the program address of the next machine cycle, the process proceeds to F2, and the stack 2- [2] performs a pop operation (F5).

【0038】以下、同様にして、ループ処理F2−F3
−F4−F10−F5を繰り返して、全てのチャネルに
ついてサブルーチンSA1又はSB1の処理を行なう。
Thereafter, the loop processing F2-F3 is similarly performed.
-F4-F10-F5 are repeated to perform the processing of the subroutine SA1 or SB1 for all the channels.

【0039】チャネル(N−1)のサブルーチンSA1
又はSB1の処理が終了すると、チャネルパラメータC
Hを再び0とした後(F10)、RET命令を実行し、
これにより、スタック2-[0]のトップの値が次のマシン
サイクルのプログラムアドレスとなり、スタック2-[0]
がポップ動作する(F5)。
Channel (N-1) subroutine SA1
Or, when the processing of SB1 is completed, the channel parameter C
After setting H to 0 again (F10), execute the RET instruction,
As a result, the value at the top of stack 2- [0] becomes the program address for the next machine cycle, and stack 2- [0]
Pops (F5).

【0040】チャネル0の処理を再開する。スタック2
-[0]の格納値は、フラグが1に係る処理F6のアドレス
になっているので、サブルーチンSA2を呼び出すとと
もにスタック2-[0]にプログラムカウンタ7の値(リタ
ーン時のメインルーチンのアドレス;処理F9のアドレ
ス)をプッシュする(F6)。サブルーチンSA2の処
理を行なう(F7)。サブルーチンSA2の処理が終了
すると、チャネルパラメータCHを1インクリメントし
て1とした後(F13)、RET命令を実行し、これに
より、スタック2-[1]のトップの値(フラグが0に係る
処理F6のアドレス)が次のマシンサイクルのプログラ
ムアドレスとなり、スタック2-[1]がポップ動作する
(F8)。
The processing of channel 0 is restarted. Stack 2
-Since the stored value of [0] is the address of the process F6 related to the flag 1, the value of the program counter 7 (the address of the main routine at the time of return; The address of the process F9) is pushed (F6). The processing of the subroutine SA2 is performed (F7). When the processing of the subroutine SA2 ends, the channel parameter CH is incremented by 1 to 1 (F13), and then the RET instruction is executed, whereby the top value of the stack 2- [1] (the processing relating to the flag 0) The address of F6) becomes the program address of the next machine cycle, and the stack 2- [1] performs a pop operation (F8).

【0041】チャネル1の処理を再開する。サブルーチ
ンSB2を呼び出すとともにスタック2-[1]にプログラ
ムカウンタ7の値(リターン時のメインルーチンのアド
レス;処理F9のアドレス)をプッシュする(F6)。
サブルーチンSB2の処理を行なう(F7)。サブルー
チンSB2の処理が終了すると、チャネルレジスタ5の
格納値CHを1インクリメントして2とした後(F1
3)、RET命令を実行し、これにより、スタック2-
[2]のトップの値が次のマシンサイクルのプログラムア
ドレスとなり、スタック2-[2]がポップ動作する(F
8)。
The processing of channel 1 is restarted. At the same time as calling the subroutine SB2, the value of the program counter 7 (address of main routine at return; address of process F9) is pushed onto the stack 2- [1] (F6).
The processing of subroutine SB2 is performed (F7). When the processing of the subroutine SB2 is completed, the value CH stored in the channel register 5 is incremented by 1 to 2 (F1
3), the RET instruction is executed, and the stack 2-
The top value of [2] becomes the program address of the next machine cycle, and stack 2- [2] pops (F
8).

【0042】以下、同様にして、ループ処理F6−F7
−F13−F8を繰り返し、全てのチャネルについてサ
ブルーチンSA2又はSB2の処理を行なう。
Thereafter, in the same manner, loop processing F6-F7 is performed.
-F13-F8 are repeated to perform the processing of subroutine SA2 or SB2 for all channels.

【0043】チャネル(N−1)のサブルーチンSA2
又はSB2の処理が終了すると、チャネルパラメータC
Hを再び0とする(F13)。その後のRET命令によ
り、スタック2-[0]のトップの値が次のマシンサイクル
のプログラムアドレスとなり、スタック2-[0]がポップ
動作する(F8)。このときのスタック2-[0]の格納値
は処理F9のアドレスになっており、一連のプログラム
は終了する(F9)。
Channel (N-1) subroutine SA2
Or, when the processing of SB2 ends, the channel parameter C
H is set to 0 again (F13). By the subsequent RET instruction, the top value of stack 2- [0] becomes the program address of the next machine cycle, and stack 2- [0] performs a pop operation (F8). The stored value of the stack 2- [0] at this time is the address of the process F9, and the series of programs ends (F9).

【0044】図5に示す多チャネル処理マイクロプログ
ラムにおいて、チャネル切替えによって1チャネル用の
処理(図3参照)より増加する処理は、処理F10及び
F13である。チャネルが切り替えられる毎にこれら処
理F10及びF13の一方が1回生じるので、処理F1
0及びF13がそれぞれ1ステップであったとすると、
図5に示す多チャネル処理を実行することによって図3
の処理を実行するより増加する処理ステップ数は、すな
わちチャネル切り替えに伴って増加する処理ステップ数
は(チャネル数×2)ステップである。
In the multi-channel processing microprogram shown in FIG. 5, the processing that increases more than the processing for one channel (see FIG. 3) due to channel switching is processing F10 and F13. One of these processes F10 and F13 occurs once every time the channel is switched, so the process F1
If 0 and F13 are each one step,
By performing the multi-channel processing shown in FIG.
The number of processing steps that is greater than that of performing the processing of (1), that is, the number of processing steps that increases with channel switching is (the number of channels × 2) steps.

【0045】また、図5に示す多チャネル処理におい
て、マイクロプログラム格納用ROM9の必要容量の増
加は、チャネル切替えを行なう処理1つにつきチャネル
パラメータCHをインクリメントする命令の1ワードの
みであり、プログラム全体では4ワード(各ワードは、
フラグ0に係るF10、フラグ1に係るF10、フラグ
0に係るF13及びフラグ1に係るF13に関する)で
ある。
In the multi-channel processing shown in FIG. 5, the required capacity of the ROM 9 for storing the micro program is increased by only one word of the instruction for incrementing the channel parameter CH for each processing for switching the channel, and the entire program. 4 words (each word is
F10 related to flag 0, F10 related to flag 1, F13 related to flag 0, and F13 related to flag 1).

【0046】この多チャネル処理において、1チャネル
分のプログラムからの変更点は、チャネルの切り替えを
行なうサブルーチンのRET命令の前にチャネルパラメ
ータCHをインクリメントする命令を挿入している点で
ある。
In this multi-channel processing, the change from the program for one channel is that an instruction to increment the channel parameter CH is inserted before the RET instruction of the subroutine for switching channels.

【0047】以上のように、第1実施例は、チャネル毎
にスタック2-[CH] を設けたことに特徴を有し、図6に
示すマイクロプログラムは一例であってこれに限定され
ず、マイクロプログラム格納用ROM9に他の多チャネ
ル処理マイクロプログラムが格納されていても良く、そ
のマイクロプログラムがチャネルを切替えたい処理をサ
ブルーチンで記述し、RET命令の前にチャネルパラメ
ータCHをインクリメントする命令を挿入していれば良
い。
As described above, the first embodiment is characterized in that the stack 2- [CH] is provided for each channel, and the microprogram shown in FIG. 6 is an example, and the present invention is not limited to this. Other multi-channel processing micro programs may be stored in the micro program storing ROM 9, and the micro program describes the processing for switching channels by a subroutine and inserts an instruction to increment the channel parameter CH before the RET instruction. All you have to do is do it.

【0048】マイクロプログラム格納用ROM9に格納
されるマイクロプログラムについて、若干の説明を加え
ると以下の通りである。
The microprogram stored in the microprogram storing ROM 9 will be described below with some additional explanation.

【0049】図5に示すマイクロプログラムでは条件分
岐が1か所であるが、条件分岐がさらに多くなるなどプ
ログラムの構成が複雑になったり、演算結果など保持さ
れない条件により分岐しても、チャネル切替えによる処
理ステップ数とプログラム格納用ROMの容量の増加は
なく、1チャネルを処理するプログラムを多チャネルを
処理するプログラムに容易に交換できる。
In the microprogram shown in FIG. 5, there is one conditional branch. However, even if the program configuration becomes complicated due to more conditional branches, or the branch is performed due to a condition such as an operation result not being held, channel switching is performed. There is no increase in the number of processing steps and the capacity of the program storing ROM due to, and a program for processing one channel can be easily replaced with a program for processing multiple channels.

【0050】図5に示す例ではメインルーチンより呼び
出したサブルーチンでチャネルを切り替えているが、サ
ブルーチンからさらに呼び出したサブルーチンでチャネ
ルの切り替えを行なっても良い。
In the example shown in FIG. 5, the channel is switched by the subroutine called from the main routine, but the channel may be switched by the subroutine further called from the subroutine.

【0051】図5に示す例では、チャネルパラメータC
Hの初期値を0として1ずつインクリメントするように
したが、チャネルパラメータCHの初期値とチャネルパ
ラメータCHをどのように切り替えていくかは自由であ
る。
In the example shown in FIG. 5, the channel parameter C
Although the initial value of H is set to 0 and incremented by 1, the initial value of the channel parameter CH and the channel parameter CH can be switched freely.

【0052】図5に示す例ではRET命令によりスタッ
ク2-[CH] はポップ動作するが、スタックが1レベルで
ある場合やスタックのトップ以外のデータが空である場
合はポップ動作しないようにしても良い。このようにし
た場合において、ある条件ではチャネルパラメータCH
を切り替える度に同じサブルーチンを処理するように構
成したり、スタックのトップにサブルーチンの先頭アド
レスをプッシュするようにプログラムを構成したりする
ことにより、チャネル切り替えを行なう毎に同じサブル
ーチンの処理を繰り返すようにすることが可能であり、
処理ステップ数を削減できる。
In the example shown in FIG. 5, the stack 2- [CH] is pop-operated by the RET instruction, but when the stack is one level or data other than the top of the stack is empty, the pop-operation is not performed. Is also good. In such a case, under certain conditions, the channel parameter CH
Each time the channel is switched, the same subroutine processing is repeated every time the channel is switched, or the program is configured to push the start address of the subroutine to the top of the stack so that the processing of the same subroutine is repeated. It is possible to
The number of processing steps can be reduced.

【0053】従って、上記第1実施例によれば、チャネ
ル毎にスタック2-[CH] を設けたので、チャネルを切替
えたい処理をサブルーチンで記述し、RET命令の前に
チャネルレジスタの格納値CHをインクリメントする命
令を挿入するだけて多チャネル処理が可能となり、チャ
ネル切替えに伴う処理能力の低下や、マイクロプログラ
ム格納用ROM9の容量増加を抑制できると共に、マイ
クロプログラムの品質向上を期待できる。
Therefore, according to the first embodiment, since the stack 2- [CH] is provided for each channel, the process for switching the channel is described by a subroutine, and the stored value CH of the channel register is stored before the RET instruction. It becomes possible to perform multi-channel processing simply by inserting an instruction for incrementing, and it is possible to suppress a decrease in processing capacity due to channel switching and an increase in the capacity of the ROM 9 for storing microprograms, and it is possible to expect an improvement in quality of microprograms.

【0054】(B)第2実施例 次に、本発明による多チャネル処理マイクロプログラム
制御回路の第2実施例を図面を参照しながら詳述する。
ここで、図7が、この第2実施例のマイクロプログラム
制御回路の構成を示すものであり、上述した図1との同
一、対応部分には同一符号を付して示している。
(B) Second Embodiment Next, a second embodiment of the multi-channel processing microprogram control circuit according to the present invention will be described in detail with reference to the drawings.
Here, FIG. 7 shows the configuration of the microprogram control circuit of the second embodiment, and the same or corresponding portions as those in FIG. 1 described above are designated by the same reference numerals.

【0055】第2実施例のマイクロプログラム制御回路
は、チャネルパラメータCHを1インクリメントする動
作とRET命令時の動作とを1マシンサイクルで行なう
NEXT命令なるものを設けたものである。すなわち、
第2実施例における加算器4は、NEXT命令時にチャ
ネルレジスタ5に1インクリメントした値(CH+1)
を出力して次に処理するチャネルを指示するものであ
り、第2実施例の出力スタック選択手段3は、加算器4
の値を入力してスタック2-[CH+1] のトップを選択して
アドレス選択手段6に出力するものである。この第2実
施例の各スタック2-[CH+1] は、NEXT命令時にポッ
プ動作するものである。
The microprogram control circuit of the second embodiment is provided with a NEXT instruction for performing the operation of incrementing the channel parameter CH by 1 and the operation of the RET instruction in one machine cycle. That is,
The adder 4 in the second embodiment has a value (CH + 1) obtained by incrementing the channel register 5 by 1 at the time of the NEXT instruction.
To indicate the channel to be processed next, and the output stack selection means 3 of the second embodiment uses the adder 4
Is input and the top of the stack 2- [CH + 1] is selected and output to the address selecting means 6. Each stack 2- [CH + 1] of the second embodiment is pop-operated at the time of the NEXT instruction.

【0056】なお、加算器4はNEXT命令時にチャネ
ルパラメータCHとして(N−1)を入力するとチャネ
ルパラメータCHとして0を出力するものである。ま
た、加算器4はRET命令時は入力チャネルパラメータ
CHをそのまま出力するので、RET命令も使用可能で
ある。
The adder 4 outputs 0 as the channel parameter CH when (N-1) is input as the channel parameter CH at the time of the NEXT instruction. Further, since the adder 4 outputs the input channel parameter CH as it is at the time of the RET instruction, the RET instruction can also be used.

【0057】次に、この第2実施例の多チャネル処理マ
イクロプログラム制御回路の動作を、図示しないプロセ
ッサの動作と対応させながら説明する。
Next, the operation of the multi-channel processing microprogram control circuit of the second embodiment will be described in correspondence with the operation of a processor (not shown).

【0058】ここでも、1チャネル分の処理だけを考慮
したマイクロプログラムが、上述した図3に示すもので
あったとして説明する。第2実施例の多チャネル処理マ
イクロプログラム制御回路のハードウェア構成を考慮す
ると、図3に示す1チャネル分の処理をNチャネルで処
理するようにしたマイクロプログラム、従って、マイク
ロプログラム格納用ROM9に格納されたマイクロプロ
グラムは、例えば、図8に示すようなものが好適であ
る。図9は、この図8に示すマイクロプログラムが実行
されたときの処理の流れを示すフローチャートである。
Here again, it is assumed that the microprogram considering only the processing for one channel is the one shown in FIG. 3 described above. Considering the hardware configuration of the multi-channel processing micro program control circuit of the second embodiment, a micro program in which the processing for one channel shown in FIG. 3 is processed by N channels, and therefore stored in the ROM 9 for storing the micro program. As the generated microprogram, for example, the one shown in FIG. 8 is suitable. FIG. 9 is a flow chart showing the flow of processing when the microprogram shown in FIG. 8 is executed.

【0059】以下、フラグ[0] が1、フラグ[1] が0で
あったとして、図7を参照しながら、図8のマイクロプ
ログラムの実行によって、図9のフローチャートに示す
ようになる処理の流れを説明する。
Hereinafter, assuming that the flag [0] is 1 and the flag [1] is 0, the process shown in the flowchart of FIG. 9 is executed by executing the microprogram of FIG. 8 with reference to FIG. 7. Explain the flow.

【0060】最初に、全チャネルのスタック2-[0]〜2
-[N-1]のトップに、プログラムの開始アドレス(図8の
処理F2のアドレス)を入力しておき、チャネルパラメ
ータCHを0にして処理を開始する(F1)。
First, stacks 2- [0] to 2 of all channels
-At the top of [N-1], the start address of the program (address of the process F2 in FIG. 8) is input, the channel parameter CH is set to 0, and the process is started (F1).

【0061】これにより、チャネル0の処理を開始す
る。フラグ[0] による条件分岐を行なう(F2)。フラ
グ[0] は1なので、サブルーチンSA1を呼び出すとと
もにスタック2-[0]にプログラムカウンタ7の値(NE
XT命令によるリターン時のメインルーチンのアドレ
ス;フラグ=1に係る処理F6のアドレス)をプッシュ
する(F3)。サブルーチンSA1の処理を行なう(F
4)。サブルーチンSA1の処理が終了すると、NEX
T命令により、チャネルパラメータCHが1インクリメ
ントされて1となり、スタック2-[1]のトップの値が次
のマシンサイクルのプログラムアドレスとなり、スタッ
ク2-[1]がポップ動作する(F15)。
As a result, channel 0 processing is started. A conditional branch is performed according to the flag [0] (F2). Since the flag [0] is 1, the subroutine SA1 is called and the value of the program counter 7 (NE
The address of the main routine at the time of return by the XT instruction; the address of the process F6 related to flag = 1) is pushed (F3). Perform processing of subroutine SA1 (F
4). When the processing of the subroutine SA1 is completed, NEX
By the T instruction, the channel parameter CH is incremented by 1 and becomes 1, the top value of the stack 2- [1] becomes the program address of the next machine cycle, and the stack 2- [1] performs the pop operation (F15).

【0062】チャネル1の処理を開始する。フラグ[1]
による条件分岐を行なう(F2)。フラグ[1] は0なの
で、サブルーチンSB1を呼び出すとともにスタック2
-[1]にプログラムカウンタ7の値(NEXT命令による
リターン時のメインルーチンのアドレス;フラグ=0に
係る処理F6のアドレス)をプッシュする(F3)。サ
ブルーチンSB1の処理を行なう(F4)。サブルーチ
ンSB1の処理が終了すると、NEXT命令により、チ
ャネルパラメータCHが1インクリメントされて2とな
り、スタック2-[2]のトップの値が次のマシンサイクル
のプログラムアドレスとなり、スタック2-[2]がポップ
動作する(F15)。
The processing of channel 1 is started. Flag [1]
A conditional branch is performed (F2). Since flag [1] is 0, call subroutine SB1 and stack 2
-The value of the program counter 7 (the address of the main routine at the time of return by the NEXT instruction; the address of the process F6 related to flag = 0) is pushed to [1] (F3). The processing of the subroutine SB1 is performed (F4). When the processing of the subroutine SB1 is completed, the channel parameter CH is incremented by 1 to 2 by the NEXT instruction, the top value of the stack 2- [2] becomes the program address of the next machine cycle, and the stack 2- [2] becomes The pop operation is performed (F15).

【0063】以下、同様にして、ループ処理F2−F3
−F4−F15を繰り返して全てのチャネルについてサ
ブルーチンSA1又はSB1の処理を行なう。
Thereafter, the loop processing F2-F3 is similarly performed.
-F4-F15 are repeated to perform the processing of subroutine SA1 or SB1 for all channels.

【0064】チャネル(N−1)のサブルーチンSA1
又はSB1の処理が終了すると、NEXT命令により、
チャネルパラメータCHが再び0となり、スタック2-
[0]のトップの値が次のマシンサイクルのプログラムア
ドレスとなり、スタック2-[0]がポップ動作する(F1
5)。
Channel (N-1) subroutine SA1
Or, when the processing of SB1 is completed,
Channel parameter CH becomes 0 again and stack 2-
The top value of [0] becomes the program address of the next machine cycle, and the stack 2- [0] pops (F1
5).

【0065】これにより、チャネル0の処理を再開す
る。サブルーチンSA2を呼び出すとともにスタック2
-[0]にプログラムカウンタ7の値(NEXT命令による
リターン時のメインルーチンのアドレス;処理F9のア
ドレス)をプッシュする(F6)。サブルーチンSA2
の処理を行なう(F7)。サブルーチンSA2の処理が
終了すると、NEXT命令により、チャネルパラメータ
CHが1インクリメントされて1となり、スタック2-
[1]のトップの値が次のマシンサイクルのプログラムア
ドレスとなり、スタック2-[1]がポップ動作する(F1
6)。
As a result, the processing of channel 0 is restarted. Call subroutine SA2 and stack 2
-The value of the program counter 7 (the address of the main routine at the time of return by the NEXT instruction; the address of the process F9) is pushed to [0] (F6). Subroutine SA2
Is performed (F7). When the processing of the subroutine SA2 is completed, the channel parameter CH is incremented by 1 to 1 by the NEXT instruction, and the stack 2-
The top value of [1] becomes the program address of the next machine cycle, and stack 2- [1] pops (F1
6).

【0066】これによりチャネル1の処理を再開する。
サブルーチンSB2を呼び出すとともにスタック2-[1]
にプログラムカウンタ7の値(NEXT命令によるリタ
ーン時のメインルーチンのアドレス;処理F9のアドレ
ス)をプッシュする(F6)。サブルーチンSB2の処
理を行なう(F7)。サブルーチンSB2の処理が終了
すると、NEXT命令により、チャネルパラメータCH
が1インクリメントされて2となり、スタック2-[2]の
トップの値が次のマシンサイクルのプログラムアドレス
となり、スタック2-[2]がポップ動作する(F16)。
As a result, the processing of channel 1 is restarted.
Call subroutine SB2 and stack 2- [1]
The value of the program counter 7 (the address of the main routine at the time of returning by the NEXT instruction; the address of the process F9) is pushed to (F6). The processing of subroutine SB2 is performed (F7). When the processing of the subroutine SB2 is completed, the channel parameter CH is issued by the NEXT instruction.
Is incremented by 1 to become 2, the value at the top of stack 2- [2] becomes the program address of the next machine cycle, and stack 2- [2] performs a pop operation (F16).

【0067】以下、同様にしてループ処理F6−F7−
F16を繰り返し、全てのチャネルについてのサブルー
チンSA2又はSB2の処理を行なう。
In the same manner, loop processing F6-F7-
F16 is repeated to perform the processing of subroutine SA2 or SB2 for all channels.

【0068】チャネル(N−1)のサブルーチンSA2
又はSB2の処理が終了すると、NEXT命令により、
チャネルパラメータCHが再び0となり、スタック2-
[0]のトップが次のマシンサイクルのプログラムアドレ
スとなり、スタック2-[0]がポップ動作する(F1
6)。これにより一連のプログラムは終了する(F
9)。
Channel (N-1) subroutine SA2
Or, when the processing of SB2 is completed,
Channel parameter CH becomes 0 again and stack 2-
The top of [0] becomes the program address of the next machine cycle, and stack 2- [0] pops (F1
6). This ends the series of programs (F
9).

【0069】この図8に示す多チャネル処理において
は、1チャネル処理に比較して、チャネル切り替えによ
る処理ステップの増加はない(図3参照)。また、この
図8に示すの多チャネル処理においてプログラム格納用
ROM9の容量の増加はない(図3参照)。
In the multi-channel processing shown in FIG. 8, there is no increase in processing steps due to channel switching as compared with the one-channel processing (see FIG. 3). Further, in the multi-channel processing shown in FIG. 8, the capacity of the program storage ROM 9 does not increase (see FIG. 3).

【0070】この多チャネル処理において1チャネル分
のプログラムからの変更点は、チャネルの切り替えを行
なうサブルーチンのRET命令をNEXT命令に書き替
えるだけで良い。
In this multi-channel processing, the only change from the program for one channel is to rewrite the RET instruction of the subroutine for switching channels to the NEXT instruction.

【0071】以上のように、この第2実施例によれば、
チャネル毎にスタック2-[CH] を設け、チャネルパラメ
ータCHをインクリメントする動作と、スタック2-[CH
+1]のトップを次のマシンサイクルのプログラムアドレ
スとする動作と、スタック2-[CH+1] のポップ動作とを
1マシンサイクルで行なうNEXT命令なるものを導入
したので、1チャネルを処理するプログラムから多チャ
ネルを処理するプログラムへの変更は、チャネルを切替
えたい処理をサブルーチンで記述しておいてRET命令
をNEXT命令に置き換えるだけで良く、第1実施例に
比べ、さらにチャネル切り替えによる処理能力の低下と
プログラム格納用ROMの容量増加とを抑制でき、ま
た、プログラムの品質向上を期待できる。
As described above, according to the second embodiment,
Stack 2- [CH] is provided for each channel, and the operation to increment the channel parameter CH and stack 2- [CH
Since the NEXT instruction which performs the operation of setting the top of [+1] as the program address of the next machine cycle and the pop operation of stack 2- [CH + 1] in one machine cycle is introduced, one channel is processed. To change from a program to a program for processing multiple channels, it is sufficient to describe the processing for switching channels in a subroutine and replace the RET instruction with a NEXT instruction. Compared with the first embodiment, the processing capability by channel switching is further increased. Can be suppressed and the capacity of the ROM for storing the program can be suppressed, and the quality of the program can be improved.

【0072】なお、NEXT命令を実現するためにハー
ドウェアの機能追加が必要となっている。
It is necessary to add a hardware function in order to realize the NEXT instruction.

【0073】(C)第3実施例 次に、本発明による多チャネル処理マイクロプログラム
制御回路の第3実施例を図面を参照しながら詳述する。
ここで、図10が、この第3実施例のマイクロプログラ
ム制御回路の構成を示すものであり、上述した図1との
同一、対応部分には同一符号を付して示している。
(C) Third Embodiment Next, a third embodiment of the multi-channel processing microprogram control circuit according to the present invention will be described in detail with reference to the drawings.
Here, FIG. 10 shows the configuration of the microprogram control circuit of the third embodiment, and the same or corresponding portions as those in FIG. 1 described above are designated by the same reference numerals.

【0074】この第3実施例のマイクロプログラム制御
回路が、第1実施例のマイクロプログラム制御回路と異
なる点を中心に説明する。
The difference between the microprogram control circuit of the third embodiment and the microprogram control circuit of the first embodiment will be mainly described.

【0075】第3実施例のマイクロプログラム制御回路
は、プログラムカウンタ7の値を退避させるLIFO構
造のスタックとして、各チャネルに共通なスタック領域
(以下、共通スタックと呼ぶ)2と、各チャネル毎のス
タック領域(以下、スタックトップと呼ぶ)12-[CH]
とを有する。各チャネルのスタックトップ12-[CH]
は、トップレベルのアドレスを格納するものであり、そ
れ以外のレベルのアドレスは、共通スタック2に格納さ
れる。このようなレベルに応じたスタック領域の切替え
が可能になるように、処理するチャネルに応じてスタッ
クトップ12-[CH] のみを切り替えるスタック領域切替
手段13を設けている。
The microprogram control circuit of the third embodiment has a stack area (hereinafter referred to as a common stack) 2 common to each channel and a stack for each channel as a stack having a LIFO structure for saving the value of the program counter 7. Stack area (hereinafter called stack top) 12- [CH]
Have and. Stack top of each channel 12- [CH]
Stores the top level address, and the other level addresses are stored in the common stack 2. In order to enable switching of the stack area according to such a level, the stack area switching means 13 for switching only the stack top 12- [CH] according to the channel to be processed is provided.

【0076】従って、この第3実施例のマイクロプログ
ラム制御回路を適用する場合には、同一チャネルに係る
一連の処理中において、サブルーチンからさらにサブル
ーチンを呼び出すようなマイクロプログラムに容易に対
応できる。また、メインルーチンから呼び出したサブル
ーチンでのみチャネルを切り替えるようにプログラムを
構成すれば、保持する必要があるプログラムアドレスを
スタックトップ12-[CH] のみに格納してチャネルを切
り替えることが可能である。
Therefore, when the microprogram control circuit according to the third embodiment is applied, it is possible to easily deal with a microprogram in which a subroutine is further called during a series of processes related to the same channel. Also, if the program is configured so that the channel is switched only by the subroutine called from the main routine, it is possible to store the program address that needs to be held only in the stack top 12- [CH] and switch the channel.

【0077】なお、1チャネル分の処理だけを考慮した
マイクロプログラムが、上述した図3に示すものであっ
た場合には、第3実施例の多チャネル処理マイクロプロ
グラム制御回路を考慮した多チャネル処理用マイクロプ
ログラムは、例えば、第1実施例と同様に、図5に示す
ようなものとなり、それを実行した際の処理の流れも図
6に示すようになる。
When the microprogram considering only the processing for one channel is the one shown in FIG. 3 described above, the multichannel processing considering the multichannel processing microprogram control circuit of the third embodiment. The micro program for use is, for example, as shown in FIG. 5, as in the first embodiment, and the flow of processing when executing the micro program is also as shown in FIG.

【0078】以上のように、第3実施例によれば、プロ
グラムカウンタ7の値を退避させるスタックとして、各
チャネルに共通な共通スタック2と、各チャネル毎のス
タックトップ12-[CH] とを有するようにしたので、第
1実施例に比べさらにハードウェア量を少なくすること
ができる。すなわち、1チャネル分の処理だけを考慮し
たマイクロプログラムが、サブルーチンの入れ子構造の
場合を考慮すると、第1実施例における各チャネル毎の
スタック2-[CH] を2レベル以上にしなければならず、
それが3レベル以上であれば、第3実施例の方が構成が
簡単になる。
As described above, according to the third embodiment, as the stack for saving the value of the program counter 7, the common stack 2 common to each channel and the stack top 12- [CH] for each channel are provided. Since this is provided, the amount of hardware can be further reduced compared to the first embodiment. That is, considering that the microprogram considering only the processing for one channel has a nested structure of subroutines, the stack 2- [CH] for each channel in the first embodiment must be set to two levels or more,
If the number of levels is 3 or more, the configuration of the third embodiment is simpler.

【0079】(D)他の実施例 上記第3実施例は、第1実施例の一部を変更したもので
あったが、この第3実施例の特徴を第2実施例に適用す
るようにしても良い。すなわち、第2実施例の各チャネ
ル毎のスタック2-[CH] 部分を、共通スタック2と、各
チャネル毎のスタックトップ12-[CH] と、スタック領
域切替手段13とで置き換えるようにしても良い。
(D) Other Embodiments The third embodiment described above is a modification of the first embodiment, but the characteristics of the third embodiment are applied to the second embodiment. May be. That is, the stack 2- [CH] portion for each channel in the second embodiment may be replaced with the common stack 2, the stack top 12- [CH] for each channel, and the stack area switching means 13. good.

【0080】上記第1及び第2実施例においては、全て
のレベルのアドレスをチャネル毎のスタック2-[CH] に
格納するものを、また、上記第3実施例においては、ト
ップレベルのアドレスをチャネル毎のスタック12-[C
H] に格納するものを示したが、スタックの任意の領域
をチャネル毎に設けてチャネルに応じて切り替え、残り
のスタック領域を全チャネルで共有するようにして良
い。但し、保持する必要があるプログラムアドレスを全
チャネルで共有するスタック領域に格納してチャネルを
切り替えるとこの値が失われる可能性がある。そこで、
保持しておく必要があるプログラムアドレスはチャネル
毎に設けたスタック領域に格納してチャネルを切り替え
るようプログラムを構成するなどして必要なプログラム
アドレスが失われないようにしなければならない。
In the first and second embodiments, addresses of all levels are stored in the stack 2- [CH] for each channel, and in the third embodiment, top level addresses are stored. Stack for each channel 12- [C
However, it is also possible to provide an arbitrary area of the stack for each channel and switch the area according to the channel so that the remaining stack area is shared by all the channels. However, if the program address that needs to be stored is stored in the stack area shared by all channels and the channel is switched, this value may be lost. Therefore,
The program address that needs to be retained must be stored in a stack area provided for each channel and the program must be configured so as to switch the channel so that the necessary program address is not lost.

【0081】[0081]

【発明の効果】以上のように、本発明の多チャネル処理
マイクロプログラム制御回路によれば、プログラムアド
レスを退避させるスタックとしてチャネル毎のスタック
を用意し、チャネル指示値を適宜変更するチャネルレジ
スタの値に従ってスタック選択手段がチャネル毎のスタ
ックを選択してプッシュ動作やポップ動作させるように
したので、できるだけ簡単なハードウェア構成によっ
て、しかも1チャネル用のマイクロプログラムとできる
だけ近似したステップ数が少ない同一のマイクロプログ
ラムによって多チャネル処理を行なうことができる。
As described above, according to the multi-channel processing microprogram control circuit of the present invention, a stack for each channel is prepared as a stack for saving the program address, and the value of the channel register for appropriately changing the channel indication value is set. According to the above, the stack selecting means selects the stack for each channel to perform the push operation or the pop operation. Therefore, the same micro program with a simple hardware configuration and a few steps as close as possible to the micro program for one channel is used. Multi-channel processing can be performed by a program.

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

【図1】第1実施例のブロック図である。FIG. 1 is a block diagram of a first embodiment.

【図2】従来例のブロック図である。FIG. 2 is a block diagram of a conventional example.

【図3】1チャネル分の処理フローチャートである。FIG. 3 is a processing flowchart for one channel.

【図4】従来の多チャネル処理のプログラムのフローチ
ャートである。
FIG. 4 is a flowchart of a conventional multi-channel processing program.

【図5】第1実施例の多チャネル処理のプログラムのフ
ローチャートである。
FIG. 5 is a flowchart of a multi-channel processing program according to the first embodiment.

【図6】図5の実行時の処理の流れを示すフローチャー
トである。
FIG. 6 is a flowchart showing a flow of processing at the time of execution of FIG.

【図7】第2実施例のブロック図である。FIG. 7 is a block diagram of a second embodiment.

【図8】第2実施例の多チャネル処理のプログラムのフ
ローチャートである。
FIG. 8 is a flow chart of a program for multi-channel processing of the second embodiment.

【図9】図8の実行時の処理の流れを示すフローチャー
トである。
9 is a flowchart showing the flow of processing at the time of execution in FIG.

【図10】第3実施例のブロック図である。FIG. 10 is a block diagram of a third embodiment.

【符号の説明】[Explanation of symbols]

1…プッシュスタック選択手段、2…共通スタック領
域、2-[CH] …チャネル毎スタック、3…出力スタック
選択手段、4…チャネルパラメータCHのインクリメン
ト用加算器、5…チャネルレジスタ、6…アドレス選択
手段、7…プログラムカウンタ、8…プログラムアドレ
スの1加算用加算器、9…マイクロプログラム格納用R
OM、10…命令レジスタ、11…デコーダ、12-[C
H] …チャネル毎スタック領域、13…スタック領域切
替手段。
1 ... Push stack selecting means, 2 ... Common stack area, 2- [CH] ... Channel-by-channel stack, 3 ... Output stack selecting means, 4 ... Channel parameter CH increment adder, 5 ... Channel register, 6 ... Address selection Means, 7 ... Program counter, 8 ... Adder for adding 1 of program address, 9 ... R for storing microprogram
OM, 10 ... Instruction register, 11 ... Decoder, 12- [C
H] ... Stack area for each channel, 13 ... Stack area switching means.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭56−79325(JP,A) 特開 昭54−133853(JP,A) 特開 昭60−122450(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 13/12 310 G06F 9/22 - 9/26 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-56-79325 (JP, A) JP-A-54-133853 (JP, A) JP-A-60-122450 (JP, A) (58) Field (Int.Cl. 7 , DB name) G06F 13/12 310 G06F 9/22-9/26

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 1つのチャネルの処理が終了する毎に格
納値が変更されるチャネルレジスタを有し、このチャネ
ルレジスタの値に従ってチャネルを切り替えながら同一
のマイクロプログラムにより多チャネル処理を行なうプ
ロセッサにおいて、 プログラムカウンタによるプログラムアドレスを退避さ
せるスタックとしてチャネル毎のスタックを設けると共
に、 上記チャネルレジスタの値に応じたチャネルの上記スタ
ックを選択して、プログラムアドレスをプッシュ又はポ
ップさせるスタック選択手段を設け、 チャネルを切り替える毎に切り替えるチャネルのスタッ
クのトップからプログラムアドレスを与える動作を繰り
返して多チャネル処理を実行することを特徴とした多チ
ャネル処理マイクロプログラム制御回路。
1. A processor having a channel register whose stored value is changed each time the processing of one channel is completed, and performing multi-channel processing by the same microprogram while switching channels according to the value of this channel register, A stack for each channel is provided as a stack for saving the program address by the program counter, and a stack selecting means for selecting the above stack of the channel according to the value of the above channel register and pushing or popping the program address is provided. A multi-channel processing microprogram control circuit characterized in that multi-channel processing is executed by repeating an operation of giving a program address from the top of a stack of channels to be switched each time switching is performed.
【請求項2】 上記チャネルレジスタは、その格納値が
1インクリメント用の加算器によって更新されるもので
あり、上記スタック選択手段は、上記チャネルレジスタ
からの出力値に従ってプッシュ動作させる上記スタック
を選択すると共に、上記チャネルレジスタに与える上記
加算器の出力値に従ってポップ動作させる上記スタック
を選択し、 チャネルを切り替える動作と切り替えるチャネルのスタ
ックのトップからプログラムアドレスを与えるポップ動
作とを1マシンサイクルで行なうことを特徴とする請求
項1に記載の多チャネル処理マイクロプログラム制御回
路。
2. A storage value of the channel register is updated by an adder for incrementing by 1, and the stack selecting means selects the stack to be pushed according to an output value from the channel register. At the same time, the stack to be pop-operated according to the output value of the adder given to the channel register is selected, and the operation of switching the channel and the pop-operation of giving the program address from the top of the stack of the channel to be switched are performed in one machine cycle. A multi-channel processing microprogram control circuit as claimed in claim 1, characterized in that:
【請求項3】 チャネル毎のスタックに代えて、チャネ
ル毎の個別スタック領域と全チャネルに共通の共通スタ
ック領域とを設け、個別スタック領域は処理するチャネ
ルに応じて上記スタック選択手段が切り替え、共通スタ
ック領域は全チャネルに共有するように上記スタック選
択手段が使用することを特徴とする請求項1又は2に記
載の多チャネル処理マイクロプログラム制御回路。
3. An individual stack area for each channel and a common stack area common to all channels are provided in place of the stack for each channel, and the individual stack area is switched by the stack selection means in accordance with the channel to be processed and is common. 3. The multi-channel processing microprogram control circuit according to claim 1, wherein the stack selection means is used so that the stack area is shared by all channels.
JP17146594A 1994-07-22 1994-07-22 Multi-channel processing microprogram control circuit Expired - Fee Related JP3464048B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17146594A JP3464048B2 (en) 1994-07-22 1994-07-22 Multi-channel processing microprogram control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17146594A JP3464048B2 (en) 1994-07-22 1994-07-22 Multi-channel processing microprogram control circuit

Publications (2)

Publication Number Publication Date
JPH0836540A JPH0836540A (en) 1996-02-06
JP3464048B2 true JP3464048B2 (en) 2003-11-05

Family

ID=15923615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17146594A Expired - Fee Related JP3464048B2 (en) 1994-07-22 1994-07-22 Multi-channel processing microprogram control circuit

Country Status (1)

Country Link
JP (1) JP3464048B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130153641A1 (en) 2008-02-15 2013-06-20 Ethicon Endo-Surgery, Inc. Releasable layer of material and surgical end effector having the same

Also Published As

Publication number Publication date
JPH0836540A (en) 1996-02-06

Similar Documents

Publication Publication Date Title
US7080239B2 (en) Loop control circuit and loop control method
JP3464048B2 (en) Multi-channel processing microprogram control circuit
US5142489A (en) Digital signal processor with improved pipeline processing
US6205539B1 (en) Method for manipulating a stack pointer with post increment/decrement operation
US5566338A (en) Interrupt control method and interrupt control circuit in a processor
US6345353B2 (en) Stack pointer with post increment/decrement allowing selection from parallel read/write address outputs
JP2003058381A (en) Processor realizing exception processing setting by program
US7240082B2 (en) Method for processing efficiency in a pipeline architecture
JP2008537248A (en) Perform multitasking on a digital signal processor
US6266764B1 (en) Program controller for switching between first program and second program
JP4184034B2 (en) How to execute processing functions
JP3454393B2 (en) Data processing device
JPH01271840A (en) Microcomputer
KR100329780B1 (en) Interrupt processing apparatus reducing interrupt response time
JP2000010779A (en) Digital signal processor
JPS6116334A (en) Data processor
KR100328813B1 (en) Digital data processing apparatus with two bank stack
JP2002297378A (en) Signal processor
JPS638492B2 (en)
JPS63141131A (en) Pipeline control system
EP0401745A2 (en) Data processor for high-speed access to stack area data
JP2008015792A (en) Rom patch processing method and rom patch device
JPH04317129A (en) Micro program address stack circuit
JPH05134866A (en) Microprogram control system
JPH10232772A (en) Program changing device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070822

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080822

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees