JPS617945A - Effective address calculating system - Google Patents

Effective address calculating system

Info

Publication number
JPS617945A
JPS617945A JP12889784A JP12889784A JPS617945A JP S617945 A JPS617945 A JP S617945A JP 12889784 A JP12889784 A JP 12889784A JP 12889784 A JP12889784 A JP 12889784A JP S617945 A JPS617945 A JP S617945A
Authority
JP
Japan
Prior art keywords
effective address
bit
alu
register
counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP12889784A
Other languages
Japanese (ja)
Inventor
Shigeru Yoshida
茂 吉田
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.)
Usac Electronic Ind Co Ltd
Original Assignee
Usac Electronic Ind 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 Usac Electronic Ind Co Ltd filed Critical Usac Electronic Ind Co Ltd
Priority to JP12889784A priority Critical patent/JPS617945A/en
Publication of JPS617945A publication Critical patent/JPS617945A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten remarkably the calculation time of an effective address by dividing the effective address into the lower part being equal to an operating bit width and the residual upper part, and calculating the lower part and the upper part by an ALU and a reversible counter, respectively. CONSTITUTION:When calculating an effective address, an enable signal 14 is set to ''1'', and a selector circuit 12 is made operable. An up/down signal switches the circuit 12 to a C side when an index code is ''0'', and to an N side when said code is ''1''. This signal is applied to a reversible counter at the same time, and an increment operation and a decrement operation are executed, at the time of ''0'' and ''1'', respectively. As for the counter 13, the upper 8-bit of a base register is set in advance. An arithmetic unit ALU11 calculates the lower 16-bit of the effective address. When a carry C is applied from the ALU11, the counter 13 adds ''1'' to a value of the upper 8-bit of the base register, and subtracts ''1'' when a negative N is applied. In such a way, the lower 16-bit of the effective address is obtained from the ALU11, and the upper 8-bit of the effective address is obtained from the counter 13.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データ処理装置における実効アドレスの計算
方式に関し、特にプロセッサの並列演算幅よりもビット
幅が大きい実効アドレスの計算を高速で実行する方式に
関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to an effective address calculation method in a data processing device, and in particular to a method for quickly calculating an effective address whose bit width is larger than the parallel operation width of a processor. Regarding the method.

〔従来の技術〕[Conventional technology]

従来、たとえば16ビツト並列処理のCPUでは、AL
U (算術演算装置)が16ビツト幅となっているため
、インデックスおよびディスプレイスメント付き間接形
式で24ビツトの実効アドレスを計算する場合、実効ア
ドレスを下位16ビツトと上位8ビツトに分割して2回
に分けて計算しているのが普通で、さもなければ24ビ
ツト幅のもつCPUを使用する必要があった。
Conventionally, for example, in a CPU with 16-bit parallel processing, AL
Since the U (arithmetic unit) is 16 bits wide, when calculating a 24-bit effective address in indirect format with index and displacement, the effective address is divided into the lower 16 bits and the upper 8 bits and calculated twice. Normally, the calculation is divided into two parts, otherwise it would be necessary to use a CPU with a 24-bit width.

第2図は、実効アドレス計算に分けて行う従来方式の説
明図である。図において、1は命令ワード、2はディス
プレイスメント、3は2ワード長のペースレジスタ、4
はインデックスレジスタであり、5は第1回計算処理、
6,7.8はレジスタ、9は第2回計算処理である。
FIG. 2 is an explanatory diagram of a conventional method in which effective address calculation is performed separately. In the figure, 1 is the instruction word, 2 is the displacement, 3 is the two-word pace register, and 4 is the instruction word.
is the index register, 5 is the first calculation process,
6, 7.8 are registers, and 9 is the second calculation process.

第1回計算処理5では、ペースレジスタ3の下位16ビ
ツトと、インデックスレジスタ4の16ビノトと、ディ
スプレイスメント2の12ピントとを加算し、実効アド
レスの下位16ビツトと。
In the first calculation process 5, the lower 16 bits of the pace register 3, the 16 bits of the index register 4, and the 12 bits of the displacement 2 are added, and the result is the lower 16 bits of the effective address.

上位桁へのキャリ (桁上げ)Cまたはネガティブ(桁
借り)Nを生成する。ネガティブNは、インデックスの
符号が負の場合であって、実効アドレスの下位部分の計
算結果が負となり、上位部分に桁借りが生じたときに出
力される。実効アドレスの下位部分は、レジスタ6に格
納され、C/Nはレジスタ7に格納される。
Generates a carry (carry) C or negative (borrow) N to the upper digit. Negative N is output when the sign of the index is negative, the calculation result of the lower part of the effective address is negative, and a borrow occurs in the upper part. The lower part of the effective address is stored in register 6, and the C/N is stored in register 7.

第2回計算処理9では、ペースレジスタ3の上位8ビツ
トと、レジスタ7のC/Nとを計算する。
In the second calculation process 9, the upper 8 bits of the pace register 3 and the C/N of the register 7 are calculated.

C=1であればペースレジスタの上位8ビツトに十]、
L、N=1であれば逆に−1する。その結果は、実効ア
ドレスの上位部分としてレジスタ8に格納される。この
ようにしてレジスタ6および8に実効アドレスが得られ
たら、メモリアクセスのために出力される。
If C=1, the upper 8 bits of the pace register are filled],
Conversely, if L and N=1, they are incremented by -1. The result is stored in register 8 as the upper part of the effective address. Once the effective addresses are obtained in registers 6 and 8 in this way, they are output for memory access.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

1つの実効アドレスの計算を2回に分けて行う従来の方
法では、ALUの加算に2マシンサイクル、インデック
スレジスタの符号を見るために1マシンサイクル、AL
Uの出力をいったんレジスタに格納するために1マシン
サイクルが使用されるため、全体で7マシンサイクルも
必要となり計算時間が長くかかるという問題があった。
In the conventional method of calculating one effective address in two steps, it takes two machine cycles to add the ALU, one machine cycle to check the sign of the index register, and one machine cycle to check the sign of the index register.
Since one machine cycle is used to temporarily store the output of U in the register, a total of seven machine cycles are required, resulting in a problem of long calculation time.

他方。On the other hand.

ALUの演算ビット幅を実効アドレスのピント幅に合わ
せて構成した場合には、ハードウェア量が増加し1価格
の上昇その他の問題が起こっていた。
If the operation bit width of the ALU was configured to match the focus width of the effective address, the amount of hardware would increase, resulting in an increase in price and other problems.

〔問題点を解決するための手段〕[Means for solving problems]

本発明では、実効アドレスの計算を1回で済ますことを
可能にするもので、そのため、実効アドレスの上位部分
の計算は、下位部分の計算で生じるキャリ (桁上げ)
またはネガティブ(桁借り)を処理する+1または−1
の計算のみでよいことに着目してALUの演算ビット幅
を大きくすることはせず、ALUにup/down形式
の可逆カウンタを付加し、実効アドレスの上位部分を可
逆カウンタで計算させるようにするもので、具体的には
In the present invention, it is possible to calculate the effective address only once, and therefore, the calculation of the upper part of the effective address is performed without the carry (carry) that occurs in the calculation of the lower part.
or +1 or -1 to handle negative (borrowed digits)
Focusing on the fact that it only requires calculation of Something, specifically.

キャリおよびネガティブ出力をそなえたALUと。An ALU with carry and negative outputs.

該ALUの演算ビット幅よりも大きい実効アドレスとを
有するデータ処理装置において、上記ALUのキャリお
よびネガティブ出力に結合された可逆カウンタを設けて
、キャリ出力によりインクレメントし、ネガティブ出力
によりデクレメントするように構成し、さらに上記実効
アドレスをALUの演算ビット幅に等しい下位部分と、
残りの上位部分とに分割し、該実効アドレスの下位部分
を上記ALUにより計算し、上位部分を上記可逆カウン
タにより計算することを特徴とするものである。
In a data processing device having an effective address larger than the operational bit width of the ALU, a reversible counter coupled to the carry and negative outputs of the ALU is provided, and the counter is incremented by the carry output and decremented by the negative output. furthermore, the effective address has a lower part equal to the operation bit width of the ALU,
The effective address is divided into the remaining upper part, the lower part of the effective address is calculated by the ALU, and the upper part is calculated by the reversible counter.

〔実施例〕〔Example〕

以下に1本発明の詳細を実施例にしたがって説明する。 The details of the present invention will be explained below based on examples.

第1図は本発明の原理を示す説明図である。図において
、ilはN(ネガティブ)およびC(キャリ)出力をも
つ16ビソトのALU、12はセレクタ回路、13は8
ビツトの可逆カウンタADRH,14はイネーブル信号
、15はup/down信号である。
FIG. 1 is an explanatory diagram showing the principle of the present invention. In the figure, il is a 16-bit ALU with N (negative) and C (carry) outputs, 12 is a selector circuit, and 13 is an 8-bit ALU.
The bit reversible counter ADRH, 14 is an enable signal, and 15 is an up/down signal.

イネーブル信号14は、実効アドレス計算時に。Enable signal 14 is used during effective address calculation.

“1”にされ、セレクタ回路12は動作可能にされる。It is set to "1" and the selector circuit 12 is enabled.

up/down信号はインデックスの符号に基づいて決
定され、“0”のときセレクタ回路12をC側に切り替
え、“1”のときN側に切り替える。
The up/down signal is determined based on the sign of the index, and when it is "0", the selector circuit 12 is switched to the C side, and when it is "1", it is switched to the N side.

このup/down信号は同時に可逆カウンタ13に加
えられ、0″のときインクレメント(ステップアップ)
動作、“1”のときデクレメント(ステップダウン)動
作を行わせる。
This up/down signal is simultaneously added to the reversible counter 13, and when it is 0'', it is incremented (step up).
When the flag is "1", a decrement (step down) operation is performed.

可逆カウンタ13にはペースレジスタの上位8ビツトが
予め設定される。ALUI 1は実効アドレスの下位1
6ビツトを計算し、その結果キャリCまたはネガティブ
Nが生じると、セレクタ回路12を経て可逆カウンタ1
3に印加する。
The upper eight bits of the pace register are set in advance in the reversible counter 13. ALUI 1 is the lower 1 of the effective address
When 6 bits are calculated and a carry C or negative N occurs as a result, the reversible counter 1 passes through the selector circuit 12.
3.

可逆カウンタ13は、ALUIIからキャリCが印加さ
れた場合、すなわちALUにおける実効アドレス下位部
分の計算で1桁上げが生じると。
The reversible counter 13 receives a carry C from the ALU II, that is, when a one-digit increment occurs in the calculation of the lower part of the effective address in the ALU.

ステップアップすなわちペースレジスタの上位8ビツト
の値に1を加える。他方、ALUIIからネガティブN
が印加された場合、すなわちインデックスの符号が“−
”であって桁借りが生したとき、可逆カウンタ13は、
ステップダウンすなわちペースレジスタの上位8ビツト
の値から1を減じる。
Step up, that is, add 1 to the value of the upper 8 bits of the pace register. On the other hand, negative N from ALUII
is applied, that is, the sign of the index is “−”
”, when a digit is borrowed, the reversible counter 13 is
Step down, that is, subtract 1 from the value of the upper 8 bits of the pace register.

このようにして、ALUIIから実効アドレスの下位1
6ビツトが得られ、可逆カウンタ13から実効アドレス
の上位8ビツトが得られる。
In this way, from ALUII to the lower 1 of the effective address
6 bits are obtained, and the upper 8 bits of the effective address are obtained from the reversible counter 13.

第3図は9本発明の1実施例の構成図である。FIG. 3 is a block diagram of one embodiment of the present invention.

図において、16はメモリ、17は読み出しデータレジ
スフRDR,18は12ビツトのディスプレイスメント
の直接数値を格納するレジスタD。
In the figure, 16 is a memory, 17 is a read data register RDR, and 18 is a register D that stores a 12-bit displacement direct value.

19はペースレジスタを指定するレジスタB、  20
はインデックスレジスタを指定するレジスタX。
19 is register B specifying the pace register, 20
is register X that specifies the index register.

21は汎用レジスタ、22は各16ピントのインデック
スレジスタ、23は各24ビツトのヘースレジスタ、2
4はセレクタ、25は16ビソトのALU、26はアキ
ュムレータACC,27は実効アドレスの下位16ビソ
トを格納するアドレスレジスタADRL、28は本発明
により8ビツトの可逆カウンタで構成された実効アドレ
スの上位8ビツトのアドレスレジスタADRH,29は
7’ドレスバスを示す。
21 is a general-purpose register, 22 is an index register with 16 pins each, 23 is a heath register with 24 bits each, 2
4 is a selector, 25 is a 16-bit ALU, 26 is an accumulator ACC, 27 is an address register ADRL that stores the lower 16 bits of the effective address, and 28 is the upper 8 effective addresses that are constructed of an 8-bit reversible counter according to the present invention. Bit address register ADRH, 29 indicates a 7' address bus.

第4図は基本的な制御動作をフロー■乃至■で示したも
のである。
FIG. 4 shows the basic control operations using flows ① to ②.

■ まずペースレジスタ23を選択し、その上位8ビツ
トを、セレクタ24.ALU25を経て可逆カウンタの
アドレスレジスタADRH28に設定する。
■ First, select the pace register 23, and input its upper 8 bits to the selector 24. It is set in the address register ADRH 28 of the reversible counter via the ALU 25.

■ インデックスレジスタ22を選択し、その16ビツ
トを読み出してセレクタ24.ALU25を経てアキュ
ムレータACC26へ設定する。このときインデックス
値が負であればALU25からN−”l”を出力し、ア
ドレスレジスタADRH28をデクレメントする。
■ Select the index register 22, read its 16 bits, and select the selector 24. It is set to accumulator ACC26 via ALU25. At this time, if the index value is negative, N-"l" is output from the ALU 25 and the address register ADRH 28 is decremented.

■ アキュムレータACC26のインデックス値とレジ
スタD18の12ビツトのディスプレイスメント値とを
ALU25で加算し、キャリCがあればADRH28を
インクレメントする。ALU25の加算結果はACC2
6へ格納される。
(2) The ALU 25 adds the index value of the accumulator ACC26 and the 12-bit displacement value of the register D18, and if there is a carry C, the ADRH 28 is incremented. The addition result of ALU25 is ACC2
6.

■ 最後に、ACC26の値とペースレジスタ23の下
位16ビソトとをALU25で加算し、キャリCがあれ
ばADRH28をインクレメントする。ALU25の加
算結果は、アドレスレジスタA、DRL27に格納され
る。
(2) Finally, the ALU 25 adds the value of the ACC 26 and the lower 16 bits of the pace register 23, and if there is a carry C, the ADRH 28 is incremented. The addition result of the ALU 25 is stored in the address register A and DRL 27.

このようにして、アドレスレジスタADRL27、AD
RH28にそれぞれ実効アドレスの下位16ビソト、上
位8ビツトが生成され、アドレスバス29へ出力される
In this way, address registers ADRL27, AD
The lower 16 bits and upper 8 bits of the effective address are generated in the RH 28 and output to the address bus 29, respectively.

本実施例では、実効アドレス計算を4マシンサイクルで
実行することができた。
In this embodiment, effective address calculation could be executed in 4 machine cycles.

本発明は、実効アドレスのピント幅がALUのビット幅
よりも大きい任意の場合に適用することが可能である。
The present invention can be applied to any case where the focus width of the effective address is larger than the bit width of the ALU.

〔発明の効果〕〔Effect of the invention〕

以上のように本発明によれば、ハードウェアを僅かに増
加させるだけで実効アドレスの計算を少ないマシンサイ
クルで実行させることができ、2 −回に分けて計算す
る場合にくらべて大幅に計算時間を短縮することができ
る。
As described above, according to the present invention, effective address calculation can be executed in fewer machine cycles with only a slight increase in hardware, and the calculation time is significantly reduced compared to the case where calculation is performed in two steps. can be shortened.

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

第1図は本発明の原理説明図、第2図は従来方式の説明
図、第3図は本発明の1実施例の構成図。 第4図は本実施例の制御フロー図である。 図中、11は16ビソI・のALU、12ばセレクタ回
路、13は可逆カウンタ、14はイネーブル信号、15
はup/down信号である。 特許出願人 ユーザツク電子工業株式会社代理人弁理士
 長谷用 文 廣(外2名)才II!1 才2 ffl。
FIG. 1 is an explanatory diagram of the principle of the present invention, FIG. 2 is an explanatory diagram of a conventional system, and FIG. 3 is a configuration diagram of one embodiment of the present invention. FIG. 4 is a control flow diagram of this embodiment. In the figure, 11 is a 16-biso I ALU, 12 is a selector circuit, 13 is a reversible counter, 14 is an enable signal, and 15 is a reversible counter.
are up/down signals. Patent applicant: Usatsuk Electronic Industry Co., Ltd. Representative Patent Attorney Fumihiro Hase (2 others) Said II! 1 year old 2 ffl.

Claims (1)

【特許請求の範囲】[Claims] キャリおよびネガティブ出力をそなえたALUと、該A
LUの演算ビット幅よりも大きい実効アドレスとを有す
るデータ処理装置において、上記ALUのキャリおよび
ネガティブ出力に結合された可逆カウンタを設けて、キ
ャリ出力によりインクレメントし、ネガティブ出力によ
りデクレメントするように構成し、さらに上記実効アド
レスをALUの演算ビット幅に等しい下位部分と、残り
の上位部分とに分割し、該実効アドレスの下位部分を上
記ALUにより計算し、上位部分を上記可逆カウンタに
より計算することを特徴とする実効アドレス計算方式。
An ALU with carry and negative outputs and
In a data processing device having an effective address larger than the arithmetic bit width of the LU, a reversible counter coupled to the carry and negative outputs of the ALU is provided, and is incremented by the carry output and decremented by the negative output. further divide the effective address into a lower part equal to the operation bit width of the ALU and the remaining upper part, calculate the lower part of the effective address by the ALU, and calculate the upper part by the reversible counter. An effective address calculation method characterized by:
JP12889784A 1984-06-22 1984-06-22 Effective address calculating system Pending JPS617945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12889784A JPS617945A (en) 1984-06-22 1984-06-22 Effective address calculating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12889784A JPS617945A (en) 1984-06-22 1984-06-22 Effective address calculating system

Publications (1)

Publication Number Publication Date
JPS617945A true JPS617945A (en) 1986-01-14

Family

ID=14996053

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12889784A Pending JPS617945A (en) 1984-06-22 1984-06-22 Effective address calculating system

Country Status (1)

Country Link
JP (1) JPS617945A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63111535A (en) * 1986-10-29 1988-05-16 Nec Corp Data processor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54159831A (en) * 1978-06-07 1979-12-18 Fujitsu Ltd Adder and subtractor for numbers different in data length using counter circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54159831A (en) * 1978-06-07 1979-12-18 Fujitsu Ltd Adder and subtractor for numbers different in data length using counter circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63111535A (en) * 1986-10-29 1988-05-16 Nec Corp Data processor

Similar Documents

Publication Publication Date Title
US6138135A (en) Propagating NaNs during high precision calculations using lesser precision hardware
JPH0145649B2 (en)
US5682339A (en) Method for performing rotate through carry using a 32 bit barrel shifter and counter
JPS617945A (en) Effective address calculating system
US5655139A (en) Execution unit architecture to support X86 instruction set and X86 segmented addressing
JPS5826584B2 (en) data processing equipment
KR100431726B1 (en) Method for performing signed division
US5754460A (en) Method for performing signed division
JPS5917457B2 (en) Binary coded decimal correction device
JPS6120889B2 (en)
CA1173171A (en) Address expanding system
JP3435744B2 (en) Multiplication circuit
US5687102A (en) Double precision (64 bit) shift operations using a 32 bit data path
JPH07253874A (en) Arithmetic unit
US7103751B1 (en) Method and apparatus for representation of an address in canonical form
SU1665374A1 (en) Dividing device
JP3055558B2 (en) n-bit arithmetic unit
JPS59188900A (en) Data processor
JP2985093B2 (en) Arithmetic control unit
JP3541776B2 (en) Microcomputer
SU955059A1 (en) Microprogram control device
JPS6016649B2 (en) data processing equipment
JPS61177492A (en) Multiplier for reverberator
JPS61267135A (en) Data processor
JPS61282933A (en) Digital signal processor