JP2685727B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP2685727B2
JP2685727B2 JP7004636A JP463695A JP2685727B2 JP 2685727 B2 JP2685727 B2 JP 2685727B2 JP 7004636 A JP7004636 A JP 7004636A JP 463695 A JP463695 A JP 463695A JP 2685727 B2 JP2685727 B2 JP 2685727B2
Authority
JP
Japan
Prior art keywords
instruction
address
line
data
memory
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
JP7004636A
Other languages
Japanese (ja)
Other versions
JPH07200402A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP7004636A priority Critical patent/JP2685727B2/en
Publication of JPH07200402A publication Critical patent/JPH07200402A/en
Application granted granted Critical
Publication of JP2685727B2 publication Critical patent/JP2685727B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、高速に命令処理可能な
データ処理装置に関する。 【0002】 【従来の技術】従来データ処理装置は、図1に示すよう
に記憶装置5との間でデータ授受を行うインターフェイ
ス回路7と、実行すべき命令の制御を行う命令制御ユニ
ット3と、命令を実行する命令実行ユニット4とを有し
ている。記憶装置5から読み出された命令が線73、イ
ンターフェイス回路7、線11を経由して命令制御ユニ
ット3に転送されると、命令制御ユニット3は転送され
た命令を解析し、その結果を命令実行ユニット4に線1
5を介し転送する。命令実行ユニット4は、解析の結
果、各種の制御信号を発生させ、それらの制御信号によ
り命令実行ユニット4内の各ゲートを開閉して演算,格
納,シフト等の処理を行わせる。命令によっては線1
4,線74を介してアドレスを指示し主記憶5からデー
タを線13,線74を介し読み出したり、又主記憶5へ
演算結果を書込む。命令制御ユニット3は、次の命令の
読み出しアドレスを線12、インターフェイス回路7,
線74を介して記憶装置5に指示する。これらの一連の
動作を繰り返すことにより、データ処理装置1は、記憶
装置5に格納されているプログラムを実行する。 【0003】本データ処理装置は、命令制御ユニット3
と命令実行ユニット4とが並列的に動作することが可能
であり、パイプライン制御が行なわれる。 【0004】この従来装置においては、主記憶5からの
データの高速読出しの為に、キャッシュメモリ71を有
している。キャッシュメモリ71は線73上のアドレス
で検索され、ヒットした場合には該当エントリのデータ
が読み出され、主記憶5へのアクセスは行なわない。し
たがって、ヒットした場合において、主記憶へのアクセ
ス時間を省略することができ、高速なデータ読出しが可
能となる。 【0005】このような装置の例として、例えば、岩波
講座マイクロエレクトロニクス「マイクロコンピュータ
のハードウェア」昭和59年11月発行第144〜14
8頁に記憶されたデータ処理装置がある。 【0006】しかし、このようにキャッシュメモリを有
するデータ処理装置においては、種々の場合にキャッシ
ュの無効化、すなわち、キャッシュの内容へのアクセス
禁止が必要となる。例えば、主記憶に格納された命令も
しくはオペランドデータの内容が新しい内容に更新され
た場合、もしくは命令キャッシュメモリもしくはオペラ
ンドキャッシュメモリに格納された論理アドレスと主記
憶の物理アドレスとの対応が保証されなくなった場合な
ど、命令キャッシュメモリもしくはオペランドキャッシ
ュメモリに格納された命令もしくはオペランドデータの
内容が主記憶に格納された命令もしくはオペランドデー
タの内容と不一致となった場合などに、このようなキャ
ッシュメモリの無効化が必要となる。 【0007】このような状態の変化の後、下記の三つの
可能性が生じる。 【0008】第1の場合では命令キャッシュに格納され
た命令のみが主記憶に格納された命令と不一致となり、
第2の場合ではオペランドキャッシュに格納されたオペ
ランドデータのみが主記憶に格納されたオペランドデー
タと不一致となり、第3の場合は命令キャッシュとオペ
ランドキャッシュとに格納された命令とオペランドデー
タとが主記憶に格納された命令とオペランドデータとそ
れぞれ不一致となるものである。 【0009】従って、キャッシュの有効性を高めるに
は、この三つの状態変化に対応して命令キャッシユおよ
びオペランドキャッシュの何れか一方もしくは両者を選
択的に無効化することが有効となる。 【0010】一方、主記憶からの命令がフェッチされる
間に、このフェッチ命令を含むブロックデータに属する
次命令も主記憶からフェッチされデータ処理装置内部の
命令キャッシュに格納されることになる。 【0011】従って、主記憶からフェッチされた現在の
命令の実行の後、データ処理装置は次命令を主記憶から
ではなくデータ処理装置内部の命令キャッシュからフェ
ッチすることになる。 【0012】一方、半導体LSIチップに構成されたデ
ータ処理装置の機能をチップ外部からテストするために
は、データ処理装置が所定の順序で命令実行するかをチ
ェックする必要がある。このためには、データ処理装置
内の命令実行部での現在の命令の実行の後、主記憶とデ
ータ処理装置チップとの間の外部バスに現われる次命令
の先頭コードであるオペコード(オペレーションコー
ド)が所定のものかをチェックする必要が有る。 【0013】一方、可変長命令セットにはイミディエイ
トデータやディスプレースメントデータである非先頭コ
ードが短い命令やこの非先頭コードの長い命令が有るの
で、短い命令と長い命令との先頭のオペコードの位置を
知ることは困難である。 【0014】従って、データ処理装置チップ外部からの
機能テストを容易とするためには、命令の実行の直後
に、次命令の先頭コードであるオペコードを常に主記憶
からフェッチし、外部バス上でチェックすることが有効
となる。 【0015】 【発明が解決しようとする課題】従って本発明の目的と
するところは、命令の実行の直後に、次命令の先頭コー
ドであるオペコードを常に主記憶からフェッチし、外部
バス上でチェックすること可能とすることにより、チッ
プ外部からの機能テストが容易であるデータ処理装置を
提供することにある。 【0016】 【課題を解決するための手段】本願で開示される発明
で、代表的な発明の概要は次の通りである。 【0017】主記憶(5)とともに使用されるデータ処
理装置であって、命令アドレス(l31)を発生する命
令アドレス発生部(32)と、複数の命令アドレスと該
複数の命令アドレスに対応した複数の命令とを格納する
命令キャッシュメモリ(31)と、上記命令アドレス発
生部(32)から発生された命令アドレス(l31)に
従って上記主記憶(5)もしくは上記命令キャッシュメ
モリ(31)から読み出された命令を解読し解読結果を
生じる命令デコーダ(35)と、上記命令デコーダ(3
5)の上記解読結果に従って命令を実行し、該命令の実
行終了時に次命令要求信号(l41)を出力する命令実
行部(4)と、該データ処理装置外部から外部パージ信
号(l61)が供給されている間は上記次命令要求信号
(l41)に応答してパージ指令信号(l62)を出力
するように構成されたパージ制御回路(6)とを具備
し、上記パージ指令信号(l62)に従って上記命令キ
ャッュメモリ(31)の内容を無効化せしめることを特
徴とする。 【0018】 【作用】この代表的な発明においては、命令の先頭のオ
ペコードと非先頭コードとを用いて命令実行部(4)で
命令実行が終了すると、命令実行部(4)は次命令要求
信号(l41)を出力する。従って、外部から外部パー
ジ信号(l61)がパージ制御回路(6)に継続的に供
給されている間は、この次命令要求信号(l41)に応
答してパージ指令信号(l62)がパージ制御回路
(6)から出力される。 【0019】すると、次命令の先頭のオペコードと非先
頭コードとを含み、命令キャッシュメモリ(31)に格
納されていたブロックデータの内容へのアクセスが禁止
されるので、データ処理装置は外部バス(l23,l2
4)を介して主記憶(5)から次命令の先頭のオペコー
ドと非先頭コードとを含む新しいブロックデータをフェ
ッチする。特に、主記憶(5)からの次命令の先頭オペ
コードのフェッチのタイミングはパージ制御回路(6)
から出力されるパージ指令信号(l62)と同期し、主
記憶(5)からの次命令の非先頭コードのフェッチ・タ
イミングではパージ指令信号(l62)もしくは次命令
要求信号(l41)は出力されない。 【0020】従って、主記憶(5)からフェッチされる
次命令の先頭オペコードはパージ指令信号(l62)も
しくは次命令要求信号(l41)に同期して外部バス
(l23,l24)の上で容易にチェックすることが可
能となる。 【0021】本発明のその他の目的と特徴は、以下の実
施例から明らかとなろう。 【0022】 【実施例】本発明の実施例を図面を用いて詳細に説明す
る。 【0023】以下の説明では、まず本実施例のデータ処
理装置に用いられる命令を説明し、その後装置構成を説
明し、最後に動作説明を行なう。 【0024】1)命令 基本命令フォーマット 図2に本実施例の命令フォーマットを示す。 【0025】命令は、演算の種類(ビット15〜1
2)、アドレッシングモード等を指定するオペレーショ
ンワード(ビット11〜0)、アドレス計算用のデータ
を与える拡張部とからなり、長さは32ビットである。 【0026】指定するアドレッシングモードの種類によ
っては、拡張部を伴なわない場合もある。 【0027】オペレーションワードのビット11ないし
9は、演算の一方のオペランドとして使用するデータを
保持するデータレジスタの番号を示す。他方のオペラン
ドは、オペレーションワードのビット5ないし0によっ
て指定される。すなわち、ビット2ないし0は、このオ
ペランドの取得のために参照すべきレジスタの番号を示
し、ビット5ないし3は、アドレッシングモードを示
す。 【0028】本実施例においては、後で示すようにデー
タレジスタを8本、アドレスレジスタを8本有してい
る。 【0029】ビット5ないし3のビットパターンとアド
レッシングモードの対応は、図2(b)に示されてい
る。同図において、「データレジスタ」モード及び「ア
ドレスレジスタ」モードは、それぞれ、指定されたデー
タレジスタ及びアドレスレジスタの内容がそのままオペ
ランドとなるモードである。「アドレスレジスタ間接」
モードは、指定されたアドレスレジスタの内容がオペラ
ンドのメモリアドレスとして使用されるモードである。
「ポストインクリメント」モード及び「プリデクリメン
ト」モードは、基本的にはアドレスレジスタ間接モード
と同じであるが、オペランドのストア又はフェッチのそ
れぞれ直後及び直前に、当該アドレスレジスタの内容を
それぞれ+1及び−1する点が異なる。したがって本モ
ードは、一続きのアドレスに格納されたオペランドデー
タを次々に読み出して演算することになる。 【0030】「ディスプレイスメント付アドレスレジス
タ間接」モードは、指定されたアドレスレジスタの内容
に拡張部の内容を加えた値をオペランドのメモリアドレ
スとして使用するモードであり、「ディスプレイスメン
ト付プログラムカウンタ相対」モードは、当該命令のア
ドレス(プログラムカウンタの内容)に拡張部の内容を
加えた値をオペランドのメモリアドレスとして使用する
モードである。そして、「絶対番地」モードは、拡張部
の内容をそのままオペランドのメモリアドレスとして使
用するモードである。 【0031】 基本命令の中のスタック命令 さて現在のプログラムは高級言語で書かれる為、そのデ
ータ構造としてスタックを有している。特に、サブルー
チンを用いる場合には、メインルーチンで用いる変数、
サブルーチンで用いる変数を夫々別々の一団としてスタ
ックに格納しておく必要がある。この一団をフレームと
いう。 【0032】スタックは、主記憶の一部と、スタックポ
インタとからなる。スタックポインタとは変数を下位の
アドレスから次々に主記憶に格納していくためのアドレ
スを格納しておくレジスタである。 【0033】サブルーチンを呼び出す場合には、スタッ
クポインタの値をフレームポインタに移す。フレームポ
インタとは、一フレームの最上位のアドレスを記憶する
ためのレジスタである。本実施例では、8本のアドレス
レジスタのうち一本をスタックポインタとし、他の一本
をフレームポインタとしている。 【0034】スタックへのアクセスは、命令の2ビット
〜0ビットにおいてフレームポインタ又はスタックポイ
ンタを指定し、命令5〜3ビットのアドレッシングモー
ドとして、「アドレスレジスタ間接」、「ポストインク
リメント」、「プリデクリメント」又は「ディスプレイ
スメント付アドレスレジスタ間接」のうちの、いずれか
を用いて実行される。これらのスタックへのアクセスの
態様を総称して、スタックアクセスモードと呼びこれら
の命令をスタック命令ということにする。 【0035】上記のように、本装置ではスタックポイン
タをあらかじめ一つのレジスタに定めているので、その
レジスタをスタックポインタとして指定しないプログラ
ムでは性能が低下するおそれがある。 【0036】 制御命令 さらに、本実施例のデータ処理装置では、上記一般命令
とは異なるフォーマットを有する制御命令を有する。 【0037】本実施例は、パージ(PURGE)命令と
いい、専ら本データ処理装置が自ら発行する命令であ
る。ただし、上述の基本命令と伴に主記憶から読み出す
場合もある。本命令の機能は、データ処理装置が内蔵す
る連想メモリ21,31又は36,37,38を無効に
することである。 【0038】本命令が存在する理由は次のとおりであ
る。 【0039】本データ処理装置1は、一つのチップの中
におさめられる。このチップ内で作成されたアドレスで
外部へアクセスするものである。しかし乍ら、現在のシ
ステムでは、チップ内で作成されたアドレスと、外部の
装置に実際につけられたアドレスとが相違することがあ
り、データ処理装置内で作成されたアドレスを論理ドレ
レス、外部の装置に実際に与えられたアドレスを論理ア
ドレスということがある。一般に、論理アドレスと物理
アドレスとの変換は、アドレス変換機構という特別なハ
ードウェアをデータ処理装置のチップ内出力部、あるい
は外部に設けることにより行なう。例えば前掲書第14
5頁に示されている。 【0040】本実施例のデータ処理装置は、後述するよ
うにチップ内において論理アドレスのみを参照している
ので、外部にアドレス変換機構を付けるシステムを構成
した場合には、物理アドレスで参照する主記憶のアドレ
スと論理アドレスで参照するチップ中の連想メモリのア
ドレスとが相異なる可能性がある。 【0041】特に、主記憶上のアドレス空間を別のアド
レス空間に切換えたとき、データ処理装置1内の連想メ
モリに保持している情報のアドレスと、実際の主記憶の
アドレスとの間の対応が保障できなくなる。 【0042】この矛盾は、データ処理装置が事前にパー
ジ命令を発行して内部の連想メモリを無効にすることに
より解決できる。 【0043】したがって、アドレス変換機構をシステム
に設けた場合は、該アドレス変換機構がアドレス空間が
切換ったことをパージ信号をアサートしてデータ処理装
置に教える必要がある。 【0044】本データ処理装置では、パージ制御回路の
項で後述するように、アドレス変換機構からのパージ信
号とパージ命令に基きパージ命令を発行するように構成
されている。 【0045】以上がパージ命令を設けた理由である。 【0046】次に、図3(a)においてパージ命令のフ
ォーマットについて説明する。 【0047】パージ命令において、内容を無効にすべき
メモリの指定は、パージコード(PURGE COD
E)による。その対応を図3(b)に示す。パージコー
ドのビット7,6が「00」のときは、無効にしない。
パージコードが「01000000」のときは、データ
系の連想メモリを無効にする。データ系の連想メモリと
は、後述する連想メモリ21が該当する。 【0048】パージコードが「10000000」のと
きは、命令系の連想メモリを無効にする。命令系の連想
メモリとしては、後述する連想メモリ31,36,37
および38が該当する。 【0049】パージコードが「11111111」のと
きは、すべての内部連想メモリを無効とする。 【0050】2)次に、本装置構成について詳細に説明
する。 【0051】図4において1はデータ処理装置で、主記
憶5とのデータのやりとりを行なうインターフェイスユ
ニット2と、インターフェイスユニットからのデータの
解析を行なう命令制御ユニット3と、および命令制御ユ
ニットからの解析命令の実行を行なうための命令実行ユ
ニットからなる。 【0052】主記憶5からは1度のアクセスで4バイト
(32ビット)のデータが読める。 【0053】命令実行ユニット4は、命令実行に必要な
データをインターフェイスユニット2を介して主記憶か
ら読出す。 【0054】命令制御ユニット3と命令実行ユニット4
とは並列動作が可能でパイプライン制御が行なわれる。 【0055】以下、各回路について説明する。 【0056】 命令制御ユニット3 アドレス発生回路32は、プリフェッチアドレス更新信
号を線l34を介して入力し、分岐先アドレスを線l3
3を介して入力し、プリフェッチアドレスおよびフェッ
チ要求を線l31に出力し、命令実行ユニット4で実行
中の命令のアドレスを線l32に出力する回路である。 【0057】図5に、アドレス発生回路32の詳細を示
す。 【0058】323は選択回路で、通常はレジスタ32
1からのプリフェッチアドレスを選択し、分岐アドレス
が線l332を介して与えられたときには該分岐アドレ
スを選択する。 【0059】325は加算器で、選択回路323からの
命令アドレスに、定数発生回路324から与えられる数
を加算する。定数発生回路324が発生する数は、読み
出すべき命令の長さに対応する。 【0060】レジスタ321は、線l342からの信号
により、加算器325の出力をラッチする。したがっ
て、線l34から信号を受ける毎にレジスタ321は更
新され、線l31内の線l312にプリフェッチアドレ
スが出力されることになる。尚、線l34の更新信号は
線l31の線l311からフェッチ要求として出力され
る。 【0061】326は選択回路で、通常は加算器329
からの出力を選択し、分岐アドレスが線l332を介し
て与えられたときには該分岐アドレスを選択する。レジ
スタ327は、選択回路323からの命令アドレスをラ
ッチし、線l32に命令アドレスを出力する。 【0062】加算器329は、線l32上の命令アドレ
スに定数発生回路328から与えられる数を加算する。
定数発生回路328が発生する数は、実行されるべき命
令の長さに対応する。 【0063】連想メモリ31は、命令アドレスと、その
命令アドレスに対応する命令とを同一のエントリに記憶
しておくメモリである。 【0064】連想メモリ31の構成を図6に示す。全体
で64エントリで構成され、各エントリは検索フィール
ド311,有効ビット312およびデータフィールド3
13により構成される。 【0065】検索フィールドは線l312を介して与え
られる命令アドレスを格納するフィールドである。有効
ビットはデータフィールド313に格納されたデータが
有効か否かを示すビットである。データフィールド31
3は線l35を介して与えられる命令を格納するための
フィールドで4バイト(32ビット)の長さを有する。 【0066】連想メモリ31への検索は、線l31を介
して与えられる命令アドレスで行なう。命令アドレスが
存在し、かつ有効ビットがセットされている場合、該当
エントリのデータフィールドに格納された命令を線l3
52に出力する。又、線l351にフェッチ終了信号も
出力する。又、ヒットした場合線l26上の信号がオン
し選択回路22により主記憶5へのアクセスが禁止され
る。 【0067】連想メモリ31の更新は、線l31からの
命令アドレスが格納されたエントリが存在せず、又有効
ビットがリセットされているとき行なわれる。主記憶5
からの線l351のフェッチ終了信号がオンしたときに
読出された命令が線l35を介して入力され線l31か
らの命令アドレスと伴に、最も古く書換えられたエント
リに書込まれる。新しく書換えられたエントリの有効ビ
ット312はセットされる。 【0068】連想メモリ31は、パージ命令の実行によ
り無効にされる。パージ命令が実行されたときには命令
実行ユニット4からの信号線(図示せず)により、有効
ビット312が全エントリにつき、リセットされる。 【0069】ファーストイン,ファーストアウトのメモ
リ34は、線l351のフェッチ終了信号がオンした時
線l352を介して与えられる命令を複数個記憶するた
めのメモリであって、最も古く書込まれた命令を最も早
く読み出すメモリである。 【0070】制御回路33は、メモリ34に空きがある
場合であって線l351のフェッチ終了信号がオフした
場合に、次の命令を読み出させる為に、線l34を介し
てアドレス発生回路32にプリフェッチアドレス更新信
号送出する回路である。 【0071】デコーダ35は、メモリ34からの命令を
解析し、マイクロプログラムの命令アドレスに変換して
線l36に出力する。 【0072】連想メモリ36,37および38は、パイ
プラインでの乱れを押える働きをするバッファで、分岐
元アドレス、分岐先命令、デコード結果を同一のエント
リに記憶する。 【0073】連想メモリ36,37,38の構成を図7
に示す。全体で4エントリで構成され、各エントリは検
索フィールド361,有効ビット362およびデータフ
ィールド363,37,38により構成される。 【0074】検索フィールド361は線l32を介して
与えられる分岐元アドレスを格納するフィールドであ
る。有効ビットフィールド362はデータフィールド3
63,37,38に格納されたデータが有効か否かを示
すビットである。データフィールドの一部363は、線
l38を介して与えられる分岐先次命令を格納するフィ
ールドである。データフィールドの他の一部38は、線
l38を介して与えられる分岐先命令自体を格納するフ
ィールドである。データフィールドの他の一部37は、
線l36を介して与えられるマイクロ命令アドレスを格
納するフィールドである。尚、図4の全体構成図では、
連想メモリ36はアドレス発生回路32とデコーダ35
の間に設けられ、連想メモリ37はデコーダ35と命令
実行ユニット4の間に設けられる。その理由は、連想メ
モリ36に格納される種々の情報の発生源の位置と、連
想メモリ37に格納される情報の発生源の位置とが異な
っているからである。このように連想メモリ36,37
に分割することにより、情報発生源と連想メモリ間の距
離を短かくすることができ、その間の配線によるチップ
専有面積を少なくできる。連想メモリ36と37は、線
l37を介して接続されており、連想メモリ36におい
て選ばれたエントリのアドレスが連想メモリ37,38
に線l37を介して与えられ、両者同一のエントリが選
ばれることになる。 【0075】連想メモリ36,37,38への検索は、
線l32を介して与えられる分岐元アドレスで行なう。
分岐元アドレスが存在し、かつ有効ビット362がセッ
トされている場合、該当エントリのデータフィルド36
3,37,38に格納された情報が夫々線l35,線l
39および線l40に出力される。 【0076】連想メモリ36,37,38の更新は、線
l32からの分岐元アドレスが格納されたエントリが存
在せず、又有効ビット362がリセットされているとき
に行なわれる。このとき、分岐元アドレス,分岐先アド
レス,分岐先命令デコード結果分岐先次命令が伴に、最
も古く書換えられたエントリに書込まれる。新しく書換
えられたエントリの有効ビット362はセットされる。 【0077】連想メモリ36,37,37は、バージ命
令を実行した際に無効にされる。バージ命令が実行され
たときには、命令実行ユニット4からの信号線(図示せ
ず)により有効ビット362が全エントリにつき、リセ
ットされる。 【0078】選択回路47は、線l45を介して与えら
れる分岐成功信号を受けたときは、線l39を選択す
る。分岐失敗信号を受けたときは、線l36を選択す
る。 【0079】選択回路46は、線l45を介して与えら
れる分岐成功信号を受けたときは、線l38を選択す
る。分岐失敗信号を受けたときは、線l40を選択す
る。 【0080】レジスタ38は、デコーダ37からのマイ
クロ命令アドレスを、線l41を介して与えられる次命
令要求信号によりラッチする。そして、該ラッチしたマ
イクロ命令アドレスを命令実行ユニットに送出する。た
だし、線l62を介して、バージ指令信号と、線l41
の次命令要求信号が与えられたときは、デコーダ37か
らのマイクロ命令アドレスではなく、線l63を介して
パージ命令をラッチする。 【0081】レジスタ40は、線l41を介して次命令
要求信号を受けたときに、選択回路46からの信号をラ
ッチする。 【0082】 命令実行ユニット4 ROM41は、線l40を介して与えられる時間軸に配
列されたマイクロ命令列の各マイクロ命令をアドレスと
して順次取込み、対応するアドレスに格納してある制御
情報を順次読出して、線l42に出力する。 【0083】処理回路45は、線l42上の制御情報に
基き、演算を行なう。オペランドデータを主記憶から得
るためのアドレスを線l33を介して出力し、読出され
たオペランドデータを線l43を介して入力する。又線
l44を介して命令自体が入力される。線l41には命
令実行が終了した際に次命令要求信号が出力される。
又、分岐命令を実行した際に分岐が成功したならば線l
45へ分岐成功信号を、分岐が失敗したならば分岐失敗
信号を出力する。 【0084】図8は処理回路45の構造を示す図であ
る。l46,l47およびl48は、内部データバス
である。レジスタ群452は8本のデータレジスタ、8
本のアドレスレジスタからなる。レジスタ群452は線
l422により一又は二つのレジスタが指定され、バス
l46,l47へのデータ読出し、又はバスl48から
のデータ読出しを行なう。 【0085】アドレスレジスタの8本のうち、スタック
ポインタ,フレームポインタを含む。スタックポインタ
は、主記憶へのデータ格納のため、用いられる毎にずつ
内容が減算され、読み出しに用いられる毎に1ずつ増加
する。 【0086】453は演算回路であり、バスl46,l
47上の信号を、線l423からの指示に基き加算,除
算等を行ない、演算結果を内部データバスl48に出力
する。又、演算回路453は、一つの命令に対する制御
情報が線l42からすべて入力した後であって演算終了
後l41に次命令要求信号を出力する。 【0087】又、分岐命令を実行した際に、コンデショ
ンコードC.Cを参照し、分岐命令で定める条件を満た
している場合には分岐成功信号を、満たしていない場合
には分岐失敗信号を線l45に出力する。 【0088】パージ命令を実行した際には、まず、パー
ジクリア信号を線l49に出力し、パージコードで示さ
れる連想メモリの有効ビットを図示していない信号線を
介しリセットする。 【0089】454はデータ指定回路であり、ポストイ
ンクレメントモード,プリデクレメントモードの実行の
際に、線l424を介して受けるオペランドサイズ(命
令により、1バイト,2バイト,4バイトが指定され
る)に基き、線l33上のアドレスの下位2ビットをデ
コードして線l43上の32ビットデータのうち、オペ
ランドとして必要なデータであってオペランドサイズの
長さを有するデータを線l50を介してインターフェイ
ス451に指定する。 【0090】インターフェイス451は線l421上の
制御情報に基き、線l431のフェッチ終了信号がオン
した時線l432からのデータを内部データバスl4
7,l48に出力し、線l431上のフェッチ要求信号
をオフする。又内部データバスl47,l48からのデ
ータを線l432に出力しフェッチ要求信号を線l43
1に出力する。線l50で読み出すべきデータのビット
位置および長を指定されたときには、それに基きデータ
を切出す。 【0091】連想メモリ21は、オペランドデータを記
憶しておくためのオペランドバッファ24およびバイト
データを記憶しておくためのラインバッファ25からな
る。 【0092】オペランドバッファ24の構成を図9に示
す。全体で22エントリで構成され、各エントリは検索
フィールド241,有効ビット242およびデータフィ
ールド243により構成される。 【0093】検索フィールドは線l33を介して与えら
れるオペランドデータのアドレスを格納するためフィー
ルドである。有効ビット242はデータフィールドに格
納されたオペランドデータが有効か否かを示すビットで
ある。データフィールド243は、線l21を介して与
えられるオペランドデータを格納するためのフィールド
である。 【0094】オペランドバッファ24の更新・検索は、
命令実行ユニット4で実行すべき命令に基いて次の2種
の制御がされる。 【0095】(イ)スタックアクセスモードであって、命
令により指定されたアドレスレジスタの内容がオペラン
ドデータのアドレスとして線l332に出力されたとき
は、オペランドバッファ24は該オペランドデータアド
レスで検索される。オペランドデータアドレスが存在
し、かつ有効ビット242がセットされている場合、該
当エントリのデータフィールドに格納されているオペラ
ンドデータが線l432に出力される。この時線l43
1のフェッチ終了信号をオンする。又、ヒットしたと
き、線l25を介して選択回路22により、主記憶5へ
のアクセスが禁止される。又、検索の結果ミスヒットし
たときには、主記憶5から読出されたオペランドデータ
が線l21を介して入力され、線l33からのオペラン
ドアドレス伴に、最も古く書換えられたエントリに書込
まれる。新しく書換えたエントリの有効ビット242は
セットされる。 【0096】(ロ)命令実行結果が得られ、線l43に
該実行結果が出力され、線l332に該実行結果を格納
すべき主記憶5上のアドレスが出力されたときには、オ
ペランドバッファ24はそのアドレスで検索される。そ
のアドレスが存在し、かつ有効ビット242がセットさ
れている場合、該当エントリのデータフィールドのデー
タが線l332上の実行結果に書換えられる。有効ビッ
ト242はセットされる。この時ヒットしたとしても、
線l25には何も出力しない。したがって、選択回路2
2は主記憶5へのアクセスを禁止されない。又、検索の
結果、ミスヒットした場合には、オペランドバッファの
データ書換えは行なわない。 【0097】上記(イ)(ロ)以外の場合にはオペラン
ドバッファの検索書換えはなされない。 【0098】(イ)の場合は、スタックの更新、スタッ
クからのデータ読出しに関する場合である。(イ)の場
合にオペランドバッファの更新・書換えが行なわれる為
オペランドバッファはスタックデータの格納用の内部メ
モリであるといえる。 【0099】(ロ)の場合は、命令によってはスタック
を直接アドレス指定して、データ書換えを起す場合があ
るので、これに対処するための処置である。 【0100】オペランドバッファ24は、パージ信号に
より無効にされる。パージ信号が入力されたときには、
有効ビット242の全ビットにつき、リセットされる。 【0101】ラインバッファ25はポストインクレメン
トモード,プリデクレメントモード時に、オペランドサ
イズで指定される長さのバイトデータの読出しにおいて
一度に主記憶5から読出された連続アドレスの4バイト
を保持しておき、以後の命令で連続したオペランドアド
レスへのアクセスを高速化するためのメモリである。 【0102】ラインバッファ25の構成を図10に示
す。ラインバッファ25は、8本のアドレスレジスタの
うち、スタックポインタ・フレームポインタを除いた6
本のレジスに一対一に対応したエントリを有する。した
がって、全部で6本のエントリによって構成されること
になる。 【0103】各エントリは、検索フィールド251,4
つの有効ビット252〜255および4つのデータフィ
ールド256〜259から構成される。有効ビット25
2〜255は、データフィールド256〜259と夫々
対応しており、夫々対応するデータフィールドのデータ
が有効か否かを示す。一つのエントリの4つのデータフ
ィールドには、主記憶5から1度に読み出された連続ア
ドレスの4バイトのデータが夫々格納される。 【0104】ラインバッファ25の検索は、アドレス間
接モードのうち、ポストインクレメントおよびプリディ
クレメントモードのときに行なう。 【0105】ポストインクレメントおよびプリデクレメ
ントモードは、アドレスレジスタの値を1ずつ加算又は
減算し、連続したアドレスに格納されているデータを次
々に読み出し処理するモードである。 【0106】本モードにおいて、最初のデータを読み出
す場合、ラインバッファを検索しても該当エントリが存
在しないのが通常である。したがって、主記憶5へ線l
33を介してアドレスを送出する。このとき、主記憶5
から4バイトのデータが1度に読み出され、線l21を
介して本モードの命令で指定されたアドレスレジスタに
対応するエントリに書込まれる。同時に、データは選択
回路22から線l43へ出力される。 【0107】このとき、線l43へは32ビットのデー
タが送られるが、オペランドとして必要なデータはオペ
ランドサイズで指定されるバイト数のデータである。こ
のデータの切出しは、前述のデータ指定回路454,お
よびインターフェイス451により行なわれる。 【0108】最初のデータの処理が済むと、本モードの
命令で指定されるアドレスレジスタの内容が1増加、又
は減少し、次のデータを読み出す。このとき線l33に
出力されるアドレスは、先に出力したアドレスに連続し
たアドレスであるので、先にラインバッファに記憶した
データの中に該当アドレスが存在する確率が極めて高
い。検索の結果ヒットした場合には、主記憶5へはデー
タを読み出しに行かず、該当エントリの4バイトのデー
タを線l43に出力する。又、線l25へ出力を出し、
選択回路22の主記憶5へのアクセスを禁止させる。 【0109】尚、命令実行ユニット4において、命令実
行結果が得られ、線l43に該実行結果が出力され、線
l33に該実行結果を格納すべき主記憶5上のアドレス
が出力されたときには、ラインバッファ25はそのアド
レスで検索される。そのアドレスが存在し、かつ有効ビ
ットがセットされている場合、該当エントリのデータフ
ィールドのデータが線l33上の実行結果に書換えられ
る。有効ビットはセットされる。この時ヒットしたとし
ても、線l25には何も出力しない。したがって選択回
路22は主記憶5へのアクセスを禁止されない。又、検
索の結果、ミスヒットした場合には、ラインバッファ2
5のデータ書換えは行なわない。この操作もオペランド
バッファと同様、ラインバッファの内容を主記憶5の内
容と一致させておくための処置である。 【0110】以上のように、ラインバッファ25を用い
ることにより、ポストインクリメント・プリデクレメン
トモードにおいては、平均4バイトに1回の割りで主記
憶へアクセスすればよいことになり、高速読み出しが可
能となる。特にオペランドサイズが1バイトと指定され
た場合には、オペランドデータを4つ処理する間に、一
回のみ主記憶へアクセスすればよいことになる。 【0111】 インターフェイスユニット2 選択回路22は、線l31を介して与えられた命令アド
レス又は線l33を介して与えられたオペランドデータ
アドレスのいずれか一方を線l23を介して主記憶5へ
送出するものである。 【0112】図11に選択回路の構成図を示す。線l3
11は読出し要求信号、線l312はアドレス信号で線
l31を構成する。線l331はフェッチ要求信号、線
l332はアドレス信号で線l33を構成する。AND
回路222は線l311および線l26上の信号の論理
積を求め、連想メモリ31がヒットしたときに命令制御
回路3から主記憶5へのアクセスを禁止する信号を出力
する。AND回路226は線l331および線l25上
の信号の論理積を求め、連想メモリ21がヒットしたと
きに命令実行ユニット4からの主記憶5へのアクセスを
禁止する信号を出力する。 【0113】AND回路223および227は、命令実
行ユニット4からのアクセス要求を優先させるための回
路である。AND回路223および227により、フリ
ップフロップ224あるいは228のいずれか一方がセ
ットされる。セレクタ221はフリップフロップ224
あるいは228により選ばれた一方のアドレス信号を線
l232に出力する回路である。 【0114】OR回路230は、フリップフロップ22
4,228の出力の論理和を求め、フェッチ要求信号を
線l231に出力する回路である。線l231およびl
232により線l23を構成する。 【0115】主記憶5からのデータは線l24を介して
得られる。線l241はフェッチ終了(読出し終了)信
号であり、データの用意が整ったことを知らせる。線l
242上にはデータ自体が入力される。 【0116】AND回路225および229は、線l2
31にフェッチ要求を出したのが命令制御ユニット3で
あるか命令実行ユニット4であるかを判定し、要求を出
した方の線(l351あるいはl211)へフェッチ終
了信号によりデータの準備ができたことを知らせる。命
令制御ユニット3,命令実行ユニット4は、夫々線l3
5内のl351あるいは線l21内のl211を見てフ
ェッチ要求に対する応答があったか否か判断し、フェッ
チ要求をオフすることになる。 【0117】 パージ制御回路6 パージ制御回路6は、パージ信号を線l61から入力さ
れると、線l62にパージ指令信号を出力し、又線l6
3にパージ命令を出力する。 【0118】パージ制御回路6の構成図を図12に示
す。 【0119】パージ信号を線l61から入力すると、A
ND回路64を介してフリップフロップ65のD端子を
highにする。次命令要求信号が線l41を介して入
力されると、そのタイミングでD端子の入力をラッチ
し、線l62のパージ指令信号をオンする。したがっ
て、線l64を介してあらかじめパージ命令を記憶した
レジスタ66の内容が、線l63を介してレジスタ38
(図1)にラッチされる。又このとき、フリップフロッ
プ62もセットされる。命令実行ユニット4にてパージ
命令が実行されると、まずパージクリア信号が線l49
に出力される。これによりフリップフロップ62をリセ
ットする。遅延回路63,AND回路64を介してフリ
ップフロップ65のD入力をLowにする。パージ命令
の実行が終了すると、線l41の次命令要求信号がオン
する。これによりフリップフロップ62はセットされフ
リップフロップ65はリセットされる。フリップフロッ
プ62の出力は遅延回路63に入力される。この間にレ
ジスタ38は、選択回路47からの命令デコード結果が
ラッチされることになる。その後、遅延回路63からの
出力がhighになる。このとき線l61がまだパージ
信号を出力している場合には、フリップフロップ65の
D入力はhighになっている。したがって、次命令要
求信号が入力されると、再び線l62にパージ指令信号
を出力する。 【0120】パージ指令信号が出力されると、連想メモ
リ31に格納されていたブロックデータの内容へのアク
セスが禁止されるので、データ処理装置は外部バス12
3,124を介して主記憶5から次命令の先頭のオペコ
ードと非先頭コードとを含む新しいブロックデータをフ
ェッチすることになる。そのため、実行中のプログラム
のどの命令がチップにて実行されているかがチップ外部
から観察できる。 なお、線l61およびl63には、図
示しないアドレス変換回路を接続することができる。 【0121】アドレス変換回路は前述のように、データ
処理装置内で用いるアドレスと、データ処理装置外の装
置に与えられるアドレスが異なるシステムに用いるもの
である。 【0122】尚、本実施例においては、パージ命令をレ
ジスタ38に交互にラッチさせることができるようにし
ているが、これは、データ処理装置に通常の命令を一ス
テップずつ実行させ、プログラムのチェックを行なうた
めである。 【0123】3)動作説明 次に本データ処理装置における動作について説明する。 【0124】図13に本データ処理装置において実行さ
れる命令列の一例を示す。 【0125】命令はNo.1からNo.11まで主記憶上
の連続したアドレスに格納されている。 【0126】命令No.1,No.2はスタックポインタが
示すアドレスのデータを、夫々の命令で指定するデータ
レジスタへ格納する命令である。 【0127】命令No.3は、命令No.1,No.2で夫々
データが格納されたレジスタの内容を加算し、その結果
をいずれかのデータレジスタに格納する命令である。 【0128】命令No.4は、命令で指定されたデータレ
ジスタの内容を、命令で指定されたアドレスレジスタで
指示されるアドレスに格納される命令である。 【0129】命令No.5は、命令で指定されたアドレス
レジスタで指示されるアドレスの命令へジャンプする命
令である。本例の場合は、命令No.10へジャンプする
ものとしている。 【0130】命令No.10は、命令で指定される2つの
データレジスタの内容を加算する命令である。 【0131】以上の命令列を実行した場合の、タイムチ
ャートを図14(a)に示す。 【0132】 サイクルT1 アドレス発生回路32は、線l31へ命令No.1のアド
レスを出力する。連想メモリ31は、該アドレスで検索
されるが、ヒットしない場合は主記憶5へデータを読み
に行く。主記憶5から読まれたデータは連想メモリ31
へ格納されると伴に、メモリ34へ格納される。 【0133】 サイクルT2 メモリ34に空きがあるので、アドレス発生回路32は
命令No.2のアドレスを出力する。連想メモリ31は、
先の命令No.1と同様に該アドレスで検索され、ヒット
しない場合は主記憶5からのデータを書込む。又、読ま
れたデータはメモリ34へ格納される。 【0134】デコーダ35は、メモリ34からの命令N
o.1を解析し、解析結果をレジスタ38へ格納する。 【0135】レジスタ38へ格納された命令No.1のマ
イクロ命令列は、命令実行ユニット4において実行が開
始される。 【0136】実行時において、データレジスタへ格納す
るためのオペランドデータのアドレスを線l33へ出力
するが、本命令はスタック命令であるので、連想メモリ
24内に該当するエントリが存在する可能性が高い。し
たがって命令制御ユニット3からの命令No.2の読み出
し要求と、命令実行ユニット4からのオペランドデータ
の読み出し要求が競合することが少なくなる。 【0137】又、逆に、連想メモリ31に命令No.2が
存在する場合には、連想メモリ24にオペランドデータ
が存在するか否かにかかわらず、命令制御ユニット3と
命令実行ユニット4との主記憶5への読み出し要求は競
合しない。 【0138】 サイクルT3 命令No.3が命令No.1,2と同様にして主記憶5から
読み出され、メモリ34へ格納される。 【0139】デコーダ35においては、命令No.2の解
析が行なわれる。 【0140】命令実行ユニット4では、命令No.1の実
行が終了し、命令No.2の実行が開始される。 【0141】命令No.2は、命令No.1と同様スタック
命令であり、連想メモリ24の検索が行なわれ、ミスヒ
ットの時には主記憶5へオペランドデータを読みに行
く。この場合における命令制御ユニット3と命令実行ユ
ニット4と競合については、命令No.1の場合と同様で
ある。 【0142】 サイクルT4 命令No.4が命令No.1等と同様にして主記憶5から読
出され、メモリ34へ格納される。 【0143】デコーダ35においては、命令No.3の解
析が行なわれる。 【0144】命令実行ユニット4では、命令No.2の実
行が終了し、命令No.3の実行が開始される。 【0145】命令No.3は、命令実行ユニット4内のデ
ータレジスタを用いて演算する命令であるため、主記憶
5へのオペランドデータを読出しに行くことはない。 【0146】 サイクルT5 命令No.5が命令No.1と同様にして主記憶5から読出
され、メモリ34へ格納される。 【0147】デコーダ35においては、命令No.4の解
析が行なわれる。 【0148】命令実行ユニット4では、命令No.3の実
行が終了し、命令No.4の実行が開始される。 【0149】命令No.4は、主記憶へデータレジスタの
データを書込む命令である。線l33にはデータを書込
む先のアドレスが出力される。オペランドバッファ24
は、本アドレスがスタックの内容を書換えるものか否か
をチェックし、書換えるものであるときは、オペランド
バッファの内容を線l43上のデータに書換える。線l
43上のデータは、主記憶5へ送出される。 【0150】 サイクルT6 命令No.6が命令No.1と同様にして主記憶5から読出
され、メモリ34へ格納される。 【0151】デコーダ35においては、命令No.5の解
析が行なわれる。 【0152】一方、アドレス発生回路36は、線l32
に命令実行ユニットが実行している命令No.5のアドレ
スを出力する。連想メモリ36は、該アドレスで検索さ
れる。該当するエントリが存在しない場合には、連想メ
モリ37,38からの出力はない。該当するエントリが
存在する場合には、後述する(10)以降のタイムチャート
となる。 【0153】命令実行ユニット4では、命令No.4の実
行が終了し、命令No.5の実行が開始される。 【0154】 サイクルT7 命令No.7が命令No.1と同様にして主記憶5から読出
され、メモリ34へ格納される。 【0155】デコーダ35においては、命令No.6の解
析が行われる。 【0156】命令実行ユニット4では、命令No.10の
アドレスを線l33に出力する。 【0157】又、命令実行ユニット4は、分岐が成功し
たために、メモリ34の内容をクリアする。 【0158】 サイクルT8 アドレス発生回路32は、線l33上の命令No.10の
アドレスを取込み、線l31へ命令No.10のアドレス
を出力する。命令No.10は、命令No.1と同様にし
て、メモリ34へ格納される。 【0159】デコーダ35においては、メモリ34の内
容がサイクルT7においてクリアされてしまったので何
もしない。 【0160】命令実行ユニット4においても実行すべき
命令が解読されていないので何も行なわない。 【0161】連想メモリ38に命令No.10自体が格納
される。 【0162】 サイクルT9 命令No.11が命令No.1と同様にして主記憶5から読
み出され、メモリ34へ格納される。 【0163】デコーダ35においては命令No.10の解
析が行なわれる。解析結果は、連想メモリ37へ格納さ
れる。又、命令No.11自体も連想メモリ36へ格納さ
れる。このとき連想メモリ36には、命令実行ユニット
4で最後に実行した命令No.5のアドレスが格納され
る。したがって、同一のエントリに、分岐元アドレス、
分岐先命令,分岐先命令解析結果分岐先次命令が格納さ
れることになる。 【0164】命令実行ユニット4においては、命令No.
10の解析終了をまって、実行が行なわれる。 【0165】(10) サイクルT7 サイクルT6において、連想メモリ36に該当するエン
トリが存在すると、図14(b)のように直ちに連想メ
モリ37および38より命令No.10の解析結果、命令
自体が読出される。又、連想メモリ36からは命令No.
11も読出されメモリ34へ格納される。 【0166】サイクルT7において、アドレス発生回路
32は、線l33を介して与えられる命令No.10のア
ドレスに対し、命令No.10およびNo.11の長さ分加
算して命令No.12のアドレスを作り線l31へ出力す
る。読み出された命令No.12はメモリ34へ格納され
る。 【0167】デコーダ35においては、命令No.11の
解析が行なわれている。 【0168】命令実行ユニット4は、命令No.5の実行
終了後直ちに、連想メモリ37および38から読み出さ
れた命令No.10を実行する。 【0169】 【発明の効果】以上のように本発明によれば、命令制御
ユニットと、命令実行ユニットが並列動作したとして
も、主記憶へのデータ読出しの競合がおこりにくくな
り、命令処理の高速化が図れる。
DETAILED DESCRIPTION OF THE INVENTION [0001] BACKGROUND OF THE INVENTION The present invention can process instructions at high speed.
The present invention relates to a data processing device. [0002] 2. Description of the Related Art A conventional data processing apparatus is shown in FIG.
Interface for exchanging data with the storage device 5.
Circuit 7 and an instruction for controlling the instruction to be executedcontrolUni
And an instruction execution unit 4 for executing instructions.
ing. The instruction read from the storage device 5 is the line 73,
Command control unit via interface circuit 7 and line 11.
Command control unit 3 is transferred to
Command is analyzed and the result is sent to the instruction execution unit 4 via line 1.
Transfer via 5 The instruction execution unit 4 uses the analysis result.
As a result, various control signals are generated and these control signals are used.
Open and close each gate in the instruction execution unit 4
Perform processing such as payment and shift. Line 1 depending on the command
4, specify the address via line 74, and
Data via line 13 and line 74, or to main memory 5
Write the calculation result. The command control unit 3
The read address is the line 12, the interface circuit 7,
Instruct the storage device 5 via line 74. A series of these
By repeating the operation, the data processing device 1
The program stored in the device 5 is executed. The present data processing apparatus comprises an instruction control unit 3
And instruction execution unit 4 can operate in parallel
And pipeline control is performed. In this conventional device, the main memory 5
A cache memory 71 is provided for high-speed reading of data.
doing. Cache memory 71 is the address on line 73
The data of the corresponding entry will be searched if
Is read out and the main memory 5 is not accessed. I
Therefore, in the case of a hit, access to main memory is
Time can be omitted and high-speed data reading is possible
It works. As an example of such a device, for example, Iwanami
Course Microelectronics "Microcomputer
Hardware "Issued November 1984, No. 144-14
There is a data processor stored on page 8. However, as described above, the cache memory is provided.
In a data processing device that uses
The cache, that is, access the contents of the cache
A ban is needed. For example, the instructions stored in main memory
Or the contents of the operand data are updated to new contents.
Or instruction cache memory or opera
Logical address stored in the main cache memory
If the correspondence with the stored physical address is no longer guaranteed.
Instruction cache memory or operand cache
Command or operand data stored in the memory
Instruction or operand data whose contents are stored in main memory
If there is a discrepancy with the
It is necessary to invalidate the cache memory. After such a change in state, the following three
The possibility arises. In the first case it is stored in the instruction cache
Only the instructions that are stored do not match the instructions stored in main memory,
In the second case, the operation stored in the operand cache
Operand data in which only land data is stored in main memory
In the third case, the instruction cache and
Instructions and operand data stored in the land cache
Command and operand data stored in main memory
They are inconsistent with each other. Therefore, in order to improve the effectiveness of the cache,
Responds to these three state changes by the instruction cache and
And either operand cache or both
It is effective to disable it selectively. On the other hand, the instruction from the main memory is fetched.
Belongs to the block data including this fetch instruction in between
The next instruction is also fetched from main memory
It will be stored in the instruction cache. Therefore, the current fetched from main memory
After execution of the instruction, the data processor will issue the next instruction from main memory.
Instead of using the instruction cache inside the data processor,
Will be switched. On the other hand, the data formed on the semiconductor LSI chip is
To test the functionality of the data processor from outside the chip
Check whether the data processor executes instructions in a predetermined order.
Need to check. To this end, a data processing device
After execution of the current instruction in the instruction execution part of the
Next instruction appearing on the external bus to and from the data processor chip
Operation code (operation code)
It is necessary to check whether or not (d) is the prescribed one. On the other hand, the variable length instruction set has an immediate
Non-leading code that is
There is an instruction with a short code or an instruction with a long non-leading code.
, The position of the opcode at the beginning of the short instruction and the long instruction
It is difficult to know. Therefore, from the outside of the data processor chip
Immediately after execution of the instruction to facilitate functional testing
In addition, the operation code that is the start code of the next instruction is always stored in the main memory.
It is effective to fetch from and check on the external bus
Becomes [0015] Therefore, the object of the present invention is
Immediately after the execution of an instruction, the beginning code of the next instruction
The operation code that is a code is always fetched from the main memory
By making it possible to check on the bus,
Data processing equipment that facilitates functional testing from outside
To provide. [0016] The invention disclosed in the present application
The outline of a typical invention is as follows. Data processing used with main memory (5)
A device that generates a command address (l31)
Instruction address generator (32), a plurality of instruction addresses, and
Stores multiple instructions corresponding to multiple instruction addresses
The instruction cache memory (31) and the instruction address
In the instruction address (l31) generated from the raw part (32)
Therefore, the main memory (5) or the instruction cache memory is
Decode the instruction read from Mori (31) and
The resulting instruction decoder (35) and the instruction decoder (3
The instruction is executed according to the above decoding result of 5), and the instruction is executed.
Instruction execution that outputs the next instruction request signal (141) at the end of the line
The line section (4) and an external purge signal from outside the data processing device.
Signal (61) is being supplied, the next instruction request signal
Outputs a purge command signal (162) in response to (141)
And a purge control circuit (6) configured to
Then, according to the purge command signal (162), the command key
It is specially designed to invalidate the contents of the cache memory (31).
Sign. [0018] In this typical invention, the start of the instruction is
In the instruction execution unit (4) using the pecode and the non-leading code
When the instruction execution is completed, the instruction execution unit (4) requests the next instruction.
The signal (141) is output. Therefore, from the outside
Signal (l61) is continuously supplied to the purge control circuit (6).
While being supplied, it responds to the next command request signal (l41).
In response, the purge command signal (162) indicates that the purge control circuit
It is output from (6). Then, the operation code at the beginning of the next instruction and the non-preceding
Including the initial code, it is stored in the instruction cache memory (31).
Access to the contents of the stored block data is prohibited
As a result, the data processing device is connected to the external bus (l23, l2
From the main memory (5) via 4)
The new block data, including the
To switch. Especially, the first operation of the next instruction from the main memory (5)
The code fetch timing is the purge control circuit (6)
Synchronized with the purge command signal (162) output from
Non-leading code fetch instruction of the next instruction from memory (5)
Purging command signal (162) or next command in imming
The request signal (141) is not output. Therefore, it is fetched from the main memory (5).
The first operation code of the next command is also the purge command signal (162)
Or the external bus in synchronization with the next command request signal (l41)
Can be easily checked on (l23, l24)
It works. Other objects and features of the present invention are as follows.
It will be clear from the examples. [0022] Embodiments of the present invention will be described in detail with reference to the drawings.
You. In the following description, first, the data processing of this embodiment is performed.
The instructions used for the processing device are explained, and then the device configuration is explained.
The explanation will be given and finally the operation will be explained. 1) Instruction   Basic instruction format FIG. 2 shows the instruction format of this embodiment. The instruction is an operation type (bits 15 to 1).
2), an operation that specifies the addressing mode, etc.
Data (bits 11 to 0), data for address calculation
And has an extension of 32 bits in length. Depending on the type of addressing mode specified
In some cases, no extension part is involved. Bit 11 of the operation word
9 is the data used as one operand of the operation
Indicates the number of the data register to hold. The other operan
Mode depends on bits 5 to 0 of the operation word.
Is specified. That is, bits 2 to 0 are
Indicates the number of the register that should be referred to in order to obtain the perland.
However, bits 5 to 3 indicate the addressing mode.
You. In this embodiment, as described later,
It has eight data registers and eight address registers.
You. Bit pattern of bits 5 to 3 and add
The correspondence of the lessing mode is shown in FIG.
You. In the figure, "Data register" mode and
The “Dress Register” mode is
The contents of the data register and address register are
It is a land mode. Address register indirect
The mode is such that the contents of the specified address register
This mode is used as a memory address of a memory.
"Post-increment" mode and "pre-decremen"
Mode is basically the address register indirect mode
Same as, but for storing or fetching operands
Immediately before and immediately before, respectively, the contents of the address register
The difference is +1 and -1 respectively. Therefore, this model
The operand is the operand data stored in a series of addresses.
Data will be read out one after another and calculated. [Address register with displacement]
"Indirect" mode is the contents of the specified address register.
The value obtained by adding the contents of the extension to the memory address of the operand.
This is the mode used as a
Mode with program counter ”mode
Add the contents of the extension to the dress (contents of the program counter)
Use the added value as the memory address of the operand
Mode. And the "absolute address" mode is
Is used as is as the memory address of the operand.
This is the mode to use. Stack instruction in basic instruction Since the current programs are written in high-level languages,
It has a stack as a data structure. Especially Saburu
When using Chin, variables used in the main routine,
Variables used in subroutines are grouped as separate groups.
It is necessary to store it in the memory. This group with a frame
Say. The stack is a part of the main memory and the stack port.
It consists of an interface. What is the stack pointer?
Address for storing in main memory one after another from address
This is a register that stores the memory. When calling a subroutine,
Move the value of the pointer to the frame pointer. Flame Po
The interface stores the highest address of one frame.
Register. In this embodiment, 8 addresses
One of the registers is the stack pointer and the other is
Is used as a frame pointer. The stack is accessed by 2 bits of the instruction.
Frame pointer or stack point at ~ 0 bit
Addressing mode of 5 to 3 bit instructions.
"Address register indirect", "Post ink"
"Liment", "Pre-decrement" or "Display"
Indirect address register with statement "
Is performed using. Of access to these stacks
These modes are collectively called stack access mode.
Will be called a stack instruction. As described above, in this apparatus, the stack point is
Since the data is set in advance in one register,
Programs that do not specify registers as stack pointers
Performance may decrease. Control command Further, in the data processing device of this embodiment, the general instruction
With control instructions having a different format. In this embodiment, a purge (PURGE) command and
Yes, it is an instruction issued exclusively by this data processing device.
You. However, it is read from the main memory together with the above basic instruction.
In some cases. The function of this command is built into the data processing device.
Invalidate associative memory 21, 31 or 36, 37, 38
It is to be. The reason why this instruction exists is as follows.
You. The data processing device 1 is provided in one chip.
It is stored in. With the address created in this chip
It is to access the outside. However, the current system
In the stem, the address created in the chip and the external
The address actually assigned to the device may differ.
The logical address of the address created in the data processor.
Address, the logical address of the address actually given to the external device
Sometimes called a dress. Generally, logical address and physical
Translation with an address is a special function called an address translation mechanism.
The software can be used as an on-chip output unit of a data processing device, or
Is provided externally. For example, Ibid. No. 14
It is shown on page 5. The data processing device of this embodiment will be described later.
Only refer to the logical address in the chip
So, configure a system to attach an address translation mechanism to the outside
Address, the main memory address referenced by the physical address
Address of the associative memory in the chip that is referenced by the address and logical address.
The dress may be different. In particular, the address space on the main memory is
When switching to the less space, the associative memory in the data processing device 1 is
The address of the information held in memory and the actual main memory
Correspondence with the address cannot be guaranteed. This contradiction is detected by the data processing device in advance.
To disable the internal associative memory
You can solve more. Therefore, the address translation mechanism is used in the system.
If the address space is provided in the
The switching signal is asserted by asserting the purge signal.
I need to teach Oki. In this data processor, the purge control circuit
As described later in the section, the purge message from the address translator is
Issue a purge command based on the number and the purge command
Have been. The above is the reason for providing the purge command. Next, referring to FIG. 3A, the purge command flow
The format will be described. In purge command, contents should be invalidated
Purge code (PURGE COD
According to E). The correspondence is shown in FIG. Purge coat
When bits 7 and 6 of the command are "00", they are not invalidated.
When the purge code is "01000000", the data
Disables the system's associative memory. Data-based associative memory
Corresponds to the associative memory 21 described later. When the purge code is "10000000"
Command, the associative memory of the instruction system is disabled. Command-related association
As the memory, associative memories 31, 36, 37 described later are used.
And 38 are applicable. If the purge code is "11111111"
Then all internal associative memory is disabled. 2) Next, the structure of this apparatus will be described in detail.
I do. In FIG. 4, reference numeral 1 is a data processor,
An interface unit for exchanging data with
Knit 2 and the data from the interface unit
An instruction control unit 3 for analysis, and an instruction control unit
The instruction execution unit for executing the analysis instruction from the unit.
Made of knit. 4 bytes per access from main memory 5
(32-bit) data can be read. The instruction execution unit 4 is required for instruction execution.
Is the data stored in the main memory via the interface unit 2?
Read from Instruction control unit 3 and instruction execution unit 4
And can be operated in parallel and pipeline control is performed. Each circuit will be described below. Command control unit 3 The address generation circuit 32 uses the prefetch address update signal.
No. via line l34 and the branch destination address on line l3
3 via the prefetch address and
H request is output to line l31 and executed by instruction execution unit 4
It is a circuit for outputting the address of the inside instruction to the line l32. FIG. 5 shows the details of the address generation circuit 32.
You. Reference numeral 323 is a selection circuit, which is normally a register 32.
Select the prefetch address from 1 and select the branch address
Is given via line 1332.
Select the space. Reference numeral 325 denotes an adder, which is supplied from the selection circuit 323.
The number given from the constant generation circuit 324 to the instruction address
Is added. The number generated by the constant generation circuit 324 is
Corresponds to the length of the command to be issued. Register 321 receives the signal from line l342.
Thus, the output of the adder 325 is latched. Accordingly
Register 321 is updated each time a signal is received from line l34.
New, prefetch address on line l312 in line l31
Will be output. The update signal of line l34 is
Output as a fetch request from the line 1311 of the line l31
You. Reference numeral 326 is a selection circuit, which is normally an adder 329.
Output from the branch address via line l332
The branch address is selected. cash register
The star 327 transfers the instruction address from the selection circuit 323.
Output the instruction address on line l32. The adder 329 receives the instruction address on the line l32.
The number given by the constant generation circuit 328 is added to the interval.
The number generated by the constant generation circuit 328 is the number of commands to be executed.
Corresponds to the length of the decree. The associative memory 31 stores the instruction address and its
Stores the instruction corresponding to the instruction address in the same entry
It is a memory to keep. The structure of the associative memory 31 is shown in FIG. The entire
Consists of 64 entries, each entry is a search field
Mode 311, valid bit 312 and data field 3
13. The search field is given via line l312.
This is a field for storing the instruction address to be sent. Effectiveness
The bits are the data stored in the data field 313.
This is a bit indicating whether or not it is valid. Data field 31
3 for storing the instructions given via line l35
The field has a length of 4 bytes (32 bits). The search to the associative memory 31 is performed via the line l31.
The instruction address given by Instruction address is
Applicable if present and valid bit set
The instruction stored in the data field of the entry is
Output to 52. Also, a fetch end signal is also sent to the line l351.
Output. If there is a hit, the signal on the line 126 is turned on.
The access to the main memory 5 is prohibited by the selection circuit 22.
You. The associative memory 31 is updated from the line l31.
There is no entry that stores the instruction address, and it is valid.
This is done when the bit is reset. Main memory 5
When the fetch end signal of line l351 from is turned on
Is the read command input via line l35 and is it line l31?
The oldest rewritten ent
Will be written to Validity of newly rewritten entry
The set 312 is set. The associative memory 31 is provided by executing the purge command.
Will be invalidated. Command when purge command is executed
Effective by the signal line (not shown) from the execution unit 4
Bit 312 is reset for all entries. First-in, first-out memo
When the fetch end signal of the line l351 is turned on,
It stores multiple instructions given via line l352.
Memory, the earliest written instruction
It is a memory that can be read easily. The control circuit 33 has a free memory 34.
In this case, the fetch end signal on the line l351 is turned off.
In order to read the next instruction, through line l34
Address update circuit 32 to the prefetch address update signal.
It is a circuit for transmitting the signal. The decoder 35 receives the instruction from the memory 34.
Parse and convert to microprogram instruction address
Output to line l36. The associative memories 36, 37 and 38 are
Branch with a buffer that works to suppress disturbances in the plan
The original address, branch destination instruction, and decode result are the same
Remember it. The structure of the associative memories 36, 37 and 38 is shown in FIG.
Shown in It consists of 4 entries in total, and each entry is
Search field 361, valid bit 362 and data frame
It is composed of fields 363, 37 and 38. Search field 361 is accessed via line l32.
This field stores the given branch source address.
You. Valid bit field 362 is data field 3
Indicates whether the data stored in 63, 37, 38 is valid
It's a bit. Part of the data field 363 is a line
A file for storing the next branch destination instruction given via 138.
Field. The other part 38 of the data field is a line
Stores the branch destination instruction itself given via I38.
Field. The other part 37 of the data field is
The microinstruction address provided via line 136
This is the field to be paid. In addition, in the overall configuration diagram of FIG.
The associative memory 36 includes an address generation circuit 32 and a decoder 35.
And the associative memory 37 is provided between the decoder 35 and the instruction.
It is provided between the execution units 4. The reason is
The location of the source of various information stored in the memory 36
The position of the source of the information stored in the memory 37 is different.
Because it is. In this way, the associative memories 36, 37
The distance between the information source and the associative memory
Chips that can be separated from each other by wiring between them
The occupied area can be reduced. Associative memories 36 and 37 are lines
It is connected to the associative memory 36.
The address of the selected entry is the associative memory 37, 38
To the same entry, and both entries are selected.
Will be lost. The associative memories 36, 37 and 38 are searched for
Performed at the branch source address provided via line l32.
The branch source address exists, and the valid bit 362 is set.
If yes, the data field 36 of the corresponding entry
The information stored in 3, 37, and 38 are the lines l35 and l, respectively.
39 and line 140. The associative memories 36, 37 and 38 are updated by the line
There is an entry that stores the branch source address from l32.
Not present and valid bit 362 is reset
To be done. At this time, branch source address and branch destination address
No, branch destination instruction decode result Branch destination next instruction
Is also written in the old rewritten entry. Newly rewritten
The valid bit 362 of the obtained entry is set. The associative memories 36, 37, 37 have barge life.
It is invalidated when the decree is executed. Barge instruction is executed
Signal line from the instruction execution unit 4 (not shown).
The valid bit 362 is reset for all entries.
Is set. The selection circuit 47 is provided via line l45.
When the branch success signal is received, the line l39 is selected.
You. When the branch failure signal is received, the line l36 is selected.
You. The selection circuit 46 is supplied via line l45.
When the branch success signal is received, the line l38 is selected.
You. When the branch failure signal is received, the line 140 is selected.
You. The register 38 is used as a register from the decoder 37.
The black instruction address is the next instruction given via line l41.
Latch by command request signal. And the latched
The black instruction address is sent to the instruction execution unit. Was
However, the barge command signal and the line l41 are sent via the line l62.
When the next command request signal of
Not via their microinstruction address, but via line l63
Latch the purge command. Register 40 sends the next instruction via line l41.
When the request signal is received, the signal from the selection circuit 46 is changed to
To switch. Instruction execution unit 4 The ROM 41 is arranged on the time axis given via the line 140.
The address of each microinstruction in the sequence of microinstructions
Control sequentially stored and stored at the corresponding address
The information is sequentially read and output on the line 142. The processing circuit 45 outputs the control information on the line l42.
Based on the calculation. Get operand data from main memory
The address for output is output via line 133 and read.
Input operand data via line l43. Another line
The command itself is input via l44. Life on line l41
When the command execution is completed, the next command request signal is output.
If the branch is successful when the branch instruction is executed, the line l
45 Branch success signal, branch failure if branch failed
Output a signal. FIG. 8 is a diagram showing the structure of the processing circuit 45.
You.linel46, l47 and l48 are internal data buses
It is. The register group 452 includes eight data registers, eight
It consists of a book address register. Register group 452 is a line
l422 specifies one or two registers,
Read data to l46, l47 or from bus l48
Data is read. Stack of 8 address registers
Includes pointer and frame pointer. Stack pointer
Is stored in the main memory, so each time it is used
The content is subtracted and incremented by 1 each time it is used for reading
I do. Reference numeral 453 is an arithmetic circuit, which is a bus l46, l
The signal on 47 is added and removed based on the instruction from line l423.
Performs calculations, etc., and outputs the calculation results to the internal data bus l48
I do. Further, the arithmetic circuit 453 controls for one instruction.
Computation ends after all information is input from line l42
Then, the next command request signal is output to l41. When the branch instruction is executed, the condition
Code C. The condition specified by the branch instruction is satisfied by referring to C
If the branch success signal is satisfied, if not satisfied
A branch failure signal is output to the line I45. When the purge command is executed, first, the par
Output Jiclear signal on line l49, indicated by purge code
The signal line that does not show the effective bit of the associative memory
Reset via. Reference numeral 454 is a data designating circuit, which
Increment mode and pre-decrement mode
In this case, the operand size (life
By order, 1 byte, 2 bytes, 4 bytes are specified
The lower 2 bits of the address on line 133 are
Of the 32-bit data on line 144 encoded, the operation
This is the data required as a land and the operand size
The data having the length is interfaced through the line 150.
In step S451. Interface 451 is on line l421
The fetch end signal on line l431 is turned on based on the control information.
Data from the time line l432 to the internal data bus l4
7 and l48, fetch request signal on line l431
Turn off. In addition, the data from the internal data buses l47 and l48
Data to line l432 and fetch request signal to line l43
Output to 1. Bit of data to read on line l50
When the position and length are specified, the data based on that is specified.
Cut out. The associative memory 21 stores operand data.
Operand buffer 24 and bytes to remember
From the line buffer 25 for storing data
You. The structure of the operand buffer 24 is shown in FIG.
You. 22 entries in total, each entry is a search
Field 241, valid bit 242 and data file
Field 243. The search field is given via line 133.
Is stored to store the address of the operand data
It is Ludo. The valid bit 242 is stored in the data field.
A bit that indicates whether the stored operand data is valid
is there. The data field 243 is provided via line 121.
Field for storing the obtained operand data
It is. The update / search of the operand buffer 24 is performed by
The following two types based on the instructions to be executed by the instruction execution unit 4
Is controlled. (A) Stack accessMode,life
The contents of the address register specified by
When it is output to the line l332 as the address of the data
Is the operand buffer 24
Responded to search. Operand data address exists
And the valid bit 242 is set,
Opera stored in the data field of this entry
Band data is output on line l432. Line l43 at this time
The fetch end signal of 1 is turned on. or,hitDid
To the main memory 5 by the selection circuit 22 via the line 125.
Access is prohibited. In addition, as a result of the search
Operand data read from main memory 5
Is input via line l21 and the operan from line l33
The oldest rewritten along with the addressentryWrite to
I will. The valid bit 242 of the newly rewritten entry is
Set. (B) The instruction execution result is obtained and the line l43 is displayed.
The execution result is output, and the execution result is stored in the line l332.
When the address on the main memory 5 to be output is output,
The pellet buffer 24 is searched by that address. So
Address exists and valid bit 242 is set.
Data field of the corresponding entry,
Is rewritten with the execution result on the line l332. Effective Bit
242 is set. Even if you hit at this time,
Nothing is output to the line 125. Therefore, the selection circuit 2
2 is not prohibited from accessing the main memory 5. Also, of search
As a result, if there is a mishit, the operand buffer
Do not rewrite the data. Operanes other than the above (a) and (b)
The search buffer is not rewritten. In the case of (a), the stack is updated and the stack is updated.
This is a case of reading data from the memory. (A)
The operand buffer is updated and rewritten when
The operand buffer is an internal memory for storing stack data.
It can be said that it is Mori. In the case of (b), depending on the instruction, the stack
May be directly addressed and data rewriting may occur.
This is a measure to deal with this. The operand buffer 24 receives the purge signal.
More disabled. When the purge signal is input,
All the valid bits 242 are reset. The line buffer 25 is a post-increment.
Operand mode and pre-decrement mode
When reading byte data of the length specified by the size
4 bytes of consecutive addresses read from main memory 5 at once
Is stored, and successive operand add
This is a memory for speeding up access to addresses. The structure of the line buffer 25 is shown in FIG.
You. The line buffer 25 has eight address registers.
6 excluding stack pointer and frame pointer
It has one-to-one correspondence with the register of the book. did
Therefore, it should consist of 6 entries in total.
become. Each entry has a search field 251, 4
One valid bit 252-255 and four data bits
Fields 256 to 259. Effective bit 25
2 to 255 are data fields 256 to 259, respectively.
Corresponding, and the data of the corresponding data field respectively
Indicates whether is valid. 4 data files of 1 entry
In the field, there are consecutive records read from the main memory 5 at one time.
The 4-byte data of the dress is stored respectively. The line buffer 25 is searched for between addresses.
Of the contact modes, post increment and
ClementWhen in modeTo do. Post increment and pre-decreme
In addition mode, the value of the address register is incremented by 1 or
Subtract the data stored in consecutive addresses
This is a mode in which read processing is performed individually. In this mode, the first data is read
When you search the line buffer, the corresponding entry still exists.
It usually does not exist. Therefore, the line 1 to the main memory 5
The address is sent via 33. At this time, main memory 5
4 bytes of data are read at a time from the
To the address register specified by the instruction in this mode
Written to the corresponding entry. At the same time, the data is selected
It is output from the circuit 22 to the line 143. At this time, a 32-bit data is input to the line l43.
Data is sent, but the data required as an operand is
It is data of the number of bytes specified by the land size. This
Data is cut out by the data designating circuit 454,
And interface 451. When the processing of the first data is completed,
The content of the address register specified by the instruction is incremented by 1, or
Decreases and the next data is read. At this time on line 133
The output address is continuous with the previously output address.
Since it is an address, it was stored in the line buffer first.
The probability that the corresponding address exists in the data is extremely high.
No. If the search results in a hit, the main memory 5
The data of 4 bytes of the corresponding entry is not read.
Output to line l43. Also, output to line l25,
The selection circuit 22 is prohibited from accessing the main memory 5. In the instruction execution unit 4, the instruction execution
The line result is obtained, and the execution result is output to line l43.
Address in main memory 5 where the execution result should be stored in l33
Is output, the line buffer 25
Responded to search. The address exists and is valid
If the entry is set, the data
The field data is rewritten to the execution result on line l33.
You. The valid bit is set. If you hit
However, nothing is output to the line 125. Therefore, select times
The path 22 is not prohibited from accessing the main memory 5. Also, the inspection
If the result of the search is a mishit, the line buffer 2
No data rewriting of 5 is performed. This operation is also an operand
Like the buffer, the contents of the line buffer are stored in the main memory 5
This is a procedure to keep it in agreement with the content. As described above, the line buffer 25 is used.
Post-increment predecremen by
In the main mode, it is recorded once every 4 bytes on average.
You can access the memory and read at high speed.
It works. In particular, the operand size is specified as 1 byte
If four operand data are processed,
It only needs to access the main memory once. Interface unit 2 The selection circuit 22 receives the instruction add provided via the line l31.
Operand or operand data given via line 133
One of the addresses is sent to the main memory 5 via the line 123.
It is what is sent. FIG. 11 shows a block diagram of the selection circuit. Line l3
11 is a read request signal and line 1312 is an address signal
l31. Line l331 is a fetch request signal, line
An address signal l332 constitutes the line l33. AND
Circuit 222 is the logic of the signals on lines 1311 and 126.
Command control when associative memory 31 is hit
Outputs a signal to prohibit access to main memory 5 from circuit 3
I do. AND circuit 226 is on line l331 and line l25
When the logical product of the signals of
Access the main memory 5 from the instruction execution unit 4
Output the prohibition signal. The AND circuits 223 and 227 are used to execute the instruction execution.
Time to prioritize access requests from line unit 4
Road. With AND circuits 223 and 227,
Either flop 224 or 228
Is set. The selector 221 is a flip-flop 224.
Alternatively, one of the address signals selected by 228
This is a circuit for outputting to l232. The OR circuit 230 includes the flip-flop 22.
Obtain the logical sum of the outputs of 4, 228, and output the fetch request signal.
This is a circuit for outputting to the line 1231. Lines l231 and l
The line 232 is constituted by 232. Data from the main memory 5 is sent via the line l24.
can get. The line l241 indicates a fetch end (read end) signal.
It is the issue and informs that the data is ready. Line l
The data itself is input on 242. The AND circuits 225 and 229 are connected to the line 12
It is the instruction control unit 3 that issued the fetch request to 31.
Whether there is an instruction execution unit 4 or not, and issues a request.
End the fetch to the line (l351 or l211)
The completion signal informs that the data is ready. life
The instruction control unit 3 and the instruction execution unit 4 are respectively connected to the line l3.
Look at l351 in 5 or l211 in line l21
Check whether there was a response to the
The request will be turned off. Purge control circuit 6 The purge control circuit 6 inputs the purge signal from the line l61.
Then, the purge command signal is output to the line l62, and the line l6
The purge command is output to 3. FIG. 12 shows a configuration diagram of the purge control circuit 6.
You. When the purge signal is input from the line l61, A
The D terminal of the flip-flop 65 is connected via the ND circuit 64.
turn it high. The next command request signal is input via line l41.
When input, latch the D terminal input at that timing
Then, the purge command signal on line 162 is turned on. Accordingly
And stored the purge command in advance via line 164.
The contents of register 66 are transferred to register 38 via line l63.
Latch (Fig. 1). Also at this time, flip flip
62 is also set. Purge by instruction execution unit 4
When the instruction is executed, the purge clear signal is first sent to the line l49.
Is output to This resets the flip-flop 62
Cut. The delay circuit 63 and the AND circuit 64
The D input of the up-flop 65 is set to Low. Purge command
Is completed, the next command request signal on line l41 turns on.
I do. This sets flip-flop 62
The lip flop 65 is reset. Flip-flop
The output of the amplifier 62 is input to the delay circuit 63. During this time
In the register 38, the instruction decoding result from the selection circuit 47 is
Will be latched. After that, the delay circuit 63
The output goes high. At this time the line l61 is still purged
When outputting a signal, the flip-flop 65
The D input is high. Therefore, the next instruction is required.
When the request signal is input, the purge command signal is again sent to the line 162.
Is output. [0120]When the purge command signal is output, the association memo
Access to the contents of the block data stored in
Access to the external bus 12 because access is prohibited.
From the main memory 5 via 3,124, the first opeco of the next instruction
Code and new block data including non-leading code.
You will have to Therefore, the running program
Which of the instructions in the chip is being executed on the chip
You can observe from. In addition,The lines l61 and l63 show
An address conversion circuit not shown can be connected. The address conversion circuit, as described above,
Addresses used inside the processor and devices outside the data processor
Used for systems with different addresses
It is. In this embodiment, the purge command is reset.
So that it can be alternately latched by the transistor 38
This is a normal instruction to the data processor.
Run the program step by step to check the program.
It is. 3) Description of operation Next, the operation of the data processing device will be described. FIG. 13 shows an example executed in this data processing device.
An example of an instruction sequence to be executed is shown below. Instructions are stored in main memory from No. 1 to No. 11.
Are stored in consecutive addresses. Instructions No. 1 and No. 2 have stack pointers
Data that specifies the data of the indicated address with each instruction
This is an instruction to store in a register. Command No. 3 is command No. 1 and command No. 2, respectively.
Adds the contents of the registers that store the data and returns the result
Is stored in one of the data registers. Command No. 4 is the data record specified by the command.
Register contents in the address register specified by the instruction
It is an instruction stored at the instructed address. Instruction No. 5 is the address specified by the instruction.
Command to jump to the instruction at the address specified by the register
It is a decree. In the case of this example, jump to instruction No. 10.
I am supposed to. Command No. 10 is the two specified by the command.
This is an instruction to add the contents of the data register. When the above instruction sequence is executed, the time check
The chart is shown in FIG. Cycle T1 The address generation circuit 32 adds the instruction No. 1 to the line l31.
Output the response. The associative memory 31 searches for the address
However, if there is no hit, read the data into main memory 5.
go to. The data read from the main memory 5 is the associative memory 31.
It is also stored in the memory 34. Cycle TTwo Since the memory 34 has a free space, the address generation circuit 32
The address of instruction No. 2 is output. The associative memory 31 is
Similar to the previous instruction No. 1, the address is searched and hit.
If not, the data from the main memory 5 is written. Read again
The stored data is stored in the memory 34. The decoder 35 uses the instruction N from the memory 34.
o.1 is analyzed and the analysis result is stored in the register 38. The instruction No. 1 matrix stored in the register 38
The execution of the black instruction sequence is started in the instruction execution unit 4.
Be started. At execution time, it is stored in the data register.
The address of the operand data for saving to line l33
However, since this instruction is a stack instruction, the associative memory
There is a high possibility that the corresponding entry exists in 24. I
Therefore, the instruction No. 2 is read from the instruction control unit 3.
Request and operand data from the instruction execution unit 4
Read requests are less likely to conflict with each other. On the contrary, the instruction No. 2 is sent to the associative memory 31.
If it exists, the operand data is stored in the associative memory 24.
And the command control unit 3 regardless of whether
Read requests to the main memory 5 with the instruction execution unit 4 compete
Do not match. Cycle TThree The instruction No. 3 is stored in the main memory 5 in the same manner as the instructions No. 1 and 2.
It is read and stored in the memory 34. In the decoder 35, the solution of the instruction No. 2 is solved.
Analysis is performed. In the instruction execution unit 4, the instruction No. 1 is executed.
The line ends, and the execution of the instruction No. 2 starts. The instruction No. 2 is a stack like the instruction No. 1.
This is an instruction, the associative memory 24 is searched, and
When reading, the line to read the operand data to the main memory 5
Good. In this case, the instruction control unit 3 and the instruction execution unit
The competition with Knit 4 is the same as in the case of instruction No.1.
is there. Cycle TFour The instruction No. 4 is read from the main memory 5 in the same manner as the instruction No. 1 etc.
It is output and stored in the memory 34. In the decoder 35, the solution of the instruction No. 3 is solved.
Analysis is performed. In the instruction execution unit 4, the instruction No. 2 is executed.
The line ends, and the execution of instruction No. 3 starts. The instruction No. 3 is the data in the instruction execution unit 4.
Main memory because it is an instruction that operates using a data register
The operand data to 5 is never read. Cycle TFive The instruction No. 5 is read from the main memory 5 in the same manner as the instruction No. 1.
And stored in the memory 34. In the decoder 35, the solution of the instruction No. 4 is solved.
Analysis is performed. In the instruction execution unit 4, the instruction No. 3 is executed.
The line ends and the execution of the instruction No. 4 starts. Instruction No. 4 is a data register in the main memory.
This is an instruction to write data. Write data to line l33
The remaining address is output. Operand buffer 24
Is whether or not this address rewrites the contents of the stack.
Is checked, and if it is to be rewritten, the operand
The contents of the buffer are rewritten to the data on the line l43. Line l
The data on 43 is sent to the main memory 5. Cycle T6 The instruction No. 6 is read from the main memory 5 in the same manner as the instruction No. 1.
And stored in the memory 34. In the decoder 35, the solution of the instruction No. 5 is solved.
Analysis is performed. On the other hand, the address generation circuit 36 uses the line l32
Address of instruction No. 5 being executed by the instruction execution unit
Output. The associative memory 36 is searched at the address.
It is. If there is no corresponding entry, the association
There is no output from the memories 37 and 38. The corresponding entry is
If it exists, the time chart after (10) described later.
Becomes In the instruction execution unit 4, the instruction No. 4 is executed.
The line ends and the execution of the instruction No. 5 starts. Cycle T7 The instruction No. 7 is read from the main memory 5 in the same manner as the instruction No. 1.
And stored in the memory 34. In the decoder 35, the solution of the instruction No. 6 is solved.
Analysis is performed. In the instruction execution unit 4, the instruction No. 10
The address is output on the line 133. Further, the instruction execution unit 4 succeeds in branching.
Therefore, the contents of the memory 34 are cleared. Cycle T8 The address generation circuit 32 receives the instruction No. 10 on the line 133.
Take in the address, and send the address of instruction No. 10 to line l31
Is output. Command No. 10 is command No. 10. Same as 1
And stored in the memory 34. In the decoder 35, of the memory 34
Y is cycle T7What has been cleared in
There isn't. Instruction execution unit 4 should also execute
Do nothing because the instruction has not been decoded. The command No. 10 itself is stored in the associative memory 38.
Is done. Cycle T9 The instruction No. 11 is read from the main memory 5 in the same manner as the instruction No. 1.
It is detected and stored in the memory 34. In the decoder 35, the solution of the instruction No. 10
Analysis is performed. The analysis result is stored in the associative memory 37.
It is. The instruction No. 11 itself is also stored in the associative memory 36.
It is. At this time, the associative memory 36 stores the instruction execution unit.
The address of the last executed instruction No. 5 in 4 is stored.
You. Therefore, the branch source address,
Branch destination instruction, branch destination instruction analysis result Branch destination next instruction is stored
Will be. In the instruction execution unit 4, the instruction No.
After the analysis of 10 is completed, execution is performed. (10) Cycle T7 Cycle T6In the
When there are birds, associative message is immediately generated as shown in FIG.
Analysis result of instruction No. 10 from instructions 37 and 38
It is read by itself. Further, the instruction No. is sent from the associative memory 36.
11 is also read and stored in the memory 34. Cycle T7Address generation circuit
32 is an instruction No. 10 instruction given via the line 133.
Add the length of commands No.10 and No.11 to the dress
The address of the instruction No. 12 is calculated and output to the line l31.
You. The read instruction No. 12 is stored in the memory 34.
You. In the decoder 35, the instruction No. 11
Analysis is being done. The instruction execution unit 4 executes the instruction No. 5.
Immediately after the end, it is read from the associative memories 37 and 38.
The executed instruction No. 10 is executed. [0169] As described above, according to the present invention, instruction control
Assuming that the unit and the instruction execution unit operate in parallel
Also, it is less likely that contention for reading data to main memory will occur.
Therefore, instruction processing can be speeded up.

【図面の簡単な説明】 【図1】従来のデータ処理装置の回路図。 【図2】本発明の実施例に用いる命令フォーマットを示
す図。 【図3】実施例に用いる特殊命令のフォーマットを示す
図。 【図4】実施例の構成図。 【図5】実施例に用いるアドレス発生回路32の構成
図。 【図6】実施例に用いる連想メモリ31の構成図。 【図7】実施例に用いる連想メモリ36,37,38の
構成図。 【図8】実施例に用いる処理回路35の構成図。 【図9】実施例に用いるオペランドバッファ24の構成
図。 【図10】実施例に用いるラインバッファの構成図。 【図11】実施例に用いる選択回路21の構成図。 【図12】実施例に用いるパージ制御回路6の構成図。 【図13】実施例の装置で実行される命令列を示す図。 【図14】図13で示した命令列を実施例の装置で実行
させたときのタイムチャート。 【符号の説明】 1…データ処理装置、2…インターフェイスユニット、
3…命令制御ユニット、4…命令実行ユニット、5…主
記憶、6…パージ制御回路。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a circuit diagram of a conventional data processing device. FIG. 2 is a diagram showing an instruction format used in an embodiment of the present invention. FIG. 3 is a diagram showing a format of a special instruction used in the embodiment. FIG. 4 is a configuration diagram of an embodiment. FIG. 5 is a configuration diagram of an address generation circuit 32 used in the embodiment. FIG. 6 is a configuration diagram of an associative memory 31 used in the embodiment. FIG. 7 is a configuration diagram of associative memories 36, 37, and 38 used in the embodiment. FIG. 8 is a configuration diagram of a processing circuit 35 used in the embodiment. FIG. 9 is a configuration diagram of an operand buffer 24 used in the embodiment. FIG. 10 is a configuration diagram of a line buffer used in the embodiment. FIG. 11 is a configuration diagram of a selection circuit 21 used in the embodiment. FIG. 12 is a configuration diagram of a purge control circuit 6 used in the embodiment. FIG. 13 is a diagram showing an instruction sequence executed by the apparatus of the embodiment. FIG. 14 is a time chart when the instruction sequence shown in FIG. 13 is executed by the apparatus of the embodiment. [Explanation of Codes] 1 ... Data processing device, 2 ... Interface unit,
3. Command control unit, 4 command execution unit, 5 main memory, 6 purge control circuit.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 内山 邦男 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 川崎 郁也 東京都小平市上水本町1450番地 株式会 社日立製作所武蔵工場内 (72)発明者 花輪 誠 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内   ────────────────────────────────────────────────── ─── Continuation of front page    (72) Inventor Kunio Uchiyama               1-280 Higashi Koikebo, Kokubunji-shi, Tokyo                 Central Research Laboratory, Hitachi, Ltd. (72) Inventor Ikuya Kawasaki               1450 Josui Honcho, Kodaira City, Tokyo Stock Association               Inside the Musashi Plant of Hitachi, Ltd. (72) Makoto Hanawa, the inventor               1-280 Higashi Koikebo, Kokubunji-shi, Tokyo                 Central Research Laboratory, Hitachi, Ltd.

Claims (1)

(57)【特許請求の範囲】 1.主記憶とともに使用されるデータ処理装置であっ
て、 命令アドレスを発生する命令アドレス発生部と、 複数の命令アドレスと該複数の命令アドレスに対応した
複数の命令とを格納する命令キャッシュメモリと、 上記命令アドレス発生部から発生された命令アドレスに
従って上記主記憶もしくは上記命令キャッシュメモリか
ら読み出された命令を解読し解読結果を生じる命令デコ
ーダと、 上記命令デコーダの上記解読結果に従って命令を実行
し、該命令の実行終了時に次命令要求信号を出力する命
令実行部と、 該データ処理装置外部から外部パージ信号が供給されて
いる間は上記次命令要求信号に応答してパージ指令信号
を出力するように構成されたパージ制御回路とを具備
し、 上記パージ指令信号に従って上記命令キャッシュメモリ
の内容を無効化せしめることを特徴とするデータ処理装
置。 2.上記データ処理装置はLSIチップに形成されたマ
イクロプロセッサであり、上記命令キャッシュメモリは
上記チップ内に形成されてなることを特徴とする請求項
1に記載のデータ処理装置。 3.上記命令キャッシュメモリは連想メモリであること
を特徴とする請求項1または請求項2に記載のデータ処
理装置。4. 上記パージ指令信号を一命令実行毎に出力させる手
段を具備することを特徴とする請求項1乃至請求項3の
何れかに記載のデータ処理装置。
(57) [Claims] A data processing device used together with a main memory, comprising: an instruction address generation unit for generating an instruction address; an instruction cache memory for storing a plurality of instruction addresses and a plurality of instructions corresponding to the plurality of instruction addresses; An instruction decoder which decodes an instruction read from the main memory or the instruction cache memory in accordance with an instruction address generated from an instruction address generating unit and produces a decoding result; and executes the instruction according to the decoding result of the instruction decoder, An instruction execution unit that outputs a next instruction request signal at the end of execution of an instruction, and a purge instruction signal that is output in response to the next instruction request signal while an external purge signal is being supplied from outside the data processing device. And a purge control circuit configured in accordance with the purge command signal. The data processing apparatus characterized by allowed to disable. 2. 2. The data processing device according to claim 1, wherein the data processing device is a microprocessor formed in an LSI chip, and the instruction cache memory is formed in the chip. 3. The data processing device according to claim 1 or 2, wherein the instruction cache memory is an associative memory. 4. 4. The data processing apparatus according to claim 1, further comprising means for outputting the purge command signal each time one command is executed.
JP7004636A 1995-01-17 1995-01-17 Data processing device Expired - Lifetime JP2685727B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7004636A JP2685727B2 (en) 1995-01-17 1995-01-17 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7004636A JP2685727B2 (en) 1995-01-17 1995-01-17 Data processing device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP60050512A Division JP2539357B2 (en) 1985-03-15 1985-03-15 Data processing device

Publications (2)

Publication Number Publication Date
JPH07200402A JPH07200402A (en) 1995-08-04
JP2685727B2 true JP2685727B2 (en) 1997-12-03

Family

ID=11589498

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7004636A Expired - Lifetime JP2685727B2 (en) 1995-01-17 1995-01-17 Data processing device

Country Status (1)

Country Link
JP (1) JP2685727B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002169724A (en) * 2000-12-01 2002-06-14 Oki Electric Ind Co Ltd Partial invalidation device for cache memory

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6022259A (en) * 1983-07-18 1985-02-04 Hitachi Ltd Cache memory control system
JPS61168046A (en) * 1985-01-22 1986-07-29 Nec Corp Microprocessor
JPS61210430A (en) * 1985-03-15 1986-09-18 Hitachi Ltd Data processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6022259A (en) * 1983-07-18 1985-02-04 Hitachi Ltd Cache memory control system
JPS61168046A (en) * 1985-01-22 1986-07-29 Nec Corp Microprocessor
JPS61210430A (en) * 1985-03-15 1986-09-18 Hitachi Ltd Data processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002169724A (en) * 2000-12-01 2002-06-14 Oki Electric Ind Co Ltd Partial invalidation device for cache memory

Also Published As

Publication number Publication date
JPH07200402A (en) 1995-08-04

Similar Documents

Publication Publication Date Title
JP2539357B2 (en) Data processing device
US5652900A (en) Data processor having 2n bits width data bus for context switching function
EP0996057B1 (en) Data processor with an instruction unit having a cache and a ROM
KR920006275B1 (en) Data processing apparatus
US6611909B1 (en) Method and apparatus for dynamically translating program instructions to microcode instructions
US5446849A (en) Electronic computer which executes squash branching
KR100266424B1 (en) Data processor having a microprogram rom
JP2004157593A (en) Multiport integration cache
JPH06119166A (en) Method for performing data operation in register with simplified-instruction-set processor
KR19980069757A (en) Microprocessor and Multiprocessor Systems
KR100210205B1 (en) Apparatus and method for providing a stall cache
US5206945A (en) Single-chip pipeline processor for fetching/flushing instruction/data caches in response to first/second hit/mishit signal respectively detected in corresponding to their logical addresses
JP2685727B2 (en) Data processing device
US5363490A (en) Apparatus for and method of conditionally aborting an instruction within a pipelined architecture
US5361338A (en) Pipelined system for decomposing instruction into two decoding parts and either concurrently generating two operands addresses of merging decomposing decoding codes based upon the second operand
JP2680828B2 (en) Digital device
US5269008A (en) Method and apparatus for pre-processing the source of a pop instruction in a pipeline computer
JPH02214937A (en) Data processor
EP0834118B1 (en) Microprocessor using instruction field to specify expanded functionality and corresponding method
JP2656765B2 (en) Data processing device
JP2636821B2 (en) Parallel processing unit
JPH07200406A (en) Cache system
JP2001265651A (en) Data processor
JP3102399B2 (en) Data processing apparatus and method
JP3147884B2 (en) Storage device and information processing device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19970722

EXPY Cancellation because of completion of term
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R370 Written measure of declining of transfer procedure

Free format text: JAPANESE INTERMEDIATE CODE: R370