JPS63244246A - Wrap-around detector - Google Patents

Wrap-around detector

Info

Publication number
JPS63244246A
JPS63244246A JP7649087A JP7649087A JPS63244246A JP S63244246 A JPS63244246 A JP S63244246A JP 7649087 A JP7649087 A JP 7649087A JP 7649087 A JP7649087 A JP 7649087A JP S63244246 A JPS63244246 A JP S63244246A
Authority
JP
Japan
Prior art keywords
data
address
memory
bits
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7649087A
Other languages
Japanese (ja)
Inventor
Takeji Tokumaru
武治 得丸
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP7649087A priority Critical patent/JPS63244246A/en
Publication of JPS63244246A publication Critical patent/JPS63244246A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To detect wrap-around at a high speed by generating the logical product of the output of an adder to add a two-bit instruction data with an address data in a memory and that of an all-'1' detection means. CONSTITUTION:The titled detector are provided: with the adding means 10 to add two-bit instruction data instructing the size of memory data with an address data in the memory, and the all-'1' detection means 20 to detect whether all the high-order bits except the low order 2 bit of the address data or not. And further, the AND gate 30 to generate the logical product of the outputs of the means 10 and the means 20. As a result, 2 bit data in a memory data field and an address data are added together; in case said adding results in '1' and all the high order bits except the low order 2 bit of the address data are in '1', the occurrence of wrap-around in the memory can be detected swiftly.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、メモリにおけるいわゆるラップアラウンド発
生を検出するHraに関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to Hra that detects the occurrence of so-called wraparound in a memory.

(従来の技術) 初めにラップアラウンドの概要について説明する。(Conventional technology) First, an overview of wraparound will be explained.

ここでいうラップアラウンドとは以下のような機能をす
るものとする。メモリアクセスにおいて32bitのア
ドレス線で32bitデータをバイト単位ごとにアクセ
スするものとすると、第2図に示すような、アドレス対
データの構成となる。つまり、32bitデータは4分
割され、バイト単位ごとにメモリアクセスが行われる。
The wraparound mentioned here has the following function. When 32-bit data is accessed byte by byte using a 32-bit address line in memory access, the address-to-data configuration is as shown in FIG. 2. That is, 32-bit data is divided into four parts, and memory access is performed in units of bytes.

このことはメモリアクセスのスタート番地がバイト単位
ごとに自由に設定できることを意味している。従って、
第2図において、32bitデータを4分割したどの部
分からでもメモリアクセスがスタートできるようになる
This means that the start address of memory access can be freely set for each byte. Therefore,
In FIG. 2, memory access can be started from any part of the 32-bit data divided into four parts.

4分割したエリアをそれぞれ領域A、B、C。The area is divided into four areas, respectively, areas A, B, and C.

Oとすると、32bitアドレスで下位2 bitがそ
れぞれ“00″の場合は領域A、”01”は領域B1 
“10”は領域01″11″は領域りを示し、A〜Dど
の領域からでも、アドレスがスタートできる。
Assuming O, if the lower 2 bits of the 32-bit address are "00", it is area A, and "01" is area B1.
"10" indicates the area 01"11", and the address can start from any area A to D.

以上のようなメモリ構成において、扱うメモリデータサ
イズもそれぞれバイト単位(8btt)、ワード単位(
16bit)及びダブルワード単位(32bit)にな
っていると、メモリアクセスも複雑になってくる。この
メモリのスタート番地とメモリデータのサイズによって
アクセスする範囲の関係を第3図に示す。同図(A)は
各アドレススタート番地とデータサイズがバイト単位の
関係、同図(B)は同様にアドレススタート番地とワー
ドデータの関係、同図(C)は同様にアドレススタート
番地とダブルワードデータの関係を示す。
In the above memory configuration, the memory data size handled is in bytes (8 btt) and words (8 btt), respectively.
16 bits) and double word units (32 bits), memory access becomes complicated. FIG. 3 shows the relationship between the start address of this memory and the range to be accessed depending on the size of memory data. The figure (A) shows the relationship between each address start address and the data size in bytes, the figure (B) shows the relationship between the address start address and word data, and the figure (C) shows the relationship between the address start address and double word data. Shows data relationships.

これらの関係かられかるように、アドレススタート番地
とデータサイズによってはメモリアクセスが2つの境界
にまたがる。つまり、n番地とn+1番地に渡ってアク
セスしなければならない状況が生じる。−例として、第
3図(A)において、スタート番地が8領域でデータサ
イズがダブルワードの場合はn番地でB、C,Dの3領
域をアクセスし、n+1番地でさらにAI域をアクセス
する。
As can be seen from these relationships, memory access may straddle two boundaries depending on the address start address and data size. In other words, a situation arises in which it is necessary to access addresses n and n+1. - As an example, in Figure 3 (A), if the start address is 8 areas and the data size is double word, three areas B, C, and D are accessed at address n, and the AI area is further accessed at address n+1. .

このようにメモリアクセスに関してはデータサイズを常
に加味してアドレス番地を決定しなければならない。こ
のため、現アドレス番地にデータサイズを加算してアド
レス計算する必要がある。
In this way, when accessing memory, the address must always be determined taking into account the data size. Therefore, it is necessary to calculate the address by adding the data size to the current address.

このとき、アドレス修飾は32bitのアドレスライン
において0〜0から1〜1(いずれも32bit長)の
範囲に渡ってアドレス計算する。
At this time, address modification is performed by calculating addresses in the range from 0 to 0 to 1 to 1 (each having a length of 32 bits) on a 32-bit address line.

その場合、32bitアドレスの内下位2b1【が、3
2bitを4分割したバイト単位にアドレスするのであ
るから、現アドレスにバイトごとのデータサイズを加算
して、メモリアクセスするリミット番地を決める時はア
ドレスの下位2 bitにデータサイズを加算すればよ
い。
In that case, the lower 2b1 of the 32-bit address is 3
Since addressing is performed in byte units obtained by dividing 2 bits into 4, the data size for each byte is added to the current address, and when determining the limit address for memory access, the data size can be added to the lower 2 bits of the address.

この方法を第4図に示す。すなわちバイトデータの時は
“01“、ワードデータの時は“10n1ダブルワード
データの時は“11″を加算すればよい。この加算の結
果、アドレスが全て“1″、すなわち最大アドレス番地
を通り越して、また再びo−otl地から始まる減少が
生じる。このことを通常ラップアラウンドが生じたとい
う。第5図はラップアラウンドが生じた状態を示してい
る。
This method is shown in FIG. In other words, add "01" for byte data, "11" for 10n1 double word data. As a result of this addition, all addresses are "1", that is, the address exceeds the maximum address. Then, a decrease again starts from the o-otl point. This is usually said to have occurred as a wraparound. FIG. 5 shows a situation in which a wraparound has occurred.

従来、上記ラップアラウンドを検出する回路としては、
第6図及び第7図に示すものが知られている。
Conventionally, the circuit for detecting the above wraparound is as follows:
The devices shown in FIGS. 6 and 7 are known.

第6図に示す従来例では、現32bitアドレスにデー
タサイズの2 bitを加算するのに32bit加算器
で加算を行いその時、最上位桁からのキャリ発生の有無
の結果でラップアラウンド発生の有無を検出している。
In the conventional example shown in Fig. 6, 2 bits of the data size are added to the current 32-bit address using a 32-bit adder, and at that time, the occurrence of wrap-around is determined based on the result of whether a carry occurs from the most significant digit. Detected.

なお、データサイズを加算する時、下位2 bitはデ
ータ・サイズを示し、残りの3Qbitはオール“0”
とに、加算を行う。
Note that when adding the data size, the lower 2 bits indicate the data size, and the remaining 3Qbits are all “0”.
Then, perform the addition.

また、第7図に示す実施例では、下位2bitを現アド
レスと加算し、2〜31 bit mでは下位からのキ
ャリと現アドレスの論理積をとり、その出力を上位に伝
達する。そして、最上位桁からのキャリ発生の有無でラ
ップアラウンド発生の有無を検出している。
Further, in the embodiment shown in FIG. 7, the lower 2 bits are added to the current address, and in the 2nd to 31st bits m, the carry from the lower order and the current address are ANDed, and the output is transmitted to the higher order. The presence or absence of a wraparound is detected based on the presence or absence of a carry from the most significant digit.

(発明が解決しようとする問題点) このように上記従来のラップアクランド検出回路は、第
6図に示したものにあっては、データサイズの2 bi
tのみを加算するのに32bitの加算器が必要であり
、ハードウェアの部分が増え、かつ、キャリが伝搬して
いくため演算時間がかかるという欠点があった。
(Problems to be Solved by the Invention) As described above, the conventional wrap-acland detection circuit shown in FIG.
A 32-bit adder is required to add only t, which increases the amount of hardware and has the disadvantage that it takes a long calculation time because carries propagate.

また、第7図に示すものにあっては、2〜31batを
加算器の代わりに現アドレスと下位からのキャリとの論
理積をとる回路方式のため、ハードウェアは減少するも
のの、2〜31 bit fillにキャリが伝搬して
いくため、演算時間がかかつていた。
In addition, in the case shown in FIG. 7, the circuit system takes the AND of the current address and the carry from the lower order instead of the adder for 2 to 31 bats, so although the hardware is reduced, the 2 to 31 Since the carry propagates to the bit fill, the computation time is long.

本発明は上記問題点に鑑みてなされたものであり、その
目的は装置構成が簡略化され、かつ高速にラップアラウ
ンドの発生を検出する装置を提供することにある。
The present invention has been made in view of the above problems, and an object thereof is to provide a device that has a simplified device configuration and can detect the occurrence of wraparound at high speed.

[発明の構成] (問題点を解決するための手段) 上記目的を達成するために本発明は、メモリデータのサ
イズを指示する2ビットの指示データとメモリのアドレ
スデータとを加算する加算手段と、アドレスデータの下
位2ビツトを除く上位ビットが全て1″であるか否かを
検出するオール“1″検出手段と、を有し、 前記加算手段とオール“1”検出手段との論理積とから
メモリのラップアラウンド発生を検出することを特徴と
する。
[Structure of the Invention] (Means for Solving the Problems) In order to achieve the above object, the present invention provides an adding means for adding 2-bit instruction data indicating the size of memory data and address data of the memory. , all "1" detection means for detecting whether or not the upper bits except the lower two bits of the address data are all "1", and the logical product of the addition means and the all "1" detection means; It is characterized by detecting the occurrence of memory wraparound.

(作用) 本発明では、メモリデータフィールドの2とットデータ
とアドレスデータとが加算され、その加算結果が“1”
でかつアドレスデータの下位2ビツトを除く上位ビット
が全て“1″ある場合メモリにラップアラウンドが発生
したことが高速に検出される。
(Function) In the present invention, two bit data and address data in a memory data field are added, and the addition result is "1".
If all the upper bits except the lower two bits of the address data are "1", it is quickly detected that wraparound has occurred in the memory.

(実施例) 第1図は本発明に係るラップアラウンド検出装置の構成
を示している。
(Example) FIG. 1 shows the configuration of a wraparound detection device according to the present invention.

本実施例は、下位2bttm鐸部10とオール“1”検
出部20とアンドゲート30とから構成されている。
This embodiment is composed of a lower 2 bttm trigger section 10, an all "1" detection section 20, and an AND gate 30.

下位2bit2IO篩部10は、アドレスの下位2bi
tとデータサイズフィールドの2 bitとを加算する
もので、データサイズが「バイト」のときは、“01“
、「ワード」のとぎは“1o”、「ダブルワード」のと
きは11″をそれぞれアドレスに加算する。その加算結
果は上記アンドゲート30へ出力されている。なお°、
図中FAは全加算器、HAは半加算器を示す。
The lower 2 bits 2IO sieve unit 10 selects the lower 2 bits of the address.
It adds t and 2 bits of the data size field, and when the data size is "byte", it is "01".
, "1o" is added to the address for "word", and 11" is added for "double word" to the address. The result of the addition is output to the AND gate 30. Note that,
In the figure, FA indicates a full adder and HA indicates a half adder.

一方、オール“1″検出部2oはアドレス2b+t〜3
1 bitがオール″1”か否かを検出するもので、現
アドレス2 bat〜31 bitが並列に入力する3
個のナントゲート21.22.23と、区ナントゲート
21.22.23の出力を入力するノアゲート24とか
ら構成されている。
On the other hand, the all “1” detection unit 2o has addresses 2b+t to 3.
It detects whether all 1 bits are "1" or not, and current address 2 bat to 31 bits are input in parallel.
It consists of Nantes gates 21, 22, and 23, and a NOR gate 24 that inputs the output of the Nantes gates 21, 22, and 23.

次に作用を説明する。Next, the action will be explained.

□ bat〜3 i bitの32bitのアドレスの
下位2 bitが下位2 bit加算部10でデータサ
イズ“01”または“10”または“11”と加算され
る。そして、そのキャリ出力がアンドゲート30へ供給
される。
□ The lower 2 bits of the 32-bit address of bat~3 i bits are added to the data size "01", "10", or "11" by the lower 2-bit adder 10. The carry output is then supplied to the AND gate 30.

・一方、オール“1″検出部は、現アドレスの2bit
から31bitの全30bitが“1”となるのを検出
している。従って、30btt中にi bttでも“0
″が存在すれば、ナントゲート21.22゜23の何れ
かの出力が“1”となりナントゲート24の出力が“0
″となる。
・On the other hand, the all “1” detection section detects 2 bits of the current address.
It is detected that all 30 bits of 31 bits are "1". Therefore, even if i btt is “0” during 30 btt
'' exists, the output of any of the Nant gates 21, 22, 23 becomes "1" and the output of the Nant gate 24 becomes "0".
”.

アドレスの2 bit〜31bitが全て1”となると
ナントゲート21.22.23の出力は全て“0″とな
る。このため、ナントゲート24の出力は“1”となる
When the 2nd to 31st bits of the address are all 1, the outputs of the Nantes gates 21, 22, and 23 are all 0. Therefore, the output of the Nantes gate 24 is 1.

そして、このオール“1″検出部の出力すなわちナント
ゲート24の出力と下位2bit 2IO1laのキャ
リ出力との論理積がアンドゲート30でとられる。
Then, the AND gate 30 calculates the logical product of the output of this all "1" detection section, that is, the output of the Nant gate 24, and the carry output of the lower 2 bits 2IO1la.

ナントゲート24の出力が“1″でキャリ出力が“0“
の場合には、まだラップアラウンドは発生していないこ
とがわかる。
The output of Nant gate 24 is “1” and the carry output is “0”
In this case, it can be seen that wraparound has not yet occurred.

そして、再出力が“1#どなるとアンドゲート30の出
力が“1”となり、これで、ラップアラウンドが発生し
たことが検出される。
Then, when the re-output reaches "1#", the output of the AND gate 30 becomes "1", and it is thus detected that wraparound has occurred.

このように本実施例によれば、下位の2b1【の加算結
果のキャリが伝搬して、最終段からのキャリの発生の有
無は、2〜31bit間が“1″の場合は、下位2 b
itの加算結果のキャリが伝送し、オール“1″以外で
は伝送しない。2〜31 bit間のオール“1″検出
と下位212itの論理積をとり、その出力でキシす発
生の有無すなわち、ラップアラウンドの有無としたので
、オール“1”検出部20は一挙に3Qbitをみるこ
とができ、検出が高速になる。
As described above, according to this embodiment, the carry of the addition result of the lower 2b1 is propagated, and whether or not a carry occurs from the final stage is determined by the lower 2b1 if the 2nd to 31st bits are "1".
The carry of the addition result of it is transmitted, and anything other than all "1" is not transmitted. The all "1" detection between bits 2 to 31 is logically ANDed with the lower 212 bits, and the output is used to determine the presence or absence of a crossover, that is, the presence or absence of wraparound, so the all "1" detection unit 20 detects 3Q bits at once. This makes detection faster.

また、ハードウェアは比較的小規模で済むことになる。Additionally, the hardware can be relatively small-scale.

従来の比較的ハードウェア量の少ない図7図の方式でも
2〜31 bit 間の各batにアンドゲートが必要
になり、トランジスタ数にすると66個トランジスタが
必要になり、2〜31 bit全体では6X30−18
0個必要であったが、本実施例では2〜31 bit間
では約120個ぐらいで済むので、′5Ar11を安価
に構成することができる。
Even with the conventional method shown in Figure 7, which requires a relatively small amount of hardware, an AND gate is required for each bat between 2 and 31 bits, and 66 transistors are required for the total number of 2 to 31 bits. -18
0 pieces were required, but in this embodiment, about 120 pieces between 2 and 31 bits are required, so '5Ar11 can be constructed at low cost.

〔発明の効果] 以上説明したように本発明によれば、ラップアラウンド
発生を高速に検出できるとともに装置構成が簡略化され
たラップアラウンド検出装置を安価に提供することが可
能となる。
[Effects of the Invention] As described above, according to the present invention, it is possible to provide a wraparound detection device that can detect the occurrence of wraparound at high speed and has a simplified device configuration at a low cost.

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

第1図は本発明に係るli置の一実施例の構成図、第2
図は32bitメモリデータをバイト単位に分割した時
のアドレスとの関係を示す説明図、第3図はメモリをバ
イトに分割した時のメモリアクセスのスタート番地と、
データサイズによるメモリアクセス領域との関係を示す
説明図、第4図は現アドレスに加算するデータサイズ別
の加算方法の説明図、第5図はラップアラウンド発生の
説明図、第6図及び第7図は従来例の構成図である。 10・・・下位2 bit加算部 20・・・オール“1”検出部 30・・・アンドゲート
Fig. 1 is a configuration diagram of an embodiment of the li device according to the present invention;
The figure is an explanatory diagram showing the relationship between addresses when 32-bit memory data is divided into bytes, and Figure 3 shows the start address of memory access when the memory is divided into bytes,
An explanatory diagram showing the relationship with memory access areas according to data size, FIG. 4 is an explanatory diagram of the addition method according to the data size to be added to the current address, FIG. 5 is an explanatory diagram of wraparound occurrence, and FIGS. 6 and 7 The figure is a configuration diagram of a conventional example. 10...Lower 2 bit addition section 20...All "1" detection section 30...AND gate

Claims (1)

【特許請求の範囲】 メモリデータのサイズを指示する2ビットの指示データ
とメモリのアドレスデータとを加算する加算手段と、 アドレスデータの下位2ビットを除く上位ビットが全て
“1”であるか否かを検出するオール“1”検出手段と
、を有し、 前記加算手段とオール“1”検出手段との論理積とから
メモリのラップアラウンド発生を検出することを特徴と
するラップアラウンド検出装置。
[Claims] Addition means for adding 2-bit instruction data indicating the size of memory data and address data of the memory, and whether all upper bits of the address data except the lower 2 bits are "1". 1. A wraparound detection device comprising: all "1" detection means for detecting whether the addition means and all "1" detection means are present;
JP7649087A 1987-03-31 1987-03-31 Wrap-around detector Pending JPS63244246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7649087A JPS63244246A (en) 1987-03-31 1987-03-31 Wrap-around detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7649087A JPS63244246A (en) 1987-03-31 1987-03-31 Wrap-around detector

Publications (1)

Publication Number Publication Date
JPS63244246A true JPS63244246A (en) 1988-10-11

Family

ID=13606659

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7649087A Pending JPS63244246A (en) 1987-03-31 1987-03-31 Wrap-around detector

Country Status (1)

Country Link
JP (1) JPS63244246A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5275139A (en) * 1975-12-18 1977-06-23 Fujitsu Ltd Address over detecting system
JPS5899836A (en) * 1981-12-10 1983-06-14 Nippon Telegr & Teleph Corp <Ntt> Encoder circuit
JPS58161191A (en) * 1982-03-19 1983-09-24 Fuji Xerox Co Ltd Storage device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5275139A (en) * 1975-12-18 1977-06-23 Fujitsu Ltd Address over detecting system
JPS5899836A (en) * 1981-12-10 1983-06-14 Nippon Telegr & Teleph Corp <Ntt> Encoder circuit
JPS58161191A (en) * 1982-03-19 1983-09-24 Fuji Xerox Co Ltd Storage device

Similar Documents

Publication Publication Date Title
EP0199946A2 (en) Instruction prefetch buffer control and method of controlling an instruction prefetch buffer
JPS62501047A (en) Error detection and correction system
GB1255992A (en) Data processing apparatus
JPS5886648A (en) Tracing device
JPH0193847A (en) Address extending system
JPS63155336A (en) Data processor
US6499046B1 (en) Saturation detection apparatus and method therefor
JPS63244246A (en) Wrap-around detector
JPH04323747A (en) Central arithmetic processing unit
Hsiao et al. The carry-dependent sum adder
JP2003202981A (en) Address range checking circuit and method of operation
JPH0831033B2 (en) Data processing device
JPS59184944A (en) Rounding arithmetic system
JPS59158441A (en) Pipeline control system
JPS61275936A (en) Condition determining device
JPS63150748A (en) Data processor
JPH02157938A (en) Instruction look-ahead controller
JPH02239349A (en) Circuit for detecting exception of virtual computer
JPH02141825A (en) Arithmetic unit
JPS60218135A (en) Data processor
JPS61243528A (en) Buffer memory controller
JPS62126442A (en) Data processor
JPH0540654A (en) Optional instruction tracing system
JPH0740241B2 (en) Request cancellation method
JPS63140355A (en) System for detecting trouble of store check mechanism