JPH06208464A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH06208464A
JPH06208464A JP163593A JP163593A JPH06208464A JP H06208464 A JPH06208464 A JP H06208464A JP 163593 A JP163593 A JP 163593A JP 163593 A JP163593 A JP 163593A JP H06208464 A JPH06208464 A JP H06208464A
Authority
JP
Japan
Prior art keywords
register
value
decoder
latch circuit
general
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP163593A
Other languages
Japanese (ja)
Inventor
Fumiki Sato
文樹 佐藤
Koichi Fujita
紘一 藤田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP163593A priority Critical patent/JPH06208464A/en
Publication of JPH06208464A publication Critical patent/JPH06208464A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a microcomputer capable of changing the register number of a general purpose resister. CONSTITUTION:An adder 33 (or 34) adds the value of a pointer 30 indicating the start point information of an access to a general purpose register group 4 to a value relating to a register field LX (or LY) on a signal line 31 (or 32). The added result is sent to an RX decoder 45 (or RY decoder 46) or an RZ decoder 47 through the 5th (or 6th) latch circuit 35 (or 36), the 9th latch circuit 37 and the 10th latch circuit 38 and the RX decoder 45 (or RY decoder 46) or the RZ decoder 47 selects a general purpose resister in the register group 4 in accordance with a register number indicated by the added result.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はレジスタファイルを有す
るマイクロコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer having a register file.

【0002】[0002]

【従来の技術】図8は「MC68020 32-Bit Microprocesso
r User's Manual Second Edition」に開示されているマ
イクロプロセッサMC68020 を示すブロック図である。図
において、61は図示しないメモリからデータバス92を介
して転送される命令語を一時格納する命令キャッシュ部
である。命令キャッシュ部61は命令コードを解読して制
御信号67を出力するデコード部62に内部バス66を介して
接続されている。該デコード部62は該制御信号67に基づ
きマイクロプロセッサ内の装置を制御するシーケンス部
63に接続されている。該シーケンス部63は内部バス66を
介して前記デコード部62に接続され、さらに命令コード
を実行する実行部65及び図示しない外部機器の入出力動
作、その他の指示をなすバスコントローラ60に接続され
ている。
2. Description of the Related Art FIG. 8 shows "MC68020 32-Bit Microprocesso".
FIG. 3 is a block diagram showing a microprocessor MC68020 disclosed in “r User's Manual Second Edition”. In the figure, 61 is an instruction cache unit for temporarily storing an instruction word transferred from a memory (not shown) via a data bus 92. The instruction cache unit 61 is connected via an internal bus 66 to a decoding unit 62 that decodes an instruction code and outputs a control signal 67. The decoding unit 62 is a sequence unit that controls devices in the microprocessor based on the control signal 67.
Connected to 63. The sequence unit 63 is connected to the decoding unit 62 via an internal bus 66, and is further connected to an execution unit 65 that executes an instruction code, an input / output operation of an external device (not shown), and a bus controller 60 that gives other instructions. There is.

【0003】前記実行部65は前記命令キャッシュ部61に
接続され、バスコントローラ60は制御信号線91に接続さ
れ、命令キャッシュ部61、実行部65はアドレスバス90及
びデータバス92に接続されている。前記シーケンス部63
は該シーケンス部63の動作を制御する制御部64を有す
る。
The execution unit 65 is connected to the instruction cache unit 61, the bus controller 60 is connected to the control signal line 91, and the instruction cache unit 61 and the execution unit 65 are connected to the address bus 90 and the data bus 92. . The sequence unit 63
Has a control unit 64 for controlling the operation of the sequence unit 63.

【0004】以下このマイクロコンピュータの動作の説
明をする。図示しないメモリから読み出された命令コー
ドはデータバス92を介して命令キャッシュ部61へ転送さ
れて該命令キャッシュ部61に格納され、命令キャッシュ
部61に格納された命令コードは内部バス66を介してデコ
ード部62へ転送され、該デコード部62へ転送された前記
命令コードは解読されて制御信号67に変換され、該制御
信号67はシーケンス部63へ送出され、シーケンス部63は
制御信号67に基づき内部バス66を介して実行部65、命令
キャッシュ部61、デコード部62の動作を制御する信号を
送出する。実行部65は命令を実行し、必要とする都度命
令キャッシュ部61にに格納されている命令を命令キャッ
シュ部61から読み出して実行し、さらにアドレスバス90
を介して図示しない外部機器又はメモリへアドレス情報
を送出して図示しない外部機器を駆動し又は図示しない
メモリに格納されている命令コードを読み出す。
The operation of this microcomputer will be described below. The instruction code read from the memory (not shown) is transferred to the instruction cache unit 61 via the data bus 92 and stored in the instruction cache unit 61, and the instruction code stored in the instruction cache unit 61 is transferred via the internal bus 66. Is transferred to the decoding unit 62, the instruction code transferred to the decoding unit 62 is decoded and converted into a control signal 67, the control signal 67 is sent to the sequence unit 63, and the sequence unit 63 outputs the control signal 67. A signal for controlling the operations of the execution unit 65, the instruction cache unit 61, and the decoding unit 62 is sent out based on the internal bus 66. The execution unit 65 executes the instruction, reads the instruction stored in the instruction cache unit 61 from the instruction cache unit 61 whenever necessary, and executes the instruction.
The address information is sent to an external device (not shown) or a memory via the drive to drive the external device (not shown) or read an instruction code stored in the memory (not shown).

【0005】図9はマイクロプロセッサ68020 が有する
レジスタファイルとしての汎用レジスタ群の構成の一部
を示す概略レジスタ構成図である。ユーザ用のデータレ
ジスタD0,D1 …D7、アドレス情報一時格納アドレスレジ
スタA0,A1 …A6、ユーザ用スタックメモリで使用される
スタックポインタ、プログラムカウンタはそれぞれ32ビ
ット長である。さらにマイクロプロセッサの条件コード
一時格納用の条件コードレジスタは16ビット長であり、
割込み処理時に使用するスタックメモリのポインタを示
す割込みスタックポインタは32ビット長である。
FIG. 9 is a schematic register configuration diagram showing a part of the configuration of a general-purpose register group as a register file included in the microprocessor 68020. The data registers D0, D1 ... D7 for users, the address registers A0, A1 ... A6 for temporarily storing address information, the stack pointer and the program counter used in the user stack memory are each 32 bits long. Furthermore, the condition code register for temporary storage of the condition code of the microprocessor is 16 bits long,
The interrupt stack pointer, which indicates the stack memory pointer used during interrupt processing, is 32 bits long.

【0006】図10は前記マイクロプロセッサMC68020 に
使用される命令コードを用いてOFF1番地とOFF2番地とに
格納されているデータを加算して加算結果をレジスタD7
に格納する手順を示すフローチャートであり、サブルー
チンで処理すべく構成されている。図のフローチャート
において、レジスタD6の値を図示しないメモリへ退避し
(S1)、メモリのOFF1番地に格納しているデータを読み出
してレジスタD6へ転送し(S2)、メモリのOFF2番地のデー
タを読み出してレジスタD7へ転送周波数(S3)、レジスタ
D6の値とレジスタD7の値とを加算して加算結果をレジス
タD7に格納した(S4)後、メモリに退避したレジスタD6の
値を読み出して元のレジスタD6に復帰し(S5)、リターン
命令を実行して(S6)プログラムの処理をサブルーチンか
らメインルーチンへ戻す。
In FIG. 10, the data stored in the OFF1 address and the OFF2 address are added using the instruction code used in the microprocessor MC68020, and the addition result is registered in the register D7.
3 is a flowchart showing a procedure for storing the data in a sub-routine and is configured to be processed by a subroutine. In the flowchart shown in the figure, save the value of register D6 to a memory not shown.
(S1), read the data stored at memory OFF1 address and transfer to register D6 (S2), read the data at memory OFF2 address and transfer to register D7 Transfer frequency (S3), register
After adding the value of D6 and the value of register D7 and storing the addition result in register D7 (S4), the value of register D6 saved in the memory is read and restored to the original register D6 (S5), and the return instruction (S6) to return the program processing from the subroutine to the main routine.

【0007】図11は図10のフローチャートの処理を行な
うためのプログラムリストである。MOV D6,-(USP) はレ
ジスタD6の値をユーザ用スタックメモリに退避する命令
コードである。MOV (OFF 1). W,D6 はOFF1番地の値をレ
ジスタD6へ転送する命令コードである。MOV (OFF 2).
W,D7 はOFF2番地の値をレジスタD7へ転送する命令コー
ドである。ADD D6,D7 はレジスタD6の値とレジスタD7の
値とを加算して加算結果をレジスタD6に格納する命令コ
ードである。MOV (USP)+,D6 はユーザ用スタックメモリ
の値を読み出してレジスタD6に復帰する命令コードであ
る。RTS はサブルーチンからメインルーチンへプログラ
ムの処理を戻すリターン命令を示す命令コードである。
FIG. 11 is a program list for performing the processing of the flowchart of FIG. MOV D6,-(USP) is an instruction code that saves the value of register D6 to the user stack memory. MOV (OFF 1). W, D6 is the instruction code to transfer the value at address OFF1 to register D6. MOV (OFF 2).
W and D7 are instruction codes that transfer the value at address OFF2 to register D7. ADD D6, D7 are instruction codes for adding the value of register D6 and the value of register D7 and storing the addition result in register D6. MOV (USP) +, D6 is an instruction code that reads the value of the user stack memory and returns to register D6. RTS is an instruction code indicating a return instruction that returns the processing of the program from the subroutine to the main routine.

【0008】このサブルーチンにおいて、命令コードRT
S の直前の命令コードMOV (USP)+,D6 によりユーザ用ス
タックメモリに退避した値をレジスタD6へ復帰してい
る。かような手法はサブルーチンを作成する時に配慮す
べき重要なテクニックであり、メインルーチンで使用さ
れるレジスタの値がサブルーチン実行中に壊されてリタ
ーン命令によりメインルーチンへ戻る際に復元が不可能
にならないようにサブルーチンの冒頭において保存が必
要なレジスタの値は一時メモリに退避され、さらにサブ
ルーチン処理終了直前、メモリに退避されていた値がレ
ジスタに復帰されてリターン命令によりサブルーチンか
らメインルーチンへプログラムの処理が戻る。
In this subroutine, the instruction code RT
The value saved in the user stack memory is restored to register D6 by the instruction code MOV (USP) +, D6 immediately before S. Such a technique is an important technique to consider when creating a subroutine, because the value of the register used in the main routine is destroyed during the execution of the subroutine, and restoration is impossible when returning to the main routine by the return instruction. The value of the register that needs to be saved at the beginning of the subroutine is temporarily saved in the memory so that it does not happen. Processing returns.

【0009】[0009]

【発明が解決しようとする課題】従来のマイクロコンピ
ュータにおいて、メインルーチンからサブルーチンへ又
はサブルーチンからメインルーチンへプログラムの処理
が移動する都度、汎用レジスタの値をメモリへ退避し、
メモリの値を汎用レジスタに復帰する命令コードを実行
する必要があるのでその分サブルーチンのステップ数が
長くなる、という問題点がある。さらにサブルーチンと
メインルーチンとにおいて同一のレジスタ番号として使
用することができるグローバルレジスタをサブルーチン
で追加又は削除する場合にはグローバルレジスタの数に
応じて、その都度サブルーチンの命令コードを追加又は
削除する必要があるのでプログラマーの労力と手間とを
要するという問題点がある。
In the conventional microcomputer, the value of the general-purpose register is saved in the memory every time the processing of the program moves from the main routine to the subroutine or from the subroutine to the main routine.
Since it is necessary to execute the instruction code that restores the memory value to the general-purpose register, the number of steps in the subroutine becomes longer accordingly. Furthermore, when adding or deleting a global register that can be used as the same register number in the subroutine and the main routine in the subroutine, it is necessary to add or delete the instruction code of the subroutine each time according to the number of global registers. Therefore, there is a problem that it requires the labor and time of the programmer.

【0010】本発明は前記問題点に鑑みなされたもので
あり、レジスタファイルの中の汎用レジスタをサブルー
チンとメインルーチンとにおいて使用する場合には前記
汎用レジスタのレジスタ番号をサブルーチンとメインル
ーチンとで変更することにより、汎用レジスタの値をメ
モリへ退避する命令コードとメモリの値を汎用レジスタ
に復帰する命令コードとを不要にするマイクロコンピュ
ータの提供を目的とする。さらにサブルーチンとメイン
ルーチンとにおいて汎用レジスタ群の中でグローバルレ
ジスタとして使用することができる汎用レジスタの数を
増減できるよう構成することにより、サブルーチンで使
用するグローバルレジスタを追加又は削除する場合にお
いて前記グローバルレジスタに係る命令コードを追加又
は削除することが不要であるマイクロコンピュータの提
供を目的とする。
The present invention has been made in view of the above problems, and when a general register in a register file is used in a subroutine and a main routine, the register number of the general register is changed between the subroutine and the main routine. By doing so, an object of the present invention is to provide a microcomputer that does not require an instruction code for saving the value of the general-purpose register in the memory and an instruction code for restoring the value of the memory in the general-purpose register. Furthermore, by configuring so that the number of general-purpose registers that can be used as global registers in the general-purpose register group in the subroutine and the main routine can be increased or decreased, the global registers used in the subroutine can be added or deleted. It is an object of the present invention to provide a microcomputer in which it is not necessary to add or delete the instruction code according to.

【0011】[0011]

【課題を解決するための手段】第1の発明に係るマイク
ロコンピュータは、第1の記憶手段に記憶されている第
1の情報と命令コードが有する第2の情報とを加算手段
を用いて加算せしめ、加算結果をデコーダへ送出した後
にデコーダを用いてデータを読み出し又は書き込みをす
るレジスタを選択せしめる。第2の発明に係るマイクロ
コンピュータは、命令コードが有する第2の情報と、第
2の記憶手段に記憶されている第3の情報とを比較手段
が比較した結果を用いて加算手段で加算された第1、2
の情報の加算結果又は第2の情報を選択せしめ、選択し
た情報をデコーダへ送出した後にデコーダを用いて読み
出し又は書き込みをするレジスタを選択せしめる。
A microcomputer according to a first aspect of the present invention adds first information stored in a first storage means and second information included in an instruction code by using an addition means. Then, after sending the addition result to the decoder, the decoder is used to select the register for reading or writing data. In the microcomputer according to the second aspect, the addition means adds the second information included in the instruction code and the third information stored in the second storage means by the comparison means. Had first and second
The result of addition of the information or the second information is selected, and after the selected information is sent to the decoder, the register to be read or written using the decoder is selected.

【0012】[0012]

【作用】第1の発明にあっては、命令コードが有する汎
用レジスタ番号としての第2の情報を加算手段を用いて
アクセスの起点の情報を格納する第1の情報に加算する
ことにより第2の情報は該汎用レジスタ番号と異なる汎
用レジスタ番号を示す情報に変更されるので、デコーダ
により選択される汎用レジスタを加算手段を用いて変更
することができる。従ってメインルーチンで使用してい
る汎用レジスタをサブルーチンにおいて使用させたくな
い場合にはサブルーチンの冒頭で加算手段を用いて汎用
レジスタ番号を変更する命令を実行することにより汎用
レジスタの値をメモリに退避し、メモリに格納されてい
る値を汎用レジスタへ復帰することは不要となる。
According to the first aspect of the invention, the second information as the general-purpose register number of the instruction code is added to the first information for storing the information of the access starting point by using the adding means. Information is changed to information indicating a general-purpose register number different from the general-purpose register number, so that the general-purpose register selected by the decoder can be changed by using the adding means. Therefore, if you do not want to use the general-purpose register used in the main routine in the subroutine, save the value of the general-purpose register in the memory by executing the instruction to change the general-purpose register number using the adding means at the beginning of the subroutine. , It becomes unnecessary to restore the value stored in the memory to the general-purpose register.

【0013】第2の発明にあっては、命令コードが有す
る汎用レジスタ番号としての第2の情報又は加算手段を
用いて第2の情報に第1の情報を加算した値のいずれか
を比較手段を用いて選択してデコーダへ送出するので、
当該デコーダは前記加算した値を用いてレジスタを選択
することができ、さらに第2の情報に第1の情報を加算
することなく第2の情報そのものを用いて読み書きをす
るレジスタを選択することができる。従って第2の情報
がグローバルレジスタの個数を示す第3の情報よりも大
きいか等しい場合には第2の情報をデコーダに送出して
第2の情報をサブルーチンとメインルーチンとで同一の
汎用レジスタ番号を有するグローバルレジスタの番号と
して使用することができる。さらに第2の情報が第3の
情報より小さい場合には第1と第2の情報との加算結果
をデコーダに送出して第2の情報をサブルーチンとメイ
ンルーチンとで異なる汎用レジスタ番号を有する汎用レ
ジスタの番号として使用することができる。
According to the second aspect of the invention, the comparison means is used to compare the second information as the general-purpose register number of the instruction code or the value obtained by adding the first information to the second information using the addition means. Is selected and sent to the decoder,
The decoder can select a register by using the added value, and can select a register for reading and writing by using the second information itself without adding the first information to the second information. it can. Therefore, when the second information is greater than or equal to the third information indicating the number of global registers, the second information is sent to the decoder to send the second information to the same general-purpose register number in the subroutine and the main routine. Can be used as the number of a global register having. Further, when the second information is smaller than the third information, the addition result of the first and second information is sent to the decoder and the second information is used as a general-purpose register having different general-purpose register numbers in the subroutine and the main routine. It can be used as a register number.

【0014】[0014]

【実施例】以下本発明をその実施例を示す図面に基づい
て具体的に説明する。図1,2は本発明のマイクロコン
ピュータを示すブロック図である。図において23は外部
データバス80、外部アドレスバス81を制御して図示しな
いメモリに対してデータの読み出し、書き込みを行なう
バスインタフェースユニット (以下BIU という) であ
る。BIU 23は内部バス24を介してメモリ参照時に使用す
るデータレジスタ5、命令コードを格納する命令レジス
タ25に接続されている。命令レジスタ25は命令コードか
ら取り出された即値データ又はオフセットデータを格納
する即値オフセットレジスタ26に接続され、即値オフセ
ットレジスタ26は内部バス2に接続されている。前記命
令レジスタ25はプログラムが示す命令語に従ってマイク
ロコンピュータを制御する制御回路27並びにレジスタフ
ァイルとしての汎用レジスタ群4の中の汎用レジスタ及
びデータレジスタ5の内、読み書きの対象となるレジス
タを指定するデコーダ9に接続されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be specifically described below with reference to the drawings showing the embodiments thereof. 1 and 2 are block diagrams showing a microcomputer of the present invention. In the figure, reference numeral 23 is a bus interface unit (hereinafter referred to as BIU) which controls the external data bus 80 and the external address bus 81 to read and write data from a memory (not shown). The BIU 23 is connected via an internal bus 24 to a data register 5 used for memory reference and an instruction register 25 for storing an instruction code. The instruction register 25 is connected to an immediate value offset register 26 that stores immediate value data or offset data extracted from the instruction code, and the immediate value offset register 26 is connected to the internal bus 2. The instruction register 25 is a decoder for designating a control circuit 27 for controlling a microcomputer in accordance with an instruction word indicated by a program and a general register in the general register group 4 as a register file and a data register 5 for reading and writing. 9 is connected.

【0015】デコーダ9は汎用レジスタ群4及びデータ
レジスタ5に接続されている。汎用レジスタ群4及びデ
ータレジスタ5はそれらのレジスタの内容を内部バス
1、内部バス2にそれぞれ送出する第1のバッファ6、
第2のバッファ7のそれぞれに接続されている。第1の
バッファ6は内部バス1に接続され、第2のバッファ7
は内部バス2に接続されている。内部バス2上のデータ
を取り込むべく内部バス2に接続されている第1のラッ
チ回路12は、さらにその出力端子が第1のラッチ回路12
に格納されている値を評価すべく評価レジスタ10,11 の
入力端子に接続され、評価レジスタ10,11 の出力端子は
評価レジスタ10,11 の値を一時格納又は内部バス2、1
の値を取り込むべく第2のラッチ回路13及び第3のラッ
チ回路14の入力端子に接続されている。第2のラッチ回
路13及び第3のラッチ回路14の出力端子は算術論理演算
を実行するALU 15の入力端子に接続され、ALU 15の出力
端子は第3のラッチ回路14の出力端子とともに評価レジ
スタ10,11 に接続されている。さらにALU 15の出力端子
はALU 15の値を一時的に格納するレジスタ16の入力端子
に接続されている。
The decoder 9 is connected to the general purpose register group 4 and the data register 5. The general-purpose register group 4 and the data register 5 send the contents of these registers to the internal bus 1 and the internal bus 2, respectively.
It is connected to each of the second buffers 7. The first buffer 6 is connected to the internal bus 1 and the second buffer 7
Is connected to the internal bus 2. The first latch circuit 12 connected to the internal bus 2 in order to take in the data on the internal bus 2 has an output terminal which is the first latch circuit 12 further.
Is connected to the input terminals of the evaluation registers 10 and 11 to evaluate the value stored in the, and the output terminals of the evaluation registers 10 and 11 temporarily store the values of the evaluation registers 10 and 11 or the internal buses 2 and 1.
Is input to the input terminals of the second latch circuit 13 and the third latch circuit 14. The output terminals of the second latch circuit 13 and the third latch circuit 14 are connected to the input terminal of the ALU 15 that executes arithmetic logic operation, and the output terminal of the ALU 15 together with the output terminal of the third latch circuit 14 is an evaluation register. It is connected to 10,11. Furthermore, the output terminal of ALU 15 is connected to the input terminal of register 16 which temporarily stores the value of ALU 15.

【0016】レジスタ16の出力端子は内部バス1、内部
バス2に接続され、さらにレジスタ16の出力端子は内部
バス3を介して汎用レジスタ群4の中の汎用レジスタ又
はデータレジスタ5は内部バス3上のデータを書き込む
書き込み回路8の入力端子に接続され、書き込み回路8
の出力端子は汎用レジスタ群4、データレジスタ5の入
力端子に接続されている。前記レジスタ16の出力端子は
次に実行すべき命令コードのアドレスを格納するNext P
rogram Counter (以下NPC という) 19の入力端子に接続
されている。NPC 19の出力端子は現在実行する命令コー
ドのアドレスを格納するプログラムカウンタ17の入力端
子に接続され、プログラムカウンタ17の出力端子はプロ
グラムカウンタ17の値を+2して次に実行すべき命令コ
ードが格納されているアドレスを求めるべく加算器18の
入力端子に接続され、加算器18の出力端子は加算器18で
求めた次に実行すべきアドレスを一時格納すべくNPC 19
の入力端子に接続されている。
The output terminal of the register 16 is connected to the internal bus 1 and the internal bus 2, and the output terminal of the register 16 is connected via the internal bus 3 to the general-purpose register in the general-purpose register group 4 or the data register 5 to the internal bus 3. The write circuit 8 is connected to the input terminal of the write circuit 8 for writing the above data.
The output terminal of is connected to the input terminals of the general-purpose register group 4 and the data register 5. The output terminal of the register 16 stores the address of the next instruction code to be executed Next P
It is connected to the input terminal of a rogram Counter (hereafter NPC) 19. The output terminal of the NPC 19 is connected to the input terminal of the program counter 17 that stores the address of the instruction code currently executed, and the output terminal of the program counter 17 is the value of the program counter 17 +2 It is connected to the input terminal of the adder 18 in order to obtain the stored address, and the output terminal of the adder 18 is in NPC 19 to temporarily store the address to be executed next obtained in the adder 18.
Is connected to the input terminal of.

【0017】前記プログラムカウンタ17の出力端子は内
部バス2、内部バス3に接続され、さらにプログラムカ
ウンタ17の出力端子はプログラムカウンタ17の値を一時
的に格納する第4のラッチ回路21の入力端子に接続され
ている。第4のラッチ回路21の出力端子は割り込み発生
時又は例外発生時のアドレスを保持する例外アドレスレ
ジスタ22の入力端子に接続され、例外アドレスレジスタ
22の出力端子は内部バス3に接続されている。前記ALU
15の出力端子はALU 15により計算された図示しないメモ
リのアドレスを一時格納するMAレジスタ20の入力端子に
接続され、MAレジスタ20の出力端子は図示しないメモリ
へアドレスを転送すべくBIU 23に接続され、BIU 23は図
示しないメモリのデータを評価すべく評価レジスタ10,1
1 に接続されている。なお図中の○印はトランスファゲ
ート、バッファ等の電気スイッチであり、全ての電気ス
イッチは電気スイッチの接続又は非接続を制御する制御
回路27に接続されている。
The output terminal of the program counter 17 is connected to the internal bus 2 and the internal bus 3, and the output terminal of the program counter 17 is an input terminal of a fourth latch circuit 21 for temporarily storing the value of the program counter 17. It is connected to the. The output terminal of the fourth latch circuit 21 is connected to the input terminal of the exception address register 22 that holds the address when the interrupt occurs or the exception occurs,
22 output terminals are connected to the internal bus 3. The ALU
The output terminal of 15 is connected to the input terminal of the MA register 20 that temporarily stores the address of the memory (not shown) calculated by the ALU 15, and the output terminal of the MA register 20 is connected to the BIU 23 to transfer the address to the memory (not shown). Then, the BIU 23 evaluates the data in the memory (not shown) in the evaluation register 10,1.
Connected to 1. The circles in the figure are electric switches such as transfer gates and buffers, and all the electric switches are connected to a control circuit 27 that controls connection or non-connection of the electric switches.

【0018】以下このマイクロコンピュータの動作の説
明をする。本発明のマイクロコンピュータで使用する命
令語は命令コードの解読部、十個初からなる2段のパイ
プラインを用いて実行される。パイプラインの解読部で
はBIU 23により図示しないメモリから読み出された命令
コードを内部バス24を介して命令レジスタ25へ転送す
る。命令レジスタ25の命令コードはデコーダ9、即値オ
フセットレジスタ26、制御回路27へ同時に転送され、デ
コーダ9により汎用レジスタ群4の中の汎用レジスタ又
はデータレジスタ5を選択する動作、制御回路27により
命令コードを解釈する動作並びに即値オフセットレジス
タ26により即値データ及びオフセットデータを命令コー
ドから抽出する動作が同時並行して行われる。なおデコ
ーダ9によるレジスタ選択動作は命令コードの中のレジ
スタ番号を記述しているレジスタフィールドRX ,RY
を用いて行われる。レジスタフィールドRX により第1
のバッファ6にデータを転送するレジスタが選択され、
またレジスタフィールドRY により第2のバッファ7に
データを転送するレジスタが選択される。
The operation of this microcomputer will be described below. The instruction word used in the microcomputer of the present invention is executed by using an instruction code decoding section and a two-stage pipeline consisting of the first ten. The decoding unit of the pipeline transfers the instruction code read from the memory (not shown) by the BIU 23 to the instruction register 25 via the internal bus 24. The instruction code of the instruction register 25 is simultaneously transferred to the decoder 9, the immediate offset register 26, and the control circuit 27, and the decoder 9 selects the general register or the data register 5 in the general register group 4, and the control circuit 27 outputs the instruction code. And the operation of extracting the immediate data and the offset data from the instruction code by the immediate offset register 26 are simultaneously performed in parallel. Note that the register selection operation by the decoder 9 is performed by register fields R X and R Y describing the register number in the instruction code.
Is performed using. First by register field R X
The register that transfers the data to the buffer 6 of is selected,
Further, a register for transferring data to the second buffer 7 is selected by the register field R Y.

【0019】パイプラインの実行部が示す動作は命令語
により異なる。以下主要な命令語につき該命令語の実行
中にパイプラインの実行部が示す動作を具体的に説明す
る。 (1) LDD RX 、#n パイプラインの実行部の動作が本発明のマイクロコンピ
ュータに入力される同期用クロック信号の立上りに同期
して開始されると第1のバッファ6の値が読み出されて
内部バス1を介して第3のラッチ回路14へ転送されて該
第3のラッチ回路14に格納されると同時に即値オフセッ
トレジスタの値が内部バス2を介して第1のラッチ回路
12へ転送されて格納され、前記クロック信号の立下りに
同期して前記第1のラッチ回路12から読み出された値は
評価レジスタ12へ転送されて格納される。同時に第2の
ラッチ回路14から読み出された値は評価レジスタ11へ転
送されて格納される。
The operation indicated by the execution unit of the pipeline differs depending on the instruction word. The operation of the execution unit of the pipeline during the execution of the main instruction word will be specifically described below. (1) LDD R X, read out the values of # n the operation of the execution unit of the pipeline is started in synchronism with the rising edge of the synchronous clock signal input to the microcomputer of the present invention the first buffer 6 Then, the value of the immediate offset register is transferred to the third latch circuit 14 via the internal bus 1 and stored in the third latch circuit 14, and at the same time, the value of the immediate offset register is transferred via the internal bus 2 to the first latch circuit.
The value read from the first latch circuit 12 is transferred to and stored in the evaluation register 12 in synchronization with the fall of the clock signal. At the same time, the value read from the second latch circuit 14 is transferred to and stored in the evaluation register 11.

【0020】(2) FLD (FUNC1) 、RY パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると第2のバッファ7の値
が読み出されて内部バス2を介して第1のラッチ回路12
へ転送されて第1のラッチ回路12に格納される動作と同
時並行して評価レジスタ10の値が読み出されて第2のラ
ッチ回路13へ転送されて第2のラッチ回路13に格納され
同時に評価レジスタ11の値が読み出されて第3のラッチ
回路14へ転送されて第3のラッチ回路14に格納される。
ALU 15は命令コードの中のFUNC1に記述されている算術
論理演算の指示に基づき第2のラッチ回路13の値と第3
のラッチ回路14の値との間で所定の演算を実行し、該実
行結果は同期用クロック信号の立下りで評価レジスタ11
へ転送されて格納される。
(2) FLD (FUNC1), R Y When the operation of the execution unit of the pipeline is started in synchronization with the rising edge of the synchronizing clock signal, the value of the second buffer 7 is read out and the internal bus is read. 1 through the first latch circuit 12
The value of the evaluation register 10 is read in parallel with the operation of being transferred to and stored in the first latch circuit 12 and transferred to the second latch circuit 13 and stored in the second latch circuit 13 and simultaneously. The value of the evaluation register 11 is read out, transferred to the third latch circuit 14, and stored in the third latch circuit 14.
The ALU 15 determines the value of the second latch circuit 13 and the third value based on the instruction of arithmetic logic operation described in FUNC1 in the instruction code.
A predetermined operation is performed between the value of the latch circuit 14 and the value of the latch circuit 14, and the execution result is obtained at the fall of the synchronization clock signal.
Is transferred to and stored.

【0021】(3) FST (FUNC1) 、RZ パイプラインの実行部の動作が前記クロック信号の立上
りに同期して開始されると、評価レジスタ10の値が読み
出されて第2のラッチ回路13に転送されて格納される動
作及び評価レジスタ11の値が読み出されて第3のラッチ
回路14へ転送されて第3のラッチ回路14に格納される動
作と並行してALU 15は命令コード中のFUNC1 に記述され
ている算術論理演算の指示に基づき第2のラッチ回路13
の値と第3のラッチ回路14の値との間で所定の演算を実
行し、演算結果は同期用クロック信号の立下りでレジス
タ16へ転送されてレジスタ16に格納される。前記演算結
果は前記クロック信号が消滅した後に新たに生ずる次の
クロック信号の立上りに同期して内部バス3に送出さ
れ、内部バス3上の値は書き込み回路8に取り込まれて
格納され、書き込み回路8の値は汎用レジスタ群4の中
の指定された汎用レジスタ又はデータレジスタ5へ転送
される。
(3) FST (FUNC1), When the operation of the execution unit of the R Z pipeline is started in synchronization with the rising edge of the clock signal, the value of the evaluation register 10 is read out and the second latch circuit is read. In parallel with the operation of being transferred and stored in 13 and the value of the evaluation register 11 being read and transferred to the third latch circuit 14 and being stored in the third latch circuit 14, the ALU 15 has an instruction code Second latch circuit 13 based on the instruction of arithmetic logic operation described in FUNC1
A predetermined operation is executed between the value of the above and the value of the third latch circuit 14, and the operation result is transferred to the register 16 and stored in the register 16 at the falling edge of the synchronizing clock signal. The calculation result is sent to the internal bus 3 in synchronization with the rising of the next clock signal that newly occurs after the clock signal disappears, and the value on the internal bus 3 is fetched and stored in the write circuit 8 to be stored in the write circuit. The value of 8 is transferred to the designated general purpose register in the general purpose register group 4 or the data register 5.

【0022】(4) JCN (FUN4)、OFF パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、評価レジスタ10の値
が読み出されて第2のラッチ回路へ転送されて格納され
る動作と同時並行して評価レジスタ11の値が読み出され
て第3のラッチ回路14へ転送されて格納される。ALU 15
は命令コード中のFUN1に記述されている算術論理演算の
種類の指示に基づき第2のラッチ回路13の値と第3のラ
ッチ回路14の値との間で所定の演算を実行し、演算結果
は同期用クロック信号の立下りに同期してレジスタ16へ
転送されてレジスタ16に格納される。前記同期用クロッ
ク信号が消滅した後に新たに生ずる次のクロック信号の
立上りに同期してレジスタ16の値が0であるか0でない
か判断する動作と同時並行してプログラムカウンタ17の
値は内部バス1を介して第3のラッチ回路14へ転送され
た後に第3のラッチ回路14に格納され、さらに即値オフ
セットレジスタ26の値は内部バス2を介して第2のラッ
チ回路13へ転送された後に第2のラッチ回路13に格納さ
れ、ALU 15は第2のラッチ回路13の値と第3のラッチ回
路14の値とを加算し加算結果を求める。
(4) JCN (FUN4), OFF When the operation of the execution unit of the pipeline is started in synchronization with the rising edge of the synchronizing clock signal, the value of the evaluation register 10 is read out and the second latch is read. The value of the evaluation register 11 is read in parallel with the operation of being transferred to and stored in the circuit and transferred to and stored in the third latch circuit 14. ALU 15
Executes a predetermined operation between the value of the second latch circuit 13 and the value of the third latch circuit 14 based on the instruction of the type of arithmetic logic operation described in FUN1 in the instruction code, and the operation result Is transferred to the register 16 and stored in the register 16 in synchronization with the falling edge of the synchronizing clock signal. The value of the program counter 17 is set to the internal bus in parallel with the operation of judging whether the value of the register 16 is 0 or not in synchronization with the rising of the next clock signal newly generated after the synchronizing clock signal disappears. After being transferred to the third latch circuit 14 via 1 and then stored in the third latch circuit 14, the value of the immediate offset register 26 is transferred to the second latch circuit 13 via the internal bus 2 Stored in the second latch circuit 13, the ALU 15 adds the value of the second latch circuit 13 and the value of the third latch circuit 14 to obtain the addition result.

【0023】前記判断した値が0でない場合に限り、前
記同期用クロック信号が消滅した後に新たに生ずる次の
同期用クロック信号の立上りに同期してALU 15が求めた
加算結果は同期用クロック信号の立下りでレジスタ16へ
転送されてレジスタ16に格納され、さらにBIU 23へ転送
されてBIU 23に格納される。同期用クロック信号が消滅
した後に新たに生ずる次の同期用クロック信号の立上り
に同期してBIU 23が図示しないメモリから命令をアクセ
スする動作と同時並行してレジスタ16の値はNPC 19へ転
送されてNPC 19に格納され、同期用クロック信号の立下
りに同期してNPC 19の値が読み出されてプログラムカウ
ンタ17へ転送されて格納される。前記判断した値が0で
ある場合にはALU 15において加算された値は捨てられ、
他の回路には加算された値は使用されない。
Only when the judged value is not 0, the addition result obtained by the ALU 15 in synchronization with the rising edge of the next synchronizing clock signal newly generated after the synchronizing clock signal disappears is the synchronizing clock signal. Is transferred to the register 16 and stored in the register 16 at the falling edge of, and further transferred to the BIU 23 and stored in the BIU 23. The value of register 16 is transferred to NPC 19 in parallel with the operation of BIU 23 accessing an instruction from a memory (not shown) in synchronization with the next rising edge of the next synchronizing clock signal generated after the synchronizing clock signal disappears. Are stored in the NPC 19, and the value of the NPC 19 is read in synchronization with the falling edge of the synchronization clock signal, transferred to the program counter 17, and stored therein. If the determined value is 0, the value added in ALU 15 is discarded,
The added value is not used for other circuits.

【0024】(5) MOV RX 、RZ パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、第2のバッファ7か
ら読み出された値は内部バス2を介して第2のラッチ回
路13へ転送されて、該第2のラッチ回路13に格納され、
同期用クロック信号の立下りに同期して第2のラッチ回
路13の値と、予め0に設定されている第3のラッチ回路
14の値とがALU 15を用いて加算されてレジスタ16へ転送
されてレジスタ16に格納される。同期用クロック信号が
消滅した後に新たに生ずるクロック信号の立上りに同期
してレジスタ16の値が内部バス3を介して書き込み回路
26へ転送されて書き込み回路26に格納され、書き込み回
路26の値は指定された汎用レジスタ又はデータレジスタ
5に転送されて格納される。
(5) When the operation of the MOV R X , R Z pipeline execution unit is started in synchronization with the rising edge of the synchronizing clock signal, the value read from the second buffer 7 is transferred to the internal bus. Is transferred to the second latch circuit 13 via 2 and stored in the second latch circuit 13,
The value of the second latch circuit 13 and the third latch circuit preset to 0 are synchronized with the falling edge of the synchronizing clock signal.
The value of 14 and the value of 14 are added by using the ALU 15, transferred to the register 16, and stored in the register 16. The value of the register 16 is written to the write circuit via the internal bus 3 in synchronization with the rising edge of the clock signal newly generated after the synchronization clock signal disappears.
It is transferred to 26 and stored in the write circuit 26, and the value of the write circuit 26 is transferred to and stored in the designated general-purpose register or data register 5.

【0025】(6) RDM RX 、OFF パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、第1のバッファ6か
ら読み出された値が内部バス1を介して第2のラッチ回
路13へ転送されて、第2のラッチ回路13に格納される動
作と同時並行して即値オフセットレジスタ26から読み出
された値は内部バス2を介して第3のラッチ回路14へ転
送されて、第3のラッチ回路14に格納される。同期用ク
ロック信号の立下りに同期してALU 15は第2のラッチ回
路13の値と第3のラッチ回路14の値とを加算し、加算結
果はMAレジスタ20へ転送されて、MAレジスタ20に格納さ
れる。同期用クロック信号が消滅した後に生ずる新たな
同期用クロック信号の立上りに同期してMAレジスタ20の
値がアドレス情報としてBIU 23へ転送され、BIU 23は外
部アドレスバス81を介して図示しないメモリへ前記アド
レス情報を転送し、図示しないメモリはBIU 23から転送
されたアドレスに従い格納されている命令コードを読み
出して該命令コードを外部データバス80へ送出し、該BI
U 23は外部データバス80上の命令コードを取り込んで命
令レジスタ25へ転送する。
(6) RDM R X , OFF When the operation of the execution unit of the pipeline is started in synchronization with the rising of the synchronizing clock signal, the value read from the first buffer 6 is transferred to the internal bus 1 The value read from the immediate value offset register 26 is transferred to the second latch circuit 13 via the internal bus 2 at the same time as the operation stored in the second latch circuit 13. It is transferred to the latch circuit 14 and stored in the third latch circuit 14. The ALU 15 adds the value of the second latch circuit 13 and the value of the third latch circuit 14 in synchronization with the fall of the synchronization clock signal, and the addition result is transferred to the MA register 20 and the MA register 20 Stored in. The value of the MA register 20 is transferred to the BIU 23 as address information in synchronization with the rising edge of a new synchronization clock signal that occurs after the synchronization clock signal disappears, and the BIU 23 is transferred to a memory (not shown) via the external address bus 81. The address information is transferred, a memory (not shown) reads the stored instruction code according to the address transferred from the BIU 23, and sends the instruction code to the external data bus 80.
U 23 takes in the instruction code on the external data bus 80 and transfers it to the instruction register 25.

【0026】(7) WRM RX 、OFF パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、第1のバッファ6か
ら読み出された値が内部バス1を介して第3のラッチ回
路14へ転送されて第3のラッチ回路14に格納される動作
と同時並行して即値オフセットレジスタ26から読み出さ
れた値は内部バス2を介して第2のラッチ回路13へ転送
されて、第2のラッチ回路13に格納される。ALU 15は第
2のラッチ回路13の値と第3のラッチ回路14の値とを加
算して加算結果を求め、同期用クロック信号の立下りに
同期してALU 15は前記加算結果をMAレジスタ20へ転送
し、MAレジスタ20は前記加算結果を格納する。同期用ク
ロック信号が消滅した後に生ずる新たな同期用クロック
信号の立上りに同期してMAレジスタ20の値とデータレジ
スタ5の値とがBIU 23へ転送され、BIU 23は該MAレジス
タ20の値を外部アドレスバス81へ転送し、データレジス
タ5の値を外部データバス80へ送出する。
[0026] (7) WRM R X, when the operation of the execution unit of the OFF pipeline is started in synchronization with the rising edge of the synchronous clock signal, the value read from the first buffer 6 internal bus 1 The value read from the immediate offset register 26 at the same time as the operation of being transferred to the third latch circuit 14 and stored in the third latch circuit 14 through the second latch via the internal bus 2. It is transferred to the circuit 13 and stored in the second latch circuit 13. The ALU 15 adds the value of the second latch circuit 13 and the value of the third latch circuit 14 to obtain the addition result, and the ALU 15 synchronizes the addition result with the MA register in synchronization with the fall of the synchronizing clock signal. 20 and the MA register 20 stores the addition result. The value of the MA register 20 and the value of the data register 5 are transferred to the BIU 23 in synchronization with the rising edge of a new synchronizing clock signal that occurs after the synchronizing clock signal disappears, and the BIU 23 changes the value of the MA register 20. The data is transferred to the external address bus 81 and the value of the data register 5 is sent to the external data bus 80.

【0027】(8) JMP OFF パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、プログラムカウンタ
17の値が読み出されて内部バス1を介して第3のラッチ
回路14へ転送されて第3のラッチ回路14に格納される動
作と同時並行して即値オフセットレジスタ26の値が読み
出されて内部バス2を介して第2のラッチ回路13へ転送
されて第2のラッチ回路13に格納される。同期用クロッ
ク信号の立下りに同期してALU 15は第2のラッチ回路13
の値と第3のラッチ回路14の値とを加算して加算結果を
求め、加算結果はレジスタ16及びBIU 23に転送されて格
納される。同期用クロック信号が消滅した後に生ずる新
たな同期用クロック信号の立上りに同期してレジスタ16
の値が読み出されてNPC 19へ転送されてNPC 19に格納さ
れる動作と同時並行してBIU 23の値は図示しないメモリ
へアドレス情報として転送されて、図示しないメモリか
ら命令コードが読み出され、同期用クロック信号の立下
りに同期してNPC 19の値がプログラムカウンタ17へ転送
されてプログラムカウンタ17に格納される。
(8) When the operation of the execution unit of the JMP OFF pipeline is started in synchronization with the rising edge of the synchronizing clock signal, the program counter
The value of 17 is read out, transferred to the third latch circuit 14 via the internal bus 1, and stored in the third latch circuit 14. At the same time, the value of the immediate offset register 26 is read out. Are transferred to the second latch circuit 13 via the internal bus 2 and stored in the second latch circuit 13. The ALU 15 has the second latch circuit 13 in synchronization with the falling edge of the synchronization clock signal.
Value and the value of the third latch circuit 14 are added to obtain an addition result, and the addition result is transferred to and stored in the register 16 and BIU 23. The register 16 is synchronized with the rising edge of a new synchronizing clock signal generated after the synchronizing clock signal disappears.
The value of BIU 23 is read out and transferred to NPC 19 and stored in NPC 19 at the same time as the value of BIU 23 is transferred to the memory (not shown) as address information, and the instruction code is read from the memory (not shown). Then, the value of the NPC 19 is transferred to the program counter 17 and stored in the program counter 17 in synchronization with the falling edge of the synchronizing clock signal.

【0028】(9) ALL RY パイプラインの実行部の動作が前記クロック信号の立上
りに同期して開始されるとデコーダ9内に存在する汎用
レジスタ群4のアクセスの起点の情報を記憶しているポ
インタ30の内容が読み出されて内部バス1を介して第3
のラッチ回路14へ転送されて第3のラッチ回路14に格納
される動作と同時並行して第2のバッファ7の値が読み
出されて内部バス2を介して第2のラッチ回路13へ転送
されて第2のラッチ回路13に格納される。同期用クロッ
ク信号の立下りに同期してALU 15は第3のラッチ回路14
の値と第2のラッチ回路の値との減算を実行し、減算結
果はレジスタ16へ転送されてレジスタ16に格納される。
同期用クロック信号が消滅した後に生ずる新たな同期用
クロック信号の立下りに同期してレジスタ16の値が読み
出されて内部バス3を介して前記ポインタ30へ転送され
て格納される。
(9) When the operation of the execution unit of the ALL RY pipeline is started in synchronization with the rising edge of the clock signal, the information of the starting point of access of the general-purpose register group 4 existing in the decoder 9 is stored. The contents of the pointer 30 being read are read out via the internal bus 1 to the third
Value of the second buffer 7 is read in parallel with the operation of being transferred to the latch circuit 14 and stored in the third latch circuit 14 and transferred to the second latch circuit 13 via the internal bus 2. It is stored in the second latch circuit 13. In synchronization with the falling edge of the synchronization clock signal, the ALU 15 is connected to the third latch circuit 14
Is subtracted from the value of the second latch circuit, and the subtraction result is transferred to the register 16 and stored in the register 16.
The value of the register 16 is read in synchronization with the falling edge of a new synchronizing clock signal that occurs after the synchronizing clock signal disappears, and is transferred to the pointer 30 via the internal bus 3 and stored therein.

【0029】(10) FRE RY ALL RY 命令は第2のラッチ回路13の値と第3のラッチ
回路14の値との演算を実行するとALU 15に対して減算を
指示するが、当該命令はALU 15に対して加算を指示す
る。この点を除き、ALL RY 命令と当該命令とは同様の
動作を行なうので、当該命令の説明を省略する。
(10) The FRE RY ALL RY instruction instructs the ALU 15 to perform subtraction when the operation of the value of the second latch circuit 13 and the value of the third latch circuit 14 is executed. Instructs ALU 15 to add. Except for this point, the ALL RY instruction and the instruction operate in the same manner, and therefore the description of the instruction is omitted.

【0030】図3は図1,2のデコーダ9の詳細なブロ
ック図である。図において、30は汎用レジスタ群4のア
クセスの起点を示す第1の情報を格納する第1の記憶手
段としてのポインタである。ポインタ30と命令コード中
のレジスタフィールドRX (又はRY )の相補信号が載
る信号線31 (又は32) とは、加算器33 (又は34) の入力
端子に接続されている。加算器33 (又は34) の出力端子
は加算結果を与えるためにRX デコーダ45 (又はRY
コーダ46) の入力端子に接続され、RX デコーダ45 (又
はRY デコーダ46) の出力端子信号は第1のバッファ6
(又は第2のバッファ7)へデータを転送するレジスタ
を選択するため、汎用レジスタ群4及びデータレジスタ
5に与えられる。
FIG. 3 is a detailed block diagram of the decoder 9 of FIGS. In the figure, 30 is a pointer as a first storage means for storing first information indicating the starting point of access to the general-purpose register group 4. The pointer 30 and the signal line 31 (or 32) carrying the complementary signal of the register field R X (or R Y ) in the instruction code are connected to the input terminal of the adder 33 (or 34). An output terminal of the adder 33 (or 34) is connected to the input terminal of the R X-decoder 45 to provide the addition result (or R Y decoder 46), an output terminal signal of R X decoder 45 (or R Y decoder 46) Is the first buffer 6
(Or the second buffer 7) In order to select a register for transferring data, it is given to the general-purpose register group 4 and the data register 5.

【0031】前記加算器33 (又は34) の出力端子はその
加算結果を一時的にラッチする第5のラッチ回路35 (又
は第6のラッチ回路36) の入力端子に接続されている。
第5のラッチ回路35 (又は第6のラッチ回路36) の出力
端子は第9のラッチ回路37の入力端子に接続されてい
る。第9のラッチ回路37の出力端子は第10のラッチ回路
38の入力端子に接続されている。第10のラッチ回路38の
出力端子はRZ デコーダ47の入力端子に接続されてい
る。RZ デコーダ47の出力信号は汎用レジスタ群4、デ
ータレジスタ5の中から書き込み回路8のデータを転送
するレジスタを選択するため汎用レジスタ群4及びデー
タレジスタ5に与えられる。前記信号線31 (又は32) に
接続されている検出回路39 (又は40) は前記信号線31
(又は32) の中にデータレジスタ5を指定する信号を検
出した場合にRX デコーダ45 (又はRYデコーダ46) 及
びRZ デコーダ47に対して汎用レジスタ群4、データレ
ジスタ5の中からデータレジスタ5を選択するように信
号を送出する。さらに検出回路39(又は40) の出力端子
はRX デコーダ45 (又はRY デコーダ46) の入力端子に
接続されている。前記検出回路39 (又は40) の出力端子
はその出力を一時的にラッチする第7のラッチ回路41
(又は第8のラッチ回路42) の入力端子に接続されてい
る。
The output terminal of the adder 33 (or 34) is connected to the input terminal of the fifth latch circuit 35 (or sixth latch circuit 36) for temporarily latching the addition result.
The output terminal of the fifth latch circuit 35 (or the sixth latch circuit 36) is connected to the input terminal of the ninth latch circuit 37. The output terminal of the ninth latch circuit 37 is the tenth latch circuit.
Connected to 38 input terminals. The output terminal of the tenth latch circuit 38 is connected to the input terminal of the R Z decoder 47. The output signal of the R Z decoder 47 is given to the general-purpose register group 4 and the data register 5 for selecting the register to transfer the data of the write circuit 8 from the general-purpose register group 4 and the data register 5. The detection circuit 39 (or 40) connected to the signal line 31 (or 32) is
(Or 32), when a signal designating the data register 5 is detected, the data from the general-purpose register group 4 and the data register 5 is sent to the R X decoder 45 (or R Y decoder 46) and the R Z decoder 47. A signal is sent to select the register 5. Further, the output terminal of the detection circuit 39 (or 40) is connected to the input terminal of the R X decoder 45 (or R Y decoder 46). The output terminal of the detection circuit 39 (or 40) is a seventh latch circuit 41 for temporarily latching its output.
(Or is connected to the input terminal of the eighth latch circuit 42).

【0032】第7のラッチ回路41 (又は第5のラッチ回
路35) の出力端子及び第8のラッチ回路42 (又は第6の
ラッチ回路36) の出力端子は信号遅延手段として第11の
ラッチ回路43 (又は第9のラッチ回路37) の入力端子に
接続され、第11のラッチ回路43 (又は第9のラッチ回路
37) の出力端子は信号遅延手段としての第12のラッチ回
路44 (又は第10のラッチ回路38) の入力端子に接続さ
れ、第12のラッチ回路44(又は第10のラッチ回路38) の
出力端子はRZ デコーダ47の入力端子に接続されてい
る。ここで第5、第6、第7、第8、第9、第10、第11
及び第12のラッチ回路35,36,41,42,37,38,43及び44は信
号線31,32 の値、加算器33又は34の加算結果のいずれか
の値をRZ デコーダ47へ送出するための信号遅延手段で
ある。
The output terminal of the seventh latch circuit 41 (or the fifth latch circuit 35) and the output terminal of the eighth latch circuit 42 (or the sixth latch circuit 36) serve as a signal delay means for the eleventh latch circuit. 43 (or ninth latch circuit 37) connected to the input terminal of the eleventh latch circuit 43 (or ninth latch circuit 37)
The output terminal of 37) is connected to the input terminal of the 12th latch circuit 44 (or the 10th latch circuit 38) as the signal delay means, and the output of the 12th latch circuit 44 (or the 10th latch circuit 38). The terminal is connected to the input terminal of the R Z decoder 47. 5th, 6th, 7th, 8th, 9th, 10th, 11th
And the twelfth latch circuits 35, 36, 41, 42, 37, 38, 43 and 44 send the value of the signal lines 31, 32 or the value of the addition result of the adder 33 or 34 to the R Z decoder 47. It is a signal delay means for

【0033】第9のラッチ回路37、第11のラッチ回路43
は同期用クロック信号の立上りでデータをラッチする。
第5のラッチ回路35、第6のラッチ回路36、第7のラッ
チ回路41、第8のラッチ回路42、第10のラッチ回路38、
第12のラッチ回路44は同期用クロック信号の立下りでデ
ータをラッチするものとする。なお、図中の○印はトラ
ンスファーゲート、バッファ等の電気スイッチであり、
全ての電気スイッチはその接続又は非接続を制御する制
御回路27に接続されている。
The ninth latch circuit 37 and the eleventh latch circuit 43
Latches data at the rising edge of the synchronizing clock signal.
A fifth latch circuit 35, a sixth latch circuit 36, a seventh latch circuit 41, an eighth latch circuit 42, a tenth latch circuit 38,
The twelfth latch circuit 44 latches data at the falling edge of the synchronizing clock signal. The circles in the figure are electrical switches such as transfer gates and buffers,
All electrical switches are connected to a control circuit 27 which controls their connection or disconnection.

【0034】汎用レジスタ群4には32個の汎用レジスタ
が有り、32個の汎用レジスタそれぞれにレジスタ番号と
して0番から31番迄通し番号R0,R1,R2,R3 …R31 を付
す。命令コード中のレジスタ番号を示すレジスタフィー
ルドRX 、RY は各4ビットで構成され、従ってレジス
タ番号は0から15まで指定が可能である。さらにレジス
タフィールドRX (又はRY )にレジスタ番号0が指定
された場合には、RX デコーダ45 (又はRY デコーダ4
6) 及びRZ デコーダ47はデータレジスタ5を指定する
ものとする。いまポインタ30に数値として ■16" が格
納されているものとする。レジスタフィールドRX (又
はRY )が ■15" を指定すると ■15" は2進数では
「1111」となり、信号線31 (又は32) は「0000」、即ち
数値の ■0"となる。従って加算器33 (又は34) は数値
■16" と数値 ■0" とを加算し、加算結果として得ら
れた数値 ■16" を用いてRX デコーダ45 (又はRY
コーダ46) は汎用レジスタ群4の中のR16 の汎用レジス
タを選択する。
There are 32 general-purpose registers in the general-purpose register group 4, and serial numbers R0, R1, R2, R3 ... R31 are assigned to the 32 general-purpose registers as register numbers 0 to 31, respectively. The register fields R X and R Y indicating the register number in the instruction code are each composed of 4 bits, so that the register number can be specified from 0 to 15. Further, when the register number 0 is designated in the register field R X (or R Y ), the R X decoder 45 (or R Y decoder 4
6) and the R Z decoder 47 designates the data register 5. It is now assumed that the pointer 30 stores a numerical value of "16". When the register field R X (or R Y ) specifies "15", "15" becomes a binary number "1111", and the signal line 31 ( Or 32) becomes "0000", that is, the numerical value {circle around (0)}. Therefore, the adder 33 (or 34) adds the numerical value {circle around (16)} and the numerical value {circle around (0)} to obtain the numerical value {circle around (16)}. The R X decoder 45 (or R Y decoder 46) selects the general register of R16 in the general register group 4 by using.

【0035】次に図示しないメモリのOFF1番地とOFF2番
地とに格納されているデータを加算して加算結果をR11
に格納するプログラムをサブルーチンとして記述する方
法を図4、5を用いて説明する。図4はこの処理のプロ
グラムリストであり、図5は図4のプログラムのフロー
チャートである。図4のサブルーチンが実行されると
き、サブルーチン呼出し命令によりサブルーチンが使用
される契機が予め判明している場合と、マイクロコンピ
ュータ外部よりの割込み信号によりサブルーチンが使用
されるので割込み信号の直前までサブルーチンが使用さ
れることが不明である場合とがある。ここで汎用レジス
タR13 、R14 及びR15 は前記いずれの場合であってもサ
ブルーチンにおいて常時使用が可能である汎用レジスタ
として用意するものとする。
Next, the data stored in the OFF1 address and the OFF2 address of the memory (not shown) are added and the addition result is R11.
A method of describing the program stored in the above as a subroutine will be described with reference to FIGS. FIG. 4 is a program list of this processing, and FIG. 5 is a flowchart of the program of FIG. When the subroutine shown in FIG. 4 is executed, the trigger for using the subroutine is known in advance by the subroutine call instruction, and the subroutine is used by the interrupt signal from the outside of the microcomputer. Sometimes it is unknown to be used. Here, the general-purpose registers R13, R14, and R15 are prepared as general-purpose registers that can always be used in the subroutine in any of the above cases.

【0036】図5においてアクセスの起点の情報を格納
するポインタ30の値をALL #3の命令コードを用いて3
だけ減じ、RX デコーダ45 (又はRY デコーダ46) が選
択する汎用レジスタ番号を3だけ減じる。このときポイ
ンタ30の値は ■16" から ■13" に減じているので、ポ
インタ30の値を減じる前の汎用レジスタR13 、R14 及び
R15 はポインタ30の値を3だけ減じた後も同じR13 、R1
4 及びR15 の組合わせとして使用することができ、従っ
てR13 、R14 及びR15 は同一のレジスタ番号を有する作
業レジスタの組合せとして確保することができる(S1)。
次にデータレジスタ5の値をMOV DATA,R13の命令コード
を用いてR13 に退避し(S2)、R14 の値をMOV #0,R14
の命令コードを用いてクリアし(S3)、OFF1番地のデータ
をRDM R14,OFF1の命令コードを用いて読み出してデータ
レジスタ5へ転送し(S4)、データレジスタ5の値をMOV
DATA,R15の命令コードを用いて汎用レジスタR15 に退避
し(S5)、OFF2番地のデータをRDM R14,OFF2の命令コード
を用いて読み出してデータレジスタ5へ転送し(S6)、デ
ータレジスタ5の値と汎用レジスタR15 の値とをLDD (A
DD),R11 の命令コードを用いて汎用レジスタR11 に格納
し(S7)、汎用レジスタR13 の値をMOV R13,DATAの命令コ
ードを用いてデータレジスタ5に復帰させる(S8)。そし
て、ポインタ30の値をFRE #3の命令コードを用いて3
だけ増し、RX デコーダ45又はRY デコーダ46が選択す
る汎用レジスタ番号を増すことによりR13 、R14 及びR1
5 の3個を解放し(S9)、リターン命令を示す命令コード
RET を用いてサブルーチンからメインルーチンへ戻る(S
10) 。
In FIG. 5, the value of the pointer 30 for storing the information of the access starting point is set to 3 by using the instruction code of ALL # 3.
And the general register number selected by the R X decoder 45 (or the R Y decoder 46) is decreased by 3. At this time, the value of pointer 30 has been reduced from 16 "to 13", so general register R13, R14 and
R15 remains the same after decrementing the value of pointer 30 by 3, R13, R1
4 and R15 can be used as a combination, so that R13, R14 and R15 can be reserved as a combination of working registers having the same register number (S1).
Next, the value of data register 5 is saved in R13 using the instruction code of MOV DATA, R13 (S2), and the value of R14 is MOV # 0, R14.
Clear using the instruction code of (S3), read the data of the OFF1 address using the instruction code of RDM R14, OFF1 and transfer it to the data register 5 (S4), and move the value of the data register 5 to MOV.
Saved to general-purpose register R15 using the instruction code of DATA and R15 (S5), read the data at the OFF2 address using the instruction code of RDM R14 and OFF2, and transfer it to data register 5 (S6). LDD (A
It is stored in the general-purpose register R11 using the instruction code of DD) and R11 (S7), and the value of the general-purpose register R13 is restored to the data register 5 using the instruction code of MOV R13, DATA (S8). Then, the value of the pointer 30 is set to 3 using the instruction code of FRE # 3.
R13, R14 and R1 by increasing the general register number selected by R X decoder 45 or R Y decoder 46
An instruction code indicating the return instruction by releasing 3 of 5 (S9)
Return from the subroutine to the main routine using RET (S
Ten) .

【0037】以上説明したように、当該サブルーチンに
おいてデータレジスタ5、汎用レジスタR13 、R14 及び
R15 のレジスタの値をメモリに退避する処理が不要であ
るので、従来のマイクロコンピュータに比べ本発明のマ
イクロコンピュータはサブルーチンの実行に際し高速で
処理をすることが可能である。さらに当該サブルーチン
においてR13 、R14 及びR15 の汎用レジスタをALL #
3、FRE #3の命令コードを用いて確保し解放したが、
ALL #3、FRE #3の命令コードの数値 ■3"を ■4"
以上の数値に変更した場合には更に多数の汎用レジス
タを確保することができるので、サブルーチンにおいて
作業用レジスタとして使用する汎用レジスタを追加又は
減少する場合に追加又は減少する汎用レジスタに応じて
その都度サブルーチンの命令コードを追加又は減少する
必要がなくプログラマーの労力と手間とを省略すること
ができる。
As described above, the data register 5, general-purpose registers R13, R14 and
Since the process of saving the value of the register of R15 in the memory is unnecessary, the microcomputer of the present invention can perform the process at a high speed when executing the subroutine as compared with the conventional microcomputer. In addition, the general registers of R13, R14, and R15 are all
It was secured and released using the instruction code of FRE # 3.
Numerical value of instruction code of ALL # 3 and FRE # 3 ■ 3 "to ■ 4"
Since more general-purpose registers can be secured when the above numerical values are changed, when adding or decreasing general-purpose registers used as working registers in a subroutine, the number of general-purpose registers to be added or decreased is changed accordingly. There is no need to add or reduce the instruction code of the subroutine, and the labor and time of the programmer can be saved.

【0038】図6は図1,2のデコーダ9の他の実施例
を示すブロック図である。図において94は使用可能なグ
ローバルレジスタの個数を第3の情報として格納する第
2の記憶手段としてのレジスタである。いま、使用可能
なグローバルレジスタが4個であるものとする。すると
■4" は2進数で「0100」となるので、その相補の信
号「1011」がレジスタ94に格納されている。31 (又は3
2) は第2の情報として命令コード中のレジスタフィー
ルドRX (又はRY )の値の相補信号が載る信号線であ
る。
FIG. 6 is a block diagram showing another embodiment of the decoder 9 shown in FIGS. In the figure, 94 is a register as a second storage means for storing the number of usable global registers as third information. Now, it is assumed that there are four global registers that can be used. Then, (4) becomes a binary number "0100", and the complementary signal "1011" is stored in the register 94. 31 (or 3
2) is a signal line on which a complementary signal of the value of the register field R X (or R Y ) in the instruction code is carried as the second information.

【0039】比較回路390(又は400)は信号線31 (又は3
2) の値と定数「1011」とを比較して信号線31 (又は32)
2の値が定数「1011」より小さい場合には信号 ■0" を
出力して電気スイッチ90 (又は92) をオフするようスイ
ッチ90 (又は92) に接続され、かつ電気スイッチ91 (又
は93) をオンするように反転回路48 (又は49) の入力端
子に接続され、反転回路48 (又は49) の出力端子はスイ
ッチ91 (又は93) に接続されている。スイッチ90及び92
(又は91及び93) の一端は信号 ■0" である端子 (又
はポインタ30の出力端子) に各接続され、その他端は加
算器33 (又は34) の入力端子に信号線31 (又は32) と共
に接続されている。
The comparator circuit 390 (or 400) is connected to the signal line 31 (or 3).
Compare the value of 2) with the constant "1011", and then use the signal line 31 (or 32).
When the value of 2 is smaller than the constant "1011", it is connected to the switch 90 (or 92) to output the signal 0 "and turn off the electric switch 90 (or 92), and the electric switch 91 (or 93). Is connected to the input terminal of the inverting circuit 48 (or 49), and the output terminal of the inverting circuit 48 (or 49) is connected to the switch 91 (or 93).
One end of (or 91 and 93) is connected to the terminal (or the output terminal of pointer 30) which is signal 0 ", and the other end is connected to the input terminal of adder 33 (or 34) by signal line 31 (or 32). Is connected with.

【0040】加算器33 (又は34) はスイッチ90 (又は9
2) 若しくはスイッチ91 (又は93) を介して加算器33
(又は34) に入力されたレジスタ94の値若しくはポイン
タ30の値と信号線31 (又は32) の値とを加算して加算結
果をRX デコーダ45 (又はRY デコーダ46) 及び第5の
ラッチ回路35 (又は第6のラッチ回路36) に出力すべく
接続されている。これらの回路を除き図6のブロック図
の回路は図3のブロック図の回路と同様であり、同一の
参照符号を付して説明を省略する。
The adder 33 (or 34) is a switch 90 (or 9
2) Or adder 33 via switch 91 (or 93)
(Or 34) and the value of the register 94 or the value of the pointer 30 and the value of the signal line 31 (or 32) input to the R X decoder 45 (or R Y decoder 46) and the fifth addition result. It is connected to the latch circuit 35 (or the sixth latch circuit 36) for output. Except for these circuits, the circuit of the block diagram of FIG. 6 is the same as the circuit of the block diagram of FIG. 3, and the same reference numerals are given to omit the description.

【0041】以下動作の説明をする。信号線31 (又は3
2) の値がレジスタ94の値より大きい又は等しい場合に
は比較回路39 (又は40) は電気スイッチ90 (又は92) を
オンし、電気スイッチ91 (又は93) をオフするので、加
算器33 (又は34) に信号線31 (又は32) と定数 ■0"
とが入力される。加算器33 (又は34) は信号線31 (又は
32) の値と定数 ■0" とを加算し、加算結果をRX
コーダ45 (又はRY デコーダ46) 又は第5 (又は第6)
のラッチ回路35 (又は36) 、第9のラッチ回路37、第10
のラッチ回路38を介してRZ デコーダ47へ送出する。R
X デコーダ45 (又はRY デコーダ46) 又はRZ デコーダ
47は加算結果により汎用レジスタ群4の中の加算結果に
対応する汎用レジスタをグローバルレジスタとして選択
する。
The operation will be described below. Signal line 31 (or 3
When the value of 2) is greater than or equal to the value of the register 94, the comparison circuit 39 (or 40) turns on the electric switch 90 (or 92) and turns off the electric switch 91 (or 93). (Or 34) on signal line 31 (or 32) and constant ■ 0 "
And are entered. The adder 33 (or 34) is connected to the signal line 31 (or
32) and the constant {circle around (0)} are added, and the addition result is obtained by the R X decoder 45 (or R Y decoder 46) or the fifth (or sixth).
Latch circuit 35 (or 36), ninth latch circuit 37,
It is sent to the R Z decoder 47 via the latch circuit 38. R
X decoder 45 (or R Y decoder 46) or R Z decoder
47 selects a general-purpose register corresponding to the addition result in the general-purpose register group 4 as a global register according to the addition result.

【0042】信号線31 (又は32) の値がレジスタ94の値
より小さい場合には比較回路39 (又は40) は電気スイッ
チ90 (又は92) をオフし、電気スイッチ91 (又は93) を
オンするので、加算器33 (又は34) に信号線31 (又は3
2) とポインタ30の値とが入力される。加算器39 (又は4
0) は信号線31 (又は32) の値とポインタ30の値とを加
算し、加算結果をRX デコーダ45 (又はRY デコーダ4
6) 又は又は第5 (又は第6) のラッチ回路35 (又は36)
、第9のラッチ回路37、第10のラッチ回路38を介して
Z デコーダへ送出する。RX デコーダ45 (又はRY
コーダ46) 又はRZデコーダ47は加算結果により汎用レ
ジスタ群4の中の加算結果に対応する汎用レジスタを選
択する。
When the value of the signal line 31 (or 32) is smaller than the value of the register 94, the comparison circuit 39 (or 40) turns off the electric switch 90 (or 92) and turns on the electric switch 91 (or 93). Therefore, adder 33 (or 34) to signal line 31 (or 3
2) and the value of pointer 30 are input. Adder 39 (or 4
0) adds the value of the signal line 31 (or 32) and the value of the pointer 30, and the addition result is the R X decoder 45 (or R Y decoder 4).
6) Or, or 5th (or 6th) latch circuit 35 (or 36)
, Through the ninth latch circuit 37 and the tenth latch circuit 38 to the R Z decoder. The R X decoder 45 (or R Y decoder 46) or R Z decoder 47 selects a general-purpose register corresponding to the addition result in the general-purpose register group 4 according to the addition result.

【0043】いま、命令コードのレジスタフィールドR
X (又はRY )が2進数の「0011」(レジスタ番号3)
であるものとする。そのとき信号線31 (又は32) の値は
「0011」の相補信号である「1100」となる。従って検出
回路390(又は400)は信号線31(又は32) の値「1100」と
レジスタ94の定数「1011」とを比較した結果、前者の値
が後者の定数より大きいので出力信号 ■1" を電気ス
イッチ90 (又は92) 及び反転回路48 (又は49) を介して
電気スイッチ91 (又は93) に転送する。その結果電気ス
イッチ90 (又は92) はオン、電気スイッチ91 (又は93)
はオフとなるので、加算器33 (又は34) は信号線31 (又
は32) の値「1100」と数値 ■0" とを加算し、加算結
果の数値 ■12" はRX デコーダ45 (又はRY デコーダ4
6) 、RZデコーダ47へ転送され、RX デコーダ45 (又は
Y デコーダ46) 、RZ デコーダ47は前記加算結果を用
いて汎用レジスタ群4の中から汎用レジスタR12 を選択
する。
Now, the register field R of the instruction code
X (or R Y ) is a binary number “0011” (register number 3)
Shall be At that time, the value of the signal line 31 (or 32) becomes "1100" which is a complementary signal of "0011". Therefore, the detection circuit 390 (or 400) compares the value "1100" of the signal line 31 (or 32) with the constant "1011" of the register 94, and as a result, the former value is larger than the latter constant. Via electrical switch 90 (or 92) and inverting circuit 48 (or 49) to electrical switch 91 (or 93), so that electrical switch 90 (or 92) is on and electrical switch 91 (or 93).
Since turned off, the adder 33 (or 34) is "adds the numerical result of addition ■ 12" and the value of the signal line 31 (or 32) "1100" Numerical ■ 0 is R X decoder 45 (or RY decoder 4
6) is transferred to the R Z decoder 47, and the R X decoder 45 (or the R Y decoder 46) and the R Z decoder 47 select the general purpose register R12 from the general purpose register group 4 using the addition result.

【0044】従ってレジスタフィールドRX (又は
Y )の値が2進数の「0011」(レジスタ番号3)であ
る場合にグローバルレジスタとして汎用レジスタR12 を
使用することができる。さらにレジスタフィールドRX
(又はRY )の値が2進数の「0010」 (レジスタ番号
2)、又は「0001」(レジスタ番号1)である場合に、
その相補信号「1011」、「1101」又は「1110」はレジス
タ94の値と比較して小である又は等しいので変更されず
にRX デコーダ45 (又はRY デコーダ46) 又はRZ デコ
ーダ47に転送され、汎用レジスタR11 、R12 、R13 及び
R14 はグローバルレジスタとして使用することができ
る。
Therefore, when the value of the register field R X (or R Y ) is a binary number "0011" (register number 3), the general register R12 can be used as a global register. Further register field R X
If the value of (or R Y ) is the binary number “0010” (register number 2) or “0001” (register number 1),
The complementary signal "1011", "1101" or "1110" is smaller than or equal to the value of the register 94, and therefore is not changed and is not changed by the R X decoder 45 (or R Y decoder 46) or the R Z decoder 47. Transferred to general purpose registers R11, R12, R13 and
R14 can be used as a global register.

【0045】更にレジスタ94に格納される定数「1011」
を別の定数に変更することにより、汎用レジスタ群4の
中でグローバルレジスタとして使用する汎用レジスタの
個数を変更することができる。従ってサブルーチンとメ
インルーチンとで汎用レジスタR11 、R12 、R13 及びR1
4 を作業用レジスタとして使用する場合にはレジスタ94
の値を「1011」とすることにより前記汎用レジスタR11
、R12 、R13 及びR14をレジスタ番号が変更しないグロ
ーバルレジスタとして使用することができる。なお、こ
のときに汎用レジスタR11 、R12 、R13 及びR14 を除く
汎用レジスタはグローバルレジスタとして使用すること
ができない通常の汎用レジスタである。
Further, the constant "1011" stored in the register 94
Can be changed to another constant to change the number of general-purpose registers used as global registers in the general-purpose register group 4. Therefore, general-purpose registers R11, R12, R13 and R1 are used in the subroutine and main routine.
Register 94 when using 4 as a working register
By setting the value of "1011" to the general-purpose register R11
, R12, R13 and R14 can be used as global registers whose register numbers do not change. At this time, the general-purpose registers except general-purpose registers R11, R12, R13, and R14 are ordinary general-purpose registers that cannot be used as global registers.

【0046】図7はデコーダ9の他の実施例を示すブロ
ック図である。図において、比較回路390(又は400)の入
力端子に汎用レジスタ群4中の汎用レジスタ53の出力端
子が接続されている。これを除く図7のブロック図の回
路は図6のブロック図の回路と同様であり、同一の参照
符号を付して説明を省略する。
FIG. 7 is a block diagram showing another embodiment of the decoder 9. In the figure, the output terminal of the general-purpose register 53 in the general-purpose register group 4 is connected to the input terminal of the comparison circuit 390 (or 400). Except for this, the circuit of the block diagram of FIG. 7 is the same as the circuit of the block diagram of FIG. 6, and the same reference numerals are given to omit the description.

【0047】以下、図7のブロック図の動作を説明す
る。MOV #n、RZ (汎用レジスタRZ に定数nを設定
する)のような命令コードを用いて汎用レジスタ53に定
数を設定する。いま、レジスタフィールドRX (又はR
Y )の相補信号である信号線31 (又は32) の値が汎用レ
ジスタ53の値より大きいか又は等しい場合には比較回路
390(又は400)は信号 ■1" を出力して電気スイッチ90
(又は92) をオンし、電気スイッチ91 (又は93) をオフ
するので加算器33 (又は34) は信号線31 (又は32) に定
数 ■0" を加算してRX デコーダ45(又はRY デコーダ
46) 又はRZ デコーダ47に送出する。このときRX デコ
ーダ45 (又はRY デコーダ46) 又はRZ デコーダ47はグ
ローバルレジスタを選択する。
The operation of the block diagram of FIG. 7 will be described below. A constant is set in the general-purpose register 53 using an instruction code such as MOV #n, R Z (sets a constant n in the general-purpose register R Z ). Now register field R X (or R
If the value of signal line 31 (or 32), which is the complementary signal of Y ), is greater than or equal to the value of general register 53, a comparison circuit
390 (or 400) outputs signal 1 "and electric switch 90
(Or 92) is turned on, the adder 33 (or 34) turned off so that the electrical switch 91 (or 93) by adding a constant ■ 0 "to the signal line 31 (or 32) R X decoder 45 (or R Y decoder
46) Or, send it to the R Z decoder 47. At this time, the R X decoder 45 (or the R Y decoder 46) or the R Z decoder 47 selects the global register.

【0048】一方、信号線31 (又は32) の値が汎用レジ
スタ53の値より小さい場合には比較回路390(又は400)は
信号 ■0" を出力して電気スイッチ90 (又は92) をオ
フし、電気スイッチ91 (又は93) をオンするので加算器
33 (又は34) は信号線31 (又は32) にポインタ30の値を
加算してRX デコーダ45 (又はRY デコーダ46) 又はR
Z デコーダ47に送出する。このときRX デコーダ45 (又
はRY デコーダ46) 又はRZ デコーダ47は汎用レジスタ
を選択する。
On the other hand, when the value of the signal line 31 (or 32) is smaller than the value of the general-purpose register 53, the comparison circuit 390 (or 400) outputs the signal {circle around (1)} "and the electric switch 90 (or 92) is turned off. Then, the electric switch 91 (or 93) is turned on.
33 (or 34) adds the value of the pointer 30 to the signal line 31 (or 32) and adds the value to the R X decoder 45 (or R Y decoder 46) or R
It is sent to the Z decoder 47. At this time, the R X decoder 45 (or R Y decoder 46) or R Z decoder 47 selects a general-purpose register.

【0049】いま汎用レジスタ53の設定値を「1100」と
する。レジスタフィールドRX (又はRY )の値「000
1」、「0010」又は「0011」の各相補信号「1110」、「1
101」又は「1100」が信号線31 (又は32) に載る場合に
限り信号線31 (又は32) の値は汎用レジスタ53の値より
大きいか又は等しいので前記相補信号「1110」、「110
1」又は「1100」がRX デコーダ45 (又はRY デコーダ4
6) 又はRZ デコーダ47に送出され、従ってRX デコー
ダ45 (又はRY デコーダ46) は汎用レジスタR14 、R13
又はR12 の3個をグローバルレジスタとして選択する。
Now, let us say that the set value of the general-purpose register 53 is "1100". Value of register field R X (or R Y ) "000
1 ”,“ 0010 ”or“ 0011 ”complementary signals“ 1110 ”,“ 1 ”
Only when 101 or 1100 is placed on the signal line 31 (or 32), the value of the signal line 31 (or 32) is greater than or equal to the value of the general-purpose register 53, so the complementary signals “1110” and “110
1 ”or“ 1100 ”is the R X decoder 45 (or R Y decoder 4
6) or to the R Z decoder 47, so that the R X decoder 45 (or the R Y decoder 46) is the general purpose registers R14, R13.
Or, select three of R12 as global registers.

【0050】以上説明したように汎用レジスタ53のグロ
ーバルレジスタの個数は命令コードにより設定すること
ができるので、作業用レジスタとしてグローバルレジス
タを使用する場合及びスタックメモリとしてグローバル
レジスタを使用する場合にはグローバルレジスタの数を
自由に設定することができる。従ってグローバルレジス
タの数が不足することはなくなるので汎用レジスタ値を
メモリに退避することは不要となり、プログラムを簡略
化及び高速化することができる。
As described above, since the number of global registers of the general-purpose register 53 can be set by the instruction code, when the global register is used as the working register and the global register is used as the stack memory, the global register is set to the global register. The number of registers can be set freely. Therefore, the number of global registers does not become insufficient, and it is not necessary to save the general-purpose register value in the memory, and the program can be simplified and speeded up.

【0051】[0051]

【発明の効果】以上説明したように第1の発明は加算手
段を用いて命令コードが有するレジスタ番号に関する第
2の情報にレジスタ番号に関する第1の情報を加算する
ことによりデコーダが選択するレジスタを変更すること
ができる。従ってレジスタの値をメモリに退避する命令
コードが不要となり、サブルーチンプログラムを簡略化
及び高速化することができる。
As described above, according to the first aspect of the present invention, the register selected by the decoder is selected by adding the first information regarding the register number to the second information regarding the register number included in the instruction code by using the adding means. Can be changed. Therefore, an instruction code for saving the value of the register in the memory becomes unnecessary, and the subroutine program can be simplified and speeded up.

【0052】さらに第2の発明は第2の記憶手段に記憶
されている第3の情報を変更することにより、使用する
ことができるグローバルレジスタの個数を変更すること
ができる。従ってグローバルレジスタの個数を増減する
都度命令コードを追加又は削除することが不要となり、
プログラムを簡略化及び高速化することができる。第
1、第2の発明はともにプログラムで使用するレジスタ
の数に応じて命令コードを追加又は削除することが不要
となり、従ってプログラマーの労力と手間とを軽減する
ことができる。
Furthermore, in the second invention, the number of usable global registers can be changed by changing the third information stored in the second storage means. Therefore, it becomes unnecessary to add or delete the instruction code each time the number of global registers is increased or decreased.
The program can be simplified and speeded up. In both the first and second inventions, it is not necessary to add or delete the instruction code according to the number of registers used in the program, so that the labor and labor of the programmer can be reduced.

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

【図1】本発明のマイクロコンピュータを示すブロック
図である。
FIG. 1 is a block diagram showing a microcomputer of the present invention.

【図2】本発明のマイクロコンピュータを示すブロック
図である。
FIG. 2 is a block diagram showing a microcomputer of the present invention.

【図3】図1のデコーダ9の詳細なブロック図である。3 is a detailed block diagram of the decoder 9 of FIG.

【図4】本発明のマイクロコンピュータのプログラムの
一例として示すリストである。
FIG. 4 is a list shown as an example of a program of the microcomputer of the present invention.

【図5】図4のプログラムのフローチャートである。5 is a flow chart of the program of FIG.

【図6】図1のデコーダ9の他の実施例を示すブロック
図である。
FIG. 6 is a block diagram showing another embodiment of the decoder 9 of FIG.

【図7】図1のデコーダ9の他の実施例を示すブロック
図である。
FIG. 7 is a block diagram showing another embodiment of the decoder 9 of FIG.

【図8】従来のマイクロコンピュータを示すブロック図
である。
FIG. 8 is a block diagram showing a conventional microcomputer.

【図9】従来のマイクロコンピュータの汎用レジスタの
概略図である。
FIG. 9 is a schematic diagram of a general-purpose register of a conventional microcomputer.

【図10】従来のマイクロコンピュータのプログラムの
一例としてのフローチャートである。
FIG. 10 is a flowchart as an example of a program of a conventional microcomputer.

【図11】図10のフローチャートのプログラムのリス
トである。
11 is a list of programs of the flowchart in FIG.

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

4 汎用レジスタ群 5 データレジスタ 9 デコーダ 30 ポインタ 33,34 加算器 39,40 検出回路 45 RX デコーダ 46 RY デコーダ 47 RZ デコーダ 48,49 反転回路 390,400 比較回路4 general purpose register set 5 data register 9 decoder 30 pointer 33 adders 39 and 40 detection circuit 45 R X-decoder 46 R Y-decoder 47 R Z decoder 48 and 49 inverting circuit 390 and 400 comparing circuit

【手続補正書】[Procedure amendment]

【提出日】平成5年6月16日[Submission date] June 16, 1993

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0011[Correction target item name] 0011

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0011】[0011]

【課題を解決するための手段】第1の発明に係るマイク
ロコンピュータは、第1の記憶手段に記憶されている第
1の情報と命令コードが有する第2の情報とを加算手段
を用いて加算せしめ、加算結果をデコーダへ送出した後
にデコーダを用いてデータを読み出し又は書き込みをす
るレジスタを選択せしめる。第2の発明に係るマイクロ
コンピュータは、命令コードが有する第2の情報と、第
2の記憶手段に記憶されている第3の情報とを比較手段
が比較した結果を用いて加算手段で加算された第1、2
の情報の加算結果又は加算手段で加算された定数と第2
の情報の加算結果を選択せしめ、選択した情報をデコー
ダへ送出した後にデコーダを用いて読み出し又は書き込
みをするレジスタを選択せしめる。
A microcomputer according to a first aspect of the present invention adds first information stored in a first storage means and second information included in an instruction code by using an addition means. Then, after sending the addition result to the decoder, the decoder is used to select the register for reading or writing data. In the microcomputer according to the second aspect, the addition means adds the second information included in the instruction code and the third information stored in the second storage means by the comparison means. Had first and second
The result of addition of the information of or the constant added by the adding means and the second
The result of addition of the information is selected, the selected information is sent to the decoder, and then the decoder is used to select the register for reading or writing.

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0012[Correction target item name] 0012

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0012】[0012]

【作用】第1の発明にあっては、命令コードが有する
ジスタ番号としての第2の情報を加算手段を用いてアク
セスの起点の情報を格納する第1の情報に加算すること
により第2の情報は該レジスタ番号と異なる汎用レジス
タ番号を示す情報に変更されるので、デコーダにより選
択される汎用レジスタを加算手段を用いて変更すること
ができる。従ってメインルーチンで使用しているレジス
をサブルーチンにおいて使用させたくない場合にはサ
ブルーチンの冒頭で加算手段を用いて汎用レジスタ番号
を変更する命令を実行することによりレジスタの値をメ
モリに退避し、メモリに格納されている値をレジスタ
復帰することは不要となる。
[Action] In the first invention, les having instruction code
Second information by adding the first information storing starting point information of the accessed using the adding means and the second information as register number is changed to information indicating the general-purpose register number different from said register number Therefore, the general-purpose register selected by the decoder can be changed using the adding means. Therefore, the register used in the main routine
If you do not want to use the data in subroutine saves the value of the register by executing an instruction to change the general-purpose register number by using the adding means at the beginning of the subroutine in the memory, the register values stored in the memory There is no need to return to.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0013[Correction target item name] 0013

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0013】第2の発明にあっては、加算手段を用い
て、定数と命令コードが有するレジスタ番号としての第
2の情報を加算した値又は加算手段を用いて第2の情報
に第1の情報を加算した値のいずれかを比較手段を用い
て選択してデコーダへ送出するので、当該デコーダは前
定数と加算した値を用いて汎用レジスタを選択するこ
とができ、さらに第2の情報に第1の情報を加算した値
用いて読み書きをする汎用レジスタを選択することが
できる。従って第2の情報がグローバルレジスタの個数
を示す第3の情報よりも大きいか等しい場合には定数と
第2の情報との加算結果をデコーダに送出して第2の情
報をサブルーチンとメインルーチンとで同一の汎用レジ
スタ番号を有するグローバルレジスタの番号として使用
することができる。さらに第2の情報が第3の情報より
小さい場合には第1と第2の情報との加算結果をデコー
ダに送出して第2の情報をサブルーチンとメインルーチ
ンとで異なる汎用レジスタ番号を有するレジスタの番号
として使用することができる。
In the second aspect of the invention, the addition means is used.
Then, either the value obtained by adding the constant and the second information as the register number of the instruction code or the value obtained by adding the first information to the second information by using the adding means is selected by using the comparing means. since sent to the decoder Te, the value which the decoder can select a general purpose register with a value obtained by adding said constant, and further adding the first information to the second information
You can use to select a general-purpose register for reading and writing. Therefore, when the second information is greater than or equal to the third information indicating the number of global registers, the addition result of the constant and the second information is sent to the decoder and the second information is subroutined. And the main routine can be used as a global register number having the same general-purpose register number. Further, when the second information is smaller than the third information, the addition result of the first and second information is sent to the decoder, and the second information is a register having different general register numbers in the subroutine and the main routine. Can be used as a number.

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0018[Correction target item name] 0018

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0018】以下このマイクロコンピュータの動作の説
明をする。本発明のマイクロコンピュータで使用する命
令語は命令コードの解読部、実行部からなる2段のパイ
プラインを用いて実行される。パイプラインの解読部で
はBIU 23により図示しないメモリから読み出された命令
コードを内部バス24を介して命令レジスタ25へ転送す
る。命令レジスタ25の命令コードはデコーダ9、即値オ
フセットレジスタ26、制御回路27へ同時に転送され、デ
コーダ9により汎用レジスタ群4の中の汎用レジスタ又
はデータレジスタ5を選択する動作、制御回路27により
命令コードを解釈する動作並びに即値オフセットレジス
タ26により即値データ及びオフセットデータを命令コー
ドから抽出する動作が同時並行して行われる。なおデコ
ーダ9によるレジスタ選択動作は命令コードの中のレジ
スタ番号を記述しているレジスタフィールドX ,LY
を用いて行われる。レジスタフィールドX により第1
のバッファ6にデータを転送するレジスタが選択され、
またレジスタフィールドY により第2のバッファ7に
データを転送するレジスタが選択される。
The operation of this microcomputer will be described below. The instruction word used in the microcomputer of the present invention is executed by using a two-stage pipeline including an instruction code decoding unit and an execution unit . The decoding unit of the pipeline transfers the instruction code read from the memory (not shown) by the BIU 23 to the instruction register 25 via the internal bus 24. The instruction code of the instruction register 25 is simultaneously transferred to the decoder 9, the immediate offset register 26, and the control circuit 27, and the decoder 9 selects the general register or the data register 5 in the general register group 4, and the control circuit 27 outputs the instruction code. And the operation of extracting the immediate data and the offset data from the instruction code by the immediate offset register 26 are simultaneously performed in parallel. Note that the register selection operation by the decoder 9 is performed by register fields L X and L Y which describe the register number in the instruction code.
Is performed using. First by register field L X
The register that transfers the data to the buffer 6 of is selected,
Further, a register for transferring data to the second buffer 7 is selected by the register field L Y.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0019[Correction target item name] 0019

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0019】パイプラインの実行部が示す動作は命令語
により異なる。以下主要な命令語につき該命令語の実行
中にパイプラインの実行部が示す動作を具体的に説明す
る。 (1) LDD X 、#n パイプラインの実行部の動作が本発明のマイクロコンピ
ュータに入力される同期用クロック信号の立上りに同期
して開始されると第1のバッファ6の値が読み出されて
内部バス1を介して第3のラッチ回路14へ転送されて該
第3のラッチ回路14に格納されると同時に即値オフセッ
トレジスタの値が内部バス2を介して第1のラッチ回路
12へ転送されて格納され、前記クロック信号の立下りに
同期して前記第1のラッチ回路12から読み出された値は
評価レジスタ12へ転送されて格納される。同時に第2の
ラッチ回路14から読み出された値は評価レジスタ11へ転
送されて格納される。
The operation indicated by the execution unit of the pipeline differs depending on the instruction word. The operation of the execution unit of the pipeline during the execution of the main instruction word will be specifically described below. (1) When the operation of the execution unit of the LDD L X , #n pipeline is started in synchronization with the rising edge of the synchronization clock signal input to the microcomputer of the present invention, the value of the first buffer 6 is read out. Then, the value of the immediate offset register is transferred to the third latch circuit 14 via the internal bus 1 and stored in the third latch circuit 14, and at the same time, the value of the immediate offset register is transferred via the internal bus 2 to the first latch circuit.
The value read from the first latch circuit 12 is transferred to and stored in the evaluation register 12 in synchronization with the fall of the clock signal. At the same time, the value read from the second latch circuit 14 is transferred to and stored in the evaluation register 11.

【手続補正6】[Procedure correction 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0020[Correction target item name] 0020

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0020】(2) FLD (FUNC1) 、Y パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると第2のバッファ7の値
が読み出されて内部バス2を介して第1のラッチ回路12
へ転送されて第1のラッチ回路12に格納される動作と同
時並行して評価レジスタ10の値が読み出されて第2のラ
ッチ回路13へ転送されて第2のラッチ回路13に格納され
同時に評価レジスタ11の値が読み出されて第3のラッチ
回路14へ転送されて第3のラッチ回路14に格納される。
ALU 15は命令コードの中のFUNC1に記述されている算術
論理演算の指示に基づき第2のラッチ回路13の値と第3
のラッチ回路14の値との間で所定の演算を実行し、該実
行結果は同期用クロック信号の立下りで評価レジスタ11
へ転送されて格納される。
[0020] (2) FLD (FUNC1), L Y operation of the execution unit of the pipeline synchronously Once started the value of the second buffer 7 is read out by the rise of the synchronization clock signal internal bus 1 through the first latch circuit 12
The value of the evaluation register 10 is read in parallel with the operation of being transferred to and stored in the first latch circuit 12 and transferred to the second latch circuit 13 and stored in the second latch circuit 13 and simultaneously. The value of the evaluation register 11 is read out, transferred to the third latch circuit 14, and stored in the third latch circuit 14.
The ALU 15 determines the value of the second latch circuit 13 and the third value based on the instruction of arithmetic logic operation described in FUNC1 in the instruction code.
A predetermined operation is performed between the value of the latch circuit 14 and the value of the latch circuit 14, and the execution result is obtained at the fall of the synchronization clock signal.
Is transferred to and stored.

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0021[Correction target item name] 0021

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0021】(3) FST (FUNC1) 、Z パイプラインの実行部の動作が前記クロック信号の立上
りに同期して開始されると、評価レジスタ10の値が読み
出されて第2のラッチ回路13に転送されて格納される動
作及び評価レジスタ11の値が読み出されて第3のラッチ
回路14へ転送されて第3のラッチ回路14に格納される動
作と並行してALU 15は命令コード中のFUNC1 に記述され
ている算術論理演算の指示に基づき第2のラッチ回路13
の値と第3のラッチ回路14の値との間で所定の演算を実
行し、演算結果は同期用クロック信号の立下りでレジス
タ16へ転送されてレジスタ16に格納される。前記演算結
果は前記クロック信号が消滅した後に新たに生ずる次の
クロック信号の立上りに同期して内部バス3に送出さ
れ、内部バス3上の値は書き込み回路8に取り込まれて
格納され、書き込み回路8の値は汎用レジスタ群4の中
の指定された汎用レジスタ又はデータレジスタ5へ転送
される。
(3) FST (FUNC1), When the operation of the execution unit of the L Z pipeline is started in synchronization with the rising edge of the clock signal, the value of the evaluation register 10 is read out and the second latch circuit is read. In parallel with the operation of being transferred and stored in 13 and the value of the evaluation register 11 being read and transferred to the third latch circuit 14 and being stored in the third latch circuit 14, the ALU 15 has an instruction code Second latch circuit 13 based on the instruction of arithmetic logic operation described in FUNC1
A predetermined operation is executed between the value of the above and the value of the third latch circuit 14, and the operation result is transferred to the register 16 and stored in the register 16 at the falling edge of the synchronizing clock signal. The calculation result is sent to the internal bus 3 in synchronization with the rising of the next clock signal that newly occurs after the clock signal disappears, and the value on the internal bus 3 is fetched and stored in the write circuit 8 to be stored in the write circuit. The value of 8 is transferred to the designated general purpose register in the general purpose register group 4 or the data register 5.

【手続補正8】[Procedure Amendment 8]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0024[Name of item to be corrected] 0024

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0024】(5) MOV X 、LZ パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、第2のバッファ7か
ら読み出された値は内部バス2を介して第2のラッチ回
路13へ転送されて、該第2のラッチ回路13に格納され、
同期用クロック信号の立下りに同期して第2のラッチ回
路13の値と、予め0に設定されている第3のラッチ回路
14の値とがALU 15を用いて加算されてレジスタ16へ転送
されてレジスタ16に格納される。同期用クロック信号が
消滅した後に新たに生ずるクロック信号の立上りに同期
してレジスタ16の値が内部バス3を介して書き込み回路
26へ転送されて書き込み回路26に格納され、書き込み回
路26の値は指定された汎用レジスタ又はデータレジスタ
5に転送されて格納される。
(5) When the operation of the MOV L X , L Z pipeline execution unit is started in synchronization with the rising edge of the synchronizing clock signal, the value read from the second buffer 7 is transferred to the internal bus. Is transferred to the second latch circuit 13 via 2 and stored in the second latch circuit 13,
The value of the second latch circuit 13 and the third latch circuit preset to 0 are synchronized with the falling edge of the synchronizing clock signal.
The value of 14 and the value of 14 are added by using the ALU 15, transferred to the register 16, and stored in the register 16. The value of the register 16 is written to the write circuit via the internal bus 3 in synchronization with the rising edge of the clock signal newly generated after the synchronization clock signal disappears.
It is transferred to 26 and stored in the write circuit 26, and the value of the write circuit 26 is transferred to and stored in the designated general-purpose register or data register 5.

【手続補正9】[Procedure Amendment 9]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0025[Name of item to be corrected] 0025

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0025】(6) RDM X 、OFF パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、第1のバッファ6か
ら読み出された値が内部バス1を介して第3のラッチ回
路14へ転送されて、第3のラッチ回路14に格納される動
作と同時並行して即値オフセットレジスタ26から読み出
された値は内部バス2を介して第2のラッチ回路13へ転
送されて、第2のラッチ回路13に格納される。同期用ク
ロック信号の立下りに同期してALU 15は第2のラッチ回
路13の値と第3のラッチ回路14の値とを加算し、加算結
果はMAレジスタ20へ転送されて、MAレジスタ20に格納さ
れる。同期用クロック信号が消滅した後に生ずる新たな
同期用クロック信号の立上りに同期してMAレジスタ20の
値がアドレス情報としてBIU 23へ転送され、BIU 23は外
部アドレスバス81を介して図示しないメモリへ前記アド
レス情報を転送し、図示しないメモリはBIU 23から転送
されたアドレスに従い格納されている値を読み出して該
を外部データバス80へ送出し、該BIU 23は外部データ
バス80上の命令コードを取り込んでデータレジスタ5
転送する。
(6) RDM L X , OFF When the operation of the execution unit of the pipeline is started in synchronization with the rising edge of the synchronizing clock signal, the value read from the first buffer 6 is transferred to the internal bus 1 Through the third latch times
The value read from the immediate offset register 26 in parallel with the operation stored in the third latch circuit 14 after being transferred to the path 14 is transferred to the second latch circuit 13 via the internal bus 2. , And are stored in the second latch circuit 13 . The ALU 15 adds the value of the second latch circuit 13 and the value of the third latch circuit 14 in synchronization with the fall of the synchronization clock signal, and the addition result is transferred to the MA register 20 and the MA register 20 Stored in. The value of the MA register 20 is transferred to the BIU 23 as address information in synchronization with the rising edge of a new synchronization clock signal that occurs after the synchronization clock signal disappears, and the BIU 23 is transferred to a memory (not shown) via the external address bus 81. The address information is transferred, a memory (not shown) reads the stored value according to the address transferred from BIU 23 , and
The value is sent to the external data bus 80, and the BIU 23 takes in the instruction code on the external data bus 80 and transfers it to the data register 5 .

【手続補正10】[Procedure Amendment 10]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0026[Correction target item name] 0026

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0026】(7) WRM X 、OFF パイプラインの実行部の動作が前記同期用クロック信号
の立上りに同期して開始されると、第1のバッファ6か
ら読み出された値が内部バス1を介して第3のラッチ回
路14へ転送されて第3のラッチ回路14に格納される動作
と同時並行して即値オフセットレジスタ26から読み出さ
れた値は内部バス2を介して第2のラッチ回路13へ転送
されて、第2のラッチ回路13に格納される。ALU 15は第
2のラッチ回路13の値と第3のラッチ回路14の値とを加
算して加算結果を求め、同期用クロック信号の立下りに
同期してALU 15は前記加算結果をMAレジスタ20へ転送
し、MAレジスタ20は前記加算結果を格納する。同期用ク
ロック信号が消滅した後に生ずる新たな同期用クロック
信号の立上りに同期してMAレジスタ20の値とデータレジ
スタ5の値とがBIU 23へ転送され、BIU 23は該MAレジス
タ20の値を外部アドレスバス81へ転送し、データレジス
タ5の値を外部データバス80へ送出する。
(7) When the operation of the execution unit of the WRM L X , OFF pipeline is started in synchronization with the rising edge of the synchronizing clock signal, the value read from the first buffer 6 is transferred to the internal bus 1 The value read from the immediate offset register 26 at the same time as the operation of being transferred to the third latch circuit 14 and stored in the third latch circuit 14 through the second latch via the internal bus 2. It is transferred to the circuit 13 and stored in the second latch circuit 13. The ALU 15 adds the value of the second latch circuit 13 and the value of the third latch circuit 14 to obtain the addition result, and the ALU 15 synchronizes the addition result with the MA register in synchronization with the fall of the synchronizing clock signal. 20 and the MA register 20 stores the addition result. The value of the MA register 20 and the value of the data register 5 are transferred to the BIU 23 in synchronization with the rising edge of a new synchronizing clock signal that occurs after the synchronizing clock signal disappears, and the BIU 23 changes the value of the MA register 20. The data is transferred to the external address bus 81 and the value of the data register 5 is sent to the external data bus 80.

【手続補正11】[Procedure Amendment 11]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0028[Correction target item name] 0028

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0028】(9) ALL Y パイプラインの実行部の動作が前記クロック信号の立上
りに同期して開始されるとデコーダ9内に存在する汎用
レジスタ群4のアクセスの起点の情報を記憶しているポ
インタ30の内容が読み出されて内部バス1を介して第3
のラッチ回路14へ転送されて第3のラッチ回路14に格納
される動作と同時並行して第2のバッファ7の値が読み
出されて内部バス2を介して第2のラッチ回路13へ転送
されて第2のラッチ回路13に格納される。同期用クロッ
ク信号の立下りに同期してALU 15は第3のラッチ回路14
の値と第2のラッチ回路の値との減算を実行し、減算結
果はレジスタ16へ転送されてレジスタ16に格納される。
同期用クロック信号が消滅した後に生ずる新たな同期用
クロック信号の立上りに同期してレジスタ16の値が読み
出されて内部バス3を介して前記ポインタ30へ転送され
て格納される。
(9) When the operation of the execution unit of the ALL LY pipeline is started in synchronization with the rising edge of the clock signal, the information of the starting point of access of the general-purpose register group 4 existing in the decoder 9 is stored. The contents of the pointer 30 being read are read out via the internal bus 1 to the third
Value of the second buffer 7 is read in parallel with the operation of being transferred to the latch circuit 14 and stored in the third latch circuit 14 and transferred to the second latch circuit 13 via the internal bus 2. It is stored in the second latch circuit 13. In synchronization with the falling edge of the synchronization clock signal, the ALU 15 is connected to the third latch circuit 14
Is subtracted from the value of the second latch circuit, and the subtraction result is transferred to the register 16 and stored in the register 16.
The value of the register 16 is read in synchronism with the rising edge of a new synchronizing clock signal that occurs after the synchronizing clock signal disappears, and is transferred to the pointer 30 via the internal bus 3 and stored therein.

【手続補正12】[Procedure Amendment 12]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0029[Name of item to be corrected] 0029

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0029】(10) FRE Y ALL Y 命令は第2のラッチ回路13の値と第3のラッチ
回路14の値との演算を実行するとALU 15に対して減算を
指示するが、当該命令はALU 15に対して加算を指示す
る。この点を除き、ALL Y 命令と当該命令とは同様の
動作を行なうので、当該命令の説明を省略する。
[0029] (10) FRE L Y ALL L Y instruction is for instructing the subtraction on ALU 15 when executing the operation between the value and the value of the first latch circuit 14 of the second latch circuit 13, the instruction Instructs ALU 15 to add. Except for this point, the ALL LY instruction and the instruction perform the same operation, and therefore the description of the instruction is omitted.

【手続補正13】[Procedure Amendment 13]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0030[Name of item to be corrected] 0030

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0030】以下汎用レジスタ群4中のレジスタをRnで
示す。RnはR30 〜R0の31本(データレジスタ5を加えて
32本)あり、またL1 〜L15はRn中の連続した15本であ
る(L0 は常にデータレジスタ5である)。図3は図
1,2のデコーダ9の詳細なブロック図である。図にお
いて、30は汎用レジスタ群4のアクセスの起点を示す第
1の情報を格納する第1の記憶手段としてのポインタで
ある。ポインタ30と命令コード中のレジスタフィールド
X (又はLY の相補信号が載る信号線31 (又は32)
とは、加算器33 (又は34) の入力端子に接続されてい
る。加算器33 (又は34) の出力端子は加算結果を与える
ためにRX デコーダ45 (又はRY デコーダ46) の入力端
子に接続され、RX デコーダ45 (又はRY デコーダ46)
の出力端子信号は第1のバッファ6(又は第2のバッフ
ァ7)へデータを転送するレジスタを選択するため、汎
用レジスタ群4及びデータレジスタ5に与えられる。
Registers in general-purpose register group 4 are designated by Rn below.
Show. Rn is 31 from R30 to R0 (add data register 5
32) and L 1 to L 15 are consecutive 15 in Rn.
(L 0 is always the data register 5). FIG. 3 is a detailed block diagram of the decoder 9 of FIGS. In the figure, 30 is a pointer as a first storage means for storing first information indicating the starting point of access to the general-purpose register group 4. Pointer 30 and register field in instruction code
Signal line 31 (or 32) carrying the complementary signal of L X (or L Y )
And are connected to the input terminal of the adder 33 (or 34). The output terminal of the adder 33 (or 34) is connected to the input terminal of the R X decoder 45 (or R Y decoder 46) to give the addition result, and the R X decoder 45 (or R Y decoder 46) is connected.
The output terminal signal of 1 is supplied to the general-purpose register group 4 and the data register 5 in order to select a register for transferring data to the first buffer 6 (or the second buffer 7).

【手続補正14】[Procedure Amendment 14]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0032[Name of item to be corrected] 0032

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0032】第7のラッチ回路41の出力端子及び第8の
ラッチ回路42の出力端子は信号遅延手段として第11の
ッチ回路43の入力端子に接続され、第11のラッチ回路43
の出力端子は信号遅延手段としての第12のラッチ回路44
の入力端子に接続され、第12のラッチ回路44の出力端子
はRZ デコーダ47の入力端子に接続されている。ここで
第5、第6、第7、第8、第9、第10、第11及び第12の
ラッチ回路35,36,41,42,37,38,43及び44は信号線31,32
の値、加算器33又は34の加算結果のいずれかの値をRZ
デコーダ47へ送出するための信号遅延手段である。
The output terminal of the seventh latch circuit 41 and the eighth
An output terminal of the latch circuit 42 11 La as a signal delay means
11th latch circuit 43 connected to the input terminal of the switch circuit 43.
The output terminal of is a twelfth latch circuit 44 as a signal delay means.
Is connected to the input terminal, an output terminal <br/> twelfth latch circuit 44 is connected to an input terminal of R Z decoder 47. Here, the fifth, sixth, seventh, eighth, ninth, tenth, eleventh and twelfth latch circuits 35, 36, 41, 42, 37, 38, 43 and 44 are signal lines 31, 32.
Value of R, the value of either of the addition results of the adder 33 or 34 is R Z
It is a signal delay means for sending to the decoder 47.

【手続補正15】[Procedure Amendment 15]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0034[Correction target item name] 0034

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0034】汎用レジスタ群4には31個の汎用レジスタ
が有り、31個の汎用レジスタそれぞれにレジスタ番号と
して0番から30番迄通し番号R0,R1,R2…R30 を付す。命
令コード中のレジスタ番号を示すレジスタフィールド
X 、LY は各4ビットで構成され、従ってレジスタ番号
は0から15まで指定が可能である。さらにレジスタフィ
ールドX (又はLY にレジスタ番号0が指定された
場合には、RX デコーダ45 (又はRY デコーダ46) 及び
Z デコーダ47はデータレジスタ5を指定するものとす
る。いまポインタ30に数値として ■16" が格納されて
いるものとする。レジスタフィールドRX (又はRY
が ■15" を指定すると ■15" は2進数では「1111」と
なり、信号線31 (又は32) は「0000」、即ち数値の ■
0" となる。従って加算器33 (又は34) は数値 ■16"
と数値 ■0" とを加算し、加算結果として得られた数
値 ■16" を用いてRX デコーダ45 (又はRY デコーダ4
6)は汎用レジスタ群4の中のR16 の汎用レジスタを選択
する。
There are 31 general-purpose registers in the general-purpose register group 4, and serial numbers R0, R1, R2 ... R30 are assigned to the 31 general-purpose registers as register numbers 0 to 30, respectively. Register field L indicating the register number in the instruction code
Each of X and LY is composed of 4 bits, so that the register number can be specified from 0 to 15. Further, when the register number 0 is designated in the register field L X (or L Y ) , the R X decoder 45 (or R Y decoder 46) and the R Z decoder 47 designate the data register 5. It is now assumed that the pointer 30 stores a numerical value of 16 ". Register field R X (or R Y )
If you specify 15 ”, 15” will be “1111” in binary, and the signal line 31 (or 32) will be “0000”, that is,
0 ". Therefore, the adder 33 (or 34) has a numerical value of 16".
And the numerical value {circle around (1)} are added, and the numerical value {circle around (16)} obtained as a result of the addition is used for the R X decoder 45 (or R Y decoder
6) selects the general-purpose register of R16 in the general-purpose register group 4.

【手続補正16】[Procedure Amendment 16]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0035[Correction target item name] 0035

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0035】次に図示しないメモリのOFF1番地とOFF2番
地とに格納されているデータを加算して加算結果をL11
に格納するプログラムをサブルーチンとして記述する方
法を図4、5を用いて説明する。図4はこの処理のプロ
グラムリストであり、図5は図4のプログラムのフロー
チャートである。
Next, the data stored in the OFF1 address and the OFF2 address of the memory (not shown) are added, and the addition result is L11.
A method of describing the program stored in the above as a subroutine will be described with reference to FIGS. FIG. 4 is a program list of this processing, and FIG. 5 is a flowchart of the program of FIG.

【手続補正17】[Procedure Amendment 17]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0036[Correction target item name] 0036

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0036】図5においてアクセスの起点の情報を格納
するポインタ30の値をALL #3の命令コードを用いて3
だけ減じ、RX デコーダ45 (又はRY デコーダ46) が選
択する汎用レジスタ番号を3だけ減じる。このときポイ
ンタ30の値は ■16" から ■13" に減じているので、ポ
インタ30の値を減じる前の汎用レジスタL13(R18)、L14
(R17)及びL15(R16)はポインタ30の値を3だけ減じた
、L13(R15)、L14(R14)及びL15(R13)の組合わせとして
使用することができ、従ってR13 、R14 及びR15 はポイ
ンタ30の値を減じる前後で同一のレジスタ番号Lnを有す
る異なる汎用レジスタRnの組合せとして確保することが
できる(S1)。次にデータレジスタ5の値をMOV DATA,L13
の命令コードを用いて汎用レジスタR15 に退避し(S2)、
汎用レジスタR14 の値をMOV #0,L14 の命令コードを
用いてクリアし(S3)、OFF1番地のデータをRDM L14,OFF1
の命令コードを用いて読み出してデータレジスタ5へ転
送し(S4)、データレジスタ5の値をMOV DATA,L15の命令
コードを用いて汎用レジスタR13 に退避し(S5)、OFF2番
地のデータをRDM R14,OFF2の命令コードを用いて読み出
してデータレジスタ5へ転送し(S6)、データレジスタ5
の値と汎用レジスタR13の値とをLDD L15 ,DATA, TST(AD
D),L11 の命令コードを用いて汎用レジスタR17に格納し
(S7)、汎用レジスタR15 の値をMOV L13,DATAの命令コー
ドを用いてデータレジスタ5に復帰させる(S8)。そし
て、ポインタ30の値をFRE #3の命令コードを用いて3
だけ増し、RX デコーダ45又はRY デコーダ46が選択す
る汎用レジスタ番号を増すことにより汎用レジスタR13
、R14 及びR15 の3個を解放し(S9)、リターン命令を
示す命令コードRET を用いてサブルーチンからメインル
ーチンへ戻る(S10) 。
In FIG. 5, the value of the pointer 30 for storing the information of the access starting point is set to 3 by using the instruction code of ALL # 3.
And the general register number selected by the R X decoder 45 (or the R Y decoder 46) is decreased by 3. At this time, the value of pointer 30 has been reduced from 16 "to 13", so general register L13 (R18), L14
(R17) and L15 (R16) can be used as a combination of L13 (R15), L14 (R14) and L15 (R13) after decrementing the value of pointer 30 by 3, and thus R13, R14 and R15. Is poi
Have the same register number Ln before and after the value of
It can be secured as a combination of different general-purpose registers Rn (S1). Next, set the value of data register 5 to MOV DATA , L13
Save to general-purpose register R15 using the instruction code of (S2),
The value of general-purpose register R14 is cleared using the instruction code of MOV # 0 and L14 (S3), and the data of the OFF1 address is RDM L14, OFF1
Is read using the instruction code of No.1 and transferred to the data register 5 (S4), the value of the data register 5 is saved to the general-purpose register R13 using the instruction code of MOV DATA , L15 (S5), and the data at the OFF2 address is stored in the RDM. Read using the instruction code of R14, OFF2 and transfer to the data register 5 (S6).
Values and the LDD and the value of the general register R13 L15, DATA, TST (AD
D), stored in general-purpose register R17 using L11 instruction code
(S7), the value of the general-purpose register R15 is restored to the data register 5 using the instruction code of MOV L13, DATA (S8). Then, the value of the pointer 30 is set to 3 using the instruction code of FRE # 3.
Only increases, R X decoder 45, or R Y general register R13 by increasing the general-purpose register number decoder 46 selects
, R14 and R15 are released (S9), and the instruction code RET indicating the return instruction is used to return from the subroutine to the main routine (S10).

【手続補正18】[Procedure 18]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0037[Name of item to be corrected] 0037

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0037】以上説明したように、当該サブルーチンに
おいてデータレジスタ5、レジスタL13 、L14 及びL15
のレジスタの値をメモリに退避する処理が不要であるの
で、従来のマイクロコンピュータに比べ本発明のマイク
ロコンピュータはサブルーチンの実行に際し高速で処理
をすることが可能である。さらに当該サブルーチンにお
いてL13 、L14 及びL15 のレジスタをALL #3、FRE #
3の命令コードを用いて確保し解放したが、ALL #3、
FRE #3の命令コードの数値 ■3" を ■4"以上の数
値に変更した場合には更に多数のレジスタを確保するこ
とができるので、サブルーチンにおいて作業用レジスタ
として使用するレジスタを追加又は減少する場合に追加
又は減少するレジスタに応じてその都度サブルーチンの
命令コードを追加又は減少する必要がなくプログラマー
の労力と手間とを省略することができる。
As described above, the data register 5, registers L13, L14 and L15 in the subroutine are
Since it is not necessary to save the value of the register in the memory to the memory, the microcomputer of the present invention can perform the processing at a high speed when executing the subroutine as compared with the conventional microcomputer. Furthermore, in the relevant subroutine, the registers of L13, L14 and L15 are ALL # 3, FRE #
It was secured and released using the instruction code of 3, but ALL # 3,
If you change the numerical value of FRE # 3 instruction code (3) to (4) or more, more registers can be secured, so add or decrease the number of registers used as working registers in the subroutine. In this case, it is not necessary to add or reduce the instruction code of the subroutine each time according to the register to be added or reduced, and the labor and labor of the programmer can be omitted.

【手続補正19】[Procedure Amendment 19]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0038[Correction target item name] 0038

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0038】図6は図1,2のデコーダ9の他の実施例
を示すブロック図である。図において94は使用可能なグ
ローバルレジスタの個数を第3の情報として格納する第
2の記憶手段としてのレジスタである。いま、使用可能
なグローバルレジスタが4個であるものとする。すると
■4" は2進数で「0100」となるので、その相補の信
号「1011」がレジスタ94に格納されている。31 (又は3
2) は第2の情報として命令コード中のレジスタフィー
ルドX (又はLY の値の相補信号が載る信号線であ
る。
FIG. 6 is a block diagram showing another embodiment of the decoder 9 shown in FIGS. In the figure, 94 is a register as a second storage means for storing the number of usable global registers as third information. Now, it is assumed that there are four global registers that can be used. Then, (4) becomes a binary number "0100", and the complementary signal "1011" is stored in the register 94. 31 (or 3
2) is a signal line on which a complementary signal of the value of the register field L X (or L Y ) in the instruction code is carried as the second information.

【手続補正20】[Procedure amendment 20]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0039[Correction target item name] 0039

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0039】比較回路390(又は400)は信号線31 (又は3
2) の値と定数「1011」とを比較して信号線31 (又は32)
2の値が定数「1011」より小さい場合には信号 ■0" を
出力して電気スイッチ90 (又は92) をオフするようスイ
ッチ90 (又は92) に接続され、かつ電気スイッチ91 (又
は93) をオンするように反転回路48 (又は49) の入力端
子に接続され、反転回路48 (又は49) の出力端子はスイ
ッチ91 (又は93) に接続されている。スイッチ90及び92
(又は91及び93) の一端は定数「10000 」である端子
(又はポインタ30の出力端子) に各接続され、その他端
は加算器33 (又は34) の入力端子に信号線31 (又は32)
と共に接続されている。
The comparator circuit 390 (or 400) is connected to the signal line 31 (or 3).
Compare the value of 2) with the constant "1011", and then use the signal line 31 (or 32).
When the value of 2 is smaller than the constant "1011", it is connected to the switch 90 (or 92) to output the signal 0 "and turn off the electric switch 90 (or 92), and the electric switch 91 (or 93). Is connected to the input terminal of the inverting circuit 48 (or 49), and the output terminal of the inverting circuit 48 (or 49) is connected to the switch 91 (or 93).
One terminal of (or 91 and 93) has a constant "10000"
(Or the output terminal of the pointer 30), and the other end is connected to the input terminal of the adder 33 (or 34) by the signal line 31 (or 32).
Is connected with.

【手続補正21】[Procedure correction 21]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0041[Correction target item name] 0041

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0041】以下動作の説明をする。信号線31 (又は3
2) の値がレジスタ94の値より大きい又は等しい場合に
は比較回路390(又は400)は電気スイッチ90 (又は92) を
オンし、電気スイッチ91 (又は93) をオフするので、加
算器33 (又は34) に信号線31 (又は32) と定数「10000
とが入力される。加算器33 (又は34) は信号線31
(又は32) の値と定数「10000 」とを加算し、加算結果
をRX デコーダ45 (又はRYデコーダ46) 又は第5 (又
は第6) のラッチ回路35 (又は36) 、第9のラッチ回路
37、第10のラッチ回路38を介してRZ デコーダ47へ送出
する。RX デコーダ45(又はRY デコーダ46) 又はRZ
デコーダ47は加算結果により汎用レジスタ群4の中の加
算結果に対応する汎用レジスタをグローバルレジスタと
して選択する。
The operation will be described below. Signal line 31 (or 3
If the value of 2) is greater than or equal to the value of the register 94, the comparison circuit 390 (or 400) turns on the electric switch 90 (or 92) and turns off the electric switch 91 (or 93), so that the adder 33 (Or 34) to signal line 31 (or 32) and constant "10000
"And it is input. Adder 33 (or 34) is signal line 31
(Or 32) and the constant "10000" are added, and the addition result is the R X decoder 45 (or R Y decoder 46) or the fifth (or sixth) latch circuit 35 (or 36), the ninth Latch circuit
The signal is sent to the R Z decoder 47 via the 37th and 10th latch circuits 38. R X decoder 45 (or R Y decoder 46) or R Z
The decoder 47 selects a general-purpose register corresponding to the addition result in the general-purpose register group 4 as a global register according to the addition result.

【手続補正22】[Procedure correction 22]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0042[Correction target item name] 0042

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0042】信号線31 (又は32) の値がレジスタ94の値
より小さい場合には比較回路390(又は400)は電気スイッ
チ90 (又は92) をオフし、電気スイッチ91 (又は93) を
オンするので、加算器33 (又は34) に信号線31 (又は3
2) とポインタ30の値とが入力される。加算器39 (又は4
0) は信号線31 (又は32) の値とポインタ30の値とを加
算し、加算結果をRX デコーダ45 (又はRY デコーダ4
6) 又は又は第5 (又は第6) のラッチ回路35 (又は36)
、第9のラッチ回路37、第10のラッチ回路38を介して
Z デコーダへ送出する。RX デコーダ45 (又はRY
コーダ46) 又はRZデコーダ47は加算結果により汎用レ
ジスタ群4の中の加算結果に対応する汎用レジスタを選
択する。
When the value of the signal line 31 (or 32) is smaller than the value of the register 94, the comparison circuit 390 (or 400) turns off the electric switch 90 (or 92) and turns on the electric switch 91 (or 93). Therefore, adder 33 (or 34) to signal line 31 (or 3
2) and the value of pointer 30 are input. Adder 39 (or 4
0) adds the value of the signal line 31 (or 32) and the value of the pointer 30, and the addition result is the R X decoder 45 (or R Y decoder 4).
6) Or, or 5th (or 6th) latch circuit 35 (or 36)
, Through the ninth latch circuit 37 and the tenth latch circuit 38 to the R Z decoder. The R X decoder 45 (or R Y decoder 46) or R Z decoder 47 selects a general-purpose register corresponding to the addition result in the general-purpose register group 4 according to the addition result.

【手続補正23】[Procedure amendment 23]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0043[Correction target item name] 0043

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0043】いま、命令コードのレジスタフィールド
X (又はLY が2進数の「0100」(レジスタ番号4)
であるものとする。そのとき信号線31 (又は32) の値は
「0100」の相補信号である「1011」となる。従って検出
回路390(又は400)は信号線31(又は32) の値「1011」
レジスタ94の定数「1011」とを比較した結果、前者の値
が後者の定数と等しいので出力信号 ■1" を電気スイ
ッチ90 (又は92) 及び反転回路48 (又は49) を介して電
気スイッチ91 (又は93) に転送する。その結果電気スイ
ッチ90 (又は92) はオン、電気スイッチ91 (又は93) は
オフとなるので、加算器33 (又は34) は信号線31 (又は
32) の値「1100」と定数「10000 」とを加算し、加算結
果の数値 ■27" はRX デコーダ45 (又はRY デコーダ4
6) 、RZデコーダ47へ転送され、RX デコーダ45 (又は
Y デコーダ46) 、RZ デコーダ47は前記加算結果を用
いて汎用レジスタ群4の中から汎用レジスタR27 を選択
する。
Now, the register field L of the instruction code
X (or L Y ) is a binary number "0100" (register number 4)
Shall be At that time, the value of signal line 31 (or 32) is
It becomes "1011" which is a complementary signal of "0100" . Therefore, the detection circuit 390 (or 400) compares the value “1011” of the signal line 31 (or 32) with the constant “1011” of the register 94, and as a result, the former value is equal to the latter constant , so that the output signal (1) Via electrical switch 90 (or 92) and inverting circuit 48 (or 49) to electrical switch 91 (or 93), so that electrical switch 90 (or 92) is on and electrical switch 91 (or 93) is Since it is turned off, the adder 33 (or 34) is connected to the signal line 31 (or
The value "1100" of 32) and the constant "10000" are added, and the numerical value of the addition result ■ 27 " is R X decoder 45 (or R Y decoder 4
6) is transferred to the R Z decoder 47, and the R X decoder 45 (or the R Y decoder 46) and the R Z decoder 47 select the general register R27 from the general register group 4 using the addition result.

【手続補正24】[Procedure correction 24]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0044[Correction target item name] 0044

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0044】従ってレジスタフィールドX (又は
Y の値が2進数の「0100」(レジスタ番号4)であ
る場合にグローバルレジスタとして汎用レジスタR27
使用することができる。さらにレジスタフィールドX
(又はLY の値が2進数の「0011」 (レジスタ番号
3)、「0010」 (レジスタ番号2)又は「0001」(レジ
スタ番号1)である場合に、その相補信号「1100」
「1101」又は「1110」はレジスタ94の値と比較して大き
いので定数「10000 」と加算されてX デコーダ45 (又
はRY デコーダ46) 又はRZ デコーダ47に転送され、汎
用レジスタR27 、R28 、R29 及びR30 はグローバルレジ
スタとして使用することができる。
Therefore, the register field L X (or
When the value of L Y ) is a binary number “0100” (register number 4) , the general register R27 can be used as a global register. Further register field L X
The value of (or L Y ) is binary number “0011” (register number
3), "0010" (register number 2) or "0001" (register number 1), the complementary signal "1100" ,
“1101” or “1110” is larger than the value in register 94.
Therefore, it is added to the constant "10000" and transferred to the R X decoder 45 (or R Y decoder 46) or R Z decoder 47, and the general purpose registers R27, R28, R29 and R30 can be used as global registers.

【手続補正25】[Procedure correction 25]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0045[Name of item to be corrected] 0045

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0045】更にレジスタ94に格納される定数「1011」
を別の定数に変更することにより、L1〜L15 の中でグロ
ーバルレジスタとして使用する汎用レジスタの個数を変
更することができる。従ってサブルーチンとメインルー
チンとでレジスタL4、L3、L2及びL1をグローバルレジス
として使用する場合にはレジスタ94の値を「1011」と
することにより汎用レジスタR27 、R28 、R29 及びR30
をそれぞれレジスタL4、L3、L2及びL1に対応したグロー
バルレジスタとして使用することができる。なお、この
ときにレジスタL4、L3、L2及びL1を除くレジスタ(L15
〜L5) はグローバルレジスタとして使用することができ
ない通常のレジスタである。
Further, the constant "1011" stored in the register 94
By changing to another constant, the number of general-purpose registers used as global registers in L1 to L15 can be changed. Therefore, the registers L4, L3, L2, and L1 are registered globally in the subroutine and main routine.
When used as a data register, set the value of register 94 to "1011" to set general purpose registers R27, R28, R29 and R30.
Can be used as global registers corresponding to the registers L4, L3, L2 and L1, respectively . At this time, registers other than registers L4, L3, L2, and L1 (L15
~ L5) are normal registers that cannot be used as global registers.

【手続補正26】[Procedure Amendment 26]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0047[Correction target item name] 0047

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0047】以下、図7のブロック図の動作を説明す
る。MOV #n、Z レジスタLZ に定数nを設定す
る)のような命令コードを用いて汎用レジスタ53に定数
を設定する。いま、レジスタフィールドX (又は
Y )の相補信号である信号線31 (又は32) の値が汎用
レジスタ53の値より大きいか又は等しい場合には比較回
路390(又は400)は信号 ■1" を出力して電気スイッチ9
0 (又は92) をオンし、電気スイッチ91 (又は93) をオ
フするので加算器33(又は34) は信号線31 (又は32) に
定数「10000 」を加算してRX デコーダ45 (又はRY
コーダ46) 又はRZ デコーダ47に送出する。このときR
X デコーダ45(又はRY デコーダ46) 又はRZ デコーダ4
7はグローバルレジスタを選択する。
The operation of the block diagram of FIG. 7 will be described below. A constant is set in the general-purpose register 53 using an instruction code such as MOV #n, L Z (set the constant n in the register L Z ). Now register field L X (or
If the value of the signal line 31 (or 32), which is the complementary signal of L Y ) is greater than or equal to the value of the general-purpose register 53, the comparison circuit 390 (or 400) outputs the signal 1 ″ to output the electric switch 9
Since 0 (or 92) is turned on and the electric switch 91 (or 93) is turned off, the adder 33 (or 34) adds the constant "10000" to the signal line 31 (or 32) to add the R X decoder 45 (or It is sent to the R Y decoder 46) or the R Z decoder 47. At this time R
X decoder 45 (or R Y decoder 46) or R Z decoder 4
7 selects the global register.

【手続補正27】[Procedure Amendment 27]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0049[Correction target item name] 0049

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0049】いま汎用レジスタ53の設定値を「1100」と
する。レジスタフィールドX (又はY )の値「000
1」、「0010」又は「0011」の各相補信号「1110」、「1
101」又は「1100」が信号線31 (又は32) に載る場合に
限り信号線31 (又は32) の値は汎用レジスタ53の値より
大きいか又は等しいので前記相補信号「1110」、「110
1」又は「1100」と定数「10000 」との加算結果がRX
デコーダ45 (又はRY デコーダ46) 又はRZ デコーダ47
に送出され、従ってRX デコーダ45 (又はRY デコーダ
46) は汎用レジスタR30 、R29 又はR28 の3個をグロー
バルレジスタとして選択する。
Now, let us say that the set value of the general-purpose register 53 is "1100". Value of register field L X (or L Y ) "000
1 ”,“ 0010 ”or“ 0011 ”complementary signals“ 1110 ”,“ 1 ”
Only when 101 or 1100 is placed on the signal line 31 (or 32), the value of the signal line 31 (or 32) is greater than or equal to the value of the general-purpose register 53, so the complementary signals “1110” and “110
The addition result of "1" or "1100" and the constant "10000" is R X.
Decoder 45 (or R Y decoder 46) or R Z decoder 47
To the R X decoder 45 (or R Y decoder
46) selects three general-purpose registers R30, R29 or R28 as global registers.

【手続補正28】[Procedure correction 28]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0050[Correction target item name] 0050

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0050】以上説明したように汎用レジスタ53のグロ
ーバルレジスタの個数は命令コードにより設定すること
ができるので、レジスタとしてグローバルレジスタを使
用する場合及びスタックポインタとしてグローバルレジ
スタを使用する場合にはグローバルレジスタの数を自由
に設定することができる。従ってグローバルレジスタの
数が不足することはなくなるので汎用レジスタ値をメモ
リに退避することは不要となり、プログラムを簡略化及
び高速化することができる。
[0050] Since the above number of global register of the general register 53 as described can be set by the instruction code, the global register when using the global registers as if and the stack pointer using a global register as a register The number can be set freely. Therefore, the number of global registers does not become insufficient, and it is not necessary to save the general-purpose register value in the memory, and the program can be simplified and speeded up.

【手続補正29】[Procedure correction 29]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図2[Name of item to be corrected] Figure 2

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図2】 [Fig. 2]

【手続補正30】[Procedure amendment 30]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図3[Name of item to be corrected] Figure 3

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図3】 [Figure 3]

【手続補正31】[Procedure correction 31]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図4[Name of item to be corrected] Fig. 4

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図4】 [Figure 4]

【手続補正32】[Procedure correction 32]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図5[Name of item to be corrected] Figure 5

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図5】 [Figure 5]

【手続補正33】[Procedure amendment 33]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図6[Name of item to be corrected] Figure 6

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図6】 [Figure 6]

【手続補正34】[Procedure amendment 34]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図7[Name of item to be corrected] Figure 7

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図7】 [Figure 7]

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 レジスタ番号に関する情報に基づき、複
数のレジスタの中から所定のレジスタをデコーダで選択
し、選択したレジスタを用いてデータの読み出し又は書
き込みをするマイクロコンピュータにおいて、レジスタ
番号に関する第1の情報を記憶する第1の記憶手段と、
命令コードが有するレジスタ番号に関する第2の情報と
第1の情報とを加算し、加算手段が得た結果をレジスタ
番号に関する情報として前記デコーダへ送出する加算手
段とを具備することを特徴とするマイクロコンピュー
タ。
1. A microcomputer for selecting a predetermined register from a plurality of registers by a decoder based on information about a register number and reading or writing data by using the selected register, the first register related to the register number. First storage means for storing information,
And a second addition means for adding the second information and the first information on the register number included in the instruction code, and for sending the result obtained by the addition means to the decoder as information on the register number. Computer.
【請求項2】 レジスタ番号に関する情報に基づき、複
数のレジスタの中から所定のレジスタをデコーダで選択
し、選択したレジスタを用いてデータの読み出し又は書
き込みをするマイクロコンピュータにおいて、 レジスタ番号に関する第1の情報及び第3の情報を各記
憶する第1の記憶手段及び第2の記憶手段と、 第3の情報と命令コードが有するレジスタ番号に関する
第2の情報とを比較する比較手段と、 第1の情報と第2の情報とを加算する加算手段と、 加算手段が得た加算結果又は第2の情報を前記比較手段
の比較結果により選択し、選択した値をレジスタ番号に
関する情報として前記デコーダへ送出する選択手段とを
具備することを特徴とするマイクロコンピュータ。
2. A microcomputer for selecting a predetermined register from a plurality of registers by a decoder based on information about a register number and reading or writing data using the selected register, First storage means and second storage means for respectively storing information and third information; comparison means for comparing the third information with second information relating to the register number of the instruction code; An adding means for adding the information and the second information, and an addition result obtained by the adding means or the second information is selected according to the comparison result of the comparing means, and the selected value is sent to the decoder as information concerning the register number. And a selection unit for performing the selection.
JP163593A 1993-01-08 1993-01-08 Microcomputer Pending JPH06208464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP163593A JPH06208464A (en) 1993-01-08 1993-01-08 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP163593A JPH06208464A (en) 1993-01-08 1993-01-08 Microcomputer

Publications (1)

Publication Number Publication Date
JPH06208464A true JPH06208464A (en) 1994-07-26

Family

ID=11506994

Family Applications (1)

Application Number Title Priority Date Filing Date
JP163593A Pending JPH06208464A (en) 1993-01-08 1993-01-08 Microcomputer

Country Status (1)

Country Link
JP (1) JPH06208464A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013508845A (en) * 2009-10-21 2013-03-07 アーム・リミテッド Hardware resource management in data processing systems

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013508845A (en) * 2009-10-21 2013-03-07 アーム・リミテッド Hardware resource management in data processing systems
US8949844B2 (en) 2009-10-21 2015-02-03 Arm Limited Hardware resource management within a data processing system

Similar Documents

Publication Publication Date Title
US4839797A (en) Microprocessor compatible with any software represented by different types of instruction formats
US5155817A (en) Microprocessor
JP3203401B2 (en) Data processing device
JPH05250305A (en) Data transfer control system
JPH0713772A (en) Data processor
JPS6298434A (en) Data processing system
US6986028B2 (en) Repeat block with zero cycle overhead nesting
JPS645330B2 (en)
JPH06208464A (en) Microcomputer
JP2577023B2 (en) Address extension control method for information processing equipment
JP2553200B2 (en) Information processing device
US5463747A (en) Microprogram data processor processing operand address calculation and instruction execution with common hardware
US20050216708A1 (en) Processor for performing context switching, a method for performing context switching, a computer program for perform context switching
JPS6273333A (en) Emulation control system
JPS6242301B2 (en)
JP2552738B2 (en) Data processing device
JPS63113634A (en) Relative address calculation system for program counter
US6684286B1 (en) High-speed block transfer circuit
JP3547585B2 (en) Microprocessor having conditional execution instruction
JP3531856B2 (en) Program control method and program control device
JP2504570B2 (en) Storage area write inspection processing method
JP3197045B2 (en) Extended central processing unit
JPH06324884A (en) Data processor
JP2008083762A (en) Microcomputer
JPH0535499A (en) Data processing device and method