JP2506591B2 - Auxiliary processor - Google Patents

Auxiliary processor

Info

Publication number
JP2506591B2
JP2506591B2 JP24191791A JP24191791A JP2506591B2 JP 2506591 B2 JP2506591 B2 JP 2506591B2 JP 24191791 A JP24191791 A JP 24191791A JP 24191791 A JP24191791 A JP 24191791A JP 2506591 B2 JP2506591 B2 JP 2506591B2
Authority
JP
Japan
Prior art keywords
command
stack
storage means
value
stored
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 - Lifetime
Application number
JP24191791A
Other languages
Japanese (ja)
Other versions
JPH0581018A (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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP24191791A priority Critical patent/JP2506591B2/en
Publication of JPH0581018A publication Critical patent/JPH0581018A/en
Application granted granted Critical
Publication of JP2506591B2 publication Critical patent/JP2506591B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はコンピュータシステムに
おけるホストプロセッサ(以下、CPUと略記する。)
の補助処理装置に関するものである。
The present invention relates to a host processor (hereinafter abbreviated as CPU) in a computer system.
The auxiliary processing device.

【0002】[0002]

【従来の技術】近年、コンピュータの補助処理装置は高
速、高機能化されてきており、CPUと補助処理装置を
組み合わせることで、CPUの負荷を軽減するすること
が可能となっている。
2. Description of the Related Art In recent years, an auxiliary processing device for a computer has been improved in speed and function. By combining a CPU and an auxiliary processing device, the load on the CPU can be reduced.

【0003】補助処理装置の実行状態として、2種類あ
る。第1は、CPUが補助処理装置のコマンドを順次、
補助処理装置へ転送する、あるいは、あらかじめ用意さ
れたコマンド列をDMAコントローラ(以下、DMAC
と略記する。)が連続して補助処理装置へ転送すると言
うもの、即ちCPUやDMACがバスマスタとなり、補
助処理装置がスレーブとなってコマンド転送を行ない、
補助処理装置がそのコマンドを解釈し実行する実行状態
である(以下、スレーブモード実行状態と称する。)。
第2は、補助処理装置自身が、CPUと同様にメモリに
用意された自分のコマンドを順次フェッチし、実行する
と言うものである(以下、マスタモード実行状態と称す
る。)。このマスタモード実行状態では、CPUは補助
処理装置のコマンド列をメモリに用意した後に、補助処
理装置に対して起動をかけるだけでよいことになる。
There are two types of execution states of the auxiliary processing device. First, the CPU sequentially issues commands from the auxiliary processing device,
The command sequence that is transferred to the auxiliary processing device or prepared in advance is referred to as a DMA controller (hereinafter, DMAC).
Abbreviated. ) Continuously transfers to the auxiliary processing device, that is, the CPU or the DMAC becomes the bus master, and the auxiliary processing device becomes the slave to perform command transfer.
This is an execution state in which the auxiliary processing device interprets and executes the command (hereinafter, referred to as slave mode execution state).
Secondly, the auxiliary processing device itself sequentially fetches and executes its own command prepared in the memory similarly to the CPU (hereinafter, referred to as a master mode execution state). In this master mode execution state, the CPU only has to prepare the command sequence of the auxiliary processing device in the memory and then activate the auxiliary processing device.

【0004】一方、補助処理装置としてスレーブモード
およびマスタモードの両方の実行状態を備えるものがあ
る。この場合、実行時に直接実行状態を変更することが
できるものがあり、以下その変更方法を図4を参照して
説明する。
On the other hand, as an auxiliary processing device, there is an auxiliary processing device that has both slave mode and master mode execution states. In this case, there is a case where the execution state can be changed directly at the time of execution, and the changing method will be described below with reference to FIG.

【0005】図4は実行状態を実行時に変更するための
タイムチャートを示している。図4において、41,4
3,47,49で示された部分は、補助処理装置がスレ
ーブモード実行状態であることを示し、42,44,4
5,46,48は、補助処理装置がマスタモード実行状
態であることを示す。また、41,43,47,49
は、プログラムのメインルーチンの実行であり、42,
44,46,48は、メインルーチンから呼び出される
サブルーチンであり、45は、前記サブルーチンから呼
び出されるサブルーチンである。サブルーチンへ分岐す
るコマンドをJSRで、サブルーチンから復帰するコマ
ンドをRETで表している。また、JSRの次の文字列
は、サブルーチンの名前を表している。即ち、43のJ
SRではサブルーチンPb(44)を呼び出し、44で
は、サブルーチンPc(45)を呼び出している。この
ように、実行時にスレーブモード実行状態からサブルー
チンを呼ぶことにより、実行状態が移行することになる
わけである。
FIG. 4 shows a time chart for changing the execution state at the time of execution. In FIG. 4, 41, 4
The parts indicated by 3, 47, and 49 indicate that the auxiliary processing device is in the slave mode execution state.
5, 46 and 48 indicate that the auxiliary processing device is in the master mode execution state. Also, 41, 43, 47, 49
Is the execution of the main routine of the program,
Reference numerals 44, 46, and 48 are subroutines called from the main routine, and 45 is a subroutine called from the subroutine. The command branching to the subroutine is represented by JSR, and the command returning from the subroutine is represented by RET. Further, the character string following JSR represents the name of the subroutine. That is, 43 J
In SR, the subroutine Pb (44) is called, and in 44, the subroutine Pc (45) is called. In this way, by calling a subroutine from the slave mode execution state at the time of execution, the execution state shifts.

【0006】次に、このような実行制御を行なうための
補助処理装置の構成について、図5を参照して説明す
る。図5において、51はマスタモード実行状態にある
時の現在実行中のコマンドの次の語の格納アドレスを保
持するカウンタであり、マスタモード実行状態であれ
ば、自動的に更新されていく。52はカウンタ51で指
示されたメモリに格納されているコマンドが読み出され
格納されるコマンドレジスタである。53はスレーブモ
ード実行状態の時に、処理の対象となるコマンドが格納
されているコマンドレジスタであり、外部から書き込ま
れる。54はセレクタであり、現在の実行状態を示すフ
ラッグ(FLAG)55の値により、コマンドレジスタ
52または53の内容を選択し出力する。即ちセレクタ
54は、FLAG55の値が0の時は、スレーブモード
実行状態を表し、コマンドレジスタ53の内容を出力
し、値が1の時はマスタモード実行状態を表し、コマン
ドレジスタ52の内容を出力する。56は実行制御部で
あり、セレクタ54から供給されたコマンドを解釈し実
行する部分である。
Next, the configuration of the auxiliary processing device for performing such execution control will be described with reference to FIG. In FIG. 5, reference numeral 51 is a counter that holds the storage address of the word next to the command currently being executed when in the master mode execution state, and is automatically updated in the master mode execution state. Reference numeral 52 is a command register in which the command stored in the memory designated by the counter 51 is read and stored. Reference numeral 53 is a command register that stores a command to be processed in the slave mode execution state, and is written from the outside. Reference numeral 54 is a selector that selects and outputs the contents of the command register 52 or 53 according to the value of a flag (FLAG) 55 indicating the current execution state. That is, the selector 54, when the value of FLAG 55 is 0, indicates the slave mode execution state, outputs the contents of the command register 53, and when the value is 1, indicates the master mode execution state, and outputs the contents of the command register 52. To do. An execution control unit 56 interprets and executes the command supplied from the selector 54.

【0007】実行制御部56の内部は、3つのブロック
から構成されている。56aはコマンドの解釈を行なう
と同時にALUによる数値演算、各種レジスタの更新等
を行なう演算実行部、56bはサブルーチン呼び出し、
サブルーチンからの戻りを実行するときのスタックへの
書き込み、読み出しを司るスタック制御部、56cはF
LAG55の値を検査し、実行部へ知らせるフラッグ検
査部である。57はスタックであり、アドレススタック
57aとフラッグのスタック57bとから構成されてい
る。
The inside of the execution control unit 56 is composed of three blocks. Reference numeral 56a is an operation execution unit that interprets commands and at the same time performs numerical operations by the ALU and updates of various registers.
A stack control unit that controls writing to and reading from the stack when executing the return from the subroutine, 56c is F
This is a flag inspection unit that inspects the value of LAG 55 and notifies the execution unit. Reference numeral 57 denotes a stack, which is composed of an address stack 57a and a flag stack 57b.

【0008】以上のような構成の補助処理装置における
実行状態の変更処理を、図6および図7のフローチャー
トを参照して説明する。図6および図7は、それぞれ図
4で説明したJSRとRETのコマンドの処理を説明す
るためのフローチャートである。
The change processing of the execution state in the auxiliary processing apparatus having the above configuration will be described with reference to the flowcharts of FIGS. 6 and 7. 6 and 7 are flowcharts for explaining the processing of the JSR and RET commands described in FIG. 4, respectively.

【0009】まず、図6を用いてJSRコマンドの処理
を説明する。ステップ61では、FLAG55の値がス
タック制御部56bによってフラッグスタック57bに
格納される。ステップ62では、戻りアドレスであるカ
ウンタ51の内容、即ち現在実行中のJSRの次に実行
されるコマンドの先頭アドレスがアドレススタック57
aに格納される。ステップ63では、FLAGの値がフ
ラッグ検査部56cで検査され、FLAG=1ならマス
タモード実行状態であり、ステップ65へ行く。ステッ
プ63の検査でFLAG=0ならスレーブモード実行状
態と言うことでステップ64へ行き、FLAGが1に更
新されてステップ65へ行く。ステップ65では、分岐
先アドレスがカウンタ51へ格納される。以上のように
してJSRコマンドが処理され、JSRコマンド実行後
の実行状態は、必ずマスタモード実行状態となる。
First, the processing of the JSR command will be described with reference to FIG. In step 61, the value of FLAG 55 is stored in the flag stack 57b by the stack control unit 56b. In step 62, the contents of the counter 51, which is the return address, that is, the start address of the command to be executed next to the currently executed JSR is the address stack 57.
It is stored in a. In step 63, the value of FLAG is inspected by the flag inspection unit 56c, and if FLAG = 1, it means that the master mode is being executed, and the routine proceeds to step 65. If FLAG = 0 in the inspection of step 63, it means that the slave mode is in the active state, and therefore the process goes to step 64, FLAG is updated to 1 and the process goes to step 65. In step 65, the branch destination address is stored in the counter 51. The JSR command is processed as described above, and the execution state after execution of the JSR command is always the master mode execution state.

【0010】次に、図7を用いてRETコマンドの処理
を説明する。ステップ71でアドレススタック57aか
ら戻りアドレスが読み出される。ステップ72ではフラ
ッグスタック57bからFLAGの値が読みだされる。
ステップ73ではステップ72で読み出されたFLAG
の値がフラッグ検査部56cで検査され、1であればス
テップ74へ行き、ステップ71で読み出された戻りア
ドレスがカウンタ51へ格納される。ステップ73で値
が0であればステップ75へ行き、FLAG55が0に
更新される。即ち、ステップ75の処理が施された後の
実行状態は、スレーブモード実行状態となる。ステップ
74の処理の後は、実行状態はマスタモード実行状態の
ままである。
Next, the processing of the RET command will be described with reference to FIG. In step 71, the return address is read from the address stack 57a. At step 72, the value of FLAG is read from the flag stack 57b.
In step 73, the FLAG read in step 72
Is checked by the flag checking unit 56c, and if it is 1, the procedure goes to step 74, and the return address read in step 71 is stored in the counter 51. If the value is 0 in step 73, the flow proceeds to step 75, and FLAG 55 is updated to 0. That is, the execution state after the processing of step 75 is the slave mode execution state. After the processing of step 74, the execution state remains the master mode execution state.

【0011】以上のように、JSRコマンドとRETコ
マンドの実行により、実行時に実行モードを変更するこ
とが可能になる。これにより、コンピュータシステムの
システム構成に柔軟性が出ることになる。即ち、補助処
理装置をマスタモード実行状態で動作させることによ
り、ホストプロセッサは、補助処理装置に対して以後コ
マンドを送る必要がなくなり、ホストプロセッサの負荷
を軽減することが可能となる。
As described above, the execution mode can be changed at the time of execution by executing the JSR command and the RET command. This provides flexibility in the system configuration of the computer system. That is, by operating the auxiliary processing device in the master mode execution state, the host processor does not need to send a command to the auxiliary processing device thereafter, and the load on the host processor can be reduced.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、上記の
従来の構成では、FLAGと戻りアドレスの2種類の情
報をスタックに格納しているので、スタック容量を多く
必要とし、更に、メモリアクセス回数が増えるので、高
速処理ができないという課題を有していた。
However, in the above-described conventional configuration, since two types of information, FLAG and return address, are stored in the stack, a large stack capacity is required and the number of memory accesses increases. Therefore, there is a problem that high-speed processing cannot be performed.

【0013】本発明は、上記従来技術の課題を解決する
ものであり、少ないスタック容量で、かつ高速処理が可
能な補助処理装置を提供することを目的とする。
An object of the present invention is to solve the above-mentioned problems of the prior art, and an object thereof is to provide an auxiliary processing device capable of high-speed processing with a small stack capacity.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、外部から書き込まれたコマンドを保持す
る第1の記憶手段と、メモリ内のアドレスを保持し、メ
モリが読み出されると、読み出されたコマンドの次に配
置されたコマンドの先頭アドレスを指示するように戻り
アドレスが自動的に更新される計数手段と、この計数手
段により指示されたコマンドをメモリから読み出して記
憶する第2の記憶手段と、第1の記憶手段と第2の記憶
手段のどちらのコマンドを選択すべきかを決定する選択
情報を保持する第3の記憶手段と、この第3の記憶手段
に記憶された値に対応して、第1の記憶手段と前記第2
の記憶手段のいずれか一方を選択して出力する選択手段
と、計数手段によって指示された戻りアドレスまたは予
め定めた特定の値を格納するスタックと、選択手段から
供給される情報を解釈し、戻りアドレスが不必要なモー
ドのときは前記特定の値をスタックに格納し、戻りアド
レスが必要なモードのときはその戻りアドレスをスタッ
クに格納し、前記特定の値が格納されているか否かを判
断することにより各モードに対応した処理を実行する実
行制御手段とを備えたものである。
In order to achieve the above object, the present invention provides a first storage means for holding a command written from the outside and an address in the memory for reading the memory. A counting unit whose return address is automatically updated so as to indicate a start address of a command arranged next to the read command; and a command which is read by the counting unit and is stored in the memory. The second storage means, the third storage means for holding selection information for deciding which command of the first storage means and the second storage means to be selected, and the third storage means. Corresponding to the value, the first storage means and the second storage means
Selecting means for selecting and outputting any one of the storing means, a stack for storing the return address designated by the counting means or a predetermined specific value, and the information supplied from the selecting means for interpreting and returning. When the mode in which the address is unnecessary, the specific value is stored in the stack, and in the mode in which the return address is required, the return address is stored in the stack, and it is determined whether or not the specific value is stored. By doing so, execution control means for executing processing corresponding to each mode is provided.

【0015】[0015]

【作用】本発明は、上記構成によって、実行制御手段
が、選択手段から供給される情報を解釈し、その情報が
サブルーチンへ分岐するコマンドの時は、第3の記憶手
段の内容が第1の値であれば、計数手段の戻りアドレス
をスタックに格納し、第3の記憶手段の内容が第2の値
であれば、予め定めた特定の値をスタックに格納すると
ともに、第3の記憶手段の内容を第1の値に更新し、こ
れらいずれかの処理の後に、選択手段から供給されたコ
マンドからアドレスを生成し、その値を計数手段に格納
し、また選択手段から供給される情報がサブルーチンか
ら復帰するコマンドの時は、スタックから情報を取り出
し、その情報が予め定めた特定の値であれば、第3の記
憶手段の内容を第2の値に更新し、スタックから取り出
した情報が予め定めた特定の値でなければ、そのアドレ
ス情報を計数手段に格納することにより、第3の記憶手
段内容をスタックに格納する必要がなく、かつ高速に実
行時に実行状態を切り換えることができる。
According to the present invention, when the execution control means interprets the information supplied from the selection means and the information is a command for branching to the subroutine, the contents of the third storage means is the first one. If it is a value, the return address of the counting means is stored in the stack, and if the content of the third storage means is a second value, a predetermined specific value is stored in the stack and the third storage means is stored. Is updated to the first value, and after any of these processes, an address is generated from the command supplied from the selecting means, the value is stored in the counting means, and the information supplied from the selecting means is stored. When the command returns from the subroutine, the information is taken out from the stack, and if the information is a predetermined specific value, the contents of the third storage means are updated to the second value, and the information taken out from the stack is Predetermined If the specific value, by storing the address information in the counting means, it is possible to switch the execution state of the third storage means the contents is not necessary to be stored in the stack, and at run faster.

【0016】[0016]

【実施例】以下、本発明の実施例について、図面を参照
しながら説明する。図1は本発明の一実施例における補
助処理装置のブロック図である。図1において、11は
マスタモード実行状態にある時の現在実行中のコマンド
の次の語の格納アドレスを保持するカウンタ(計数手
段)であり、マスタモード実行状態であれば、自動的に
更新されていく。12はカウンタ11で指示されたメモ
リに格納されているコマンドが読み出され格納されるコ
マンドレジスタ(第1の記憶手段)である。13はスレ
ーブモード実行状態の時に、処理の対象となるコマンド
が格納されているコマンドレジスタ(第2の記憶手段)
であり、外部から書き込まれる。14はセレクタ(選択
手段)であり、現在の実行状態を示すフラッグ(第3の
記憶手段、FLAG)15の値により、コマンドレジス
タ12または13の内容を選択し出力する。即ちセレク
タ14は、FLAG15の値が0の時は、スレーブモー
ド実行状態を表し、コマンドレジスタ13の内容を出力
し、値が1の時はマスタモード実行状態を表し、コマン
ドレジスタ12の内容を出力する。16は実行制御部
(実行制御手段)であり、セレクタ14から供給された
コマンドを解釈し実行する部分である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of an auxiliary processing device according to an embodiment of the present invention. In FIG. 1, reference numeral 11 is a counter (counting means) for holding the storage address of the word next to the command currently being executed when in the master mode execution state, and is automatically updated in the master mode execution state. To go. Reference numeral 12 is a command register (first storage means) in which the command stored in the memory designated by the counter 11 is read and stored. Reference numeral 13 is a command register (second storage means) in which a command to be processed is stored in the slave mode execution state.
And is written from the outside. A selector (selection means) 14 selects and outputs the contents of the command register 12 or 13 according to the value of a flag (third storage means, FLAG) 15 indicating the current execution state. That is, when the value of FLAG 15 is 0, the selector 14 indicates the slave mode execution state, and outputs the contents of the command register 13, and when the value is 1, it indicates the master mode execution state, and the contents of the command register 12 is output. To do. Reference numeral 16 denotes an execution control unit (execution control means) which interprets and executes the command supplied from the selector 14.

【0017】実行制御部16の内部は、3つのブロック
から構成されている。16aはコマンドの解釈を行なう
と同時にALUによる数値演算、各種レジスタの更新等
を行なう演算実行部、16bはサブルーチン呼び出し、
サブルーチンからの戻りを実行するときのスタックへの
書き込み、読み出しを司るスタック制御部、16cはF
LAG15の値を検査し、演算実行部16aへ知らせる
フラッグ検査部、16dはスタック17から読み出した
戻りアドレスを検査する戻りアドレス検査部である。1
7は戻りアドレス、または戻りアドレスが不必要である
場合の特定の値を格納するためのスタックであり、図5
に示す従来のようなFLAGを格納するための領域はな
い。
The inside of the execution control unit 16 is composed of three blocks. Reference numeral 16a is an operation execution unit for interpreting commands and at the same time performing numerical operation by the ALU, updating various registers, etc., 16b is a subroutine call,
A stack control unit that controls writing to and reading from the stack when executing a return from a subroutine, 16c is F
A flag inspection unit that inspects the value of the LAG 15 and notifies the operation execution unit 16a , and a return address inspection unit 16d that inspects the return address read from the stack 17. 1
7 is the return address , or the return address is unnecessary
A stack for storing a specific value in the case of FIG.
There is no area for storing FLAG as shown in FIG.

【0018】以上のように構成された補助処理装置で実
行時に実行状態を変更する処理について、図2および図
3に示すフローチャートを参照して説明する。まず、図
2を用いてJSRコマンドの処理を説明する。JSRコ
マンドの処理とは、図4に示した処理に照らしてみる
と、ルーチン41でJSRコマンドJSR Paを受け
取ったとき、ルーチン43でJSRコマンドJSR P
bを受け取ったとき、ルーチン44でJSRコマンドJ
SR Pcを受け取ったときおよびルーチン47でJS
RコマンドJSR Pdを受け取ったときにスタートす
る処理を指す。このJSRコマンド処理がスタートする
と、ステップ21においてFLAG15の値がフラッグ
検査部16cで検査され、FLAG=1であればマスタ
モード実行状態と言うことになり、このモードは戻りア
ドレスが必要なモードである。これは図4の処理におい
てルーチン44でJSRコマンドJSR Pcを受け取
ったときに相当する。この場合は、ステップ22へ行
く。ステップ22では、カウンタ11の内容、即ち現在
実行中のJSRコマンドJSR Pcの次に置かれたコ
マンドの先頭アドレス(これが「戻りアドレス」であ
る)をスタック17へ書き込む。なお、フラッグ15は
FLAG=1のままである。かかる手順を経た後、ステ
ップ25へ移行して、分岐先アドレスであるPcがカウ
ンタ11に格納され、サブルーチンへ分岐する。これに
より処理はルーチン44からルーチン45のサブルーチ
ンの処理へとジャンプする。ステップ21でFLAG=
0であれば、スレーブモード実行状態と言うことにな
り、このモードは戻りアドレスが不必要なモードであ
る。これは図4の処理においてルーチン41でJSRコ
マンドJSR Paを受け取ったとき、ルーチン43で
JSRコマンドJSR Pbを受け取ったときおよびル
ーチン47でJSRコマンドJSR Pdを受け取った
ときに相当する。この場合は、ステップ23へ行く。ス
テップ23では、戻りアドレスが不必要であるため、予
め定めた特定の値である0をスタック17に格納する。
その後ステップ24でFLAG15を1に更新する。そ
して、ステップ25へ移行して、分岐先アドレスがカウ
ンタ11に格納され、サブルーチンへ分岐する。カウン
タ11に格納される分岐先アドレスは各ルーチンに応じ
てPa、Pb、Pdであり、分岐したサブルーチン処理
はそれぞれルーチン42、ルーチン 44およびルーチン
48である。
The process of changing the execution state at the time of execution in the auxiliary processing device configured as described above will be described with reference to the flowcharts shown in FIGS. First, the processing of the JSR command will be described with reference to FIG. JSR
The mand process is compared with the process shown in FIG.
Then, the routine 41 receives the JSR command JSR Pa.
When taken, the routine 43 calls the JSR command JSR P
When receiving b, the routine 44 calls the JSR command J
Upon receipt of SR Pc and in routine 47 JS
Start when R command JSR Pd is received
Processing. This JSR command processing starts
Then, in step 21, the value of FLAG15 is flagged.
Inspected by the inspection unit 16c, and if FLAG = 1, master
This is called the mode execution state, and this mode returns
It is a mode that requires a dress. This is in the processing of Figure 4
Routine 44 receives the JSR command JSR Pc
It is equivalent to when In this case, go to step 22.
Ku. In step 22, the contents of the counter 11, that is, the present
The command placed next to the JSR command JSR Pc being executed.
Mand start address (this is the "return address")
Is written to the stack 17. In addition, the flag 15
FLAG = 1 remains. After this procedure,
After moving to step 25, the branch destination address Pc
Stored in the computer 11 and branches to the subroutine. to this
More processing is routine 44 to routine 45
Jump to processing FLAG = in step 21
If it is 0, it means the slave mode execution state.
This mode does not require a return address.
It This is performed by the routine 41 in the process of FIG.
When receiving Mand JSR Pa, in routine 43
When a JSR command JSR Pb is received and
Received the JSR command JSR Pd on the command line 47.
Sometimes equivalent. In this case, go to step 23. Su
In step 23, the return address is unnecessary, so
The specified value 0, which is a predetermined value, is stored in the stack 17.
Then, in step 24, FLAG15 is updated to 1. So
Then, the process proceeds to step 25, and the branch destination address is
Stored in the computer 11 and branches to the subroutine. Coun
The branch destination address stored in data 11 depends on each routine.
Is Pa, Pb, Pd, and a branched subroutine process
Are routine 42, routine 44 and routine , respectively.
48.

【0019】次に、図3を用いてRETコマンドの処理
を説明する。ステップ31でスタック17から戻りアド
レスが取り出される。ステップ32では、戻りアドレス
検査部16dによりステップ31で取り出された戻りア
ドレスの値が検査され、その値が特定の値である0以外
であればステップ33へ行き、その戻りアドレス(前記
事例にあっては、JRSコマンドJSR Pcの次に置
かれたコマンドの先頭アドレス)がカウンタ11へ格納
される。これにより、図4の処理においてはルーチン4
5から復帰せしめられたルーチン46と処理が開始され
る。これは同一マスターモードの中における、サブルー
チンからの復帰処理である。一方、ステップ32で検査
した値が0であれば、ステップ34へ行き、FLAG1
5が0に更新される。これにより処理はマスターモード
からスレーブモードへと切り替えられ、ルーチン42か
らルーチン43への復帰、ルーチン46からルーチン4
7への復帰およびルーチン48からルーチン49への復
帰が行なわれる。
Next, the processing of the RET command will be described with reference to FIG. At step 31, the return address is fetched from the stack 17. In step 32, the value of the return address extracted in step 31 is inspected by the return address inspecting unit 16d, and if the value is other than 0 which is a specific value, the process proceeds to step 33 and the return address (the above-mentioned
In the case, it is placed after the JRS command JSR Pc.
The start address of the written command is stored in the counter 11.
To be done. As a result, in the process of FIG.
The routine 46 and the processing that has been returned from 5 are started.
It This is a subroutine in the same master mode.
This is the process of returning from Chin. On the other hand, inspection in step 32
If the value is 0, go to step 34 and set FLAG1
5 is updated to 0. This allows the process to be in master mode
Is switched to the slave mode from routine 42
To routine 43, routine 46 to routine 4
Return to 7 and return from routine 48 to routine 49
Homecoming is done.

【0020】このように、上記実施例によれば、簡単な
制御でJSRコマンドとRETコマンドの実行により実
行時に実行状態を高速に変更することができる。
As described above, according to the above-described embodiment, the execution state can be changed at high speed at the time of execution by executing the JSR command and the RET command with simple control.

【0021】なお、上記実施例において、戻りアドレス
の検査値を特定の値として0としたが、この値は特定の
値であればどんな値であっても良いことは言うまでもな
い。
In the above embodiment, the check value of the return address is set to 0 as a specific value, but it goes without saying that this value may be any value as long as it is a specific value.

【0022】[0022]

【発明の効果】以上のように、本発明によれば、実行制
御手段が、選択手段から供給される情報を解釈、戻りア
ドレスが不必要なモードのときは予め定めた特定の値を
スタックに格納し、戻りアドレスが必要なモードのとき
はその戻りアドレスをスタックに格納し、上記特定の値
が格納されているか否かを判断することにより各モード
に対応した処理を実行するので、従来行なっていたよう
なモードを指示するフラッグをスタックに格納する必要
がなく、スタック容量を小さくできるとともに、実行時
に実行状態を高速に切り換えることができるという優れ
た効果を有する。
As described above, according to the present invention, the execution control means interprets the information supplied from the selection means, and when the return address is in a mode where the return address is unnecessary, a predetermined specific value is stored in the stack. If a mode that requires storing a return address is stored, the return address is stored in the stack, and the process corresponding to each mode is executed by determining whether or not the above specific value is stored. It is not necessary to store the flag indicating the conventional mode in the stack, the stack capacity can be reduced, and the execution state can be switched at high speed during execution.

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

【図1】本発明の一実施例における補助処理装置のブロ
ック図
FIG. 1 is a block diagram of an auxiliary processing device according to an embodiment of the present invention.

【図2】実施例におけるJSRコマンド処理動作を示す
フローチャート
FIG. 2 is a flowchart showing a JSR command processing operation in the embodiment.

【図3】実施例におけるRETコマンド処理動作を示す
フローチャート
FIG. 3 is a flowchart showing a RET command processing operation in the embodiment.

【図4】従来の補助処理装置における実行状態を説明す
るためのタイムチャート
FIG. 4 is a time chart for explaining an execution state in a conventional auxiliary processing device.

【図5】従来例における補助処理装置のブロック図FIG. 5 is a block diagram of an auxiliary processing device in a conventional example.

【図6】従来例におけるJSRコマンド処理動作を示す
フローチャート
FIG. 6 is a flowchart showing JSR command processing operation in a conventional example.

【図7】従来例におけるRETコマンド処理動作を示す
フローチャート
FIG. 7 is a flowchart showing a RET command processing operation in a conventional example.

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

11 カウンタ(計数手段) 12 コマンドレジスタ(第1の記憶手段) 13 コマンドレジスタ(第2の記憶手段) 14 セレクタ(選択手段) 15 フラッグ(第3の記憶手段) 16 実行制御部(実行制御手段) 16a 演算実行部 16b スタック制御部 16c フラッグ検査部 16d 戻りアドレス検査部 17 スタック 11 counter (counting means) 12 command register (first storage means) 13 command register (second storage means) 14 selector (selection means) 15 flag (third storage means) 16 execution control unit (execution control means) 16a Operation execution unit 16b Stack control unit 16c Flag inspection unit 16d Return address inspection unit 17 Stack

───────────────────────────────────────────────────── フロントページの続き (72)発明者 小 野 寺 千 香 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (72)発明者 浦 中 洋 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (72)発明者 川 上 桂 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Chika Onodera 1006 Kadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (72) Hiroshi Uranaka, 1006 Kadoma, Kadoma City, Osaka Matsushita Electric (72) Inventor Katsura Kawakami 1006 Kadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 メモリ内のアドレスを保持し、メモリが
読み出されると、読み出されたコマンドの次に配置され
たコマンドの先頭アドレスを指示するように戻りアドレ
スが自動的に更新される計数手段と、前記計数手段によ
り指示されたコマンドをメモリから読み出して記憶する
第1の記憶手段と、外部から書き込まれたコマンドを保
持する第2の記憶手段と、前記第1の記憶手段に保持さ
れた、戻りアドレスが必要なコマンド処理と、前記第2
の記憶手段に保持された、戻りアドレスが不必要なコマ
ンド処理とのどちらのコマンド処理を選択すべきかを決
定する選択情報を保持する第3の記憶手段と、前記第3
の記憶手段に記憶された値に対応して、前記第1の記憶
手段と前記第2の記憶手段のいずれか一方を選択して出
力する選択手段と、前記計数手段によって指示された
ころの、現在実行中のコマンドの次に置かれたコマンド
の先頭アドレスである戻りアドレス、または予め定めた
特定の値を格納するスタックと、前記選択手段から供給
される情報を解釈し、戻りアドレスが不必要なモードの
ときは前記特定の値を前記スタックに格納し、戻りアド
レスが必要なモードのときは前記戻りアドレスを前記ス
タックに格納し、前記特定の値が格納されているか否か
を判断することにより前記各モードに対応した処理を実
行する実行制御手段とを備えた補助処理装置。
[Claim 1] holds the address in memory, counting the memory is read out, the return address so as to instruct the start address of the disposed next read command command is automatically updated Means, first storage means for reading the command instructed by the counting means from the memory and storing it, and a command written from the outside.
A second storage means to be held , and a second storage means to be held in the first storage means.
Command processing that requires a return address and the second
Stored in the storage means of the
And a third storage means for holding selection information for deciding which of the command processing and the command processing should be selected;
In response to the value stored in the storage means, and selecting means for selecting and outputting one of said first memory means and said second storage means, has been instructed by said counting means
Command placed next to the currently executing command
Start address is a return address, and a stack for storing a specific value determined in advance was or interprets the information supplied from the selecting means, the return address is the specific value when the unnecessary mode Is stored in the stack, the return address is stored in the stack when the mode requires a return address, and the processing corresponding to each mode is performed by determining whether or not the specific value is stored. An auxiliary processing device having an execution control means for executing the execution.
【請求項2】 実行制御手段が、選択手段から供給され
る情報を解釈し、その情報がサブルーチンへ分岐するコ
マンドの時は、第3の記憶手段の内容が第1の値であれ
ば、計数手段の戻りアドレスをスタックに格納し、前記
第3の記憶手段の内容が第2の値であれば、予め定めた
特定の値を前記スタックに格納するとともに、前記第3
の記憶手段の内容を第1の値に更新し、前記いずれかの
処理の後に、前記選択手段から供給されたコマンドから
アドレスを生成し、その値を前記計数手段に格納する機
能と、前記選択手段から供給される情報がサブルーチン
から復帰するコマンドの時は、前記スタックから情報を
取り出し、その情報が予め定めた前記特定の値であれ
ば、前記第3の記憶手段の内容を第2の値に更新し、前
記スタックから取り出した情報が前記特定の値でなけれ
ば、そのアドレス情報を前記計数手段に格納する機能と
を有する請求項1記載の補助処理装置。
2. The execution control means interprets the information supplied from the selection means, and when the information is a command for branching to a subroutine, counting is performed if the content of the third storage means is the first value. The return address of the means is stored in the stack, and if the content of the third storage means is the second value, a predetermined specific value is stored in the stack and the third value is stored in the stack.
Updating the contents of the storage means to a first value, generating an address from the command supplied from the selecting means after any one of the processing, and storing the value in the counting means; When the information supplied from the means is a command for returning from the subroutine, the information is taken out from the stack, and if the information is the predetermined specific value, the content of the third storage means is changed to the second value. 2. The auxiliary processing device according to claim 1, further comprising a function of storing the address information in the counting means if the information updated from the stack is not the specific value.
JP24191791A 1991-09-20 1991-09-20 Auxiliary processor Expired - Lifetime JP2506591B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24191791A JP2506591B2 (en) 1991-09-20 1991-09-20 Auxiliary processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24191791A JP2506591B2 (en) 1991-09-20 1991-09-20 Auxiliary processor

Publications (2)

Publication Number Publication Date
JPH0581018A JPH0581018A (en) 1993-04-02
JP2506591B2 true JP2506591B2 (en) 1996-06-12

Family

ID=17081477

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24191791A Expired - Lifetime JP2506591B2 (en) 1991-09-20 1991-09-20 Auxiliary processor

Country Status (1)

Country Link
JP (1) JP2506591B2 (en)

Also Published As

Publication number Publication date
JPH0581018A (en) 1993-04-02

Similar Documents

Publication Publication Date Title
US4675806A (en) Data processing unit utilizing data flow ordered execution
US5003458A (en) Suspended instruction restart processing system based on a checkpoint microprogram address
EP0330226B1 (en) Apparatus of and method for executing subprogram in bank switching data processing system
JPH10214203A (en) Information processor
JP2506591B2 (en) Auxiliary processor
US4816992A (en) Method of operating a data processing system in response to an interrupt
JPH01286029A (en) Microprogram patching system
JP3145545B2 (en) Memory access device
JP2920968B2 (en) Instruction processing order control method
JP2716254B2 (en) List vector processing device
JPS62254237A (en) Inter-printer type branch instruction executing system
JP2798492B2 (en) List vector processing device
JPH07175661A (en) User program load system
JPH0347536B2 (en)
JPH1011320A (en) Rom program monitor device of processor of computer or the like
JPH0259829A (en) Microcomputer
JPS6325372B2 (en)
JPS6238746B2 (en)
JPH1040125A (en) Microcomputer
JPH0150936B2 (en)
JPS5822765B2 (en) Program loading method in electronic computer system
JPH03218524A (en) Instruction processor
JP2001282550A (en) Computer and its control method
JPH06161781A (en) Method and processor for information processing
JPH10134013A (en) Multi-cpu system