JP2926045B2 - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JP2926045B2
JP2926045B2 JP10155830A JP15583098A JP2926045B2 JP 2926045 B2 JP2926045 B2 JP 2926045B2 JP 10155830 A JP10155830 A JP 10155830A JP 15583098 A JP15583098 A JP 15583098A JP 2926045 B2 JP2926045 B2 JP 2926045B2
Authority
JP
Japan
Prior art keywords
instruction
register
buffer
value
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP10155830A
Other languages
Japanese (ja)
Other versions
JPH1173318A (en
Inventor
武 岸田
雅逸 中島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10155830A priority Critical patent/JP2926045B2/en
Publication of JPH1173318A publication Critical patent/JPH1173318A/en
Application granted granted Critical
Publication of JP2926045B2 publication Critical patent/JP2926045B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、複数の命令を並列
実行することができるマイクロプロセッサに関するもの
である。
[0001] 1. Field of the Invention [0002] The present invention relates to a microprocessor capable of executing a plurality of instructions in parallel.

【0002】[0002]

【従来の技術】従来、スーパースカラ、マルチスレッド
等の各種プロセッサアーキテクチャが知られている。こ
れらのアーキテクチャを採用すれば、1サイクルに複数
の命令を同時に実行することができるので、高性能のマ
イクロプロセッサを実現することができる。
2. Description of the Related Art Conventionally, various processor architectures such as superscalar and multithread are known. If these architectures are employed, a plurality of instructions can be executed simultaneously in one cycle, so that a high-performance microprocessor can be realized.

【0003】[0003]

【発明が解決しようとする課題】従来の命令並列実行型
マイクロプロセッサは、データ依存関係の回避が必要で
ある等の様々な面でプログラミングの容易性に問題があ
った。
The conventional instruction parallel execution type microprocessor has a problem in easiness of programming in various aspects such as a need to avoid data dependence.

【0004】本発明の目的は、プログラミングの容易な
高性能マイクロプロセッサを提供することにある。
[0004] It is an object of the present invention to provide a high performance microprocessor which is easy to program.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するた
め、本発明は、複数の命令を並列実行することができる
ように複数の演算処理ユニットを1個の命令発行ユニッ
トに接続してなるマイクロプロセッサの構成を採用し、
かつ該複数の演算処理ユニットのうちの少なくとも1個
の特定の演算処理ユニットは一連の演算処理を自律的に
実行することができるようにしたものである。この構成
により、該特定の演算処理ユニットで実行されるべき一
群の命令に関するプログラミングが容易になる。
In order to achieve the above object, the present invention provides a micro processor comprising a plurality of arithmetic processing units connected to one instruction issuing unit so that a plurality of instructions can be executed in parallel. Adopt the processor configuration,
At least one specific processing unit among the plurality of processing units can autonomously execute a series of processing. This configuration facilitates programming of a group of instructions to be executed by the particular processing unit.

【0006】具体的に説明すると、本発明のマイクロプ
ロセッサは、複数の演算処理ユニットと、該複数の演算
処理ユニットの各々で実行されるべき複数の命令を格納
するための命令メモリと、該命令メモリから命令をフェ
ッチし、かつ該フェッチした命令を前記複数の演算処理
ユニットのうちの対応する演算処理ユニットへ供給する
ための命令発行ユニットとを備えた構成を採用したもの
である。しかも、前記複数の演算処理ユニットのうちの
少なくとも1個の特定の演算処理ユニットは、前記命令
発行ユニットから供給された複数の命令を格納するため
の命令バッファと、該命令バッファから読み出された命
令をデコードするための命令デコーダと、該命令デコー
ダによるデコードの結果に応じた演算を実行するための
演算実行ユニットと、前記命令発行ユニットから受け取
った制御信号に応じて前記命令バッファの書き込みアド
レスを生成し、かつ前記命令デコーダから受け取った制
御信号に応じて前記命令バッファの読み出しアドレスを
生成するためのアドレス生成部とを有するものである。
More specifically, the microprocessor of the present invention comprises a plurality of processing units, an instruction memory for storing a plurality of instructions to be executed by each of the plurality of processing units, An instruction issuing unit for fetching an instruction from a memory and supplying the fetched instruction to a corresponding arithmetic processing unit among the plurality of arithmetic processing units is employed. In addition, at least one specific arithmetic processing unit among the plurality of arithmetic processing units has an instruction buffer for storing a plurality of instructions supplied from the instruction issuing unit, and has been read from the instruction buffer. An instruction decoder for decoding the instruction, an operation execution unit for executing an operation according to the result of the decoding by the instruction decoder, and a write address of the instruction buffer in response to a control signal received from the instruction issue unit. And an address generation unit for generating a read address of the instruction buffer in accordance with a control signal generated and received from the instruction decoder.

【0007】前記特定の演算処理ユニット中の命令バッ
ファには、繰り返し処理を制御するための命令(例えば
繰り返し開始命令及び繰り返し終了命令)や、条件実行
処理を制御するための命令(例えば条件分岐命令)を格
納することができる。また、該命令バッファの中にマク
ロ定義のための領域、すなわちマクロ本体を格納するた
めの領域を確保することができる。マクロ呼び出し命令
に基づくマクロ展開は、マクロ定義領域に格納されたマ
クロ本体を構成する複数の命令(以下、場合に応じてマ
クロ構成命令という。)を参照することにより、前記特
定の演算処理ユニットが自律的に行うことができる。
In the instruction buffer in the specific arithmetic processing unit, instructions for controlling repetitive processing (for example, a repeat start instruction and a repeat end instruction) and instructions for controlling conditional execution processing (for example, conditional branch instructions) ) Can be stored. Also, an area for defining a macro, that is, an area for storing a macro body can be secured in the instruction buffer. Macro expansion based on a macro call instruction is performed by referring to a plurality of instructions (hereinafter, referred to as macro configuration instructions as appropriate) constituting a macro main body stored in a macro definition area, thereby allowing the specific arithmetic processing unit to execute. Can be done autonomously.

【0008】[0008]

【発明の実施の形態】図1は、本発明に係るマイクロプ
ロセッサの構成例を示している。図1のマイクロプロセ
ッサは、命令メモリ1と、命令発行ユニット2と、第1
の演算処理ユニット3aと、第2の演算処理ユニット3
bと、演算実行ユニット8cと、データメモリ4cとを
備えている。命令メモリ1は、第1の演算処理ユニット
3a、第2の演算処理ユニット3b及び演算実行ユニッ
ト8cの各々で実行されるべき複数の命令を格納するた
めのメモリである。命令発行ユニット2は、制御バス1
8を経由して命令メモリ1にアドレス及び制御信号を供
給し、該命令メモリ1に格納された命令を命令バス19
を経由してフェッチし、かつ該フェッチした命令を命令
バス9aへ供給するためのユニットである。該フェッチ
した命令が演算実行ユニット8cで実行されるべき命令
である場合には、命令発行ユニット2は、該フェッチし
た命令のデコードを更に行う。演算実行ユニット8c
は、制御バス9bを経由して命令発行ユニット2との間
で制御信号の授受を行い、かつ命令バス9aを経由して
命令のデコード結果を受け取って、該デコード結果に応
じた演算を実行するためのユニットである。データメモ
リ4cは、制御バス16cを経由して演算実行ユニット
8cからアドレス及び制御信号を受け取り、かつデータ
バス17cを経由して演算実行ユニット8cとの間でデ
ータの授受を行うメモリである。
FIG. 1 shows a configuration example of a microprocessor according to the present invention. The microprocessor of FIG. 1 includes an instruction memory 1, an instruction issuing unit 2, a first
Processing unit 3a and the second processing unit 3
b, an operation execution unit 8c, and a data memory 4c. The instruction memory 1 is a memory for storing a plurality of instructions to be executed by each of the first operation processing unit 3a, the second operation processing unit 3b, and the operation execution unit 8c. The instruction issuing unit 2 includes a control bus 1
The address and control signal are supplied to the instruction memory 1 via the instruction memory 8 and the instruction stored in the instruction memory 1 is transmitted to the instruction bus 19.
And a unit for supplying the fetched instruction to the instruction bus 9a. If the fetched instruction is an instruction to be executed by the operation execution unit 8c, the instruction issuing unit 2 further decodes the fetched instruction. Arithmetic execution unit 8c
Transmits / receives a control signal to / from the instruction issuing unit 2 via the control bus 9b, receives a decoded result of the instruction via the instruction bus 9a, and executes an operation according to the decoded result. It is a unit for. The data memory 4c is a memory that receives an address and a control signal from the operation execution unit 8c via the control bus 16c, and exchanges data with the operation execution unit 8c via the data bus 17c.

【0009】第1の演算処理ユニット3aは、繰り返し
処理及び条件実行処理の自律的実行機能を備えたユニッ
トであって、命令発行ユニット2から命令バス9aを経
由して供給された複数の命令を格納するための命令バッ
ファ6aと、命令バッファ6aから読み出された命令を
命令バス12aを経由して受け取り、かつデコードする
ための命令デコーダ7aと、命令バス15aを経由して
命令デコーダ7aから命令のデコード結果を受け取り、
かつ該デコード結果に応じた演算を実行するための演算
実行ユニット8aと、制御バス16aを経由して演算実
行ユニット8aからアドレス及び制御信号を受け取り、
かつデータバス17aを経由して演算実行ユニット8a
との間でデータの授受を行うデータメモリ4aと、制御
バス14aを経由して演算実行ユニット8aの演算結果
フラグを受け取り、該演算結果フラグを格納するための
フラグレジスタ20aと、制御バス9bを経由して命令
発行ユニット2との間で制御信号の授受を行い、制御バ
ス11aを経由して命令デコーダ7aから制御信号を受
け取り、制御バス13aを経由して演算結果フラグを参
照し、かつアドレスバス10aを経由して命令バッファ
6aの書き込みアドレス及び読み出しアドレスを出力す
るためのアドレス生成部5aとから構成される。
The first arithmetic processing unit 3a is a unit having an autonomous execution function of a repetition process and a condition execution process, and executes a plurality of instructions supplied from the instruction issuing unit 2 via the instruction bus 9a. An instruction buffer 6a for storing, an instruction decoder 7a for receiving and decoding the instruction read from the instruction buffer 6a via the instruction bus 12a, and an instruction from the instruction decoder 7a via the instruction bus 15a. Receive the decoding result of
And an operation execution unit 8a for executing an operation according to the decoding result, and an address and a control signal from the operation execution unit 8a via the control bus 16a.
And the operation execution unit 8a via the data bus 17a
A data memory 4a for transmitting and receiving data to and from the data memory 4a, a flag register 20a for receiving the operation result flag of the operation execution unit 8a via the control bus 14a and storing the operation result flag, and a control bus 9b. A control signal is exchanged with the instruction issuing unit 2 via the control bus 11a, a control signal is received from the instruction decoder 7a via the control bus 11a, an operation result flag is referenced via the control bus 13a, and An address generator 5a for outputting a write address and a read address of the instruction buffer 6a via the bus 10a.

【0010】第2の演算処理ユニット3bは、マクロ機
能を備えたユニットであって、命令発行ユニット2から
命令バス9aを経由して供給された複数の命令を格納す
るための命令バッファ6bと、命令バッファ6bから読
み出された命令を命令バス12bを経由して受け取り、
かつデコードするための命令デコーダ7bと、命令バス
15bを経由して命令デコーダ7bから命令のデコード
結果を受け取り、かつ該デコード結果に応じた演算を実
行するための演算実行ユニット8bと、制御バス16b
を経由して演算実行ユニット8bからアドレス及び制御
信号を受け取り、かつデータバス17bを経由して演算
実行ユニット8bとの間でデータの授受を行うデータメ
モリ4bと、制御バス9bを経由して命令発行ユニット
2から制御信号を受け取り、制御バス11bを経由して
命令デコーダ7bから制御信号を受け取り、かつアドレ
スバス10bを経由して命令バッファ6bの書き込みア
ドレス及び読み出しアドレスを出力するためのアドレス
生成部5bとから構成される。
The second arithmetic processing unit 3b is a unit having a macro function, and has an instruction buffer 6b for storing a plurality of instructions supplied from the instruction issuing unit 2 via the instruction bus 9a; Receiving the instruction read from the instruction buffer 6b via the instruction bus 12b;
An instruction decoder 7b for decoding, an operation execution unit 8b for receiving an instruction decoding result from the instruction decoder 7b via the instruction bus 15b, and executing an operation according to the decoding result, and a control bus 16b
, A data memory 4b for receiving an address and a control signal from the execution unit 8b via the data bus 17b, and transmitting and receiving data to and from the execution unit 8b via the data bus 17b, and an instruction via the control bus 9b. An address generation unit for receiving a control signal from the issuing unit 2, receiving a control signal from the instruction decoder 7b via the control bus 11b, and outputting a write address and a read address of the instruction buffer 6b via the address bus 10b 5b.

【0011】図2は、図1中のアドレス生成部5aの詳
細構成を示している。図2において、108〜113は
セレクタ、121〜124はレジスタ、129は加算器
である。レジスタ(LNREG0)121は、命令バッ
ファ6aの中の繰り返し開始命令の次の命令のアドレス
を格納するためのレジスタであって、入力部が2入力セ
レクタ108の出力部に接続され、かつ出力部が4入力
セレクタ112の第1の入力部と2入力セレクタ108
の第1の入力部とに接続されている。レジスタ(LNR
EG1)122は、命令バッファ6aの中の他の繰り返
し開始命令の次の命令のアドレスを格納するためのレジ
スタであって、入力部が2入力セレクタ109の出力部
に接続され、かつ出力部が4入力セレクタ112の第2
の入力部と2入力セレクタ109の第1の入力部とに接
続されている。レジスタ(LNREG2)123は、命
令バッファ6aの中の更に他の繰り返し開始命令の次の
命令のアドレスを格納するためのレジスタであって、入
力部が2入力セレクタ110の出力部に接続され、かつ
出力部が4入力セレクタ112の第3の入力部と2入力
セレクタ110の第1の入力部とに接続されている。レ
ジスタ(RADR)124は、命令バッファ6aの読み
出しアドレスを格納するためのレジスタであって、入力
部が3入力セレクタ111の出力部に接続され、かつ出
力部が4入力セレクタ112の第4の入力部と3入力セ
レクタ111の第1の入力部とに接続されている。4入
力セレクタ112は、出力部が加算器129の第1の入
力部に接続されている。該4入力セレクタ112の出力
部は、命令バッファ6aへ読み出しアドレスRADRS
を供給するようにアドレスバス10aにも接続されてい
る。加算器129は、第2の入力部が3入力セレクタ1
13の出力部に接続され、かつ出力部が2入力セレクタ
108〜111の各々の第2の入力部に接続されてい
る。3入力セレクタ111の第3の入力部は、一定値
「0」を入力としている。
FIG. 2 shows the detailed configuration of the address generator 5a in FIG. In FIG. 2, 108 to 113 are selectors, 121 to 124 are registers, and 129 is an adder. The register (LNREG0) 121 is a register for storing the address of the instruction next to the repetition start instruction in the instruction buffer 6a. The input unit is connected to the output unit of the two-input selector 108, and the output unit is The first input unit of the 4-input selector 112 and the 2-input selector 108
Is connected to the first input unit. Register (LNR
EG1) 122 is a register for storing the address of the instruction next to the other repetition start instruction in the instruction buffer 6a. The input is connected to the output of the two-input selector 109, and the output is Second of 4-input selector 112
And the first input unit of the two-input selector 109. The register (LNREG2) 123 is a register for storing the address of the instruction next to the still other repetition start instruction in the instruction buffer 6a, the input part of which is connected to the output part of the two-input selector 110, and An output section is connected to a third input section of the four-input selector 112 and a first input section of the two-input selector 110. The register (RADR) 124 is a register for storing the read address of the instruction buffer 6a. The input unit is connected to the output unit of the three-input selector 111, and the output unit is connected to the fourth input of the four-input selector 112. Unit and a first input unit of the three-input selector 111. The output of the four-input selector 112 is connected to the first input of the adder 129. The output part of the 4-input selector 112 supplies the read address RADRS to the instruction buffer 6a.
To the address bus 10a. The adder 129 is configured such that the second input unit is a three-input selector 1
Thirteen outputs, and the output is connected to the second input of each of the two-input selectors 108-111. The third input unit of the three-input selector 111 receives a constant value “0” as an input.

【0012】127はループ制御部、128は制御ブロ
ック(CNT1)である。ループ制御部127の入力部
は、制御バス11aを介して命令デコーダ7aに接続さ
れている。ループ制御部127の出力(ループエンド信
号:LED)は制御ブロック128の入力部に入力さ
れ、制御ブロック128の出力部は4入力セレクタ11
2の制御入力部に接続されている。
Reference numeral 127 denotes a loop control unit, and 128 denotes a control block (CNT1). The input section of the loop control section 127 is connected to the instruction decoder 7a via the control bus 11a. The output (loop end signal: LED) of the loop control unit 127 is input to the input unit of the control block 128, and the output unit of the control block 128 is a four-input selector 11
2 control inputs.

【0013】126はレジスタ、131は制御ブロック
(CNT2)である。3入力セレクタ113の第1の入
力部は一定値「0」を入力とし、その第2の入力部は一
定値「1」を入力としている。レジスタ(JADR)1
26は、命令バッファ6aにおける相対ジャンプアドレ
スを格納するためのレジスタであって、入力部が制御バ
ス11aを介して命令デコーダ7aに、出力部が3入力
セレクタ113の第3の入力部にそれぞれ接続されてい
る。制御ブロック131は、第1の入力部が制御バス1
3aを介してフラグレジスタ20aに、第2の入力部が
制御バス11aを介して命令デコーダ7aに、出力部が
3入力セレクタ113の制御入力部にそれぞれ接続され
ている。
Reference numeral 126 denotes a register, and 131 denotes a control block (CNT2). The first input of the three-input selector 113 receives a constant value “0”, and the second input thereof receives a constant value “1”. Register (JADR) 1
Reference numeral 26 denotes a register for storing a relative jump address in the instruction buffer 6a. The input unit is connected to the instruction decoder 7a via the control bus 11a, and the output unit is connected to the third input unit of the three-input selector 113. Have been. The control block 131 is such that the first input unit is the control bus 1
The second input unit is connected to the instruction decoder 7a via the control bus 11a, and the output unit is connected to the control input unit of the three-input selector 113, respectively.

【0014】114は3入力セレクタ、125はレジス
タ、130はインクリメンタである。レジスタ(WAD
R)125は、命令バッファ6aの書き込みアドレスを
格納するためのレジスタであって、入力部が3入力セレ
クタ114の出力部に接続され、かつ出力部が3入力セ
レクタ114の第1の入力部とインクリメンタ130の
入力部とに接続されている。該レジスタ125の出力部
は、命令バッファ6aへ書き込みアドレスWADRSを
供給するようにアドレスバス10aにも接続されてい
る。3入力セレクタ114の第2の入力部はインクリメ
ンタ130の出力を入力とし、その第3の入力部は一定
値「0」を入力としている。3入力セレクタ114の制
御入力部は、制御バス9bを介して命令発行ユニット2
に接続されている。
Reference numeral 114 is a three-input selector, 125 is a register, and 130 is an incrementer. Register (WAD
R) 125 is a register for storing the write address of the instruction buffer 6a, the input part of which is connected to the output part of the three-input selector 114, and the output part of which is connected to the first input part of the three-input selector 114. It is connected to the input section of the incrementer 130. The output of the register 125 is also connected to the address bus 10a to supply the write address WADRS to the instruction buffer 6a. The second input of the three-input selector 114 receives the output of the incrementer 130, and the third input receives a constant value "0". The control input unit of the three-input selector 114 is connected to the instruction issuing unit 2 via the control bus 9b.
It is connected to the.

【0015】132は2入力セレクタ、133は制御ブ
ロック(CNT3)、134はフラグレジスタである。
2入力セレクタ132は、第1の入力部が4入力セレク
タ112の出力部に、第2の入力部がレジスタ125の
出力部にそれぞれ接続されている。2入力セレクタ13
2の出力部は制御ブロック133の入力部に、制御ブロ
ック133の出力部はフラグレジスタ134の入力部に
それぞれ接続されている。フラグレジスタ134の出力
部は、制御バス9bを介して命令発行ユニット2に接続
されている。制御ブロック133は、2入力セレクタ1
32を経由して入力されるアドレス値毎に1ビットの記
憶部を備えたものである。
132 is a two-input selector, 133 is a control block (CNT3), and 134 is a flag register.
The two-input selector 132 has a first input unit connected to the output unit of the four-input selector 112, and a second input unit connected to the output unit of the register 125. 2 input selector 13
2 is connected to the input of the control block 133, and the output of the control block 133 is connected to the input of the flag register 134. The output of the flag register 134 is connected to the instruction issuing unit 2 via the control bus 9b. The control block 133 includes a two-input selector 1
It is provided with a 1-bit storage unit for each address value input via the interface 32.

【0016】図3は、図2中のループ制御部127の詳
細構成を示している。図3において、200〜207は
セレクタ、215〜220はレジスタ、226はインク
リメンタ、227は比較器である。レジスタ(LCOR
EG0)215は、繰り返し処理の実行済み回数を格納
するためのレジスタであって、入力部が3入力セレクタ
200の出力部に接続され、かつ出力部が3入力セレク
タ203の第1の入力部と3入力セレクタ200の第1
の入力部とに接続されている。レジスタ(LCOREG
1)216は、内側の繰り返し処理の実行済み回数を格
納するためのレジスタであって、入力部が3入力セレク
タ201の出力部に接続され、かつ出力部が3入力セレ
クタ203の第2の入力部と3入力セレクタ201の第
1の入力部とに接続されている。レジスタ(LCORE
G2)217は、更に内側の繰り返し処理の実行済み回
数を格納するためのレジスタであって、入力部が3入力
セレクタ202の出力部に接続され、かつ出力部が3入
力セレクタ203の第3の入力部と3入力セレクタ20
2の第1の入力部とに接続されている。3入力セレクタ
203の出力部はインクリメンタ226の入力部と比較
器227の第1の入力部とに接続され、インクリメンタ
226の出力部は3入力セレクタ200,201,20
2の各々の第2の入力部に接続されている。3入力セレ
クタ200,201,202の各々の第3の入力部に
は、いずれも一定値「1」が入力されている。
FIG. 3 shows a detailed configuration of the loop control unit 127 in FIG. In FIG. 3, 200 to 207 are selectors, 215 to 220 are registers, 226 is an incrementer, and 227 is a comparator. Register (LCOR
EG0) 215 is a register for storing the number of times the repetition processing has been executed, and has an input unit connected to the output unit of the three-input selector 200, and an output unit connected to the first input unit of the three-input selector 203. First of three-input selector 200
Is connected to the input section. Register (LCOREG
1) Reference numeral 216 denotes a register for storing the number of times of execution of the inner repetition processing. The input unit is connected to the output unit of the three-input selector 201, and the output unit is connected to the second input of the three-input selector 203. Unit and the first input unit of the three-input selector 201. Register (LCORE)
G2) 217 is a register for storing the number of executions of the further inner repetition processing, the input unit being connected to the output unit of the three-input selector 202, and the output unit being the third input unit of the three-input selector 203; Input unit and three-input selector 20
2 first inputs. The output of the three-input selector 203 is connected to the input of the incrementer 226 and the first input of the comparator 227, and the output of the incrementer 226 is connected to the three-input selector 200, 201, 20.
2 is connected to the second input of each of the two. A constant value “1” is input to each of the third input units of the three-input selectors 200, 201, and 202.

【0017】レジスタ(LCREG0)218は、繰り
返し処理の実行されるべき回数を格納するためのレジス
タであって、入力部が2入力セレクタ204の出力部に
接続され、かつ出力部が3入力セレクタ207の第1の
入力部と2入力セレクタ204の第1の入力部とに接続
されている。レジスタ219(LCREG1)は、内側
の繰り返し処理の実行されるべき回数を格納するための
レジスタであって、入力部が2入力セレクタ205の出
力部に接続され、かつ出力部が3入力セレクタ207の
第2の入力部と2入力セレクタ205の第1の入力部と
に接続されている。レジスタ220(LCREG2)
は、更に内側の繰り返し処理の実行されるべき回数を格
納するためのレジスタであって、入力部が2入力セレク
タ206の出力部に接続され、かつ出力部が3入力セレ
クタ207の第3の入力部と2入力セレクタ206の第
1の入力部とに接続されている。3入力セレクタ207
の出力部は、比較器227の第2の入力部に接続されて
いる。2入力セレクタ204,205,206の各々の
第2の入力部は、制御バス11aを介して命令デコーダ
7aに接続されている。比較器227の出力が、ループ
制御部127の出力LEDである。
The register (LCREG0) 218 is a register for storing the number of times the repetitive processing is to be executed. The input section is connected to the output section of the 2-input selector 204, and the output section is connected to the 3-input selector 207. And a first input unit of the two-input selector 204. The register 219 (LCREG1) is a register for storing the number of times the inner repetition processing is to be executed. The input section is connected to the output section of the 2-input selector 205, and the output section is connected to the 3-input selector 207. The second input unit and the first input unit of the two-input selector 205 are connected. Register 220 (LCREG2)
Is a register for storing the number of times the further inner repetition processing is to be performed. The input unit is connected to the output unit of the two-input selector 206, and the output unit is connected to the third input terminal of the three-input selector 207. Unit and the first input unit of the two-input selector 206. 3 input selector 207
Is connected to the second input of the comparator 227. The second input of each of the two-input selectors 204, 205, 206 is connected to the instruction decoder 7a via the control bus 11a. The output of the comparator 227 is the output LED of the loop control unit 127.

【0018】なお、セレクタ108〜111,200〜
207の各々の制御入力部は制御バス11aを介して命
令デコーダ7aに接続されているが、図2及び図3では
これらのセレクタ制御入力の図示を省略している。
The selectors 108 to 111, 200 to
Each control input unit 207 is connected to the instruction decoder 7a via the control bus 11a, but illustration of these selector control inputs is omitted in FIGS.

【0019】図4は、図1中の命令メモリ1に格納され
ている命令のフォーマット例を示している。図4におい
て、21は実行ユニット指定ビット(EUB)であり、
22はコード部である。実行ユニット指定ビット21
は、演算実行ユニット8cと第1及び第2の演算処理ユ
ニット3a,3bとのうちのいずれのユニットで当該命
令が実行されるべきかを表す2ビットからなる部分であ
る。EUBをバイナリ表記すると、EUB=00は演算
実行ユニット8cを、EUB=01は第1の演算処理ユ
ニット3aを、EUB=10は第2の演算処理ユニット
3bをそれぞれ指定する。コード部22は、当該命令の
実行内容を示す部分であって、オペコードとオペランド
とを含む。条件分岐命令の場合には、条件コードと相対
ジャンプアドレスとがコード部22の中に定義される。
FIG. 4 shows an example of the format of an instruction stored in the instruction memory 1 in FIG. In FIG. 4, reference numeral 21 denotes an execution unit designation bit (EUB);
22 is a code part. Execution unit specification bit 21
Is a 2-bit portion indicating which of the arithmetic execution unit 8c and the first and second arithmetic processing units 3a and 3b should execute the instruction. When EUB is expressed in binary, EUB = 00 specifies the operation execution unit 8c, EUB = 01 specifies the first operation processing unit 3a, and EUB = 10 specifies the second operation processing unit 3b. The code section 22 is a part indicating the execution content of the instruction, and includes an operation code and an operand. In the case of a conditional branch instruction, a condition code and a relative jump address are defined in the code section 22.

【0020】図1のマイクロプロセッサの動作を説明す
る。まず、命令発行ユニット2は、制御バス18を経由
してアドレスと読み出し許可信号とを命令メモリ1へ供
給し、命令バス19を経由して命令をフェッチする。次
のステップでは、フェッチした命令のデコード処理を命
令発行ユニット2が実行する。この命令デコード処理で
は、図4に示した実行ユニット指定ビット(EUB)2
1の部分のデコード処理を行う。EUBが「00(バイ
ナリ表記)」である場合には、命令発行ユニット2が命
令のコード部22を更にデコード処理し、該デコード処
理の結果を演算実行ユニット8cへ命令バス9aを経由
して供給し、演算実行ユニット8cでの演算実行処理に
移行する。EUBが「01」である場合には、命令発行
ユニット2が命令のコード部22を第1の演算処理ユニ
ット3a内に含まれる命令バッファ6aに命令バス9a
を経由して書き込む。EUBが「10」である場合に
は、命令発行ユニット2が命令のコード部22を第2の
演算処理ユニット3b内に含まれる命令バッファ6bに
命令バス9aを経由して書き込む。EUBが「01」、
「10」のいずれである場合でも、命令バッファ6a,
6bへの命令書き込み処理の後は、命令毎に命令バッフ
ァ6a,6bからの命令読み出し処理に移行し、命令デ
コーダ7a,7bによる命令デコード処理を経て、演算
実行ユニット8a,8bでの演算処理の実行へ移行す
る。
The operation of the microprocessor shown in FIG. 1 will be described. First, the instruction issuing unit 2 supplies an address and a read permission signal to the instruction memory 1 via the control bus 18, and fetches an instruction via the instruction bus 19. In the next step, the instruction issuing unit 2 executes decoding of the fetched instruction. In this instruction decoding process, the execution unit designation bit (EUB) 2 shown in FIG.
1 is decoded. When the EUB is "00 (binary notation)", the instruction issuing unit 2 further decodes the code part 22 of the instruction, and supplies the result of the decoding processing to the arithmetic execution unit 8c via the instruction bus 9a. Then, the process proceeds to the operation execution process in the operation execution unit 8c. If the EUB is "01", the instruction issuing unit 2 stores the code part 22 of the instruction in the instruction buffer 6a included in the first arithmetic processing unit 3a in the instruction bus 9a.
Write via. If EUB is "10", the instruction issuing unit 2 writes the code part 22 of the instruction to the instruction buffer 6b included in the second arithmetic processing unit 3b via the instruction bus 9a. EUB is "01",
In any case of "10", the instruction buffer 6a,
After the instruction writing process into the instruction execution units 8a and 8b, the process shifts to an instruction reading process from the instruction buffers 6a and 6b for each instruction, and through an instruction decoding process by the instruction decoders 7a and 7b. Move to execution.

【0021】図5は、図1のマイクロプロセッサにおけ
る実行命令列の例を示している。ここでは、図5に示す
12個の命令の各々のバイナリコードが命令メモリ1に
格納されているものとする。この例によれば、第1及び
第2命令(OP1及びOP2)のEUBはいずれも「0
0」である。これらの命令はコード部22まで命令発行
ユニット2でデコード処理され、該デコード処理の結果
が演算実行ユニット8cに命令バス9aを経由して供給
され、演算処理が実行される。第3〜第6命令(EX1
−OP1からEX1−OP4まで)のEUBはいずれも
「01」であるので、これらの命令は第1の演算処理ユ
ニット3a内の命令バッファ6aに命令バス9aを経由
して書き込み処理され、演算実行ユニット8aで演算処
理が行われる。第7〜第10命令(OP3からOP6ま
で)のEUBはいずれも「00」であるので、第1及び
第2命令と同様、これらの命令もコード部22まで命令
発行ユニット2でデコード処理され、該デコード処理の
結果が演算実行ユニット8cに命令バス9aを経由して
供給され、演算処理が実行される。最後に、第11及び
第12命令(EX2−OP1及びEX2−OP2)のE
UBはいずれも「10」であるので、これらの命令は第
2の演算処理ユニット3b内の命令バッファ6bに命令
バス9aを経由して書き込み処理され、演算実行ユニッ
ト8bで演算処理が行われる。
FIG. 5 shows an example of an execution instruction sequence in the microprocessor of FIG. Here, it is assumed that the binary code of each of the twelve instructions shown in FIG. According to this example, the EUBs of the first and second instructions (OP1 and OP2) are both “0”.
0 ". These instructions are decoded by the instruction issuing unit 2 up to the code section 22, and the result of the decoding is supplied to the arithmetic execution unit 8c via the instruction bus 9a, and the arithmetic processing is executed. Third to sixth instructions (EX1
-OP1 to EX1-OP4) are all "01", so these instructions are written to the instruction buffer 6a in the first arithmetic processing unit 3a via the instruction bus 9a, and are executed. The arithmetic processing is performed in the unit 8a. Since the EUBs of the seventh to tenth instructions (from OP3 to OP6) are all "00", these instructions are decoded up to the code part 22 by the instruction issuing unit 2 similarly to the first and second instructions. The result of the decoding process is supplied to the operation execution unit 8c via the instruction bus 9a, and the operation process is executed. Finally, the E of the eleventh and twelfth instructions (EX2-OP1 and EX2-OP2)
Since all UBs are "10", these instructions are written to the instruction buffer 6b in the second arithmetic processing unit 3b via the instruction bus 9a, and arithmetic processing is performed in the arithmetic execution unit 8b.

【0022】ここで、第1の演算処理ユニット3a内の
命令バッファ6aへの命令の書き込み処理を詳細に説明
する。命令バッファ6aへの書き込み処理が開始される
とまず、セレクタ114が第3の入力値である一定値
「0」を選択するように、命令発行ユニット2から制御
バス9bを経由してアドレス生成部5aに制御信号が供
給される。レジスタ125は、セレクタ114から受け
取った値「0」を格納する。このレジスタ125の格納
値「0」は、命令バッファ6aの書き込みアドレスWA
DRSの初期値としてアドレスバス10aへ出力され
る。このアドレスWADRSに基づき、命令発行ユニッ
ト2から命令バス9aを経由して命令バッファ6aに供
給された命令の書き込みが実行される。同一命令バッフ
ァ6aへの命令書き込みが連続する場合には、1クロッ
クサイクル毎にインクリメンタ130によりレジスタ1
25の出力値を1インクリメントし、これをセレクタ1
14を経由してレジスタ125の次の値として格納し、
命令バッファ6aの次命令の書き込みアドレスとしてア
ドレスバス10aを経由して出力し、連続する命令を命
令バッファ6aの連続するアドレスに書き込む。なお、
この命令書き込みの際には、図2では不図示としている
が、アドレス生成部5aから命令バッファ6aに書き込
みイネーブル信号も供給され、レジスタ125の出力が
示すアドレスへの命令書き込みの許可を行っている。命
令発行ユニット2からの命令書き込み処理が行われない
場合には、セレクタ114が第1の入力値を選択する。
つまり、レジスタ125の更新が行われない。また、命
令バッファ6aに書き込みイネーブル信号は供給され
ず、命令バッファ6aへの命令書き込みが待ち状態とな
る。
Here, the process of writing an instruction to the instruction buffer 6a in the first arithmetic processing unit 3a will be described in detail. When the writing process to the instruction buffer 6a is started, first, the address generation unit is transmitted from the instruction issuing unit 2 via the control bus 9b so that the selector 114 selects the constant value "0" as the third input value. A control signal is supplied to 5a. The register 125 stores the value “0” received from the selector 114. The stored value “0” of the register 125 is the write address WA of the instruction buffer 6a.
It is output to the address bus 10a as the initial value of DRS. Based on the address WADRS, the writing of the instruction supplied from the instruction issuing unit 2 to the instruction buffer 6a via the instruction bus 9a is executed. When instructions are continuously written to the same instruction buffer 6a, the register 1 is incremented by the incrementer 130 every clock cycle.
25 is incremented by one, and this is
14 and stored as the next value in the register 125,
It is output via the address bus 10a as a write address of the next instruction in the instruction buffer 6a, and successive instructions are written to successive addresses in the instruction buffer 6a. In addition,
At the time of writing the instruction, although not shown in FIG. 2, a write enable signal is also supplied from the address generation unit 5a to the instruction buffer 6a to permit writing of the instruction to the address indicated by the output of the register 125. . When the instruction writing process from the instruction issuing unit 2 is not performed, the selector 114 selects the first input value.
That is, the register 125 is not updated. Further, the write enable signal is not supplied to the instruction buffer 6a, and the writing of the instruction to the instruction buffer 6a is in a waiting state.

【0023】一方、レジスタ125から出力された書き
込みアドレスWADRSは、セレクタ132を経由して
制御ブロック133に取り込まれる。制御ブロック13
3の内部では、セレクタ132を経由して取り込んだ書
き込みアドレスに対応した1ビットの記憶部の値を
「0」から「1」に書き換える。制御ブロック133の
出力値は命令バッファ6aの全てのアドレスに対応した
記憶部の値の論理積であり、該論理積がフラグレジスタ
134に格納される。すなわち、フラグレジスタ134
の値すなわち状態フラグは、命令バッファ6aの全ての
アドレスの記憶部が未読み出しの命令で満たされている
場合には該命令バッファ6aへの書き込み処理が停止す
るように、「1」に設定される。このフラグレジスタ1
34の出力値は制御バス9bを経由して命令発行ユニッ
ト2に伝えられ、第1の演算処理ユニット3aへの命令
発行が制御される。また、図2では不図示としている
が、フラグレジスタ134の出力値は命令バッファ6a
への書き込みイネーブル信号にも反映される。
On the other hand, the write address WADRS output from the register 125 is taken into the control block 133 via the selector 132. Control block 13
Inside 3, the value of the 1-bit storage unit corresponding to the write address fetched via the selector 132 is rewritten from "0" to "1". The output value of the control block 133 is the logical product of the values in the storage unit corresponding to all the addresses of the instruction buffer 6a, and the logical product is stored in the flag register 134. That is, the flag register 134
, Ie, the status flag is set to “1” so that the writing process to the instruction buffer 6a is stopped when the storage units of all the addresses of the instruction buffer 6a are filled with unread instructions. You. This flag register 1
The output value of 34 is transmitted to the instruction issuing unit 2 via the control bus 9b, and the instruction issuance to the first arithmetic processing unit 3a is controlled. Although not shown in FIG. 2, the output value of the flag register 134 is stored in the instruction buffer 6a.
This is also reflected in the write enable signal to

【0024】図6は、第1の演算処理ユニット3aにお
ける繰り返し処理を含む実行命令列の例を示している。
図6中の第2命令(LOOP)は繰り返し開始命令であ
り、第6命令(LOOP−end)は繰り返し終了命令
である。
FIG. 6 shows an example of an execution instruction sequence including repetition processing in the first arithmetic processing unit 3a.
The second instruction (LOOP) in FIG. 6 is a repetition start instruction, and the sixth instruction (LOOP-end) is a repetition end instruction.

【0025】図7は、第1の演算処理ユニット3aのパ
イプライン構成を、図6の命令列の例に即して示したも
のである。第1の演算処理ユニット3aの動作は、命令
バッファ6aからの命令フェッチ処理(IF)、命令デ
コーダ7aでの命令デコード処理(DEC)、演算実行
ユニット8aでの演算実行処理(EXE)という3ステ
ージのパイプラインになっている。各パイプラインステ
ージは、1クロックサイクルで実行可能である。図7で
は、右方向が時間の正の方向であり、縦方向の下向きが
実行命令の流れを示しており、各サイクルが符号T0〜
T8で識別される。
FIG. 7 shows the pipeline configuration of the first arithmetic processing unit 3a in accordance with the example of the instruction sequence shown in FIG. The operation of the first arithmetic processing unit 3a includes three stages: an instruction fetch process (IF) from the instruction buffer 6a, an instruction decode process (DEC) by the instruction decoder 7a, and an arithmetic execution process (EXE) by the arithmetic execution unit 8a. Pipeline. Each pipeline stage can be executed in one clock cycle. In FIG. 7, the right direction is the positive direction of time, the downward direction is the flow of execution instructions, and each cycle is denoted by T0 to T0.
Identified by T8.

【0026】まず、サイクルT0では、第1命令(EX
1−OP1)が命令バッファ6aから読み出される。ア
ドレス生成部5aでは、制御バス9bを経由して得た命
令実行開始の制御信号を元に、セレクタ112が第4の
入力値を選択するように、制御ブロック128がデフォ
ルトの制御信号を供給する。セレクタ111は、第3の
入力値である一定値「0」を選択するようにデフォルト
の制御信号を受け付ける。これにより、レジスタ124
には値「0」が格納される。このレジスタ124に格納
された値「0」は、アドレスバス10aを経由して命令
バッファ6aの読み出しアドレスRADRSの初期値と
して出力される。それと同時に、アドレス生成部5aか
ら命令バッファ6aに読み出しイネーブル信号が供給さ
れ、命令バッファ6aから命令デコーダ7aへの命令バ
ス12aを経由した命令読み出しが実行される。読み出
しアドレスRADRSは、セレクタ132を経由して制
御ブロック133にも供給される。制御ブロック133
は、この読み出しアドレスRADRSに対応して、書き
込み時に「1」に設定された1ビットの記憶部の値を
「0」に戻す処理を行う。
First, in the cycle T0, the first instruction (EX
1-OP1) is read from the instruction buffer 6a. In the address generation unit 5a, the control block 128 supplies a default control signal so that the selector 112 selects the fourth input value based on the instruction execution start control signal obtained via the control bus 9b. . The selector 111 receives a default control signal so as to select a constant value “0” that is a third input value. As a result, the register 124
Stores the value “0”. The value “0” stored in the register 124 is output as the initial value of the read address RADRS of the instruction buffer 6a via the address bus 10a. At the same time, a read enable signal is supplied from the address generation unit 5a to the instruction buffer 6a, and the instruction is read from the instruction buffer 6a to the instruction decoder 7a via the instruction bus 12a. The read address RADRS is also supplied to the control block 133 via the selector 132. Control block 133
Performs a process of returning the value of the 1-bit storage unit set to “1” at the time of writing to “0” in accordance with the read address RADRS.

【0027】サイクルT1では、命令デコーダ7aでの
第1命令のデコード処理と、命令バッファ6aからの第
2命令である繰り返し開始命令(LOOP)の読み出し
処理とが並列に実行される。ここで、読み出しアドレス
の更新について詳しく説明する。アドレス生成部5aで
は、セレクタ112が第4の入力値を選択するように制
御信号が固定されている。サイクルT1では、セレクタ
112を経由して出力されるレジスタ124の値、これ
はサイクルT0における命令バッファ6aの読み出しア
ドレスRADRSであるが、これに加算器129によっ
て「1」を加算し、セレクタ111を経由してレジスタ
124の値を更新する。サイクルT1では、セレクタ1
08〜110がいずれも第1の入力値を選択し、セレク
タ111が第2の入力値すなわち加算器129の出力値
を選択するようにそれぞれ制御信号が与えられる。一
方、セレクタ113が第2の入力値である一定値「1」
を選択し、該一定値「1」が加算器129の第2の入力
部に供給されるように、制御ブロック131がデフォル
トの制御信号をセレクタ113に与える。このようにし
て、命令バッファ6aに供給される読み出しアドレスR
ADRSは1ずつインクリメントされる。
In the cycle T1, the decoding processing of the first instruction by the instruction decoder 7a and the reading processing of the repetition start instruction (LOOP) as the second instruction from the instruction buffer 6a are executed in parallel. Here, the update of the read address will be described in detail. In the address generator 5a, the control signal is fixed so that the selector 112 selects the fourth input value. In the cycle T1, the value of the register 124 output via the selector 112, which is the read address RADRS of the instruction buffer 6a in the cycle T0, is added with "1" by the adder 129 to make the selector 111 The value of the register 124 is updated via the terminal. In cycle T1, selector 1
08 to 110 select the first input value, and the control signal is applied so that the selector 111 selects the second input value, that is, the output value of the adder 129. On the other hand, the selector 113 sets the second input value, ie, the constant value “1”.
And the control block 131 supplies a default control signal to the selector 113 so that the constant value “1” is supplied to the second input of the adder 129. Thus, the read address R supplied to the instruction buffer 6a is
ADRS is incremented by one.

【0028】サイクルT2では、演算実行ユニット8a
での第1命令の演算実行処理と、命令デコーダ7aでの
第2命令のデコード処理と、命令バッファ6aからの第
3命令(EX1−OP2)の読み出し処理とが並列に実
行される。第1命令がデータ処理結果を格納する命令で
ある場合には、演算実行ユニット8aが制御バス16a
を経由してアドレス及び制御信号を、データバス17a
を経由してデータをそれぞれデータメモリ4aに供給す
る。第1命令が演算命令である場合には、演算実行ユニ
ット8aにおける演算結果に応じて、制御バス14aを
介してフラグレジスタ20aに演算結果フラグが格納さ
れる。繰り返し開始命令である第2命令は、コード部2
2の中に繰り返し処理の回数(図6及び図7の例では3
回)を持っている。命令デコーダ7aでデコードされた
繰り返し回数は、制御バス11a及びセレクタ204を
経由してレジスタ218に格納される。このとき、セレ
クタ204が第2の入力値である制御バス11aの値を
選択し、セレクタ205,206が各々第1の入力値を
選択するようにそれぞれ制御信号が供給される。一方、
セレクタ108が第2の入力値すなわち加算器129の
出力値を選択するように制御信号が供給され、レジスタ
121に第3命令の読み出しアドレスが格納される。こ
のレジスタ121の値が次サイクル以降も保持されるよ
うに、セレクタ108への制御信号が保持される。第3
命令の読み出し動作は、第1及び第2命令の読み出し動
作と同様である。
In cycle T2, the operation execution unit 8a
, A process of decoding the second instruction by the instruction decoder 7a, and a process of reading the third instruction (EX1-OP2) from the instruction buffer 6a are executed in parallel. When the first instruction is an instruction for storing a data processing result, the operation execution unit 8a is controlled by the control bus 16a.
Via the data bus 17a
The data is supplied to the data memory 4a via the data memory 4a. When the first instruction is an operation instruction, an operation result flag is stored in the flag register 20a via the control bus 14a according to the operation result in the operation execution unit 8a. The second instruction, which is a repetition start instruction, has a code part 2
2, the number of repetition processes (3 in the example of FIGS. 6 and 7).
Times). The number of repetitions decoded by the instruction decoder 7a is stored in the register 218 via the control bus 11a and the selector 204. At this time, control signals are supplied such that the selector 204 selects the value of the control bus 11a, which is the second input value, and the selectors 205 and 206 each select the first input value. on the other hand,
A control signal is supplied so that the selector 108 selects the second input value, that is, the output value of the adder 129, and the read address of the third instruction is stored in the register 121. A control signal to selector 108 is held so that the value of register 121 is held after the next cycle. Third
The read operation of the instruction is the same as the read operation of the first and second instructions.

【0029】サイクルT3では、第2命令の演算実行処
理と、第3命令のデコード処理と、第4命令(EX1−
OP3)の読み出し処理とが並列に実行される。第2命
令は繰り返し開始命令なので演算実行処理は存在しな
い。第3命令のデコード処理と、第4命令の読み出し処
理とは、サイクルT1の場合と同様である。
In cycle T3, the operation execution processing of the second instruction, the decoding processing of the third instruction, and the fourth instruction (EX1-
The reading process of OP3) is executed in parallel. Since the second instruction is a repeat start instruction, there is no operation execution processing. The decoding processing of the third instruction and the reading processing of the fourth instruction are similar to those in the cycle T1.

【0030】サイクルT4では、第3命令の演算実行処
理と、第4命令のデコード処理と、第5命令(EX1−
OP4)の読み出し処理とが並列に実行される。
In cycle T4, the operation execution processing of the third instruction, the decoding processing of the fourth instruction, and the fifth instruction (EX1-
The reading process of OP4) is executed in parallel.

【0031】サイクルT5では、第4命令の演算実行処
理と、第5命令のデコード処理と、第6命令である繰り
返し終了命令(LOOP−end)の読み出し処理とが
並列に実行される。読み出された第6命令は、サイクル
T6においてデコード処理される。命令デコーダ7a
は、繰り返し終了命令をデコードすると、アドレス生成
部5aのセレクタ200が第3の入力値「1」を選択す
るように制御信号を供給する。これにより、レジスタ2
15に値「1」が格納される。また、セレクタ203及
び207が各々第1の入力値を選択するように制御信号
が供給される。比較器227は、レジスタ215の値と
レジスタ218の値との比較を行う。比較器227の出
力を受け取った制御ブロック128は、レジスタ215
の値がレジスタ218の値より小さいときに、セレクタ
112が第1の入力値を選択するように制御信号を供給
する。この制御により、第6命令の次の命令読み出しア
ドレスは、セレクタ112の第1の入力値であるレジス
タ121の値、すなわち命令バッファ6aの中の第3命
令(EX1−OP2)の格納アドレスとなる。その結
果、サイクルT6では第3命令の読み出し処理が再度実
行される。そして、レジスタ124の値が加算器129
の出力に応じて更新される。
In cycle T5, the operation execution processing of the fourth instruction, the decoding processing of the fifth instruction, and the reading processing of the repetition end instruction (LOOP-end) which is the sixth instruction are executed in parallel. The read sixth instruction is decoded in cycle T6. Instruction decoder 7a
Supplies a control signal so that the selector 200 of the address generation unit 5a selects the third input value "1" when decoding the repetition end instruction. Thereby, the register 2
The value “1” is stored in 15. Further, a control signal is supplied so that each of the selectors 203 and 207 selects the first input value. The comparator 227 compares the value of the register 215 with the value of the register 218. Upon receiving the output of the comparator 227, the control block 128
Is smaller than the value of the register 218, the selector 112 supplies a control signal to select the first input value. With this control, the instruction read address next to the sixth instruction becomes the value of the register 121 that is the first input value of the selector 112, that is, the storage address of the third instruction (EX1-OP2) in the instruction buffer 6a. . As a result, in the cycle T6, the read processing of the third instruction is executed again. Then, the value of the register 124 is added to the adder 129.
It is updated according to the output of.

【0032】以上の過程により、第3命令から第6命令
までを命令バッファ6aから命令デコーダ7aへ繰り返
し供給することを可能としている。しかも、第6命令で
ある繰り返し終了命令がデコード処理される度に、レジ
スタ215に格納されている値はインクリメンタ226
により1インクリメント処理される。そして、レジスタ
215の値とレジスタ218の値とが一致したとき、す
なわちレジスタ218に設定された回数だけ命令バッフ
ァ6aから命令デコーダ7aへの命令読み出しが繰り返
し実行されたときには、セレクタ112が第4の入力値
を選択するように、デフォルトの制御信号が制御ブロッ
ク128から供給される。その結果、繰り返し処理を終
了して後続命令の処理に移る。以上の動作により、命令
バッファ6aを含む第1の演算処理ユニット3aで繰り
返し処理を実現する。
According to the above process, the third to sixth instructions can be repeatedly supplied from the instruction buffer 6a to the instruction decoder 7a. Further, every time the repetition end instruction which is the sixth instruction is decoded, the value stored in the register 215 is incremented by the incrementer 226.
Is incremented by one. When the value of the register 215 matches the value of the register 218, that is, when the instruction reading from the instruction buffer 6a to the instruction decoder 7a is repeatedly executed by the number of times set in the register 218, the selector 112 sets the fourth A default control signal is provided from control block 128 to select an input value. As a result, the repetition processing ends, and the processing shifts to the processing of the subsequent instruction. With the above operation, the first arithmetic processing unit 3a including the instruction buffer 6a realizes the repetitive processing.

【0033】図8は、第1の演算処理ユニット3aにお
ける2重の繰り返し処理を含む実行命令列の例を示して
いる。第2命令と第11命令とで定義される外側の繰り
返し処理は、図6の場合と同様に、レジスタ121,2
15及び218を用いて実行される。内側の繰り返し開
始命令である第6命令が命令デコーダ7aでデコードさ
れると、セレクタ204が第1の入力値を、セレクタ2
05が第2の入力値をそれぞれ選択するように制御信号
が供給される結果、命令デコーダ7aでデコードされた
第6命令に係る繰り返し回数がレジスタ219に格納さ
れる。また、セレクタ109が第2の入力値を選択する
ように制御信号が供給される結果、命令バッファ6aの
中の第7命令(内側の繰り返し開始命令の次の命令)の
格納アドレスの値がレジスタ122に格納される。内側
の繰り返し終了命令である第9命令が命令デコーダ7a
でデコードされると、セレクタ201が第3の入力値で
ある一定値「1」を選択するように制御信号が与えら
れ、該一定値「1」がレジスタ216に格納される。ま
た、セレクタ203が第2の入力値であるレジスタ21
6の出力値を選択するように制御信号が与えられる。一
方、セレクタ207が第2の入力値を選択するように制
御信号が供給され、比較器227はレジスタ216の値
とレジスタ219の値とを比較する。レジスタ216の
値がレジスタ219の値より小さい場合には、セレクタ
112が第2の入力値を選択するように制御ブロック1
28から制御信号が供給される結果、アドレスバス10
aを経由して命令バッファ6aに第7命令の読み出しア
ドレスRADRSが供給される。以上のようにして、内
側の繰り返し処理の実行が制御される。図1〜図3の例
では、命令バッファ6aを含む第1の演算処理ユニット
3aで3重の繰り返し処理を実現できる。なお、4重以
上の繰り返し処理への拡張は容易であろう。
FIG. 8 shows an example of an execution instruction sequence including double repetition processing in the first arithmetic processing unit 3a. The outer repetition processing defined by the second instruction and the eleventh instruction is performed in the same manner as in the case of FIG.
15 and 218. When the sixth instruction that is the inner repetition start instruction is decoded by the instruction decoder 7a, the selector 204 outputs the first input value to the selector 2
As a result, a control signal is supplied so that the instruction signal 05 selects the second input value. As a result, the number of repetitions of the sixth instruction decoded by the instruction decoder 7a is stored in the register 219. Further, as a result of the control signal being supplied so that the selector 109 selects the second input value, the value of the storage address of the seventh instruction (the instruction next to the inner repetition start instruction) in the instruction buffer 6a is changed to the register 122. The ninth instruction which is the inner repetition end instruction is an instruction decoder 7a
, A control signal is provided so that the selector 201 selects the constant value “1” as the third input value, and the constant value “1” is stored in the register 216. Further, the selector 203 outputs the second input value, the register 21
A control signal is provided to select the output value of 6. On the other hand, a control signal is supplied so that selector 207 selects the second input value, and comparator 227 compares the value of register 216 with the value of register 219. If the value of the register 216 is smaller than the value of the register 219, the control block 1 causes the selector 112 to select the second input value.
As a result of the supply of the control signal from the
The read address RADRS of the seventh instruction is supplied to the instruction buffer 6a via a. As described above, the execution of the inner repetition processing is controlled. In the example of FIGS. 1 to 3, triple repetitive processing can be realized by the first arithmetic processing unit 3a including the instruction buffer 6a. It should be noted that it is easy to expand to a quadruple or more repetition process.

【0034】図9は、第1の演算処理ユニット3aにお
ける条件分岐命令を含む実行命令列の例を示している。
図9中の第3命令(CEXEC)は条件分岐命令であ
り、条件コードZEで指定されたゼロフラグ(演算結果
フラグの1つ)がセットされている場合には第6命令
(EX1−OP5)へジャンプするように命令実行制御
がなされるものである。第3命令中のLABELは、第
6命令への相対ジャンプを表している。条件分岐命令で
ある第3命令が命令デコーダ7aでデコードされると、
該命令デコーダ7aでデコードされた条件コードが制御
バス11aを経由してアドレス生成部5aの制御ブロッ
ク131に供給される。また、相対ジャンプアドレスが
同制御バス11aを経由してレジスタ126に格納さ
れ、該アドレスがセレクタ113の第3入力部に供給さ
れる。制御ブロック131は、命令デコーダ7aから供
給された条件コードとフラグレジスタ20aに格納され
た演算結果フラグとを参照して条件一致、不一致の判断
を行い、条件一致の場合にはセレクタ113が第3の入
力値である相対ジャンプアドレスを、条件不一致の場合
にはセレクタ113が第2の入力値である一定値「1」
をそれぞれ選択するように制御信号を与える。したがっ
て、加算器129の出力値、すなわち命令バッファ6a
の次の読み出しアドレスは、条件の一致・不一致に応じ
て変更される。以上の動作により、命令バッファ6aを
含む第1の演算処理ユニット3aで条件分岐命令の処理
を実現する。
FIG. 9 shows an example of an execution instruction sequence including a conditional branch instruction in the first arithmetic processing unit 3a.
The third instruction (CEXEC) in FIG. 9 is a conditional branch instruction. When the zero flag (one of the operation result flags) specified by the condition code ZE is set, the operation proceeds to the sixth instruction (EX1-OP5). Instruction execution control is performed so as to jump. LABEL in the third instruction indicates a relative jump to the sixth instruction. When the third instruction, which is a conditional branch instruction, is decoded by the instruction decoder 7a,
The condition code decoded by the instruction decoder 7a is supplied to the control block 131 of the address generator 5a via the control bus 11a. Further, the relative jump address is stored in the register 126 via the control bus 11a, and the address is supplied to the third input section of the selector 113. The control block 131 refers to the condition code supplied from the instruction decoder 7a and the operation result flag stored in the flag register 20a to determine whether the conditions match or not. When the condition does not match, the selector 113 sets the relative jump address which is the input value of the second input value to the constant value "1"
Is given to each of them. Therefore, the output value of the adder 129, that is, the instruction buffer 6a
The next read address is changed according to the matching / mismatch of the condition. With the above operation, the processing of the conditional branch instruction is realized in the first arithmetic processing unit 3a including the instruction buffer 6a.

【0035】図10(a)はマクロ定義命令のフォーマ
ット例を、図10(b)はマクロ呼び出し命令のフォー
マット例をそれぞれ示している。図10(a)及び図1
0(b)において、EUB21は、第2の演算処理ユニ
ット3bを指定するように固定値「10」である。マク
ロ定義命令のコード部22は、オペコード(OP)31
と命令数(DNUM)32とを含む。DNUM32は、
当該マクロ定義命令に係るマクロ本体を構成する命令の
数を表している。マクロ呼び出し命令のコード部22
は、オペコード(OP)41と先頭アドレス(TOPA
DR)42と命令数(ENUM)43とを含む。TOP
ADR42は、当該マクロ呼び出し命令に係るマクロ本
体を構成する複数の命令のうちの先頭の命令が命令バッ
ファ6bの中のどの位置に格納されているかを表してい
る。ENUM43は、当該マクロ呼び出し命令に係るマ
クロ本体を構成する命令の数を表している。
FIG. 10A shows a format example of a macro definition command, and FIG. 10B shows a format example of a macro call command. FIG. 10 (a) and FIG.
At 0 (b), the EUB 21 has a fixed value “10” so as to designate the second arithmetic processing unit 3b. The code part 22 of the macro definition instruction includes an operation code (OP) 31
And the number of instructions (DNUM) 32. DNUM32 is
It indicates the number of instructions constituting the macro body according to the macro definition instruction. Code part 22 of macro call instruction
Is an operation code (OP) 41 and a start address (TOPA)
DR) 42 and the number of instructions (ENUM) 43. TOP
The ADR 42 indicates at which position in the instruction buffer 6b the leading instruction of the plurality of instructions constituting the macro body relating to the macro call instruction is stored. ENUM 43 indicates the number of instructions constituting the macro body related to the macro call instruction.

【0036】図11は、図1中のアドレス生成部5bの
詳細構成を示している。図11において、300〜30
3はセレクタ、310〜312はレジスタ、320はイ
ンクリメンタである。レジスタ(MWADR)310
は、命令バッファ6bにおけるマクロ構成命令の書き込
みアドレスを格納するためのレジスタであって、入力部
が3入力セレクタ300の出力部に接続され、かつ出力
部が2入力セレクタ303の第1の入力部と3入力セレ
クタ300の第1の入力部とに接続されている。レジス
タ(WADR)311は、命令バッファ6bにおけるマ
クロ構成命令以外の命令、すなわち非マクロ構成命令の
書き込みアドレスを格納するためのレジスタ(WAD
R)であって、入力部が4入力セレクタ301の出力部
に接続され、かつ出力部が2入力セレクタ303の第2
の入力部と4入力セレクタ301の第1の入力部とに接
続されている。レジスタ(BDRYREG)312は、
命令バッファ6bにおける境界アドレス(BDRY)、
すなわちマクロ定義領域(マクロ構成命令の格納領域)
の最終アドレスの次のアドレスを格納するためのレジス
タであって、入力部が3入力セレクタ302の出力部に
接続され、かつ出力部が3入力セレクタ302の第1の
入力部に接続されている。2入力セレクタ303の制御
入力部は、制御バス9bを介して命令発行ユニット2に
接続されている。2入力セレクタ303の出力部は、イ
ンクリメンタ320の入力部に接続されるとともに、命
令バッファ6bへ書き込みアドレスWADRSを供給す
るようにアドレスバス10bにも接続されている。セレ
クタ300〜302の各々の第2の入力部は、インクリ
メンタ320の出力部に接続されている。4入力セレク
タ301の第3の入力部は、レジスタ312の出力部に
接続されている。3入力セレクタ300の第3の入力
部、4入力セレクタ301の第4の入力部及び3入力セ
レクタ302の第3の入力部には、いずれも一定値
「0」が入力されている。
FIG. 11 shows a detailed configuration of the address generator 5b in FIG. In FIG. 11, 300 to 30
3 is a selector, 310 to 312 are registers, and 320 is an incrementer. Register (MWADR) 310
Is a register for storing a write address of a macro configuration instruction in the instruction buffer 6b. The input unit is connected to the output unit of the three-input selector 300, and the output unit is connected to the first input unit of the two-input selector 303. And a first input unit of the three-input selector 300. The register (WADR) 311 is a register (WAD) for storing an instruction other than the macro configuration instruction in the instruction buffer 6b, that is, a write address of a non-macro configuration instruction.
R), wherein the input section is connected to the output section of the 4-input selector 301 and the output section is
And the first input unit of the four-input selector 301. The register (BDRYREG) 312 is
A boundary address (BDRY) in the instruction buffer 6b,
In other words, macro definition area (storage area for macro configuration instructions)
For storing an address next to the last address of the three-input selector 302, wherein the input part is connected to the output part of the three-input selector 302 and the output part is connected to the first input part of the three-input selector 302. . The control input section of the two-input selector 303 is connected to the instruction issuing unit 2 via the control bus 9b. The output of the two-input selector 303 is connected to the input of the incrementer 320, and is also connected to the address bus 10b so as to supply the write address WADRS to the instruction buffer 6b. The second input of each of the selectors 300 to 302 is connected to the output of the incrementer 320. The third input of the four-input selector 301 is connected to the output of the register 312. A constant value “0” is input to each of the third input unit of the three-input selector 300, the fourth input unit of the four-input selector 301, and the third input unit of the three-input selector 302.

【0037】304〜306はセレクタ、313,31
4はレジスタ、321はインクリメンタである。レジス
タ(MRADR)313は、命令バッファ6bにおける
マクロ構成命令の読み出しアドレスを格納するためのレ
ジスタであって、入力部が3入力セレクタ304の出力
部に接続され、かつ出力部が2入力セレクタ306の第
1の入力部と3入力セレクタ304の第1の入力部とに
接続されている。レジスタ(RADR)314は、命令
バッファ6bにおける非マクロ構成命令の読み出しアド
レスを格納するためのレジスタであって、入力部が3入
力セレクタ305の出力部に接続され、かつ出力部が2
入力セレクタ306の第2の入力部と3入力セレクタ3
05の第1の入力部とに接続されている。2入力セレク
タ306の出力部は、インクリメンタ321の入力部に
接続されるとともに、命令バッファ6bへ読み出しアド
レスRADRSを供給するようにアドレスバス10bに
も接続されている。3入力セレクタ304,305の各
々の第2の入力部は、インクリメンタ321の出力部に
接続されている。3入力セレクタ304の第3の入力部
は、命令デコーダ7bから先頭アドレス(TOPAD
R)を受け取るように制御バス11bに接続されてい
る。3入力セレクタ305の第3の入力部は、レジスタ
312の出力部に接続されている。
304 to 306 are selectors, 313 and 31
4 is a register and 321 is an incrementer. A register (MRADR) 313 is a register for storing a read address of a macro configuration instruction in the instruction buffer 6b. The input unit is connected to the output unit of the three-input selector 304, and the output unit is connected to the two-input selector 306. The first input unit and the first input unit of the three-input selector 304 are connected. A register (RADR) 314 is a register for storing a read address of a non-macro configuration instruction in the instruction buffer 6b. The input unit is connected to the output unit of the three-input selector 305, and the output unit is set to two.
The second input unit of the input selector 306 and the three-input selector 3
05 is connected to the first input unit. The output of the two-input selector 306 is connected to the input of the incrementer 321 and is also connected to the address bus 10b so as to supply the read address RADRS to the instruction buffer 6b. The second input of each of the three-input selectors 304 and 305 is connected to the output of the incrementer 321. The third input of the three-input selector 304 receives a start address (TOPAD) from the instruction decoder 7b.
R) is connected to the control bus 11b. A third input of the three-input selector 305 is connected to an output of the register 312.

【0038】307は2入力セレクタ、315はレジス
タ、316はカウンタ、322は比較器、323は制御
ブロック(CNT)である。レジスタ(NUMREG)
315は、マクロ呼び出し命令に係るマクロ本体を構成
する命令の数(ENUM)を格納するためのレジスタで
あって、入力部が2入力セレクタ307の出力部に接続
され、かつ出力部が比較器322の第1の入力部と2入
力セレクタ307の第1の入力部とに接続されている。
2入力セレクタ307の第2の入力部は、命令デコーダ
7bから命令数(ENUM)を受け取るように制御バス
11bに接続されている。比較器322の第2の入力部
は、カウンタ316の出力部に接続されている。カウン
タ316の制御入力部は、制御バス11bを介して命令
デコーダ7bに接続されている。制御ブロック323
は、第1の入力部が比較器322の出力部に、第2の入
力部が制御バス11bを介して命令デコーダ7bに、出
力部が2入力セレクタ306の制御入力部にそれぞれ接
続されている。
307 is a two-input selector, 315 is a register, 316 is a counter, 322 is a comparator, and 323 is a control block (CNT). Register (NUMREG)
Reference numeral 315 denotes a register for storing the number of instructions (ENUM) constituting the macro body relating to the macro call instruction. The input unit is connected to the output unit of the two-input selector 307, and the output unit is connected to the comparator 322. And a first input unit of the two-input selector 307.
A second input of the two-input selector 307 is connected to the control bus 11b so as to receive the number of instructions (ENUM) from the instruction decoder 7b. A second input of the comparator 322 is connected to an output of the counter 316. The control input of the counter 316 is connected to the instruction decoder 7b via the control bus 11b. Control block 323
The first input is connected to the output of the comparator 322, the second input is connected to the instruction decoder 7b via the control bus 11b, and the output is connected to the control input of the two-input selector 306. .

【0039】なお、セレクタ300,301,302の
各々の制御入力部は制御バス9bを介して命令発行ユニ
ット2に、セレクタ304,305,307の各々の制
御入力部は制御バス11bを介して命令デコーダ7bに
それぞれ接続されているが、図11ではこれらの制御入
力の図示を省略している。
The control input units of the selectors 300, 301 and 302 are connected to the instruction issuing unit 2 via the control bus 9b, and the control input units of the selectors 304, 305 and 307 are connected to the instruction input unit via the control bus 11b. Although connected to the decoder 7b, these control inputs are not shown in FIG.

【0040】図12は、図1のマイクロプロセッサにお
けるマクロ定義命令及びマクロ呼び出し命令を含む実行
命令列の例を示している。ここでは、図12に示す21
個の命令の各々のバイナリコードが命令メモリ1に格納
されているものとする。図12中の第3命令(dmac
ro)はマクロ定義命令、第4、第5及び第6命令(d
m−OP1からdm−OP3まで)はマクロ構成命令、
第10、第11及び第12命令(MACRO1からMA
CRO3まで)は第3命令に関連付けられたマクロ呼び
出し命令である。
FIG. 12 shows an example of an execution instruction sequence including a macro definition instruction and a macro call instruction in the microprocessor of FIG. Here, 21 shown in FIG.
It is assumed that the binary code of each of the instructions is stored in the instruction memory 1. The third instruction (dmac in FIG. 12)
ro) is the macro definition instruction, the fourth, fifth and sixth instructions (d
m-OP1 to dm-OP3) are macro configuration instructions,
Tenth, eleventh, and twelfth instructions (from MACRO1 to MA
CRO3) is a macro call instruction associated with the third instruction.

【0041】図13は、命令バッファ6bの詳細構成
を、図12の命令列の例に即して示したものである。命
令バッファ6bは、以下詳細に説明するようにマクロ定
義命令(dmacro)が命令メモリ1からフェッチさ
れた際に、3個のマクロ構成命令(dm−OP1からd
m−OP3まで)が格納されたマクロ定義領域51と、
非マクロ構成命令のための開放領域52とを有すること
となる。境界アドレスBDRYは、マクロ定義領域51
の最終アドレスの次のアドレス、すなわち開放領域52
の先頭アドレスである。なお、ここでは命令バッファ6
bが256ワードからなるものとする。
FIG. 13 shows the detailed configuration of the instruction buffer 6b in accordance with the example of the instruction sequence shown in FIG. When the macro definition instruction (dmacro) is fetched from the instruction memory 1 as described in detail below, the instruction buffer 6b stores three macro configuration instructions (dm-OP1 to d-macro).
m-OP3), a macro definition area 51 storing
And an open area 52 for a non-macro configuration instruction. The boundary address BDRY is stored in the macro definition area 51.
Next to the last address of the
Is the start address of Here, the instruction buffer 6
It is assumed that b consists of 256 words.

【0042】図14及び図15は、図1のマイクロプロ
セッサのパイプライン構成を、図12の命令列の例に即
して示したものである。図14及び図15において、
「WIF」は命令バッファ6bへの命令書き込み処理
を、「IF」は命令メモリ1又は命令バッファ6bから
の命令フェッチ処理を、「DEC」は命令発行ユニット
2又は命令デコーダ7bでの命令デコード処理を、「E
XE」は命令実行ユニット8c又は命令実行ユニット8
bでの演算実行処理をそれぞれ示している。両図では、
右方向が時間の正の方向であり、縦方向の下向きが実行
命令の流れを示しており、各サイクルが符号S0〜S2
5で識別される。
FIGS. 14 and 15 show the pipeline configuration of the microprocessor shown in FIG. 1 based on the example of the instruction sequence shown in FIG. In FIGS. 14 and 15,
"WIF" indicates an instruction writing process to the instruction buffer 6b, "IF" indicates an instruction fetch process from the instruction memory 1 or the instruction buffer 6b, and "DEC" indicates an instruction decoding process in the instruction issuing unit 2 or the instruction decoder 7b. , "E
XE ”is the instruction execution unit 8c or the instruction execution unit 8
b shows the calculation execution process. In both figures,
The right direction is the positive direction of time, the downward direction is the flow of execution instructions, and each cycle is denoted by symbols S0 to S2.
5 is identified.

【0043】まず、サイクルS0では、第1命令(OP
1)が命令メモリ1からフェッチされる。サイクルS1
では命令発行ユニット2により該第1命令がデコードさ
れ、該デコードの結果に応じた演算が演算実行ユニット
8cによりサイクルS2で実行される。第2命令(OP
2)についても同様である。
First, in cycle S0, the first instruction (OP
1) is fetched from the instruction memory 1. Cycle S1
Then, the first instruction is decoded by the instruction issuing unit 2, and an operation according to the result of the decoding is executed by the operation execution unit 8c in the cycle S2. Second instruction (OP
The same applies to 2).

【0044】サイクルS2では、第3命令であるマクロ
定義命令(dmacro)が命令メモリ1からフェッチ
され、かつ該マクロ定義命令のデコード処理が命令発行
ユニット2により行われる。この際、命令発行ユニット
2は、該マクロ定義命令からマクロ本体を構成する命令
の数DNUM(図12の例では「3」、図10(a)参
照)を抽出し、更に該命令数DNUMと同じ数の命令を
命令メモリ1から順次フェッチする。これにより、第
4、第5及び第6命令であるマクロ構成命令(dm−O
P1からdm−OP3まで)がそれぞれサイクルS3、
S4及びS5でフェッチされる。これらマクロ構成命令
は、命令バス9aを経由して命令バッファ6bに順次書
き込まれる。
In cycle S2, a macro definition instruction (dmacro), which is the third instruction, is fetched from the instruction memory 1, and the instruction definition unit 2 decodes the macro definition instruction. At this time, the instruction issuing unit 2 extracts the number DNUM of instructions constituting the macro body (“3” in the example of FIG. 12; see FIG. 10A) from the macro definition instruction, and further extracts the number DNNUM of instructions. The same number of instructions are sequentially fetched from the instruction memory 1. Thereby, the macro configuration instruction (dm-O), which is the fourth, fifth, and sixth instructions,
P1 to dm-OP3) respectively correspond to cycle S3,
Fetched in S4 and S5. These macro configuration instructions are sequentially written to the instruction buffer 6b via the instruction bus 9a.

【0045】ここで、命令バッファ6bへのマクロ構成
命令の書き込み処理を詳しく説明する。命令発行ユニッ
ト2は、サイクルS2で命令メモリ1からマクロ定義命
令(dmacro)をフェッチすると、3入力セレクタ
300が第3の入力値を選択するように同サイクルS2
で制御バス9bを経由してデフォルトの制御信号を供給
する。これにより、レジスタ310に初期アドレス値
「0」が設定される。同様に、レジスタ311,312
にも同じ初期アドレス値「0」が設定される。次のサイ
クルS3では、命令発行ユニット2は、命令メモリ1か
ら第1のマクロ構成命令(dm−OP1)をフェッチ
し、該命令を命令バス9aへ供給し、かつ2入力セレク
タ303が第1の入力値を選択するように制御バス9b
へ制御信号を供給する。この制御により、レジスタ31
0の値「0」が命令バッファ6bの書き込みアドレスW
ADRSとして出力される。この際、命令バッファ6b
に書き込みイネーブル信号も供給される結果、該命令バ
ッファ6bのアドレス「0」に第1のマクロ構成命令
(dm−OP1)が格納される。また、サイクルS3で
は、インクリメンタ320が2入力セレクタ303の出
力値を入力して次サイクルの書き込みアドレス値「1」
を生成する。次のサイクルS4では、インクリメンタ3
20の出力値「1」がレジスタ310,311,312
に取り込まれる。したがって、サイクルS4では、第2
のマクロ構成命令(dm−OP2)の書き込みアドレス
としてレジスタ310の値「1」が2入力セレクタ30
3及びアドレスバス10bを経由して命令バッファ6b
に供給され、該第2のマクロ構成命令(dm−OP2)
が命令バッファ6bのアドレス「1」に格納される。同
様にして、サイクルS5では、第3のマクロ構成命令
(dm−OP3)が命令バッファ6bのアドレス「2」
に格納される。以上のようにして命令バッファ6bへの
3個のマクロ構成命令の書き込みが完了すると、この時
点のレジスタ310,311,312の値はいずれも
「3」である。以後、命令メモリ1から他のマクロ定義
命令がフェッチされない限り、レジスタ310,312
の値は更新されない。つまり、図13に示したように命
令バッファ6bの中にマクロ定義領域51が確保され
る。なお、命令メモリ1から他のマクロ定義命令がフェ
ッチされた場合には、命令バッファ6bの中のマクロ定
義領域51が拡げられる。
Here, the process of writing a macro configuration instruction into the instruction buffer 6b will be described in detail. When the instruction issuing unit 2 fetches the macro definition instruction (dmacro) from the instruction memory 1 in the cycle S2, the instruction issuing unit 2 selects the third input value in the cycle S2 so that the three-input selector 300 selects the third input value.
Supplies a default control signal via the control bus 9b. As a result, the initial address value “0” is set in the register 310. Similarly, registers 311 and 312
, The same initial address value “0” is set. In the next cycle S3, the instruction issuing unit 2 fetches the first macro configuration instruction (dm-OP1) from the instruction memory 1, supplies the instruction to the instruction bus 9a, and the two-input selector 303 Control bus 9b to select the input value
Supply the control signal to This control allows the register 31
The value “0” of 0 is the write address W of the instruction buffer 6b.
Output as ADRS. At this time, the instruction buffer 6b
As a result, the first macro configuration instruction (dm-OP1) is stored at the address “0” of the instruction buffer 6b. In the cycle S3, the incrementer 320 receives the output value of the two-input selector 303 and outputs the write address value “1” in the next cycle.
Generate In the next cycle S4, the incrementer 3
The output value "1" of 20 is stored in the registers 310, 311 and 312.
It is taken in. Therefore, in cycle S4, the second
Of the register 310 as the write address of the macro configuration instruction (dm-OP2)
3 and the instruction buffer 6b via the address bus 10b.
And the second macro configuration instruction (dm-OP2)
Is stored in the address “1” of the instruction buffer 6b. Similarly, in the cycle S5, the third macro configuration instruction (dm-OP3) stores the address “2” of the instruction buffer 6b.
Is stored in When the writing of the three macro configuration instructions to the instruction buffer 6b is completed as described above, the values of the registers 310, 311 and 312 at this point are all "3". Thereafter, unless another macro definition instruction is fetched from the instruction memory 1, the registers 310, 312
Is not updated. That is, the macro definition area 51 is secured in the instruction buffer 6b as shown in FIG. When another macro definition instruction is fetched from the instruction memory 1, the macro definition area 51 in the instruction buffer 6b is expanded.

【0046】サイクルS6では、第7命令である非マク
ロ構成命令(EX2−OP1)が命令メモリ1からフェ
ッチされ、かつ該フェッチされた命令が命令バッファ6
bに書き込まれる。この際、レジスタ311の値「3」
が命令バッファ6bの書き込みアドレスWADRSとし
て選択される。以後、命令バッファ6bに非マクロ構成
命令が書き込まれる毎にインクリメンタ320の出力値
によりレジスタ311の値が更新される。ただし、レジ
スタ311が命令バッファ6bの最大アドレス「25
5」を出力すると、次のサイクルではレジスタ312の
値「3」がレジスタ311に設定されるようになってい
る。これにより、マクロ定義領域51の中に非マクロ構
成命令が格納されることを防止している。
In cycle S6, a non-macro constituent instruction (EX2-OP1), which is the seventh instruction, is fetched from the instruction memory 1, and the fetched instruction is stored in the instruction buffer 6.
b. At this time, the value “3” of the register 311
Is selected as the write address WADRS of the instruction buffer 6b. Thereafter, each time a non-macro configuration instruction is written to the instruction buffer 6b, the value of the register 311 is updated with the output value of the incrementer 320. However, the register 311 stores the maximum address “25” of the instruction buffer 6b.
When "5" is output, the value "3" of the register 312 is set in the register 311 in the next cycle. This prevents a non-macro configuration instruction from being stored in the macro definition area 51.

【0047】サイクルS7では、命令バッファ6bから
の第7命令(EX2−OP1)の読み出し処理と、命令
バッファ6bへの第8命令(EX2−OP2)の書き込
み処理とが並列に実行される。ここで、命令バッファ6
bからの非マクロ構成命令の読み出しを詳しく説明す
る。レジスタ314の値は、レジスタ312を参照して
初期値「3」に設定される。制御ブロック323は、2
入力セレクタ306が第2の入力値を選択するようにデ
フォルトの制御信号を供給する。この制御により、レジ
スタ314の値「3」が命令バッファ6bの読み出しア
ドレスRADRSとして出力される。この際、命令バッ
ファ6bに読み出しイネーブル信号も供給される結果、
該命令バッファ6bのアドレス「3」から第7命令が読
み出される。そして、レジスタ314の値は、インクリ
メンタ321の出力値により更新される。以後、命令バ
ッファ6bから非マクロ構成命令が読み出される毎にイ
ンクリメンタ321の出力値によりレジスタ314の値
が更新される。ただし、レジスタ314が命令バッファ
6bの最大アドレス「255」を出力すると、次のサイ
クルではレジスタ312の値「3」がレジスタ314に
設定されるようになっている。これにより、マクロ定義
領域51から誤って非マクロ構成命令が読み出されるこ
とを防止している。
In cycle S7, the process of reading the seventh instruction (EX2-OP1) from the instruction buffer 6b and the process of writing the eighth instruction (EX2-OP2) in the instruction buffer 6b are executed in parallel. Here, the instruction buffer 6
The reading of the non-macro configuration instruction from b will be described in detail. The value of the register 314 is set to an initial value “3” with reference to the register 312. The control block 323
An input selector 306 provides a default control signal to select a second input value. With this control, the value “3” of the register 314 is output as the read address RADRS of the instruction buffer 6b. At this time, a read enable signal is also supplied to the instruction buffer 6b.
The seventh instruction is read from the address “3” of the instruction buffer 6b. Then, the value of the register 314 is updated by the output value of the incrementer 321. Thereafter, each time a non-macro configuration instruction is read from the instruction buffer 6b, the value of the register 314 is updated with the output value of the incrementer 321. However, when the register 314 outputs the maximum address “255” of the instruction buffer 6b, the value “3” of the register 312 is set in the register 314 in the next cycle. This prevents a non-macro configuration instruction from being erroneously read from the macro definition area 51.

【0048】サイクルS8では、第9命令(EX2−O
P2)が命令メモリ1からフェッチされ、かつ該フェッ
チされた命令が命令バッファ6bに書き込まれる。サイ
クルS9では第10命令である第1のマクロ呼び出し命
令(MACRO1)が、サイクルS10では第11命令
である第2のマクロ呼び出し命令(MACRO2)が、
サイクルS11では第12命令である第3のマクロ呼び
出し命令(MACRO3)がそれぞれ命令バッファ6b
に書き込まれる。命令バッファ6bへの第10、第11
及び第12命令の書き込み処理は、同命令バッファ6b
への第7、第8及び第9命令の書き込み処理と同様であ
る。サイクルS12では第13命令(EX2−OP4)
が、サイクルS13では第14命令(EX2−OP5)
がそれぞれ命令バッファ6bに書き込まれる。
In cycle S8, the ninth instruction (EX2-O
P2) is fetched from the instruction memory 1, and the fetched instruction is written to the instruction buffer 6b. In the cycle S9, the first macro call instruction (MACRO1), which is the tenth instruction, and in the cycle S10, the second macro call instruction (MACRO2), the eleventh instruction,
In cycle S11, the third macro call instruction (MACRO3), which is the twelfth instruction, is stored in the instruction buffer 6b.
Is written to. Tenth and eleventh instruction buffer 6b
And the write processing of the twelfth instruction is performed in the same instruction buffer 6b.
This is the same as the process of writing the seventh, eighth, and ninth instructions to the. In cycle S12, the thirteenth instruction (EX2-OP4)
However, in cycle S13, the fourteenth instruction (EX2-OP5)
Are written in the instruction buffer 6b.

【0049】サイクルS10では、命令バッファ6bか
ら第1のマクロ呼び出し命令(MACRO1)が読み出
され、かつ該第1のマクロ呼び出し命令のデコード処理
が命令デコーダ7bにより行われる。この際、命令デコ
ーダ7bは、該第1のマクロ呼び出し命令から先頭アド
レスTOPADR(図12の例では「0」)と、命令数
ENUM(図12の例では「3」)とを抽出する(図1
0(b)参照)。先頭アドレスTOPADRはレジスタ
313に、命令数ENUMはレジスタ315にそれぞれ
制御バス11bを経由して格納される。また、カウンタ
316の値が「0」に初期化され、レジスタ314の値
の更新が禁止される。制御ブロック323は、2入力セ
レクタ306が第1の入力値を選択するように制御す
る。以上の処理がマクロ展開の準備処理である。以後、
カウンタ316の値はサイクルが進む毎に1ずつインク
リメントされる。
In cycle S10, the first macro call instruction (MACRO1) is read from the instruction buffer 6b, and the decoding processing of the first macro call instruction is performed by the instruction decoder 7b. At this time, the instruction decoder 7b extracts the head address TOPADR (“0” in the example of FIG. 12) and the number of instructions ENUM (“3” in the example of FIG. 12) from the first macro call instruction (FIG. 12). 1
0 (b)). The start address TOPADR is stored in the register 313, and the number of instructions ENUM is stored in the register 315 via the control bus 11b. Further, the value of the counter 316 is initialized to “0”, and updating of the value of the register 314 is prohibited. The control block 323 controls the two-input selector 306 to select the first input value. The above processing is the preparation processing for macro expansion. Since then
The value of the counter 316 is incremented by one each time the cycle proceeds.

【0050】比較器322は、レジスタ315の値とカ
ウンタ316の値との比較を行う。比較器322の出力
を受け取った制御ブロック323は、カウンタ316の
値がレジスタ315の値より小さいときに、2入力セレ
クタ306が第1の入力値を選択するように制御信号を
供給する。この制御により、第10命令の次の命令読み
出しアドレスは、レジスタ313の値「0」、すなわち
命令バッファ6bの中の第1のマクロ構成命令(dm−
OP1)の格納アドレスとなる。その結果、サイクルS
11では第1のマクロ構成命令(図14でMACRO1
−OP1と表記された命令)の読み出し処理が実行され
る。そして、レジスタ313の値がインクリメンタ32
1の出力に応じて更新され、かつカウンタ316の値が
インクリメントされる。
The comparator 322 compares the value of the register 315 with the value of the counter 316. The control block 323 receiving the output of the comparator 322 supplies a control signal so that the two-input selector 306 selects the first input value when the value of the counter 316 is smaller than the value of the register 315. With this control, the instruction read address next to the tenth instruction is the value “0” of the register 313, that is, the first macro configuration instruction (dm−
OP1) is the storage address. As a result, the cycle S
11, the first macro configuration instruction (MACRO1 in FIG. 14)
A read process of an instruction (-OP1) is executed. Then, the value of the register 313 is incremented by 32.
The value is updated according to the output of 1 and the value of the counter 316 is incremented.

【0051】サイクルS12では第2のマクロ構成命令
(図14でMACRO1−OP2と表記された命令)の
読み出し処理が、サイクルS13では第3のマクロ構成
命令(図14でMACRO1−OP3と表記された命
令)の読み出し処理がそれぞれ実行される。そして、レ
ジスタ315の値とカウンタ316の値とが一致したと
き、すなわちレジスタ315に設定された回数だけ命令
バッファ6bからマクロ構成命令の読み出しが実行され
たときには、2入力セレクタ306が再び第2の入力値
を選択するように制御ブロック323から制御信号が供
給される。その結果、第1のマクロ呼び出し命令(MA
CRO1)に基づくマクロ展開を終了して後続命令の処
理に移る。以上の動作により、命令バッファ6bを含む
第2の演算処理ユニット3bでマクロ展開処理を実現す
る。
In cycle S12, the reading process of the second macro configuration instruction (instruction denoted as MACRO1-OP2 in FIG. 14) is performed, and in cycle S13, the third macro configuration instruction (indicated as MACRO1-OP3 in FIG. 14). Instruction) is executed. Then, when the value of the register 315 matches the value of the counter 316, that is, when the macro configuration instruction is read from the instruction buffer 6b the number of times set in the register 315, the two-input selector 306 again sets the second input selector 306 A control signal is supplied from the control block 323 to select an input value. As a result, the first macro call instruction (MA
The macro expansion based on CRO1) is completed, and the processing proceeds to the subsequent instruction. With the above operation, the macro expansion processing is realized by the second arithmetic processing unit 3b including the instruction buffer 6b.

【0052】図15によれば、サイクルS14からS1
7までで第2のマクロ呼び出し命令(MACRO2)に
基づくマクロ展開が、サイクルS18からS21までで
第3のマクロ呼び出し命令(MACRO3)に基づくマ
クロ展開がそれぞれ実行される。そして、演算実行ユニ
ット8bによる第14命令(EX2−OP5)に係る演
算の実行がサイクルS25で完了する。一方、命令バッ
ファ6bへの命令の書き込みはサイクルS13で完了す
るので、サイクルS14以後は命令発行ユニット2が命
令バス9a及び制御バス9bを命令バッファ6bへの命
令の書き込み以外の目的に使用することができる。した
がって、演算実行ユニット8cで実行されるべき第15
〜第21命令(OP3からOP9まで)に係る命令フェ
ッチ処理(IF)、命令デコード処理(DEC)及び演
算実行処理(EXE)をサイクルS22までに完了する
ことができる。
According to FIG. 15, the cycles S14 to S1
The macro expansion based on the second macro call instruction (MACRO2) is executed up to 7, and the macro expansion based on the third macro call instruction (MACRO3) is executed from cycles S18 to S21. Then, the execution of the operation relating to the fourteenth instruction (EX2-OP5) by the operation execution unit 8b is completed in cycle S25. On the other hand, since the writing of the instruction to the instruction buffer 6b is completed in the cycle S13, after the cycle S14, the instruction issuing unit 2 uses the instruction bus 9a and the control bus 9b for purposes other than the writing of the instruction to the instruction buffer 6b. Can be. Therefore, the fifteenth to be executed by the operation execution unit 8c
The instruction fetch process (IF), the instruction decode process (DEC), and the operation execution process (EXE) related to the 21st to 21st instructions (OP3 to OP9) can be completed by cycle S22.

【0053】以上のとおり、図1のマイクロプロセッサ
によれば、第1及び第2の演算処理ユニット3a,3b
の各々で実行されるべき一群の命令に関するプログラミ
ングが容易になる。しかも、第1の演算処理ユニット3
aが繰り返し処理や条件実行処理を自律的に行うことが
できるので、命令発行ユニット2の命令発行レートが低
減される結果、命令バス9aの負荷が軽減される。ま
た、命令バッファ6bの中にマクロ定義領域51を確保
することにより第2の演算処理ユニット3bがマクロ展
開を自律的に行うことができるので、命令メモリ1の中
にマクロ定義領域を確保した場合に比べて命令バス9a
の負荷が軽減される。マクロ呼び出し命令の使用頻度が
増えれば増えるほど、負荷軽減効果が大きくなる。
As described above, according to the microprocessor of FIG. 1, the first and second arithmetic processing units 3a and 3b
Facilitates programming for a group of instructions to be executed in each of the. Moreover, the first arithmetic processing unit 3
Since a can autonomously perform the repetition processing and the condition execution processing, the instruction issue rate of the instruction issue unit 2 is reduced, and as a result, the load on the instruction bus 9a is reduced. Also, by allocating the macro definition area 51 in the instruction buffer 6b, the second arithmetic processing unit 3b can autonomously perform macro expansion. Instruction bus 9a compared to
The load on the device is reduced. The more frequently the macro call instruction is used, the greater the effect of reducing the load.

【0054】なお、演算処理ユニットの数は任意であ
り、その数に応じてEUBのビット数を選定すればよ
い。図1の構成に第1の演算処理ユニット3aと同じ内
部構成を有する演算処理ユニットを付加してもよい。こ
の場合には、繰り返し処理毎に演算処理ユニットを切り
替えることができるので、プログラミングが更に容易に
なる。図1の構成に第2の演算処理ユニット3bと同じ
内部構成を有する演算処理ユニットを付加してもよい。
この場合には、マクロ定義に係る機能毎に演算処理ユニ
ットを切り替えることができるので、プログラミングが
更に容易になる。
The number of arithmetic processing units is arbitrary, and the number of EUB bits may be selected according to the number. An arithmetic processing unit having the same internal configuration as the first arithmetic processing unit 3a may be added to the configuration of FIG. In this case, since the arithmetic processing unit can be switched for each repetition processing, programming is further facilitated. An arithmetic processing unit having the same internal configuration as the second arithmetic processing unit 3b may be added to the configuration of FIG.
In this case, since the arithmetic processing unit can be switched for each function related to the macro definition, programming is further facilitated.

【0055】第1及び第2の演算処理ユニット3a,3
bの各々の特徴を兼ね備えた内部構成を有する演算処理
ユニットを採用してもよい。これにより、繰り返し処
理、条件分岐処理等を含んだマクロ定義が可能になる。
DSP(digital signal processing:デジタル信号処
理)の分野では、DCT(discrete cosine transfor
m:離散コサイン変換)、IDCT(inverse discrete
cosine transform:逆離散コサイン変換)等の様々な機
能が要求される。これらの各機能を実現するようにDC
T命令、IDCT命令等のマクロ命令を用意しておけ
ば、プログラミングの容易な高性能マイクロプロセッサ
を実現できる。
First and second arithmetic processing units 3a, 3
An arithmetic processing unit having an internal configuration having each of the characteristics b may be employed. Thus, a macro definition including a repetition process, a conditional branch process, and the like can be performed.
In the field of DSP (digital signal processing), DCT (discrete cosine transfor
m: discrete cosine transform), IDCT (inverse discrete)
Various functions such as cosine transform (inverse discrete cosine transform) are required. DC to implement each of these functions
If macro instructions such as the T instruction and the IDCT instruction are prepared, a high-performance microprocessor that can be easily programmed can be realized.

【0056】[0056]

【発明の効果】以上説明してきたとおり、本発明によれ
ば、複数の演算処理ユニットを1個の命令発行ユニット
に接続してなるマイクロプロセッサの構成を採用し、か
つ該複数の演算処理ユニットのうちの少なくとも1個の
演算処理ユニットは、一連の演算処理を自律的に実行す
ることができるように、前記命令発行ユニットから供給
された複数の命令を格納するための命令バッファと、該
命令バッファから読み出された命令をデコードするため
の命令デコーダと、該命令デコーダによるデコードの結
果に応じた演算を実行するための演算実行ユニットと、
前記命令発行ユニットから受け取った制御信号に応じて
前記命令バッファの書き込みアドレスを生成し、かつ前
記命令デコーダから受け取った制御信号に応じて前記命
令バッファの読み出しアドレスを生成するためのアドレ
ス生成部とを有する構成を採用したので、プログラミン
グの容易な高性能マイクロプロセッサを提供することが
できる。
As described above, according to the present invention, a microprocessor structure in which a plurality of arithmetic processing units are connected to one instruction issuing unit is employed, and At least one of the arithmetic processing units has an instruction buffer for storing a plurality of instructions supplied from the instruction issuing unit so that a series of arithmetic processing can be executed autonomously, and the instruction buffer An instruction decoder for decoding the instruction read from the CPU, an operation execution unit for executing an operation according to the result of the decoding by the instruction decoder,
An address generation unit for generating a write address of the instruction buffer according to a control signal received from the instruction issuing unit, and generating a read address of the instruction buffer according to a control signal received from the instruction decoder. Since a configuration having such a configuration is employed, a high-performance microprocessor that can be easily programmed can be provided.

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

【図1】本発明に係るマイクロプロセッサの構成例を示
すブロック図である。
FIG. 1 is a block diagram illustrating a configuration example of a microprocessor according to the present invention.

【図2】図1中の第1の演算処理ユニットのアドレス生
成部の詳細構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a detailed configuration of an address generation unit of a first arithmetic processing unit in FIG. 1;

【図3】図2中のループ制御部の詳細構成を示すブロッ
ク図である。
FIG. 3 is a block diagram illustrating a detailed configuration of a loop control unit in FIG. 2;

【図4】図1のマイクロプロセッサにおける命令フォー
マットの例を示す図である。
FIG. 4 is a diagram illustrating an example of an instruction format in the microprocessor of FIG. 1;

【図5】図1のマイクロプロセッサにおける実行命令列
の例を示す図である。
FIG. 5 is a diagram illustrating an example of an execution instruction sequence in the microprocessor of FIG. 1;

【図6】図1のマイクロプロセッサにおける実行命令列
の他の例(繰り返し処理を含む)を示す図である。
FIG. 6 is a diagram showing another example (including repetition processing) of an execution instruction sequence in the microprocessor of FIG. 1;

【図7】図6の実行命令列に対応した図1のマイクロプ
ロセッサのパイプライン構成を示す図である。
7 is a diagram showing a pipeline configuration of the microprocessor of FIG. 1 corresponding to the execution instruction sequence of FIG. 6;

【図8】図1のマイクロプロセッサにおける実行命令列
の更に他の例(2重の繰り返し処理を含む)を示す図で
ある。
8 is a diagram showing still another example (including double repetition processing) of an execution instruction sequence in the microprocessor of FIG. 1;

【図9】図1のマイクロプロセッサにおける実行命令列
の更に他の例(条件分岐命令を含む)を示す図である。
9 is a diagram showing still another example (including a conditional branch instruction) of an execution instruction sequence in the microprocessor of FIG. 1;

【図10】(a)は図1のマイクロプロセッサにおける
マクロ定義命令のフォーマットの例を、(b)は同マイ
クロプロセッサにおけるマクロ呼び出し命令のフォーマ
ットの例をそれぞれ示す図である。
10A is a diagram illustrating an example of a format of a macro definition instruction in the microprocessor of FIG. 1, and FIG. 10B is a diagram illustrating an example of a format of a macro call instruction in the microprocessor.

【図11】図1中の第2の演算処理ユニットのアドレス
生成部の詳細構成を示すブロック図である。
FIG. 11 is a block diagram illustrating a detailed configuration of an address generation unit of the second arithmetic processing unit in FIG. 1;

【図12】図1のマイクロプロセッサにおける実行命令
列の更に他の例(マクロ定義命令及びマクロ呼び出し命
令を含む)を示す図である。
12 is a diagram showing still another example (including a macro definition instruction and a macro call instruction) of an execution instruction sequence in the microprocessor of FIG. 1;

【図13】図1中の第2の演算処理ユニットの命令バッ
ファの詳細構成を示す図である。
FIG. 13 is a diagram showing a detailed configuration of an instruction buffer of the second arithmetic processing unit in FIG. 1;

【図14】図12の実行命令列に対応した図1のマイク
ロプロセッサのパイプライン構成を示す図である。
14 is a diagram illustrating a pipeline configuration of the microprocessor in FIG. 1 corresponding to the execution instruction sequence in FIG. 12;

【図15】図14に続く図である。FIG. 15 is a view following FIG. 14;

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

1 命令メモリ 2 命令発行ユニット 3a,3b 演算処理ユニット 4a,4b,4c データメモリ 5a,5b アドレス生成部 6a,6b 命令バッファ 7a,7b 命令デコーダ 8a,8b,8c 演算実行ユニット 20a フラグレジスタ 21 実行ユニット指定ビット(EUB) 22 コード部 31 オペコード(OP) 32 命令数(DNUM) 41 オペコード(OP) 42 先頭アドレス(TOPADR) 43 命令数(ENUM) 51 マクロ定義領域 52 開放領域 108〜114 セレクタ 121〜126 レジスタ 127 ループ制御部 128 制御ブロック 129 加算器 130 インクリメンタ 131,133 制御ブロック 132 セレクタ 134 フラグレジスタ 200〜207 セレクタ 215〜220 レジスタ 226 インクリメンタ 227 比較器 300〜307 セレクタ 310〜315 レジスタ 316 カウンタ 320,321 インクリメンタ 322 比較器 323 制御ブロック BDRY 境界アドレス LED ループエンド信号 RADRS 読み出しアドレス WADRS 書き込みアドレス 1 instruction memory 2 instruction issuing unit 3a, 3b arithmetic processing unit 4a, 4b, 4c data memory 5a, 5b address generator 6a, 6b instruction buffer 7a, 7b instruction decoder 8a, 8b, 8c arithmetic execution unit 20a flag register 21 execution unit Designated bit (EUB) 22 Code part 31 Operation code (OP) 32 Number of instructions (DNUM) 41 Operation code (OP) 42 Start address (TOPADR) 43 Number of instructions (ENUM) 51 Macro definition area 52 Open area 108 to 114 Selector 121 to 126 Register 127 Loop control unit 128 Control block 129 Adder 130 Incrementer 131, 133 Control block 132 Selector 134 Flag register 200-207 Selector 215-220 Register 226 Kurimenta 227 comparators 300-307 selector 310-315 register 316 counters 320 and 321 incrementer 322 comparator 323 control block BDRY boundary address LED loop end signal RADRS read address WADRS write address

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 9/38 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 9/38

Claims (14)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数の命令を並列実行することができる
マイクロプロセッサであって、 複数の演算処理ユニットと、 前記複数の演算処理ユニットの各々で実行されるべき複
数の命令を格納するための命令メモリと、 前記命令メモリから命令をフェッチし、かつ該フェッチ
した命令を前記複数の演算処理ユニットのうちの対応す
る演算処理ユニットへ供給するための命令発行ユニット
とを備え、 前記複数の演算処理ユニットのうちの少なくとも1個の
特定の演算処理ユニットは、 前記命令発行ユニットから供給された複数の命令を格納
するための命令バッファと、 前記命令バッファから読み出された命令をデコードする
ための命令デコーダと、 前記命令デコーダによるデコードの結果に応じた演算を
実行するための演算実行ユニットと、 前記命令発行ユニットから受け取った制御信号に応じて
前記命令バッファの書き込みアドレスを生成し、かつ前
記命令デコーダから受け取った制御信号に応じて前記命
令バッファの読み出しアドレスを生成するためのアドレ
ス生成部とを有することを特徴とするマイクロプロセッ
サ。
1. A microprocessor capable of executing a plurality of instructions in parallel, comprising: a plurality of processing units; and an instruction for storing a plurality of instructions to be executed by each of the plurality of processing units. A memory; and an instruction issuing unit for fetching an instruction from the instruction memory and supplying the fetched instruction to a corresponding arithmetic processing unit of the plurality of arithmetic processing units. At least one specific processing unit includes: an instruction buffer for storing a plurality of instructions supplied from the instruction issuing unit; and an instruction decoder for decoding an instruction read from the instruction buffer. An operation execution unit for executing an operation according to a result of decoding by the instruction decoder; An address generation unit for generating a write address of the instruction buffer according to a control signal received from the instruction issuing unit, and generating a read address of the instruction buffer according to a control signal received from the instruction decoder. A microprocessor characterized in that:
【請求項2】 請求項1記載のマイクロプロセッサにお
いて、 前記命令発行ユニットは、前記命令メモリからフェッチ
した命令の中に含まれる実行ユニット指定ビットに応じ
て、該フェッチした命令を前記複数の演算処理ユニット
のうちのいずれの演算処理ユニットへ供給するかを決定
する機能を有することを特徴とするマイクロプロセッ
サ。
2. The microprocessor according to claim 1, wherein the instruction issuing unit processes the fetched instruction according to an execution unit designation bit included in the instruction fetched from the instruction memory. A microprocessor having a function of determining which arithmetic processing unit among the units is to be supplied.
【請求項3】 請求項1記載のマイクロプロセッサにお
いて、 前記アドレス生成部は、前記命令バッファが未だ読み出
されていない命令で満たされたかどうかを示す状態フラ
グを格納するためのフラグレジスタを有し、 前記命令発行ユニットは、前記状態フラグに応じて前記
特定の演算処理ユニットへの命令の供給を制御する機能
を有することを特徴とするマイクロプロセッサ。
3. The microprocessor according to claim 1, wherein the address generation unit has a flag register for storing a status flag indicating whether the instruction buffer has been filled with an instruction that has not been read yet. The microprocessor according to claim 1, wherein the instruction issuing unit has a function of controlling supply of an instruction to the specific arithmetic processing unit in accordance with the status flag.
【請求項4】 請求項1記載のマイクロプロセッサにお
いて、 前記アドレス生成部は、前記命令バッファから読み出さ
れた繰り返し制御命令で指定された繰り返し処理を前記
特定の演算処理ユニットが実行できるように前記命令バ
ッファの読み出しシーケンスを制御するための制御手段
を有することを特徴とするマイクロプロセッサ。
4. The microprocessor according to claim 1, wherein the address generation unit is configured to execute the repetition processing specified by a repetition control instruction read from the instruction buffer so that the specific arithmetic processing unit can execute the repetition processing. A microprocessor having control means for controlling a read sequence of an instruction buffer.
【請求項5】 請求項4記載のマイクロプロセッサにお
いて、 前記制御手段は、 前記命令バッファの読み出しアドレスを格納するための
第1のレジスタと、 前記命令バッファから1命令が読み出される毎に前記第
1のレジスタの値を更新するための手段と、 前記命令バッファから読み出された繰り返し開始命令で
指定された繰り返し回数を格納するための第2のレジス
タと、 前記命令バッファの中の前記繰り返し開始命令の次の命
令のアドレスを格納するための第3のレジスタと、 前記繰り返し処理の実行済み回数を格納するための第4
のレジスタと、 前記命令バッファから繰り返し終了命令が読み出された
際に前記第4のレジスタの値をインクリメントするため
の手段と、 前記第2のレジスタの値と前記第4のレジスタの値との
一致を検出するための比較器と、 前記命令バッファから前記繰り返し終了命令が読み出さ
れても前記比較器で一致が検出されない場合には前記繰
り返し処理を継続するように前記第3のレジスタの値を
前記命令バッファへ供給し、前記命令バッファから前記
繰り返し終了命令が読み出されかつ前記比較器で一致が
検出された場合には前記繰り返し処理を終了するように
前記第1のレジスタの値で示される前記繰り返し終了命
令の次の命令のアドレスを前記命令バッファへ供給する
ための手段とを有することを特徴とするマイクロプロセ
ッサ。
5. The microprocessor according to claim 4, wherein said control means includes: a first register for storing a read address of said instruction buffer; and said first register each time one instruction is read from said instruction buffer. Means for updating the value of the register, a second register for storing the number of repetitions specified by the repetition start instruction read from the instruction buffer, and the repetition start instruction in the instruction buffer A third register for storing the address of the next instruction, and a fourth register for storing the number of times the repetitive processing has been executed.
Means for incrementing the value of the fourth register when a repetition end instruction is read from the instruction buffer; and means for incrementing the value of the second register and the value of the fourth register. A comparator for detecting a match, and a value of the third register for continuing the repetition processing if the comparator does not detect a match even when the repeat end instruction is read from the instruction buffer. Is supplied to the instruction buffer, and when the repetition end instruction is read from the instruction buffer and a match is detected by the comparator, the value is indicated by the value of the first register so as to end the repetition processing. Means for supplying an address of an instruction next to the repeated end instruction to the instruction buffer.
【請求項6】 請求項1記載のマイクロプロセッサにお
いて、 前記アドレス生成部は、前記命令バッファから読み出さ
れた複数の繰り返し制御命令で指定された多重の繰り返
し処理を前記特定の演算処理ユニットが実行できるよう
に前記命令バッファの読み出しシーケンスを制御するた
めの制御手段を有することを特徴とするマイクロプロセ
ッサ。
6. The microprocessor according to claim 1, wherein the specific arithmetic processing unit executes the multiplex repetition processing specified by the plurality of repetition control instructions read from the instruction buffer. A microprocessor having control means for controlling a read sequence of the instruction buffer so as to be able to do so.
【請求項7】 請求項1記載のマイクロプロセッサにお
いて、 前記特定の演算処理ユニットは、前記演算実行ユニット
が実行した演算の結果に応じた演算結果フラグを格納
し、かつ該演算結果フラグを前記アドレス生成部へ伝え
るためのフラグレジスタを更に有し、 前記アドレス生成部は、前記命令バッファから読み出さ
れた条件実行命令で指定された処理を前記特定の演算処
理ユニットが実行できるように、前記演算結果フラグを
参照して前記命令バッファの読み出しシーケンスを制御
するための制御手段を有することを特徴とするマイクロ
プロセッサ。
7. The microprocessor according to claim 1, wherein the specific operation processing unit stores an operation result flag corresponding to a result of the operation executed by the operation execution unit, and stores the operation result flag in the address. A flag register for transmitting to the generation unit, wherein the address generation unit is configured to execute the operation specified by the conditional execution instruction read from the instruction buffer so that the specific operation processing unit can execute the operation. A microprocessor having control means for controlling a read sequence of the instruction buffer with reference to a result flag.
【請求項8】 請求項7記載のマイクロプロセッサにお
いて、 前記制御手段は、 前記命令バッファの読み出しアドレスを格納するための
レジスタと、 前記命令バッファから1命令が読み出される毎に前記レ
ジスタの値を更新するための手段と、 前記命令バッファから条件分岐命令が読み出された場合
には、前記条件分岐命令で指定された条件コードを前記
演算結果フラグが満たすときには前記条件分岐命令で指
定された相対ジャンプアドレスを前記レジスタの値に加
算して得られる値を前記命令バッファへ供給し、前記演
算結果フラグが前記条件コードを満たさないときには前
記レジスタの値で示される前記条件分岐命令の次の命令
のアドレスを前記命令バッファへ供給するための手段と
を有することを特徴とするマイクロプロセッサ。
8. The microprocessor according to claim 7, wherein the control unit updates a register for storing a read address of the instruction buffer, and updates a value of the register each time one instruction is read from the instruction buffer. Means for performing the relative jump specified by the conditional branch instruction when the operation result flag satisfies a condition code specified by the conditional branch instruction when the conditional branch instruction is read from the instruction buffer. A value obtained by adding an address to the value of the register is supplied to the instruction buffer, and when the operation result flag does not satisfy the condition code, an address of an instruction next to the conditional branch instruction indicated by the value of the register And a means for supplying the instruction buffer to the instruction buffer.
【請求項9】 請求項1記載のマイクロプロセッサにお
いて、 前記命令発行ユニットは、前記命令メモリからフェッチ
した命令がマクロ定義命令である場合には、該マクロ定
義命令に続く複数のマクロ構成命令を更にフェッチし、
かつ前記命令バッファ中のマクロ定義領域の中に前記フ
ェッチした複数のマクロ構成命令が格納されるように前
記フェッチした複数のマクロ構成命令を前記特定の演算
処理ユニットへ供給する機能を有することを特徴とする
マイクロプロセッサ。
9. The microprocessor according to claim 1, wherein, when the instruction fetched from the instruction memory is a macro definition instruction, the instruction issuing unit further includes a plurality of macro configuration instructions following the macro definition instruction. Fetch and
And a function of supplying the fetched macro configuration instructions to the specific arithmetic processing unit such that the fetched macro configuration instructions are stored in a macro definition area in the instruction buffer. And a microprocessor.
【請求項10】 請求項9記載のマイクロプロセッサに
おいて、 前記アドレス生成部は、前記マクロ定義命令に呼応した
処理を前記特定の演算処理ユニットが実行できるように
前記命令バッファの書き込みシーケンスを制御し、かつ
前記命令バッファから読み出されたマクロ呼び出し命令
で指定された処理を前記特定の演算処理ユニットが実行
できるように前記命令バッファの読み出しシーケンスを
制御するための制御手段を有することを特徴とするマイ
クロプロセッサ。
10. The microprocessor according to claim 9, wherein the address generation unit controls a write sequence of the instruction buffer so that the specific arithmetic processing unit can execute a process corresponding to the macro definition instruction, And a control unit for controlling a read sequence of the instruction buffer so that the specific arithmetic processing unit can execute a process specified by a macro call instruction read from the instruction buffer. Processor.
【請求項11】 請求項10記載のマイクロプロセッサ
において、 前記制御手段は、 第1のレジスタと、 前記命令バッファの書き込みアドレスを格納するための
第2のレジスタと、 前記第1及び第2のレジスタの値を同じ値に初期化する
ための手段と、 前記命令バッファに1マクロ構成命令が書き込まれる毎
に前記第1及び第2のレジスタの値を更新するための手
段とを有し、 前記第1のレジスタは、前記命令バッファへの最終のマ
クロ構成命令の書き込みが完了した時点の該第1のレジ
スタの値を、前記マクロ定義領域と前記命令バッファの
中の非マクロ構成命令のための開放領域との境界を表す
アドレスとして保持することを特徴とするマイクロプロ
セッサ。
11. The microprocessor according to claim 10, wherein the control means includes: a first register; a second register for storing a write address of the instruction buffer; and the first and second registers. Means for initializing the values of the first and second registers to the same value, and means for updating the values of the first and second registers each time one macro configuration instruction is written to the instruction buffer. The first register releases the value of the first register when writing of the last macro configuration instruction to the instruction buffer is completed, for the macro definition area and the non-macro configuration instruction in the instruction buffer. A microprocessor which stores the address as an address indicating a boundary with an area.
【請求項12】 請求項11記載のマイクロプロセッサ
において、 前記アドレス生成部は、前記マクロ定義領域の中に前記
非マクロ構成命令が格納されることがないように、前記
第1のレジスタの保持アドレスを参照して前記第2のレ
ジスタの値を更新するための手段を更に有することを特
徴とするマイクロプロセッサ。
12. The microprocessor according to claim 11, wherein the address generation unit is configured to store the address of the first register so that the non-macro configuration instruction is not stored in the macro definition area. A means for updating the value of the second register with reference to FIG.
【請求項13】 請求項11記載のマイクロプロセッサ
において、 前記制御手段は、 前記マクロ呼び出し命令で指定された命令数を格納する
ための第3のレジスタと、 前記命令バッファにおけるマクロ構成命令の読み出しア
ドレスを格納するための第4のレジスタと、 前記命令バッファから1マクロ構成命令が読み出される
毎に前記第4のレジスタの値を更新するための手段と、 前記命令バッファから読み出されたマクロ構成命令の数
を計数するためのカウンタと、 前記第3のレジスタの値と前記カウンタの計数値との一
致を検出するための比較器と、 前記比較器で一致が検出されない場合には前記マクロ呼
び出し命令に基づくマクロ展開を継続するように前記第
4のレジスタの値を前記命令バッファへ供給し、前記比
較器で一致が検出された場合には前記マクロ展開を終了
するように制御するための手段とを更に有することを特
徴とするマイクロプロセッサ。
13. The microprocessor according to claim 11, wherein the control unit includes: a third register for storing the number of instructions specified by the macro call instruction; and a read address of a macro configuration instruction in the instruction buffer. And a means for updating the value of the fourth register each time one macro configuration instruction is read from the instruction buffer; and a macro configuration instruction read from the instruction buffer. A counter for counting the number of the counters; a comparator for detecting a match between the value of the third register and the count value of the counter; and a macro call instruction if no match is detected by the comparator. Supplies the value of the fourth register to the instruction buffer so as to continue macro expansion based on Microprocessor, characterized by further comprising a means for controlling to terminate the macro expansion when it.
【請求項14】 請求項13記載のマイクロプロセッサ
において、 前記アドレス生成部は、 前記命令バッファにおける非マクロ構成命令の読み出し
アドレスを格納するための第5のレジスタと、 前記命令バッファから1非マクロ構成命令が読み出され
る毎に、前記第1のレジスタの保持アドレスを参照して
前記第5のレジスタの値を更新するための手段とを更に
有することを特徴とするマイクロプロセッサ。
14. The microprocessor according to claim 13, wherein the address generation unit includes: a fifth register for storing a read address of a non-macro configuration instruction in the instruction buffer; and a non-macro configuration from the instruction buffer. Means for updating the value of the fifth register with reference to the holding address of the first register each time an instruction is read.
JP10155830A 1997-06-18 1998-06-04 Microprocessor Expired - Fee Related JP2926045B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10155830A JP2926045B2 (en) 1997-06-18 1998-06-04 Microprocessor

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP16073697 1997-06-18
JP9-179422 1997-07-04
JP9-160736 1997-07-04
JP17942297 1997-07-04
JP10155830A JP2926045B2 (en) 1997-06-18 1998-06-04 Microprocessor

Publications (2)

Publication Number Publication Date
JPH1173318A JPH1173318A (en) 1999-03-16
JP2926045B2 true JP2926045B2 (en) 1999-07-28

Family

ID=27320899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10155830A Expired - Fee Related JP2926045B2 (en) 1997-06-18 1998-06-04 Microprocessor

Country Status (1)

Country Link
JP (1) JP2926045B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4673007B2 (en) * 2004-06-10 2011-04-20 キヤノン株式会社 Loop control device and control method thereof
GB2580316B (en) 2018-12-27 2021-02-24 Graphcore Ltd Instruction cache in a multi-threaded processor
CN112148367A (en) * 2019-06-26 2020-12-29 北京百度网讯科技有限公司 Method, apparatus, device and medium for processing a set of loop instructions

Also Published As

Publication number Publication date
JPH1173318A (en) 1999-03-16

Similar Documents

Publication Publication Date Title
JP2816248B2 (en) Data processor
JP3856737B2 (en) Data processing device
US8601239B2 (en) Extended register addressing using prefix instruction
US5805875A (en) Vector processing system with multi-operation, run-time configurable pipelines
JP2002333978A (en) Vliw type processor
JPH08249293A (en) System and method for parallel processing system using substitute instruction
KR19980069855A (en) Multifunction Data Sorter on Wide Data Width Processors
JPH11154114A (en) System and method for table look-up using architecture of plural data fetching
JPH09212361A (en) Data processor and its method
JP2006004042A (en) Data processor
JPH0766324B2 (en) Data processing device
EP1241567A2 (en) Method and apparatus for executing coprocessor instructions
JPH0810428B2 (en) Data processing device
US10303399B2 (en) Data processing apparatus and method for controlling vector memory accesses
JP2008139964A (en) Data processor
JP3789583B2 (en) Data processing device
US10402199B2 (en) Conditional execution specification of instructions using conditional extension slots in the same execute packet in a VLIW processor
JPH07120278B2 (en) Data processing device
JPH05150979A (en) Immediate operand expansion system
US6065112A (en) Microprocessor with arithmetic processing units and arithmetic execution unit
JP2926045B2 (en) Microprocessor
JP4502532B2 (en) Data processing device
JP2002229779A (en) Information processor
US7577824B2 (en) Methods and apparatus for storing expanded width instructions in a VLIW memory for deferred execution
GB2380283A (en) A processing arrangement comprising a special purpose and a general purpose processing unit and means for supplying an instruction to cooperate to these units

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990420

LAPS Cancellation because of no payment of annual fees