JPH0772881B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JPH0772881B2
JPH0772881B2 JP61297764A JP29776486A JPH0772881B2 JP H0772881 B2 JPH0772881 B2 JP H0772881B2 JP 61297764 A JP61297764 A JP 61297764A JP 29776486 A JP29776486 A JP 29776486A JP H0772881 B2 JPH0772881 B2 JP H0772881B2
Authority
JP
Japan
Prior art keywords
address
size
segment
offset address
word
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 - Lifetime
Application number
JP61297764A
Other languages
Japanese (ja)
Other versions
JPS63150748A (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP61297764A priority Critical patent/JPH0772881B2/en
Publication of JPS63150748A publication Critical patent/JPS63150748A/en
Publication of JPH0772881B2 publication Critical patent/JPH0772881B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Executing Machine-Instructions (AREA)
  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ処理装置に関し,特に実アドレス生成時
にセグメント内にオペランド・アドレスが存在するかの
チェック(サイズ・チェック)に関する。
The present invention relates to a data processing device, and more particularly to a check (size check) of whether an operand address exists in a segment when a real address is generated.

〔従来の技術〕[Conventional technology]

従来,主記憶のセグメント保護のためのサイズチェック
には次のものが存在する。
Conventionally, there are the following size checks for segment protection of main memory.

実アドレス計算以前にオペランドの最大アドレスと
セグメントサイズの比較とを行なう方式。
A method that compares the maximum address of the operand with the segment size before calculating the real address.

通常演算用の演算器(ALU)とは別にサイズ・チェ
ック専用の加算器を用いてサイズチェックを行う方式。
A size check method that uses an adder dedicated to size check in addition to the normal operation unit (ALU).

同一の演算器で同時に実アドレス計算とサイズチェ
ックを実施する方式。
A method to perform real address calculation and size check at the same time with the same computing unit.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

ところで,前述のデータ処理装置におけるサイズチェッ
クの場合,の方式ではサイズチェックのためにアドレ
ス比較とこの比較結果に対する条件分岐のマイクロステ
ップとが必要となり,その結果,パフォーマンス(性
能)が低下するという問題点がある。
By the way, in the case of the size check in the above-mentioned data processing device, the method of (1) requires address comparison and a micro-step of conditional branching for this comparison result for the size check, resulting in a decrease in performance. There is a point.

また,サイズチェック方式では,サイズチェック専用
の加算器等のハードウエア量が増加するという問題点が
ある。
Further, the size check method has a problem that the amount of hardware such as an adder dedicated to the size check increases.

サイズチェック方式は上記,の方式の問題点を解
決した方式であるが,オフセットの長さに制限があり,
セグメントサイズの拡張を行うことができないという問
題点がある。
The size check method is a method that solves the problems of the above method, but the length of the offset is limited,
There is a problem that the segment size cannot be expanded.

[問題点を解決するための手段] 本発明によれば、主記憶装置が複数のセグメントに分割
されて、オペランドサイズ及びオフセットアドレスを有
するマクロ命令を格納する命令レジスタと、前記セグメ
ント毎のベースアドレス及びセグメントサイズを格納す
るセグメント情報レジスタ手段とを有し、前記セグメン
ト毎に前記ベースアドレスと前記オフセットアドレスと
に基づいて実アドレスを生成するようにしたデータ処理
装置であって、通常演算及び前記実アドレスの生成を実
行する2ワード幅の演算器と、前記オフセットアドレス
の所定部分が予め定められた値であるとき検出信号を生
成する検出手段と、前記セグメントサイズの1の補数と
前記オペランドサイズと整合する整合器とを備えてお
り、前記演算器は、前記オフセットアドレスの内上位側
に位置する上位情報と前記ベースアドレスとを加算して
加算結果を得る1ワード幅の上位ワード演算器と、前記
オフセットアドレスの所定部分より上位にある部分を上
位部分として受けとるとともに前記整合器の出力を受け
加算を実行する上位バイト演算器と、前記オフセットア
ドレスの所定部分より下位にある部分を下位部分として
受けとるとともに前記整合器の出力を受け加算を実行す
る下位バイト演算器とを備え、前記下位バイト演算器で
桁上げが発生した際前記検出信号を受けると前記上位バ
イト演算器に前記桁上げを通知する通知手段が備えら
れ、前記上位ワード演算器の加算結果と前記オフセット
アドレスの内下位側に位置する下位情報とで前記実アド
レスを示し、前記上位バイト演算器の桁上げが前記オペ
ランドサイズのサイズエラーを示すようにしたことを特
徴とするデータ処理装置が得られる。
[Means for Solving the Problems] According to the present invention, the main storage device is divided into a plurality of segments, an instruction register for storing a macro instruction having an operand size and an offset address, and a base address for each segment. And a segment information register means for storing a segment size, and a data processing device configured to generate a real address based on the base address and the offset address for each segment, the normal operation and the real A 2-word wide arithmetic unit for generating an address, a detecting means for generating a detection signal when a predetermined portion of the offset address has a predetermined value, a one's complement of the segment size, and the operand size. And a matching unit that matches the offset address, And a higher-order word arithmetic unit having a 1-word width for adding the higher-order information located on the higher-order side of the address and the base address to obtain an addition result, and a portion higher than a predetermined portion of the offset address, An upper byte arithmetic unit that receives the output of the matching unit and executes addition, and a lower byte arithmetic unit that receives the lower part of a predetermined portion of the offset address as a lower part and that receives the output of the matching unit and executes addition And a notification means for notifying the upper byte arithmetic unit of the carry when the detection signal is received when a carry occurs in the lower byte arithmetic unit, and the addition result of the upper word arithmetic unit and the offset The lower address located on the lower side of the address indicates the real address, and the carry of the upper byte arithmetic unit is the operand. The data processing device is obtained, characterized in that it has to indicate size size error.

[実施例] 次に本発明について実施例によって説明する。EXAMPLES Next, the present invention will be described with reference to examples.

第1図に本発明が適用されるデータ処理装置による実ア
ドレス生成及びセグメントのサイズ・チェックについて
示す。第1図を参照して,命令レジスタ(IR)1はマク
ロ命令を収容するレジスタであり,オペレーションコー
ド,ベース・アドレス・レジスタナンバー,オペランド
サイズ,及びオフセット・アドレスが収容されている。
セグメント情報レジスタ群(SIR)2には各セグメント
のベース・アドレス及びセグメントサイズが格納され
る。
FIG. 1 shows real address generation and segment size check by a data processor to which the present invention is applied. With reference to FIG. 1, an instruction register (IR) 1 is a register for accommodating a macro instruction, and accommodating an operation code, a base address register number, an operand size, and an offset address.
The segment information register group (SIR) 2 stores the base address and segment size of each segment.

実アドレス生成の際には,マクロ命令中のベース・アド
レス・レジスタ・ナンバーによってSIR 2から該当する
セグメントベース・アドレス及びセグメント・サイズが
取り出される。セグメントのベースアドレスは4K(Kは
正の整数)単位に設定されているから(第1図では16ビ
ットに設定されている),下位12ビットに零を付加し
て,28ビット形式に拡張する。この拡張されたベースア
ドレスにマクロ命令のオフセット・アドレス24ビットが
加算されて,実行アドレスが求められる。一方,セグメ
ントサイズのチェックの場合,SIR 2から取り出された8
ビットのセグメントサイズの下位16ビットに“1"を付加
して,24ビットに拡張したセグメントサイズ情報を得
る。さらに,マクロ命令のオフセット・アドレスにオペ
ランドサイズを加算したオペランド・マックス・アドレ
スを得る。このセグメントサイズ情報とオペランド・マ
ックス・アドレスとを比較し,オペランド・マックス・
アドレスがセグメント・サイズ情報の値を超えるとサイ
ズエラーの割込みを発生する。
When generating a real address, the corresponding segment base address and segment size are fetched from SIR 2 according to the base address register number in the macro instruction. The base address of the segment is set in units of 4 K (K is a positive integer) (set to 16 bits in Fig. 1), so zero is added to the lower 12 bits to expand to 28-bit format. To do. The offset address 24 bits of the macro instruction is added to this extended base address to obtain the execution address. On the other hand, in the case of checking the segment size, 8 extracted from SIR 2
"1" is added to the lower 16 bits of the bit segment size to obtain segment size information extended to 24 bits. Further, the operand max address obtained by adding the operand size to the offset address of the macro instruction is obtained. This segment size information is compared with the operand max address, and the operand max.
If the address exceeds the segment size information value, a size error interrupt is generated.

第2図に本発明によるデータ処理装置の一実施例を示
す。マクロ命令の実行に先立ってオペランドの実アドレ
ス計算を実施する際,セグメント情報レジスタ2に収容
されたセグメントベースアドレスと命令レジスタ1に格
納されたマクロ命令のオフセットアドレスの上位12ビッ
トが上位ワード演算器5に入力され,加算される。
FIG. 2 shows an embodiment of the data processing device according to the present invention. When the real address calculation of the operand is performed prior to the execution of the macro instruction, the upper 12 bits of the segment base address stored in the segment information register 2 and the offset address of the macro instruction stored in the instruction register 1 are the upper word operation unit. It is input to 5 and added.

下位ワード演算器10は上位バイト演算器6及び下位バイ
ト演算器7を備えており,上位バイト演算器6と下位バ
イト演算器7とはアンドゲート8を介して連結されてい
る。そして,命令レジスタ1のオフセットアドレス上位
8ビットが上位バイト演算器6に入力され,オフセット
アドレス下位8ビットが下位バイト演算器7に入力され
る。
The lower word arithmetic unit 10 includes an upper byte arithmetic unit 6 and a lower byte arithmetic unit 7, and the upper byte arithmetic unit 6 and the lower byte arithmetic unit 7 are connected via an AND gate 8. Then, the upper 8 bits of the offset address of the instruction register 1 are input to the upper byte calculator 6 and the lower 8 bits of the offset address are input to the lower byte calculator 7.

一方,オフセットアドレスの中位8ビットが状態検出回
路4に入力され,状態検出回路4の出力はアンドゲート
に入力されている。さらに,セグメント情報レジスタ2
のセグメントサイズ及び命令アドレスレジスタ1のオペ
ランドサイズが整合器3に入力され,整合器3の出力は
上位バイト演算器6及び下位バイト演算器7に入力され
る。上位バイト演算器6は上位ワード演算器5に接続さ
れている。なお,後述するように上位ワード演算器5の
演算結果はメモリアドレスレジスタ(MAR)9の上位16
ビットに格納され,一方,命令レジスタ1のオフセット
アドレスの下位12ビットがMAR 9の下位12ビットに格納
される。
On the other hand, the middle 8 bits of the offset address are input to the state detection circuit 4, and the output of the state detection circuit 4 is input to the AND gate. In addition, segment information register 2
The segment size and the operand size of the instruction address register 1 are input to the matching unit 3, and the output of the matching unit 3 is input to the upper byte calculator 6 and the lower byte calculator 7. The upper byte calculator 6 is connected to the upper word calculator 5. As will be described later, the operation result of the upper word operation unit 5 is the upper 16 bits of the memory address register (MAR) 9.
Stored in bits, while the lower 12 bits of the offset address of instruction register 1 are stored in the lower 12 bits of MAR 9.

整合器3はオペランドサイズをセグメントサイズの“1
の補数”に整合し,セグメントサイズ及びオペランドサ
イズを出力する。ところで,オフセットアドレスは24ビ
ットであり,一方,下位ワード演算器10は16ビット幅で
ある。ところが,セグメントサイズの“1の補数”は上
位8ビット以外すべて“零”となるので,状態検出回路
4はオフセットアドレスの中位8ビットがすべて“1"の
状態を検出する。状態検出回路4で上記のすべて“1"の
状態が検出されると,下位バイト演算器7からの桁上げ
がアンドゲート8を通して上位バイト演算器6に対して
伝達される。一方,状態検出回路4ですべて“1"の状態
が検出されなければ,アンドゲード8がオンとならず,
桁上げは伝達されない。そして,上位バイト演算器6か
らの桁上げによってサイズエラーが示される。
The matching unit 3 sets the operand size to the segment size “1”.
And outputs the segment size and operand size. By the way, the offset address is 24 bits, while the lower word operation unit 10 is 16 bits wide. However, the segment size is "1's complement". Since all except the upper 8 bits are "zero", the state detection circuit 4 detects a state in which the middle 8 bits of the offset address are all "1". When detected, the carry from the lower byte arithmetic unit 7 is transmitted to the upper byte arithmetic unit 6 through the AND gate 8. On the other hand, if the state detection circuit 4 does not detect all "1" states, And Gade 8 does not turn on,
Carries are not transmitted. Then, the carry from the upper byte calculator 6 indicates a size error.

さらに,上述の実アドレス計算において,サイズエラー
が発生しなかった場合,上位ワード演算器5からの演算
結果16ビットとオフセットアドレスの下位12ビットとを
合せて28ビットとしてメモリアドレスレジスタ(MAR)
9に格納される。
Furthermore, in the above real address calculation, if no size error occurs, the operation result 16 bits from the upper word operation unit 5 and the lower 12 bits of the offset address are combined to form 28 bits, and the memory address register (MAR)
9 is stored.

このように,第2図においては,第1図の用いて説明し
たセグメントサイズ情報とオペランドマックスアドレス
との比較をオフセットアドレス,セグメントサイズの
“1の補数",及びオペランドサイズの加算で行ってい
る。
As described above, in FIG. 2, the segment size information described with reference to FIG. 1 is compared with the operand max address by adding the offset address, the segment size “1's complement”, and the operand size. .

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明では実アドレス生成時に上位
ワード演算器でセグメント・ベース・アドレスとオフセ
ット・アドレスの加算を行い,下位ワード演算器でオペ
ランドサイズ・チェックを同時に実施して,状態検出回
路でオフセットアドレスの所定の部分の状態を検出し
て,桁上げの伝達を制御するようにしたから,オフセッ
トアドレスがワード幅を超えている場合でもサイズ・チ
ェック専用の加算器の追加等が不要であり,その結果,
最小のハードウエア増加にて実アドレス計算とサイズチ
ェックとを同時に実施して,システム全体のパフォーマ
ンス(性能)が向上できる。
As described above, in the present invention, when the real address is generated, the segment base address and the offset address are added by the upper word arithmetic unit, and the operand size check is simultaneously executed by the lower word arithmetic unit, and the state detection circuit is executed. Since the transfer of the carry is controlled by detecting the state of the specified part of the offset address, it is not necessary to add an adder dedicated to size check even if the offset address exceeds the word width. ,as a result,
Real address calculation and size check can be performed at the same time with the minimum increase in hardware, and overall system performance can be improved.

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

第1図は本発明によるデータ処理装置における実アドレ
ス生成及びサイズ・チェックを説明するための図,第2
図は本発明によるデータ処理装置のハード・ウエア構成
を示すブロック図である。 1……命令レジスタ(IR),2……セグメント情報レジス
タ群(SIR),3……整合器,4……状態検出回路,5……上
位ワード演算器,6……上位バイト演算器,7……下位バイ
ト演算器,8……アンドゲート,9……メモリ・アドレス・
レジスタ(MAR),10……下位ワード演算器。
FIG. 1 is a diagram for explaining real address generation and size check in a data processing device according to the present invention, and FIG.
FIG. 1 is a block diagram showing a hardware configuration of a data processing device according to the present invention. 1 ... Instruction register (IR), 2 ... Segment information register group (SIR), 3 ... Matching unit, 4 ... Status detection circuit, 5 ... High-order word calculator, 6 ... High-order byte calculator, 7 ...... Lower-order byte calculator, 8 …… And gate, 9 …… Memory address ・
Register (MAR), 10 ... Lower word operation unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】主記憶装置が複数のセグメントに分割され
て、オペランドサイズ及びオフセットアドレスを有する
マクロ命令を格納する命令レジスタと、前記セグメント
毎のベースアドレス及びセグメントサイズを格納するセ
グメント情報レジスタ手段とを有し、前記セグメント毎
に前記ベースアドレスと前記オフセットアドレスとに基
づいて実アドレスを生成するようにしたデータ処理装置
であって、通常演算及び前記実アドレスの生成を実行す
る2ワード幅の演算器と、前記オフセットアドレスの所
定部分が予め定められた値であるとき検出信号を生成す
る検出手段と、前記セグメントサイズの1つの補数と前
記オペランドサイズと整合する整合器とを備えており、
前記演算器は、前記オフセットアドレスの内上位側に位
置する上位情報と前記ベースアドレスとを加算して加算
結果を得る1ワード幅の上位ワード演算器と、前記オフ
セットアドレスの所定部分より上位にある部分を上位部
分として受けとるとともに前記整合器の出力を受け加算
を実行する上位バイト演算器と、前記オフセットアドレ
スの所定部分より下位にある部分を下位部分として受け
るとともに前記整合器の出力を受け加算を実行する下位
バイト演算器とを備え、前記下位バイト演算器で桁上げ
が発生した際前記検出信号を受けると前記上位バイト演
算器に前記桁上げを通知する通知手段が備えられ、前記
上位ワード演算器の加算結果と前記オフセットアドレス
の内下位側に位置する下位情報とで前記実アドレスを示
し、前記上位バイト演算器の桁上げが前記オペランドサ
イズのサイズエラーを示すようにしたことを特徴とする
データ処理装置。
1. A main memory device is divided into a plurality of segments, an instruction register for storing a macro instruction having an operand size and an offset address, and segment information register means for storing a base address and a segment size for each segment. And a data processing device for generating a real address on the basis of the base address and the offset address for each segment, which is a 2-word wide operation for performing normal calculation and generation of the real address. A detector, a detector for generating a detection signal when a predetermined portion of the offset address has a predetermined value, and a matcher matching one complement of the segment size and the operand size,
The arithmetic unit is higher than a 1-word-wide upper word arithmetic unit that obtains the addition result by adding the upper information located on the upper side of the offset address and the base address, and higher than a predetermined portion of the offset address. A high-order byte arithmetic unit that receives a portion as a high-order portion and receives the output of the matching unit and executes addition, and a portion that is lower than a predetermined portion of the offset address as a lower-order portion and receives the output of the matching unit and performs addition. A lower byte operation unit for executing, and a notification means for notifying the upper byte operation unit of the carry when receiving a detection signal when a carry occurs in the lower byte operation unit, the upper word operation The actual address is indicated by the addition result of the register and the lower information located on the lower side of the offset address, and the upper address is indicated. The data processing apparatus characterized by carry the calculator is to indicate the size errors of the operand size.
JP61297764A 1986-12-16 1986-12-16 Data processing device Expired - Lifetime JPH0772881B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61297764A JPH0772881B2 (en) 1986-12-16 1986-12-16 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61297764A JPH0772881B2 (en) 1986-12-16 1986-12-16 Data processing device

Publications (2)

Publication Number Publication Date
JPS63150748A JPS63150748A (en) 1988-06-23
JPH0772881B2 true JPH0772881B2 (en) 1995-08-02

Family

ID=17850871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61297764A Expired - Lifetime JPH0772881B2 (en) 1986-12-16 1986-12-16 Data processing device

Country Status (1)

Country Link
JP (1) JPH0772881B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445729B (en) * 2020-11-30 2024-04-16 深圳开立生物医疗科技股份有限公司 Operation address determination method, PCIe system, electronic device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58161191A (en) * 1982-03-19 1983-09-24 Fuji Xerox Co Ltd Storage device
JPS59188900A (en) * 1983-04-12 1984-10-26 Nec Corp Data processor

Also Published As

Publication number Publication date
JPS63150748A (en) 1988-06-23

Similar Documents

Publication Publication Date Title
US11580234B2 (en) Implicit integrity for cryptographic computing
KR100982145B1 (en) A method for configurable address mapping
TWI470545B (en) Apparatus,processor,system,method,instruction,and logic for performing range detection
US10223117B2 (en) Execution flow protection in microcontrollers
US3806716A (en) Parity error recovery
CN101689233A (en) Standby operation of a resonant power converter
CN113342671A (en) Method, device, electronic equipment and medium for verifying operation module
US6484314B1 (en) Exception handling method and system
JPH0772881B2 (en) Data processing device
EP0265948B1 (en) Data processor capable of immediately calculating branch address in relative address branch
EP4369233A1 (en) Control method and apparatus for safety boot of chip, electronic device and storage medium
Deguchi et al. Evaluation of low-cost operation of a malware detection mechanism using processor information targeting the iot
JP3310316B2 (en) Arithmetic unit
JPH02287625A (en) Single chip microcomputer
JPS59188900A (en) Data processor
JPH0371236A (en) Error detecting system
JP2000040081A (en) Vector data processor
JPWO2006129356A1 (en) Information processing apparatus and error calculation detection method thereof
JPS59123055A (en) Instruction processing system
JP2558152B2 (en) Counter error detector
JPS5827248A (en) Integrated circuit
JPS584446A (en) Microprogram controller
JP2786215B2 (en) Restart processing control method
JP5529794B2 (en) Microcomputer and abnormal memory access detection method
JPH04138532A (en) Runaway detecting circuit

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term