JP3125436B2 - Bit offset calculator - Google Patents

Bit offset calculator

Info

Publication number
JP3125436B2
JP3125436B2 JP04125844A JP12584492A JP3125436B2 JP 3125436 B2 JP3125436 B2 JP 3125436B2 JP 04125844 A JP04125844 A JP 04125844A JP 12584492 A JP12584492 A JP 12584492A JP 3125436 B2 JP3125436 B2 JP 3125436B2
Authority
JP
Japan
Prior art keywords
bit
offset
bits
address
output
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
JP04125844A
Other languages
Japanese (ja)
Other versions
JPH06139068A (en
Inventor
トラバリー ハッサン
浩三 木村
一徳 高橋
▲たく▼三 清原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP04125844A priority Critical patent/JP3125436B2/en
Publication of JPH06139068A publication Critical patent/JPH06139068A/en
Application granted granted Critical
Publication of JP3125436B2 publication Critical patent/JP3125436B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はビットオフセット量計算
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for calculating a bit offset amount.

【0002】[0002]

【従来の技術】従来の選択手段がビット操作対象とされ
るオペランドのサイズ情報に従ってデコーダが取り込む
ビットを変更し、オペランドのビット数と最大のオペラ
ンドのビット数との差をそのオフセットデータにより所
定のビット操作を行ない、オフセット量間接指定制御シ
ステムとしては、例えば特開平1−134621号公報
に示されている。図8はこの従来のオフセット量間接指
定制御システムの構成図を示すものであり、80は32
ビット入力バス、81は入力部、82はセレクタ、83
はデコーダ、84は出力回路部、と85は出力バスであ
る。5ビットデコーダ回路部1の入力部10に内部バス
を介してビット命令に基づいたオフセットデータを取り
込み、採り入れたデータの下位5ビットを有効データと
して出力する。このデータの内の下位3ビットをデコー
ダ83に、上位2ビットをセレクタ82を介してデコー
ダ83に供給する。このデコーダ83でビットコードを
数値に変換する。そして変換した対応する位置のビット
を1に、その他のビットを0にして、32ビットのデー
タを出力回路部5を介して内部バス7に出力し、ソフト
ウエアの負担を軽減して高速に処理する。
2. Description of the Related Art A conventional selecting means changes the bits taken in by a decoder according to the size information of an operand to be bit-operated, and determines the difference between the number of bits of the operand and the number of bits of the largest operand by a predetermined value using the offset data. An indirect offset amount control system that performs a bit operation is disclosed, for example, in Japanese Patent Application Laid-Open No. 1-134621. FIG. 8 is a block diagram of the conventional offset amount indirect designation control system.
Bit input bus, 81 is an input unit, 82 is a selector, 83
Is a decoder, 84 is an output circuit section, and 85 is an output bus. Offset data based on a bit instruction is taken into the input unit 10 of the 5-bit decoder circuit unit 1 via an internal bus, and the lower 5 bits of the taken data are output as valid data. The lower 3 bits of this data are supplied to the decoder 83, and the upper 2 bits are supplied to the decoder 83 via the selector 82. The decoder 83 converts the bit code into a numerical value. Then, the converted bit at the corresponding position is set to 1 and the other bits are set to 0, and the 32-bit data is output to the internal bus 7 via the output circuit unit 5 to reduce the load on the software and perform high-speed processing. I do.

【0003】また、操作対象ビットのベースアドレス及
びそのオフセット量を求めることはマイクロプログラム
により加算器、バレルシフタのようなシフト及びマスク
手段、とデータが退避できるテンポラリレジスタなどを
制御することにより実現できる。
[0003] Further, the base address of the operation target bit and the offset amount thereof can be obtained by controlling an adder, shift and mask means such as a barrel shifter, and a temporary register capable of saving data by a microprogram.

【0004】例えば、オフセットを求める場合、マイク
ロプログラムにより制御すると、まず初期オフセットを
バレルシフタのようなシフト手段に入力し、3ビット算
術シフトダウンし、そして、シフトダウンするときに溢
れる3ビットをテンポラリレジスタに退避し、加算器に
初期アドレスとシフトダウンされたオフセットを入力し
て加算し、その結果の下位2ビット以外のビットを全て
マスクすることにより求まる。
For example, when obtaining an offset, when controlled by a microprogram, an initial offset is first input to a shift means such as a barrel shifter, arithmetically shifted down by 3 bits, and 3 bits overflowing at the time of downshifting are stored in a temporary register. The initial address and the shifted-down offset are input to the adder and added, and the result is obtained by masking all bits except the lower 2 bits.

【0005】また、ベースアドレスを求める場合、マイ
クロプログラムにより制御すると、初期アドレスと3ビ
ット算術シフトダウンされた初期オフセットを32ビッ
ト加算器に入力して加算した後、バレルシフタのような
ビットマスク手段を通じて、ビットサイズ指定に応じ
て、ビットマスクを行なう必要がある。バレルシフタに
よりビットマスクを行なう場合、例えば、下位2ビット
をマスクしたいとき、まず、2ビットシフトダウンし、
2ビットシフトアップすることにより、下位2ビットを
0で置き換える。しかし、このような処理を行なうと少
なくても2クロックかかる。
When the base address is determined by a microprogram, the initial address and the 3-bit arithmetically shifted down initial offset are input to a 32-bit adder, added, and then added through a bit mask means such as a barrel shifter. It is necessary to perform a bit mask according to the bit size specification. When bit masking is performed using a barrel shifter, for example, when it is desired to mask the lower two bits, first shift down by two bits,
By shifting up by 2 bits, the lower 2 bits are replaced with 0. However, such processing requires at least two clocks.

【0006】[0006]

【発明が解決しようとする課題】しかしながら上記のよ
うな構成では、ベースアドレスを求めることができず、
32ビットのデコーダが必要となり、ハードウエアの増
加にもなり、またマイクロプログラムにより制御すると
数クロック必要になるという課題を有していた。
However, in the above configuration, the base address cannot be obtained,
There is a problem that a 32-bit decoder is required, hardware is increased, and several clocks are required when controlled by a microprogram.

【0007】[0007]

【課題を解決するための手段】本願発明は、上記課題を
解決するための、アドレスを入力するアドレスバスと、
ビットオフセット値を入力するためのオフセットバス
と、データ処理の基本単位のビット長の2を底とする対
数値(M)からアドレスにより指定できる最小単位のデ
ータのビット長の2を底とする対数値(N)を減じたビ
ット数の加算を行ない、前記アドレスバスから入力され
るアドレスの最下位(M−N)ビットと、前記オフセッ
トバスから入力されるビットオフセットの最下位のMビ
ットの内先頭の(M−N)ビットを入力する加算手段を
具備し、出力の最下位Nビットには前記オフセットバス
から入力されるビットオフセット値の最下位Nビットを
出力し、より上位の(M−N)ビットには前記加算手段
の出力を出力することを特徴とするビットオフセット量
計算装置に関するものである。
The present invention solves the above problems.
An address bus for inputting an address to solve the problem;
Offset bus for inputting bit offset value
And a pair whose base is 2 in the bit length of the basic unit of data processing
The smallest unit of data that can be specified by address from the numerical value (M)
Of the bit length of the data minus 2
The number of packets is added, and input from the address bus is performed.
The lowest (MN) bits of the address
Least significant bit of the bit offset input from the
Adder for inputting the first (MN) bits of the
And the least significant N bits of the output have the offset bus
The least significant N bits of the bit offset value input from
And the higher-order (MN) bits are added to the adding means.
Bit offset amount characterized by outputting the output of
It relates to a computing device.

【0008】また、アドレスを入力するアドレスバス
と、アドレスにより指定できる最小単位のデータのビッ
ト長の2を底とする対数値(N)ビット算術シフトダウ
ンされたビットオフセットを入力するオフセットバス
と、加算を行なう加算手段と、マスク信号により下位ビ
ットのビットマスクを行なうビットマスク手段を具備
し、前記アドレスバスの出力は前記加算手段の一つの入
力に接続され、前記オフセットバスの出力は前記加算手
段のもう一つの入力に接続され、前記加算手段の出力は
前記ビットマスク手段の入力に接続されたアクセスベー
スアドレス計算装置に関するものである。
An address bus for inputting an address
And the minimum unit of data that can be specified by the address.
Logarithmic value (N) bit arithmetic shift down with base 2
Offset bus for inputting the bit offset
And an adding means for performing addition, and
Bit mask means for performing bit masking of bits
The output of the address bus is input to one input of the adding means.
And the output of the offset bus is
Connected to another input of the stage, the output of said adding means being
An access base connected to the input of the bit mask means;
The present invention relates to a address calculator.

【0009】さらに、アドレスを入力するアドレスバス
と、ビットオフセット値を入力するためのオフセットバ
スと、データ処理の基本単位のビット長の2を底とする
対数値(M)からアドレスにより指定できる最小単位の
データのビット長の2を底とする対数値(N)を減じた
ビット数の加算を行ない、前記アドレスバスから入力さ
れるアドレスの最下位(M−N)ビットと、前記オフセ
ットバスから入力されるビットオフセットの最下位のM
ビットの内先頭の(M−N)ビットを入力する加算手段
と、補数出力信号によりデータの補数出力を行なう補数
出力手段を具備し、出力の最下位Nビットには前記オフ
セットバスから入力されるビットオフセット値の最下位
Nビットを出力し、より上位の(M−N)ビットには前
記加算手段の出力を出力し、前記の出力を前記補数出力
手段の入力に接続されることを特徴とするビットオフセ
ット量補数計算装置に関するものである。
Furthermore, an address bus for inputting an address
And an offset bar for entering the bit offset value.
And base 2 of the bit length of the basic unit of data processing
Minimum unit that can be specified by address from logarithmic value (M)
Logarithmic value (N) with base 2 of data bit length reduced
The number of bits is added, and the data is input from the address bus.
The lowest (MN) bits of the address to be
Least significant M of the bit offset input from the bit bus
Addition means for inputting the first (MN) bits of the bits
And a complement that outputs the complement of data according to the complement output signal
Output means, and the least significant N bits of the output are turned off.
The least significant bit offset value input from the set bus
N bits are output, and higher (M-N) bits are
The output of the adding means is output, and the output is the complement output.
Bit offset connected to the input of the means.
The present invention relates to a unit-complement calculator.

【0010】[0010]

【作用】本発明は前記した構成により、初期アドレスの
最下位(M−N)ビットを初期オフセットの最下位
ットの内先頭(M−N)ビットと(M−N)ビット加算
し、オフセット値を求め、オフセット補数出力信号に従
って、オフセットかオフセットの補数を出力する。初期
アドレスと3ビットシフトダウンされた初期オフセット
を加算し、指定サイズに従ってビットマスクすることに
よりベースアドレスを求める。
According to the present invention, the least significant (MN) bits of the initial address are added to the first ( MN) bits of the least significant M bits of the initial offset and (MN) bits by the above configuration, and the offset is added. Determine the value and output the offset or the complement of the offset according to the offset complement output signal. The base address is obtained by adding the initial address and the initial offset shifted down by 3 bits and performing bit masking according to the designated size.

【0011】[0011]

【実施例】図1は本発明の第1の実施例におけるオフセ
ット量計算装置のブロック図を示すものである。同図に
おいて、10は32ビットの初期アドレスを供給するア
ドレスバス、11は32ビットの初期オフセットを供給
するオフセットバス、12は2ビット加算器、そして1
3は3ビットバイパスである。
FIG. 1 is a block diagram showing an offset amount calculating apparatus according to a first embodiment of the present invention. In the figure, 10 is an address bus for supplying a 32-bit initial address, 11 is an offset bus for supplying a 32-bit initial offset, 12 is a 2-bit adder, and 1
3 is a 3-bit bypass.

【0012】図2は本発明の第1の実施例におけるベー
スアドレス計算装置のブロック図を示すものである。同
図において、20は32ビットの初期アドレスを供給す
るアドレスバス、21は3ビットシフトダウンされた3
2ビットの初期オフセットを供給するオフセットバス、
22は32ビット加算器であり、23はビットマスク装
置である。
FIG. 2 is a block diagram showing a base address calculating apparatus according to the first embodiment of the present invention. In the figure, reference numeral 20 denotes an address bus for supplying a 32-bit initial address, and reference numeral 21 denotes 3 bits shifted down by 3 bits.
An offset bus that provides a 2-bit initial offset,
Reference numeral 22 denotes a 32-bit adder, and reference numeral 23 denotes a bit mask device.

【0013】以上示す装置を用いて、ビット操作命令、
ビットフィールド命令及び任意長ビット操作命令で任意
のベースアドレス及びオフセットがそれぞれ初期アドレ
ス及び初期オフセットとして与えられたときに、実際に
アクセスすべき32ビットワード内のオフセット(アク
セスオフセット)とそのときのベースアドレス(アクセ
スベースアドレス)を計算する。この実施例では処理単
位は32ビットであり、アクセスアドレス基本単位は2
**N(N=3)で8ビットである。そして、オフセッ
ト量計算に必要とする加算手段は(M−N)(log2
(32/8))=2ビット加算手段である。なお、処理
単位が64ビットの場合には(M−N)=3ビット加算
手段が必要となる。図1及び図2に示すそれぞれの装置
の動作について以下説明する。
Using the above-described device, a bit operation instruction,
When an arbitrary base address and an offset are given as an initial address and an initial offset by a bit field instruction and an arbitrary length bit manipulation instruction, respectively, an offset in a 32-bit word to be accessed (access offset) and a base at that time Calculate the address (access base address). In this embodiment, the processing unit is 32 bits, and the access address basic unit is 2 bits.
** N (N = 3) is 8 bits. The addition means required for calculating the offset amount is (M−N) (log2
(32/8)) = 2-bit addition means. When the processing unit is 64 bits, (M−N) = 3 bit adding means is required. The operation of each device shown in FIGS. 1 and 2 will be described below.

【0014】図3はアクセスオフセットの計算における
加算手段の動作説明図であり、以下図3に従って図1の
動作を説明する。初期アドレス10の最下位2ビット
と、初期オフセット11の最下位5ビットの内先頭2ビ
ット、つまり27ビット目と28ビット目を2ビット加
算器12に入力し、演算を行なうことにより5ビットオ
フセットの先頭2ビットを求める。5ビットオフセット
の下位3ビットは初期オフセットの最下位3ビットと同
一であり、初期オフセットバス11からバイパス13を
介して出力する。以上によりアクセスオフセットが求ま
る。
FIG. 3 is a diagram for explaining the operation of the adding means in the calculation of the access offset. The operation of FIG. 1 will be described below with reference to FIG. The two least significant bits of the initial address 10 and the first two bits of the least significant five bits of the initial offset 11, that is, the 27th bit and the 28th bit are input to the 2-bit adder 12, and a 5-bit offset is obtained by performing an operation. Find the first two bits of The lower 3 bits of the 5-bit offset are the same as the lower 3 bits of the initial offset, and are output from the initial offset bus 11 via the bypass 13. Thus, the access offset is obtained.

【0015】実際にはハードウエアの増加としては三の
論理XORゲートと論理NORゲートの追加によりマイ
クロプログラム制御に対してアクセスオフセット及びア
クセスベースアドレスが素早く計算でき、演算速度の高
速化という効果がある。
Actually, as an increase in hardware, an access offset and an access base address can be quickly calculated for microprogram control by adding three logical XOR gates and a logical NOR gate, which has the effect of increasing the operation speed. .

【0016】図4はアクセスベースアドレスの計算にお
ける加算手段及びビットマスク手段の動作説明図であ
り、以下図4に従って図2の動作を説明する。32ビッ
トの初期アドレス20と3ビットシフトダウンされた3
2ビットの初期オフセット21を32ビット加算器22
に入力して加算し、アクセスベースアドレスを求める。
ビットサイズ指定により、ビットマスク装置でアクセス
ベースアドレスの下位2ビットをマスクする。例えば、
ビットサイズ指定がハーフワード(16ビット)であっ
たとすると、上記のバイト境界のベースアドレスの下位
ビットをマスクすることによりハーフワード境界アクセ
スベースアドレスが求まる。又、ビットサイズ指定がワ
ードの場合、下位2ビットをマスクすることによりワー
ド境界アクセスベースアドレスが求まる。
FIG. 4 is a diagram for explaining the operation of the addition means and bit mask means in the calculation of the access base address. The operation of FIG. 2 will be described below with reference to FIG. 32 bits initial address 20 and 3 bits shifted down 3
The 2-bit initial offset 21 is added to the 32-bit adder 22
And add to obtain the access base address.
By specifying the bit size, the lower two bits of the access base address are masked by a bit mask device. For example,
Assuming that the bit size is a halfword (16 bits), a halfword boundary access base address is obtained by masking the lower bits of the base address at the byte boundary. When the bit size is a word, the word boundary access base address is obtained by masking the lower two bits.

【0017】実際には、ビットマスク装置にワードマス
ク信号またはハーフワードマスク信号を入力することに
より、加算器の出力であるバイト境界アクセスベースア
ドレスを2入力論理ANDゲートを介し、それぞれ、下
位2ビットまたは下位1ビットをマスクすることにより
簡単に実現できる。
In practice, by inputting a word mask signal or a half word mask signal to the bit mask device, the byte boundary access base address, which is the output of the adder, is passed through the two-input logical AND gate to the lower two bits, respectively. Alternatively, it can be easily realized by masking the lower one bit.

【0018】上記の装置の動作を図7を用いて具体的に
説明する。図7はビット操作命令及びビットフィールド
命令における操作対象ビットのアクセス方式を示す説明
図であり、それを参照にして初期オフセットと初期アド
レスが与えられているときに操作対象ビットのアクセス
ベースアドレスとアクセスオフセットの求め方を説明す
る。初期アドレスを20h(h:16進数)とし、初期
オフセットを1BChとする。この初期オフセットはビ
ットオフセットであるため、3ビットシフトダウンして
バイトオフセットを求め、このバイトオフセット、37
hと初期アドレス20hを32ビット加算し、アクセス
ベースアドレス、57hを求める。次に、初期アドレス
の最下位2ビット、この場合、00b(b:2進数)と
初期オフセットの27,28ビット目、この場合、11
bを2ビット加算し、アクセスオフセットの上位2ビッ
トを求める。初期オフセットの最下位3ビット、この場
合、100bをそのままアクセスオフセットの下位3ビ
ットとし、アクセスオフセットは11100b(1C
h)として計算される。図9にビットサイズ指定によ
り、それぞれバイト、ハーフワード、とワードのときの
アクセスベースアドレス及びアクセスオフセットを示
す。
The operation of the above-mentioned apparatus will be specifically described with reference to FIG. FIG. 7 is an explanatory diagram showing an access method of an operation target bit in a bit operation instruction and a bit field instruction. Referring to FIG. 7, when an initial offset and an initial address are given, the access base address and the access A method for obtaining the offset will be described. Assume that the initial address is 20h (h: hexadecimal number) and the initial offset is 1BCh. Since this initial offset is a bit offset, it is shifted down by 3 bits to obtain a byte offset.
h and the initial address 20h are added by 32 bits to obtain an access base address 57h. Next, the least significant two bits of the initial address, in this case, 00b (b: binary number) and the 27th and 28th bits of the initial offset, in this case, 11
b is added by 2 bits to obtain the upper 2 bits of the access offset. The least significant three bits of the initial offset, in this case, 100b are used as the least significant three bits of the access offset, and the access offset is 11100b (1C
h). FIG. 9 shows an access base address and an access offset for a byte, a halfword, and a word, respectively, by specifying the bit size.

【0019】図5は本発明の第2の実施例における補数
出力装置のブロック図を示すものである。図5におい
て、10は32ビットの初期アドレスを供給するアドレ
スバス、11は32ビットの初期オフセットを供給する
オフセットバス、12は2ビット加算器、13は3ビッ
トバイパス、そして、14は補数を出力する補数出力装
置である。オフセットの計算は図1に示すように、初期
アドレス10の最下位2ビットと、初期オフセット11
の最下位5ビットの内先頭2ビット、つまり27ビット
目と28ビット目を2ビット加算器12に入力し、演算
を行なうことにより5ビットオフセットの先頭2ビット
を求める。5ビットオフセットの下位3ビットは初期オ
フセットの最下位3ビットと同一であり、11から13
のバイパスを介して補数出力装置14の入力として出力
する。補数出力信号に従って補数出力装置を通じてオフ
セットの補数(オフセット)を出力する。
FIG. 5 is a block diagram showing a complement output device according to a second embodiment of the present invention. In FIG. 5, 10 is an address bus for supplying a 32-bit initial address, 11 is an offset bus for supplying a 32-bit initial offset, 12 is a 2-bit adder, 13 is a 3-bit bypass, and 14 is a complement. Complement output device. As shown in FIG. 1, the calculation of the offset includes the least significant 2 bits of the initial address 10 and the initial offset 11
Of the least significant 5 bits, that is, the 27th bit and the 28th bit are input to the 2-bit adder 12, and the operation is performed to obtain the first 2 bits of the 5-bit offset. The lower 3 bits of the 5-bit offset are the same as the lower 3 bits of the initial offset, and 11 to 13
As an input to the complement output device 14 through the bypass of the comparator. An offset complement is output through a complement output device in accordance with the complement output signal.

【0020】図6はオフセット補数によりビットマスク
作成方法の説明図であり、それを用いて、補数出力装置
によりオフセットの補数を計算する必要性を説明する。
例えば、32ビットワードの20ビット目がビット操作
命令における操作対象ビットである。そうすると、20
ビット目に1が立つマスクを作成し、ビット操作を行な
う。このようなマスクを作る方法として最上位ビットを
1にしてオフセット分だけシフトダウンするか、最下位
ビットを1にして5ビットオフセットの補数、オフセッ
ト(31−オフセット)分シフトアップすることであ
る。最上位ビットを1にすることよりも最下位ビットを
1にすることが容易にできる。オフセットの値が求まっ
た後、オフセットの補数を求めるにはマイクロプログラ
ム制御よりも5ビットオフセットを論理NOTゲートを
介した方が高速に実現できる。
FIG. 6 is a diagram for explaining a method of preparing a bit mask by using an offset complement. With reference to FIG. 6, the necessity of calculating the complement of an offset by a complement output device will be described.
For example, the 20th bit of a 32-bit word is an operation target bit in a bit operation instruction. Then, 20
A mask in which 1 is set at the bit is created, and a bit operation is performed. As a method of creating such a mask, the most significant bit is set to 1 and shifted down by an offset, or the least significant bit is set to 1 and shifted up by a complement of a 5-bit offset, offset (31-offset). It is easier to set the least significant bit to 1 than to set the most significant bit to 1. After the offset value is determined, the complement of the offset can be determined by using a logical NOT gate to realize a 5-bit offset faster than by microprogram control.

【0021】[0021]

【発明の効果】以上説明したように、本発明によれば、
次のような効果が得られる。
As described above, according to the present invention,
The following effects can be obtained.

【0022】オフセットを求めるときに、Mビット加算
手段を設けることによりソフトウエアにかかる負担の軽
減及び処理速度の高速化を実現できる。
By providing an M-bit adder when obtaining the offset, the load on the software can be reduced and the processing speed can be increased.

【0023】ベースアドレスを求めるときに、ビットマ
スク手段を設けることによりソフトウエアにかかる負担
の軽減とともに処理速度の高速化を実現することができ
る。
When the base address is obtained, by providing the bit mask means, the load on the software can be reduced and the processing speed can be increased.

【0024】ビット操作命令では、オフセットの補数を
出力する補数出力手段を設けることによりソフトウエア
にかかる負担を軽減し、高速に処理を行なうことができ
る。
In the bit manipulation instruction, by providing a complement output means for outputting the complement of the offset, the load on the software can be reduced and the processing can be performed at high speed.

【0025】このように小さなハードウエアをつけるこ
とにより高速に演算が実現でき、実用的効果は大きい。
The operation can be realized at high speed by attaching such small hardware, and the practical effect is great.

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

【図1】本発明における第1の実施例のオフセット量計
算装置のブロック図
FIG. 1 is a block diagram of an offset amount calculating device according to a first embodiment of the present invention;

【図2】同実施例のベースアドレス計算装置のブロック
FIG. 2 is a block diagram of a base address calculator according to the embodiment;

【図3】オフセットの計算における加算手段の動作説明
FIG. 3 is an explanatory diagram of an operation of an adding unit in calculating an offset.

【図4】ベースアドレスの計算における加算手段及びビ
ットマスク手段の動作説明図
FIG. 4 is a diagram illustrating the operation of an addition unit and a bit mask unit in the calculation of a base address.

【図5】本発明における第2の実施例のオフセット補数
出力装置のブロック図
FIG. 5 is a block diagram of an offset complement output device according to a second embodiment of the present invention;

【図6】オフセット補数によりビットマスク作成方法の
説明図
FIG. 6 is an explanatory diagram of a bit mask creation method using an offset complement.

【図7】ビット操作命令及びビットフィールド命令にお
ける操作対象ビットのアクセス方式を示す説明図
FIG. 7 is an explanatory diagram showing an access method of an operation target bit in a bit operation instruction and a bit field instruction.

【図8】従来例のオフセット量間接指定制御システムの
ブロック図
FIG. 8 is a block diagram of a conventional offset amount indirect designation control system.

【図9】ビットサイズ指定による違いの説明図FIG. 9 is an explanatory diagram of a difference due to designation of a bit size.

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

10 初期アドレスバス 11 初期オフセットバス 12 2ビット加算手段 13 3ビットバイパス 14 補数出力手段 22 32ビット加算手段 23 ビットマスク手段 DESCRIPTION OF SYMBOLS 10 Initial address bus 11 Initial offset bus 12 2 bit addition means 13 3 bit bypass 14 complement output means 22 32 bit addition means 23 bit mask means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 清原 ▲たく▼三 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (56)参考文献 特開 平2−306339(JP,A) 特開 昭63−282527(JP,A) 特開 平3−19029(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 9/30 - 9/355 G06F 12/00 - 12/06 ────────────────────────────────────────────────── ─── Continued on the front page (72) Inventor Kiyohara ▲ Taku ▼ 3 1006 Odakadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (56) References JP-A-2-306339 (JP, A) JP 63-282527 (JP, A) JP-A-3-19029 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 9/30-9/355 G06F 12/00-12 / 06

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】アドレスを入力するアドレスバスと、ビッ
トオフセット値を入力するためのオフセットバスと、デ
ータ処理の基本単位のビット長の2を底とする対数値
(M)からアドレスにより指定できる最小単位のデータ
のビット長の2を底とする対数値(N)を減じたビット
数の加算を行ない、前記アドレスバスから入力されるア
ドレスの最下位(M−N)ビットと、前記オフセットバ
スから入力されるビットオフセットの最下位のMビット
の内先頭の(M−N)ビットを入力する加算手段を具備
し、出力の最下位Nビットには前記オフセットバスから
入力されるビットオフセット値の最下位Nビットを出力
し、より上位の(M−N)ビットには前記加算手段の出
力を出力することを特徴とするビットオフセット量計算
装置。
And 1. A luer address bus to enter the address, and offset bus for inputting a bit offset value, the address from the value pairs to the base 2 of the bit length of the basic unit of data processing (M) The number of bits obtained by subtracting the logarithmic value (N) from the base 2 of the bit length of the smallest possible data is added, and the least significant (MN) bits of the address input from the address bus and the offset comprising a bit offset which is input from the bus least significant M bits within the head of the (M-N) adder means you enter a bit, bit to the least significant N bits of the output that is input from the offset bus A bit offset amount calculating device for outputting the N least significant bits of the offset value and outputting the output of the adding means to higher (MN) bits.
【請求項2】アドレスを入力するアドレスバスと、アド
レスにより指定できる最小単位のデータのビット長の2
を底とする対数値(N)ビット算術シフトダウンされた
ビットオフセットを入力するオフセットバスと、加算を
行なう加算手段と、マスク信号により下位ビットのビッ
トマスクを行なうビットマスク手段を具備し、前記アド
レスバスの出力は前記加算手段の一つの入力に接続さ
れ、前記オフセットバスの出力は前記加算手段のもう一
つの入力に接続され、前記加算手段の出力は前記ビット
マスク手段の入力に接続されたアクセスベースアドレス
計算装置。
Wherein a luer address bus to enter the address, the bit length of the data of a minimum unit that can be specified by the address 2
Logarithm to the base (N) bit arithmetic shift and offset bus to enter the down bit offset addition means for adding, bit mask means for performing bit <br/> mask of lower bits Ri by the mask signal The output of the address bus is connected to one input of the adding means, the output of the offset bus is connected to another input of the adding means, and the output of the adding means is connected to the input of the bit mask means. Access base address calculator connected to the input.
【請求項3】アドレスを入力するアドレスバスと、ビッ
トオフセット値を入力するためのオフセットバスと、デ
ータ処理の基本単位のビット長の2を底とする対数値
(M)からアドレスにより指定できる最小単位のデータ
のビット長の2を底とする対数値(N)を減じたビット
数の加算を行ない、前記アドレスバスから入力されるア
ドレスの最下位(M−N)ビットと、前記オフセットバ
スから入力されるビットオフセットの最下位のMビット
の内先頭の(M−N)ビットを入力する加算手段と、補
数出力信号によりデータの補数出力を行なう補数出力手
段を具備し、出力の最下位Nビットには前記オフセット
バスから入力されるビットオフセット値の最下位Nビッ
トを出力し、より上位の(M−N)ビットには前記加算
手段の出力を出力し、前記の出力を前記補数出力手段の
入力に接続されることを特徴とするビットオフセット量
補数計算装置。
3. A luer address bus to enter the address, and offset bus for inputting a bit offset value, the address from the value pairs to the base 2 of the bit length of the basic unit of data processing (M) The number of bits obtained by subtracting the logarithmic value (N) from the base 2 of the bit length of the smallest possible data is added, and the least significant (MN) bits of the address input from the address bus and the offset comprising adding means you enter the (M-N) bits of the inner head of the M least significant bits of the bit offset input from the bus, the complement output signal complement output means for performing complement output of the data, the output Output the least significant N bits of the bit offset value inputted from the offset bus, and output the output of the adding means to the higher (MN) bits. Bit offset complement computing device, characterized in that it is connected to the output of said input of said complement output means.
JP04125844A 1992-05-19 1992-05-19 Bit offset calculator Expired - Fee Related JP3125436B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04125844A JP3125436B2 (en) 1992-05-19 1992-05-19 Bit offset calculator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04125844A JP3125436B2 (en) 1992-05-19 1992-05-19 Bit offset calculator

Publications (2)

Publication Number Publication Date
JPH06139068A JPH06139068A (en) 1994-05-20
JP3125436B2 true JP3125436B2 (en) 2001-01-15

Family

ID=14920348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04125844A Expired - Fee Related JP3125436B2 (en) 1992-05-19 1992-05-19 Bit offset calculator

Country Status (1)

Country Link
JP (1) JP3125436B2 (en)

Also Published As

Publication number Publication date
JPH06139068A (en) 1994-05-20

Similar Documents

Publication Publication Date Title
US5497341A (en) Sign-extension of immediate constants in an ALU using an adder in an integer logic unit
US6138135A (en) Propagating NaNs during high precision calculations using lesser precision hardware
JPS6097435A (en) Arithmetic processor
JP3418460B2 (en) Double precision division circuit and method
JPH0542011B2 (en)
JPH0470662B2 (en)
JPH02190928A (en) Divider
US4677582A (en) Operation processing apparatus
JPS642986B2 (en)
KR19980052740A (en) How to perform double precision multiplication in digital signal processor
JP3125436B2 (en) Bit offset calculator
EP0594969B1 (en) Data processing system and method for calculating the sum of a base plus offset
JPH049340B2 (en)
JPH034936B2 (en)
KR100431726B1 (en) Method for performing signed division
US6122651A (en) Method and apparatus for performing overshifted rotate through carry instructions by shifting in opposite directions
JP4278320B2 (en) Shift operation apparatus and system
US6683530B1 (en) Method and apparatus for performing a floating point compare operation
US6122730A (en) &#34;Test under mask high&#34; instruction and &#34;Test under mask low&#34; instruction executing method and apparatus
US6516330B1 (en) Counting set bits in data words
JP2803788B2 (en) Fast pipeline shifter element with parity prediction and string control
JPH0612239A (en) Apparatus for detecting inaccurate result caused by division in computer alu
JPS59188790A (en) Fast generator for signal sequence
GB1593136A (en) Data processing
JP2615746B2 (en) Bit operation circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees