JPH02228733A - Information processor - Google Patents

Information processor

Info

Publication number
JPH02228733A
JPH02228733A JP1049667A JP4966789A JPH02228733A JP H02228733 A JPH02228733 A JP H02228733A JP 1049667 A JP1049667 A JP 1049667A JP 4966789 A JP4966789 A JP 4966789A JP H02228733 A JPH02228733 A JP H02228733A
Authority
JP
Japan
Prior art keywords
register
condition code
contents
bits
state
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
JP1049667A
Other languages
Japanese (ja)
Inventor
Yoshiko Miyamoto
佳子 宮本
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 JP1049667A priority Critical patent/JPH02228733A/en
Publication of JPH02228733A publication Critical patent/JPH02228733A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To minimize the number of bits of a register and to easily decide each state by outputting a condition code, which indicates the state of data held in the register, together with data after decoding this code. CONSTITUTION:When the operation between contents of registers 3 and 9 is performed in a computing element 7, the condition code is formed by a condition code forming circuit 10 and is set to a register 1. The output of a decoder 2 is used to discriminate whether the condition code meets the branch condition or not. Since the output of the decoder 2 is outputted to a bus 6 together with contents of the register 1 in parallel, this output is operated as a part of contents of the register 1. Thus, the number of bits of the register is minimized and each state is easily decided.

Description

【発明の詳細な説明】 玖血豆ヱ 本発明は情報処理装置に関し、特にデータとともにコン
デイションコードを保持するレジスタを有する情報処理
装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an information processing device, and more particularly to an information processing device having a register that holds a condition code together with data.

良氷韮韮 一般に情報処理装置においてはレジスタに保持されたデ
ータの内容すなわち、そのレジスタ内のデータの状態に
基づいて分岐命令(ジャンプ)を行うか否か等を判断す
るという制御方式が採用されているものがある。その場
合、データの各状態を示すコンデイションコードをその
データとともにレジスタ内に保持しておき、このコンデ
イションコードに基づいて判定を行っていた。
Generally, information processing devices employ a control method in which it is determined whether or not to perform a branch instruction (jump) based on the content of data held in a register, that is, the state of the data in that register. There are things that are. In this case, a condition code indicating each state of data is held in a register along with the data, and determination is made based on this condition code.

また、そのコンデイションコードを保持する方式には以
下のようなものがあった。第1に、データの各状態の種
類の数を2進′数で表し、その2進数の状態のままレジ
スタに格納するという方式がある。この方式によれば、
コンデイションコードに用いられるビットの数が最小限
に抑えられる為、レジスタのビット数が少なくて済む。
In addition, there were the following methods for holding the condition code. First, there is a method in which the number of types of each state of data is expressed as a binary number, and the number is stored in a register as it is in the binary state. According to this method,
Since the number of bits used for the condition code is minimized, the number of register bits can be reduced.

しかし、この方式では現在のレジスタの状態が各状態の
いずれにあるかの判定を行うためには、各状態1つずつ
に対して判定を行わなければならず、その判定に時間が
かかってしまうという欠点がある。
However, in this method, in order to determine which of the states the current register state is in, it is necessary to perform the determination for each state one by one, which takes time. There is a drawback.

第2に、データの各状態に1ビットを対応させ、その状
態の種類数と同じビット数のレジスタでデータを保持す
るという方式がある。この方式によれば、どの桁のビッ
トのみが「1」 (又は「OJ)であるかを判定すれば
良いため、判定がし易く、また判定時間も少くて済む。
Second, there is a method in which one bit is associated with each state of data, and the data is held in registers with the same number of bits as the number of types of the state. According to this method, it is only necessary to determine which digit of the bit is "1" (or "OJ"), which makes the determination easier and requires less time.

しかし、この方式ではレジスタのビット数が多くなって
しまい、その結果、装置を構成する回路が大きくなると
いう欠点がある。
However, this method has the drawback that the number of bits in the register increases, resulting in an increase in the size of the circuits that make up the device.

九肌立且善 本発明は上述の欠点を解決するためになされたもめて゛
あり、その目的とするところは、レジスタのビット数を
最小限に抑え、かつ各状態についての判定を容易にする
ことができる情報処理装置を提供することである。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned drawbacks, and its purpose is to minimize the number of register bits and to facilitate determination of each state. The objective is to provide an information processing device that can.

i肌五1羞 本発明による情報処理装置は、自手段内の保持データの
状態を示す状態データが保持されるNビット(Nは整数
)を含む保持手段を有する情報処理装置であって、前記
Nビットの状態データを2Nビットにデコードするデコ
ード手段を有し、前記保持データ及び前記デコード手段
によりデコードされた2Nビットのデータを出力するよ
うにしたことを特徴とする。
An information processing apparatus according to the present invention is an information processing apparatus having a holding means including N bits (N is an integer) in which state data indicating the state of data held within the own means is held, The present invention is characterized in that it has a decoding means for decoding N-bit state data into 2N bits, and outputs the held data and the 2N-bit data decoded by the decoding means.

K姐ヨ 以下、図面を用いて本発明の詳細な説明する。K-sama Hereinafter, the present invention will be explained in detail using the drawings.

第1図は、本発明による情報処理装置の一実施例の主要
部の構成を示すブロック図である1図において、本発明
の一実施例による情報処理装置はレジスタ1.3及び9
と、デコーダ2と、演算器7と、バス5.6及び8と、
コンデイションコード生成回路10と、命令続出機構1
1と、定数生成回路13とを含んで構成されている。な
お、特に明示がない限り、鉤括弧書きの数は2進数であ
るものとする。
FIG. 1 is a block diagram showing the configuration of main parts of an embodiment of an information processing apparatus according to the present invention. In FIG. 1, the information processing apparatus according to an embodiment of the present invention has registers 1.3 and 9
, decoder 2, arithmetic unit 7, buses 5.6 and 8,
Condition code generation circuit 10 and instruction succession mechanism 1
1 and a constant generation circuit 13. Note that unless otherwise specified, numbers in brackets are assumed to be binary numbers.

本実繕例は、コンデイションコードの内容による条件分
岐の例であり、コンデイションコードN−2ビットの場
合を示している。
This example is an example of conditional branching based on the contents of a condition code, and shows a case where the condition code is N-2 bits.

レジスタ1はコンデイションコードの2ビットを含むレ
ジスタである。
Register 1 is a register containing 2 bits of a condition code.

デコーダ2はコンデイションコードの2ビットをその4
つの状態が夫々1ビットに対応する様にデコードするも
のである0本実施例ではコンデイションコード「00」
をrloOO」、  r OI JをroloJ 、 
r L OJをroolo」、 ’ I L 」を「0
001」に夫々デコードするものとする。
Decoder 2 converts the 2 bits of the condition code into 4
In this embodiment, the condition code is "00".
rloOO'', r OI J roloJ,
r L OJ to rolo", 'IL' to "0"
001" respectively.

こうすることにより、レジスタの内容の各状態すなわち
各コンデイションコードがデコード結果の各桁のビット
に対応することになる。
By doing so, each state of the contents of the register, that is, each condition code, corresponds to each digit of the decoded result.

コンデイションコード生成回路10は、演算器7での演
算の状態(オーバフロー、キャリ等)をもとにコンデイ
ションコードを生成するものである。そして、その2ビ
ットのコンデイションコードの内容はレジスタ1にセッ
トされる。
The condition code generation circuit 10 generates a condition code based on the state of the operation in the arithmetic unit 7 (overflow, carry, etc.). Then, the contents of the 2-bit condition code are set in register 1.

定数生成回路13は命令読出機構11から読出された命
令の内容に応じた定数を生成するものである。
The constant generation circuit 13 generates constants according to the contents of the instruction read from the instruction reading mechanism 11.

また、この情報処理装置においてはレジスタ3の内容と
レジスタ9の内容とを演算す乞命令と、レジスタ1の内
容と上述の定数とを演算する命令と、演算器7での前回
の演算結果が0であるかどうかの判定結果に応じて分岐
を行う条件分岐命令とが規定されているものとする。
In addition, in this information processing device, there is an instruction to calculate the contents of register 3 and the contents of register 9, an instruction to calculate the contents of register 1 and the above-mentioned constant, and the result of the previous calculation in calculation unit 7. It is assumed that a conditional branch instruction is defined that branches depending on the result of determining whether the value is 0 or not.

かかる構成において、レジスタ3の内容とレジスタ9の
内容との演算時のコンデイションコードによって分岐を
行うものとする。まず、レジスタ3の内容とレジスタ9
の内容との演算が演算器7で行われるとコンデイション
コード生成回路10によりコンデイションコードが生成
され、レジスタ1にセットされる。よって、レジスタ1
のビット数は最小限に抑えることができる。
In such a configuration, branching is performed depending on the condition code when the contents of register 3 and the contents of register 9 are operated. First, the contents of register 3 and register 9
When the arithmetic unit 7 performs an operation with the contents of , a condition code is generated by the condition code generation circuit 10 and set in the register 1. Therefore, register 1
The number of bits can be minimized.

ここで、コンデイションコードが分岐の条件に合致する
かどうかを判定する為にデコーダ2の出力を使う、デコ
ーダ2の出力はレジスタ1の内容と並列にバス6に出力
される。こうすることにより、レジスタ1の内容の一部
として演算を行うことができるのである。その様子を概
念的に示したのが第2図である。
Here, the output of the decoder 2 is used to determine whether the condition code matches the branch condition.The output of the decoder 2 is output to the bus 6 in parallel with the contents of the register 1. By doing so, the operation can be performed as part of the contents of register 1. Figure 2 conceptually shows this situation.

第2図において、21はレジスタ1の内容すなわち保持
されているデータであり、22はデコーダ2によってコ
ンデイションコードをデコードした結果の出力である。
In FIG. 2, 21 is the contents of the register 1, that is, the data held, and 22 is the output of the result of decoding the condition code by the decoder 2.

つまり、レジスタ1そのものの内容とコンデイションコ
ードのデコード結果とを並列にバス6に出力しているた
め、もともとのレジスタ1の内容についての論理演算が
行えるとともにデコード結果によってコンデイションコ
ードの判定も容易に行えることになるのである。
In other words, since the contents of register 1 itself and the decoded result of the condition code are output to bus 6 in parallel, logical operations can be performed on the original contents of register 1, and it is also easy to determine the condition code based on the decoded result. This means that it can be done.

次に、コンデイションコードの判定についての具体例を
示す。
Next, a specific example of condition code determination will be shown.

コンデイションコードの判定を行う為に、デコーダ2の
出力を含むレジスタ1の内容と定数生成回路13によっ
て生成された定数との演算を行う。
In order to determine the condition code, the contents of the register 1 including the output of the decoder 2 and a constant generated by the constant generation circuit 13 are operated.

ここで、コンデイションコードが「00」または、「0
1」の場合に分岐を行いたいものとすると、デコーダ2
の出力がriQOOJまたはroloo、のとき分岐を
行うことになる。このため、対応するビットを「1」、
他のビットを「0」にし、バス幅まで拡張した定数とレ
ジスタ1の内容との論理積演算を行う、この場合、バス
ラが16ビヅトバスであるならばその定数はrQQOc
」(L 6進数)−rlloo、となる。
Here, the condition code is "00" or "0".
1”, we want to branch, then decoder 2
A branch will be taken when the output of is riQOOJ or roloo. Therefore, the corresponding bit is set to "1",
The other bits are set to 0, and the constant expanded to the bus width is ANDed with the contents of register 1. In this case, if the bus is a 16-bit bus, the constant is rQQOc.
”(L hexadecimal)-rlloo.

したがって、この定数r11QO」とデコーダ2の出力
との論理積演算を行えば、その結果がr 0000 J
〈つまり、aρgO)であるか否かで分岐の条件に合致
しているか否かを一度の演算のみで判定できるのである
。そして、その演算結果がaρgOでなければ(つまり
、真であれば)、分岐する命令が実行される。なお、定
数生成回路13からその分岐の条件に応じた定数が生成
されるように、予め命令続出機構11から命令が与えら
れる。
Therefore, if we perform an AND operation on this constant r11QO'' and the output of decoder 2, the result will be r 0000 J
(In other words, aρgO), it is possible to determine whether the branching condition is met with only one operation. If the result of the operation is not aρgO (that is, if it is true), the branching instruction is executed. Note that an instruction is given in advance from the instruction successive mechanism 11 so that the constant generation circuit 13 generates a constant according to the branch condition.

つまり、本実施例によれば、−度の演算のみでコンデイ
ションコードによる条件分岐が実現できるのである。
In other words, according to this embodiment, a conditional branch based on a condition code can be realized only by calculating - degrees.

なお、本実施例においては、デコード前のコンデイショ
ンコードが2ビットである場合について説明したが、3
ビットや4ビットでも良く、レジスタの内容の状態の種
類数に応じたビット数となるためその数に限定されない
。それらの場合、デコード後は夫々8ビット、16ビッ
トとなる。
In addition, in this embodiment, the case where the condition code before decoding is 2 bits has been explained, but the condition code is 3 bits.
It may be bits or 4 bits, and the number of bits is not limited to that number because it corresponds to the number of types of states of the contents of the register. In those cases, the data after decoding becomes 8 bits and 16 bits, respectively.

また、本実施例においては、コンデイションコードを用
いた条件分岐について説明したが、その場合に限らず、
本発明によればレジスタの内容とともに出力されている
デコード出力に対して一度の論理演算を行うだけで、そ
の内容の状態の判定結果を1ビットの数値に帰結させる
ことができるため、マイクロプログラム方式の情報処理
装置等に広く活用できるのである。
In addition, in this embodiment, conditional branching using condition codes has been explained, but this is not limited to this case.
According to the present invention, by performing a single logical operation on the decoded output that is output together with the contents of the register, the result of determining the state of the contents can be reduced to a 1-bit numerical value. It can be widely used in information processing devices, etc.

九肌五夏1 以上説明したように本発明はレジスタに保持されている
データの状態を示すコンデイションコードをデコードし
た後にそのデータとともに出力することにより、レジス
タのビット数を最小限に抑え、かつ各状態についての判
定を容易にすることができるという効果がある。
As explained above, the present invention minimizes the number of register bits by decoding the condition code indicating the state of data held in the register and then outputting it together with the data. This has the effect of making it easier to determine each state.

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

第1図は本発明の実施例による情報処理装置の主要部の
構成を示すブロック図、第2図はバス6上のデータ内容
を示す概念図である。 主要部の符号の説明 1.3.9  ・・・・・・ レジスタ2 ・・・・・
・ デコーダ 演算器 コンデイションコード 生成回路 命令続出機構 定数生成回路
FIG. 1 is a block diagram showing the configuration of the main parts of an information processing apparatus according to an embodiment of the present invention, and FIG. 2 is a conceptual diagram showing the contents of data on the bus 6. As shown in FIG. Explanation of symbols of main parts 1.3.9 ・・・・・・ Register 2 ・・・・・・
- Decoder arithmetic unit condition code generation circuit instruction continuous generation mechanism constant generation circuit

Claims (1)

【特許請求の範囲】[Claims] (1)自手段内の保持データの状態を示す状態データが
保持されるNビット(Nは整数)を含む保持手段を有す
る情報処理装置であって、前記Nビットの状態データを
2^Nビットにデコードするデコード手段を有し、前記
保持データ及び前記デコード手段によりデコードされた
2^Nビットのデータを出力するようにしたことを特徴
とする情報処理装置。
(1) An information processing device having a holding means including N bits (N is an integer) in which state data indicating the state of data held in the own means is held, the N-bit state data being stored in 2^N bits. 1. An information processing apparatus comprising: a decoding means for decoding the stored data; and outputting the held data and 2^N-bit data decoded by the decoding means.
JP1049667A 1989-03-01 1989-03-01 Information processor Pending JPH02228733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1049667A JPH02228733A (en) 1989-03-01 1989-03-01 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1049667A JPH02228733A (en) 1989-03-01 1989-03-01 Information processor

Publications (1)

Publication Number Publication Date
JPH02228733A true JPH02228733A (en) 1990-09-11

Family

ID=12837525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1049667A Pending JPH02228733A (en) 1989-03-01 1989-03-01 Information processor

Country Status (1)

Country Link
JP (1) JPH02228733A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5996070A (en) * 1996-07-30 1999-11-30 Mitsubishi Denki Kabushiki Kaisha Microprocessor capable of executing condition execution instructions using encoded condition execution field in the instructions

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5996070A (en) * 1996-07-30 1999-11-30 Mitsubishi Denki Kabushiki Kaisha Microprocessor capable of executing condition execution instructions using encoded condition execution field in the instructions

Similar Documents

Publication Publication Date Title
US4785421A (en) Normalizing circuit
US5907842A (en) Method of sorting numbers to obtain maxima/minima values with ordering
US5390307A (en) Apparatus for a multi-data store or load instruction for transferring multiple contiguous storage locations in one transfer operation
EP0221577B1 (en) Microprogram control unit
US4825355A (en) Instruction format for program control type data processing systems
US5497468A (en) Data processor that utilizes full data width when processing a string operation
KR19980032137A (en) Element Selection Mechanisms for Vector Processors
US5440504A (en) Arithmetic apparatus for digital signal processor
JPH096609A (en) Program execution device and program conversion method
JPS6351287B2 (en)
US6036350A (en) Method of sorting signed numbers and solving absolute differences using packed instructions
JP2596909B2 (en) Digital processing device with min / max search instructions
US5974539A (en) Three input arithmetic logic unit with shifter and mask generator
US5301338A (en) System including central processing unit
US5396610A (en) Register address specifying circuit for simultaneously accessing two registers
KR100285142B1 (en) Offset Value Calculation Circuit and Method of Data Processing System
JPH1091395A (en) Processor
JPH11215008A (en) Decoding circuit
JPS5860355A (en) Information processing device
US4723258A (en) Counter circuit
US4959780A (en) Microprogram processor with logic circuitry for combining signals from a microcode decoder and an instruction code decoder to produce a memory access signal
US5463747A (en) Microprogram data processor processing operand address calculation and instruction execution with common hardware
US5220670A (en) Microprocessor having ability to carry out logical operation on internal bus
JP2591250B2 (en) Data processing device
JP2005135090A (en) Arithmetic processing unit