JPH0812601B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JPH0812601B2
JPH0812601B2 JP60288742A JP28874285A JPH0812601B2 JP H0812601 B2 JPH0812601 B2 JP H0812601B2 JP 60288742 A JP60288742 A JP 60288742A JP 28874285 A JP28874285 A JP 28874285A JP H0812601 B2 JPH0812601 B2 JP H0812601B2
Authority
JP
Japan
Prior art keywords
instruction
register
information
word
buffer
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 - Fee Related
Application number
JP60288742A
Other languages
Japanese (ja)
Other versions
JPS62145430A (en
Inventor
峰雄 明石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP60288742A priority Critical patent/JPH0812601B2/en
Publication of JPS62145430A publication Critical patent/JPS62145430A/en
Publication of JPH0812601B2 publication Critical patent/JPH0812601B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔技術分野〕 本発明は、ストアードプログラム制御のデータ処理装
置に関し、とくに実行している命令の語長に対応してプ
ログラムアドレス値を更新する機構に関する。
Description: TECHNICAL FIELD The present invention relates to a stored program control data processing device, and more particularly to a mechanism for updating a program address value corresponding to the word length of an instruction being executed.

〔技術の背景〕[Background of technology]

ストアードプログラム制御のデータ処理装置は、プロ
グラムアドレス情報を保持するカウンタの内容でメモリ
をアドレス指定しそこから命令語を読み出し、該命令語
を解読して対応するデータ転送・演算操作などの処理を
実行している。
A stored program controlled data processing device addresses a memory with the contents of a counter that holds program address information, reads an instruction word from the memory, decodes the instruction word, and executes corresponding data transfer / arithmetic operation. are doing.

装置の処理速度を支配する要因は命令語の読み出し
(以下、命令フェッチという)時間及び処理データの読
み・書きの為のメモリアクセス時間である。従って、デ
ータ処理装置の内部レジスタ情報を処理している時に処
理データアクセスの無いメモリから次に実行すべき命令
語を先行してフェッチし、これによってメモリアクセス
の効率を向上させ処理速度を高める、いわゆる先行命令
フェッチ手法が取られている。
The factors that control the processing speed of the apparatus are the instruction word read (hereinafter referred to as instruction fetch) time and the memory access time for reading / writing processing data. Therefore, when processing the internal register information of the data processing device, the instruction word to be executed next is fetched in advance from the memory without processing data access, thereby improving the efficiency of memory access and increasing the processing speed. A so-called preceding instruction fetch method is adopted.

前述の高速化手法では、先行フェッチした命令語をバ
ッファレジスタに記憶させて、該バッファの命令語に基
いて命令デコード、データ転送、演算操作などの定めら
れた処理を実行している。しかし、処理データとしてメ
モリをアクセスする命令が頻繁に実行される場合、先の
手法ではメモリから命令語のフェッチが出来ないため、
実行する命令の種類、プログラムに依存して命令語の先
行フェッチ可能な状態が変化する。この状態変化の影響
を受けずにメモリアクセスの効率を高めて高速処理を実
現するには、先行フェッチされる命令語のバッファ記憶
容量を増すことが有効であり、複数語容量のバッファ記
憶を備えた装置が提案されている。
In the above-described speed-up method, the prefetched instruction word is stored in the buffer register, and predetermined processing such as instruction decoding, data transfer, and arithmetic operation is executed based on the instruction word in the buffer. However, if the instruction to access the memory as the processing data is frequently executed, the above method cannot fetch the instruction word from the memory.
Depending on the type of instruction to be executed and the program, the prefetchable state of the instruction word changes. In order to improve the efficiency of memory access and realize high-speed processing without being affected by this state change, it is effective to increase the buffer storage capacity of the instruction word that is fetched in advance. A device has been proposed.

複数語容量の命令バッファを備えたデータ処理装置で
は、バッファ記憶の入力と出力に対応して、命令語を読
み出すメモリアドレスを指定するポインタ(以下、フェ
ッチポインタという)と、実行過程の命令語アドレスを
保持するカウンタ(以下、プログラムカウンタという)
との2種類のハードウェアレジスタを備えるのが通例で
ある。
In a data processing device equipped with an instruction buffer having a plurality of word capacities, a pointer (hereinafter referred to as a fetch pointer) for designating a memory address from which an instruction word is read and an instruction word address in an execution process corresponding to inputs and outputs of a buffer storage. A counter that holds (hereinafter referred to as program counter)
It is customary to have two types of hardware registers:

前者のフェッチポインタ制御は、命令語を先行フェッ
チして命令バッファに格納する動作に連動し、次にフェ
ッチすべき命令のアドレス値に更新するもので、単純な
論理回路にて実現できる。しかし、後者のプログラムカ
ウンタ制御は、命令語長に対応したカウンタ情報の更新
や、分岐命令の実行における分岐アドレス値のロード
や、サブルーチンのコール・リターン命令におけるスタ
ックへの退避・復帰など単純な加算処理では実行できな
い複雑な処理が必要である。
The former fetch pointer control is linked to the operation of prefetching an instruction word and storing it in the instruction buffer, and updates the address value of the instruction to be fetched next, and can be realized by a simple logic circuit. However, the latter program counter control is simple addition such as updating the counter information corresponding to the instruction word length, loading the branch address value in the execution of the branch instruction, and saving / returning to the stack in the subroutine call / return instruction. Complex processing that cannot be performed by processing is required.

〔従来技術と問題点〕[Conventional technology and problems]

基本的な先行フェッチ制御のデータ処理装置のブロッ
ク構成を第1図に示して説明する。第1図の装置は、プ
ログラム及び処理データを記憶するメモリ20と、実行す
る命令語を保持する命令レジスタ40と、前記命令レジス
タ40の命令語を解読して装置各部への制御信号500を発
生する命令デコーダ50と、算術論理演算の処理をする演
算回路60と、プログラムアドレスを保持するプログラム
カウンタ70と、データ転送及び演算等の処理データを記
憶し多目的に使用される汎用レジスタ80と、処理データ
等を一時記憶するテンポラリレジスタ90に加え、先行フ
ェッチ制御のためのフェッチアドレスを保持するフェッ
チポインタ10と、先行フェッチの命令語情報を記憶する
命令バッファ30とから成り、データバス100を介して装
置各部の間でデータ転送する。
A block configuration of a data processing device of basic prefetch control will be described with reference to FIG. The apparatus of FIG. 1 stores a memory 20 for storing programs and processing data, an instruction register 40 for holding an instruction word to be executed, and an instruction word of the instruction register 40 for decoding a control signal 500 to each part of the apparatus. An instruction decoder 50, an arithmetic circuit 60 for processing an arithmetic logic operation, a program counter 70 for holding a program address, a general-purpose register 80 for storing processing data such as data transfer and operation, and a multipurpose register 80, processing In addition to a temporary register 90 for temporarily storing data and the like, a fetch pointer 10 for holding a fetch address for prefetch control, and an instruction buffer 30 for storing instruction word information for prefetch, and via a data bus 100. Data is transferred between each part of the device.

一般にデータ処理装置では、メモリ操作命令に比較し
て汎用レジスタ操作命令はi)種類が多い、ii)命令語
長が短かい、iii)処理時間が短かい等の利点が有るこ
とから汎用レジスタを使用してデータ処理を行うことが
多い。
Generally, in a data processing device, a general-purpose register operation instruction has many advantages as compared to memory operation instructions, i) there are many kinds, ii) instruction word length is short, and iii) processing time is short. Often used to do data processing.

汎用レジスタ操作命令の実行では、データバス100を
介して演算回路60と汎用レジスタ80の間でデータ転送が
行われ、メモリ20がアクセスされ入出力線202を介して
メモリデータが転送されることは無く、フェッチポイン
タ10でメモリ20をアドレス指定して命令語をデータ線20
1に読み出し命令バッファ30に格納でき、命令の実行と
続く命令のフェッチとを並列に処理させデータ処理装置
の命令処理時間を短縮できる。
In the execution of the general-purpose register operation instruction, data is transferred between the arithmetic circuit 60 and the general-purpose register 80 via the data bus 100, the memory 20 is accessed, and the memory data is not transferred via the input / output line 202. Instead, the memory 20 is addressed by the fetch pointer 10 and the instruction word is sent to the data line 20.
1 can be stored in the read instruction buffer 30, and instruction execution and subsequent instruction fetch can be processed in parallel to shorten the instruction processing time of the data processing device.

命令バッファ30の記憶容量を増せば前記先行フェッチ
が有効に働き命令バッファ30には実行すべき命令語が十
分に記憶された状態を保つことができる。しかしながら
該状態においては、 メモリ20、演算回路60、プログラムカウンタ70、汎用
レジスタ80、テンポラリレジスタ90などの装置各部の間
でデータ転送・演算操作をするところの命令処理シーケ
ンスの実行時間が命令処理時間を決定してしまうことに
なり、命令処理シーケンスを短縮できる機構が提供され
れば命令処理時間をさらに短縮することが出来る。
If the storage capacity of the instruction buffer 30 is increased, the preceding fetch works effectively and the instruction buffer 30 can be kept sufficiently stored with the instruction word to be executed. However, in this state, the execution time of the instruction processing sequence for performing data transfer / arithmetic operation among the various parts of the device such as the memory 20, the arithmetic circuit 60, the program counter 70, the general-purpose register 80, and the temporary register 90 is the instruction processing time. If a mechanism that can shorten the instruction processing sequence is provided, the instruction processing time can be further shortened.

ここで、命令処理シーケンスは、データ転送・演算な
ど命令機能として定義された処理の実行と、命令実行に
連動したプログラムアドレスの更新とに分類され、本発
明は後者に関係するもので、以下プログラムアドレスの
制御を中心に説明する。
Here, the instruction processing sequence is classified into execution of processing defined as an instruction function such as data transfer / operation and updating of program address linked to instruction execution. The present invention relates to the latter. The address control will be mainly described.

データ処理装置の命令語にはオペレーション指定だけ
の単語長命令以外に処理定数やアドレス指定部を含んだ
複数語長の命令があり、いずれも命令バッファから1語
づつ読み出して処理を実行している。
In the command words of the data processing device, there are plural word length commands including processing constants and address specification parts in addition to word length commands that only specify operations, and all of them execute the process by reading one word from the command buffer. .

第1図の装置では、命令の第1語であるオペレーショ
ン指令部を命令バッファ30からデータ線301を介して転
送して命令レジスタ40に格納しており、第2語以後の処
理定数やアドレス指定部を命令バッファ30から読み出し
データ線302及びデータバス100を介して各々テンポラリ
レジスタ90やメモリ20に転送している。ここで、命令バ
ッファ30からの読み出しに同期して、 i)データバス100を介してプログラムカウンタ70の内
容を演算回路60に転送し、 ii)演算回路60にて1を加算して次の命令アドレス値を
発生し、 iii)前記演算結果をデータバス100を介して転送し、プ
ログラムカウンタ70に格納して、一連のプログラムアド
レス更新処理を行っている。
In the device shown in FIG. 1, the operation command part, which is the first word of the command, is transferred from the command buffer 30 via the data line 301 and stored in the command register 40. The units are transferred from the instruction buffer 30 to the temporary register 90 and the memory 20 via the read data line 302 and the data bus 100, respectively. Here, in synchronization with the reading from the instruction buffer 30, i) the contents of the program counter 70 are transferred to the arithmetic circuit 60 via the data bus 100, and ii) the arithmetic circuit 60 adds 1 to the next instruction. An address value is generated, and iii) the operation result is transferred via the data bus 100, stored in the program counter 70, and a series of program address update processing is performed.

前記アドレス更新処理のi)及びiii)ではデータバ
ス100を介して転送がなされており、この間は命令バッ
ファ30からメモリ20やテンポラリレジスタ90に命令語情
報を転送することは出来ず、異なる期間で命令語情報を
転送することになり処理シーケンス及びその処理時間が
増加する。
In i) and iii) of the address update process, the transfer is performed via the data bus 100, and during this period, the command word information cannot be transferred from the command buffer 30 to the memory 20 or the temporary register 90, and the data is transferred in different periods. Since the command word information is transferred, the processing sequence and its processing time increase.

従ってプログラムアドレス更新のための処理回数を減
小できれば命令処理時間を短縮することができ、特に複
数語長の命令では効果を発揮する。
Therefore, if the number of times of processing for updating the program address can be reduced, the instruction processing time can be shortened, and in particular, an instruction having a plurality of word lengths is effective.

次にサブルーチン処理のコール命令におけるプログラ
ムアドレス制御に関し、以下に処理シーケンスを示して
説明する。
Next, the program address control in the call instruction of the subroutine processing will be described by showing the processing sequence below.

i)命令の第1語を命令バッファ30から命令レジスタ40
に転送して命令デコーダ50にてサブルーチンコール命令
であることを解読し、プログラムカウンタ70の内容を命
令の第2語に対応するアドレス値に更新する。
i) The first word of the instruction is transferred from the instruction buffer 30 to the instruction register 40.
Then, the instruction decoder 50 decodes the subroutine call instruction and updates the contents of the program counter 70 to the address value corresponding to the second word of the instruction.

ii)サブルーチンアドレスを示す命令の第2語を命令バ
ッファ30からテンポラリレジスタ90に転送し、プログラ
ムカウンタ70の内容を次の命令語の先頭アドレス値に更
新する。
ii) The second word of the instruction indicating the subroutine address is transferred from the instruction buffer 30 to the temporary register 90, and the content of the program counter 70 is updated to the start address value of the next instruction word.

iii)メモリ20のスタック領域にプログラムカウンタ内
容を転送、格納して、サブルーチンからのリターンに備
えて退避する。
iii) Transfer and store the contents of the program counter in the stack area of the memory 20 and save it in preparation for the return from the subroutine.

iv)テンポラリレジスタ90の内容をプログラムカウンタ
70及びフェッチポインタ10に転送して、サブルーチンプ
ログラムの命令フェッチを開始する。
iv) Program counter the contents of temporary register 90
Transfer to 70 and the fetch pointer 10 to start the instruction fetch of the subroutine program.

このように、コール命令にもとづく処理においても、
プログラムカウンタ70のアドレス更新のために処理シー
ケンスi)およびii)が必要となり、その分処理シーケ
ンスおよびその処理時間が増加する問題がある。
In this way, even in processing based on call instructions,
The processing sequences i) and ii) are required to update the address of the program counter 70, and there is a problem that the processing sequence and the processing time thereof increase.

〔発明の目的〕[Object of the Invention]

本発明の目的は、プログラムカウンタの内容の命令語
長に応じた更新を命令処理シーケンスの最適なタイミン
グで短時間に処理できるデータ処理装置を提供すること
にある。
It is an object of the present invention to provide a data processing device capable of processing the update of the content of the program counter according to the instruction word length at the optimum timing of the instruction processing sequence in a short time.

[発明の構成] すなわち、本発明では、命令を先行フェッチしてバッ
ファレジスタに記憶するデータ処理装置では命令処理が
可能か判別するため、バッファレジスタに有効な命令語
情報があるか否かを問う制御情報が必要であり、この情
報を積極的に利用し、かつ命令実行のための演算回路を
兼用してプログラムカウンタの内容を更新している。
[Configuration of Invention] That is, according to the present invention, in order to determine whether the data processing device that fetches an instruction in advance and stores it in the buffer register can process the instruction, it is asked whether or not there is valid instruction word information in the buffer register. Control information is required, and this information is positively used, and the contents of the program counter are updated by also serving as an arithmetic circuit for executing instructions.

〔発明の実施例〕Example of Invention

第2図に本発明の一実施例のデータ処理装置のブロッ
ク構成図を示しその詳細な説明を行う。第2図中、フェ
ッチポインタ10、メモリ20、命令バッファ30、命令レジ
スタ40、命令デコーダ50、演算回路60、プログラムカウ
ンタ70、汎用レジスタ80、データバス100及び制御信号5
00は第1図の基本的な装置と同様であり詳細な説明を省
略して、命令処理との関係を中心に説明する。
FIG. 2 shows a block diagram of a data processing device according to an embodiment of the present invention, and a detailed description thereof will be given. In FIG. 2, fetch pointer 10, memory 20, instruction buffer 30, instruction register 40, instruction decoder 50, arithmetic circuit 60, program counter 70, general-purpose register 80, data bus 100 and control signal 5
00 is the same as the basic device in FIG. 1, and detailed description thereof will be omitted, and the description will focus on the relationship with instruction processing.

まず、命令処理が終了する時、命令デコーダ50は命令
処理が終了することを示す制御信号500を発生して命令
バッファ30に知らせ、命令バッファ30から次に実行する
命令語のオペレーション指定情報をデータ線301を介し
て命令レジスタ40に格納せしめる。次に、格納されたオ
ペレーション指定情報を命令デコーダ50で解読して処理
定数やアドレス指定部を含んだ複数語長の命令であるか
否かを判別し、制御信号501を発生して該命令語の全て
が命令バッファ30に記憶されているかの判定を指示し、
命令バッファ30からの判定結果信号303を判別して以後
の制御を決定する。
First, when the instruction processing is completed, the instruction decoder 50 generates a control signal 500 indicating that the instruction processing is completed and informs the instruction buffer 30 of the operation data of the instruction designation information of the instruction word to be executed next from the instruction buffer 30. Store in instruction register 40 via line 301. Next, the stored operation designation information is decoded by the instruction decoder 50 to determine whether or not the instruction is a plural word length instruction including a processing constant and an address designation section, and a control signal 501 is generated to generate the instruction word. Command to determine whether all are stored in the instruction buffer 30,
The determination result signal 303 from the instruction buffer 30 is determined to determine the subsequent control.

前記判定にて処理実行に必要とされる情報が命令バッ
ファ30に記憶されていることを確認したならば、命令デ
コーダ50はデータ処理装置の各部に対して実行する命令
の処理に対応する制御信号500を発生しデータ転送、演
算等の命令処理を開始させる。以前の命令処理において
メモリ20に対する処理データアクセスが頻繁にあった場
合など命令バッファ30に全ての命令情報が記憶されてな
いことがあり、前記判定結果信号303により該状態を検
知したならば命令処理の開始を保留し命令フェッチ動作
を継続させ必要とされる命令語情報が揃うまで待つ。こ
のデータ処理装置では、前記バッファ記憶の状態判定と
同時にその判定を指示した制御信号501を語長レジスタ1
10に記憶させており、処理を開始する命令が何語長であ
るかを示す情報が語長レジスタ110に保持されることに
なる。従って、実行過程の命令語先頭アドレス値である
ところのプログラムカウンタ70の内容に、語長レジスタ
110の記憶情報を加算することによって次に実行する命
令語の先頭アドレス情報を発生できる。さらに、命令処
理シーケンスの最適なタイミングで、プログラムカウン
タ70及び語長レジスタ110の内容をデータバス100を介し
て演算回路60に転送して次命令アドレスを演算し、その
演算結果をプログラムカウンタ70に格納して、プログラ
ムアドレスの更新処理が行われる。
When it is confirmed that the information necessary for executing the process is stored in the instruction buffer 30 in the determination, the instruction decoder 50 determines that the control signal corresponding to the processing of the instruction to be executed for each unit of the data processing device. 500 is generated to start instruction processing such as data transfer and calculation. In the previous instruction processing, all the instruction information may not be stored in the instruction buffer 30 when the processing data is frequently accessed to the memory 20, and if the state is detected by the judgment result signal 303, the instruction processing is performed. Is suspended and the instruction fetch operation is continued until the necessary instruction word information is gathered. In this data processing device, at the same time as the state determination of the buffer storage, the control signal 501 instructing the determination is sent to the word length register 1
Information is stored in 10, and the word length register 110 holds information indicating how much word length the instruction for starting the process has. Therefore, the contents of the program counter 70, which is the instruction word start address value in the execution process, are added to the word length register
By adding the stored information of 110, the start address information of the instruction word to be executed next can be generated. Further, at the optimum timing of the instruction processing sequence, the contents of the program counter 70 and the word length register 110 are transferred to the arithmetic circuit 60 via the data bus 100 to calculate the next instruction address, and the arithmetic result is sent to the program counter 70. After storing, the program address is updated.

なお、命令機能として定義されるメモリ20や汎用レジ
スタ80の記憶データの転送および演算操作は第1図の装
置と同様に演算回路60との間でデータ転送等を行って処
理される。
The transfer and arithmetic operation of the data stored in the memory 20 and the general-purpose register 80, which are defined as the instruction function, are processed by performing data transfer with the arithmetic circuit 60 as in the device of FIG.

命令語のオペレーション指定情報が命令レジスタ40に
転送される場合及び命令語中の処理定数やアドレス指定
情報がデータ線302を介して導出される場合に、命令バ
ッファ30に記憶された情報は不要となる。第2図の実施
例では、実行過程で前記条件が満される時不要となる情
報の記憶ステータスをクリアして該記憶域を空状態に設
定し、命令バッファ30はバッファ記憶域に空きが生じた
ことを検知して該空領域をつめバッファ記憶情報を整列
させ、同時に先行フェッチ制御信号304を発生してフェ
ッチポインタ10に知らせる。実施例のデータ処理装置で
は、前記のバッファ記憶域に空きがあることを示す先行
フェッチ制御信号304が出力され、命令デコーダ50が発
生する制御信号500からメモリ20に対する処理データア
クセスが無いことを検知する時、フェッチポインタ10で
メモリ20をアドレス指定して命令語を読み出し命令バッ
ファ30に格納し、さらにフェッチポインタ10の内容を次
に命令フェッチすべきアドレス値に更新している。
The information stored in the instruction buffer 30 is unnecessary when the operation designation information of the instruction word is transferred to the instruction register 40 and when the processing constants and addressing information in the instruction word are derived via the data line 302. Become. In the embodiment shown in FIG. 2, the storage status of information that is unnecessary when the above condition is satisfied in the execution process is cleared to set the storage area to an empty state, and the instruction buffer 30 becomes empty in the buffer storage area. When this is detected, the empty area is clogged to align the buffer storage information, and at the same time, the preceding fetch control signal 304 is generated to notify the fetch pointer 10. In the data processing device of the embodiment, the preceding fetch control signal 304 indicating that the buffer storage area has a space is output, and the control signal 500 generated by the instruction decoder 50 detects that there is no processing data access to the memory 20. At this time, the memory 20 is addressed by the fetch pointer 10 to store the instruction word in the read instruction buffer 30, and the content of the fetch pointer 10 is updated to the address value for the next instruction fetch.

第2図の本発明実施例における命令バッファ回路30と
命令レジスタ40の回路構成を第3図に示す。第3図中で
第2図と同じものには同一番号を付している。第3図の
回路では命令レジスタ40も含み4語長の命令情報を記憶
でき、レジスタ311,312,313は命令語をバッファ記憶し
ファースト・イン・ファースト・アウトのシフトを行
う。フリップフロップ321,322,323,324は、各々対応す
るレジスタ311,312,313、命令レジスタ40に有効な命令
情報が記憶されているか否かのステータスを保持し、セ
ット状態は対応レジスタに有効情報が格納されているこ
とを示し、リセット状態は有効情報が格納されてない空
状態であることを示している。ゲート回路331,332,333,
334は、命令バッファ書き込み信号341、バッファ読み出
し信号342、命令処理終了信号343がアクティブとなる時
にファースト・イン・ファースト・アウトのシフトを制
御する。ステータス選択回路350は命令デコーダ50が発
生する制御信号501の指定によってレジスタ311〜313及
び命令レジスタ40の状態を示すフリップフロップ321〜3
24の信号いずれか1つを選択してバッファ状態判定信号
303として命令デコーダ50に伝達する。ステータス選択
回路350でリセット状態のフリップフロップを選択した
場合、対応したレジスタに有効情報がない事を示す判定
結果信号303が伝達され、データ処理装置は命令処理を
中断して保留し、セット状態のフリップフロップを選択
した場合、有効情報がある事を示す判定結果信号303が
伝達され、命令処理を継続する。
A circuit configuration of the instruction buffer circuit 30 and the instruction register 40 in the embodiment of the present invention shown in FIG. 2 is shown in FIG. 3 that are the same as those in FIG. 2 are given the same numbers. The circuit shown in FIG. 3 can store the instruction information having a length of 4 words including the instruction register 40. Registers 311, 312, 313 store the instruction words in a buffer and perform a first-in-first-out shift. The flip-flops 321, 322, 323, 324 hold the status of whether valid instruction information is stored in the corresponding registers 311, 312, 313 and the instruction register 40, respectively, and the set state indicates that the valid information is stored in the corresponding register, and the The state indicates an empty state in which valid information is not stored. Gate circuit 331,332,333,
334 controls the first-in-first-out shift when the instruction buffer write signal 341, the buffer read signal 342, and the instruction processing end signal 343 become active. The status selection circuit 350 has flip-flops 321 to 3 indicating the states of the registers 311 to 313 and the instruction register 40 according to the designation of the control signal 501 generated by the instruction decoder 50.
Buffer status judgment signal by selecting one of 24 signals
It is transmitted to the instruction decoder 50 as 303. When the flip-flop in the reset state is selected by the status selection circuit 350, the determination result signal 303 indicating that there is no valid information in the corresponding register is transmitted, the data processing device suspends and suspends the instruction processing, and sets the data in the set state. When the flip-flop is selected, the determination result signal 303 indicating that there is valid information is transmitted, and the instruction processing is continued.

まず、命令デコーダ50から命令処理の終了信号343が
発生されると、フリップフロップ324がリセットされ対
応する命令レジスタ40が空状態となる。ゲート回路334
でフリップフロップ323,324の値を基に命令レジスタ40
が空状態でレジスタ313に有効情報が格納されているこ
とを判定して、レジスタ313の記憶情報をデータ線301を
介して命令レジスタ40に転送する。該動作と同時に命令
レジスタ40に対応するフリップフロップ324はセットさ
れ、レジスタ313に対応するフリップフロップ323はリセ
ットされ、命令レジスタ40は有効情報の格納状態とな
り、レジスタ313は有効情報が無いすなわち空状態とな
る。レジスタ313が空状態となると、隣接するレジスタ3
12に有効情報が格納されているかゲート回路322で判定
し、該情報をレジスタ313に転送させレジスタ313が有効
情報格納の状態(フリップフロップ323がセット)でレ
ジスタ312が空状態(フリップフロップ322がリセット)
にする。
First, when the instruction decoder 50 generates the instruction processing end signal 343, the flip-flop 324 is reset and the corresponding instruction register 40 becomes empty. Gate circuit 334
Command register 40 based on the values of flip-flops 323 and 324.
When it is empty, it is determined that valid information is stored in the register 313, and the stored information in the register 313 is transferred to the instruction register 40 via the data line 301. At the same time as the operation, the flip-flop 324 corresponding to the instruction register 40 is set, the flip-flop 323 corresponding to the register 313 is reset, the instruction register 40 enters a storage state of valid information, and the register 313 has no valid information, that is, an empty state. Becomes When the register 313 becomes empty, the adjacent register 3
The gate circuit 322 determines whether valid information is stored in 12 and transfers the information to the register 313. When the register 313 stores valid information (the flip-flop 323 is set), the register 312 is empty (the flip-flop 322 is reset)
To

同様に隣接するレジスタ312と311の状態をゲート回路
331で判定しレジスタ311の情報をレジスタ312に転送し
てフリップフロップ321,322の状態を設定する。
Similarly, the state of adjacent registers 312 and 311 is gated.
The determination is made in 331, the information in the register 311 is transferred to the register 312, and the states of the flip-flops 321 and 322 are set.

以上の動作を連続的に次々と隣接するレジスタ間で行
った結果レジスタ311が空状態(フリップフロップ321が
リセット)となり、該状態を示す信号304をフェッチポ
インタ10に伝達して命令フェッチを促し、メモリ20から
命令語を読み出してレジスタ311〜313に有効情報がバッ
ファ記憶された状態を保つ制御を行う。
As a result of continuously performing the above operation between the adjacent registers one after another, the register 311 becomes empty (the flip-flop 321 is reset), the signal 304 indicating the state is transmitted to the fetch pointer 10, and instruction fetch is prompted, An instruction word is read from the memory 20 and control is performed to maintain the state in which valid information is buffer-stored in the registers 311 to 313.

命令の処理過程において、第2語以後の情報すなわち
命令バッファ311〜313に記憶されている情報を処理定数
やアドレス指定情報として使用する場合、命令デコーダ
50からバッファ読み出し信号342を発生してレジスタ313
の情報をデータ線302を介してデータバス100に導出す
る。同時に、バッファ読み出し信号342を基にゲート回
路333を通してフリップフロップ323をリセットし、レジ
スタ313を空状態に設定する。
When the information after the second word, that is, the information stored in the instruction buffers 311 to 313 is used as a processing constant or addressing information in the process of processing an instruction, an instruction decoder
Generate buffer read signal 342 from 50 to register 313
Information is derived to the data bus 100 via the data line 302. At the same time, the flip-flop 323 is reset based on the buffer read signal 342 through the gate circuit 333, and the register 313 is set to the empty state.

その後は先に述べた様に隣接するレジスタ間で有効情
報の有無を判定して情報転送をなし、バッファ記憶を整
列させる制御する。
After that, as described above, the presence or absence of valid information is determined between the adjacent registers, information is transferred, and the buffer storage is aligned.

複数語長の命令がフェッチ完了したか否かの判定は、
命令デコーダ50のオペレーション指定情報を基に命令デ
コーダ50が制御信号501を発生してステータス選択回路3
50に指示し、下表に示すフリップフロップ信号を選択さ
せ、その選択されたフリップフロップの状態を判別する
ことにより行う。
To determine whether an instruction with multiple word lengths has been fetched,
Based on the operation designation information of the instruction decoder 50, the instruction decoder 50 generates the control signal 501 and the status selection circuit 3
This is done by instructing 50 to select the flip-flop signals shown in the table below and determining the state of the selected flip-flop.

レジスタ311〜313及び命令レジスタ40は途中レジスタ
に空状態を生じた場合にレジスタ情報を詰める制御が常
に行われているため、フリップフロップ321を選択して
レジスタ311に有効情報が格納されていることを判定す
れば、レジスタ312、レジスタ313及び命令レジスタ40に
も有効情報が格納されていることを判定でき、4語長命
令の全てがフェッチ完了したことを判定できる。同様に
フリップフロップ322,323,324の選択に対応して、各々
3語長命令、2語長命令、1語長命令のフェッチ完了を
判定できる。ここで、制御信号501は複数ビットのコー
ド化された信号で、そのコードに対応してフェッチ完了
の判定語長が決る。換言すれば、制御信号501は命令語
長を示す信号であり、第2図実施例ではこの情報を語長
レジスタ110に記憶してプログラムカウンタ70の内容に
該記憶情報を加算して次に実行する命令の先頭アドレス
値を発生している。
Since the registers 311 to 313 and the instruction register 40 are always controlled to pack the register information when an empty state occurs in the middle register, the flip-flop 321 is selected and the valid information is stored in the register 311. If it is determined that the valid information is also stored in the register 312, the register 313, and the instruction register 40, it can be determined that all of the 4-word length instructions have been fetched. Similarly, it is possible to determine the completion of fetching the 3-word length instruction, the 2-word length instruction, and the 1-word length instruction, respectively, corresponding to the selection of the flip-flops 322, 323, and 324. Here, the control signal 501 is a coded signal of a plurality of bits, and the fetch completion determination word length is determined corresponding to the code. In other words, the control signal 501 is a signal indicating the instruction word length, and in the embodiment shown in FIG. 2, this information is stored in the word length register 110, the stored information is added to the content of the program counter 70, and the next execution is performed. The start address value of the instruction to be generated is generated.

第4図に実施例の語長レジスタ110の回路構成を示
す。語長レジスタ110は、3ビット情報であるところの
制御信号501−0,501−1,501−2を入力として、該制御
信号がノーオペレーションで無い状態をオアーゲート40
1で検知して、制御信号501−0,501−1,501−2の値をそ
れぞれラッチ回路402,403,404に記憶し、データ処理装
置がプログラムアドレス修飾の演算操作する時、ラッチ
回路402〜403出力に定数発生回路405の出力を付加して
アドレスのビット巾に対応するデータを生成してデータ
バス100に送出する。
FIG. 4 shows the circuit configuration of the word length register 110 of the embodiment. The word length register 110 receives the control signals 501-0, 501-1 and 501-2, which are 3-bit information, as input, and sets the OR gate 40 in a state in which the control signals are not in operation.
1, the values of the control signals 501-0, 501-1, 501-2 are stored in the latch circuits 402, 403, 404, respectively, and when the data processing device operates the program address modification operation, the constant generation circuit 405 outputs the latch circuits 402-403. Is added to generate data corresponding to the bit width of the address and the data is sent to the data bus 100.

実施例の装置では1語長から4語長の命令が想定され
ており、制御信号501の2進化コードが判定語長数に対
応づけられており、そのまま3ビットのラッチ回路に記
憶し、その上位ビットに定数発生回路405で発生される
定数0を付加して、アドレス修飾のための語長情報を生
成している。
In the apparatus of the embodiment, an instruction having a length of 1 to 4 words is assumed, the binary code of the control signal 501 is associated with the number of determination word lengths, and stored in the 3-bit latch circuit as it is. A constant 0 generated by the constant generation circuit 405 is added to the upper bits to generate word length information for address modification.

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

以上説明した様に本発明によれば、複数語長の命令で
あっても1回の演算操作で次に実行する命令の先頭アド
レスを発生できプログラムアドレス更新の処理時間を短
縮して高速処理のデータ処理装置を提供できる。さら
に、命令語情報が未使用でバッファレジスタに記憶され
ている時点など、命令実行過程の任意のタイミングにて
プログラムアドレス更新の処理が可能であり、最適な処
理シーケンスが組めることから、命令の実行に必要とさ
れるハードウェア量を減小させることができコストパフ
ォーマンスの優れたデータ処理装置を提供できる。
As described above, according to the present invention, even if the instruction has a plurality of word lengths, the start address of the instruction to be executed next can be generated by one arithmetic operation, and the processing time for updating the program address can be shortened to achieve high-speed processing. A data processing device can be provided. Furthermore, it is possible to update the program address at any timing during the instruction execution process, such as when the instruction word information is unused and stored in the buffer register. It is possible to reduce the amount of hardware required for the data processing device and to provide a data processing device with excellent cost performance.

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

第1図は基本的な先行フェッチ制御を行うデータ処理装
置のブロック構成図、第2図は本発明の一実施例のデー
タ処理装置のブロック構成図、第3図は本発明の一実施
例における命令バッファと命令レジスタの回路構成図、
第4図は本発明の一実施例における語長レジスタの回路
構成図である。 10……フェッチポインタ、20……メモリ、30……命令バ
ッファ、40……命令レジスタ、50……命令デコーダ、60
……演算回路、70……プログラムカウンタ、80……汎用
レジスタ、90……テンポラリレジスタ、100……データ
バス、110……語長レジスタ、201,202,301,302……デー
タ線、303,304,341,342,343……信号線、500,501,501−
0,501−1,501−2……制御信号線、311,312,313……レ
ジスタ、321,322,323,324……フリップフロップ、331,3
32,333,334……ゲート回路、350……選択回路、401……
オアーゲート、402,403,404……ラッチ回路、405……定
数発生回路。
FIG. 1 is a block configuration diagram of a data processing device which performs basic prefetch control, FIG. 2 is a block configuration diagram of a data processing device of one embodiment of the present invention, and FIG. 3 is an embodiment of the present invention. Instruction buffer and instruction register circuit configuration diagram,
FIG. 4 is a circuit configuration diagram of a word length register in one embodiment of the present invention. 10 ... Fetch pointer, 20 ... Memory, 30 ... Instruction buffer, 40 ... Instruction register, 50 ... Instruction decoder, 60
...... Arithmetic circuit, 70 …… Program counter, 80 …… General purpose register, 90 …… Temporary register, 100 …… Data bus, 110 …… Word length register, 201,202,301,302 …… Data line, 303,304,341,342,343 …… Signal line, 500,501,501-
0,501-1,501-2 ... Control signal line, 311,312,313 ... Register, 321,322,323,324 ... Flip-flop, 331,3
32,333,334 …… Gate circuit, 350 …… Selection circuit, 401 ……
OR gate, 402,403,404 …… Latch circuit, 405 …… Constant generation circuit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】プログラムアドレスを記憶するプログラム
カウンタと、供給されたデータに対する演算処理を行い
データバスを介して前記プログラムカウンタに結合され
た演算回路と、命令語情報を記憶するメモリと、複数の
レジスタを有し命令の実行に先立って前記メモリから一
語ずつ読み出された命令語情報を記憶するバッファレジ
スタと、前記バッファレジスタから出力された命令語情
報を一時記憶する命令レジスタと、前記バッファレジス
タの前記複数のレジスタおよび前記命令レジスタにそれ
ぞれ対応して設けられ、夫々が対応するレジスタに有効
な命令語情報が記憶されたときにセット状態となる複数
のフリップフロップと、前記命令レジスタに記憶された
命令語情報をデコードすることにより当該命令語情報を
含む命令が必要とする命令語情報が前記バッファレジス
タに記憶されているかどうかの判定を指示する制御情報
であって当該命令の命令語長に応じて前記複数のフリッ
プフロップの一つを選択するための制御情報を発生する
命令デコーダと、前記制御情報にもとづき前記複数のフ
リップフロップの一つを選択し当該選択したフリップフ
ロップの状態を前記命令デコーダに転送する選択回路と
を備え、前記命令デコーダは前記選択回路からの前記選
択したフリップフロップの状態が前記セット状態でない
ときは必要とする命令語情報が前記バッファレジスタに
揃うまで命令の実行を保留するデータ処理装置であっ
て、前記制御情報を保持し前記データバスに結合された
語長レジスタを設け、前記演算回路は前記データバスを
介して前記プログラムカウンタおよび前記語長レジスタ
の内容を受け取り前記プログラムアドレスを更新して前
記プログラムカウンタに転送することを特徴とするデー
タ処理装置。
1. A program counter for storing a program address, an arithmetic circuit for performing arithmetic processing on supplied data and coupled to the program counter via a data bus, a memory for storing instruction word information, and a plurality of memory cells. A buffer register having a register for storing instruction word information read word by word from the memory prior to execution of an instruction; an instruction register for temporarily storing instruction word information output from the buffer register; and the buffer A plurality of flip-flops provided corresponding to the plurality of registers and the instruction register, respectively, which are in a set state when valid instruction word information is stored in the corresponding registers, and stored in the instruction register An instruction including the instruction word information is required by decoding the generated instruction word information. Control information for instructing whether or not the instruction word information to be stored in the buffer register is generated, and the control information for selecting one of the plurality of flip-flops is generated according to the instruction word length of the instruction. And a selection circuit that selects one of the plurality of flip-flops based on the control information and transfers the state of the selected flip-flop to the instruction decoder. A data processing device that holds execution of an instruction until necessary instruction word information is available in the buffer register when the selected flip-flop is not in the set state, and holds the control information in the data bus. A combined word length register is provided, and the arithmetic circuit is connected to the program counter and the program counter via the data bus. Data processing apparatus, wherein a content of Kigocho register updates the receive said program address transferred to the program counter.
JP60288742A 1985-12-20 1985-12-20 Data processing device Expired - Fee Related JPH0812601B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60288742A JPH0812601B2 (en) 1985-12-20 1985-12-20 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60288742A JPH0812601B2 (en) 1985-12-20 1985-12-20 Data processing device

Publications (2)

Publication Number Publication Date
JPS62145430A JPS62145430A (en) 1987-06-29
JPH0812601B2 true JPH0812601B2 (en) 1996-02-07

Family

ID=17734106

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60288742A Expired - Fee Related JPH0812601B2 (en) 1985-12-20 1985-12-20 Data processing device

Country Status (1)

Country Link
JP (1) JPH0812601B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07120281B2 (en) * 1988-08-31 1995-12-20 株式会社日立製作所 Information processing equipment
JPH0752402B2 (en) * 1989-11-24 1995-06-05 三菱電機株式会社 Data processing device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5025146A (en) * 1973-07-06 1975-03-17
JPS5760441A (en) * 1980-09-30 1982-04-12 Fujitsu Ltd Information processing equipment
JPS59123053A (en) * 1982-12-28 1984-07-16 Fujitsu Ltd Instruction control system

Also Published As

Publication number Publication date
JPS62145430A (en) 1987-06-29

Similar Documents

Publication Publication Date Title
US7694109B2 (en) Data processing apparatus of high speed process using memory of low speed and low power consumption
US4896259A (en) Apparatus for storing modifying data prior to selectively storing data to be modified into a register
US4430706A (en) Branch prediction apparatus and method for a data processing system
US6272596B1 (en) Data processor
US5440717A (en) Computer pipeline including dual-ported, content-addressable writebuffer
US4388682A (en) Microprogrammable instruction translator
US5696957A (en) Integrated circuit comprising a central processing unit for executing a plurality of programs
US4949242A (en) Microcomputer capable of accessing continuous addresses for a short time
EP0223150B1 (en) Information processing apparatus
EP0240606B1 (en) Pipe-line processing system and microprocessor using the system
JPH03233630A (en) Information processor
JPH0812601B2 (en) Data processing device
JP3490005B2 (en) Instruction control apparatus and method
KR19980024622A (en) Program execution method and device using the method
EP0177712B1 (en) Masked data fetch and modifying device
US5649229A (en) Pipeline data processor with arithmetic/logic unit capable of performing different kinds of calculations in a pipeline stage
JPH04104350A (en) Micro processor
JPH02197924A (en) Central arithmetic processor
JPH07200406A (en) Cache system
EP0440908A2 (en) A technique for generating an address during an instruction decode cycle in a RISC processor
US6832309B2 (en) Generation of modified commands repeatedly from feedback or base command
JP3182796B2 (en) Central processing unit
JPH0630062B2 (en) Data processing device
JP2819753B2 (en) Pipeline microprocessor
JPS6126089B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees