JP3247724B2 - Bit field operation processing device and microprocessor - Google Patents

Bit field operation processing device and microprocessor

Info

Publication number
JP3247724B2
JP3247724B2 JP13795792A JP13795792A JP3247724B2 JP 3247724 B2 JP3247724 B2 JP 3247724B2 JP 13795792 A JP13795792 A JP 13795792A JP 13795792 A JP13795792 A JP 13795792A JP 3247724 B2 JP3247724 B2 JP 3247724B2
Authority
JP
Japan
Prior art keywords
data
bit
shift
input
coupled
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
JP13795792A
Other languages
Japanese (ja)
Other versions
JPH05150942A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP13795792A priority Critical patent/JP3247724B2/en
Publication of JPH05150942A publication Critical patent/JPH05150942A/en
Application granted granted Critical
Publication of JP3247724B2 publication Critical patent/JP3247724B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明はビットフィールド操作演
算の為の演算装置並びにその演算方法に関し、例えばプ
ロセッサの整数演算部に適用して有効な技術に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic unit for a bit field operation operation and an operation method thereof, and more particularly to a technique effective when applied to an integer operation unit of a processor.

【0002】[0002]

【従来の技術】ビットフィールド操作演算としては、例
えばデータの任意領域の抽出やデータの任意領域の置換
のための処理がある。例えば、データの任意領域の抽出
を指示する命令としてExtract命令がある。この
イクストラクト命令に応答して、基本的には図16に示
されているような処理が行われる。すなわち、(i)抽
出する領域をデータの右端までシフトするデータシフト
処理、(ii)抽出すべき領域の各ビットに対応したビ
ットに“1”を立てたマスクデータを生成するマスクデ
ータ生成処理、(iii)シフトしたデータから、マス
クデータ中のビット値が1である領域だけ取り出し、残
りの領域に0もしくは符号ビットを詰める拡張処理を行
うものである。具体的に述べるならば、入力データの第
hビットを右詰めにシフトし、領域幅LENで特定され
る領域以外の領域に対してはサインビットSで符号拡張
し又はビット0を詰めて拡張し、入力データに対して所
要領域LENを抽出した出力データを得る。このときの
符号拡張又は0拡張すべき領域はマスクデータによって
指定する。後者の置換処理を指示する命令としては、例
えばDeposit命令がある。この命令により、基本
的には図17に示されるような処理が行われる。すなわ
ち、(i)置換すべき領域を置換したい位置まで左シフ
トするデータシフト処理、(ii)置換すべき領域の各
ビットに対応したビットに“1”を立てたマスクデータ
を生成するマスクデータ生成処理、及び、(iii)シ
フトしたデータから、マスクデータ中のビット値が1で
ある領域だけ取り出し、レジスタなどから読出されたデ
ータ、もしくは各ビットが0詰めされたデータの上に書
き込むマスク実行処理を行うものである。例えば、入力
データの右端を第hビットまでシフトし、シフトされた
データの第hビットから幅LENの領域で、レジスタの
データ又は全ビット“0”のデータの一部を置換して、
出力データを得るものである。このとき、置換すべき領
域はマスクデータによって特定される。本明細書では、
データとして、32ビットの幅を有するデータについて
主に説明する。32ビット幅のデータは、特に制限され
ないが、その右端が最下位ビット(LSB)、左端が最
上位ビット(MSB)とされ、最上位ビットを第0ビッ
ト、最下位ビットを第31ビットと定義する。
2. Description of the Related Art As a bit field operation operation, for example, there is a process for extracting an arbitrary region of data or replacing an arbitrary region of data. For example, there is an Extract instruction as an instruction to extract an arbitrary area of data. In response to this extract instruction, basically, processing as shown in FIG. 16 is performed. That is, (i) a data shift process for shifting the region to be extracted to the right end of the data, (ii) a mask data generation process for generating mask data in which a bit corresponding to each bit of the region to be extracted is set to “1”, (Iii) From the shifted data, only an area having a bit value of 1 in the mask data is extracted, and an extension process of filling the remaining area with 0 or a sign bit is performed. More specifically, the h-th bit of the input data is shifted right-justified, and sign extension or sign 0 is extended to the area other than the area specified by the area width LEN by sign bit S or bit 0. , The output data obtained by extracting the required area LEN from the input data. The area to be sign-extended or 0-extended at this time is specified by mask data. As an instruction to instruct the latter replacement processing, for example, there is a Deposit instruction. According to this instruction, basically, processing as shown in FIG. 17 is performed. That is, (i) a data shift process for shifting the area to be replaced to the left position to be replaced, and (ii) mask data generation for generating mask data in which a bit corresponding to each bit of the area to be replaced is set to “1”. Processing and (iii) mask execution processing for extracting only an area having a bit value of 1 in mask data from shifted data and writing the data read from a register or the like or data in which each bit is padded with 0s Is what you do. For example, the right end of the input data is shifted to the h-th bit, and a part of the data of the register or the data of all the bits “0” is replaced in an area having a width LEN from the h-th bit of the shifted data.
This is for obtaining output data. At this time, the area to be replaced is specified by the mask data. In this specification,
As the data, data having a width of 32 bits will be mainly described. The 32-bit data is not particularly limited, but the right end is defined as the least significant bit (LSB), the left end is defined as the most significant bit (MSB), the most significant bit is defined as the 0th bit, and the least significant bit is defined as the 31st bit. I do.

【0003】前記双方のマスクデータの生成に利用する
ことができるマスクデータ生成回路としては、図18に
示されているようなものを考えることができる。この回
路は、減算器SUB、2個のマスクビット生成用論理回
路MLOG1,MLOG2、及び論理積回路ANDによ
って構成される。前記減算器SUBは、抽出又は置換す
べき領域の左端のビット位置を領域幅LENを表わすデ
ータLENDと当該領域幅の下位側ビット位置hを示す
情報hDから生成する。マスクビット生成論理回路ML
OG1は前記領域の左端から最下位ビットまでに1を詰
めたデータを生成し、マスクビット生成論理回路MLO
G2は前記領域の右端から最上位ビットまでに1を詰め
たデータを生成する。論理積回路ANDはそれらのデー
タの論理積を採って、マスク実行や符号拡張に利用する
マスクデータを生成する。図18にはディポジット命令
用のマスクデータを生成する手順が一例として示されて
いる。イクストラクト命令用のマスクデータは第hビッ
トを第31ビットとすることによって生成される。
As a mask data generation circuit that can be used for generating both of the above mask data, a circuit as shown in FIG. 18 can be considered. This circuit includes a subtractor SUB, two mask bit generation logic circuits MLOG1 and MLOG2, and an AND circuit AND. The subtractor SUB generates the leftmost bit position of the region to be extracted or replaced from the data LEND indicating the region width LEN and the information hD indicating the lower bit position h of the region width. Mask bit generation logic circuit ML
OG1 generates data in which 1 is packed from the left end of the area to the least significant bit, and generates a mask bit generation logic circuit MLO.
G2 generates data in which 1 is packed from the right end of the area to the most significant bit. The logical product circuit AND obtains the logical product of these data to generate mask data used for mask execution and sign extension. FIG. 18 shows an example of a procedure for generating mask data for a deposit instruction. The mask data for the extract instruction is generated by setting the h-th bit to the 31st bit.

【0004】[0004]

【発明が解決しようとする課題】データのビット若しく
は領域が画素と対応されるようなグラフィックデータを
扱う処理、例えば動画像のグラフィック処理などにおい
ては、データのある領域の内容を別のデータの所要領域
に複写したりすることがある。このような処理に前記イ
クストラクト命令及びディポジット命令を適用すること
により、命令実行サイクル数を著しく低減することがで
きる。それら命令を実行するためのビットフィールド操
作演算装置を専用ハードウェアとして採用する場合に
は、前記マスクデータ生成回路の他に、データの任意ビ
ット数のシフトを行うバレルシフタ、バレルシフトされ
たデータをマスクデータに基づいて符号拡張したり、あ
るいはマスクしたりする回路が必要とされる。本発明者
はそのようなビットフィールド操作演算装置をRISC
形式のプロセッサに内蔵させることを検討した。これに
よれば、前記図18に示されるマスクデータ生成回路の
占有面積はビットフィールド操作演算装置全体の約20
%を占め、チップ面積を増大させることが明らかとなっ
た。
In the processing of graphic data in which bits or areas of data correspond to pixels, for example, in graphic processing of moving images, the contents of one area of data are replaced with the required data of another data. And may be copied to the area. By applying the extract instruction and the deposit instruction to such processing, the number of instruction execution cycles can be significantly reduced. In the case where a bit-field manipulation operation device for executing these instructions is employed as dedicated hardware, a barrel shifter for shifting an arbitrary number of bits of data, a mask for barrel-shifted data, A circuit for sign-extending or masking based on data is required. The inventor of the present invention has proposed such a bit-field manipulation operation device as RISC
We considered to build it into a processor of the form. According to this, the area occupied by the mask data generation circuit shown in FIG.
% To increase the chip area.

【0005】更に、前記イクストラクト命令において領
域幅LENが入力データの第0ビットを越えて左に広が
る場合、出力データにおける符号拡張では第0ビットを
符号ビットとして扱うことになるが、最初のバレルシフ
ト処理で領域LENを右詰めとするようにシフトしてし
まうと、マスクデータに基づく符号拡張に際して入力デ
ータの第0ビットを特定することができなくなる。その
ため、予め入力データの第0ビットを全ビットに配分し
た符号拡張データを生成し、この拡張データと入力デー
タとをバレルシフタに供給してバレルシフト処理を行う
ことを検討した。しかしながら、第0ビットを全ビット
に配分した符号拡張データを生成した後でバレルシフト
処理を行っていたのでは、その従属的な処理故にイクス
トラクト命令の実行速度が遅れることを本発明者は見い
出した。
Further, when the region width LEN extends to the left beyond the 0th bit of the input data in the above-mentioned extract instruction, the 0th bit is treated as a sign bit in the sign extension of the output data. If the area LEN is shifted to be right-justified by the shift processing, the 0th bit of the input data cannot be specified at the time of sign extension based on the mask data. Therefore, it has been considered to generate sign extension data in which the 0th bit of the input data is allocated to all bits in advance, and supply the extension data and the input data to the barrel shifter to perform barrel shift processing. However, if the barrel shift processing is performed after generating the sign extension data in which the 0th bit is allocated to all bits, the inventor has found that the execution speed of the extract instruction is delayed due to the dependent processing. Was.

【0006】また、符号拡張回路において拡張すべき符
号ビットをマスクデータに基づいて特定するためにはマ
スクデータの論理値が変化する境界ビットの位置を探さ
なければならない。そのために、入力データを相補レベ
ルにしてデコードする論理を採用すると、入力を相補レ
ベルに変換するためのインバータのような論理回路が多
数必要になり、この点においてもチップ面積増大を惹起
することが明らかにされた。
Further, in order to specify a code bit to be extended in the sign extension circuit based on the mask data, it is necessary to find a position of a boundary bit at which a logical value of the mask data changes. For this reason, if logic that decodes input data to a complementary level is employed, a large number of logic circuits such as inverters for converting the input to the complementary level are required, and this also causes an increase in chip area. Revealed.

【0007】本発明の目的は、データの任意領域の抽出
やデータの任意領域の置換を行う為の演算装置がチップ
に占める面積を低減することができる演算装置を提供す
ることにある。
An object of the present invention is to provide an arithmetic unit which can reduce an area occupied in a chip by an arithmetic unit for extracting an arbitrary region of data or replacing an arbitrary region of data.

【0008】本発明の別の目的は、データの任意領域の
抽出やデータの任意領域の置換を行う為のビットフィー
ルド操作演算の高速化を図ることにある。
Another object of the present invention is to speed up a bit field operation operation for extracting an arbitrary area of data or replacing an arbitrary area of data.

【0009】本発明の更に別の目的は、チップ占有面積
の低減に寄与するデコーダを提供することにある。
It is still another object of the present invention to provide a decoder which contributes to a reduction in chip occupation area.

【0010】本発明の更に別の目的は、高速化または/
及び小型化が可能なバレルシフタ回路を提供することに
ある。
Still another object of the present invention is to increase the speed or / and
Another object of the present invention is to provide a barrel shifter circuit that can be downsized.

【0011】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

【0012】[0012]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The following is a brief description of an outline of a typical invention among the inventions disclosed in the present application.

【0013】すなわち、データの任意領域の抽出、ある
いはデータの任意領域の置換などのビットフィールド操
作を行う演算装置において、入力データを任意ビットシ
フトする第1バレルシフタとシフト量が同一に制御され
る第2バレルシフタをマスクデータ生成回路に採用す
る。マスクデータ生成回路は、ビット列における領域幅
を指定するための情報に基づいて第2マスクデータを生
成するマスクビット生成回路を有し、前記第2バレルシ
フタはそのマスクビット生成回路の出力を受けて第1マ
スクデータを生成する。第1マスクデータは、前記第1
バレルシフタの出力とその他のデータとを受けてその何
れかをビット毎に選択して出力する選択手段の選択信号
として利用され、第2マスクデータは、前記第1バレル
シフタから出力されるデータに対する符号拡張又は所定
論理値での拡張を行う拡張回路のための拡張領域指定情
報として利用される。
That is, in an arithmetic unit that performs a bit field operation such as extraction of an arbitrary region of data or replacement of an arbitrary region of data, the shift amount is controlled to be the same as that of the first barrel shifter that shifts input data by an arbitrary bit. A two-barrel shifter is employed in the mask data generation circuit. The mask data generation circuit has a mask bit generation circuit that generates second mask data based on information for specifying an area width in a bit string, and the second barrel shifter receives an output of the mask bit generation circuit and generates a second mask data. One mask data is generated. The first mask data is the first mask data.
The output of the barrel shifter and other data are used as a selection signal of selection means for selecting and outputting one of them for each bit, and the second mask data is a sign extension for data output from the first barrel shifter. Alternatively, it is used as extension area designation information for an extension circuit that performs extension with a predetermined logical value.

【0014】前記第1バレルシフタ及び第2バレルシフ
タを設けることにより生じるチップ面積の増加を抑制す
る為に、前記第1及び第2バレルシフタの夫々における
一列分のトランジスタ形成領域を、演算情報を一時的に
保持するレジスタファイルのような記憶手段の1ビット
分の記憶セルがチップ上で占有する幅と同一幅の領域に
並存させ、且つ、双方のバレルシフタにおけるシフト量
制御線を共通化するものである。
In order to suppress an increase in chip area caused by providing the first barrel shifter and the second barrel shifter, a transistor forming area for one row in each of the first barrel shifter and the second barrel shifter is temporarily stored in the memory. A 1-bit storage cell of storage means such as a register file to be held coexists in a region having the same width as the width occupied on a chip, and a common shift amount control line is used in both barrel shifters.

【0015】前記拡張回路において、第2マスクデータ
に基づいて符号拡張すべき符号ビットの位置を特定する
ための特定回路を設けることにより生じるチップ面積の
増加を抑制するために、特定回路として、第2マスクデ
ータの相互に隣合う2ビットの論理値をそれぞれ比較
し、その第2マスクデータのビット列中で論理値が変化
される境界ビットを他のビットとは異なる論理値で出力
する論理ゲート回路を用いる。この論理ゲート回路は複
数個の排他的論理和回路によって構成することができ
る。斯る論理ゲート回路はその他のデコード論理回路と
しても利用することができ、nビットのデータを2のn
乗ビットのデータに展開する手段の出力を前記論理ゲー
ト回路で処理することにより、nビットのデータに対す
るデコード論理を構成することができる。
In the extension circuit, in order to suppress an increase in chip area caused by providing a specific circuit for specifying the position of a code bit to be sign-extended based on the second mask data, A logic gate circuit for comparing two adjacent logical values of two mask data with each other and outputting a boundary bit whose logical value is changed in the bit string of the second mask data as a logical value different from the other bits Is used. This logic gate circuit can be constituted by a plurality of exclusive OR circuits. Such a logic gate circuit can be used as another decode logic circuit, and converts n-bit data into 2 n
By processing the output of the means for expanding to multiplied bit data by the logic gate circuit, decoding logic for n-bit data can be configured.

【0016】イクストラクト命令などによるデータの任
意領域を抽出する処理において、抽出したい領域以外の
部分に対する符号拡張処理の速度を向上させるために、
前記第1バレルシフタの入力データを受け、そのデータ
の所定ビット例えば第0ビットに基づいて全ビットを符
号拡張し、これを前記選択手段の前記他のデータとして
出力可能な符号拡張回路を設ける。
In the process of extracting an arbitrary region of data by an extract instruction or the like, in order to improve the speed of sign extension processing on a portion other than the region to be extracted,
There is provided a sign extension circuit which receives the input data of the first barrel shifter, sign-extends all the bits based on a predetermined bit of the data, for example, a 0-th bit, and outputs this as the other data of the selecting means.

【0017】斯る符号拡張回路を採用した演算装置を用
いて、入力データの任意領域を抽出して出力するビット
フィールド操作演算を行う場合には、前記第1バレルシ
フタによって入力データをシフトする処理と、前記符号
拡張回路によって前記入力データの全ビットを符号拡張
する処理とを並列化して、双方の処理に要する一連の処
理時間を短縮し、双方の処理結果を前記選択手段に入力
して、第1マスクデータで選択させて、入力データの抽
出したい領域と第0ビットを含むデータを生成する。
When a bit field operation for extracting and outputting an arbitrary area of input data is performed by using an arithmetic unit employing such a sign extension circuit, a process of shifting the input data by the first barrel shifter is performed. Parallelizing the process of sign-extending all the bits of the input data by the sign extension circuit, shortening a series of processing times required for both processes, and inputting both process results to the selection means, One mask data is selected to generate data including an area from which input data is to be extracted and the 0th bit.

【0018】前記演算装置は、前記別のデータの任意領
域を前記入力データの所定領域によって置換する処理を
行うことができる。その処理は、前記第1バレルシフタ
を用いて、入力データの置換する領域を置換したい位置
まで所定ビットシフトする処理と、前記シフトされたデ
ータにおける置換する領域を特定するための第1マスク
データを、前記第2バレルシフタで生成する処理と、第
1バレルシフタの出力データと別のデータとを第1マス
クデータに基づいて選択する処理とを含む。
The arithmetic unit can perform a process of replacing an arbitrary area of the another data with a predetermined area of the input data. The processing includes, using the first barrel shifter, performing a predetermined bit shift to a position where a replacement area of input data is to be replaced, and first mask data for specifying a replacement area in the shifted data. The process includes a process of generating by the second barrel shifter and a process of selecting output data of the first barrel shifter and another data based on the first mask data.

【0019】[0019]

【作用】上記した手段によれば、ビットフィールド操作
演算装置において、入力データのシフト用並びにマスク
データ生成用の夫々にバレルシフタが採用され、且つ、
双方のバレルシフタのシフト量が相互に同一にされる。
これにより、データの任意領域の抽出やデータの任意領
域の置換などのビットフィールド操作が比較的簡単化さ
れ、且つ、以下で説明する処理の高速化並びに高機能化
が図られる。
According to the above-mentioned means, in the bit-field operation / operation device, barrel shifters are employed for shifting input data and for generating mask data, respectively.
The shift amounts of both barrel shifters are made equal to each other.
As a result, bit field operations such as extraction of an arbitrary area of data and replacement of an arbitrary area of data are relatively simplified, and the processing described below is speeded up and enhanced in function.

【0020】2組のバレルシフタをレジスタファイルの
1ビット分の記憶セルの幅に合わせて折り重ねるように
レイアウトすることにより、ビットフィールド操作演算
の為の演算装置のチップ占有面積を低減する。
By laying out the two sets of barrel shifters so as to be folded in accordance with the width of the storage cell of one bit of the register file, the chip occupation area of the arithmetic unit for the bit field operation operation is reduced.

【0021】入力データに対する符号拡張とデータシフ
トとを時間的に並列化することは、データの任意領域を
抽出するための演算速度の高速化を図る。
The time parallelization of the sign extension and the data shift for the input data is intended to increase the operation speed for extracting an arbitrary area of the data.

【0022】 マスクビットを用いてデコード結果を得
るようにすることによって、入力データを相補レベルの
信号に変換する回路を不要とし、回路規模若しくはチッ
プ占有面積を低減する。ここで、ビットフィールド操作
演算装置の更に具体的な態様を説明する。ビットフィー
ルド操作演算装置(SMU)は、複数のマスクビットを
含む所定のデータ(下地データなど)を供給するデータ
供給手段(EXT2、SEL1)と、シフトするべきシ
フト量を示すシフト制御信号(shift0、…)を供
給する制御手段(SDEC)と、上記制御手段に結合さ
れ、上記シフト量に従って、入力データのビットをシフ
トし、複数の入力ビットを含む前記シフトされた入力デ
ータを出力する第1のバレルシフタ(BSFT1)と、
上記制御手段に結合され、上記シフト量に従って、制御
データのビットをシフトし、複数の制御ビットを含むマ
スクデータ(MASKD1)を出力し、上記複数の制御
ビットの夫々は、上記複数の入力ビットの夫々に対応
し、対応する入力ビットがマスクされるべきビットであ
るか否かを示すものである第2のバレルシフタ(BSF
T2)と、上記第1のバレルシフタ(BSFT1)、上
記第2のバレルシフタ(BSFT2)及び上記データ供
給手段(EXT2、SEL1)に結合され、上記第2の
バレルシフタ(BSFT2)からのマスクデータによっ
てマスクされるべきビットとして示された入力ビットの
代わりに上記マスクビットを選択的に供給する供給手段
(MASKE)と、夫々が入力信号を出力する出力端子
を有する複数の入力データ供給回路(SEL2,SEL
3)と、夫々が制御信号を出力する出力端子を有する複
数の制御データ供給回路と、を含み、半導体基板上に形
成されている。そして、上記第1のバレルシフタ(BS
FT1)は、上記シフトとされた入力データを出力する
複数の出力端子、上記複数の入力データ供給回路の出力
端子の夫々に結合された複数の入力端子、及び第1のマ
トリクスを含み、上記第1のマトリクスは、行列に配置
された複数の第1絶縁ゲート型電界効果トランジスタを
含み、上記第1のマトリクスの内の複数の列の夫々は、
上記複数の出力端子の内の少なくとも一つと、上記複数
の入力端子の内の少なくとも一つと、上記少なくとも一
つの出力端子と上記少なくとも一つの入力端子との間に
結合された少なくとも一つの第1絶縁ゲート型電界効果
トランジスタを含み、上記第1のマトリクスの内の複数
の行の夫々は、夫々のゲートが共通にシフト制御配線に
結合され、結合された上記シフト制御配線を介して上記
シフト制御信号の内の一つが供給される複数の第1絶縁
ゲート型電界効果トランジスタを含む。上記第2バレル
シフタは、上記マスクデータを出力する複数の出力端
子、上記複数の制御データ供給回路の出力端子の夫々に
結合された複数の入力端子、及び第2のマトリクスを含
み、上記第2のマトリクスは、行列に配置された複数の
第2絶縁ゲート型電界効果トランジスタを含み、上記第
2のマトリクスの内の複数の列の夫々は、上記複数の出
力端子の内の少なくとも一つと、上記複数の入力端子の
内の少なくとも一つと、上記少なくとも一つの出力端子
と上記少なくとも一つの入力端子との間に結合された少
なくとも一つの第2絶縁ゲート型電界効果トランジスタ
を含み、上記第2のマトリクスの内の複数の行の夫々
は、夫々のゲートが共通に上記シフト制御配線に結合さ
れ、結合された上記シフト制御配線を介して上記シフト
制御信号の内の一つが供給される複数の第2絶縁ゲート
型電界効果トランジスタを含む。上記第1のバレルシフ
タの第1絶縁ゲート型電界効果トランジスタの列と上記
第2のバレルシフタの第2絶縁ゲート型電界効果トラン
ジスタの列は交互に並列配置されている。上記ビットフ
ィールド操作演算装置を有するマイクロプロセッサ(M
CU)は、半導体基板に形成され、ビットフィールド命
令に応答して、ビットフィールド演算を実行する。この
マイクロプロセッサは、命令に応答して制御信号を形成
する制御手段(IU)と、内部バス(SB1,SB2,
LB,WB)と、上記内部バスに結合された複数のレジ
スタ(REGF)と、上記内部バスと上記制御手段に結
合され、上記ビットフィールド命令に従って、ビットフ
ィールド演算を実行するビットフィールド操作演算装置
(SUM)とを含む。上記ビットフィールド操作演算装
置は、上記内部バスに結合され、上記ビットフィールド
命令に従って、複数のマスクビットを有する所定のデー
タを供給するデータ供給手段(EXT2、SEL1)
と、デコーダを含み、上記ビットフィールド命令に応答
して、シフトされるべきシフト量を示すデコード信号を
供給するシフト量指示手段(SDEC)と、夫々が出力
端子を有する複数の選択回路を含み、上記制御信号の内
の所定の信号に応答して、データを選択的に上記内部バ
スから入力する選択手段(SEL2,SEL3)と、上
記選択手段及び上記シフト量指示手段に結合され、上記
シフト量指示手段によって指示されたシフト量に従っ
て、上記選択手段からの出力データをシフトし、複数の
入力ビットを含むシフトされたデータを出力する第1の
バレルシフタ(BSFT1)と、上記ビットフィールド
命令に従ってマスク制御データを形成するマスク制御デ
ータ形成手段(MBG)と、上記マスク制御データ形成
手段及び上記シフト量指示手段に結合され、上記シフト
量指示手段によって指示されたシフト量に従って、上記
マスク制御データをシフトし、複数のマスク制御ビット
を有するシフトされたマスク制御データを出力する第2
のバレルシフタ(BSFT2)と、上記第1のバレルシ
フタ、上記第2のバレルシフタ及び上記データ供給手段
に結合され、上記第2のバレルシフタからのマスク制御
ビットによってマスクされるべきビットとして示された
入力ビットの代わりに、上記マスクビットを供給する供
給手段(MASKE)と、を含む。そして、上記複数の
マスク制御ビットの夫々は、上記複数の入力ビットの夫
々に対応し、対応する入力ビットがマスクされるべきビ
ットであるか否かを示す。上記マスク制御データ形成手
段は、夫々が出力端子を有する複数の制御データ供給回
路を含む。上記第1のバレルシフタは、上記シフトとさ
れた入力データを出力する複数の出力端子、上記複数の
選択回路の出力端子に結合された複数の入力端子、及び
第1のマトリクスを含み、上記第1のマトリクスは、行
列に配置された複数の第1絶縁ゲート型電界効果トラン
ジスタを含み、上記第1のマトリクスの夫々の行は、上
記出力端子の内の少なくとも一つと、上記入力端子の内
の少なくとも一つと、上記少なくとも一つの出力端子と
上記少なくとも一つの入力端子との間に結合された少な
くとも一つの第1絶縁ゲート型電界効果トランジスタを
含み、上記第1のマトリクスの夫々の列は、そのゲート
にシフト制御配線が結合され、該シフト制御配線を介し
て上記デコード信号の一つが共通に供給される複数の第
1絶縁ゲート型電界効果トランジスタを含む。上記第2
バレルシフタは、上記シフトされたマスク制御データを
出力する複数の出力端子、上記複数の制御データ供給回
路の出力端子に結合された複数の入力端子、及び第2の
マトリクスを含み、上記第2のマトリクスは、行列に配
置された複数の第2絶縁ゲート型電界効果トランジスタ
を含み、上記第2のマトリクスの夫々の行は、上記出力
端子の内の少なくとも一つと、上記複数の入力端子の内
の少なくとも一つと、上記少なくとも一つの出力端子と
上記少なくとも一つの入力端子との間に結合された少な
くとも一つの第2絶縁ゲート型電界効果トランジスタを
含み、上記第2のマトリクスの夫々の列は、そのゲート
に上記シフト制御配線が結合され、該シフト制御配線を
介して、上記一つのデコード信号が供給される複数の第
2絶縁ゲート型電界効果トランジスタを含む。
By obtaining a decoding result using the mask bits, a circuit for converting input data into a signal of a complementary level is not required, and the circuit scale or chip occupation area is reduced. Here, a more specific mode of the bit field operation calculation device will be described. The bit field operation arithmetic unit (SMU) includes a data supply unit (EXT2, SEL1) for supplying predetermined data (base data, etc.) including a plurality of mask bits, and a shift control signal (shift0, shift0, ..) And a first means for coupling the control means for shifting the bits of the input data according to the shift amount and outputting the shifted input data including a plurality of input bits. A barrel shifter (BSFT1),
The control means is coupled to the control means, shifts bits of the control data in accordance with the shift amount, outputs mask data (MASKD1) including a plurality of control bits, and each of the plurality of control bits corresponds to the plurality of input bits. A second barrel shifter (BSF), corresponding to each, indicating whether the corresponding input bit is a bit to be masked or not.
T2) and are coupled to the first barrel shifter (BSFT1), the second barrel shifter (BSFT2), and the data supply means (EXT2, SEL1), and are masked by the mask data from the second barrel shifter (BSFT2). Supply means (MASKE) for selectively supplying the mask bit instead of the input bit indicated as a bit to be input, and a plurality of input data supply circuits (SEL2, SEL) each having an output terminal for outputting an input signal
3) and a plurality of control data supply circuits each having an output terminal for outputting a control signal, and are formed on a semiconductor substrate. Then, the first barrel shifter (BS)
FT1) includes a plurality of output terminals for outputting the shifted input data, a plurality of input terminals respectively coupled to the output terminals of the plurality of input data supply circuits, and a first matrix. One matrix includes a plurality of first insulated gate field effect transistors arranged in a matrix, and each of a plurality of columns in the first matrix includes:
At least one of the plurality of output terminals, at least one of the plurality of input terminals, and at least one first insulation coupled between the at least one output terminal and the at least one input terminal. Each of the plurality of rows in the first matrix includes a gate type field effect transistor, and each of the plurality of rows is coupled to a shift control line in common, and the shift control signal is transmitted via the coupled shift control line. Includes a plurality of first insulated gate field effect transistors to which one of them is supplied. The second barrel shifter includes a plurality of output terminals for outputting the mask data, a plurality of input terminals coupled to each of the output terminals of the plurality of control data supply circuits, and a second matrix. The matrix includes a plurality of second insulated gate field effect transistors arranged in a matrix, and each of a plurality of columns in the second matrix includes at least one of the plurality of output terminals and the plurality of output terminals. And at least one second insulated gate field effect transistor coupled between the at least one output terminal and the at least one input terminal; and In each of the plurality of rows, the respective gates are commonly coupled to the shift control line, and the shift control signal is transmitted through the coupled shift control line. It includes a plurality of second insulated gate field effect transistor in which one is supplied of the. The rows of the first insulated gate field effect transistors of the first barrel shifter and the rows of the second insulated gate field effect transistors of the second barrel shifter are alternately arranged in parallel. A microprocessor (M
CU) is formed on the semiconductor substrate, and performs a bit field operation in response to a bit field command. The microprocessor comprises a control means (IU) for forming a control signal in response to an instruction, and an internal bus (SB1, SB2, SB1).
LB, WB), a plurality of registers (REGF) coupled to the internal bus, and a bit field operation / operation device (bit field operation / operation device) coupled to the internal bus and the control means for executing a bit field operation in accordance with the bit field instruction ( SUM). A data supply means coupled to the internal bus for supplying predetermined data having a plurality of mask bits in accordance with the bit field instruction (EXT2, SEL1);
And a shift amount indicating means (SDEC) for providing a decode signal indicating a shift amount to be shifted in response to the bit field instruction, and a plurality of selection circuits each having an output terminal. Selecting means (SEL2, SEL3) for selectively inputting data from the internal bus in response to a predetermined signal among the control signals; A first barrel shifter (BSFT1) for shifting output data from the selection means according to the shift amount designated by the designation means and outputting shifted data including a plurality of input bits, and mask control according to the bit field instruction Mask control data forming means (MBG) for forming data, the mask control data forming means and the shift Coupled to the instruction unit, in accordance with the shift amount designated by the shift amount indicating means to shift the mask control data, the second to output the shifted mask control data is having a plurality of mask control bits
Of the input bits coupled to the first barrel shifter, the second barrel shifter, and the data supply means and indicated as bits to be masked by a mask control bit from the second barrel shifter. Instead, a supply means (MASKE) for supplying the mask bit is included. Each of the plurality of mask control bits corresponds to each of the plurality of input bits, and indicates whether the corresponding input bit is a bit to be masked. The mask control data forming means includes a plurality of control data supply circuits each having an output terminal. The first barrel shifter includes a plurality of output terminals for outputting the shifted input data, a plurality of input terminals coupled to output terminals of the plurality of selection circuits, and a first matrix. Includes a plurality of first insulated gate field effect transistors arranged in a matrix, and each row of the first matrix has at least one of the output terminals and at least one of the input terminals. And at least one first insulated gate field effect transistor coupled between the at least one output terminal and the at least one input terminal, wherein each column of the first matrix has its gate And a plurality of first insulated gate field effect transistors to which one of the decode signals is commonly supplied via the shift control wiring. Including the register. The second
A barrel shifter including a plurality of output terminals for outputting the shifted mask control data, a plurality of input terminals coupled to output terminals of the plurality of control data supply circuits, and a second matrix; Comprises a plurality of second insulated gate field effect transistors arranged in a matrix, wherein each row of the second matrix has at least one of the output terminals and at least one of the plurality of input terminals. And at least one second insulated gate field effect transistor coupled between the at least one output terminal and the at least one input terminal, wherein each column of the second matrix has its gate And a plurality of second insulated gate electrodes to which the one decode signal is supplied via the shift control wiring. Including the effect transistor.

【0023】[0023]

【実施例】本発明に係るビットフィールド操作演算装置
並びにその演算手法を実施例に基づいて順次説明する。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing the configuration of a bit-field manipulation operation device according to the present invention;

【0024】(1)プロセッサ 図1には本発明が適用されるマイクロプロセッサの一実
施例が示されている。同図に示されるプロセッサMCU
は、特に制限されないが、命令キャッシュメモリCC、
データキャッシュメモリDC、整数演算ユニットEU、
浮動小数点演算ユニットFU、命令制御用ランダムロジ
ックユニットIU、メモリ制御用ランダムロジックユニ
ットMU、2次キャッシュ制御用ランダムロジックユニ
ットSU、命令用タグキャッシュメモリCA、データ用
タグキャッシュメモリDA、命令用アドレス変換バッフ
ァCT、データ用アドレス変換バッファDT、及び入出
力ユニットI/Oなどを備える。これらは公知の半導体
集積回路製造技術によって、シリコン基板のような1個
の半導体基板に形成される。特に制限されないが、この
プロセッサMCUはRISC(Reduced Ins
tructionSet Computer)形式のア
ーキテクチャを有する。このRISCアーキテクチャは
公知であり、命令セットを簡素化して処理の高速化を図
るものであり、例えば制御記憶を用いることなく命令デ
コードをランダムロジックのようなハードワイヤード論
理だけで行うことも可能である。
(1) Processor FIG. 1 shows an embodiment of a microprocessor to which the present invention is applied. Processor MCU shown in FIG.
Is not particularly limited, but the instruction cache memory CC,
Data cache memory DC, integer operation unit EU,
Floating point arithmetic unit FU, random logic unit IU for instruction control, random logic unit MU for memory control, random logic unit SU for secondary cache control, tag cache memory CA for instructions, tag cache memory DA for data, address conversion for instructions It includes a buffer CT, a data address conversion buffer DT, an input / output unit I / O, and the like. These are formed on one semiconductor substrate such as a silicon substrate by a known semiconductor integrated circuit manufacturing technique. Although not particularly limited, this processor MCU is a RISC (Reduced Ins)
(StructureSet Computer) type architecture. This RISC architecture is known, and aims to speed up processing by simplifying the instruction set. For example, it is also possible to perform instruction decoding only with hard-wired logic such as random logic without using control storage. .

【0025】図2には前記整数演算ユニットEUの一例
が示される。この整数演算ユニットEUは、命令キャッ
シュメモリCCから読出されて命令制御用ランダムロジ
ックユニットIUで解読された解読結果に従って制御さ
れ、算術論理演算装置ALUとビットフィールド操作演
算装置SMUの2つの演算装置を有し、前記命令制御用
ランダムロジックユニットIUから出力される制御信号
に基づいて何れかが動作させられる。演算は整数演算ユ
ニットEUに含まれるレジスタファイルREGFに保持
されているデータに対して行われる。レジスタファイル
REGFから読出されたデータは整数演算ユニットEU
内のソースバスSB1,SB2を通り、算術論理演算装
置ALUやビットフィールド操作演算装置SMUに送ら
れる。データを受け取った算術論理演算装置ALUやビ
ットフィールド操作演算装置SMUは所定の演算を実行
し、演算結果を書き込みバスWBを通して再びレジスタ
ファイルREGFへ書き戻す。整数演算ユニットEU
と、上述したその他のユニットとの間でのデータ転送は
ロードバスLBを介して行われる。前記算術論理演算装
置ALUはレジスタ間の算術/論理演算やLOAD/S
TORE命令実行時のメモリアクセスのアドレス、分岐
命令での分岐先のアドレス計算などを行う。前記ビット
フィールド操作演算装置SMUは、通常のシフト命令以
外に、他のRISCプロセッサにはないデータの任意領
域の抽出やデータの任意領域の置換などを行うものであ
り、本発明の一実施例に係る演算装置である。
FIG. 2 shows an example of the integer operation unit EU. The integer operation unit EU is controlled according to the result of decoding read from the instruction cache memory CC and decoded by the instruction control random logic unit IU. And one of them is operated based on a control signal output from the instruction control random logic unit IU. The operation is performed on data held in the register file REGF included in the integer operation unit EU. The data read from the register file REGF is stored in the integer operation unit EU.
Are transmitted to the arithmetic and logic unit ALU and the bit field operation unit SMU through the source buses SB1 and SB2 in the internal memory. The arithmetic logic unit ALU or the bit field operation unit SMU that has received the data executes a predetermined operation, and writes the operation result back to the register file REGF via the write bus WB. Integer arithmetic unit EU
And the other units described above are transferred via the load bus LB. The arithmetic and logic unit ALU performs arithmetic / logical operations between registers and LOAD / S
The calculation of the address of the memory access at the time of executing the TORE instruction and the address of the branch destination by the branch instruction are performed. The bit-field manipulation arithmetic unit SMU performs, besides a normal shift instruction, extraction of an arbitrary area of data which is not provided in another RISC processor, replacement of an arbitrary area of data, and the like. Such an arithmetic device.

【0026】前記ビットフィールド操作演算装置SMU
が実行する命令は、 シフト命令、 イクストラクト命令[Extract命令(データの
任意領域の抽出]、 ディポジット命令[Deposit命令(データの任
意領域の置換)] に大別され、夫々の命令は全て1マシンサイクルで実行
される。イクストラクト命令の基本的なオペレーション
は図16に示され、ディポジット命令の基本的なオペレ
ーションは図17に示される。これらの命令は他のRI
SCプロセッサにはない専用オペレーションのためのも
のである。同様の機能はCISCプロセッサでは存在す
るが、その演算はマイクロプログラム制御(前記制御記
憶を用いた制御)により、十数サイクルを要する。イク
ストラクト命令はデータの任意領域を右端へシフトし、
残りの領域には0または符号ビットを詰めるものであ
る。抽出するデータの任意領域は、領域幅LENと領域
の右端のビット位置hで指定される。ディポジット命令
はイクストラクト命令とは逆のオペレーションであり、
データの右端の幅LENで指定される領域を、別データ
の任意領域に書き込む命令である。このとき、書き込ま
れる下地とされるデータは、特に制限されないが、レジ
スタファイルREGFから供給されるデータ又は全ビッ
トが論理0のデータとされる。
The bit field manipulation arithmetic unit SMU
The instructions to be executed are roughly classified into a shift instruction, an extract instruction [Extract instruction (extraction of an arbitrary area of data), and a deposit instruction [Deposit instruction (replacement of an arbitrary area of data)]. The basic operation of the extract instruction is shown in Fig. 16, and the basic operation of the deposit instruction is shown in Fig. 17. These instructions are the other RIs.
It is for dedicated operation not found in the SC processor. Although a similar function exists in the CISC processor, its operation requires more than ten cycles by microprogram control (control using the control storage). The extract instruction shifts an arbitrary area of data to the right end,
The remaining area is filled with 0 or sign bits. The arbitrary area of the data to be extracted is specified by the area width LEN and the rightmost bit position h of the area. The deposit instruction is the reverse operation of the extract instruction,
This is an instruction to write an area specified by the width LEN at the right end of the data to an arbitrary area of another data. At this time, the underlying data to be written is not particularly limited, but the data supplied from the register file REGF or all bits are logical 0 data.

【0027】図19の(A)及び(B)には、上記イク
ストラクト命令のフォーマットが示されている。残りの
領域に“0”を詰めるか、符号ビットを詰めるかは、オ
ペレーションコードによって決められる。そのため、イ
クストラクト命令には、2種類の命令がある。例えば、
図19の(A)に示されているイクストラクト命令は、
残りの領域に“0”を詰めることを指示するオペレーシ
ョンコードOP−EX1を有し、図19の(B)に示さ
れているイクストラクト命令は、残りの領域に符号ビッ
トをを詰めることを指示するオペレーションコードOP
−EX2を有する。本実施例においては、上記ビット位
置hがイクストラクト命令に含まれるデータ&あるいは
予じめシフト量用制御レジスタ(図示しないが、上記命
令制御用ランダムロジックユニットIUに含まれてい
る)に保持されたデータによって決められる。制御レジ
スタに保持されているデータ(コード化されたデータ)
を使うのか、あるいは命令中のフィールド&に保持され
ているデータ(コード化されたデータ)を使うのかは、
イクストラクト命令中の制御フィールドSの値によって
定まる。例えば、制御フィールドSに“1”を設定する
ことにより、当該命令中のフィールド&の値が上記ビッ
ト位置hを表わすデータとして使われ、制御フィールド
Sに“0”を設定することにより、シフト量用制御レジ
スタの値が上記ビット位置hを表わすデータとして使わ
れる。イクストラクト命令中のフィールドLENDは、
上記領域幅LENを表わすデータ(コード化されたデー
タ)が保持されるフィールドである。
FIGS. 19A and 19B show the format of the extract instruction. Whether the remaining area is filled with "0" or a code bit is determined by the operation code. Therefore, there are two types of instruction. For example,
The extract instruction shown in FIG.
An operation instruction OP-EX1 for instructing the remaining area to be filled with "0" is provided, and the extract instruction shown in FIG. 19B indicates that the remaining area is to be packed with the sign bit. Operation code OP
EX2. In the present embodiment, the bit position h is held in the data & or shift amount control register (not shown, but included in the instruction control random logic unit IU) included in the extract instruction. Determined by the data. Data held in control registers (coded data)
Or use the data (coded data) held in the field & in the instruction
It is determined by the value of the control field S in the extract instruction. For example, by setting "1" in the control field S, the value of the field & in the instruction is used as data representing the bit position h, and by setting "0" in the control field S, the shift amount is set. Is used as data representing the bit position h. The field LEND in the extract instruction is
This is a field for holding data (coded data) representing the area width LEN.

【0028】図19の(C)及び(D)には、ディポジ
ット命令のフォーマットが示されている。このディポジ
ット命令の場合にも、2種類の命令が用意されている。
例えば、図19の(C)に示されているディポジット命
令は、書き込まれる下地のデータとして、レジスタファ
イルREGF中のレジスタに保持されているデータを用
いることを表わすオペレーションコードOP−DE1を
有する。これに対して、図19の(D)に示されている
ディポジット命令は、下地のデータとして“0”を用い
ることを表わすオペレーションコードOP−DE2を有
している。図19の(C)に示されているディポジット
命令の場合には、下地データを保持しているレジスタを
指示する必要がある。そのため、この図19(C)のデ
ィポジット命令はそのレジスタの番号を指示するデータ
REG−Noを保持するフィールドを有している。ま
た、図19の(C)及び(D)に示されているフィール
ドLEND,S,&は、前記イクストラクト命令のそれ
らと同じである。
FIGS. 19C and 19D show the format of the deposit instruction. In the case of this deposit instruction, two kinds of instructions are prepared.
For example, the deposit instruction shown in FIG. 19C has an operation code OP-DE1 indicating that data held in a register in the register file REGF is used as background data to be written. On the other hand, the deposit instruction shown in FIG. 19D has an operation code OP-DE2 indicating that "0" is used as the underlying data. In the case of the deposit instruction shown in FIG. 19C, it is necessary to specify the register holding the base data. Therefore, the deposit instruction in FIG. 19C has a field for holding data REG-No indicating the number of the register. The fields LEND, S, & shown in (C) and (D) of FIG. 19 are the same as those of the extract instruction.

【0029】データの任意領域を、別データの任意領域
に置換するオペレーションは、グラフィック処理等で頻
繁に利用されるが、そのオペレーションに本実施例に係
るビットフィールド操作演算装置SMUを用いない場
合、即ち本実施例とは別のRISCプロセッサを用いる
場合には、図3に示される以下の6命令を実行すること
が必要になる。 シフト命令 ;置換したい領域が置換したい位置
(所望の位置)にくるまでシフトする。 LOAD命令 ;置換されるべき領域のビットに対応
したビットに1を立てたマスクデータを読み込む。 AND命令 ;シフトしたデータとマスクデータの
論理積をとる。 ビット反転命令;マスクデータのビット反転データを
作成する。 AND命令 ;ビット反転データと下地データの論
理積をとる。 OR命令 ;で作成したデータと、で作成し
たデータの論理和をとる。
The operation of replacing an arbitrary area of data with an arbitrary area of another data is frequently used in graphic processing or the like. When the operation does not use the bit-field manipulation arithmetic unit SMU according to the present embodiment, That is, when a RISC processor different from that of the present embodiment is used, it is necessary to execute the following six instructions shown in FIG. Shift instruction: Shift until the area to be replaced reaches the position to be replaced (desired position). LOAD instruction: Reads mask data in which a bit corresponding to a bit of an area to be replaced is set to "1". AND instruction: ANDs the shifted data and mask data. Bit inversion command; creates bit inversion data of mask data. AND instruction: ANDs the bit-inverted data and the base data. OR instruction Takes the logical sum of the data created in; and the data created in.

【0030】これに比べ、本実施例のビットフィールド
操作演算装置SMUでは、イクストラクト命令とディポ
ジット命令の2サイクルで同様のオペレーションが完了
し、処理時間が3倍以上も短縮され、高速なグラフィッ
ク処理等が可能となる。
On the other hand, in the bit field manipulation arithmetic unit SMU of this embodiment, the same operation is completed in two cycles of the extract instruction and the deposit instruction, the processing time is shortened by three times or more, and high-speed graphic processing is performed. Etc. become possible.

【0031】図4には本実施例のマイクロプロセッサM
CUを用いたグラフィック処理システムの一例が示され
る。システムバスSBにはディスプレイCRT、キーボ
ードKBD、主記憶装置MMRYなどが接続され、デュ
アルポートを持つ共有メモリのようなメモリインタフェ
ースMITFによってペリフェラルバスPBに接続され
る。ペリフェラルバスPBにはマイクロプロセッサMC
Uが接続され、夫々のマイクロプロセッサMCUには2
次キャッシュメモリCMRYが結合される。
FIG. 4 shows a microprocessor M of this embodiment.
An example of a graphic processing system using a CU is shown. A display CRT, a keyboard KBD, a main memory MMRY, and the like are connected to the system bus SB, and are connected to the peripheral bus PB by a memory interface MITF such as a shared memory having dual ports. The peripheral bus PB has a microprocessor MC.
U is connected to each microprocessor MCU.
The next cache memory CMRY is connected.

【0032】(2)ビットフィールド操作演算装置 図5にはビットフィールド操作演算装置SMUの一実施
例が示される。
(2) Bit Field Operation and Operation Unit FIG. 5 shows an embodiment of the bit field operation and operation unit SMU.

【0033】ビットフィールド操作演算装置SMUは、
入力データをシフトするための第1バレルシフタBSF
T1、マスクデータ生成回路MASKG、マスク実行回
路MASKE、拡張回路EXT1、及び第0ビット符号
拡張回路EXT2を主体とする。第1バレルシフタBS
FT1は、データの任意ビットシフトを行うものであ
り、セレクタSEL2,SEL3から夫々1ワード(本
実施例において1ワードは32ビットとする)のデータ
を入力して合計2ワードを同時にシフトして1ワードの
データを出力する。図6及び図8から分かるように、出
力されるワードの各ビット位置は、上位ワードの各ビッ
ト位置に対応している。このことは、バレルシフタBS
FT2についても同様である。シフト量はデコーダSD
ECの出力によって決定される。尚、この第1バレルシ
フタBSFT1はイクストラクト命令及びディポジット
命令の他に、通常のシフト命令にも使用する。他のRI
SCプロセッサには、ビットフィールド操作演算器とし
てこのこのようなバレルシフタのみを備えているものが
多い。
The bit field operation arithmetic unit SMU includes:
First barrel shifter BSF for shifting input data
T1, a mask data generation circuit MASKG, a mask execution circuit MASKE, an extension circuit EXT1, and a zeroth bit sign extension circuit EXT2. 1st barrel shifter BS
The FT1 performs an arbitrary bit shift of data, and inputs data of one word (each word is assumed to be 32 bits in this embodiment) from the selectors SEL2 and SEL3, and simultaneously shifts a total of two words to one bit. Outputs word data. As can be seen from FIGS. 6 and 8, each bit position of the output word corresponds to each bit position of the upper word. This is the barrel shifter BS
The same applies to FT2. The shift amount is the decoder SD
Determined by the output of the EC. The first barrel shifter BSFT1 is used not only for the extract command and the deposit command but also for a normal shift command. Other RI
Many SC processors are provided with only such a barrel shifter as a bit-field operation arithmetic unit.

【0034】前記マスク実行回路MASKEは、前記マ
スクデータ生成回路MASKGで生成される第1マスク
データMASKD1をもとにマスクを実行する回路であ
る。この回路は各入力に夫々1ワードのデータが入力さ
れる2入力形式のセレクタとして機能され、第1マスク
データMASKD1の各ビットの値に従い、第1バレル
シフタBSFT1から出力されるデータとセレクタSE
L1側から供給されるデータとをビット毎に選択して合
計1ワードのデータを出力する。
The mask execution circuit MASKE is a circuit for executing a mask based on the first mask data MASKD1 generated by the mask data generation circuit MASKG. This circuit functions as a two-input selector in which one word of data is input to each input. According to the value of each bit of the first mask data MASKD1, the data output from the first barrel shifter BSFT1 and the selector SE
Data supplied from the L1 side is selected for each bit, and data of a total of one word is output.

【0035】前記拡張回路EXT1は、イクストラクト
命令の実行時に前記マスクデータ生成回路MASKGで
生成される第2マスクデータMASKD2をもとに、マ
スク実行回路MASKEから出力されるデータの0拡張
(論理0拡張)又は符号拡張を行う。尚、拡張回路EX
T1は、ディポジット命令実行時にはマスク実行回路M
ASKEから出力されるデータをそのまま出力する。
The extension circuit EXT1 expands the data output from the mask execution circuit MASKE to 0 (logic 0) based on the second mask data MASKD2 generated by the mask data generation circuit MASKG when executing the extract instruction. Extension) or sign extension. The extension circuit EX
T1 is a mask execution circuit M when the deposit instruction is executed.
The data output from ASKE is output as it is.

【0036】 AT:1=マスク実行回路MASKEの出力を選択 AT:2=第2マスクデータMASKD2に従ってマスク実
行回路MASKEの出力とセレクタSEL6の出力から
選択 AT:3=第1マスクデータMASKD1に従ってシフトさ
れたデータとセレクタSEL1の出力から選択 AT:4=シフトされたデータを選択
[0036] AT: 1 = Select the output of the mask execution circuit MASKE. AT: 2 = Select from the output of the mask execution circuit MASKE according to the second mask data MASKD2 and the output of the selector SEL6. AT: 3 = Data shifted according to the first mask data MASKD1. Select from output of selector SEL1 AT: 4 = Select shifted data

【0037】前記第0ビット符号拡張回路EXT2は、
入力データの第0ビットの値で当該入力データの全ビッ
トを符号拡張して、前記セレクタSEL1に出力する。
第0ビット符号拡張回路EXT2の構成は、後で述べる
図20の回路の一部を使うことにより容易に実現でき
る。
The 0th bit sign extension circuit EXT2 is
All the bits of the input data are sign-extended with the value of the 0th bit of the input data and output to the selector SEL1.
The configuration of the 0th bit sign extension circuit EXT2 can be easily realized by using a part of the circuit of FIG. 20 described later.

【0038】図5に示されているセレクタSEL1〜S
EL5のそれぞれは、上記命令制御用ランダムロジック
ユニットIUにより形成された制御信号によって制御さ
れる。上記命令制御用ランダムロジックユニットIU
は、特に制限されないが、それに供給される命令(ディ
ポジット命令,イクストラクト命令,シフト命令)の主
にオペコードに基づいて上記制御信号を形成する。
The selectors SEL1 to SEL shown in FIG.
Each of the ELs 5 is controlled by a control signal formed by the command control random logic unit IU. Instruction control random logic unit IU
Although not particularly limited, the control signal is formed mainly based on an operation code of instructions (deposit instruction, extract instruction, shift instruction) supplied thereto.

【0039】上記tableには、命令とセレクタSE
L1〜SEL5のそれぞれの状態との関係が示されてい
る。また、このtableには、命令によって形成され
る制御信号C00,C01,C02も示されている。tabl
eにおけるA欄は、ディポジット命令で下地データとし
てデータ“0”を使うことが指示されている場合を示
し、B欄はディポジット命令で下地データとしてレジス
タの保持データを使うことが指示されている場合を示し
ている。また、C欄はイクストラクト命令で残り領域に
“0”を詰めることが指示されている場合を示し、D欄
はイクストラクト命令で残り領域に符号データを詰める
ことが指示されている場合を示している。tableに
おける“−”は、どのような状態でも良いことを表わし
ている。命令が供給されることにより、セレクタSEL
1〜SEL5及び制御信号C00,C01,C02がどのよう
な状態になるかについて、次に述べる。
The table includes an instruction and a selector SE.
The relationship with each state of L1 to SEL5 is shown. The table also shows control signals C00, C01, and C02 formed by the command. tabl
Column A in e shows a case where it is instructed to use data "0" as background data by a deposit instruction, and column B shows a case where it is instructed to use data held in a register as background data by a deposit instruction. Is shown. Column C shows the case where it is instructed to pack "0" in the remaining area by an extract instruction, and column D shows the case where it is instructed to pack code data in the remaining area by an extract instruction. ing. "-" in the table indicates that any state is acceptable. When the instruction is supplied, the selector SEL
The states of the signals 1 to SEL5 and the control signals C00, C01, and C02 will be described below.

【0040】ディポジット命令がユニットIUに供給さ
れることにより、セレクタSEL2は、バスSB1のデ
ータを選択して出力する。このとき、セレクタSEL4
は、MBGの出力を選択し、セレクタSEL5はデータ
“0”を選択して、出力する。セレクタSEL1は、下
地データとしてデータ“0”の使用が指示されていた場
合、データ“0”を選択し(A欄)、下地データとして
レジスタの保持データの使用が指示されている場合に
は、バスSB2のデータを選択して(B欄)、出力す
る。また、ディポジット命令の場合には、上記制御信号
C00,C02として“1”,“0”が出力される。下地デ
ータとしてレジスタの保持データの使用が指示されてい
る場合、ディポジット命令中のレジスタ番号REG−N
oにより指示されているレジスタが選択され、その保持
データは上記バスSB2に出力されている。そのため、
下地データとしてレジスタのデータが指示されていると
きには、セレクタSEL1からレジスタ番号REG−N
oにより指示されたレジスタの保持データが出力され
る。
When the deposit instruction is supplied to the unit IU, the selector SEL2 selects and outputs the data on the bus SB1. At this time, the selector SEL4
Selects the output of the MBG, and the selector SEL5 selects and outputs the data "0". The selector SEL1 selects the data “0” when the use of the data “0” is instructed as the base data (column A), and when the use of the data held in the register is instructed as the base data, The data on the bus SB2 is selected (column B) and output. In the case of a deposit instruction, "1" and "0" are output as the control signals C00 and C02. When the use of the data held in the register is instructed as the base data, the register number REG-N in the deposit instruction is used.
The register designated by o is selected, and the held data is output to the bus SB2. for that reason,
When the data of the register is designated as the base data, the selector SEL1 outputs the register number REG-N
The data held in the register designated by o is output.

【0041】イクストラクト命令が上記ユニットIUに
供給されることにより、セレクタSEL2はデータ
“0”を選択し、セレクタSEL3はバスSB2のデー
タを選択し、セレクタSEL4はデータ“0”を選択
し、セレクタSEL5はデータ“1”を選択して出力す
る。また、残り領域に“0”を詰めることが指示されて
いる場合、セレクタSEL1はデータ“0”を選択し、
残り領域に符号を詰めることが指示されている場合に
は、セレクタSEL1は拡張回路EXT2の出力を選択
して、出力する。さらに、上記制御信号C00,C02は、
ともに“0”となる。制御信号C01は、後で図20を用
いて説明するが、“0”を詰める場合、データ“0”を
選択する信号とされ、符号を詰める場合には、SIN−
BITを選択する信号とされる。
When the extract instruction is supplied to the unit IU, the selector SEL2 selects data "0", the selector SEL3 selects data on the bus SB2, and the selector SEL4 selects data "0". The selector SEL5 selects and outputs data "1". When it is instructed to pack “0” in the remaining area, the selector SEL1 selects data “0”,
When it is instructed to pack codes in the remaining area, the selector SEL1 selects and outputs the output of the extension circuit EXT2. Further, the control signals C00 and C02 are
Both become "0". As will be described later with reference to FIG. 20, the control signal C01 is a signal for selecting data “0” when “0” is padded.
This signal is used to select BIT.

【0042】シフト命令がユニットIUに供給される
と、セレクタSEL2はバスSB1を選択し、セレクタ
SEL4はデータ“0”を選択し、セレクタSEL5は
データ“1”を選択して出力する。セレクタSEL3
は、64ビットデータについてシフト動作を行う場合、
データバスSB2のデータを選択し、32ビットデータ
についてのシフト動作の場合には、データ“0”を選択
して出力する。このとき制御信号C00,C02は、ともに
“1”である。
When the shift instruction is supplied to the unit IU, the selector SEL2 selects the bus SB1, the selector SEL4 selects the data "0", and the selector SEL5 selects and outputs the data "1". Selector SEL3
Is to perform a shift operation on 64-bit data.
The data on the data bus SB2 is selected, and in the case of a shift operation on 32-bit data, data "0" is selected and output. At this time, the control signals C00 and C02 are both "1".

【0043】上記マスクビット生成回路MBGには、上
記命令制御用ランダムロジックユニットIUから、命令
に含まれている領域幅LENを表わすフィールドLEN
Dの値が供給され、上記デコーダSDECには、同じく
上記命令制御用ランダムロジックユニットIU命令に含
まれているシフト量hを表わすところのフィールド&の
値又は上記シフト量用制御レジスタの保持値が供給され
る。
In the mask bit generation circuit MBG, the field LEN representing the area width LEN included in the instruction is supplied from the instruction control random logic unit IU.
The value of D is supplied to the decoder SDEC, and the value of the field & representing the shift amount h included in the instruction control random logic unit IU instruction or the value held in the shift amount control register is also supplied to the decoder SDEC. Supplied.

【0044】上記制御信号C02は、オアゲートORG1
の一方の入力端子に供給され、その他方の入力端子に
は、マスクデータMASKD1が供給される。
The control signal C02 is supplied to the OR gate ORG1.
Is supplied to one input terminal, and the other input terminal is supplied with mask data MASKD1.

【0045】上記制御信号C00,C01は上記拡張回路E
XT1に供給される。この拡張回路EXT1の一実施例
が図20に示されている。
The control signals C00 and C01 are supplied to the extension circuit E
It is supplied to XT1. One embodiment of the extension circuit EXT1 is shown in FIG.

【0046】図20に示されている拡張回路EXT1
は、デコーダBDEC,オアゲートORG2,トライス
テートバッファTB,符号線SIN−BIT及びセレク
タSEL6,SEL7を有している。
Extension circuit EXT1 shown in FIG.
Has a decoder BDEC, an OR gate ORG2, a tristate buffer TB, a code line SIN-BIT, and selectors SEL6 and SEL7.

【0047】上記デコーダBDECには、マスクデータ
MASKD2が供給され、マスクデータMASKD2に
おいて論理値が変化する境界ビットを判断し、それに対
応したビットを例えば“1”にし、残りのビットを
“0”にする。このようなデコーダBDECついては、
図15にその一例が示されており、後で説明する。マス
ク実行回路MASKEの出力はトライステートバッファ
TBに供給される。これらのトライステートバッファT
Bの制御は上記デコーダBDECの出力により行われ、
各トライステートバッファTBの出力は、共通にされ、
符号線SIN−BITに供給される。これにより、マス
クデータMASKD2において論理値が変化する境界ビ
ットに対応したマスク実行回路MASKEの出力データ
におけるビットをトライステートバッファTBは、共通
の符号線SIN−BITに伝える。セレクタSEL6
は、上記制御信号C01に従って、上記符号線SIN−B
ITの値又はデータ“0”を選択して出力する。上記オ
アゲートORG2は、上記制御信号C00と上記マスクデ
ータMASKD2とを入力として受け、上記セレクタS
EL7を制御する信号を形成する。上記セレクタSEL
7は、上記セレクタSEL6の出力又はマスク実行回路
MASKEの出力を選択して出力する。
The mask data MASKD2 is supplied to the decoder BDEC, and a boundary bit at which a logical value changes in the mask data MASKD2 is determined. I do. About such a decoder BDEC,
An example is shown in FIG. 15 and will be described later. The output of the mask execution circuit MASKE is supplied to a tri-state buffer TB. These tristate buffers T
The control of B is performed by the output of the decoder BDEC,
The output of each tri-state buffer TB is shared,
It is supplied to the code line SIN-BIT. Thereby, the tri-state buffer TB transmits the bit in the output data of the mask execution circuit MASKE corresponding to the boundary bit where the logical value changes in the mask data MASKD2 to the common code line SIN-BIT. Selector SEL6
, According to the control signal C01, the code line SIN-B
The value of IT or data “0” is selected and output. The OR gate ORG2 receives the control signal C00 and the mask data MASKD2 as inputs, and
A signal for controlling EL7 is formed. The above selector SEL
Reference numeral 7 selects and outputs the output of the selector SEL6 or the output of the mask execution circuit MASKE.

【0048】上記制御信号C00が“1”となることによ
り、オアゲートORG2は、マスクデータMASKD2
の値にかかわらず、“1”を出力する。これにより、上
記セレクタSEL7は、マスク実行回路MASKEの出
力を選択して出力する。これに対して、制御信号C00が
“0”の場合には、マスクデータMASKD2において
“1”となっているビットに対応した、マスク実行回路
MASKEの出力におけるビットがセレクタSEL7か
ら出力され、マスクデータMASKD2において“0”
となっているビットに対応した、出力データDDにおけ
るビットには、セレクタSEL6の出力が出力されるよ
うにセレクタSEL7が働く。
When the control signal C00 becomes "1", the OR gate ORG2 sets the mask data MASKD2
Outputs "1" regardless of the value of. As a result, the selector SEL7 selects and outputs the output of the mask execution circuit MASKE. On the other hand, when the control signal C00 is "0", the bit in the output of the mask execution circuit MASKE corresponding to the bit set to "1" in the mask data MASKD2 is output from the selector SEL7, "0" in MASKD2
The selector SEL7 operates so that the output of the selector SEL6 is output to the bit in the output data DD corresponding to the bit of.

【0049】上記制御信号C02が“1”となっていると
きには、上記オアゲートORG1からは、データ“1”
がマスク実行回路MASKEへ出力され、上記制御信号
C02が“0”とされているときには、マスクデータMA
SKD1のデータに従ったデータが上記オアゲートOR
G1からマスク実行回路MASKEへ供給される。
When the control signal C02 is "1", the data "1" is output from the OR gate ORG1.
Is output to the mask execution circuit MASKE, and when the control signal C02 is "0", the mask data MA
The data according to the data of SKD1 is OR gate OR
G1 is supplied to the mask execution circuit MASKE.

【0050】上記制御信号C01は、符号拡張の場合、例
えば“1”となる。これに応答してセレクタSEL6
は、符号線SIN−BITにおけるデータを選択する。
これにより、全てのセレクタSEL6からは、共通の値
が出力される。これに対して、残りの領域にデータ
“0”を詰める場合、上記制御信号C01は“0”とな
る。これによって、セレクタSEL6は、データ“0”
を選択して出力する。
The control signal C01 is, for example, "1" in the case of sign extension. In response to this, the selector SEL6
Selects data on the code line SIN-BIT.
As a result, a common value is output from all the selectors SEL6. On the other hand, when data "0" is packed in the remaining area, the control signal C01 becomes "0". As a result, the selector SEL6 outputs data “0”.
Select and output.

【0051】前記拡張回路EXT1、第0ビット符号拡
張回路EXT2、マスクデータ生成回路MASKG、及
びマスク実行回路MASKEは、本実施例のビットフィ
ールド操作演算装置SMU固有の処理であるイクストラ
クト命令とディポジット命令の実行に必要な固有の回路
であり、他のRISCプロセッサには存在しない。これ
らの回路の面積を小さく抑え、かつ動作遅延を小さくす
ることが、他のRISCプロセッサより優れた性能を実
現するためのに必要であり、本実施例ではそれらを実現
しており、以下その詳細を順次説明する。
The extension circuit EXT1, the 0-th bit sign extension circuit EXT2, the mask data generation circuit MASKG, and the mask execution circuit MASKE are an extract instruction and a deposit instruction which are processes specific to the bit field manipulation arithmetic unit SMU of this embodiment. , And is not present in other RISC processors. It is necessary to reduce the area of these circuits and reduce the operation delay in order to realize performance superior to other RISC processors, and in the present embodiment, they are realized. Will be sequentially described.

【0052】(3)バレルシフタを採用したマスクデー
タ生成回路 前記マスクデータ生成回路MASKGは、図6にも示さ
れるように、第2バレルシフタBSFT2、マスクビッ
ト生成回路MBG、及びセレクタSEL4,SEL5を
有する。マスクビット生成回路MBGは、特に制限され
ないが、命令中に含まれている5ビットの情報LEND
を受け、その5ビットの値によって、32ビットのビッ
ト列の右端からの論理1のビット幅(領域幅)LENを
示す第2マスクデータMASKD2を生成する。第2マ
スクデータMASKD2を生成する論理は、ハードワイ
ヤードロジックにより簡単に構成することができる。前
記第2バレルシフタBSFT2は、前記第1バレルシフ
タBSFT1と同様にデータの任意ビットシフトを行う
ものであり、夫々1ワードのデータを入力し、合計2ワ
ードを同時にシフトして、上位側の入力ワードにおける
ビット位置と1対1に対応したビット位置を有する1ワ
ードのデータを出力する。シフト量は前記デコーダSD
ECの出力によって決定される。第2バレルシフタBS
FT2の上位側入力には前記セレクタSEL4を介して
第2マスクデータMASKD2又は全ビットを論理0と
するデータが供給される。第2バレルシフタBSFT2
の下位側入力には、前記セレクタSEL5を介して32
ビット全てが論理0のデータ又は32ビット全てが論理
1のデータが供給される。第2バレルシフタシフタBS
FT2によってシフトされた出力は前記第1マスクデー
タMASKD1とされる。
(3) Mask Data Generation Circuit Employing Barrel Shifter As shown in FIG. 6, the mask data generation circuit MASKG includes a second barrel shifter BSFT2, a mask bit generation circuit MBG, and selectors SEL4 and SEL5. The mask bit generation circuit MBG includes, but is not limited to, 5-bit information LEND included in the instruction.
Then, the second mask data MASKD2 indicating the bit width (region width) LEN of logic 1 from the right end of the 32-bit bit string is generated based on the 5-bit value. The logic for generating the second mask data MASKD2 can be easily configured by hard-wired logic. The second barrel shifter BSFT2 performs an arbitrary bit shift of data in the same manner as the first barrel shifter BSFT1, inputs one-word data, shifts a total of two words at the same time, and shifts a total of two words simultaneously. One-word data having a bit position corresponding to the bit position on a one-to-one basis is output. The shift amount is determined by the decoder SD
Determined by the output of the EC. 2nd barrel shifter BS
The second mask data MASKD2 or data in which all bits are set to logic 0 are supplied to the upper input of FT2 via the selector SEL4. Second barrel shifter BSFT2
Is input to the lower side input through the selector SEL5.
Data of which all bits are logic 0 or data whose 32 bits are logic 1 are supplied. Second barrel shifter BS
The output shifted by FT2 is used as the first mask data MASKD1.

【0053】図6に示されるように、このマスクデータ
生成回路MASKGは、右端から幅LENで与えられる
領域に1を立てた第2マスクデータMASKD2を、第
1バレルシフタBSFT1に供給される演算データと同
じ量だけ第2バレルシフタBSFT2で左シフト(31
−hビットシフト)することにより、ディポジット命令
などに利用される第1マスクデータMASKD1を生成
することができる。イクストラクト命令用のマスクデー
タとしては、前記第2マスクデータMASKD2が利用
される。したがって、このマスクデータ生成回路MAS
KGは減算器を用いることなく図18と同様にディポジ
ット命令用マスクデータと、イクストラクト命令用マス
クデータを生成することができる。更に、イクストラク
ト命令を実行するときには、前記拡張回路EXT1に供
給すべき第2マスクデータの生成に利用されない第2バ
レルシフタBSFT2を、第1バレルシフタBSFT1
と共に当該イクストラクト命令の別の処理に利用可能に
なる。
As shown in FIG. 6, the mask data generation circuit MASKG converts the second mask data MASKD2 in which the area given by the width LEN is set to 1 from the right end with the operation data supplied to the first barrel shifter BSFT1. Shift left by the second barrel shifter BSFT2 by the same amount (31
-H bit shift), it is possible to generate the first mask data MASKD1 used for a deposit instruction or the like. The second mask data MASKD2 is used as mask data for the extract instruction. Therefore, this mask data generation circuit MAS
The KG can generate mask data for a deposit instruction and mask data for an extract instruction in the same manner as in FIG. 18 without using a subtractor. Further, when executing the extract instruction, the second barrel shifter BSFT2 not used for generating the second mask data to be supplied to the extension circuit EXT1 is replaced with the first barrel shifter BSFT1.
At the same time, it becomes available for another processing of the extract instruction.

【0054】(4)イクストラクト命令における符号拡
張シフトの高速化 イクストラクト命令において拡張回路EXT1で行われ
る符号拡張は、図7に示される(i)と(ii)の2通
りの場合があり、(i)に示されるように領域幅LEN
が入力データの第0ビットを越えない場合、出力データ
における符号拡張は当該領域幅LENの左端のビットの
符号に応じて行われる。一方、(ii)で示されるよう
に領域幅LENが入力データの第0ビットを越えて左に
広がる場合、出力データにおける符号拡張では入力デー
タの第0ビットを符号ビットとして扱うことになる。
(4) Acceleration of Sign Extension Shift in Extract Instruction There are two cases of sign extension performed by the extension circuit EXT1 in the extract instruction as shown in FIG. 7 (i) and (ii). As shown in (i), the region width LEN
Does not exceed the 0th bit of the input data, the sign extension in the output data is performed according to the sign of the leftmost bit of the area width LEN. On the other hand, when the region width LEN extends to the left beyond the 0th bit of the input data as shown in (ii), the 0th bit of the input data is treated as a sign bit in the sign extension of the output data.

【0055】図8に示されるように、イクストラクト命
令を実行するときは、第1バレルシフタBSFT1は、
夫々32ビットの入力データと任意値のデータ(例えば
データが)とを受け、入力データの第hビットが右端に
くるようにバレルシフト(31−hビットシフト)を行
う。これに並行して第0ビット符号拡張回路EXT2
は、入力データの第0ビットの値を全部のビットに符号
拡張する。更に、第2バレルシフタBSFT2は、全ビ
ット“0”の1ワードデータと全ビット“1”の1ワー
ドデータとを入力して、第1バレルシフタBSFT1と
同一のシフト量を以てシフト動作を行い、第1マスクデ
ータMASKD1を生成する。マスク実行回路MASK
Eは、第1バレルシフタBSFT1の出力と第0ビット
符号拡張回路EXT2の出力とを受ける。マスク実行回
路MASKEは、第1マスクデータMASKD1におい
て論理値1となっているビットについて、そのビット位
置に対応した第1バレルシフタBSFT1の出力を選択
し、出力する。これに対して、第1マスクデータMAS
KD1において論理値0となっているビットについて
は、そのビット位置に対応した第0ビット符号拡張回路
EXT2の出力を選択し、出力する。これによってマス
ク実行回路MASKEから出力されるデータは、入力デ
ータの第0ビットから第hビットまでの値を下位側(右
側)に保有し、残りのビットは入力データの第0ビット
の値を保有するデータとされる。このマスク実行回路M
ASKEの出力データは、図9に示されるように拡張回
路EXT1に供給される。この拡張回路EXT1には、
第2マスクデータMASKD2も供給される。拡張回路
EXT1は第2マスクデータMASKD2によって指定
される領域幅LENの左側ビットを符号ビットとして符
号拡張する。図7の(i)に対応する場合には、符号拡
張されるべきビット位置は入力データの第0ビットでは
なく、図の斜線で示される幅hの中に存在する符号ビッ
トSとされ、第2マスクデータMASKD2によって指
定される符号ビットSの符号即ち論理値に応じて、当該
符号ビットSの左側(上位側)の各ビットが符号ビット
Sの論理値に従って符号拡張される。図20から判るよ
うに、境界ビットに対応したビットが、符号線SIN−
BITに伝えられ、残りの領域には、この符号線SIN
−BITのデータが伝えられる。図7の(ii)に対応
する場合には、前記入力データの第0ビットが符号拡張
ビットとされるから、拡張回路EXT1からの出力デー
タは前記マスク実行回路MASKEの出力と同一とされ
る。この場合には、LENが第0ビットを超えるため、
セレクタSEL7によって、マスク実行回路MASKE
の出力が選択される。
As shown in FIG. 8, when executing the extract instruction, the first barrel shifter BSFT1
Each of them receives 32-bit input data and arbitrary value data (for example, data), and performs barrel shift (31-h bit shift) such that the h-th bit of the input data is at the right end. In parallel with this, the 0-th bit sign extension circuit EXT2
Expands the value of the 0th bit of the input data to all bits. Further, the second barrel shifter BSFT2 receives one word data of all bits “0” and one word data of all bits “1” and performs a shift operation with the same shift amount as the first barrel shifter BSFT1. Generate mask data MASKD1. Mask execution circuit MASK
E receives the output of the first barrel shifter BSFT1 and the output of the zeroth bit sign extension circuit EXT2. The mask execution circuit MASKE selects and outputs the output of the first barrel shifter BSFT1 corresponding to the bit position of the bit having the logical value 1 in the first mask data MASKD1. On the other hand, the first mask data MAS
For a bit having a logical value of 0 in KD1, the output of the 0th bit sign extension circuit EXT2 corresponding to the bit position is selected and output. As a result, the data output from the mask execution circuit MASKE holds the values from the 0th bit to the hth bit of the input data on the lower side (right side), and the remaining bits hold the value of the 0th bit of the input data. Data. This mask execution circuit M
The output data of ASKE is supplied to the extension circuit EXT1, as shown in FIG. This extension circuit EXT1 includes
The second mask data MASKD2 is also supplied. The extension circuit EXT1 sign-extends the left bit of the area width LEN specified by the second mask data MASKD2 as a sign bit. In the case corresponding to (i) of FIG. 7, the bit position to be sign-extended is not the 0th bit of the input data, but the sign bit S existing within the width h indicated by oblique lines in the drawing. According to the sign of the sign bit S specified by the two mask data MASKD2, that is, the logical value, each bit on the left side (upper side) of the sign bit S is sign-extended according to the logical value of the sign bit S. As can be seen from FIG. 20, the bit corresponding to the boundary bit is the code line SIN-
The BIT is transmitted to the BIT,
-BIT data is transmitted. In the case corresponding to (ii) of FIG. 7, since the 0th bit of the input data is a sign extension bit, the output data from the extension circuit EXT1 is the same as the output of the mask execution circuit MASKE. In this case, since LEN exceeds the 0th bit,
By the selector SEL7, the mask execution circuit MASKE
Output is selected.

【0056】このように、第1バレルシフタBSFT1
による入力データのバレルシフト処理に並行して、入力
データの第0ビットの値を第0ビット符号拡張回路EX
T2で全ビットを第0ビットの値に符号拡張する処理を
行い、双方の処理結果をマスク実行回路MASKEで選
択して、算術シフトと同様の処理を行うことができる。
即ち、マスクデータ生成用の第2バレルシフタBSFT
2の上位側入力には全ビットが論理値0のデータを入
れ、下位側入力には全ビットが論理値1のデータを入れ
て、第1バレルシフタBSFT1による入力データのシ
フト量と同じだけシフトすることにより第1マスクデー
タMASKD1を生成し、予め入力データの第0ビット
を全ビットに符号拡張したデータと第1バレルシフタB
SFT1のシフト出力データとのマスク処理を、前記前
記第1マスクデータMASKD1によって実行すれば、
算術シフトと等価なオペレーションとなる。図10に示
されるところの、入力データに対する第0ビット符号拡
張処理とバレルシフト処理との従属的若しくは直列的な
処理に比べて、図8に示される本実施例演算方式では、
第1バレルシフタBSFT1の上位側入力には任意値を
供給すればよく、入力データに対する第0ビット符号拡
張処理を待つ必要はない。従ってこの算術シフト演算に
よれば、予め入力データの第0ビットを全ビットに配分
して符号拡張データを生成してからバレルシフトする処
理に比べて、イクストラクト命令の実行速度を高速化す
ることができる。
As described above, the first barrel shifter BSFT1
In parallel with the barrel shift process of the input data by the 0th bit sign extension circuit EX
At T2, a process of sign-extending all bits to the value of the 0th bit is performed, and both processing results are selected by the mask execution circuit MASKE, and the same process as the arithmetic shift can be performed.
That is, the second barrel shifter BSFT for generating mask data
In the upper input of 2, all bits have data of logical value 0, and in the lower input, data of all bits have logical value 1 and are shifted by the same amount as the shift amount of the input data by the first barrel shifter BSFT1. As a result, the first mask data MASKD1 is generated, and data obtained by previously sign-extending the 0th bit of the input data to all bits and the first barrel shifter B
If the mask processing with the SFT1 shift output data is executed by the first mask data MASKD1,
This is an operation equivalent to an arithmetic shift. Compared with the subordinate or serial processing of the 0th bit sign extension processing and the barrel shift processing on the input data shown in FIG. 10, the operation method of the present embodiment shown in FIG.
An arbitrary value may be supplied to the upper input of the first barrel shifter BSFT1, and there is no need to wait for the 0th bit sign extension processing on the input data. Therefore, according to this arithmetic shift operation, the execution speed of the extract instruction can be increased as compared with the process of generating the sign extension data by distributing the 0th bit of the input data to all bits in advance and then performing barrel shift. Can be.

【0057】(5)バレルシフタの占有面積低減 図11には第1及び第2バレルシフタBSFT1,BS
FT2の一実施例の回路図が示されている。第1及び第
2バレルシフタBSFT1,BSFT2の夫々の一列分
のトランジスタ形成領域を、演算情報を一時的に保持す
る前記レジスタファイルREGFの1ビット分の記憶セ
ルが占有する幅と同一幅の領域に並存させ、且つ、双方
のバレルシフタBSFT1,BSFT2におけるシフト
量を制御する制御信号を伝えるシフト量制御線を共通化
する。図において、m1−in0,…は第2バレルシフ
タBSFT2の下位側の32本の入力信号線、m2−i
n0,…は第2バレルシフタBSFT2の上位側の32
本の入力信号線、m−out0,…は第2バレルシフタ
BSFT2の32本の出力信号線、d1−in0,…は
第1バレルシフタBSFT1の下位側の32本の入力信
号線、d2−in0,…は第1バレルシフタBSFT1
の上位側の32本の入力信号線、d−out0,…は第
1バレルシフタBSFT1の32本の出力信号線、sh
ift0,…は第1バレルシフタBSFT1及び第2バ
レルシフタBSFT2に共通利用されるシフト量を指示
する制御線である。前記出力信号線と制御線とは交差的
配置を採って並設され、前記制御線からシフト量指示信
号を選択端子に受けてスイッチ制御されることにより入
力を所定の出力信号線に導通させる複数個のトランジス
タTRがマトリクス配置されている。
(5) Reduction of Occupied Area of Barrel Shifter FIG. 11 shows first and second barrel shifters BSFT1, BSFT.
A circuit diagram of one embodiment of FT2 is shown. The transistor forming areas of one row of each of the first and second barrel shifters BSFT1 and BSFT2 coexist in an area having the same width as the width occupied by the one-bit storage cell of the register file REGF that temporarily holds operation information. In addition, a shift amount control line for transmitting a control signal for controlling the shift amount in both barrel shifters BSFT1 and BSFT2 is shared. In the figure, m1-in0,... Are the lower 32 input signal lines of the second barrel shifter BSFT2, m2-i.
n0,... are the upper 32 bits of the second barrel shifter BSFT2.
Are the 32 output signal lines of the second barrel shifter BSFT2, d1-in0,... Are the 32 lower input signal lines of the first barrel shifter BSFT1, d2-in0,. Is the first barrel shifter BSFT1
, Are the 32 output signal lines of the first barrel shifter BSFT1, and the upper 32 input signal lines, d-out0,.
ift0,... are control lines for instructing a shift amount commonly used by the first barrel shifter BSFT1 and the second barrel shifter BSFT2. The output signal line and the control line are arranged side by side in an intersecting arrangement, and a shift amount instruction signal is received from the control line by a selection terminal and controlled by a switch so that an input is conducted to a predetermined output signal line. The transistors TR are arranged in a matrix.

【0058】図11は、実際のチップ上におけるレイア
ウトに合わせて描かれている。また、同図には、上記セ
レクタSEL3の一部,セレクタSEL5の一部及びレ
ジスタファイルREGF内のレジスタREGn−1,R
EGn,REGn+1が示されており、これらも実際の
レイアウトに合わせて描かれている。セレクタは、複数
の単位セレクタU−SELにより構成され、レジスタも
複数の記憶セルU−REGにより構成される。記憶セル
と単位セレクタとの間はバスによって結合されいる。同
図から判るように、一列分のトランジスタ形成領域と、
記憶セルU−REG,単位セレクタU−SELは、互い
にほぼ同一幅にされている。
FIG. 11 is drawn in accordance with the layout on the actual chip. FIG. 3 also shows a part of the selector SEL3, a part of the selector SEL5, and the registers REGn-1 and REGn in the register file REGF.
EGn and REGn + 1 are shown, and these are also drawn according to the actual layout. The selector is configured by a plurality of unit selectors U-SEL, and the register is also configured by a plurality of storage cells U-REG. The memory cell and the unit selector are connected by a bus. As can be seen from FIG.
The storage cell U-REG and the unit selector U-SEL have substantially the same width.

【0059】前記レジスタファイルREGFの記憶セル
U−REGは、スタティック型フリップフロップを主体
として構成され、例えばCMOS回路で構成される場合
には、トランスファゲートを含めて最低6個のトランジ
スタを要する。この6個のトランジスタを配置する高さ
が図11に示される1ビット領域の高さ寸法に一致す
る。双方のバレルシフタBSFT1,BSFT2を夫々
分離させて別々の領域に配置したとすれば、図12及び
図13に示されているようなレイアウトになると思われ
る。これらの図12及び図13から判るように、この場
合には、何等利用されない無駄な領域が多数存在する。
図11から判るように、前記バレルシフタBSFT1,
BSFT2は、セレクタ及びバスSB1,SB2を介し
てレジスタファイルREGFからデータが供給される。
このとき、スタンダードセルのようなレイアウト手法を
考慮すると、機能毎に把握される回路ブロックに対して
は、矩形領域として定義される領域にトランジスタを配
置することがレイアウト上望ましい。特にバレルシフタ
BSFT1,BSFT2はレジスタファイルREGFか
ら並列的にデータが与えられ、密接に機能するから、並
列的に供給されるデータの各ビット相互間に信号伝播遅
延などがあっては動作上望ましくない。従って、レジス
タファイルREGFとバレルシフタBSFT1,BSF
T2を結ぶ信号配線の複雑で統一的でない屈曲は極力防
止することが得策である。この観点に立つと、図12及
び図13に示されるようにバレルシフタBSFT1,B
SFT2を夫々別々の領域に構成する場合にも、一見無
駄と考えられる空間を採るようにして前記1ビット領域
毎にトランジスタやその入力信号線が配置される。本実
施例ではその空間を有効に利用するため、双方のバレル
シフタBSFT1,BSFT2を同一領域に並存させ
る。これにより、2個のバレルシフタBSFT1,BS
FT2を採用してもそれによる実質的なチップ面積増大
を抑制することができる。仮に図14に示されるよう
に、バレルシフタBSFT1,BSFT2の幅寸法を小
さくすると、縦寸法X分だけバレルシフタの形成領域を
相対的に小さくできるが、その反面、配線の屈曲部分に
おいてはレイアウト配線ルールにより配線間には所定の
間隔を設けなければならないために横方向の寸法Yが増
し、整数演算装置EUのチップ占有面積は期待通りに小
さくならない。
The storage cells U-REG of the register file REGF are mainly composed of static flip-flops. For example, in the case of a CMOS circuit, at least six transistors including a transfer gate are required. The height at which these six transistors are arranged matches the height of the one-bit region shown in FIG. Assuming that both barrel shifters BSFT1 and BSFT2 are separated from each other and arranged in separate regions, the layouts shown in FIGS. 12 and 13 are considered. As can be seen from FIGS. 12 and 13, in this case, there are many useless areas that are not used at all.
As can be seen from FIG. 11, the barrel shifter BSFT1,
BSFT2 is supplied with data from the register file REGF via the selector and the buses SB1 and SB2.
At this time, in consideration of a layout method such as a standard cell, it is desirable in terms of layout to arrange transistors in a region defined as a rectangular region for a circuit block grasped for each function. In particular, the barrel shifters BSFT1 and BSFT2 are provided with data in parallel from the register file REGF and function closely. Therefore, if there is a signal propagation delay between bits of data supplied in parallel, it is not desirable in operation. Therefore, the register file REGF and the barrel shifters BSFT1 and BSF
It is advisable to prevent the complicated and unified bending of the signal wiring connecting T2 as much as possible. From this viewpoint, as shown in FIGS.
Even when the SFTs 2 are configured in separate areas, transistors and their input signal lines are arranged for each of the 1-bit areas so as to take a space that is considered useless at first glance. In this embodiment, both barrel shifters BSFT1 and BSFT2 coexist in the same area in order to effectively use the space. Thereby, two barrel shifters BSFT1, BSFT
Even if FT2 is adopted, a substantial increase in chip area due to it can be suppressed. As shown in FIG. 14, if the width dimensions of the barrel shifters BSFT1 and BSFT2 are reduced, the barrel shifter formation region can be relatively reduced by the vertical dimension X. Since a predetermined interval must be provided between the wirings, the dimension Y in the horizontal direction increases, and the chip occupation area of the integer arithmetic unit EU does not decrease as expected.

【0060】(6)符号ビットの位置抽出用デコード論
理 前記拡張回路EXT1において、マスク実行回路MAS
KEから出力されるデータに対する符号拡張のための符
号ビットの位置は図15に示される論理ゲート回路LG
C(図20のデコーダBDECに相当)が検出する。こ
の論理ゲート回路LGCは、前記マスクビット生成回路
MBGから出力される第2マスクデータMASKD2の
相互に隣合う2ビットの論理値をそれぞれ排他的論理和
ゲートEORで比較し、その第2マスクデータMASK
D2のビット列中で論理値が変化される境界ビットを他
のビットとは異なる論理値で出力する論理を有する。斯
る論理ゲート回路LGCは、第2マスクデータMASK
D2の各ビットを1段の排他的論理和ゲートEORを通
すことにより、符号拡張すべき符号ビットの位置を切り
出すことができる。したがって、前記情報LENを入力
してデコードするような別のデコーダを新たに設けなく
ても済み、この点において拡張回路EXT1の回路規模
は小さくされる。上記デコード論理は、被デコード信号
から相補レベルを生成する回路が必要なく、この点にお
いて従来のデコード回路に比べて、配線パターンの簡素
化と回路素子の低減が可能になり、整数演算装置EUの
レイアウト面積削減に寄与する。
(6) Decode Logic for Extracting Code Bit Position In the extension circuit EXT1, the mask execution circuit MAS
The position of the sign bit for sign extension to the data output from KE is determined by logic gate circuit LG shown in FIG.
C (corresponding to the decoder BDEC in FIG. 20) detects it. The logic gate circuit LGC compares the logic values of the adjacent two bits of the second mask data MASKD2 output from the mask bit generation circuit MBG with the exclusive OR gate EOR, and compares the second mask data MASK with the second mask data MASK.
It has a logic to output a boundary bit whose logical value is changed in the bit string of D2 as a logical value different from other bits. Such a logic gate circuit LGC is provided with the second mask data MASK.
By passing each bit of D2 through the exclusive OR gate EOR of one stage, the position of the sign bit to be sign-extended can be cut out. Therefore, it is not necessary to newly provide another decoder for inputting and decoding the information LEN, and in this respect, the circuit scale of the extension circuit EXT1 is reduced. The decoding logic does not require a circuit for generating a complementary level from a signal to be decoded. In this respect, the wiring logic can be simplified and the number of circuit elements can be reduced as compared with a conventional decoding circuit. It contributes to layout area reduction.

【0061】この論理ゲート回路LGCは、前記マスク
ビット生成回路MBGのような回路と共に一般的なデコ
ーダとしてその他の用途にも適用することができる。こ
のとき、前記マスクビット生成回路MBGのような回路
は、nビットのデータから、2のn乗のビット列であっ
て、且つ、そのビット列の端から連続的に配置される一
定論理値のビットの数によって相違される2のn乗種類
の何れかのデータを展開する手段として定義することが
でき、これに応じて、論理ゲート回路は、前記展開手段
から出力されるデータの相互に隣合う2ビットの論理値
をそれぞれ比較し、その展開手段からの出力データのビ
ット列中で論理値が変化される境界ビットを他のビット
とは異なる論理値で出力する回路として構成される。
The logic gate circuit LGC can be applied to other applications as a general decoder together with a circuit such as the mask bit generation circuit MBG. At this time, a circuit such as the mask bit generation circuit MBG converts the n-bit data into a bit string of 2 n and a bit of a constant logical value continuously arranged from the end of the bit string. It can be defined as a means for developing any data of 2 n powers different depending on the number, and in response to this, the logic gate circuit causes the data output from the developing means to be adjacent to each other. It is configured as a circuit that compares the logical values of the bits, and outputs a boundary bit whose logical value is changed in the bit string of the output data from the expanding means with a logical value different from the other bits.

【0062】上記実施例によれば以下の作用効果を得る
ことができる。 (1)入力データのシフト並びにマスクデータの生成
に、バレルシフタBSFT1,BSFT2が、それぞれ
採用され、且つ、双方のバレルシフタBSFT1,BS
FT2のシフト量が相互に同一にされる。これは、ディ
ポジット命令やイクストラクト命令などによるビットフ
ィールド操作をサポートする演算装置SMUの高機能化
並びに演算処理の高速化に寄与する。 (2)2組のバレルシフタBSFT1,BSFT2の夫
々における1列分のトランジスタ列がレジスタファイル
REGFの1ビット分の記憶セルの幅に合わせて折り重
ねるようにレイアウトされる。これにより、ビットフィ
ールド操作演算装置SMUのチップ占有面積を低減する
ことができる。 (3)入力データに対する第0ビット符号拡張と第1バ
レルシフタBSFT1による入力データのバレルシフト
とを、時間的に並列に処理可能となる。また、その並列
処理結果が、第2バレルシフタBSFT2で生成される
第1マスクデータMASKD1に基づいてマスク実行回
路MASKEで選択され、算術シフトが行われる。算術
シフトの結果に対して拡張回路EXT1で符号拡張が行
われることにより、イクストラクト命令によってデータ
の任意領域を抽出する演算速度を高速化することができ
る。 (4)第2マスクデータMASKD2のようなデータを
入力してデコード結果を出力する論理ゲート回路LGC
(BDEC)を採用することにより、デコーダには、入
力を相補レベルの信号に変換する回路が不要とされ、前
記拡張回路EXT1さらには一般的なデコーダの回路規
模並びにチップ占有面積を低減することができる。 (5)上記作用効果により、チップ占有面積の増大を抑
え、且つ動作速度を高速化して、ディポジット命令とイ
クストラクト命令とをサポートした高機能RISCプロ
セッサを得ることができる。
According to the above embodiment, the following functions and effects can be obtained. (1) The barrel shifters BSFT1 and BSFT2 are used for shifting input data and generating mask data, respectively, and both barrel shifters BSFT1 and BSFT1 are used.
The shift amounts of FT2 are made equal to each other. This contributes to an increase in the function of the arithmetic unit SMU that supports bit field operations by a deposit instruction, an extract instruction, and the like, and to an increase in the speed of arithmetic processing. (2) One transistor row in each of the two sets of barrel shifters BSFT1 and BSFT2 is laid out so as to be folded in accordance with the width of one bit of memory cells in the register file REGF. This makes it possible to reduce the chip occupation area of the bit field manipulation arithmetic unit SMU. (3) The 0th bit sign extension for the input data and the barrel shift of the input data by the first barrel shifter BSFT1 can be processed in parallel in time. The result of the parallel processing is selected by the mask execution circuit MASKE based on the first mask data MASKD1 generated by the second barrel shifter BSFT2, and arithmetic shift is performed. Since the result of the arithmetic shift is sign-extended by the extension circuit EXT1, the operation speed for extracting an arbitrary region of data by an extract instruction can be increased. (4) A logic gate circuit LGC that inputs data such as the second mask data MASKD2 and outputs a decoded result
By adopting (BDEC), a decoder does not need a circuit for converting an input to a signal of a complementary level, and the circuit scale and chip occupation area of the extension circuit EXT1 and a general decoder can be reduced. it can. (5) By the above operation and effect, it is possible to obtain a high-performance RISC processor that suppresses an increase in the chip occupation area and increases the operation speed, and supports the deposit instruction and the extract instruction.

【0063】次に、バレルシフタの他の実施例について
述べる。以下に述べられるバレルシフタは、前述した実
施例中におけるバレルシフタBSFT1,BSFT2と
して用いることができる。また、前述した実施例とは別
のプロセッサ、例えばコプロセッサにおけるバレルシフ
タとして用いることもできる。
Next, another embodiment of the barrel shifter will be described. The barrel shifter described below can be used as the barrel shifters BSFT1 and BSFT2 in the above-described embodiment. Further, it can be used as a barrel shifter in a processor different from the above-described embodiment, for example, a coprocessor.

【0064】前記図12及び図13にも示したが、従来
のバレルシフタ回路としては、図30に示されるよう
に、複数のMOSトランジスタQをマトリクス状に配置
して構成することができる。例えばN=2nビットまで
の任意のシフトを行うバレルシフタ回路では、N×N個
のMOSトランジスタQがマトリクス状に配置され、n
ビットのシフト制御データSFをデコードするデコーダ
DECの出力によって、当該シフト制御データSFに呼
応する所定列の全てのMOSトランジスタQが導通状態
とされる。これによって入力データを、シフト制御デー
タSFに従った任意ビットについてシフトすることが可
能とされる。
As shown in FIGS. 12 and 13, the conventional barrel shifter circuit can be configured by arranging a plurality of MOS transistors Q in a matrix as shown in FIG. For example, in a barrel shifter circuit that performs an arbitrary shift up to N = 2 n bits, N × N MOS transistors Q are arranged in a matrix, and
By the output of the decoder DEC for decoding the bit shift control data SF, all the MOS transistors Q in a predetermined column corresponding to the shift control data SF are turned on. This makes it possible to shift the input data for an arbitrary bit according to the shift control data SF.

【0065】尚、バレルシフタについて記載された文献
の例としては、特開平2−90318号公報がある。
As an example of a document describing a barrel shifter, there is JP-A-2-90318.

【0066】上記図30のバレルシフタ回路において
は、バレルシフタ回路を構成するMOSトランジスタQ
の制御信号を生成するために、nビットのシフト制御デ
ータSFをデコードするデコーダDECが必要とされ
る。このデコーダDECでのデコード時間、すなわちデ
コーダDECにシフト制御データSFが与えられてから
デコード出力が確定するまでに要する時間によって、上
記バレルシフタ回路では、その動作速度が制限されてし
まう。また、そのようなデコーダDECを設けることが
必要とされるため、LSIチップにおけるバレルシフタ
回路の占有面積の減少が阻害されていることが、本発明
者によって見いだされた。
In the barrel shifter circuit shown in FIG. 30, the MOS transistors Q forming the barrel shifter circuit
, A decoder DEC for decoding the n-bit shift control data SF is required. The operation speed of the barrel shifter circuit is limited by the decoding time in the decoder DEC, that is, the time required from when the shift control data SF is supplied to the decoder DEC to when the decode output is determined. In addition, the inventor has found that the provision of such a decoder DEC prevents the reduction of the occupied area of the barrel shifter circuit in the LSI chip.

【0067】前述した目的の一つは、バレルシフタ回路
を以下のように構成することによって達成される。
One of the above-mentioned objects is achieved by configuring the barrel shifter circuit as follows.

【0068】すなわち、nを正の整数とするとき、それ
ぞれ2i(i=0,1,2,…,n−1)ビットのデー
タシフトを可能とするn個のシフト回路を結合してバレ
ルシフタを形成する。また、nビットのシフト制御デー
タに呼応して2ワード分の入力データについて、2n
ットまでの任意ビット数のシフトを可能にするには、2
ワードのうちの1ワード分の入力データを上位側若しく
は下位側へシフトする第1シフト回路群と、他の1ワー
ド分の入力データを上記第1シフト回路群とは逆方向へ
シフトする第2シフト回路群とを含んでバレルシフト回
路を形成する。この場合においては、それぞれ2i(i
=0,1,2,…,n−1)ビットのデータシフトを可
能とするn個のシフト回路を結合して上記第1シフト回
路群及び第2シフト回路群が形成される。このとき、上
記第1シフト回路群のシフト出力と上記第2シフト回路
群のシフト出力とを合成することにより、1ワード分の
シフト出力を得ることができる。さらに、上記第1シフ
ト回路群に入力されるシフト制御データが反転されて、
上記第2シフト回路群にシフト制御データとして入力さ
れる場合、上記第1シフト回路群のシフト出力と上記第
2シフト回路群のシフト出力との合成を適確に行うに
は、上記シフト制御データに拘らず入力データの1ビッ
トシフトを行う1ビットシフト回路を上記第2シフト回
路群に含めると良い。尚、ワードは8,16,32のい
ずれでも良いし、その他任意のビット数を1単位とする
ことができる。
That is, when n is a positive integer, a barrel shifter is formed by combining n shift circuits capable of shifting data by 2 i (i = 0, 1, 2,..., N−1) bits. To form In order to enable shifting of an arbitrary number of bits up to 2 n bits for input data of two words in response to n-bit shift control data,
A first shift circuit group for shifting one word of input data to the upper or lower side of a word, and a second shift circuit for shifting another one word of input data in a direction opposite to the first shift circuit group. A barrel shift circuit is formed including the shift circuit group. In this case, each 2 i (i
= 0, 1, 2,..., N−1). The first shift circuit group and the second shift circuit group are formed by combining n shift circuits that enable data shift of bits. At this time, a shift output for one word can be obtained by combining the shift output of the first shift circuit group and the shift output of the second shift circuit group. Further, the shift control data input to the first shift circuit group is inverted,
In the case where the shift control data is input to the second shift circuit group, the shift control data may be appropriately combined with the shift output of the first shift circuit group and the shift output of the second shift circuit group. Regardless, a 1-bit shift circuit that shifts input data by 1 bit may be included in the second shift circuit group. The word may be 8, 16, or 32, or any other number of bits may be defined as one unit.

【0069】さらに具体的な態様では、上記n個のシフ
ト回路は、上記シフト制御データに呼応してデータスル
ー状態とデータシフト状態とを切り換えるためのゲート
回路を含んで形成することができる。
In a more specific mode, the n shift circuits can be formed to include a gate circuit for switching between a data through state and a data shift state in response to the shift control data.

【0070】上記した構成によれば、それぞれ2i(i
=0,1,2,…,n−1)ビットのデータシフトを可
能とするn個のシフト回路は、nビットのシフト制御デ
ータに呼応して入力データの2nビットシフト動作を可
能とし、このことが、nビットのシフト制御データをデ
コードするためのデコーダを不要とする。
According to the above configuration, each of the 2 i (i
= 0, 1, 2,..., N−1) -bit data can be shifted by 2 n- bit input data in response to n-bit shift control data. This eliminates the need for a decoder for decoding n-bit shift control data.

【0071】図28には、本発明の一実施例としてのバ
レルシフト回路(バレルシフタ)が適用されるコプロセ
ッサが示されている。同図に示されるコプロセッサ1
は、特に制限されないが、公知の半導体集積回路製造技
術によりシリコン基板のような一つの半導体基板に形成
される。
FIG. 28 shows a coprocessor to which a barrel shift circuit (barrel shifter) as one embodiment of the present invention is applied. Coprocessor 1 shown in FIG.
Although it is not particularly limited, it is formed on one semiconductor substrate such as a silicon substrate by a known semiconductor integrated circuit manufacturing technique.

【0072】上記コプロセッサ1は、バスインタフェー
ス回路2を介して結合される外部の図示されない主プロ
セッサの演算能力を補い若しくは当該主プロセッサによ
る演算能力負担を軽減するためのものであり、主プロセ
ッサの指示に基づいて所定の演算処理を行う。図28に
示されるようにコプロセッサ1は、所定の演算手順等が
記述されたマイクロプログラムが格納されたマイクロR
OM(リード・オンリ・メモリ)4を備える。このマイ
クロROM4は、コントローラ5によってアクセスさ
れ、それにより、マイクロプログラムを構成するマイク
ロ命令が順次読出される。
The coprocessor 1 is for complementing the operation capability of an external main processor (not shown) connected via the bus interface circuit 2 or reducing the operation capability load of the main processor. A predetermined calculation process is performed based on the instruction. As shown in FIG. 28, the coprocessor 1 includes a micro R storing a micro program in which a predetermined operation procedure and the like are described.
An OM (read only memory) 4 is provided. The micro ROM 4 is accessed by the controller 5, whereby the micro instructions constituting the micro program are sequentially read.

【0073】上記コントローラ5は、上記バスインタフ
ェース回路2及び内部バス6を介して、図示されない主
プロセッサから与えられるコマンドをフェッチし、この
コマンドに含まれるコマンドコードをデコードして得ら
れるアドレス信号若しくはそのコマンドに含まれるアド
レス情報に基づいて、マイクロROM4をアクセスす
る。これにより、そのコマンドで指示される演算処理を
行うための一連のマイクロ命令郡の最初のマイクロ命令
が、マイクロROM4から読出される。上記コマンドで
指示される演算処理を行うための一連のマイクロ命令群
のうち、2番目以降のマイクロ命令は、直前に読出され
たマイクロ命令のネクストアドレスフィールドの情報が
上記コントローラ5に供給されることによって指示され
る。このようにしてマイクロROM4から読出されるマ
イクロ命令はマイクロ命令デコーダ7に供給される。こ
のマイクロ命令デコーダ7は、与えられたマイクロ命令
をデコードし、実行ユニット3などに対する制御信号を
生成する。尚、マイクロ命令に従って実行ユニット3が
演算処理等を行っているとき、マイクロフローの分岐が
必要になった場合には、実行ユニット3がその指示をコ
ントローラ5に与える。
The controller 5 fetches a command given from a main processor (not shown) via the bus interface circuit 2 and the internal bus 6 and decodes a command code included in the command or an address signal obtained by decoding the command code. The micro ROM 4 is accessed based on the address information included in the command. As a result, the first microinstruction of a series of microinstructions for performing the arithmetic processing specified by the command is read from the micro ROM 4. As for the second and subsequent micro-instructions in the series of micro-instructions for performing the arithmetic processing indicated by the above-mentioned command, information of the next address field of the micro-instruction read immediately before is supplied to the controller 5. Directed by The microinstruction read from the microROM 4 in this manner is supplied to the microinstruction decoder 7. The microinstruction decoder 7 decodes a given microinstruction and generates a control signal for the execution unit 3 and the like. In addition, when the execution unit 3 performs arithmetic processing or the like according to the microinstruction, if the microflow needs to be branched, the execution unit 3 gives the instruction to the controller 5.

【0074】上記実行ユニット3は、内部バス6に結合
されると共に一対のRAM(ランダムアクセスメモリ)
9,10に結合されている。このRAM9,10は、外
部から供給される演算に必要なデータを予め蓄えたり、
演算処理に際してテンポラリレジスタとして利用され
る。RAM9,10に対するアクセス制御は、上記マイ
クロ命令デコーダ7から出力される制御信号8に基づい
て行われる。例えば浮動小数点演算に際してRAM9,
10の所定領域がテンポラリレジスタとして利用される
とき、そのRAM9,10は、そこからソースデータが
読出され、読出されたソースデータは、例えば加工さ
れ、ディストネーションデータとしてRAM9,10に
戻されるというようなリード・モディファイ・ライト動
作を行う。
The execution unit 3 is connected to the internal bus 6 and has a pair of RAMs (random access memories).
9 and 10. The RAMs 9 and 10 store in advance data necessary for calculations supplied from the outside,
It is used as a temporary register during arithmetic processing. Access control to the RAMs 9 and 10 is performed based on a control signal 8 output from the micro instruction decoder 7. For example, at the time of floating point arithmetic,
When ten predetermined areas are used as temporary registers, the RAMs 9 and 10 read source data therefrom, and the read source data is processed, for example, and returned to the RAMs 9 and 10 as destination data. Perform read-modify-write operations.

【0075】図29には上記実行ユニット3の構成の一
例が示されている。
FIG. 29 shows an example of the configuration of the execution unit 3.

【0076】この実行ユニット3は、特に制限されない
が、それぞれ32ビット構成の内部バスBUS1,BU
S2,BUS3を含む。これら内部バスBUS1,BU
S2,BUS3には、算術論理演算装置11、シフト演
算装置12、シフトカウンタSCUNT、及びテンポラ
リレジスタ13が結合される。尚、テンポラリレジスタ
13は上記RAM9,10の所定領域に割当ることが可
能である。
The execution units 3 are not particularly limited, but have internal buses BUS1 and BU each having a 32-bit structure.
S2, BUS3. These internal buses BUS1 and BU
An arithmetic logic unit 11, a shift operation unit 12, a shift counter SCUNT, and a temporary register 13 are connected to S2 and BUS3. The temporary register 13 can be allocated to a predetermined area of the RAMs 9 and 10.

【0077】図29には、上記コントローラ5に含まれ
るシフト制御データ形成回路SFGも示されている。例
えば、上記コマンドは、前記実施例の命令と同様に、そ
の中にシフト量を表わすデータを含んでいる。上記シフ
ト制御データ形成回路SFGは、例えばコマンドから上
記シフト量を取り出し、それをシフト制御データSFと
してシフト演算装置12に供給する。
FIG. 29 also shows a shift control data forming circuit SFG included in the controller 5. For example, the command includes data indicating the shift amount in the command, similarly to the command of the above embodiment. The shift control data forming circuit SFG extracts the shift amount from a command, for example, and supplies the shift amount to the shift operation device 12 as shift control data SF.

【0078】図21には上記シフト演算装置12の詳細
な構成が示される。
FIG. 21 shows a detailed configuration of the shift operation device 12.

【0079】図21に示されるシフト演算装置12は、
特に制限されないが、N及びnを正の整数とするとき、
nビットのシフト制御データ(コード化されたデータ)
S0,…,Sn-2,Sn-1に呼応して2ワード分の入力デ
ータについて、N=2nビットまでの任意ビット数のシ
フトを可能とするバレルシフト回路を有する。このバレ
ルシフト回路は、I1乃至INで示される1ワード分の入
力データを左シフトするための左シフト回路群20と、
J1乃至JNで示される1ワード分の入力データを右シフ
トする右シフト回路群21とを含む。
The shift operation device 12 shown in FIG.
Although not particularly limited, when N and n are positive integers,
n-bit shift control data (coded data)
There is a barrel shift circuit that can shift an arbitrary number of bits up to N = 2 n bits for two words of input data in response to S0,..., Sn-2, Sn-1. The barrel shift circuit includes a left shift circuit group 20 for left-shifting one word of input data indicated by I1 to IN,
A right-shift circuit group 21 for right-shifting one word of input data indicated by J1 to JN.

【0080】ここで、特に制限されないが、左シフトと
は、例えば図24に示されるように入力データI1,I
2,I3,I4について、そのシフト結果がデータ列I2,
I3,I4となるように、入力データが上位側にシフトさ
れる場合を指し、また、右シフトとは、例えば図25に
示されるように入力データJ1,J2,J3,J4につい
て、そのシフト結果がデータ列J1,J2,J3となるよ
うに、入力データが下位側にシフトされる場合を指す。
Here, although not particularly limited, the left shift means, for example, as shown in FIG.
2, I3, and I4, the shift result is the data string I2,
The right shift refers to the case where the input data is shifted to the upper side so as to be I3 and I4. The right shift refers to the shift result of the input data J1, J2, J3 and J4 as shown in FIG. Is a data string J1, J2, J3.

【0081】上記左シフト回路群20及び右シフト回路
群21は、図30に示されるようなnビットのシフト制
御データSFをデコードするためのデコーダDECを不
要とするため、以下のように構成される。
The left shift circuit group 20 and the right shift circuit group 21 do not need the decoder DEC for decoding the n-bit shift control data SF as shown in FIG. You.

【0082】上記左シフト回路群20は、それぞれ2i
(i=0,1,2,…,n−1)ビットのデータシフト
を可能とするn個のシフト回路LSF0,…,LSFn-
2,LSFn-1がシリーズ接続されて成る。例えばシフト
回路LSFn-1は、シフト制御データSn-1がハイレベル
にアサートされた場合、1ワード分の入力データI1乃
至INを2n-1ビット左シフトする機能を有し、それの後
段に配置されたシフト回路LSFn-2は、シフト制御デ
ータSn-2がハイレベルにアサートされた場合、入力デ
ータを2n-2ビット左シフトする機能を有し、それの後
段に配置されたシフト回路LSF0は、シフト制御デー
タS0がハイレベルにアサートされた場合、入力データ
を20ビット(すなわち1ビット)左シフトする機能を
有する。
The left shift circuit group 20 has 2 i
N shift circuits LSF0,..., LSFn- enabling data shift of (i = 0, 1, 2,..., N-1) bits.
2, LSFn-1 are connected in series. For example, the shift circuit LSFn-1 has a function of shifting the input data I1 to IN for one word to the left by 2 n-1 bits when the shift control data Sn-1 is asserted to a high level. The arranged shift circuit LSFn-2 has a function of shifting the input data left by 2 n-2 bits when the shift control data Sn-2 is asserted to a high level, and the shift circuit LSFn-2 arranged at the subsequent stage thereof. LSF0, when the shift control data S0 is asserted to a high level, a function of the input data 2 0 bit (i.e., 1 bit) left shift.

【0083】上記右シフト回路群21は、上記左シフト
回路群20と同様に、それぞれ2i(i=0,1,2,
…,n−1)ビットのデータシフトを可能とするn個の
シフト回路RSF0,…,RSFn-2,RSFn-1がシリ
ーズ接続され、さらにそれの入力初段には、後に詳述す
るように上記左シフト回路群20のシフト出力と右シフ
ト回路群21のシフト出力との合成を適確に行うため、
シフト制御データS0,…,Sn-2,Sn-1に拘らず1ワ
ードの入力データJ1乃至JNを1ビット右シフトする1
ビット右シフト回路23が配置される。このシフト回路
23の後段に配置されたシフト回路RSFn-1は、上記
シフト制御データSn-1がインバータINn-1で反転され
たデータSn-1*(*はデータ反転又はローアクティブ
を示す)がハイレベルにアサートされた場合に入力デー
タを2n-1ビット右シフトする機能を有し、それの後段
に配置されたシフト回路RSFn-2は、シフト制御デー
タSn-2を反転するインバータINn-2の出力データSn-
2*がハイレベルにアサートされた場合に入力データを
n-2ビット右シフトする機能を有し、それの後段に配
置されたシフト回路RSF0は、シフト制御データS0を
反転するインバータIN0の出力データS0*がハイレベ
ルにアサートされた場合に入力データを20ビット(す
なわち1ビット)右シフトする機能を有する。
The right shift circuit group 21 has 2 i (i = 0, 1, 2, 2), similarly to the left shift circuit group 20.
.., RSFn-2, RSFn-1 are connected in series, and an input first stage thereof has the above-mentioned shift circuits RSF0,. To properly combine the shift output of the left shift circuit group 20 and the shift output of the right shift circuit group 21,
Shifts the input data J1 to JN of one word to the right by one bit regardless of the shift control data S0,..., Sn-2, Sn-1.
A bit right shift circuit 23 is provided. The shift circuit RSFn-1 arranged at the subsequent stage of the shift circuit 23 receives data Sn-1 * (* indicates data inversion or low active) obtained by inverting the shift control data Sn-1 by the inverter INn-1. It has a function of shifting the input data right by 2 n -1 bits when asserted to a high level, and a shift circuit RSFn-2 arranged at the subsequent stage thereof has an inverter INn- which inverts the shift control data Sn-2. 2 output data Sn-
When 2 * is asserted to a high level, it has a function of shifting the input data right by 2 n−2 bits, and a shift circuit RSF0 disposed at the subsequent stage thereof outputs the output of the inverter IN0 which inverts the shift control data S0. data S0 * has a function of 2 0 bit (i.e., 1 bit) right shift input data when it is asserted high.

【0084】上記左シフト回路群20及び右シフト回路
群21の出力は1ワードに合成されることにより、本実
施例のバレルシフト回路のシフト出力O1乃至ONとされ
る。上記左シフト回路群20及び右シフト回路群21に
含まれるシフト回路(1ビット右シフト回路23を除
く)は、上記シフト制御データS0,…,Sn-2,Sn-1
に呼応してデータスルー状態とデータシフト状態とを切
り換えるためのゲート回路により比較的簡単に構成され
る。
The outputs of the left shift circuit group 20 and the right shift circuit group 21 are combined into one word to be the shift outputs O1 to ON of the barrel shift circuit of this embodiment. The shift circuits (excluding the 1-bit right shift circuit 23) included in the left shift circuit group 20 and the right shift circuit group 21 are provided with the shift control data S0,..., Sn-2, Sn-1.
, A gate circuit for switching between the data through state and the data shift state in a relatively simple manner.

【0085】例えば1ワード入力データI1乃至INを2
n-1ビット左シフトするシフト回路LSFn-1は、図22
に示されるように、シフト制御データSn-1を反転する
インバータINLの出力によってオン/オフ制御される
複数のNチャンネル型MOSFETQI1と、シフト制
御データSn-1によってオン/オフ制御される複数のN
チャンネル型MOSFETQI2とを含む。上記インバ
ータINLの介在により複数のMOSFETQI1と複
数のMOSFETQI2とは相補的にオン/オフされる
ようになっており、一対のMOSFETQI1とQI2と
で入力データI1乃至INを選択するためのマルチプレク
サが形成される。すなわち、シフト制御データSn-1が
ローレベルの場合、複数のMOSFETQI1がオン状
態、複数のMOSFETQI2がオフ状態とされること
により、入力データI1乃至INがそのままの状態(シフ
トされない状態)で後段のシフト回路LSFn-2に伝達
される(スルー状態)。それに対して、シフト制御デー
タSn-1がハイレベルの場合、複数のMOSFETQI1
がオフ状態、複数のMOSFETQI2がオン状態とさ
れることにより、入力データI1乃至INのビットがシフ
トされてから後段のシフト回路LSFn-2に伝達される
(シフト状態)。このシフト回路LSFn-1でのデータ
シフト量は2n-1ビットとされるので、例えばデータI1
5に代えてデータI31が割り当てられ、同様にデータI1
6に代えてデータINが割り当てられ、そのようなデータ
選択により入力データI1乃至INの2n-1ビットのシフ
トが可能とされる。
For example, if one-word input data I 1 to IN are set to 2
The shift circuit LSFn-1 that shifts left by n-1 bits is shown in FIG.
, A plurality of N-channel MOSFETs QI1 that are turned on / off by the output of an inverter INL that inverts the shift control data Sn-1, and a plurality of N that are turned on / off by the shift control data Sn-1.
And a channel type MOSFET QI2. The plurality of MOSFETs QI1 and the plurality of MOSFETs QI2 are turned on / off complementarily by the interposition of the inverter INL. A multiplexer for selecting the input data I1 to IN is formed by the pair of MOSFETs QI1 and QI2. You. That is, when the shift control data Sn-1 is at a low level, the plurality of MOSFETs QI1 are turned on and the plurality of MOSFETs QI2 are turned off, so that the input data I1 to IN remain unchanged (unshifted) and The signal is transmitted to the shift circuit LSFn-2 (through state). On the other hand, when the shift control data Sn-1 is at a high level, a plurality of MOSFETs QI1
Is turned off and the plurality of MOSFETs QI2 are turned on, whereby the bits of the input data I1 to IN are shifted and then transmitted to the subsequent shift circuit LSFn-2 (shifted state). Since the data shift amount in the shift circuit LSFn-1 is 2 n-1 bits, for example, the data I1
Data I31 is assigned in place of 5, and data I1 is similarly assigned.
Data IN is assigned in place of 6, and such data selection enables shifting of 2 n -1 bits of input data I1 to IN.

【0086】同様に1ワード分の入力データJ1乃至JN
を2n-1ビット右シフトするシフト回路RSFn-1は、図
23に示されるように、シフト制御データSn-1*を反
転するインバータINRの出力によってオン/オフ制御
される複数のNチャンネル型MOSFETQJ1と、シ
フト制御データSn-1*によってオン/オフ制御される
複数のNチャンネル型MOSFETQJ2とを含む。イ
ンバータINRの介在により複数のMOSFETQJ1
と複数のMOSFETQJ2とは相補的にオン/オフさ
れるようになっており、一対のMOSFETQJ1とQ
J2とで入力データJ1乃至JNを選択するためのマルチ
プレクサが形成される。すなわちシフト制御データSn-
1*がローレベルの場合、複数のMOSFETQJ1がオ
ン状態、複数のMOSFETQJ2がオフ状態とされる
ことにより、入力データJ1乃至JNがそのままの状態
(シフトされない状態)で後段のシフト回路RSFn-2
に伝達される(スルー状態)。それに対して、シフト制
御データSn-1*がハイレベルの場合、複数のMOSF
ETQJ1がオフ状態、複数のMOSFETQJ2がオン
状態とされることにより、入力データJ1乃至JNのビッ
トがシフトされてから後段のシフト回路RSFn-2に伝
達される(シフト状態)。このシフト回路RSFn-1で
のデータシフト量は2n-1ビットとされるので、例えば
データJ18に代えてデータJ2が選択され、同様にデー
タJ17に代えてデータJ1が選択され、そのようなデー
タ選択により入力データJ1乃至JNの2n-1ビットのシ
フトが可能とされる。
Similarly, one word of input data J1 to JN
23. As shown in FIG. 23, a shift circuit RSFn-1 that shifts right by 2 n-1 bits has a plurality of N-channel types that are on / off controlled by the output of an inverter INR that inverts the shift control data Sn-1 *. It includes a MOSFET QJ1 and a plurality of N-channel MOSFETs QJ2 that are turned on / off by shift control data Sn-1 *. Multiple MOSFETs QJ1 with the intervention of inverter INR
And a plurality of MOSFETs QJ2 are turned on / off complementarily, and a pair of MOSFETs QJ1 and QJ2
A multiplexer for selecting the input data J1 to JN is formed by J2. That is, the shift control data Sn-
When 1 * is at the low level, the plurality of MOSFETs QJ1 are turned on and the plurality of MOSFETs QJ2 are turned off, so that the input data J1 to JN are left as they are (unshifted), and the subsequent shift circuit RSFn-2
(Through state). On the other hand, when the shift control data Sn-1 * is at a high level, a plurality of MOSFs
When the ETQJ1 is turned off and the plurality of MOSFETs QJ2 are turned on, the bits of the input data J1 to JN are shifted and then transmitted to the subsequent shift circuit RSFn-2 (shift state). Since the data shift amount in this shift circuit RSFn-1 is 2 n-1 bits, for example, data J2 is selected instead of data J18, and data J1 is similarly selected instead of data J17. By data selection, the input data J1 to JN can be shifted by 2 n-1 bits.

【0087】尚、右シフト回路群21に含まれるその他
のシフト回路は、そこでのシフト量が異なるだけで上記
と同様に構成される。
The other shift circuits included in the right shift circuit group 21 are configured in the same manner as described above except that the shift amounts there are different.

【0088】次に、入力データを4ビットとした場合の
バレルシフト回路の構成例を図26に基づいて説明す
る。
Next, a configuration example of the barrel shift circuit when the input data is 4 bits will be described with reference to FIG.

【0089】図26において、左シフト回路群20は、
シフト制御データS1がハイレベルにアサートされるこ
とによって入力データI1乃至I4の2ビットシフトを可
能とする21ビット左シフト回路LSF1と、その後段に
配置され、シフト制御データS0がハイレベルにアサー
トされることによって入力データの20=1ビットシフ
トを可能とする20ビット左シフト回路LSF0とから構
成される。また、右シフト回路群21は、上記左シフト
回路群20と同様に、入力データJ1乃至J3の1ビット
シフトを行う1ビット右シフト回路23と、上記シフト
制御データSn-1を反転するインバータIN1の出力デー
タS1*がハイレベルにアサートされることによって入
力データの2ビットシフトを可能とする21ビット右シ
フト回路RSF1と、上記シフト制御データS0を反転す
るインバータIN0の出力データS0*がハイレベルにア
サートされることによって入力データの1ビットシフト
を可能とする20ビット右シフト回路RSF0とを含む。
上記左シフト回路LSF1やLSF0、さらには右シフト
回路RSF1やRSF0は、上記と同様にシフト制御デー
タS1,S0に呼応してデータスルー状態とデータシフト
状態とを切り換えるためのゲート回路を含んで構成され
る。すなわち、左シフト回路LSF1やLSF0は図22
に示されるのと同様に、また、右シフト回路RSF1や
RSF0は図23に示されるのと同様に、それぞれシフ
ト制御データに呼応して相補的にオン/オフ制御される
複数のNチャンネル型MOSFETを含んで構成され
る。尚、図26における複数のブロックBは、図22又
は図23におけるMOSFET、若しくは相補的に動作
されるMOSFETの組み合わせによって形成されるマ
ルチプレクサとされる。
In FIG. 26, the left shift circuit group 20 includes
A shift control data S1 is 2 1 bit left shift circuit to enable 2-bit shift of the input data I1 to I4 by being asserted high level LSF1, disposed on the subsequent stage, asserts the shift control data S0 is at a high level composed of 2 0-bit left shift circuit LSF0 Prefecture to allow 2 0 = 1-bit shift of the input data by being. Similarly to the left shift circuit group 20, the right shift circuit group 21 includes a 1-bit right shift circuit 23 that shifts the input data J1 to J3 by 1 bit, and an inverter IN1 that inverts the shift control data Sn-1. output data S1 * is a 2 1-bit right shift circuit RSF1 that enables 2-bit shift input data by being asserted high level, the output data S0 * is high the inverter IN0 for inverting the shift control data S0 to enable 1-bit shift of the input data by being asserted to the level and a 2 0 bit right shift circuit RSF0.
The left shift circuits LSF1 and LSF0 and the right shift circuits RSF1 and RSF0 each include a gate circuit for switching between a data through state and a data shift state in response to the shift control data S1 and S0 as described above. Is done. That is, the left shift circuits LSF1 and LSF0 are
23, and the right shift circuits RSF1 and RSF0 are provided with a plurality of N-channel MOSFETs that are complementarily turned on / off in response to shift control data, respectively, as shown in FIG. It is comprised including. Note that the plurality of blocks B in FIG. 26 are multiplexers formed by a combination of MOSFETs in FIG. 22 or FIG. 23 or MOSFETs operated in a complementary manner.

【0090】ここで、上記1ビット右シフト回路23は
以下のように作用する。例えば図27に示されるよう
に、シフト制御データ「S1,S0」が「0,1」とされ
ることによって、入力データI1,I2,I3,I4は1ビ
ット左シフトされる場合を考えると、そのシフト結果は
上位3ビットI1,I2,I3とされる。その場合のシフ
ト制御データ「01」がインバータIN1,IN2で反転
されると、「S1*,S2*」は「1,0」となり、2ビ
ット右シフトが指示される。つまり他の入力データJ
1,J2,J3は2ビット右シフトされることにより下位
2ビットJ1,J2とされる。この状態では、I3とJ1と
が競合するため、左シフト結果と右シフト結果とを合成
して4ビット出力とすることはできない。そこで上記2
ビット右シフト結果をさらに1ビット右シフトすると、
その結果は、下位1ビットJ1とされるので上記2ワー
ドデータの4ビットシフト合成出力(図27ではI1,
I2,I3,J1)を得ることができる。そのような意味
で、本実施例のように2ワード分のデータシフト出力を
合成して1ワードシフト出力O1乃至O4を得る場合に
は、上記1ビット右シフト回路23による1ビットシフ
トが有効とされる。
Here, the 1-bit right shift circuit 23 operates as follows. For example, as shown in FIG. 27, when the shift control data "S1, S0" is set to "0, 1", the input data I1, I2, I3, I4 are shifted left by one bit. The shift result is the upper three bits I1, I2, I3. When the shift control data "01" in that case is inverted by the inverters IN1 and IN2, "S1 *, S2 *" becomes "1, 0", and a two-bit right shift is instructed. That is, other input data J
1, J2 and J3 are shifted to the right by 2 bits to be lower 2 bits J1 and J2. In this state, since I3 and J1 compete with each other, it is not possible to combine the left shift result and the right shift result into a 4-bit output. Therefore, the above 2
If the bit right shift result is further shifted right by one bit,
The result is the lower 1 bit J1, so the 4-bit shift combined output of the 2-word data (I1,
I2, I3, J1) can be obtained. In this sense, when the data shift outputs for two words are combined to obtain the one-word shift outputs O1 to O4 as in this embodiment, it is considered that the one-bit shift by the one-bit right shift circuit 23 is effective. Is done.

【0091】本実施例によれば以下の作用効果を得るこ
とができる。 (6)nを正の整数とするとき、それぞれ2i(i=
0,1,2,…,n−1)ビットのデータシフトを可能
とするn個のシフト回路としての左シフト回路LSF
0,…,LSFn-2,LSFn-1及び右シフト回路RSF
0,…,RSFn-2,RSFn-1を有することにより、n
ビットのコード化されたシフト制御データをデコードす
ることなく、直接取り込み、それに呼応して入力データ
の2nビットまでの任意ビット数のシフト動作が可能と
される。そのため、図30に示されるようなnビットの
シフト制御データSFをデコードするためのデコーダD
ECが不要とされる。 (7)上記(6)の作用効果によりシフト制御データを
デコードするためのデコーダDECが不要とされるの
で、デコーダDECでの信号遅延が排除され、それによ
り当該バレルシフト回路の動作速度の向上が可能とされ
る。また、デコーダDECを省略することによって、L
SIチップにおけるバレルシフト回路の占有面積の減少
が可能とされる。 (8)上記(7)の作用効果は、本実施例のバレルシフ
ト回路が適用されるコプロセッサにおいても得られる。 (9)本実施例のように2ワード分のデータシフト出力
を合成して1ワード分のシフト出力を得る場合、シフト
制御データに拘らず入力データの1ビットシフトを行う
1ビットシフト回路23を設けることにより、そのよう
な合成出力を適確に得ることができる。
According to this embodiment, the following functions and effects can be obtained. (6) When n is a positive integer, 2 i (i =
Left shift circuit LSF as n shift circuits enabling data shift of 0, 1, 2, ..., n-1) bits
0,..., LSFn-2, LSFn-1, and right shift circuit RSF
By having 0,..., RSFn-2, and RSFn-1, n
The bit-coded shift control data is directly fetched without decoding, and a shift operation of an arbitrary number of bits up to 2 n bits of the input data is enabled in response. Therefore, a decoder D for decoding n-bit shift control data SF as shown in FIG.
EC is not required. (7) Since the decoder DEC for decoding the shift control data is not required due to the effect of the above item (6), a signal delay in the decoder DEC is eliminated, thereby improving the operation speed of the barrel shift circuit. It is possible. Also, by omitting the decoder DEC, L
The area occupied by the barrel shift circuit in the SI chip can be reduced. (8) The effect (7) can also be obtained in a coprocessor to which the barrel shift circuit of the present embodiment is applied. (9) When the data shift outputs for two words are combined to obtain a shift output for one word as in the present embodiment, the 1-bit shift circuit 23 that shifts the input data by 1 bit regardless of the shift control data is provided. By providing such a composite output, such a combined output can be obtained accurately.

【0092】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。
Although the invention made by the present inventor has been specifically described based on the embodiment, it is needless to say that the present invention is not limited to the embodiment and can be variously modified without departing from the gist of the invention. No.

【0093】例えば、本発明に係るビットフィールド操
作演算でのデータの処理単位は32ビットのワードデー
タに限定されず、16ビット或いは64ビットなどであ
ってもよい。また、データの任意領域の抽出やデータの
任意領域の置換などのビットフィールド操作のオペレー
ションは上記実施例のディポジット命令やイクストラク
ト命令に限定されず、適宜変更可能であり、また、その
命令の名称も制限されない。
For example, the unit of data processing in the bit field operation operation according to the present invention is not limited to 32-bit word data, but may be 16 bits or 64 bits. Further, the operation of bit field operation such as extraction of an arbitrary area of data or replacement of an arbitrary area of data is not limited to the deposit instruction or the extract instruction of the above-described embodiment, and can be appropriately changed. Is not limited.

【0094】また、上記実施例(図21〜図24)では
i(i=0,1,2,…,n−1)ビットのデータシ
フトを可能とするn個のシフト回路を、Nチャンネル型
MOSFETによって形成するようにしたが、トランス
ファゲートさらにはその他の半導体素子を適用すること
もできる。また、1ビット右シフト回路23の配置箇所
は右シフト回路群21の入力初段に限定されず、例えば
右シフト回路群21の最終段など、適宜の箇所に設ける
ことができる。上記実施例では左シフト回路群及び右シ
フト回路群を含むものについて説明したが、いずれか一
方を省略することもできる。その場合において1ビット
右シフト回路23は特に必要とされない。
In the above embodiments (FIGS. 21 to 24), n shift circuits capable of shifting data of 2 i (i = 0, 1, 2,..., N−1) bits are provided by N channel Although it is formed by a type MOSFET, a transfer gate and other semiconductor elements can also be applied. The location of the 1-bit right shift circuit 23 is not limited to the first input stage of the right shift circuit group 21, but may be provided at an appropriate location such as the last stage of the right shift circuit group 21. In the above-described embodiment, an example including the left shift circuit group and the right shift circuit group has been described, but either one of them may be omitted. In that case, the 1-bit right shift circuit 23 is not particularly required.

【0095】図21〜図29の実施例を先の実施例に適
用する場合には、上記命令ユニットIUからのシフト量
を表わすデータを上記シフト制御データとして使う。こ
の場合、もちろん図5のデコーダSDECは不要とさ
れ、バレルシフタBSFT1,BSFT2のそれぞれ
に、図21〜図29に示したバレルシフタが使われる。
When the embodiment shown in FIGS. 21 to 29 is applied to the previous embodiment, data representing the shift amount from the instruction unit IU is used as the shift control data. In this case, the decoder SDEC of FIG. 5 is not required, and the barrel shifters shown in FIGS. 21 to 29 are used for the barrel shifters BSFT1 and BSFT2, respectively.

【0096】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるRIS
Cプロセッサ,コプロセッサに適用した場合について説
明したが、本発明はそれに限定されず、CISC形式の
プロセッサや論理LSIなどにも広く適用することがで
きる。
In the above description, the invention made mainly by the present inventor is described in the field of application RIS, which is the background of the application.
Although the case where the present invention is applied to the C processor and the coprocessor has been described, the present invention is not limited thereto, and can be widely applied to a CISC type processor, a logic LSI, and the like.

【0097】[0097]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。
The effects obtained by typical ones of the inventions disclosed in the present application will be briefly described as follows.

【0098】すなわち、入力データのバレルシフト並び
にマスクデータ生成用の夫々にバレルシフタを採用し、
且つ、双方のバレルシフタのシフト量を相互に同一にし
て、ビットフィールド操作可能な演算装置を構成するこ
とにより、データの任意領域抽出やデータの任意領域置
換などのビットフィールド操作のための演算装置の高機
能化並びに演算速度の高速化に寄与するという効果があ
る。
That is, a barrel shifter is used for barrel shift of input data and mask data generation, respectively.
In addition, by making the shift amounts of both barrel shifters the same as each other and configuring an arithmetic device capable of operating a bit field, an arithmetic device for operating a bit field such as extraction of an arbitrary region of data or replacement of an arbitrary region of data can be realized. This has the effect of contributing to higher functionality and higher calculation speed.

【0099】前記2組のバレルシフタの夫々のトランジ
スタ列を1列づつ対にして、レジスタファイルの1ビッ
ト分の記憶セルの幅に合わせて折り重ねるようにレイア
ウトすることにより、ビットフィールド操作演算の為の
演算装置のチップ占有面積を低減することができるとい
う効果がある。
By laying out the transistor rows of the two sets of barrel shifters in pairs one by one and folding them in accordance with the width of the storage cell for one bit of the register file, a bit field operation operation is performed. This has the effect that the chip occupation area of the arithmetic device can be reduced.

【0100】第1バレルシフタによる入力データのデー
タシフトに並行して、符号拡張回路で符号拡張し、夫々
の処理結果を選択して算術シフトを行うことにより、デ
ータの任意領域を抽出する演算速度を高速化することが
できるという効果がある。
In parallel with the data shift of the input data by the first barrel shifter, sign extension is performed by a sign extension circuit, each processing result is selected and arithmetic shift is performed, thereby reducing an operation speed for extracting an arbitrary area of data. There is an effect that the speed can be increased.

【0101】マスクビットを用いてデコード結果を得る
論理を採用することにより、入力を相補レベルの信号に
変換する回路を不要とし、デコーダの回路規模若しくは
チップ占有面積を低減することができる。
By employing a logic for obtaining a decoding result using mask bits, a circuit for converting an input into a signal of a complementary level is not required, and the circuit scale or chip occupation area of the decoder can be reduced.

【0102】また、nを正の整数とするとき、それぞれ
i(i=0,1,2,…,n−1)ビットのデータシ
フトを可能とするn個のシフト回路を含むことにより、
nビットのシフト制御データに呼応して入力データのN
=2nビットまでの任意ビット数シフト動作が可能とさ
れるので、nビットのシフト制御データをデコードする
ためのデコーダが不要とされ、これにより、バレルシフ
ト回路の動作速度の向上や、LSIチップにおけるバレ
ルシフト回路の占有面積の減少を可能にすることができ
る。
When n is a positive integer, by including n shift circuits capable of shifting data by 2 i (i = 0, 1, 2,..., N−1) bits,
N of the input data in response to the n-bit shift control data
= 2n bits, so that a decoder for decoding n-bit shift control data is not required, thereby improving the operation speed of the barrel shift circuit and improving the performance of the LSI chip. The area occupied by the barrel shift circuit can be reduced.

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

【図1】図1は本発明が適用されたプロセッサの一実施
例のチップ平面図である。
FIG. 1 is a chip plan view of an embodiment of a processor to which the present invention is applied.

【図2】図2は整数演算ユニットの一例を示すブロック
図である。
FIG. 2 is a block diagram illustrating an example of an integer operation unit.

【図3】図3はデータの任意領域を別データの任意領域
に置換するオペレーションを本実施例のビットフィール
ド操作演算装置を用いて行う場合とそうでない場合とを
比較した命令ステップの説明図である。
FIG. 3 is an explanatory diagram of instruction steps in which an operation of replacing an arbitrary area of data with an arbitrary area of another data is performed using the bit-field manipulation operation device of the present embodiment and a case where the operation is not performed; is there.

【図4】図4はプロセッサを用いたグラフィック処理シ
ステムの一例を示すブロック図である。
FIG. 4 is a block diagram showing an example of a graphic processing system using a processor.

【図5】図5はビットフィールド操作演算装置の一実施
例のブロック図である。
FIG. 5 is a block diagram of one embodiment of a bit field manipulation operation device.

【図6】図6はマスクデータ生成回路の一例を示す説明
図である。
FIG. 6 is an explanatory diagram illustrating an example of a mask data generation circuit.

【図7】図7はイクストラクト命令で行われる2通りの
場合の符号拡張処理の説明図である。
FIG. 7 is an explanatory diagram of sign extension processing in two cases performed by an extract instruction.

【図8】図8はイクストラクト命令における入力データ
のバレルシフトと入力データの第0ビット符号拡張との
並行処理の説明図である。
FIG. 8 is an explanatory diagram of parallel processing of barrel shift of input data and 0th bit sign extension of input data in an extract instruction.

【図9】図9はイクストラクト命令実行に際しての図8
の続きの処理を示す説明図である。
FIG. 9 is a diagram showing FIG. 8 when executing an extract instruction;
It is explanatory drawing which shows the process following [of].

【図10】図10は図8に示される入力データに対する
第0ビット符号拡張処理とバレルシフト処理とを従属的
若しくは直列的に処理する場合の説明図である。
FIG. 10 is an explanatory diagram of a case in which a 0th bit code extension process and a barrel shift process for the input data shown in FIG. 8 are dependently or serially performed;

【図11】図11は第1及び第2バレルシフタの一例を
示す回路図である。
FIG. 11 is a circuit diagram illustrating an example of first and second barrel shifters.

【図12】図12は図11に示される双方のバレルシフ
タから第1バレルシフタの回路構成を抜き出した説明図
である。
FIG. 12 is an explanatory diagram showing a circuit configuration of a first barrel shifter extracted from both barrel shifters shown in FIG. 11;

【図13】図13は図11に示される双方のバレルシフ
タから第2バレルシフタの回路構成を抜き出した説明図
である。
FIG. 13 is an explanatory diagram showing a circuit configuration of a second barrel shifter extracted from both barrel shifters shown in FIG. 11;

【図14】図14は図12及び図13に示される回路を
夫々別々にレイアウトするときにその領域の高さ寸法を
小さくしたと仮定したときの横方向寸法の拡大を説明す
る図面である。
FIG. 14 is a view for explaining an enlargement of a horizontal dimension when it is assumed that a height dimension of a region is reduced when separately laying out the circuits shown in FIGS. 12 and 13;

【図15】図15はマスク実行回路から出力されるデー
タに対する符号拡張のための符号ビットの位置を抽出す
るためのデコーダの一実施例を示すブロック図である。
FIG. 15 is a block diagram showing an embodiment of a decoder for extracting the position of a code bit for sign extension with respect to data output from a mask execution circuit.

【図16】図16はイクストラクト命令の基本的なオペ
レーションの説明図である。
FIG. 16 is an explanatory diagram of a basic operation of an extract instruction.

【図17】図17はディポジット命令の基本的なオペレ
ーションを説明する図である。
FIG. 17 is a diagram illustrating a basic operation of a deposit instruction.

【図18】図18は減算器を利用するマスクデータ生成
回路の説明図である。
FIG. 18 is an explanatory diagram of a mask data generation circuit using a subtractor.

【図19】図19はイクストラクト命令及びディポジッ
ト命令のフォーマットを示す図である。
FIG. 19 is a diagram showing a format of an extract instruction and a deposit instruction.

【図20】図20は図5の拡張回路の一実施例を示すブ
ロック図である。
FIG. 20 is a block diagram showing one embodiment of the extension circuit of FIG. 5;

【図21】図21はバレルシフト回路の他の実施例を示
すブロック図である。
FIG. 21 is a block diagram showing another embodiment of the barrel shift circuit.

【図22】図22は図21のバレルシフト回路に含まれ
る左シフト回路の構成例を示す回路図である。
FIG. 22 is a circuit diagram showing a configuration example of a left shift circuit included in the barrel shift circuit of FIG. 21;

【図23】図23は図21のバレルシフト回路に含まれ
る右シフト回路の構成例を示す回路図である。
FIG. 23 is a circuit diagram showing a configuration example of a right shift circuit included in the barrel shift circuit of FIG. 21;

【図24】図24は入力データの左シフトを説明するた
めの図である。
FIG. 24 is a diagram for explaining left shift of input data.

【図25】図25は入力データの右シフトを説明するた
めの図である。
FIG. 25 is a diagram for explaining right shift of input data;

【図26】図26はシフト対象データを4ビットとした
場合の図21のバレルシフト回路の構成を示すブロック
である。
FIG. 26 is a block diagram showing the configuration of the barrel shift circuit of FIG. 21 when the shift target data is 4 bits.

【図27】図27は左シフト出力と右シフト出力との合
成についての説明図である。
FIG. 27 is an explanatory diagram of combining left shift output and right shift output.

【図28】図28は実施例のバレルシフト回路が含まれ
るコプロセッサの構成を示すブロック図である。
FIG. 28 is a block diagram illustrating a configuration of a coprocessor including a barrel shift circuit according to an embodiment;

【図29】図29は上記コプロセッサに含まれる実行ユ
ニットの構成を示すブロック図である。
FIG. 29 is a block diagram showing a configuration of an execution unit included in the coprocessor.

【図30】図30は従来のバレルシフタ回路の回路図で
ある。
FIG. 30 is a circuit diagram of a conventional barrel shifter circuit.

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

MCU プロセッサ EU 整数演算ユニット SMU ビットフィールド操作演算装置 REGF レジスタファイル BSFT1 第1バレルシフタ BSFT2 第2バレルシフタ SDEC シフトデコーダ MASKG マスクデータ生成回路 MBG マスクビット生成回路 MASKD1 第1マスクデータ MASKD2 第2マスクデータ EXT1 拡張回路 EXT2 第0ビット符号拡張回路 MASKE マスク実行回路 LGC 論理ゲート回路 EOR 排他的論理和回路 m1−in0 第2バレルシフタの下位側入力信号線 m2−in0 第2バレルシフタの上位側入力信号線 m−out0 第2バレルシフタの出力信号線 d1−in0 第1バレルシフタの下位側入力信号線 d2−in0 第1バレルシフタの上位側入力信号線 d−out0 第1バレルシフタの出力信号線 shift0 第1バレルシフタ及び第2バレルシフタ
のシフト量制御線 1 コプロセッサ 2 バスインタフェース 3 実行ユニット 4 マイクロROM 5 コントローラ 7 マイクロ命令デコーダ 9 RAM 10 RAM 11 算術論理演算装置 12 シフト演算装置 13 テンポラリレジスタ 20 左シフト回路群 21 右シフト回路群 23 1ビット右シフト回路群 LSFN-1 2n-1ビット左シフト回路 LSFN-2 2n-2ビット左シフト回路 LSF0 20ビット左シフト回路 RSFN-1 2n-1ビット右シフト回路 RSFN-2 2n-2ビット右シフト回路 RSF0 20ビット右シフト回路
MCU Processor EU Integer operation unit SMU Bit field operation operation device REGF Register file BSFT1 First barrel shifter BSFT2 Second barrel shifter SDEC Shift decoder MASKG Mask data generation circuit MBG Mask bit generation circuit MASKD1 First mask data MASKD2 Second mask data EXT1 Extension circuit 0th bit sign extension circuit MASKE mask execution circuit LGC logic gate circuit EOR exclusive OR circuit m1-in0 Lower input signal line of second barrel shifter m2-in0 Upper input signal line of second barrel shifter m-out0 Second barrel shifter Output signal line d1-in0 Lower-side input signal line of first barrel shifter d2-in0 Upper-side input signal line of first barrel shifter d-out0 First barrel Shifter output signal line shift0 Shift amount control line of first barrel shifter and second barrel shifter 1 Coprocessor 2 Bus interface 3 Execution unit 4 Micro ROM 5 Controller 7 Micro instruction decoder 9 RAM 10 RAM 11 Arithmetic logic operation device 12 Shift operation device 13 Temporary register 20 Left shift circuit group 21 Right shift circuit group 23 1-bit right shift circuit group LSFN-1 2 n-1 bit left shift circuit LSFN-2 2 n-2 bit left shift circuit LSF0 20 0 bit left shift circuit RSFN- 1 2 n-1 bit right shift circuit RSFN-2 2 n-2 bit right shift circuit RSF0 2 0 bit right shift circuit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭58−40665(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 5/01 G06F 7/00 H01L 27/10 ──────────────────────────────────────────────────続 き Continuation of front page (56) References JP-A-58-40665 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 5/01 G06F 7/00 H01L 27 / Ten

Claims (10)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のマスクビットを含む所定のデータ
を供給するデータ供給手段と、 シフトするべきシフト量を示すシフト制御信号を供給す
る制御手段と、 上記制御手段に結合され、上記シフト量に従って、入力
データのビットをシフトし、複数の入力ビットを含む前
記シフトされた入力データを出力する第1のバレルシフ
タと、 上記制御手段に結合され、上記シフト量に従って、制御
データのビットをシフトし、複数の制御ビットを含むマ
スクデータを出力し、上記複数の制御ビットの夫々は、
上記複数の入力ビットの夫々に対応し、対応する入力ビ
ットがマスクされるべきビットであるか否かを示すもの
である第2のバレルシフタと、 上記第1のバレルシフタ、上記第2のバレルシフタ及び
上記データ供給手段に結合され、上記第2のバレルシフ
タからのマスクデータによってマスクされるべきビット
として示された入力ビットの代わりに上記マスクビット
を選択的に供給する供給手段と、 夫々が入力信号を出力する出力端子を有する複数の入力
データ供給回路と、 夫々が制御信号を出力する出力端子を有する複数の制御
データ供給回路と、を含み、半導体基板上に形成された
ビットフィールド操作演算装置であって、 上記第1のバレルシフタは、上記シフトとされた入力デ
ータを出力する複数の出力端子、上記複数の入力データ
供給回路の出力端子の夫々に結合された複数の入力端
子、及び第1のマトリクスを含み、上記第1のマトリク
スは、行列に配置された複数の第1絶縁ゲート型電界効
果トランジスタを含み、上記第1のマトリクスの内の複
数の列の夫々は、上記複数の出力端子の内の少なくとも
一つと、上記複数の入力端子の内の少なくとも一つと、
上記少なくとも一つの出力端子と上記少なくとも一つの
入力端子との間に結合された少なくとも一つの第1絶縁
ゲート型電界効果トランジスタを含み、上記第1のマト
リクスの内の複数の行の夫々は、夫々のゲートが共通に
シフト制御配線に結合され、結合された上記シフト制御
配線を介して上記シフト制御信号の内の一つが供給され
る複数の第1絶縁ゲート型電界効果トランジスタを含
み、 上記第2バレルシフタは、上記マスクデータを出力する
複数の出力端子、上記複数の制御データ供給回路の出力
端子の夫々に結合された複数の入力端子、及び第2のマ
トリクスを含み、上記第2のマトリクスは、行列に配置
された複数の第2絶縁ゲート型電界効果トランジスタを
含み、上記第2のマトリクスの内の複数の列の夫々は、
上記複数の出力端子の内の少なくとも一つと、上記複数
の入力端子の内の少なくとも一つと、上記少なくとも一
つの出力端子と上記少なくとも一つの入力端子との間に
結合された少なくとも一つの第2絶縁ゲート型電界効果
トランジスタを含み、上記第2のマトリクスの内の複数
の行の夫々は、夫々のゲートが共通に上記シフト制御配
線に結合され、結合された上記シフト制御配線を介して
上記シフト制御信号の内の一つが供給される複数の第2
絶縁ゲート型電界効果トランジスタを含み、 上記第1のバレルシフタの第1絶縁ゲート型電界効果ト
ランジスタの列と上記第2のバレルシフタの第2絶縁ゲ
ート型電界効果トランジスタの列は交互に並列配置され
て成るものであることを特徴とするビットフィールド操
作演算装置。
A data supply unit for supplying predetermined data including a plurality of mask bits; a control unit for supplying a shift control signal indicating a shift amount to be shifted; and a control unit coupled to the control unit. A first barrel shifter that shifts bits of input data and outputs the shifted input data including a plurality of input bits, and is coupled to the control unit, and shifts bits of control data according to the shift amount; Outputting mask data including a plurality of control bits, and each of the plurality of control bits is
A second barrel shifter corresponding to each of the plurality of input bits and indicating whether the corresponding input bit is a bit to be masked, the first barrel shifter, the second barrel shifter and the second barrel shifter. Supply means coupled to data supply means for selectively supplying the mask bits instead of input bits indicated as bits to be masked by the mask data from the second barrel shifter, each of which outputs an input signal; And a plurality of control data supply circuits each having an output terminal for outputting a control signal, and a plurality of control data supply circuits each having an output terminal for outputting a control signal. The first barrel shifter includes a plurality of output terminals for outputting the shifted input data, and a plurality of the input data. A plurality of input terminals coupled to each of the output terminals of the supply circuit; and a first matrix, wherein the first matrix includes a plurality of first insulated gate field effect transistors arranged in a matrix. Each of the plurality of columns in the first matrix has at least one of the plurality of output terminals and at least one of the plurality of input terminals,
And at least one first insulated gate field effect transistor coupled between the at least one output terminal and the at least one input terminal, wherein each of a plurality of rows in the first matrix is A plurality of first insulated gate field effect transistors, the gates of which are coupled to a shift control line in common, and one of the shift control signals is supplied via the coupled shift control line. The barrel shifter includes a plurality of output terminals for outputting the mask data, a plurality of input terminals coupled to respective output terminals of the plurality of control data supply circuits, and a second matrix, wherein the second matrix includes: A plurality of second insulated gate field effect transistors arranged in a matrix, wherein each of a plurality of columns in the second matrix comprises:
At least one of the plurality of output terminals, at least one of the plurality of input terminals, and at least one second insulation coupled between the at least one output terminal and the at least one input terminal. Each of the plurality of rows in the second matrix includes a gate type field effect transistor, and each of the plurality of rows is coupled to the shift control line in common, and the shift control line is coupled via the coupled shift control line. A plurality of second signals supplied with one of the signals
A row of first insulated gate field effect transistors of the first barrel shifter and a row of second insulated gate field effect transistors of the second barrel shifter are alternately arranged in parallel. A bit-field manipulation operation device, characterized in that:
【請求項2】 上記制御手段は、上記シフト制御信号と
して、上記第1のバレルシフタ及び上記第2のバレルシ
フタにデコード信号を供給するデコーダを含むことを特
徴とする請求項1記載のビットフィールド操作演算装
置。
2. The bit field operation operation according to claim 1, wherein said control means includes a decoder for supplying a decode signal to said first barrel shifter and said second barrel shifter as said shift control signal. apparatus.
【請求項3】 上記第1のマトリクスの列の一つは、第
2マトリクスの列の一つが配置された第2領域に近接し
た第1領域に配置され、 上記複数の入力データ供給回路の一つは、上記第1領域
及び上記第2領域に近接した第3領域に配置され、第1
の方向における上記第3領域のサイズが、上記第1の方
向における上記第1及び第2領域のサイズと実質的に等
しいことを特徴とする請求項1記載のビットフィールド
操作演算装置。
3. One of the columns of the first matrix is arranged in a first area adjacent to a second area in which one of the columns of the second matrix is arranged. One is disposed in a third region adjacent to the first region and the second region,
2. The bit field operation and operation device according to claim 1, wherein the size of the third region in the direction of (b) is substantially equal to the size of the first and second regions in the first direction.
【請求項4】 上記制御回路は、上記第1及び第2のマ
トリクスのシフト制御配線に結合された複数の出力端子
を有するデコーダを含み、上記デコーダは、上記シフト
制御信号として、上記シフト制御配線へデコード信号を
供給するものであることを特徴とする請求項3記載のビ
ットフィールド操作演算装置。
4. The control circuit includes a decoder having a plurality of output terminals coupled to shift control lines of the first and second matrices, wherein the decoder outputs the shift control signal as the shift control signal. 4. A bit field operation and operation device according to claim 3, wherein a decoding signal is supplied to the bit field operation device.
【請求項5】 半導体基板に形成され、ビットフィール
ド命令に応答して、ビットフィールド演算を実行するマ
イクロプロセッサであって、 命令に応答して制御信号を形成する制御手段と、 内部バスと、 上記内部バスに結合された複数のレジスタと、 上記内部バスと上記制御手段に結合され、上記ビットフ
ィールド命令に従って、ビットフィールド演算を実行す
るビットフィールド操作演算装置とを含み、 上記ビットフィールド操作演算装置は、 上記内部バスに結合され、上記ビットフィールド命令に
従って、複数のマスクビットを有する所定のデータを供
給するデータ供給手段と、 上記ビットフィールド命令に応答して、シフトされるべ
きシフト量を示すデコード信号を供給するシフト量指示
手段と、 夫々が出力端子を有する複数の選択回路を含み、上記制
御信号の内の所定の信号に応答して、データを選択的に
上記内部バスから入力する選択手段と、 上記選択手段及び上記シフト量指示手段に結合され、上
記シフト量指示手段によって指示されたシフト量に従っ
て、上記選択手段からの出力データをシフトし、複数の
入力ビットを含むシフトされたデータを出力する第1の
バレルシフタと、 上記ビットフィールド命令に従ってマスク制御データを
形成するマスク制御データ形成手段と、 上記マスク制御データ形成手段及び上記シフト量指示手
段に結合され、上記シフト量指示手段によって指示され
たシフト量に従って、上記マスク制御データをシフト
し、複数のマスク制御ビットを有するシフトされたマス
ク制御データを出力する第2のバレルシフタと、 上記第1のバレルシフタ、上記第2のバレルシフタ及び
上記データ供給手段に結合され、上記第2のバレルシフ
タからのマスク制御ビットによってマスクされるべきビ
ットとして示された入力ビットの代わりに、上記マスク
ビットを供給する供給手段と、を含み、 上記複数のマスク制御ビットの夫々は、上記複数の入力
ビットの夫々に対応し、対応する入力ビットがマスクさ
れるべきビットであるか否かを示し、 上記マスク制御データ形成手段は、夫々が出力端子を有
する複数の制御データ供給回路を含み、 上記第1のバレルシフタは、上記シフトとされた入力デ
ータを出力する複数の出力端子、上記複数の選択回路の
出力端子に結合された複数の入力端子、及び第1のマト
リクスを含み、上記第1のマトリクスは、行列に配置さ
れた複数の第1絶縁ゲート型電界効果トランジスタを含
み、上記第1のマトリクスの夫々の行は、上記出力端子
の内の少なくとも一つと、上記入力端子の内の少なくと
も一つと、上記少なくとも一つの出力端子と上記少なく
とも一つの入力端子との間に結合された少なくとも一つ
の第1絶縁ゲート型電界効果トランジスタを含み、上記
第1のマトリクスの夫々の列は、そのゲートにシフト制
御配線が結合され、該シフト制御配線を介して上記デコ
ード信号の一つが共通に供給される複数の第1絶縁ゲー
ト型電界効果トランジスタを含み、 上記第2バレルシフタは、上記シフトされたマスク制御
データを出力する複数の出力端子、上記複数の制御デー
タ供給回路の出力端子に結合された複数の入力端子、及
び第2のマトリクスを含み、上記第2のマトリクスは、
行列に配置された複数の第2絶縁ゲート型電界効果トラ
ンジスタを含み、上記第2のマトリクスの夫々の行は、
上記出力端子の内の少なくとも一つと、上記複数の入力
端子の内の少なくとも一つと、上記少なくとも一つの出
力端子と上記少なくとも一つの入力端子との間に結合さ
れた少なくとも一つの第2絶縁ゲート型電界効果トラン
ジスタを含み、上記第2のマトリクスの夫々の列は、そ
のゲートに上記シフト制御配線が結合され、該シフト制
御配線を介して、上記一つのデコード信号が供給される
複数の第2絶縁ゲート型電界効果トランジスタを含むも
のであることをとを特徴とするマイクロプロセッサ。
5. A microprocessor formed on a semiconductor substrate and executing a bit field operation in response to a bit field instruction, control means for forming a control signal in response to the instruction, an internal bus, A plurality of registers coupled to an internal bus; and a bit field operation / operation device coupled to the internal bus and the control means for executing a bit field operation in accordance with the bit field instruction. Data supply means coupled to the internal bus for supplying predetermined data having a plurality of mask bits according to the bit field instruction; and a decode signal indicating a shift amount to be shifted in response to the bit field instruction Means for instructing the shift amount for supplying A selecting means for selectively inputting data from the internal bus in response to a predetermined signal among the control signals; and a shift amount indicating means coupled to the selecting means and the shift amount indicating means. A first barrel shifter for shifting output data from the selection means according to the shift amount specified by the means and outputting shifted data including a plurality of input bits; and forming mask control data according to the bit field instruction. Mask control data forming means, coupled to the mask control data forming means and the shift amount indicating means, for shifting the mask control data according to the shift amount specified by the shift amount indicating means, and A second barrel shifter for outputting the shifted mask control data, Supply means coupled to the shifter, the second barrel shifter and the data supply means for supplying the mask bits instead of the input bits to be masked by mask control bits from the second barrel shifter; Wherein each of the plurality of mask control bits corresponds to each of the plurality of input bits and indicates whether or not the corresponding input bit is a bit to be masked. Includes a plurality of control data supply circuits each having an output terminal, wherein the first barrel shifter is coupled to a plurality of output terminals for outputting the shifted input data and an output terminal of the plurality of selection circuits. A plurality of input terminals, and a first matrix, wherein the first matrix includes a plurality of first insulating gates arranged in a matrix. Wherein each row of the first matrix includes at least one of the output terminals, at least one of the input terminals, the at least one output terminal, and the at least one input terminal. A first insulated gate field effect transistor coupled between the first matrix and each of the first matrixes, wherein each column of the first matrix has a shift control line coupled to its gate and is connected via the shift control line. A plurality of first insulated gate field effect transistors to which one of the decode signals is commonly supplied, the second barrel shifter includes a plurality of output terminals for outputting the shifted mask control data, and the plurality of control data. A plurality of input terminals coupled to an output terminal of the supply circuit, and a second matrix, wherein the second matrix comprises:
A plurality of second insulated gate field effect transistors arranged in a matrix, wherein each row of the second matrix comprises:
At least one of the output terminals, at least one of the plurality of input terminals, and at least one second insulated gate type coupled between the at least one output terminal and the at least one input terminal; Each of the columns of the second matrix, including a field effect transistor, includes a plurality of second insulating layers, the gates of which are connected to the shift control lines, to which the one decode signal is supplied via the shift control lines. A microprocessor including a gate type field effect transistor.
【請求項6】 上記第1のマトリクスの行の一つは、第
2マトリクスの行の一つが配置された第2領域に近接し
た第1領域に配置され、 上記複数の入力データ供給回路の一つと、上記複数の制
御データ供給回路の一つは、上記第1領域及び上記第2
領域に近接した第3領域に配置され、第1の方向におけ
る上記第3領域のサイズが、上記第1の方向における上
記第1及び第2領域のサイズと実質的に等しいことを特
徴とする請求項5記載のマイクロプロセッサ。
6. One of the rows of the first matrix is arranged in a first area adjacent to a second area in which one of the rows of the second matrix is arranged. In addition, one of the plurality of control data supply circuits includes the first area and the second area.
A third area adjacent to the area, wherein a size of the third area in a first direction is substantially equal to a size of the first and second areas in the first direction. Item 7. The microprocessor according to Item 5.
【請求項7】 上記ビットフィールド命令は、上記レジ
スタの一つを指示するための第1フィールドと、レジス
タ或いは上記ビットフィールド命令内の第3フィールド
を指示するための第2フィールドを含み、上記第1フィ
ールドによって指示されたものの内容は、上記選択手段
に供給され、上記第2フィールドによって指示されたも
のの内容は、上記デコード信号を形成するために、上記
デコーダに供給されるものであることを特徴とする請求
項5記載のマイクロプロセッサ。
7. The bit field instruction includes a first field for indicating one of the registers and a second field for indicating a register or a third field in the bit field instruction. The contents specified by one field are supplied to the selection means, and the contents specified by the second field are supplied to the decoder to form the decode signal. The microprocessor according to claim 5, wherein
【請求項8】 複数のマスクビットを含む所定のデータ
を供給するマスクデータ供給回路と、 シフトするべきシフト量を示すデコード信号を出力する
デコーダと、 上記デコード信号によって指示されたシフト量に従っ
て、入力データのビットをシフトし、複数の入力ビット
を含む前記シフトされた入力データを出力する第1のバ
レルシフタと、 上記デコード信号によって指示されたシフト量に従っ
て、制御データのビットをシフトし、複数の制御ビット
を含むシフトされた制御データを出力する第2のバレル
シフタと、 上記第1のバレルシフタ、上記第2のバレルシフタ及び
上記マスクデータ供給回路に結合され、上記第2のバレ
ルシフタからの制御ビットによってマスクされるべきビ
ットとして示された入力ビットの代わりにマスクビット
を選択するセレクタと、 夫々が上記入力データの内のビットを出力する出力ノー
ドを有する複数の入力データ供給回路と、 夫々が上記制御データの内のビットを出力する出力ノー
ドを有する複数の制御データ供給回路と、 上記デコーダに結合され、上記デコーダから上記デコー
ド信号が供給される複数の信号配線を含み、半導体基板
上に形成されたビットフィールド操作演算装置であっ
て、 上記第1のバレルシフタは、絶縁ゲート型電界効果トラ
ンジスタが配列された複数の行を含み、夫々の行は、上
記入力回路の出力ノードに結合された入力端子、上記セ
レクタに結合された出力端子、上記入力端子と上記出力
端子との間に結合された第1の絶縁ゲート型電界効果ト
ランジスタ、及び上記出力端子とは異なる行における入
力端子との間に結合された第2の絶縁ゲート型電界効果
トランジスタを含み、 上記第2バレルシフタは、絶縁ゲート型電界効果トラン
ジスタが配列された複数の行を含み、夫々の行は、上記
制御データ回路の出力ノードに結合された入力端子、上
記セレクタに結合された出力端子、上記入力端子と上記
出力端子との間に結合された第3の絶縁ゲート型電界効
果トランジスタ、及び上記出力端子とは異なる行におけ
る入力端子との間に結合された第4の絶縁ゲート型電界
効果トランジスタを含み、 上記信号配線は、上記第1の絶縁ゲート型電界効果トラ
ンジスタのゲート、上記第2の絶縁ゲート型電界効果ト
ランジスタのゲート、上記第3の絶縁ゲート型電界効果
トランジスタのゲート及び上記第4の絶縁ゲート型電界
効果トランジスタのゲートに結合され、 上記第1のバレルシフタの夫々の行と第2のバレルシフ
タの夫々の行は、上記入力データ回路又は制御データ回
路によって要求される回路構成領域幅において交互に並
列に配置されて成るものであることを特徴とするビット
フィールド操作演算装置。
8. A mask data supply circuit for supplying predetermined data including a plurality of mask bits, a decoder for outputting a decode signal indicating a shift amount to be shifted, and an input according to a shift amount indicated by the decode signal. A first barrel shifter that shifts bits of data and outputs the shifted input data including a plurality of input bits; and shifts bits of control data according to a shift amount indicated by the decode signal. A second barrel shifter for outputting shifted control data including bits, coupled to the first barrel shifter, the second barrel shifter, and the mask data supply circuit, and masked by a control bit from the second barrel shifter Mask bits instead of the input bits shown as A plurality of input data supply circuits each having an output node for outputting a bit of the input data; and a plurality of control data each having an output node for outputting a bit of the control data. A bit field manipulation operation device formed on a semiconductor substrate, comprising: a supply circuit; and a plurality of signal lines coupled to the decoder and supplied with the decode signal from the decoder, wherein the first barrel shifter comprises: A plurality of rows in which insulated gate field effect transistors are arranged, each row including an input terminal coupled to an output node of the input circuit, an output terminal coupled to the selector, the input terminal and the output terminal Between the first insulated gate field effect transistor coupled to the input terminal in a row different from the output terminal A second insulated gate field effect transistor coupled to the control data circuit, wherein the second barrel shifter includes a plurality of rows in which the insulated gate field effect transistors are arranged, each row being connected to an output node of the control data circuit. A coupled input terminal, an output terminal coupled to the selector, a third insulated gate field effect transistor coupled between the input terminal and the output terminal, and an input terminal in a different row than the output terminal A fourth insulated gate field effect transistor coupled between the first and second insulated gate field effect transistors; a gate of the second insulated gate field effect transistor; a gate of the second insulated gate field effect transistor; Coupled to the gate of the third insulated gate field effect transistor and the gate of the fourth insulated gate field effect transistor Each row of the first barrel shifter and each row of the second barrel shifter are alternately arranged in parallel in a circuit configuration area width required by the input data circuit or the control data circuit. Characteristic bit-field operation arithmetic unit.
【請求項9】 複数の行における第1の絶縁ゲート型電
界効果トランジスタのゲートと複数の行における第3の
絶縁ゲート型電界効果トランジスタのゲートは上記信号
配線の一つに共通に結合され、複数の行における第2の
絶縁ゲート型トランジスタのゲートと複数の行における
第4の絶縁ゲート型トランジスタのゲートは上記信号配
線の一つに共通に結合されて成るものであることを特徴
とする請求項8記載のビットフィールド操作演算装置。
9. A gate of a first insulated gate field effect transistor in a plurality of rows and a gate of a third insulated gate field effect transistor in a plurality of rows are commonly coupled to one of the signal lines. The gate of a second insulated gate transistor in a row and a gate of a fourth insulated gate transistor in a plurality of rows are commonly connected to one of the signal lines. 8. The bit-field operation / operation device according to item 8.
【請求項10】 上記複数の入力データ供給回路の夫々
は、単位レジスタと単位セレクタを含み、上記複数の制
御データ供給回路の夫々は、単位レジスタと、単位セレ
クタを含むことを特徴とする請求項8記載のビットフィ
ールド操作演算装置。
10. The system according to claim 1, wherein each of the plurality of input data supply circuits includes a unit register and a unit selector, and each of the plurality of control data supply circuits includes a unit register and a unit selector. 8. The bit-field operation / operation device according to item 8.
JP13795792A 1991-05-08 1992-04-30 Bit field operation processing device and microprocessor Expired - Fee Related JP3247724B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13795792A JP3247724B2 (en) 1991-05-08 1992-04-30 Bit field operation processing device and microprocessor

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP13203991 1991-05-08
JP3-139574 1991-05-15
JP3-132039 1991-05-15
JP13957491 1991-05-15
JP13795792A JP3247724B2 (en) 1991-05-08 1992-04-30 Bit field operation processing device and microprocessor

Publications (2)

Publication Number Publication Date
JPH05150942A JPH05150942A (en) 1993-06-18
JP3247724B2 true JP3247724B2 (en) 2002-01-21

Family

ID=27316418

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13795792A Expired - Fee Related JP3247724B2 (en) 1991-05-08 1992-04-30 Bit field operation processing device and microprocessor

Country Status (1)

Country Link
JP (1) JP3247724B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3433588B2 (en) * 1995-10-19 2003-08-04 株式会社デンソー Mask data generation circuit and bit field operation circuit
US9003170B2 (en) 2009-12-22 2015-04-07 Intel Corporation Bit range isolation instructions, methods, and apparatus
JP6808475B2 (en) * 2016-12-22 2021-01-06 ラピスセミコンダクタ株式会社 Semiconductor storage device

Also Published As

Publication number Publication date
JPH05150942A (en) 1993-06-18

Similar Documents

Publication Publication Date Title
KR100262438B1 (en) Operation apparatus and bit field operating system method using operation apparatus
US5218564A (en) Layout efficient 32-bit shifter/register with 16-bit interface
EP0011374B1 (en) Execution unit for data processor using segmented bus structure
JP3954171B2 (en) How to fill a vector with scalar values on a computer
JP2554050B2 (en) Data processing method
US4225934A (en) Multifunctional arithmetic and logic unit in semiconductor integrated circuit
JPH0844880A (en) Cpu containing integrated graphics function
JPH07271969A (en) Device conductiong storage in memory with condition attachedfrom registor pair
JPH087083A (en) Three-input arithmetic and logic unit for formation of arithmetic and logic mixed combination
JPH0570180B2 (en)
US5771363A (en) Single-chip microcomputer having an expandable address area
JPS63100538A (en) Logical array for generating a plurality of control signals
US5363322A (en) Data processor with an integer multiplication function on a fractional multiplier
JPS6014338A (en) Branch mechanism for computer system
JP3247724B2 (en) Bit field operation processing device and microprocessor
JP3202108B2 (en) Processor using pipeline processing
JP4989899B2 (en) Semiconductor processing unit
JP2003099250A (en) Register readout circuit and microprocessor
EP0232797B1 (en) Pseudo-microprogramming in microprocessor with compressed control rom and with strip layout of busses, alu and registers
JPH0324677A (en) Cpu core
US7246218B2 (en) Systems for increasing register addressing space in instruction-width limited processors
JPS63293638A (en) Data processing system
JP2543589B2 (en) Data processing device
JPH0535472A (en) Microcomputer
JP2005322198A (en) Data processor

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: 20011023

LAPS Cancellation because of no payment of annual fees