[go: up one dir, main page]

JPH0573298A - Tag comparing mechanism - Google Patents

Tag comparing mechanism

Info

Publication number
JPH0573298A
JPH0573298A JP3258742A JP25874291A JPH0573298A JP H0573298 A JPH0573298 A JP H0573298A JP 3258742 A JP3258742 A JP 3258742A JP 25874291 A JP25874291 A JP 25874291A JP H0573298 A JPH0573298 A JP H0573298A
Authority
JP
Japan
Prior art keywords
tag
data
bit
comparison
compared result
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
JP3258742A
Other languages
Japanese (ja)
Inventor
Koichi Takeda
浩一 武田
Teruhiko Ohara
輝彦 大原
Masatoshi Sato
正俊 佐藤
Akira Yamamoto
山本  明
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP3258742A priority Critical patent/JPH0573298A/en
Publication of JPH0573298A publication Critical patent/JPH0573298A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To easily and quickly compare only the prescribed bit of a tag part by setting the prescribed bit of the compared result outputted from a comparing part to the content decided beforehand by a compared result operating part and detecting the coincidence of a tag based on the compared result including the set bit. CONSTITUTION:This mechanism is provided with a comparing part EORG 1 to constitute the data of 1 unit of a value part and a tag part, compare the tag part of plural data for each bit to constitute the tag part and output plural compared results for each bit and a compared result operating part 5 to fix forcibly any compared result out of plural compared results to the content set beforehand. Based on the output of the compared result operating part 5, a coincidence detecting part (zero detector) 2 detects the compared result of the tag part. Here, a tag comparing enable register 3 and an AND gate 4 constitute the compared result operating part 5. Then, the increase of the degree of freedom of a program to use the tag part and the efficient use of the tag part can be performed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、1単位が値部とタグ部
から構成された複数のデータのタグ部の比較を行なうタ
グ部比較機構に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tag section comparing mechanism for comparing tag sections of a plurality of data, each unit consisting of a value section and a tag section.

【0002】[0002]

【従来の技術】プロセッサの処理対象とする1単位(1
語)のデータの形式として、データ値が設定される値部
のみから構成される場合と、この値部の他に、値部に設
定されたデータ値の属性、例えば浮動小数点と固定小数
点、単精度と倍精度、そして文字と数値を区別すための
情報(データタイプ)が設定されるタグ部を備えた形式
のものがある。
2. Description of the Related Art One unit (1
The data format of the word) consists of only the value part where the data value is set, and in addition to this value part, the attributes of the data value set in the value part, such as floating point and fixed point, single There is a format provided with a tag part in which information (data type) for distinguishing precision and double precision and characters and numbers is set.

【0003】このようなタグ部と値部を備えたデータを
取扱うプロセッサにおいて、例えば一対のデータの比較
や加減算を実施する場合、タグ部の比較を行ない、デー
タタイプが合致しているかを調べる必要がある。これ
は、データタイプの違うデータ値、例えば文字と数値の
データ値を比較や加減算を実施してしまう事態を回避す
るために行なわれる。ここでは、タグ部の比較に係る処
理を実施する機構をタグ比較機構と呼ぶことにする。
In a processor that handles data having such a tag portion and a value portion, for example, when performing comparison or addition / subtraction of a pair of data, it is necessary to compare the tag portions and check whether the data types match. There is. This is done in order to avoid a situation in which data values having different data types, for example, character values and numerical data values are compared or added / subtracted. Here, a mechanism that executes the process related to the comparison of the tag units will be referred to as a tag comparison mechanism.

【0004】図2に、従来のタグ比較機構のブロック図
を示す。図に示すように、従来のタグ比較機構10は、
exclusive-ORゲート(EORG)1から構成される比較部
と、零検出器2から構成される一致検出部から構成され
ていた。EORG1は、nbit (ビット)から構成される一
対のデータの対応するビット、例えば第1ビット(0ビ
ット),第2ビット(1ビット),第3ビット(2ビッ
ト),…毎に演算を行ない結果を出力するもので、例え
ば、n=8の場合、入力の総数が16ビット、出力が8
ビットとなる。
FIG. 2 shows a block diagram of a conventional tag comparison mechanism. As shown in the figure, the conventional tag comparison mechanism 10
The exclusive-OR gate (EORG) 1 and the zero detector 2 consisted of a comparison unit. EORG1 performs an operation for each corresponding bit of a pair of data composed of n bits (bits), for example, 1st bit (0 bit), 2nd bit (1 bit), 3rd bit (2 bits), ... The result is output. For example, when n = 8, the total number of inputs is 16 bits and the output is 8
Become a bit.

【0005】零検出器2は、入力するデータ(EORG1の
出力)のビットの全てが“0”であるかを判定する例え
ばNOR回路(論理和否定回路)から構成されるもので
ある。EORG1の入力には、一方のデータに設定されたタ
グ部のnbit のデータTagAと、他方のデータに設定され
たタグ部のnbit のデータTagBが入力する。データTagA
とデータTagBは、EORG1において演算され、nbit のデ
ータTagCとして零検出器2に入力する。零検出器2にお
いて、TagCの全てのbit (ビット)が“0”であるかを
判定し、肯定の結果、即ちビットが全て“0”であった
場合に、有効(内容“1”)のタグ判定データTagEq を
出力する。
The zero detector 2 is composed of, for example, a NOR circuit (logical sum negation circuit) for determining whether all the bits of the input data (output of EORG1) are "0". To the input of EORG1, n-bit data TagA of the tag part set in one data and n-bit data TagB of the tag part set in the other data are input. Data TagA
And the data TagB are calculated in EORG1 and input to the zero detector 2 as n-bit data TagC. In the zero detector 2, it is determined whether or not all the bits of TagC are "0", and if the result is affirmative, that is, if all the bits are "0", it is valid (content "1"). Output the tag judgment data TagEq.

【0006】ここで、図3を参照しながら、従来のタグ
比較機構の説明を行なう。図3に、従来のタグ比較機構
の動作説明図を示す。まず、タグ部のデータTagA,TagB
がビット0〜6の7ビット(n=7)で構成されている
ものとして説明を行なう。そして、データTagAの内容が
“1100011 ”、データTagBの内容が“1100011 ”である
ものとする。
The conventional tag comparison mechanism will be described below with reference to FIG. FIG. 3 shows an operation explanatory view of the conventional tag comparison mechanism. First, the data of the tag part TagA, TagB
Will be described as being composed of 7 bits (n = 7) of bits 0 to 6. Then, it is assumed that the content of the data TagA is “1100011” and the content of the data TagB is “1100011”.

【0007】これらのデータの演算がEORG1において実
施されると、内容が“0000000 ”のデータTagCがEORG1
から出力される。零検出器2では、データTagCを受入れ
ると、nビットの全てが零であるかを判定する。この場
合、全て零であるため、内容“1”のタグ判定データTa
gEq を出力する。プロセッサでは、このタグ判定データ
TagEq を認識すると、データTagA、データTagBに係るデ
ータの値部が同一のデータタイプであるものとして、値
部の比較等の演算処理を実施する。
When the operation of these data is carried out in EORG1, the data TagC having the content "0000000" becomes EORG1.
Is output from. Upon receiving the data TagC, the zero detector 2 determines whether all the n bits are zero. In this case, since all are zero, the tag determination data Ta with the content “1”
Output gEq. In the processor, this tag judgment data
When TagEq is recognized, it is assumed that the value parts of the data related to the data TagA and the data TagB have the same data type, and arithmetic processing such as comparison of the value parts is performed.

【0008】[0008]

【発明が解決しようとする課題】さて、タグ部に値部の
データタイプ以外の内容、例えば図3の第8ビット(7
ビット)にGarbage Collection(GC)の情報を持たせ
る場合がある。GCの処理中は、使用中のデータであっ
ても、GCの情報をもつビットの内容が異なる場合があ
る。並列GC処理のようにGCの処理と比較の処理が同
時に行なわれる可能性のある場合にはGCの情報をもつ
ビットの内容が異なるデータ(タグ部)同士を比較する
事態が発生する恐れがある。このような状態で、タグ部
の全てのビットを比較の対象とすると、データタイプが
一致していても、GCの相違により異なるデータタイプ
の値部として取扱われてしまう問題が生じていた。
Now, contents other than the data type of the value part in the tag part, for example, the 8th bit (7
Bit) may have information of Garbage Collection (GC). During the processing of the GC, the contents of the bits having the GC information may be different even if the data is in use. When there is a possibility that the GC processing and the comparison processing may be performed at the same time as in the parallel GC processing, there may occur a situation in which data (tag portions) having different bit contents having the GC information are compared with each other. .. In this state, if all the bits of the tag part are to be compared, even if the data types match, there is a problem that they are handled as value parts of different data types due to the difference in GC.

【0009】このため、従来はGCのビットのマスク
(0〜6ビットの切出し)を行ない7ビットのデータTa
gA,TagB を生成する機構が提案されていたが、マスク、
即ちビットの切出しを行なうために複雑な論理回路を必
要としたり、更にはタグ部の比較以外に特別な処理時間
を必要とする問題が生じていた。本発明は以上の点に着
目してなされたもので、複雑な論理回路や特別な処理時
間を費やすことなく容易かつ迅速にタグ部の所定のビッ
トのみを比較することのできるタグ比較機構を提供する
ことを目的とする。
For this reason, conventionally, a GC bit mask (cut out of 0 to 6 bits) is performed and 7-bit data Ta is used.
A mechanism for generating gA, TagB was proposed, but a mask,
That is, there has been a problem that a complicated logic circuit is required to cut out a bit and that a special processing time is required in addition to the comparison of the tag portion. The present invention has been made in view of the above points, and provides a tag comparison mechanism capable of easily and quickly comparing only predetermined bits of a tag portion without spending a complicated logic circuit or special processing time. The purpose is to do.

【0010】[0010]

【課題を解決するための手段】本発明のタグ比較機構
は、1単位のデータが値部とタグ部から構成され、複数
の前記データの前記タグ部を、当該タグ部を構成する各
ビット毎に比較し、かつ当該ビット毎に複数の比較結果
を出力する比較部と、前記複数の比較結果の内、何れか
の比較結果を、予め設定された内容に強制的に固定する
比較結果操作部と、前記比較結果操作部の出力に基づい
て、前記タグ部の比較結果を検出する一致検出部を備え
たものである。
According to the tag comparison mechanism of the present invention, one unit of data is composed of a value part and a tag part, and the tag part of a plurality of the data is set for each bit forming the tag part. And a comparison result operation unit for forcibly fixing one of the comparison results of the plurality of comparison results to a preset content. And a match detection unit for detecting the comparison result of the tag unit based on the output of the comparison result operation unit.

【0011】[0011]

【作用】この機構は、比較部から出力される比較結果の
所定のビットを、比較結果操作部において、予め決定さ
れた内容に設定する。一致検出部では、比較結果操作部
において内容が新たに設定されたビットを含む比較結果
を基に、タグ部の一致を検出する。
This mechanism sets a predetermined bit of the comparison result output from the comparison unit to the content determined in advance in the comparison result operation unit. The match detection unit detects a match between the tag units based on the comparison result including the bit newly set in the comparison result operation unit.

【0012】[0012]

【実施例】図1に、本発明のタグ比較機構に係るブロッ
ク図を示す。図に示すように、本発明のタグ比較機構1
1は、exclusive-ORゲート(EORG)1と、零検出器2、
タグ比較イネーブルレジスタ(TCER)3、そしてアンド
ゲート(ANDG)4から構成される。EORG1及び零検出器
2は、先に図2において説明した従来のものと同一であ
る。また、タグ比較イネーブルレジスタ3及びアンドゲ
ート4を総して、ここでは比較結果操作部5と呼ぶこと
にする。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows a block diagram of a tag comparison mechanism of the present invention. As shown in the figure, the tag comparison mechanism 1 of the present invention
1 is an exclusive-OR gate (EORG) 1, a zero detector 2,
It is composed of a tag comparison enable register (TCER) 3 and an AND gate (ANDG) 4. The EORG 1 and the zero detector 2 are the same as the conventional one described above with reference to FIG. The tag comparison enable register 3 and the AND gate 4 are collectively referred to as a comparison result operation unit 5 here.

【0013】TCER3は、タグ部を構成するビット数と同
一のビット数から構成されるデータSetTCER を記憶する
レジスタである。このTCER3(データSetTCER )の各ビ
ットは、EORG1から出力されるTagCの各ビットに対応
し、最上位ビット〜最下位ビットまで1対1に対応す
る。更にデータSetTCER は、この場合、強制的に内容を
“0”(予め決定された内容)に設定するデータTagCの
ビットに対応するビットが、内容“0”に設定される。
例えば、データTagCのGCに対応する第8ビットのみを
強制的に内容を“0”に設定する場合、データSetTCER
の内容は“01111111”となる。EORG1及びTCER3の出力
は、ANDG4に入力されている。ANDG4の出力は、零検出
器2に入力されている。
TCER3 is a register for storing data SetTCER having the same number of bits as the number of bits forming the tag portion. Each bit of this TCER3 (data SetTCER) corresponds to each bit of TagC output from EORG1, and has a one-to-one correspondence from the most significant bit to the least significant bit. Further, in this case, in the data SetTCER, the bit corresponding to the bit of the data TagC forcibly setting the content to “0” (predetermined content) is set to the content “0”.
For example, when forcibly setting only the 8th bit corresponding to the GC of the data TagC to "0", the data SetTCER
The content of is "01111111". The outputs of EORG1 and TCER3 are input to ANDG4. The output of ANDG4 is input to the zero detector 2.

【0014】ここで、図4を参照しながら、本発明のタ
グ比較機構の説明を行なう。図4に、本発明のタグ比較
機構の動作説明図を示す。まず、タグ部のデータTagA,T
agB は、最上位に1ビットのGCが設定された、8ビッ
ト(n=8)で構成されているものとして説明を行な
う。そして、データTagAの内容が未マーク(GC=0)
を示す“01100011”、データTagBの内容がマーク済(G
C=1)を示す“11100011”であるものとする。更に、
TCER3には、内容“01111111”のデータSetTCER が記憶
されているものとする。
The tag comparison mechanism of the present invention will be described below with reference to FIG. FIG. 4 shows an operation explanatory diagram of the tag comparison mechanism of the present invention. First, the data of the tag part TagA, T
The description will be made assuming that agB is composed of 8 bits (n = 8) in which 1-bit GC is set at the most significant position. Then, the content of the data TagA is unmarked (GC = 0)
“01100011” indicating that the content of data TagB has been marked (G
It is assumed that it is “11100011” indicating C = 1). Furthermore,
It is assumed that the TCER3 stores the data SetTCER with the content "01111111".

【0015】まず、データTagA,TagB の演算がEORG1に
おいて実施されると、内容が“10000000”のデータTagC
がEORG1から出力される。ANDG4では、データTagCとデ
ータSetTCER の演算を実施し、内容が“00000000”のデ
ータTagDを出力する。零検出器2では、データTagDを受
入れると、nビットの全てが零であるかを判定する。こ
の場合、全て零であるため、内容“1”のタグ判定デー
タTagEq を出力する。プロセッサでは、このタグ判定デ
ータTagEq を認識すると、データTagA、データTagBに係
るデータの値部が同一のデータタイプであるものとし
て、値部の比較等の演算処理を実施する。以上の説明の
ように、TCERに記憶されるデータSetTCER の内容を
“0”に設定することにより、データTagD上の所望のビ
ットを内容“0”に設定することができ、零検出器2に
よる検出結果に影響、即ちデータTagEq を無効の内容
“0”に設定する影響を及ぼすことがなくなる。
First, when the operation of the data TagA, TagB is executed in EORG1, the data TagC of which the content is "10000000"
Is output from EORG1. The ANDG4 calculates the data TagC and the data SetTCER and outputs the data TagD having the content "00000000". Upon receiving the data TagD, the zero detector 2 determines whether all n bits are zero. In this case, since all are zero, the tag determination data TagEq with the content “1” is output. When the processor recognizes the tag determination data TagEq, it determines that the value parts of the data relating to the data TagA and the data TagB have the same data type, and performs arithmetic processing such as comparing the value parts. As described above, by setting the content of the data SetTCER stored in TCER to "0", the desired bit on the data TagD can be set to the content "0". There is no influence on the detection result, that is, the influence of setting the data TagEq to the invalid content “0”.

【0016】[0016]

【発明の効果】以上説明したように、本発明によれば、
タグ部の任意のビットのみを比較の対象として意味を持
たせることができるため、タグ部の任意のビットにデー
タタイプ以外の内容を設定することができ、タグ部を利
用するプログラムの自由度の増大及びタグ部の効率的な
利用を実現することができる。また、タグ部から所望の
ビットを切出すための特別な論理回路や処理時間を必要
とせず、容易かつ迅速にタグ部の比較を実施することが
できる。
As described above, according to the present invention,
Since only the arbitrary bits in the tag part can be meaningful as the target of comparison, contents other than the data type can be set in the arbitrary bits in the tag part, and the flexibility of the program that uses the tag part can be increased. It is possible to increase the number and efficiently use the tag part. In addition, a special logic circuit for cutting out a desired bit from the tag unit and a processing time are not required, and the tag units can be easily and quickly compared.

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

【図1】本発明のタグ比較機構のブロック図である。FIG. 1 is a block diagram of a tag comparison mechanism of the present invention.

【図2】従来のタグ比較機構のブロック図である。FIG. 2 is a block diagram of a conventional tag comparison mechanism.

【図3】従来のタグ比較機構の動作説明図である。FIG. 3 is an operation explanatory view of a conventional tag comparison mechanism.

【図4】本発明のタグ比較機構の動作説明図である。FIG. 4 is an operation explanatory view of the tag comparison mechanism of the present invention.

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

1 exclusive-ORゲート(比較部) 2 零検出器(一致検出部) 3 タグ比較イネーブルレジスタ 4 アンドゲート 5 比較結果操作部 1 exclusive-OR gate (comparison unit) 2 zero detector (match detection unit) 3 tag comparison enable register 4 AND gate 5 comparison result operation unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 山本 明 東京都港区虎ノ門1丁目7番12号 沖電気 工業株式会 社内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Akira Yamamoto 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd. In-house

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 1単位のデータが値部とタグ部から構成
され、 複数の前記データの前記タグ部を、当該タグ部を構成す
る各ビット毎に比較し、かつ当該ビット毎に複数の比較
結果を出力する比較部と、 前記複数の比較結果の内、何れかの比較結果を、予め設
定された内容に強制的に固定する比較結果操作部と、 前記比較結果操作部の出力に基づいて、前記タグ部の比
較結果を検出する一致検出部を備えたことを特徴とする
タグ比較機構。
1. A unit of data is composed of a value part and a tag part, the tag parts of a plurality of the data are compared for each bit constituting the tag part, and a plurality of comparisons are made for each bit. A comparison unit that outputs a result, a comparison result operation unit that forcibly fixes one of the comparison results of the plurality of comparison results to a preset content, and based on the output of the comparison result operation unit A tag comparison mechanism comprising a match detection unit for detecting a comparison result of the tag unit.
JP3258742A 1991-09-11 1991-09-11 Tag comparing mechanism Pending JPH0573298A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3258742A JPH0573298A (en) 1991-09-11 1991-09-11 Tag comparing mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3258742A JPH0573298A (en) 1991-09-11 1991-09-11 Tag comparing mechanism

Publications (1)

Publication Number Publication Date
JPH0573298A true JPH0573298A (en) 1993-03-26

Family

ID=17324455

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3258742A Pending JPH0573298A (en) 1991-09-11 1991-09-11 Tag comparing mechanism

Country Status (1)

Country Link
JP (1) JPH0573298A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4898738A (en) * 1972-03-28 1973-12-14
JPS6491241A (en) * 1987-10-01 1989-04-10 Hitachi Ltd Data processor
JPH02113335A (en) * 1988-10-24 1990-04-25 Agency Of Ind Science & Technol Computer with tag

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4898738A (en) * 1972-03-28 1973-12-14
JPS6491241A (en) * 1987-10-01 1989-04-10 Hitachi Ltd Data processor
JPH02113335A (en) * 1988-10-24 1990-04-25 Agency Of Ind Science & Technol Computer with tag

Similar Documents

Publication Publication Date Title
KR910010301A (en) Command designation method and execution device
US11714639B2 (en) Data processing device
WO2001006353A1 (en) Conditional instruction execution in a computer
US6378067B1 (en) Exception reporting architecture for SIMD-FP instructions
JPH0573298A (en) Tag comparing mechanism
US6321248B1 (en) Process for determining an overflow to the format of the result of an arithmetic operation carried out on two operands
KR100457040B1 (en) Apparatus and method for data processing using multiply-accumulate instructions
US6122730A (en) "Test under mask high" instruction and "Test under mask low" instruction executing method and apparatus
JP3596696B2 (en) Information retrieval device
JP2615851B2 (en) Key input device
JPH06290045A (en) Arithmetic error detecting system for parallel-arithmetic operating processor
JP2833871B2 (en) Alien name data judgment method
US7395296B2 (en) Circuitry and method for performing non-arithmetic operations
JPS5933551A (en) Operand duplication detecting circuit
JPH1063482A (en) System and method for computation
JP3137636B2 (en) Data processing device
JP3522387B2 (en) Pipeline arithmetic unit
JP2909185B2 (en) Assembler processing method
KR970022528A (en) Handling exceptions in floating point dividers
JPH0573190A (en) Inputting method for numeric code
JPH03217938A (en) Floating deciaml rounding normalizing device
JPS58149571A (en) Processing system of vector operation in information processing device
JPH07134645A (en) Device for generating condition code for information processing
JPH0773015A (en) Fixed-point data adder
JPS63123133A (en) Error processing system