JP2629899B2 - Tag branching device - Google Patents

Tag branching device

Info

Publication number
JP2629899B2
JP2629899B2 JP26861488A JP26861488A JP2629899B2 JP 2629899 B2 JP2629899 B2 JP 2629899B2 JP 26861488 A JP26861488 A JP 26861488A JP 26861488 A JP26861488 A JP 26861488A JP 2629899 B2 JP2629899 B2 JP 2629899B2
Authority
JP
Japan
Prior art keywords
branch
tag
instruction
address
register
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
JP26861488A
Other languages
Japanese (ja)
Other versions
JPH02114332A (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
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP26861488A priority Critical patent/JP2629899B2/en
Publication of JPH02114332A publication Critical patent/JPH02114332A/en
Application granted granted Critical
Publication of JP2629899B2 publication Critical patent/JP2629899B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30181Instruction operation extension or modification
    • G06F9/30192Instruction operation extension or modification according to data descriptor, e.g. dynamic data typing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はタグ分岐装置、特にLispやPrologに代表され
るAl向きプログラミング言語の高速実行を目的とした計
算機システムにおけるデータタイプによる多方向に分岐
するタグ分岐装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a tag branching device, in particular, a multi-directional branch by a data type in a computer system aiming at high-speed execution of an Al-oriented programming language represented by Lisp or Prolog. And a tag branching device.

〔従来の技術〕[Conventional technology]

LispやPrologと言ったAl向きプログラミング言語の特
徴は制御の流れが実行時になって決定されることであ
る。これらの言語ではデータの型宣言が無く、変数には
いずれのデータタイプが代入されても良い。その結果、
プログラム作成が容易になるのと引き替えにプログラム
の実行時に動的にデータタイプチェックを行ない処理内
容、即ち実行順序を決定していかなければならない。Li
spマシン、Prologマシン等のAl向きプログラミング言語
を専用に実行するマシンでは実行速度の向上を図るため
このようなデータタイプ判定を高速化するバードウェア
を備えるのが一般的である。その一例がタグ分岐装置で
ある。
A feature of Al-oriented programming languages such as Lisp and Prolog is that the flow of control is determined at runtime. In these languages, there is no data type declaration, and any data type may be assigned to a variable. as a result,
In exchange for facilitating program creation, it is necessary to dynamically check the data type at the time of execution of the program and determine the processing contents, that is, the execution order. Li
In general, machines that exclusively execute an Al-oriented programming language, such as an sp machine and a Prolog machine, are provided with birdware that speeds up such data type determination in order to improve the execution speed. One example is a tag branching device.

タグ分岐とは、全ての語にデータタイプを表現するた
めに設けた特別のタグビットを利用して分岐命令におけ
る分岐先アドレスを変更し、データタイプに応じた処理
ルーチンを選択できるようにする機能である。従来のタ
グ分岐装置は、この目的のためにはデータタイプに対応
する分岐オフセットを予め専用のメモリに格納してお
き、チェックしたいデータのタグビットパターンを該メ
モリのアドレスとして与えることによって、データタイ
プに対応した分岐オフセット情報を読み出し、これを分
岐先アドレスに加算、もしくは挿入する方法により分岐
先の変更を動的におこなうのが普通であった。
Tag branching is a function that changes the branch destination address in a branch instruction by using a special tag bit provided to express the data type in every word, and allows a processing routine according to the data type to be selected. It is. For this purpose, a conventional tag branching device stores a branch offset corresponding to a data type in a dedicated memory in advance, and gives a tag bit pattern of data to be checked as an address of the memory, thereby obtaining a data type. It is usual to dynamically change the branch destination by reading the branch offset information corresponding to the branch destination and adding or inserting this to the branch destination address.

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

上述した従来のタグ分岐装置による方法は機械語(も
しくはマイクロ)命令サイクルが比較的遅い場合には有
効であったが、最近のマイクロプロセッサ技術の進歩、
特にRISC型プロセッサの出現により命令サイクルタイム
が数十ナノ秒になってくると、レジスタ中のタグ情報の
読み出しから該専用メモリからの分岐オフセットの読み
出しまでが1マシンサイクルにはいらない問題が発生す
る。一般に、マシンサイクルの短縮のためにはパイプラ
イン制御方式を採用することが必須であって、従来方式
により分岐アドレスの計算に1サイクル余計に必要とな
ることはパイプラインの乱れを引き起こす結果になる。
While the above-described conventional tag branching method has been effective when the machine language (or micro) instruction cycle is relatively slow, recent advances in microprocessor technology,
In particular, when the instruction cycle time becomes several tens of nanoseconds due to the emergence of the RISC type processor, there is a problem that the process from reading the tag information in the register to reading the branch offset from the dedicated memory does not fit in one machine cycle. . In general, it is necessary to employ a pipeline control method in order to reduce a machine cycle, and if the conventional method requires an extra cycle to calculate a branch address, the pipeline will be disturbed. .

更に、分岐オフセット情報そのものは普通2〜3ビッ
ト(4〜8方向分岐に対応)でよいが、分岐パターンは
複数必要である。例えばタグビットが6ビットの場合は
64通りのデータタイプを表現可能であるが、これらを数
値データとそれ以外に分ける分岐パターン、整数と浮動
小数点とそれ以外に分ける分岐パターン等、数種類用意
する必要がある。結果として分岐オフセット情報を格納
するメモリは例えば8種類のパータンを格納したとして
64×8=512語の長さが必要となりアドレスデコード回
路が大きくなり、データの読み出しパスも長くなる。こ
れも分岐オフセットの読み出しを遅くする原因になる。
Further, the branch offset information itself may be usually 2 to 3 bits (corresponding to 4 to 8 direction branches), but a plurality of branch patterns are required. For example, if the tag bit is 6 bits,
Although 64 data types can be expressed, it is necessary to prepare several types, such as a branch pattern that divides these into numerical data and others, and a branch pattern that divides them into integers, floating-points, and others. As a result, the memory for storing the branch offset information stores, for example, eight types of patterns.
A length of 64 × 8 = 512 words is required, the size of the address decoding circuit becomes large, and the data read path becomes long. This also causes the reading of the branch offset to be delayed.

本発明はこのような従来方式の欠点を解決し、パイプ
ライン制御方式計算機システムにおいて命令デーコード
フェーズの1マシンサイクルでデータタイプに対応する
分岐アドレスを生成可能とすることが目的である。
An object of the present invention is to solve such a drawback of the conventional method and to enable a pipeline control type computer system to generate a branch address corresponding to a data type in one machine cycle of an instruction decoding phase.

〔課題を解決するための手段〕[Means for solving the problem]

本発明のタグ分岐装置は、データタイプを表すタグ情
報を格納するためのタグレジスタと、タグ情報に対応す
る分岐アドレス情報を複数個格納するタグ分岐メモリ
と、機械語命令を格納する命令レジスタと、次に実行す
べき機械語命令アドレスを保持するプログラムカウンタ
とを備え、 タグ情報の格納を要求する命令デコードフェーズにお
いて該タグレジスタにタグ情報を格納する手段と、 分岐命令のデコードフェーズにおいて該タグレジスタ
に格納されているタグ情報に従って該タグ分岐メモリを
読み出す手段と、 該タグ分岐メモリから読み出された複数個の分岐アド
レス情報の1つを選択する手段と、 該プログラムカウンタに格納されている次の命令アド
レスに該分岐命令の分岐オフセットを加算する手段と、 加算された該命令アドレスの下位ビットに該タグ分岐
メモリから読み出され選択された分岐アドレス情報を挿
入する手段とを設けたことを特徴とする。
A tag branch device of the present invention includes a tag register for storing tag information indicating a data type, a tag branch memory for storing a plurality of branch address information corresponding to the tag information, and an instruction register for storing a machine language instruction. Means for storing tag information in the tag register in an instruction decoding phase for requesting storage of tag information, and a program counter for holding a machine instruction address to be executed next; Means for reading the tag branch memory according to the tag information stored in the register; means for selecting one of a plurality of pieces of branch address information read from the tag branch memory; stored in the program counter Means for adding the branch offset of the branch instruction to the next instruction address, and the added instruction address Characterized in that the lower bits of the scan and a means for inserting the branch address information selected is read from the tag branch memory.

〔作用〕[Action]

まず、分岐命令に先立ち、これからデータタイプを判
定しようとする語のタグビットフィールドを該タグレジ
スタへ格納するよう直前の命令で指示する。この指定方
法はプログラマが陽に指示しても良いし、レジスタ等へ
のデータの格納時に並行してハードウェアが自動的に行
なっても良い。
First, prior to the branch instruction, the immediately preceding instruction instructs to store the tag bit field of the word whose data type is to be determined in the tag register. This designation method may be explicitly specified by a programmer, or may be automatically performed by hardware in parallel with data storage in a register or the like.

命令レジスタに読み出された分岐命令は直ちにデコー
ドされ、命令中に含まれる分岐オフセットがプログラム
カウンタに加算される。一方、タグレジスタへのタグ情
報のセットが直前の命令デコードフェーズの終りで行わ
れると引続く分岐命令のデコードフェーズではすぐにタ
グ分岐メモリの読み出しが行われ、前記分岐アドレスの
生成と並行してタグ情報に対応する分岐オフセットが求
められる。同時に、該分岐命令に含まれる分岐パターン
番号によりタグ分岐メモリの出力データの中から必要な
分岐オフセットの選択が行われる。上記の操作により、
データタイプに対応した分岐先アドレスの生成は分岐命
令のデコードフェーズで完了し、分岐命令の実行フェー
ズでは分岐先機械語命令の読み出しが可能となる。
The branch instruction read into the instruction register is immediately decoded, and the branch offset included in the instruction is added to the program counter. On the other hand, when the tag information is set in the tag register at the end of the immediately preceding instruction decode phase, the tag branch memory is immediately read in the subsequent branch instruction decode phase, and in parallel with the generation of the branch address. A branch offset corresponding to the tag information is obtained. At the same time, a necessary branch offset is selected from the output data of the tag branch memory according to the branch pattern number included in the branch instruction. By the above operation,
The generation of the branch destination address corresponding to the data type is completed in the branch instruction decode phase, and the branch destination machine language instruction can be read in the branch instruction execution phase.

〔実施例〕〔Example〕

次に本発明について図面を参照して説明する。 Next, the present invention will be described with reference to the drawings.

第1図は本発明の一実施例であるAl向き専用計算機シ
ステムに実現されたタグ分岐装置のハードウェアブロッ
ク図である。本システムは各語にデータタイプを表す6
ビットのタグビットを持つ、1語40ビット構成の計算機
システムである。第1図において、1は6ビットのタグ
情報を格納するタグレジスタ、2はデータタイプに対応
した分岐オフセット(3ビット)を各データタイプ毎に
8個格納できる24ビット×64語のタグ分岐メモリ、3は
デコードフェーズの命令を保持する命令レジスタ、4は
次に実行すべき命令のアドレスを保持するプログラムカ
ウンタ、5は命令レジスタ3に格納されている分岐命令
で指定される分岐パターン番号によってタグ分岐メモリ
2から出力される8個の分岐オフセットのひとつを選択
するセレクタ、6はプログラムカウンタ4の内容と命令
レジスタ3に格納されている分岐命令で指定される分岐
オフセットを加算して分岐先の絶対アドレスを計算する
加算器、7は命令レジスタ3に格納されている分岐命令
により該計算された分岐アドレスから命令を読み出すよ
う選択するセレクタ、8は命令レジスタ3に格納されて
いる命令がタグ分岐命令であることを識別するデコーダ
である。
FIG. 1 is a hardware block diagram of a tag branching device implemented in a dedicated Al-oriented computer system according to one embodiment of the present invention. The system represents the data type for each word 6
This is a computer system with 40 bits per word, which has tag bits. In FIG. 1, 1 is a tag register for storing 6-bit tag information, and 2 is a 24-bit × 64-word tag branch memory capable of storing eight branch offsets (3 bits) corresponding to data types for each data type. 3, an instruction register for holding an instruction in the decode phase; 4, a program counter for holding the address of the next instruction to be executed; and 5, a tag with a branch pattern number specified by a branch instruction stored in the instruction register 3. The selector 6 selects one of the eight branch offsets output from the branch memory 2. The selector 6 adds the contents of the program counter 4 and the branch offset specified by the branch instruction stored in the instruction register 3 to determine the branch destination. The adder 7 calculates an absolute address. The adder 7 calculates the absolute address from the branch address calculated by the branch instruction stored in the instruction register 3. Selector for selecting to read a decree, 8 is a decoder for identifying the instruction stored in the instruction register 3 is tag branch instruction.

次に本実施例の動作を詳しく説明する。 Next, the operation of this embodiment will be described in detail.

第2図は本発明の動作を説明するためのタイミング図
である。
FIG. 2 is a timing chart for explaining the operation of the present invention.

本実施例の計算機システムは機械語命令の実行を命令
フェッチ、デコード、実行の3ステージにわけて行うパ
イプライン制御方式の計算機である。マシンサイクルは
50nsecで2相のクロックにより制御される。デコードフ
ェーズでは命令のデコードをサイクルの前半でおこなう
と共に、後半の半サイクルで実行フェーズに備えて命令
オペランドで指定されたレジスタの読み出しをおこなっ
てしまう。タグレジスタ1へのタグ情報のセットは機械
語命令で直接指定する方式を採用した。
The computer system of the present embodiment is a computer of a pipeline control system that executes machine language instructions in three stages of instruction fetch, decode, and execution. Machine cycle
It is controlled by a two-phase clock in 50 nsec. In the decode phase, the instruction is decoded in the first half of the cycle, and in the latter half cycle, the register specified by the instruction operand is read in preparation for the execution phase. The method of directly specifying the tag information in the tag register 1 by a machine language instruction is employed.

まず、分岐命令の直前の命令においてタグレジスタ1
へのセットが指定されると、この命令のデコードフェー
ズの後半において必要なデータバスより6ビットのタグ
ビットパターンの読み出しが行われ、次のマシンサイク
ルの開始のクロックでタグレジスタ1へセットさる。
First, in the instruction immediately before the branch instruction, the tag register 1
Is set, the 6-bit tag bit pattern is read from the necessary data bus in the latter half of the decode phase of this instruction, and is set in the tag register 1 at the start of the next machine cycle.

一方、分岐命令はデコードフェーズ前半においてプロ
グラムカウンタ4と分岐命令に含まれる分岐オフセット
が加算されて分岐先のベースアドレスが生成される。同
時に、直前の命令によってセットされたタグレジスタ1
の内容はタグ分岐メモリ2へのアドレスとして供給され
データタイプに対応する分岐オフセット情報が8パター
ン分まとめて読み出される。分岐命令に含まれるパター
ン番号によりセレクタ5が働き、パターン番号に対応す
る分岐オフセットが加算器6によって生成された分岐先
ベースアドレスの下位3ビットに連結される。デコーダ
8による分岐命令のデコードによりセレクタ7が働き、
最終的に“プログラムカウンタ4の値+分岐オフセット
+タグ分岐オフセット”が次の命令フェッチアドレスと
して選択される。
On the other hand, the branch instruction adds the program counter 4 and the branch offset included in the branch instruction in the first half of the decode phase to generate the base address of the branch destination. At the same time, the tag register 1 set by the previous instruction
Is supplied as an address to the tag branch memory 2, and branch offset information corresponding to the data type is read out collectively for eight patterns. The selector 5 operates according to the pattern number included in the branch instruction, and the branch offset corresponding to the pattern number is connected to the lower three bits of the branch destination base address generated by the adder 6. The selector 7 operates by decoding the branch instruction by the decoder 8, and
Finally, “value of program counter 4 + branch offset + tag branch offset” is selected as the next instruction fetch address.

タグ分岐メモリ2は8種類の分岐パターンを一語にま
とめてあるためメモリの語数はデータタイプの数である
64語に減少されている。
The tag branch memory 2 has eight types of branch patterns combined into one word, so the number of words in the memory is the number of data types.
It has been reduced to 64 words.

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

以上のごとく本発明によれば、パイプラインで流れる
直前の命令によってタグレジスタをセットし、分岐命令
のデコード時には分岐アドレスの計算と並行してタグ分
岐メモリをアクセスすること、およびタグ分岐メモリに
は複数分岐パターンを1語にまとめて格納することによ
りタグ分岐メモリの語数をデータタイプ数分に抑えるこ
とにより読み出し高速化を図り、機械語命令のデコード
フェーズにおいて分岐先アドレスを作成することを可能
とせしめ、従来方式では2マシンサイクルを要するタグ
分岐を1マシンサイクルで実現することが可能となっ
た。データタイプによる多方向分岐はAl向き計算機シス
テムにおいて最も基本的な処理であり、本発明により実
行速度の高速化とパイプライン制御の乱れを回避できる
という効果がある。
As described above, according to the present invention, the tag register is set by the instruction immediately before flowing in the pipeline, the tag branch memory is accessed in parallel with the calculation of the branch address when the branch instruction is decoded, and the tag branch memory is By storing a plurality of branch patterns in one word, the number of words in the tag branch memory is reduced to the number of data types, thereby increasing the speed of reading and making it possible to create a branch destination address in the machine language instruction decoding phase. At least, in the conventional method, tag branching requiring two machine cycles can be realized in one machine cycle. Multidirectional branching by data type is the most basic processing in an Al-oriented computer system, and the present invention has the effect of increasing execution speed and avoiding disturbance of pipeline control.

更に、タグ分岐メモリの語数の削減はVLSI化をはかる
際に配線遅延を減らす効果があり本発明は計算機システ
ムの小型化を図る上でも効果がある。
Further, the reduction in the number of words in the tag branch memory has the effect of reducing wiring delay when implementing VLSI, and the present invention is also effective in reducing the size of a computer system.

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

第1図は本発明の一実施例であるタグ分岐装置のハード
ウェアブロック図、第2図は本発明の動作を説明するタ
イミング図である。 1……タグレジスタ、2……タグ分岐メモリ、3……命
令レジスタ、4……プログラムカウンタ、5……セレク
タ、6……加算器、7……セレクタ、8……デコーダ。
FIG. 1 is a hardware block diagram of a tag branching device according to one embodiment of the present invention, and FIG. 2 is a timing chart for explaining the operation of the present invention. 1 ... tag register, 2 ... tag branch memory, 3 ... instruction register, 4 ... program counter, 5 ... selector, 6 ... adder, 7 ... selector, 8 ... decoder.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】データタイプを表すタグ情報を格納するた
めのタグレジスタと、タグ情報に対応する分岐アドレス
情報を複数個格納するタグ分岐メモリと、機械語命令を
格納する命令レジスタと、次に実行すべき機械語命令ア
ドレスを保持するプログラムカウンタとを備え、 タグ情報の格納を要求する命令デコードフェーズにおい
て該タグレジスタにタグ情報を格納する手段と、 分岐命令のデコードフェーズにおいて該タグレジスタに
格納されているタグ情報に従って該タグ分岐メモリを読
み出す手段と、 該タグ分岐メモリから読み出された複数個の分岐アドレ
ス情報の1つを選択する手段と、 該プログラムカウンタに格納されている次の命令アドレ
スに該分岐命令の分岐オフセットを加算する手段と、 加算された該命令アドレスの下位ビットに該タグ分岐メ
モリから読み出され選択された分岐アドレス情報を挿入
する手段とを設けたことを特徴とするタグ分岐装置。
A tag register for storing tag information representing a data type; a tag branch memory for storing a plurality of branch address information corresponding to the tag information; an instruction register for storing a machine language instruction; A program counter for holding a machine language instruction address to be executed, means for storing tag information in the tag register in an instruction decode phase for requesting storage of tag information, and storing in the tag register in a branch instruction decode phase Means for reading the tag branch memory in accordance with the tag information being set, means for selecting one of a plurality of pieces of branch address information read from the tag branch memory, and a next instruction stored in the program counter Means for adding a branch offset of the branch instruction to the address, and a lower bit of the added instruction address. Tags drop device is characterized by providing a means for inserting the branch address information selected is read from the tag branch memory bets.
JP26861488A 1988-10-24 1988-10-24 Tag branching device Expired - Lifetime JP2629899B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26861488A JP2629899B2 (en) 1988-10-24 1988-10-24 Tag branching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26861488A JP2629899B2 (en) 1988-10-24 1988-10-24 Tag branching device

Publications (2)

Publication Number Publication Date
JPH02114332A JPH02114332A (en) 1990-04-26
JP2629899B2 true JP2629899B2 (en) 1997-07-16

Family

ID=17460990

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26861488A Expired - Lifetime JP2629899B2 (en) 1988-10-24 1988-10-24 Tag branching device

Country Status (1)

Country Link
JP (1) JP2629899B2 (en)

Also Published As

Publication number Publication date
JPH02114332A (en) 1990-04-26

Similar Documents

Publication Publication Date Title
US4539635A (en) Pipelined digital processor arranged for conditional operation
US4954943A (en) Data processing system
US4541045A (en) Microprocessor architecture employing efficient operand and instruction addressing
US4954947A (en) Instruction processor for processing branch instruction at high speed
KR100334174B1 (en) Data processing device
US6938149B2 (en) Renaming apparatus and processor
US5390306A (en) Pipeline processing system and microprocessor using the system
US4598358A (en) Pipelined digital signal processor using a common data and control bus
US4812970A (en) Microprogram control system
US5293499A (en) Apparatus for executing a RISC store and RI instruction pair in two clock cycles
JP2629899B2 (en) Tag branching device
US5812845A (en) Method for generating an object code for a pipeline computer process to reduce swapping instruction set
US5187782A (en) Data processing system
JP2636136B2 (en) Arithmetic processing device and arithmetic processing method
US5854919A (en) Processor and its operation processing method for processing operation having bit width exceeding data width of bit storage unit
JP2636821B2 (en) Parallel processing unit
CA1155232A (en) Pipelined digital signal processor using a common data and control bus
JPH0559450B2 (en)
JPH0218732B2 (en)
JP2576589B2 (en) Virtual storage access control method
JPH07191845A (en) Immediate data transfer device
JPS58195255A (en) Data processing device
JPH02294829A (en) Memory operand takeout system
JPH0844563A (en) Microprocessor
JPH02100137A (en) Instruction execution control system