JPH0236423A - Saving/restoring register address generation circuit - Google Patents

Saving/restoring register address generation circuit

Info

Publication number
JPH0236423A
JPH0236423A JP18633688A JP18633688A JPH0236423A JP H0236423 A JPH0236423 A JP H0236423A JP 18633688 A JP18633688 A JP 18633688A JP 18633688 A JP18633688 A JP 18633688A JP H0236423 A JPH0236423 A JP H0236423A
Authority
JP
Japan
Prior art keywords
register
mask
address
contents
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP18633688A
Other languages
Japanese (ja)
Inventor
Hiroshi Sato
廣 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP18633688A priority Critical patent/JPH0236423A/en
Publication of JPH0236423A publication Critical patent/JPH0236423A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To speed up a saving/restoring processing by obtaining the address of a register saved/restored next through the use of a priority encoder. CONSTITUTION:At the time of saving the register, for example, save mask data is loaded on a mask register 103, and the output of a zero detection circuit 106 is checked. Since the priority encoder 104 outputs the address of the register 103 to be saved if the content of the register 103 does not show zero, the address is selected so that it becomes the output of a multiplexer 102, and the content of a register file 101 is read and saved in a main memory. A decoder 105 simultaneously designates the bit of the mask register 103 corresponding to the selected content of the register and clears the bit by a subsequent cycle. Thus, the address of the register, which is the object of saving next, can be obtained from the output of the priority encoder 104 in the subsequent cycle. Thus, the processing can be speeded up.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は複数のソフトウェアから見えるレジスタを保有
する情報処理装置に関し、特にそのレジスタアドレスの
生成に関する、。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an information processing device that has registers visible to a plurality of software, and particularly relates to generation of register addresses thereof.

(従来の技術) 従来、この種のレジスタ退避/復帰の際のレジスタアド
レス生成は、レジスタのアドレスを保有するカウンタと
、退避/復帰の対象となるレジスタの指定をビット単位
で行なうセーブ/リストアマスクデータを保有するシフ
トレジスタとを用いて行なうのが一般的な方式であつな
(Prior Art) Conventionally, register address generation during this type of register save/restore has been performed using a counter that holds the register address and a save/restore mask that specifies the register to be saved/restored bit by bit. A common method is to use a shift register that holds data.

まず、この方式を第2図を参照して説明する。First, this method will be explained with reference to FIG.

第2図において、201はレジスタファイル、202は
マルチプレクサ、203はアドレスカウンタ、204は
インクリメンタ/デクリメンタ、205はワークレジス
タ、206はシフタ、207はテスト条件マルチプレク
サである。。
In FIG. 2, 201 is a register file, 202 is a multiplexer, 203 is an address counter, 204 is an incrementer/decrementer, 205 is a work register, 206 is a shifter, and 207 is a test condition multiplexer. .

第2図において、レジスタファイル201は、ソフトウ
ェアに見えるレジスタを@納している、ルジスタアドレ
スマルチプレクサ202は、命令処理装置内の種々のレ
ジスタアドレスノースから一つのレジスタアドレスを選
択する1、一つのアドレスソースにアドレスカウンタレ
ジスタ203があり、インクリメンタ/デクリメンタ2
04によリアドレスカウンタレジスタの内容を増減でき
るようになっている1、ワークレジスタ20SGf、*
−プ/リストアマスクデータを保持するレジスタであり
、ン7夕206を用いてその内容を左右に1ビツトだけ
シフトする機能を有する。
In FIG. 2, a register file 201 stores software-visible registers, and a register address multiplexer 202 selects one register address from among various register addresses in the instruction processing unit. The address source has an address counter register 203, and an incrementer/decrementer 2
04 allows the contents of the rear address counter register to be increased or decreased 1, work register 20SGf, *
- A register that holds the copy/restore mask data, and has the function of shifting its contents by one bit to the left or right using the register 206.

次に、第2図のハードウェア構成によって、セーブ/リ
ストアマスクデータのビット内容によりレジスタファイ
ルの内容を主記憶に退避する場合を考える。。
Next, consider the case where the contents of the register file are saved to the main memory using the bit contents of the save/restore mask data using the hardware configuration shown in FIG. .

まず、ワークレジスタ205の内容がセーブ/リストア
マスクデータである場合には、アドレスカウンタ203
に初期値をロードする。J次に1ワークレジスタ205
の最下位ビットが信号線29ヲ介シてテスト条件マルチ
プレクサ207に入力され、テスト集注マルチプレクサ
207により調べられる1、テスト条件に応じて、ファ
ームウェアの制御が2方向に分けられる。上記ビットが
11のとき【は、アドレスカウンタ203で指定された
レジスタの内容が読出され、主記憶に転送される1、上
記ビットが%OIのときには、何も動作が実行されなか
、j 次に、ファームウェアの制御は再び一つKなお、アドレ
スカウンタ203の内容の増分ト、ワークレジスタ20
5の内容の右シフトとを行なつ1.ワークレジスタ20
5のすべてのビットを調べ終えるまで、上に述べた制御
が繰返される。。
First, if the contents of the work register 205 are save/restore mask data, the address counter 203
Load the initial value into. J next 1 work register 205
The least significant bit of 1 is input to the test condition multiplexer 207 via the signal line 29, and examined by the test concentrator multiplexer 207.1 Depending on the test conditions, firmware control is divided into two directions. When the above bit is 11, the contents of the register specified by the address counter 203 are read out and transferred to the main memory. When the above bit is %OI, no operation is executed. , the firmware again controls the increment of the contents of the address counter 203 and the work register 20.
1. Shift the contents of 5 to the right. Work register 20
The above described control is repeated until all bits of 5 have been examined. .

(発明が解決しようとする課題) 上述した従来の退避/復帰用レジスタアドレス生成回路
は、例え退避、/復帰を行なうレジスタの個数が1個で
あっても、セーブ/リストアマスクデータの各ビットを
調べるという動作を行なうため、セーブ/リストアマス
クデータに含まれるビット数の回数だけファームウェア
の処理ループを実行しなければならない構造となってい
る。。
(Problems to be Solved by the Invention) The above-described conventional save/restore register address generation circuit does not process each bit of the save/restore mask data even if the number of registers to be saved/restored is one. In order to perform the checking operation, the structure is such that a firmware processing loop must be executed as many times as the number of bits included in the save/restore mask data. .

このなめ、特にマスクデータに立っているtlにのビッ
ト数が少ないときに、性能上、高速化できないという欠
点がある。。
This shortcoming has the disadvantage that it is not possible to increase the speed in terms of performance, especially when the number of bits in tl in the mask data is small. .

本発明の目的は、情報処理装置内部のレジスタのなかか
ら退避/復帰の対職となるレジスタを指定するセーブ/
リストアマスクデータワードをマスクレジスタに保持し
ておき、マスクレジスタの内容を調べ、レジスタの右端
または左端から走査して最初に見つかったビットt11
の位置の番号を出力し、現在、選択されて込るレジスタ
に対応するマスクレジスタのビットをクリアすることK
よって上記欠点を除去し、高速化できるように構成した
退避/復帰レジスタアドレス生成回路を提供することに
ある。
An object of the present invention is to specify a save/return register from among the registers inside an information processing device.
Keep the restore mask data word in the mask register, examine the contents of the mask register, and scan from the right or left end of the register to find the first bit t11.
Output the position number of K and clear the bit of the mask register corresponding to the currently selected register.
Therefore, it is an object of the present invention to provide a save/restore register address generation circuit configured to eliminate the above-mentioned drawbacks and increase the speed.

(課題を解決するための手段) 本発明による退避/復帰レジスタアドレス生成回路は、
マスクレジスタと、プライオリティエンコーダと、デコ
ーダと、ゼロ検出回路とを具備して構成したものである
。。
(Means for Solving the Problems) A save/restore register address generation circuit according to the present invention has the following features:
It is configured to include a mask register, a priority encoder, a decoder, and a zero detection circuit. .

マスクレジスタは、退避/復帰の対象となるレジスタを
レジスタファイルから選択するワードを保持するための
ものである1、 プライオリティエンコーダは、マスクレジスタの内容を
調べて右端または左端から走査し、最初に見つかつ六ビ
ットj直が11jlの位置の番号を出力するなめのもの
である。。
The mask register is used to hold a word that selects the register to be saved/restored from the register file1.The priority encoder examines the contents of the mask register and scans from the right or left end to select the first one found. The 6-bit j direct outputs the number at position 11jl. .

デコーダは、プライオリティエンコーダの出力に従って
マスクレジスタの内容をクリアするためのものである。
The decoder is for clearing the contents of the mask register according to the output of the priority encoder.

。 ゼロ検出回路は、対項となるレジスタの内容が零である
ことを検出するためのものである。。
. The zero detection circuit is for detecting that the contents of the counter register are zero. .

(実施例) 次に、本発明てついて図面を参照して説明する。。(Example) Next, the present invention will be explained with reference to the drawings. .

第1図は、本発明による退避/復帰7ジスタアドレス生
成回路の一実施例を示すブロック図である、。
FIG. 1 is a block diagram showing an embodiment of a save/restore 7 register address generation circuit according to the present invention.

茗1図において、1a1はレジスタファイル、102は
マルチプレクサ、1a3はマスクレジスタ、104はプ
ライオリティエンコーダ、10Sはデコーダ、106は
ゼロ検出回路、107は内部バスである1゜ レジスタファイル101は、清報処理装置内部のン7ト
ウエアから見えるレジスタを保持する。
In Figure 1, 1a1 is a register file, 102 is a multiplexer, 1a3 is a mask register, 104 is a priority encoder, 10S is a decoder, 106 is a zero detection circuit, and 107 is an internal bus. Holds registers visible to software inside the device.

マルチプレクサ102はレジスタファイル101のアド
レスをンースカ為ら選択する1、マスクレジスタ103
は、内部バス107からのデータを保有し、退避/復帰
用のマスクデータを保持する。
The multiplexer 102 selects the address of the register file 101 from the mask register 1 and the mask register 103.
holds data from the internal bus 107 and holds mask data for save/restore.

プライオリティエンコーダ104はマスクレジスタ10
3から供給されるデータを保有し、マスクレジスタ10
3の右端または左端から各ビットを走査して、最初に見
つかつ九ビット値が%1#のビット番号を出力する。こ
のビット番号は、マルチプレクサ102の一つの入力と
して使用される。デコーダ10gは、プライオリティエ
ンコーダ104の出力コードをデコードし、マスクレジ
スタ103の内容についてファームウェアから指定され
た場合にはクリアするビット位置を指定する。
Priority encoder 104 is mask register 10
Mask register 10 holds the data supplied from 3.
Each bit is scanned from the right or left end of 3, and the first bit number found and whose 9-bit value is %1# is output. This bit number is used as one input of multiplexer 102. The decoder 10g decodes the output code of the priority encoder 104, and specifies the bit position to be cleared when the contents of the mask register 103 are specified by the firmware.

ゼロ検出回路106は、マスクレジスタ103の内容を
調べてゼロであるか否かを出力する。
Zero detection circuit 106 examines the contents of mask register 103 and outputs whether or not it is zero.

次に、レジスタ退避の実例を参照しながら回路動作を説
明する。
Next, circuit operation will be explained with reference to an actual example of register saving.

まず、ファームウェアはマスクレジスタ103にセーブ
マスクデータをロードし、次に一+!!口検出回路10
Bの出力を調べる。もし、マスクレジスタ103の内容
が零であれば処理を終了する。ゼロでなければプライオ
リティエンコーダ104がセーブすべきレジスタのアド
レスを出力しているので、このアドレスがマルチプレク
サ102の出力となるように選択し、レジスタファイル
101の内容を読出して主記憶に退避する1、同時に、
デコーダ105は選択されているレジスタ内容に対応f
るマスクレジスタ103のビットを指定して、次のサイ
クルでこのビットをクリアする。このため、次のサイク
ルでは次に退避の対象となるレジスタアドレスがプライ
オリティエンコーダ104の出力から得られる。
First, the firmware loads the save mask data into the mask register 103, and then the 1+! ! Mouth detection circuit 10
Examine the output of B. If the contents of the mask register 103 are zero, the process ends. If it is not zero, the priority encoder 104 is outputting the address of the register to be saved, so select this address to be the output of the multiplexer 102, read the contents of the register file 101, and save it to the main memory 1. at the same time,
The decoder 105 corresponds to the contents of the selected register f
The bit in the mask register 103 to be used is specified, and this bit is cleared in the next cycle. Therefore, in the next cycle, the register address to be saved next is obtained from the output of the priority encoder 104.

このよう圧して、ゼロ検出回路106の出力が真になる
まで、ファームウェアの処理ループを実行する。
In this manner, the firmware processing loop is executed until the output of the zero detection circuit 106 becomes true.

(発明の効果) 以上説明したように本発明は、プライオリティエンコー
ダを使用して次に退避/復帰するレジスタアドレスを求
めることにより、退避の対象となるレジスタ内容を読出
す回数のみの処理サイクルが必要であるにととまり、退
避/復帰の処理を高速化できるという効果がある。
(Effects of the Invention) As explained above, the present invention uses a priority encoder to determine the register address to be saved/restored next, so that the processing cycle required is only the number of times the contents of the register to be saved are read. However, this has the effect of speeding up the save/restore process.

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

第1図は、本発明による退避/復帰レジスタアドレス生
成回路の一実施例を示すブロック図である。。 第2図は、従来技術による退避/復帰レジスタアドレス
生成回路の一例を示すブロック図である5、101.2
01・・・レジスタファイル102.202・・・マル
チプレクサ 103・拳・マスクレジスタ 104・・・プライオリティエンゴーダ105−・・デ
コーダ 106・・・ゼロ検出回路 10フ・・・内部パス 203・・・アドレスカウンタ 204−・・インクリメンタ/デクリメンタ20S・・
争ワークレジスタ 206・・・シフタ 20フ・・・テスト条件マルチプレクサ才1図
FIG. 1 is a block diagram showing an embodiment of a save/restore register address generation circuit according to the present invention. . FIG. 2 is a block diagram showing an example of a save/restore register address generation circuit according to the prior art.
01...Register file 102.202...Multiplexer 103, fist, mask register 104...Priority engoder 105-...Decoder 106...Zero detection circuit 10F...Internal path 203...Address Counter 204--Incrementer/Decrementer 20S...
Conflict work register 206...Shifter 20F...Test condition multiplexer Figure 1

Claims (1)

【特許請求の範囲】[Claims] 退避/復帰の対象となるレジスタをレジスタファイルか
ら選択するワードを保持するためのマスクレジスタと、
前記マスクレジスタの内容を調べて右端または左端から
走査し、最初に見つかつたビット値が“1”の位置の番
号を出力するためのプライオリテイエンコーダと、前記
プライオリテイエンコーダの出力に従つて前記マスクレ
ジスタの内容をクリアするためのデコーダと、前記対象
となるレジスタの内容が零であることを検出するための
ゼロ検出回路とを具備して構成したことを特徴とする退
避/復帰レジスタアドレス生成回路。
a mask register for holding a word that selects a register to be saved/restored from the register file;
a priority encoder for checking the contents of the mask register, scanning from the right end or the left end, and outputting the number of the position where the first bit value found is "1"; and the mask register according to the output of the priority encoder. A save/restore register address generation circuit comprising a decoder for clearing the contents of a register and a zero detection circuit for detecting that the contents of the target register are zero. .
JP18633688A 1988-07-26 1988-07-26 Saving/restoring register address generation circuit Pending JPH0236423A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18633688A JPH0236423A (en) 1988-07-26 1988-07-26 Saving/restoring register address generation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18633688A JPH0236423A (en) 1988-07-26 1988-07-26 Saving/restoring register address generation circuit

Publications (1)

Publication Number Publication Date
JPH0236423A true JPH0236423A (en) 1990-02-06

Family

ID=16186566

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18633688A Pending JPH0236423A (en) 1988-07-26 1988-07-26 Saving/restoring register address generation circuit

Country Status (1)

Country Link
JP (1) JPH0236423A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0468837A2 (en) * 1990-06-29 1992-01-29 Digital Equipment Corporation Mask processing unit for high-performance processor
JPH064305A (en) * 1992-06-22 1994-01-14 Nec Corp Register switching discrimination circuit for processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0468837A2 (en) * 1990-06-29 1992-01-29 Digital Equipment Corporation Mask processing unit for high-performance processor
JPH064305A (en) * 1992-06-22 1994-01-14 Nec Corp Register switching discrimination circuit for processor

Similar Documents

Publication Publication Date Title
US6233670B1 (en) Superscalar processor with direct result bypass between execution units having comparators in execution units for comparing operand and result addresses and activating result bypassing
US20010008563A1 (en) Parallel processor and image processing apparatus
EP0155211A2 (en) System for by-pass control in pipeline operation of computer
JP2840444B2 (en) Method for operating an arithmetic pipeline and data processing apparatus
US4222103A (en) Real time capture registers for data processor
US4833640A (en) Register bank change including register to register transfer in a data processing system
KR970011208B1 (en) Pipelined register cache
JPS6254359A (en) Computer apparatus
US4670836A (en) Device for detecting an overlap of operands to be accessed
JPH0511977A (en) Data transfer method between registers in micro computer
US5276822A (en) System with enhanced execution of address-conflicting instructions using immediate data latch for holding immediate data of a preceding instruction
KR19990078149A (en) Pipeline-type multi-processor system
JPH0236423A (en) Saving/restoring register address generation circuit
JP2553200B2 (en) Information processing device
JP2007108913A (en) Simd microprocessor for detecting peak value
JP2812610B2 (en) Pipeline control method
JPH04137139A (en) Save/restore register address generating circuit
GB2218832A (en) Instruction chaining and data hazard resolution system
JP2629479B2 (en) Information processing device
JPH0228828A (en) Maximum value and minimum value detecting circuit
GB2042227A (en) Rear time capture registers for data processor
JPH01147723A (en) Pipe line processing system for information processor
JPH02133841A (en) Data store control system
JPH02287732A (en) Register address generating device
JPH04245333A (en) Information processor