JPH11119995A - Device and method for processing data - Google Patents

Device and method for processing data

Info

Publication number
JPH11119995A
JPH11119995A JP9277561A JP27756197A JPH11119995A JP H11119995 A JPH11119995 A JP H11119995A JP 9277561 A JP9277561 A JP 9277561A JP 27756197 A JP27756197 A JP 27756197A JP H11119995 A JPH11119995 A JP H11119995A
Authority
JP
Japan
Prior art keywords
data
instruction
processing
bit
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.)
Granted
Application number
JP9277561A
Other languages
Japanese (ja)
Other versions
JP3019818B2 (en
Inventor
Kazumasa Mine
一雅 峰
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 JP9277561A priority Critical patent/JP3019818B2/en
Publication of JPH11119995A publication Critical patent/JPH11119995A/en
Application granted granted Critical
Publication of JP3019818B2 publication Critical patent/JP3019818B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve efficiency in pipeline processing for reading processing data stored in a data memory and storing them again after bit operation. SOLUTION: The instruction for bit operation fetched by an instruction fetching means 31 is decoded by an instruction decoding means 32, an execution address is generated by an address generating means 33, the processing data are read from a data memory 201 by a data reading means 34. Then after the bit operation of the instruction has been executed by a bit operating means 35, these processing data are stored in the data memory 201 by a data storage means 36. Since only one instruction is adequate to be inputted corresponding to the bit operation, the capacity of a program is reduced and the load on its preparation can be reduced. The data processing of bit operation can be completed within six clocks and even when accessing the data memory 201 in the following data processing, temporary stop at a maximum of two clocks is adequate.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、複数の命令のデー
タ処理をパイプライン方式で実行するデータ処理装置お
よび方法に関する。
The present invention relates to a data processing apparatus and method for executing data processing of a plurality of instructions in a pipeline manner.

【0002】[0002]

【従来の技術】従来、データ処理装置として複数の命令
のデータ処理をパイプライン方式で高速に実行するマイ
クロプロセッサがある。パイプライン方式のデータ処理
では、複数の命令を順次シフトさせて階層構造のハード
ウェアで処理するため、一つの命令のデータ処理に必要
な時間は削減されなくとも、複数の命令のデータ処理に
必要な時間を削減することができる。
2. Description of the Related Art Conventionally, as a data processing device, there is a microprocessor which executes data processing of a plurality of instructions at high speed by a pipeline system. In pipelined data processing, multiple instructions are sequentially shifted and processed by hierarchical hardware, so even if the time required for processing one instruction is not reduced, it is necessary to process data for multiple instructions. Time can be reduced.

【0003】上述のようなデータ処理装置は、例えば、
“コンピュータ・アーキテクチャ定量的アプローチ第二
版、デビット・A・パターソン/ジョン・L・ヘネシー
共著”などに開示されている。そのデータ処理装置を一
従来例として図8ないし図11を参照して以下に説明す
る。
A data processing apparatus as described above is, for example,
"Computer Architecture Quantitative Approach Second Edition, David A. Patterson / John L. Hennessy." The data processing apparatus will be described below as a conventional example with reference to FIGS.

【0004】なお、図8はデータ処理装置のハードウェ
アをパイプラインの処理手順に対応して表現した模式的
なブロック図であり、図9は各種の命令の命令コードの
フォーマットを示す模式図である。図10は各種のビッ
ト操作のニモニックコードを示す模式図であり、図11
は九つの命令のパイプライン処理の処理手順を示す模式
的なタイムチャートである。
FIG. 8 is a schematic block diagram showing the hardware of the data processing device corresponding to the processing procedure of the pipeline, and FIG. 9 is a schematic diagram showing the format of instruction codes of various instructions. is there. FIG. 10 is a schematic diagram showing mnemonic codes for various bit operations.
9 is a schematic time chart showing a processing procedure of pipeline processing of nine instructions.

【0005】ここで例示するデータ処理装置100は、
各種の処理データを更新自在に一時記憶するデータメモ
リ101と、各種のデータ処理を実行するマイクロプロ
セッサ102とを具備している。このマイクロプロセッ
サ102は、32ビットのRISC(Reduced Instru
ction Set Computer)チップからなり、図8に示す
ように、所定のハードウェアを物理的に具備して五段の
ステージ1〜5を論理的に具備している。
[0005] The data processing apparatus 100 exemplified here is composed of:
The system includes a data memory 101 for temporarily storing various processing data in an updatable manner, and a microprocessor 102 for executing various data processing. The microprocessor 102 has a 32-bit RISC (Reduced Instrument).
As shown in FIG. 8, predetermined hardware is physically provided, and five stages 1 to 5 are logically provided.

【0006】第一段目のステージである命令フェッチス
テージ1は、プログラムカウンタ11、インストラクシ
ョンメモリ12、加算器13、マルチプレクサ14、等
を具備しており、各種の命令をフェッチする。第二段目
のステージである命令デコードステージ2は、レジスタ
ファイル15や符号拡張器16等を具備しており、命令
フェッチステージ1でフェッチされた命令のデコードと
レジスタファイル15からの読み出しとを実行する。レ
ジスタファイル15は、32ビットの記憶容量を各々具
備する32個の内部レジスタからなるので、32ビット
の命令コードや処理データを32個まで別個に記憶す
る。
The instruction fetch stage 1, which is the first stage, includes a program counter 11, an instruction memory 12, an adder 13, a multiplexer 14, and the like, and fetches various instructions. The instruction decode stage 2, which is the second stage, includes a register file 15, a sign extender 16, and the like, and executes decoding of the instruction fetched in the instruction fetch stage 1 and reading from the register file 15. I do. Since the register file 15 is composed of 32 internal registers each having a 32-bit storage capacity, up to 32 32-bit instruction codes and processing data are separately stored.

【0007】第三段目のステージである処理実行ステー
ジ3は、ゼロ判定器17、マルチプレクサ18,19、
ALU(Arithmetic and Logical Unit)20、等
を具備しており、例えば、命令がワード/ストアの場合
は、命令デコードステージ2でデコードされた命令から
ビット操作する処理データの実行アドレスを生成し、命
令が演算処理の場合は、処理データに対するALU演算
のデータ処理などを実行し、命令が条件分岐の場合は、
条件成立の判定処理を実行する。
[0007] The processing execution stage 3, which is the third stage, includes a zero determiner 17, multiplexers 18 and 19,
An ALU (Arithmetic and Logical Unit) 20 is provided. For example, when the instruction is a word / store, an execution address of processing data for performing bit operation is generated from the instruction decoded in the instruction decode stage 2, and the instruction is generated. If the instruction is a conditional branch, execute the data processing of the ALU operation on the processing data, and if the instruction is a conditional branch,
Execute the condition determination process.

【0008】第四段目のステージであるメモリアクセス
ステージ4は、各種の処理データを更新自在に一時記憶
するデータメモリ101を具備しており、例えば、命令
がロード/ストアの場合、処理実行ステージ3により生
成された実行アドレスでデータメモリ101にアクセス
して処理データのリードやライトを実行する。
A memory access stage 4, which is a fourth stage, includes a data memory 101 for temporarily storing various processing data in an updatable manner. For example, when an instruction is load / store, a processing execution stage is provided. 3 to access the data memory 101 with the execution address generated and read or write the processing data.

【0009】第五段目のステージであるライトバックス
テージ5は、マルチプレクサ21等を具備しており、例
えば、命令がロードの場合、メモリアクセスステージ4
でデータメモリ101から読み出された処理データを命
令デコードステージ2から命令デコードステージ2のレ
ジスタファイル15に格納する。
The write-back stage 5, which is the fifth stage, includes a multiplexer 21 and the like.
Then, the processing data read from the data memory 101 is stored in the register file 15 of the instruction decode stage 2 from the instruction decode stage 2.

【0010】上述のような構造のデータ処理装置100
に各種動作を実行させる命令は、32ビットの命令コー
ドのフォーマットが図9に示すように設定されており、
各種のビット操作のニモニックコードが図10に示すよ
うに表現される。
[0010] The data processing apparatus 100 having the structure described above.
The instruction for executing various operations is set in a 32-bit instruction code format as shown in FIG.
Mnemonic codes for various bit operations are represented as shown in FIG.

【0011】例えば、処理データのロード/ストア/即
値演算/条件分岐などの命令に利用されるIタイプの命
令コードのフォーマットでは、その命令の種類が6ビッ
トの“Opcode”に設定され、レジスタファイル15の3
2個の内部レジスタから処理データを読み出す1個の識
別データなどが5ビットの“rs1”に設定される。さら
に、処理データを格納する1個の内部レジスタの識別デ
ータなどが5ビットの“rd”に設定され、実行アドレス
のオフセット値や演算処理する即値などの各種データが
16ビットの“immediate”に設定される。
For example, in the format of an I-type instruction code used for instructions such as load / store / immediate operation / conditional branch of processing data, the type of the instruction is set to 6-bit "Opcode" and the register file 15-3
One piece of identification data for reading processing data from the two internal registers is set in 5-bit “rs1”. Furthermore, the identification data of one internal register for storing the processing data is set to 5 bits of “rd”, and various data such as the offset value of the execution address and the immediate value to be processed are set to 16 bits of “immediate”. Is done.

【0012】また、レジスタ間でのデータ演算などの命
令に利用されるRタイプの命令コードのフォーマットで
は、その命令の種類が6ビットの“Opcode”に設定さ
れ、レジスタファイル15の32個の内部レジスタから
演算処理する二つの処理データを読み出す2個が各々5
ビットの“rs1”と“rs2”とに個々に設定される。演
算処理した処理データを格納する1個の内部レジスタが
5ビットの“rd”に設定され、演算処理の内容などの各
種データが16ビットの“func”に設定される。
In the format of an R-type instruction code used for an instruction such as data operation between registers, the type of the instruction is set to “Opcode” of 6 bits, and 32 internal codes of the register file 15 are stored. Read two processing data to be processed from the register.
Bits “rs1” and “rs2” are individually set. One internal register for storing the processed data of the arithmetic processing is set to 5-bit "rd", and various data such as the content of the arithmetic processing is set to 16-bit "func".

【0013】さらに、無条件分岐などの命令に利用され
るJタイプの命令コードのフォーマットでは、その命令
の種類が6ビットの“Opcode”に設定され、プログラム
カウンタ11に対するオフセットなどの各種データが1
6ビットの“Offset added to PC”に設定される。
Further, in the format of an instruction code of the J type used for an instruction such as an unconditional branch, the type of the instruction is set to “Opcode” of 6 bits, and various data such as an offset for the program counter 11 is set to 1 bit.
Set to 6 bits “Offset added to PC”.

【0014】上述のような構造のデータ処理装置100
は、一つのデータ処理が複数の命令からなる場合でも、
これをパイプライン方式で高速に実行する。例えば、図
11に示すように、データメモリ101の特定の処理デ
ータの22番目のビットをクリアするビット操作と、こ
のビット操作されたデータメモリ101の処理データの
所定のデータ処理とを実行するような場合、最初のビッ
ト操作の五つの命令と後続のデータ処理の四つの命令と
の合計九つの命令のデータ処理がパイプライン方式で順
次実行される。
The data processing apparatus 100 having the above structure
Means that even if one data process consists of multiple instructions,
This is executed at high speed by a pipeline method. For example, as shown in FIG. 11, a bit operation of clearing the 22nd bit of specific processing data of the data memory 101 and a predetermined data processing of the processing data of the bit-operated data memory 101 are performed. In such a case, the data processing of nine instructions, that is, the five instructions of the first bit operation and the four instructions of the subsequent data processing, is sequentially executed in a pipeline manner.

【0015】最初のビット操作の第一の命令“LW”の
データ処理では、命令が命令フェッチステージ1にフェ
ッチされて命令デコードステージ2でデコードされ、こ
の命令から処理実行ステージ3でデータメモリ101の
実行アドレスが生成される。この実行アドレスでメモリ
アクセスステージ4によりデータメモリ101から処理
データが読み出され、この処理データがライトバックス
テージ5により命令デコードステージ2に帰還されてレ
ジスタファイル15に一時保存される。
In the data processing of the first instruction "LW" of the first bit operation, the instruction is fetched by the instruction fetch stage 1 and decoded by the instruction decode stage 2, and from this instruction, the data execution of the data memory 101 is performed by the processing execution stage 3. An execution address is generated. The processing data is read from the data memory 101 by the memory access stage 4 at the execution address, and the processed data is fed back to the instruction decode stage 2 by the write-back stage 5 and is temporarily stored in the register file 15.

【0016】同様に、第二第三の命令“LHI,XOR
I”のデータ処理ではマスクパターンなどの操作データ
がレジスタファイル15に設定され、第四の命令“AN
D”のデータ処理ではデータメモリ101から読み出さ
れた処理データが操作データによりビット操作される。
第五の命令“SW”のデータ処理では、ビット操作され
た処理データがデータメモリ101に読出時と同一のア
ドレスで再度格納されるので、これでデータメモリ10
1に事前に格納されている処理データがビット操作され
たことになる。
Similarly, the second and third instructions "LHI, XOR
In the data processing of "I", operation data such as a mask pattern is set in the register file 15, and the fourth instruction "AN
In the data processing of D ″, the processing data read from the data memory 101 is bit-operated by the operation data.
In the data processing of the fifth instruction “SW”, the bit-processed processed data is stored again in the data memory 101 at the same address as that at the time of reading.
This means that the processing data stored in advance in 1 is bit-operated.

【0017】上述のような各種の命令の各々のデータ処
理は、データ処理装置100の五段のステージ1〜5に
個々に対応した五段からなり、複数の命令の五段のデー
タ処理は一段ずつシフトされてデータ処理装置100の
ステージ1〜5で並列にデータ処理される。
The data processing of each of the various instructions as described above consists of five stages corresponding to the five stages 1 to 5 of the data processor 100, respectively. And the data is processed in parallel in stages 1 to 5 of the data processing apparatus 100.

【0018】従って、五つの命令からなる一番目のビッ
ト操作は“5×5=25”クロック分のデータ処理が
“5+5−1=9”クロックで完了し、これに後続する
四つの命令からなる二番目のデータ処理も8クロックで
完了する。そして、これら二つの処理動作も連続的にパ
イプライン処理されるので、全部で45クロック分のデ
ータ処理が13クロックで完了する。
Therefore, the first bit operation consisting of five instructions is completed with data processing of "5.times.5 = 25" clocks in "5 + 5-1 = 9" clocks, and consists of the following four instructions. The second data processing is completed in eight clocks. Since these two processing operations are also continuously pipelined, data processing for a total of 45 clocks is completed in 13 clocks.

【0019】なお、ここではデータメモリ101とマイ
クロプロセッサ102とが別体のデータ処理装置100
を例示したが、このようなデータメモリ101とマイク
ロプロセッサ102とが一体化されたデータ処理装置
(図示せず)も現在は実用化されている。また、マイク
ロプロセッサ102にインストラクションメモリ12が
一体化されていることを例示したが、マイクロプロセッ
サ102とインストラクションメモリ12とが別体のデ
ータ処理装置(図示せず)も実用化されている。
In this case, the data memory 101 and the microprocessor 102 are separate data processing devices 100.
However, such a data processing device (not shown) in which the data memory 101 and the microprocessor 102 are integrated has also been put to practical use at present. In addition, although the instruction memory 12 is illustrated as being integrated with the microprocessor 102, a data processing device (not shown) in which the microprocessor 102 and the instruction memory 12 are separate has been put to practical use.

【0020】[0020]

【発明が解決しようとする課題】上述のようなデータ処
理装置100は、パイプライン処理によりデータ処理を
高速に実行することができるが、上述のように一つのデ
ータ処理であるビット操作を実行するために三つから五
つの命令を必要としている。このため、データメモリ1
01の処理データをビット操作するために複数の命令を
入力する必要があり、処理速度の向上が効果的でないと
ともに、プログラムの容量が増大して作成の負担も増大
している。
The data processing apparatus 100 as described above can execute data processing at high speed by pipeline processing, but executes bit operation, which is one data processing, as described above. You need three to five orders to do so. Therefore, the data memory 1
It is necessary to input a plurality of instructions in order to perform a bit operation on the processing data of No. 01, so that the improvement of the processing speed is not effective, and the capacity of the program is increased and the burden of creation is also increased.

【0021】このような課題を解決するため、例えば、
本出願人が製品化したデータ処理装置(図示せず)など
では、ビット操作などのデータ処理を一つの命令で実行
できるようになっている。このデータ処理装置の場合、
ビット操作の命令は“命令フェッチ,命令デコー
ド,アドレス生成,データリード,データ作成,
データ変更,データライト”なる七段のデータ処理
で形成されている。第四のデータ処理でデータメモリか
ら読み出された処理データは、第五のデータ処理で作成
される処理データにより第六のデータ処理でビット操作
され、第七のデータ処理でデータメモリに格納される。
In order to solve such a problem, for example,
In a data processing device (not shown) commercialized by the present applicant, data processing such as bit operation can be executed by one instruction. For this data processing device,
The bit manipulation instructions are “instruction fetch, instruction decode, address generation, data read, data creation,
The data is read from the data memory in the fourth data processing. The sixth data processing is performed by the fifth data processing. Bit operations are performed in the data processing, and stored in the data memory in the seventh data processing.

【0022】上述のようなデータ処理装置の場合、一つ
の命令でビット操作のデータ処理を実行することができ
るが、その第三と第五と第六とのデータ処理で処理実行
ステージを動作させ、第四と第七との処理でメモリアク
セスステージを動作させる必要がある。
In the case of the above-described data processing device, data processing of bit manipulation can be executed by one instruction, but the processing execution stage is operated by the third, fifth, and sixth data processing. It is necessary to operate the memory access stage in the fourth and seventh processes.

【0023】つまり、上述したビット操作のデータ処理
では、第三の処理で動作させる処理実行ステージを第六
の処理まで占有する必要があるので、これが終了するま
で後続の命令のデータ処理で処理実行ステージを使用す
ることができない。このため、上述したデータ処理装置
では、ビット操作のデータ処理を実行すると後続のデー
タ処理は3クロック分までデータ処理を一時停止させる
必要があり、パイプライン処理の動作効率が低下してい
る。
That is, in the data processing of the bit operation described above, the processing execution stage operated in the third processing needs to be occupied until the sixth processing. Unable to use stage. For this reason, in the above-described data processing device, when the data processing of the bit operation is performed, the subsequent data processing needs to temporarily suspend the data processing for three clocks, and the operation efficiency of the pipeline processing is reduced.

【0024】本発明は上述のような課題に鑑みてなされ
たものであり、ビット操作を実行した場合のパイプライ
ンの処理効率の低下を軽減できるデータ処理装置および
方法を提供することを目的とする。
The present invention has been made in view of the above-described problems, and has as its object to provide a data processing apparatus and method capable of reducing a decrease in the processing efficiency of a pipeline when a bit operation is performed. .

【0025】[0025]

【課題を解決するための手段】本発明の一のデータ処理
装置は、各種の処理データを更新自在に一時記憶する別
体のデータメモリにビット操作の命令に対応してアクセ
スし、該データメモリから処理データを読み出してビッ
ト操作してから再度格納するデータ処理装置において、
少なくともビット操作の命令の入力を受け付ける命令フ
ェッチ手段と、該命令フェッチ手段に入力された命令を
デコードする命令デコード手段と、該命令デコード手段
でデコードされた命令からビット操作する処理データの
実行アドレスを生成するアドレス生成手段と、該アドレ
ス生成手段により生成された実行アドレスで前記データ
メモリから処理データを読み出すデータ読出手段と、該
データ読出手段で読み出された処理データに前記命令デ
コード手段でデコードされた命令のビット操作を実行す
るビット操作手段と、該ビット操作手段でビット操作さ
れた処理データを前記アドレス生成手段により生成され
た実行アドレスで前記データメモリに格納するデータ格
納手段と、を具備している。
According to one aspect of the present invention, there is provided a data processing apparatus which accesses a separate data memory for temporarily storing various kinds of processing data in an updatable manner in response to a bit manipulation instruction, and In a data processing device that reads processing data from, performs bit manipulation, and stores again,
An instruction fetch unit for receiving at least an input of an instruction for bit operation, an instruction decoding unit for decoding an instruction input to the instruction fetch unit, and an execution address of processing data for performing bit operation on the instruction decoded by the instruction decoding unit. Address generating means for generating, data reading means for reading processing data from the data memory at the execution address generated by the address generating means, and processing data read by the data reading means, decoded by the instruction decoding means. Bit operation means for executing a bit operation of the instruction, and data storage means for storing processing data bit-operated by the bit operation means in the data memory at an execution address generated by the address generation means. ing.

【0026】従って、命令フェッチ手段がビット操作の
命令の入力を受け付けると、この入力された命令を命令
デコード手段がデコードする。このデコードされた命令
からアドレス生成手段がビット操作する処理データの実
行アドレスを生成すると、この生成された実行アドレス
でデータ読出手段がデータメモリから処理データを読み
出す。この読み出された処理データに命令デコード手段
でデコードされた命令のビット操作をビット操作手段が
実行するので、このビット操作された処理データをアド
レス生成手段により生成された実行アドレスでデータ格
納手段がデータメモリに格納する。
Therefore, when the instruction fetch means receives an input of a bit manipulation instruction, the instruction decoding means decodes the input instruction. When the address generating means generates the execution address of the processing data to be bit-operated from the decoded instruction, the data reading means reads the processing data from the data memory with the generated execution address. Since the bit operation unit performs bit manipulation of the instruction decoded by the instruction decoding unit on the read processing data, the data storage unit stores the bit-processed processing data with the execution address generated by the address generation unit. Store in data memory.

【0027】つまり、上述のデータ処理装置のデータ処
理方法は“命令フェッチ,命令デコード,アドレ
ス生成,データリード,ビット操作,データライ
ト”なる六段のデータ処理で形成されており、第四段目
のデータリードでデータメモリから読み出された処理デ
ータは第五段目のビット操作でビット操作されてから第
六段目のデータライトでデータメモリに格納される。こ
のため、一つの命令の入力に対応してビット操作のデー
タ処理が実行され、このビット操作のデータ処理は6ク
ロックで完了する。しかも、第三段目のアドレス生成と
第五段目のビット操作とは各々専用の手段で個々に実行
されるので、一つの処理ステージを複数のデータ処理間
で占有する動作は第四段目のデータリードから第六段目
のデータライトまでとなり、ビット操作を実行した場合
の後続のデータ処理の一時停止は最大でも2クロックで
良い。
In other words, the data processing method of the above-described data processing device is formed by six-stage data processing of "instruction fetch, instruction decode, address generation, data read, bit manipulation, data write". The processed data read from the data memory by the data read is bit-operated by the fifth bit operation and then stored in the data memory by the sixth data write. Therefore, the data processing of the bit operation is executed in response to the input of one instruction, and the data processing of the bit operation is completed in six clocks. In addition, since the third-stage address generation and the fifth-stage bit manipulation are individually executed by dedicated means, the operation of occupying one processing stage among a plurality of data processes is the fourth stage. From the data read to the sixth-stage data write, and the subsequent data processing in the case of executing the bit operation may be suspended for at most two clocks.

【0028】なお、上述のような本発明の各種手段は、
その機能を実現するよう形成されていれば良く、例え
ば、専用のハードウェア、適正な機能がプログラムによ
り付与されたコンピュータ、適正なプログラムによりコ
ンピュータの内部に実現された機能、これらの組み合わ
せ、等を許容する。
The various means of the present invention as described above include:
What is necessary is just to be formed so as to realize the function, for example, dedicated hardware, a computer to which an appropriate function is provided by a program, a function realized inside the computer by an appropriate program, a combination thereof, and the like. Allow.

【0029】本発明の他のデータ処理装置は、各種の処
理データを更新自在に一時記憶するデータメモリと、少
なくともビット操作の命令の入力を受け付ける命令フェ
ッチ手段と、該命令フェッチ手段に入力された命令をデ
コードする命令デコード手段と、該命令デコード手段で
デコードされた命令からビット操作する処理データの実
行アドレスを生成するアドレス生成手段と、該アドレス
生成手段により生成された実行アドレスで前記データメ
モリから処理データを読み出すデータ読出手段と、該デ
ータ読出手段で読み出された処理データに前記命令デコ
ード手段でデコードされた命令のビット操作を実行する
ビット操作手段と、該ビット操作手段でビット操作され
た処理データを前記アドレス生成手段により生成された
実行アドレスで前記データメモリに格納するデータ格納
手段と、を具備している。
According to another data processing apparatus of the present invention, there are provided a data memory for temporarily storing various kinds of processing data in an updatable manner, an instruction fetch means for receiving at least an input of a bit operation instruction, and an instruction fetch means inputted to the instruction fetch means. An instruction decoding unit for decoding an instruction; an address generation unit for generating an execution address of processing data for performing bit operation from the instruction decoded by the instruction decoding unit; and an execution address generated by the address generation unit. Data reading means for reading processing data, bit operating means for performing bit operation of an instruction decoded by the instruction decoding means on the processing data read by the data reading means, and bit operation performed by the bit operating means The processing data is preceded by the execution address generated by the address generation means. And it includes a data storage means for storing in the data memory.

【0030】従って、命令フェッチ手段がビット操作の
命令の入力を受け付けると、この入力された命令を命令
デコード手段がデコードする。このデコードされた命令
からアドレス生成手段がビット操作する処理データの実
行アドレスを生成すると、この生成された実行アドレス
でデータ読出手段がデータメモリから処理データを読み
出す。この読み出された処理データに命令デコード手段
でデコードされた命令のビット操作をビット操作手段が
実行するので、このビット操作された処理データをアド
レス生成手段により生成された実行アドレスでデータ格
納手段がデータメモリに格納する。
Therefore, when the instruction fetch means receives an input of a bit manipulation instruction, the input instruction is decoded by the instruction decode means. When the address generating means generates the execution address of the processing data to be bit-operated from the decoded instruction, the data reading means reads the processing data from the data memory with the generated execution address. Since the bit operation unit performs bit manipulation of the instruction decoded by the instruction decoding unit on the read processing data, the data storage unit stores the bit-processed processing data with the execution address generated by the address generation unit. Store in data memory.

【0031】つまり、上述のデータ処理装置のデータ処
理方法は“命令フェッチ,命令デコード,アドレ
ス生成,データリード,ビット操作,データライ
ト”なる六段のデータ処理で形成されており、第四のデ
ータリードでデータメモリから読み出された処理データ
は第五段目のビット操作でビット操作されてから第六段
目のデータライトでデータメモリに格納される。このた
め、一つの命令の入力に対応してビット操作のデータ処
理が実行され、このビット操作のデータ処理は6クロッ
クで完了する。しかも、第三段目のアドレス生成と第五
段目のビット操作とは各々専用の手段で個々に実行され
るので、一つの処理ステージを複数のデータ処理間で占
有する動作は第四のデータリードから第六段目のデータ
ライトまでとなり、ビット操作を実行した場合の後続の
データ処理の一時停止は最大でも2クロックで良い。
That is, the data processing method of the above-described data processing device is formed by six-stage data processing of "instruction fetch, instruction decode, address generation, data read, bit manipulation, data write". The processed data read from the data memory by the read is bit-operated by the bit operation of the fifth stage, and then stored in the data memory by the data write of the sixth stage. Therefore, the data processing of the bit operation is executed in response to the input of one instruction, and the data processing of the bit operation is completed in six clocks. Further, since the third-stage address generation and the fifth-stage bit manipulation are individually executed by dedicated means, the operation of occupying one processing stage among a plurality of data processes is the fourth data operation. From the reading to the data writing in the sixth stage, the subsequent data processing in the case where the bit operation is executed may be temporarily stopped at a maximum of two clocks.

【0032】本発明の他のデータ処理装置は、各種の処
理データを更新自在に一時記憶する別体のデータメモリ
にビット操作の命令に対応してアクセスし、該データメ
モリから処理データを読み出してビット操作してから再
度格納するデータ処理装置において、前記データメモリ
とは別個に各種の処理データを更新自在に一時記憶する
データ記憶手段と、少なくともビット操作の命令の入力
を受け付ける命令フェッチ手段と、該命令フェッチ手段
に入力された命令をデコードする命令デコード手段と、
該命令デコード手段でデコードされた命令からビット操
作する処理データの実行アドレスを生成するアドレス生
成手段と、該アドレス生成手段により生成された実行ア
ドレスで前記データメモリと前記データ記憶手段との一
方から処理データを読み出すデータ読出手段と、該デー
タ読出手段で読み出された処理データに前記命令デコー
ド手段でデコードされた命令のビット操作を実行するビ
ット操作手段と、該ビット操作手段でビット操作された
処理データを前記アドレス生成手段により生成された実
行アドレスで前記データメモリと前記データ記憶手段と
の一方に格納するデータ格納手段と、を具備している。
Another data processing apparatus of the present invention accesses a separate data memory for temporarily storing various kinds of processing data in an updatable manner in accordance with a bit manipulation instruction, and reads out the processing data from the data memory. In a data processing device that performs bit operation and then stores again, a data storage unit that temporarily stores various processing data in an updatable manner separately from the data memory, an instruction fetch unit that receives at least an input of a bit operation instruction, Instruction decoding means for decoding an instruction input to the instruction fetch means;
Address generating means for generating an execution address of processing data to be bit-operated from the instruction decoded by the instruction decoding means; and processing from one of the data memory and the data storage means using the execution address generated by the address generating means. Data reading means for reading data, bit operation means for executing bit operation of an instruction decoded by the instruction decoding means on the processing data read by the data reading means, and processing which has been bit-operated by the bit operation means Data storage means for storing data in one of the data memory and the data storage means with an execution address generated by the address generation means.

【0033】従って、命令フェッチ手段がビット操作の
命令の入力を受け付けると、この入力された命令を命令
デコード手段がデコードする。このデコードされた命令
からアドレス生成手段がビット操作する処理データの実
行アドレスを生成すると、この生成された実行アドレス
でデータ読出手段がデータメモリとデータ記憶手段との
一方から処理データを読み出す。この読み出された処理
データに命令デコード手段でデコードされた命令のビッ
ト操作をビット操作手段が実行するので、このビット操
作された処理データをアドレス生成手段により生成され
た実行アドレスでデータ格納手段がデータメモリとデー
タ記憶手段との一方に格納する。
Therefore, when the instruction fetch means receives an input of a bit manipulation instruction, the instruction decoding means decodes the input instruction. When the address generation means generates an execution address of the processing data to be bit-operated from the decoded instruction, the data reading means reads the processing data from one of the data memory and the data storage means using the generated execution address. Since the bit operation unit performs bit manipulation of the instruction decoded by the instruction decoding unit on the read processing data, the data storage unit stores the bit-processed processing data with the execution address generated by the address generation unit. It is stored in one of the data memory and the data storage means.

【0034】つまり、上述のデータ処理装置のデータ処
理方法は“命令フェッチ,命令デコード,アドレ
ス生成,データリード,ビット操作,データライ
ト”なる六段のデータ処理で形成されており、第四段目
のデータリードでデータメモリとデータ記憶手段との一
方から読み出された処理データは第五のビット操作でビ
ット操作されてから第六段目のデータライトでデータメ
モリとデータ記憶手段との一方に格納される。このた
め、一つの命令の入力に対応してビット操作のデータ処
理が実行され、このビット操作のデータ処理は6クロッ
クで完了する。しかも、第三段目のアドレス生成と第五
段目のビット操作とは各々専用の手段で個々に実行され
るので、一つの処理ステージを複数のデータ処理間で占
有する動作は第四段目のデータリードから第六段目のデ
ータライトまでとなり、ビット操作を実行した場合の後
続のデータ処理の一時停止は最大でも2クロックで良
い。特に、ビット操作の対象がデータメモリとデータ記
憶手段との2個なので、一方をビット操作に利用して他
方を後続のデータ処理に利用するならば、この後続のデ
ータ処理を一時停止する必要はない。
That is, the data processing method of the above-described data processing device is formed by six-stage data processing of "instruction fetch, instruction decode, address generation, data read, bit manipulation, data write". The processed data read from one of the data memory and the data storage means by the data read is bit-operated by the fifth bit operation, and then is written to one of the data memory and the data storage means by the sixth-stage data write. Is stored. Therefore, the data processing of the bit operation is executed in response to the input of one instruction, and the data processing of the bit operation is completed in six clocks. In addition, since the third-stage address generation and the fifth-stage bit manipulation are individually executed by dedicated means, the operation of occupying one processing stage among a plurality of data processes is the fourth stage. From the data read to the sixth-stage data write, and the subsequent data processing in the case of executing the bit operation may be suspended for at most two clocks. In particular, since there are two bit manipulation targets, a data memory and a data storage means, if one is used for bit manipulation and the other is used for subsequent data processing, it is not necessary to suspend this subsequent data processing. Absent.

【0035】本発明の他のデータ処理装置は、各種の処
理データを更新自在に一時記憶するデータメモリと、該
データメモリとは別個に各種の処理データを更新自在に
一時記憶するデータ記憶手段と、少なくともビット操作
の命令の入力を受け付ける命令フェッチ手段と、該命令
フェッチ手段に入力された命令をデコードする命令デコ
ード手段と、該命令デコード手段でデコードされた命令
からビット操作する処理データの実行アドレスを生成す
るアドレス生成手段と、該アドレス生成手段により生成
された実行アドレスで前記データメモリと前記データ記
憶手段との一方から処理データを読み出すデータ読出手
段と、該データ読出手段で読み出された処理データに前
記命令デコード手段でデコードされた命令のビット操作
を実行するビット操作手段と、該ビット操作手段でビッ
ト操作された処理データを前記アドレス生成手段により
生成された実行アドレスで前記データメモリと前記デー
タ記憶手段との一方に格納するデータ格納手段と、を具
備している。
Another data processing apparatus according to the present invention comprises a data memory for temporarily storing various processing data in an updatable manner, and a data storage means for separately and temporarily storing various processing data in an updatable manner. Instruction fetch means for receiving at least an input of a bit-operated instruction, instruction decode means for decoding an instruction input to the instruction fetch means, and an execution address of processing data for bit-operating from the instruction decoded by the instruction decode means Address generating means for generating the data, data reading means for reading processing data from one of the data memory and the data storing means with the execution address generated by the address generating means, and processing read by the data reading means. A bit for performing a bit operation on an instruction decoded by the instruction decoding means on data Operating means, and data storage means for storing the processed data bit-operated by the bit operating means in one of the data memory and the data storage means at an execution address generated by the address generating means. I have.

【0036】従って、命令フェッチ手段がビット操作の
命令の入力を受け付けると、この入力された命令を命令
デコード手段がデコードする。このデコードされた命令
からアドレス生成手段がビット操作する処理データの実
行アドレスを生成すると、この生成された実行アドレス
でデータ読出手段がデータメモリとデータ記憶手段との
一方から処理データを読み出す。この読み出された処理
データに命令デコード手段でデコードされた命令のビッ
ト操作をビット操作手段が実行するので、このビット操
作された処理データをアドレス生成手段により生成され
た実行アドレスでデータ格納手段がデータメモリとデー
タ記憶手段との一方に格納する。
Accordingly, when the instruction fetch means receives an input of a bit manipulation instruction, the instruction decoding means decodes the input instruction. When the address generation means generates an execution address of the processing data to be bit-operated from the decoded instruction, the data reading means reads the processing data from one of the data memory and the data storage means using the generated execution address. Since the bit operation unit performs bit manipulation of the instruction decoded by the instruction decoding unit on the read processing data, the data storage unit stores the bit-processed processing data with the execution address generated by the address generation unit. It is stored in one of the data memory and the data storage means.

【0037】つまり、上述のデータ処理装置のデータ処
理方法は“命令フェッチ,命令デコード,アドレ
ス生成,データリード,ビット操作,データライ
ト”なる六段のデータ処理で形成されており、第四段目
のデータリードでデータメモリとデータ記憶手段との一
方から読み出された処理データは第五のビット操作でビ
ット操作されてから第六段目のデータライトでデータメ
モリとデータ記憶手段との一方に格納される。このた
め、一つの命令の入力に対応してビット操作のデータ処
理が実行され、このビット操作のデータ処理は6クロッ
クで完了する。しかも、第三段目のアドレス生成と第五
段目のビット操作とは各々専用の手段で個々に実行され
るので、一つの処理ステージを複数のデータ処理間で占
有する動作は第四段目のデータリードから第六段目のデ
ータライトまでとなり、ビット操作を実行した場合の後
続のデータ処理の一時停止は最大でも2クロックで良
い。特に、ビット操作の対象がデータメモリとデータ記
憶手段との2個なので、一方をビット操作に利用して他
方を後続のデータ処理に利用するならば、この後続のデ
ータ処理を一時停止する必要はない。
That is, the data processing method of the above-described data processing device is formed by six-stage data processing of "instruction fetch, instruction decode, address generation, data read, bit operation, data write". The processed data read from one of the data memory and the data storage means by the data read is bit-operated by the fifth bit operation, and then is written to one of the data memory and the data storage means by the sixth-stage data write. Is stored. Therefore, the data processing of the bit operation is executed in response to the input of one instruction, and the data processing of the bit operation is completed in six clocks. In addition, since the third-stage address generation and the fifth-stage bit manipulation are individually executed by dedicated means, the operation of occupying one processing stage among a plurality of data processes is the fourth stage. From the data read to the sixth-stage data write, and the subsequent data processing in the case of executing the bit operation may be suspended for at most two clocks. In particular, since there are two bit manipulation targets, a data memory and a data storage means, if one is used for bit manipulation and the other is used for subsequent data processing, it is not necessary to suspend this subsequent data processing. Absent.

【0038】本発明の他のデータ処理方法は、各種の処
理データを更新自在に一時記憶するデータメモリにビッ
ト操作の命令に対応してアクセスし、該データメモリか
ら処理データを読み出してビット操作してから再度格納
するデータ処理方法において、少なくともビット操作の
命令の入力を受け付け、この入力された命令をデコード
し、このデコードされた命令からビット操作する処理デ
ータの実行アドレスを生成し、この生成された実行アド
レスで前記データメモリから処理データを読み出し、こ
の読み出された処理データにデコードされた命令のビッ
ト操作を実行し、このビット操作された処理データを生
成された実行アドレスで前記データメモリに格納するよ
うにした。
According to another data processing method of the present invention, a data memory for temporarily storing various kinds of processing data in an updatable manner is accessed in accordance with a bit manipulation instruction, and the processing data is read from the data memory to perform bit manipulation. In the data processing method of storing data again, an input of at least a bit operation instruction is received, the input instruction is decoded, and an execution address of processing data to be bit operated is generated from the decoded instruction. The processing data is read from the data memory at the execution address, the bit operation of the decoded instruction is performed on the read processing data, and the bit-processed processing data is stored in the data memory at the generated execution address. Stored.

【0039】従って、このデータ処理方法は“命令フ
ェッチ,命令デコード,アドレス生成,データリ
ード,ビット操作,データライト”なる六段のデー
タ処理で形成されており、第四のデータリードでデータ
メモリから読み出された処理データは第五段目のビット
操作でビット操作されてから第六段目のデータライトで
データメモリに格納される。このため、一つの命令の入
力に対応してビット操作のデータ処理が実行され、この
ビット操作のデータ処理は6クロックで完了する。しか
も、第三段目のアドレス生成と第五段目のビット操作と
を各々専用の手段で個々に実行できるので、一つの処理
ステージを複数のデータ処理間で占有する動作は第四の
データリードから第六段目のデータライトまでとなり、
ビット操作を実行した場合の後続のデータ処理の一時停
止は最大でも2クロックで良い。
Therefore, this data processing method is formed by six-stage data processing of "instruction fetch, instruction decode, address generation, data read, bit manipulation, data write". The read processed data is bit-operated by the bit operation of the fifth stage, and then stored in the data memory by the data write of the sixth stage. Therefore, the data processing of the bit operation is executed in response to the input of one instruction, and the data processing of the bit operation is completed in six clocks. In addition, since the third-stage address generation and the fifth-stage bit manipulation can be individually executed by dedicated means, the operation of occupying one processing stage among a plurality of data processes is the fourth data read operation. To the sixth stage data write,
The suspension of the subsequent data processing when the bit operation is executed may be at most two clocks.

【0040】本発明の他のデータ処理方法は、各種の処
理データを更新自在に一時記憶するデータメモリとデー
タ記憶手段との一方にビット操作の命令に対応してアク
セスし、前記データメモリと前記データ記憶手段との一
方から処理データを読み出してビット操作してから再度
格納するデータ処理方法において、少なくともビット操
作の命令の入力を受け付け、この入力された命令をデコ
ードし、このデコードされた命令からビット操作する処
理データの実行アドレスを生成し、この生成された実行
アドレスで前記データメモリと前記データ記憶手段との
一方から処理データを読み出し、この読み出された処理
データにデコードされた命令のビット操作を実行し、こ
のビット操作された処理データを生成された実行アドレ
スで前記データメモリと前記データ記憶手段との一方に
格納するようにした。
According to another data processing method of the present invention, one of a data memory for temporarily storing various kinds of processing data in an updatable manner and a data storage means are accessed in response to a bit manipulation instruction, and In a data processing method for reading processing data from one of data storage means, performing bit manipulation, and then storing again, an input of at least a bit manipulation instruction is received, the inputted instruction is decoded, and the decoded instruction is An execution address of the processing data to be bit-operated is generated, the processing data is read from one of the data memory and the data storage means with the generated execution address, and the bit of the instruction decoded into the read processing data is generated. An operation is executed, and the bit-processed processing data is stored in the data memory at the generated execution address. It was set to be stored in one of the Li and the data storage means.

【0041】従って、このデータ処理方法は“命令フ
ェッチ,命令デコード,アドレス生成,データリ
ード,ビット操作,データライト”なる六段のデー
タ処理で形成されており、第四段目のデータリードでデ
ータメモリとデータ記憶手段との一方から読み出された
処理データは第五のビット操作でビット操作されてから
第六段目のデータライトでデータメモリとデータ記憶手
段との一方に格納される。このため、一つの命令の入力
に対応してビット操作のデータ処理が実行され、このビ
ット操作のデータ処理は6クロックで完了する。しか
も、第三段目のアドレス生成と第五段目のビット操作と
は各々専用の手段で個々に実行できるので、一つの処理
ステージを複数のデータ処理間で占有する動作は第四段
目のデータリードから第六段目のデータライトまでとな
り、ビット操作を実行した場合の後続のデータ処理の一
時停止は最大でも2クロックで良い。特に、ビット操作
の対象がデータメモリとデータ記憶手段との2個なの
で、一方をビット操作に利用して他方を後続のデータ処
理に利用するならば、この後続のデータ処理を一時停止
する必要はない。
Therefore, this data processing method is formed by a six-stage data process of "instruction fetch, instruction decode, address generation, data read, bit manipulation, data write". The processed data read from one of the memory and the data storage unit is bit-operated by a fifth bit operation, and then stored in one of the data memory and the data storage unit by the sixth-stage data write. Therefore, the data processing of the bit operation is executed in response to the input of one instruction, and the data processing of the bit operation is completed in six clocks. Moreover, since the third-stage address generation and the fifth-stage bit manipulation can be individually executed by dedicated means, the operation of occupying one processing stage among a plurality of data processes is not required in the fourth stage. From the data reading to the sixth-stage data writing, the subsequent data processing when the bit operation is executed may be temporarily stopped at a maximum of two clocks. In particular, since there are two bit manipulation targets, a data memory and a data storage means, if one is used for bit manipulation and the other is used for subsequent data processing, it is not necessary to suspend this subsequent data processing. Absent.

【0042】[0042]

【発明の実施の形態】本発明の実施の一形態を図1ない
し図6を参照して以下に説明する。なお、本実施の形態
に関して前述した一従来例と同一の部分は、同一の名称
を使用して詳細な説明は省略する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to FIGS. Note that the same portions as those of the conventional example described above with respect to the present embodiment are denoted by the same names, and detailed description is omitted.

【0043】図1は本実施の形態のデータ処理装置のハ
ードウェアをパイプラインの処理手順に対応して表現し
た模式的なブロック図、図2はビット操作器の内部構造
を示すブロック図、図3は命令の命令コードのフォーマ
ットを示す模式図、図4は各種のビット操作のニモニッ
クコードを示す模式図、図5は二つの処理動作の五つの
命令のパイプライン処理の処理手順を示す模式的なタイ
ムチャートである。
FIG. 1 is a schematic block diagram showing the hardware of a data processing apparatus according to the present embodiment in accordance with the processing procedure of a pipeline. FIG. 2 is a block diagram showing the internal structure of a bit operator. 3 is a schematic diagram showing an instruction code format of an instruction, FIG. 4 is a schematic diagram showing mnemonic codes of various bit operations, and FIG. 5 is a schematic diagram showing a processing procedure of a pipeline processing of five instructions of two processing operations. It is a simple time chart.

【0044】本実施の形態のデータ処理装置200も、
図1に示すように、前述したデータ処理装置100と同
様にデータメモリ201とマイクロプロセッサ202と
を具備しているが、前述したデータ処理装置100とは
相違して六段のステージ31〜36が論理的に形成され
ている。
The data processing device 200 of the present embodiment also
As shown in FIG. 1, a data memory 201 and a microprocessor 202 are provided similarly to the data processing device 100 described above, but unlike the data processing device 100 described above, six stages 31 to 36 are provided. Logically formed.

【0045】第一段目のステージである命令フェッチス
テージ31は命令フェッチ手段に相当し、プログラムカ
ウンタ41、インストラクションメモリ42、加算器4
3、マルチプレクサ44、等を具備しており、各種の命
令をフェッチする。第二段目のステージである命令デコ
ードステージ32は命令デコード手段に相当し、レジス
タファイル45や符号拡張器46等を具備しており、命
令フェッチステージ31でフェッチされた命令のデコー
ドとレジスタファイル45からの読み出しとを実行す
る。
An instruction fetch stage 31, which is the first stage, corresponds to an instruction fetch means, and includes a program counter 41, an instruction memory 42, an adder 4
3, a multiplexer 44, etc., and fetch various instructions. The instruction decode stage 32, which is the second stage, corresponds to an instruction decode means, and includes a register file 45, a sign extender 46, etc., and decodes the instruction fetched in the instruction fetch stage 31 and registers the instruction in the register file 45. And read from.

【0046】第三段目のステージであるアドレス生成ス
テージ33はアドレス生成手段に相当し、ゼロ判定器4
7、マルチプレクサ48,49、ALU50、等を具備
しており、例えば、命令がビット操作の場合、命令デコ
ードステージ32でデコードされた命令からビット操作
する処理データの実行アドレスを生成する。
The address generation stage 33, which is the third stage, corresponds to the address generation means,
7, the multiplexers 48 and 49, the ALU 50, and the like. For example, when the instruction is a bit operation, an execution address of processing data to be bit-operated is generated from the instruction decoded by the instruction decode stage 32.

【0047】第四段目のステージであるメモリリードス
テージ34はデータ読出手段に相当し、マルチプレクサ
51,52やデータメモリ201を具備しており、例え
ば、命令がビット操作の場合、アドレス生成ステージ3
3により生成された実行アドレスでデータメモリ201
から処理データを読み出す。
The memory read stage 34, which is the fourth stage, corresponds to data reading means and includes multiplexers 51 and 52 and a data memory 201. For example, when an instruction is a bit operation, an address generation stage 3
3 with the execution address generated by the data memory 201
Read processing data from.

【0048】第五段目のステージであるビットオペレー
トステージ35はビット操作手段に相当し、マルチプレ
クサ53やビット操作器54等を具備している。このビ
ットオペレートステージ35は、例えば、命令が従来の
方式の場合は、従来と同様に命令を命令デコードステー
ジ32のレジスタファイル45に格納するが、命令がビ
ット操作の場合は、メモリリードステージ34でデータ
メモリ201から読み出された処理データに命令デコー
ドステージ32でデコードされた命令のビット操作を実
行する。
The bit operation stage 35, which is the fifth stage, corresponds to bit operation means, and includes a multiplexer 53, a bit operation device 54, and the like. The bit operation stage 35 stores the instruction in the register file 45 of the instruction decode stage 32 in the same manner as in the conventional case, for example, when the instruction is a conventional method, but in the memory read stage 34 when the instruction is a bit operation. The instruction data decoded in the instruction decode stage 32 performs bit operations on the processing data read from the data memory 201.

【0049】第六段目のステージであるメモリライトス
テージ36はデータ格納手段に相当し、例えば、命令が
ビット操作の場合、ビットオペレートステージ35でビ
ット操作された処理データをアドレス生成ステージ33
により生成された実行アドレスでデータメモリ201に
格納する。
The memory write stage 36, which is the sixth stage, corresponds to data storage means. For example, when the instruction is a bit operation, the processed data bit-operated by the bit operation stage 35 is stored in the address generation stage 33.
And stores it in the data memory 201 with the execution address generated.

【0050】上述したビットオペレートステージ35の
ビット操作器54は、図2に示すように、32個のビッ
ト変換回路61を具備しており、これら32個のビット
変換回路61の各々の入力配線62と出力配線63とが
データメモリ201の32個の出力端子と入力端子とに
パラレルに接続されている。
As shown in FIG. 2, the bit operation unit 54 of the bit operation stage 35 includes 32 bit conversion circuits 61, and the input wiring 62 of each of the 32 bit conversion circuits 61. And the output wiring 63 are connected in parallel to 32 output terminals and input terminals of the data memory 201.

【0051】ビット変換回路61は、第一第二のビット
選択回路64,65を各々具備しており、第一のビット
選択回路64は、例えば、三入力のマルチプレクサから
なる。第一のビット選択回路64は、第一の入力端子に
入力配線62がインバータ66を介して接続されてお
り、第二第三の入力端子には“0”と“1”との出力回
路(図示せず)が接続されている。
The bit conversion circuit 61 has first and second bit selection circuits 64 and 65, respectively. The first bit selection circuit 64 is composed of, for example, a three-input multiplexer. In the first bit selection circuit 64, an input wiring 62 is connected to a first input terminal via an inverter 66, and an output circuit (“0” and “1”) is connected to a second third input terminal. (Not shown).

【0052】第一のビット選択回路64の第一から第三
の制御端子には命令デコードステージ32の出力端子が
3ステージ分のパイプラインレジスタを介して接続され
ているので、第一のビット選択回路64は、データメモ
リ201から読み出された処理データのビットの反転出
力と“0”と“1”との一つをデコードされたビット操
作の命令に対応して出力する。
Since the output terminals of the instruction decode stage 32 are connected to the first to third control terminals of the first bit selection circuit 64 via three stages of pipeline registers, the first bit selection circuit 64 The circuit 64 outputs an inverted output of the bit of the processing data read from the data memory 201 and one of “0” and “1” in accordance with the decoded bit manipulation instruction.

【0053】第二のビット選択回路65は、例えば、二
入力のマルチプレクサからなり、一方の入力端子には入
力配線62が接続されて他方の入力端子には第一のビッ
ト選択回路64の出力端子が接続されている。第二のビ
ット選択回路65は、二つの制御端子に一方にインバー
タ67を介して命令デコードステージ32の出力端子が
3ステージ分のパイプラインレジスタを介して接続され
ているので、データメモリ201から読み出された処理
データのビットと第一のビット選択回路64が出力する
ビットとの一方をデコードされたビット操作の命令に対
応して出力する。
The second bit selection circuit 65 comprises, for example, a two-input multiplexer. One input terminal is connected to the input wiring 62, and the other input terminal is the output terminal of the first bit selection circuit 64. Is connected. The second bit selection circuit 65 reads data from the data memory 201 because one of the two control terminals is connected to one of the output terminals of the instruction decode stage 32 via an inverter 67 via a pipeline register for three stages. One of the output processing data bit and the bit output by the first bit selection circuit 64 is output in accordance with the decoded bit operation instruction.

【0054】上述のような構造のデータ処理装置200
に各種動作を実行させる命令は、ビット操作の32ビッ
トの命令コードのフォーマットが図3に示すように設定
されており、各種のビット操作のニモニックコードが図
4に示すように表現される。
The data processing device 200 having the above structure
The instruction to execute various operations is set in the format of a 32-bit instruction code of bit operation as shown in FIG. 3, and mnemonic codes of various bit operations are expressed as shown in FIG.

【0055】つまり、処理データのビット操作であるセ
ット/クリア/反転などに利用されるBタイプの命令コ
ードのフォーマットは、そのビット操作の種類が6ビッ
トの“Opcode”に設定され、データメモリ201のビッ
ト操作する処理データの実行アドレスのベースアドレス
を格納するレジスタファイル45の32個のレジスタの
1個の識別データが5ビットの“rs1”に設定され、さ
らに、32ビットの処理データに対するビット操作の実
行位置が5ビットの“bit#”に設定される。実行アドレ
スのオフセットとなる16ビットの符号付即値が“imme
diate”に設定される。
That is, the format of the B-type instruction code used for the bit operation of the processing data, such as set / clear / inversion, is such that the type of the bit operation is set to 6-bit “Opcode” and the data memory 201 The identification data of one of the 32 registers of the register file 45 storing the base address of the execution address of the processing data to be bit-operated is set to 5 bits “rs1”, and the bit operation to the 32-bit processing data is performed. Is set to 5-bit “bit #”. The 16-bit signed immediate value that is the offset of the execution address is "imme
diate ”.

【0056】より詳細には、ここでは“rs1”にはレジ
スタファイル45の32個のレジスタの1個の識別デー
タが設定され、そのレジスタの記憶データに加算等する
パラメータが“immediate”に設定されるので、“rs
1”で指定されたレジスタファイル45のレジスタのベ
ースアドレスに“immediate”に設定されたオフセット
を加算等することでデータメモリ201のビット操作す
る処理データの実行アドレスが生成される。
More specifically, here, one identification data of 32 registers of the register file 45 is set in “rs1”, and a parameter to be added to the data stored in the register is set to “immediate”. So, "rs
By adding the offset set to “immediate” to the base address of the register of the register file 45 specified by “1”, the execution address of the processing data for the bit operation of the data memory 201 is generated.

【0057】なお、処理データのロード/ストア/即値
演算/条件分岐などの命令に利用されるIタイプ、レジ
スタ間でのデータ演算などの命令に利用されるRタイ
プ、無条件分岐などの命令に利用されるJタイプ、等の
命令コードは従来と同様であり、本発明と直接には関係
ないので説明を省略する。
It should be noted that I-type used for instructions such as load / store / immediate operation / conditional branch of processing data, R-type used for instructions such as data operation between registers, and instructions such as unconditional branch. The instruction codes used, such as the J type, are the same as those in the related art, and are not directly related to the present invention, so that the description is omitted.

【0058】上述のような構成において、本実施の形態
のデータ処理装置200も、一従来例として前述したデ
ータ処理装置100と同様に、各種の命令によるデータ
処理をパイプライン方式で高速に実行する。例えば、図
5に示すように、一番目の処理動作としてデータメモリ
201の特定の処理データの22番目のビットをクリア
するビット操作を実行する場合、本実施の形態のデータ
処理装置200のデータ処理方法では、ビット操作用の
一つの命令を入力すれば良い。
In the above-described configuration, the data processing device 200 of this embodiment also executes data processing by various instructions at high speed in a pipeline manner, similarly to the data processing device 100 described above as a conventional example. . For example, as shown in FIG. 5, when a bit operation of clearing the 22nd bit of the specific processing data in the data memory 201 is executed as the first processing operation, the data processing of the data processing apparatus 200 of the present embodiment is performed. In the method, one instruction for bit operation may be input.

【0059】その場合、ビット操作の命令が命令フェッ
チステージ31にフェッチされて命令デコードステージ
32でデコードされ、この命令からアドレス生成ステー
ジ33でビット操作する処理データの実行アドレスが生
成される。この実行アドレスでメモリリードステージ3
4によりデータメモリ201から処理データが読み出さ
れ、この処理データがビットオペレートステージ35で
デコードされた命令に対応してビット操作される。この
ビット操作された処理データはメモリライトステージ3
6でメモリリードステージ34に帰還され、実行アドレ
スに対応してデータメモリに再度格納される。
In this case, a bit manipulation instruction is fetched by the instruction fetch stage 31 and decoded by the instruction decode stage 32, and an execution address of processing data to be bit manipulated by the address generation stage 33 is generated from the instruction. Memory read stage 3 at this execution address
4, the processing data is read from the data memory 201, and the processing data is bit-operated in accordance with the instruction decoded by the bit operation stage 35. The bit-processed processing data is stored in the memory write stage 3
At 6, the data is returned to the memory read stage 34, and is stored again in the data memory corresponding to the execution address.

【0060】本実施の形態のデータ処理装置200のデ
ータ処理方法は、上述のように“命令フェッチ,命
令デコード,アドレス生成,データリード,ビッ
ト操作,データライト”なる六段のデータ処理で形成
されており、第四段目のデータリードでデータメモリか
ら読み出された処理データは第五段目のビット操作でビ
ット操作されてから第六段目のデータライトでデータメ
モリに格納される。
The data processing method of the data processing device 200 according to the present embodiment is formed by the six-stage data processing of “instruction fetch, instruction decode, address generation, data read, bit manipulation, data write” as described above. The processed data read from the data memory by the fourth-stage data read is bit-operated by the fifth-stage bit operation, and then stored in the data memory by the sixth-stage data write.

【0061】このため、ビット操作のデータ処理を実行
するために入力する命令が一つで良いので、プログラム
の容量を削減して作成の負担を軽減することができ、従
来は9クロックほど必要であったビット操作のデータ処
理を6クロックで完了することができるので、データ処
理の速度を向上させることができる。
For this reason, since only one instruction is required to execute the data processing of the bit operation, it is possible to reduce the capacity of the program to reduce the load of creation. Since the data processing of the bit operation can be completed in six clocks, the data processing speed can be improved.

【0062】ただし、本実施の形態のデータ処理装置2
00のデータ処理方法でも、第四段目のデータリードと
第六段目のデータライトとで1個のデータメモリ201
にアクセスするので、第四段目のデータリードを開始し
てから第六段目のデータライトを完了するまでは、後続
のデータ処理でデータメモリ201の同一のアドレスに
アクセスすることは好ましくない。つまり、ビット操作
の後続のデータ処理でデータメモリ201にアクセスす
る場合、そのデータ処理を一時停止させる必要が発生す
ることがあるが、このデータ処理の一時停止は最大でも
2クロックで良い。
However, the data processing device 2 of the present embodiment
Also in the data processing method of No. 00, one data memory 201 is used for the fourth stage data read and the sixth stage data write.
Therefore, it is not preferable to access the same address of the data memory 201 in the subsequent data processing from the start of the fourth-stage data read until the completion of the sixth-stage data write. That is, when accessing the data memory 201 in the data processing subsequent to the bit operation, it may be necessary to temporarily stop the data processing. However, the data processing may be temporarily stopped at a maximum of two clocks.

【0063】例えば、図5(a)に示すように、ビット操
作の後続のデータ処理の第一段目でデータメモリ201
にアクセスするとしても、そのアドレスがビット操作と
は相違して第二段目でメモリアクセスしないならば、デ
ータ処理を一時停止させる必要はなく、従来は13クロ
ックほど必要であった二つのデータ処理を10クロック
で完了することができる。
For example, as shown in FIG. 5 (a), the data memory 201
If the address does not access the memory at the second stage unlike the bit operation, there is no need to suspend the data processing. Can be completed in 10 clocks.

【0064】もしも、図5(b)に示すように、ビット操
作の後続のデータ処理の第一段目でメモリアクセスがな
く第二段目でデータメモリ201の同一のアドレスにア
クセスするならば、そのデータ処理を1クロックだけ停
止させれば良いので二つのデータ処理を11クロックで
完了することができる。
As shown in FIG. 5B, if there is no memory access at the first stage of the data processing subsequent to the bit operation and the same address of the data memory 201 is accessed at the second stage, Since the data processing only needs to be stopped for one clock, two data processings can be completed in 11 clocks.

【0065】そして、図5(c)に示すように、ビット操
作の後続のデータ処理の第一段目でデータメモリ201
の同一のアドレスにアクセスするならば、そのデータ処
理を2クロックまで停止させることになるが、それでも
二つのデータ処理を12クロックで完了することができ
るので、従来の13クロックよりは迅速にデータ処理を
終了できることになる。
Then, as shown in FIG. 5C, in the first stage of the data processing subsequent to the bit operation, the data memory 201
If the same address is accessed, the data processing is stopped up to 2 clocks. However, since the two data processings can be completed in 12 clocks, the data processing can be completed more quickly than the conventional 13 clocks. Can be terminated.

【0066】つまり、本実施の形態のデータ処理装置2
00のデータ処理方法では、ビット操作を一つの命令で
実行させることができるので、プログラムの容量を削減
して作成の負担を軽減するとともにデータ処理の速度を
向上させることができ、後続のデータ処理でデータメモ
リ201にアクセスする場合でも、従来装置の方法より
迅速にデータ処理を完了することができる。
That is, the data processing device 2 of the present embodiment
In the data processing method of No. 00, the bit operation can be executed by one instruction, so that the capacity of the program can be reduced, the burden of creation can be reduced, and the speed of data processing can be improved. Thus, even when accessing the data memory 201, the data processing can be completed more quickly than the method of the conventional device.

【0067】なお、本発明は上記形態に限定されるもの
ではなく、その要旨を逸脱しない範囲で各種の変形を許
容する。例えば、上記形態ではデータ処理装置200が
別体のデータメモリ201とマイクロプロセッサ202
とで形成されていることを例示したが、これらが一体化
されたデータ処理装置(図示せず)なども実施可能であ
る。また、マイクロプロセッサ202にインストラクシ
ョンメモリ42が一体化されていることを例示したが、
これが別体とされたデータ処理装置(図示せず)なども
実施可能である。
The present invention is not limited to the above-described embodiment, but allows various modifications without departing from the gist of the present invention. For example, in the above-described embodiment, the data processing device 200 includes the separate data memory 201 and the microprocessor 202.
Although it is illustrated that they are formed by, for example, a data processing device (not shown) in which these are integrated can also be implemented. In addition, although the instruction memory 42 is illustrated as being integrated with the microprocessor 202,
It is also possible to implement a data processing device (not shown) in which this is separated.

【0068】また、上記形態では32ビットの処理デー
タの全部のビットにビット操作を実行できるようにする
ため、図3に示すように、ビット操作の命令のフォーマ
ットとしてビット操作の実行位置を設定する“bit#”を
5ビットとすることを例示した。しかし、ビット操作が
32ビットの処理データの特定の8ビットしか必要でな
いような場合もあり、このような場合には、図6に示す
ように、ビット操作の実行位置を設定する“bit#”を3
ビットとすることが可能である。この場合、命令の命令
コードに2ビットの余裕が発生するので、例えば、これ
をセット/クリア/反転などのビット操作の種類を設定
する専用の“func”とし、ビット操作の種類を示す信号
の生成を容易とすることができる。
In the above embodiment, the bit operation execution position is set as a bit operation instruction format as shown in FIG. 3 so that the bit operation can be performed on all the bits of the 32-bit processing data. It has been exemplified that “bit #” is set to 5 bits. However, there is a case where the bit operation requires only a specific 8 bits of the 32-bit processing data. In such a case, as shown in FIG. 6, "bit #" which sets the execution position of the bit operation is set. 3
It can be a bit. In this case, there is a 2-bit margin in the instruction code of the instruction. For example, the instruction code is set to “func” dedicated to setting the type of bit operation such as set / clear / inversion, and the signal indicating the type of bit operation is Generation can be facilitated.

【0069】さらに、上記形態のデータ処理装置200
ではビット操作する処理データを記憶する媒体が1個の
データメモリ201であることを例示したが、図7に示
すように、データメモリ201とは別個にビット操作す
る処理データを記憶するデータ記憶手段としてSFR
(Special Function Registers)71を設けてデー
タ処理装置300を形成することも可能である。
Further, the data processing apparatus 200 of the above embodiment
Although the example in which the medium for storing the processing data to be bit-operated is one data memory 201, as shown in FIG. 7, the data storage means for storing the processing data to be bit-operated separately from the data memory 201 As SFR
(Special Function Registers) 71 may be provided to form the data processing apparatus 300.

【0070】より詳細には、このデータ処理装置300
もデータメモリ201とマイクロプロセッサ301から
なり、このマイクロプロセッサ301のメモリリードス
テージ34にSFR71がデータメモリ201と並列に
設けられている。SFR71は、データメモリ201と
同様に入力端子にマルチプレクサ72,73を介してア
ドレス生成ステージ33とメモリライトステージ36と
が接続されており、SFR71とデータメモリ201と
の出力端子はビットオペレートステージ35のマルチプ
レクサ74を介してビット操作器54に接続されてい
る。
More specifically, the data processing device 300
The microprocessor 301 also includes a data memory 201 and a microprocessor 301, and an SFR 71 is provided in a memory read stage 34 of the microprocessor 301 in parallel with the data memory 201. The SFR 71 has an input terminal connected to the address generation stage 33 and the memory write stage 36 via multiplexers 72 and 73 in the same manner as the data memory 201. The output terminals of the SFR 71 and the data memory 201 are connected to the bit operation stage 35. It is connected to the bit operator 54 via a multiplexer 74.

【0071】上述のような構成のデータ処理装置300
は、データメモリ201とSFR71との一方の処理デ
ータを選択的にビット操作することができる。ただし、
このビット操作でデータメモリ201とSFR71との
一方を利用し、後続するデータ処理で他方を利用するな
らば、この後続するデータ処理に一時停止は必要ないの
で、連続する二つのデータ処理を迅速に完了することが
できる。
The data processing apparatus 300 having the above configuration
Can selectively perform bit operation on one of the processing data of the data memory 201 and the SFR 71. However,
If one of the data memory 201 and the SFR 71 is used in this bit operation and the other is used in the subsequent data processing, there is no need to temporarily stop the subsequent data processing. Can be completed.

【0072】なお、上述のデータ処理装置300では、
SFR71を具備したマイクロプロセッサ301とデー
タメモリ201とが別体であることを例示したが、この
ようにSFR71を具備したマイクロプロセッサ301
とデータメモリ201とを一体化してデータ処理装置を
形成することも可能である。
In the data processing device 300 described above,
Although the microprocessor 301 having the SFR 71 and the data memory 201 are illustrated as being separate from each other, the microprocessor 301 having the SFR 71 is
And the data memory 201 may be integrated to form a data processing device.

【0073】[0073]

【発明の効果】本発明は以上説明したように構成されて
いるので、以下に記載するような効果を奏する。
Since the present invention is configured as described above, it has the following effects.

【0074】請求項1記載の発明のデータ処理装置は、
各種の処理データを更新自在に一時記憶する別体のデー
タメモリにビット操作の命令に対応してアクセスし、該
データメモリから処理データを読み出してビット操作し
てから再度格納するデータ処理装置において、少なくと
もビット操作の命令の入力を受け付ける命令フェッチ手
段と、該命令フェッチ手段に入力された命令をデコード
する命令デコード手段と、該命令デコード手段でデコー
ドされた命令からビット操作する処理データの実行アド
レスを生成するアドレス生成手段と、該アドレス生成手
段により生成された実行アドレスで前記データメモリか
ら処理データを読み出すデータ読出手段と、該データ読
出手段で読み出された処理データに前記命令デコード手
段でデコードされた命令のビット操作を実行するビット
操作手段と、該ビット操作手段でビット操作された処理
データを前記アドレス生成手段により生成された実行ア
ドレスで前記データメモリに格納するデータ格納手段
と、を具備していることにより、ビット操作に対して入
力する命令が一つで良いので、プログラムの容量を削減
して作成の負担を軽減することができ、ビット操作のデ
ータ処理を6クロックで完了することができ、後続する
データ処理がデータメモリにアクセスする場合でも、そ
の一時停止が最大で2クロックなので、処理速度を向上
させることができる。
The data processing apparatus according to the first aspect of the present invention
In a data processing device that accesses a separate data memory that temporarily stores various processing data in an updatable manner in accordance with a bit operation instruction, reads processing data from the data memory, performs bit operation on the data, and stores the data again, An instruction fetch unit for receiving at least an input of an instruction for bit operation, an instruction decoding unit for decoding an instruction input to the instruction fetch unit, and an execution address of processing data for performing bit operation on the instruction decoded by the instruction decoding unit. Address generating means for generating, data reading means for reading processing data from the data memory at the execution address generated by the address generating means, and processing data read by the data reading means, decoded by the instruction decoding means. Bit operation means for executing a bit operation of an instruction Data storage means for storing the processed data bit-operated by the port operation means in the data memory at the execution address generated by the address generation means, so that an instruction to be input for the bit operation is provided. Since only one is necessary, the load of creation can be reduced by reducing the capacity of the program, the data processing of the bit operation can be completed in 6 clocks, and even if the subsequent data processing accesses the data memory. Since the suspension is performed at a maximum of two clocks, the processing speed can be improved.

【0075】請求項2記載の発明のデータ処理装置は、
各種の処理データを更新自在に一時記憶するデータメモ
リと、少なくともビット操作の命令の入力を受け付ける
命令フェッチ手段と、該命令フェッチ手段に入力された
命令をデコードする命令デコード手段と、該命令デコー
ド手段でデコードされた命令からビット操作する処理デ
ータの実行アドレスを生成するアドレス生成手段と、該
アドレス生成手段により生成された実行アドレスで前記
データメモリから処理データを読み出すデータ読出手段
と、該データ読出手段で読み出された処理データに前記
命令デコード手段でデコードされた命令のビット操作を
実行するビット操作手段と、該ビット操作手段でビット
操作された処理データを前記アドレス生成手段により生
成された実行アドレスで前記データメモリに格納するデ
ータ格納手段と、を具備していることにより、ビット操
作に対して入力する命令が一つで良いので、プログラム
の容量を削減して作成の負担を軽減することができ、ビ
ット操作のデータ処理を6クロックで完了することがで
き、後続するデータ処理がデータメモリにアクセスする
場合でも、その一時停止が最大で2クロックなので、処
理速度を向上させることができる。
The data processing apparatus according to the second aspect of the present invention
A data memory for temporarily storing various types of processing data in an updatable manner, an instruction fetch unit for receiving at least an input of a bit operation instruction, an instruction decode unit for decoding an instruction input to the instruction fetch unit, and the instruction decode unit Address generation means for generating an execution address of processing data to be bit-operated from the instruction decoded in step 1, data reading means for reading processing data from the data memory with the execution address generated by the address generation means, and data reading means A bit operating means for performing a bit operation of the instruction decoded by the instruction decoding means on the processing data read out by the instruction decoding means; and an execution address generated by the address generating means by processing the bit data processed by the bit operating means. A data storage means for storing the data in the data memory, With the provision, only one instruction is input for the bit operation, so that it is possible to reduce the capacity of the program and the burden of creation, and complete the data processing of the bit operation in six clocks. Even if the subsequent data processing accesses the data memory, the suspension is performed at a maximum of two clocks, so that the processing speed can be improved.

【0076】請求項3記載の発明のデータ処理装置は、
各種の処理データを更新自在に一時記憶する別体のデー
タメモリにビット操作の命令に対応してアクセスし、該
データメモリから処理データを読み出してビット操作し
てから再度格納するデータ処理装置において、前記デー
タメモリとは別個に各種の処理データを更新自在に一時
記憶するデータ記憶手段と、少なくともビット操作の命
令の入力を受け付ける命令フェッチ手段と、該命令フェ
ッチ手段に入力された命令をデコードする命令デコード
手段と、該命令デコード手段でデコードされた命令から
ビット操作する処理データの実行アドレスを生成するア
ドレス生成手段と、該アドレス生成手段により生成され
た実行アドレスで前記データメモリと前記データ記憶手
段との一方から処理データを読み出すデータ読出手段
と、該データ読出手段で読み出された処理データに前記
命令デコード手段でデコードされた命令のビット操作を
実行するビット操作手段と、該ビット操作手段でビット
操作された処理データを前記アドレス生成手段により生
成された実行アドレスで前記データメモリと前記データ
記憶手段との一方に格納するデータ格納手段と、を具備
していることにより、ビット操作に対して入力する命令
が一つで良いので、プログラムの容量を削減して作成の
負担を軽減することができ、ビット操作のデータ処理を
6クロックで完了することができ、後続するデータ処理
がデータメモリにアクセスする場合でも一時停止は最大
で2クロックで良く、データメモリとデータ記憶手段と
の一方をビット操作に利用して他方を後続のデータ処理
に利用するならば、この後続のデータ処理を一時停止す
る必要はないので、処理速度を向上させることができ
る。
The data processing apparatus according to the third aspect of the present invention
In a data processing device that accesses a separate data memory that temporarily stores various processing data in an updatable manner in accordance with a bit operation instruction, reads processing data from the data memory, performs bit operation on the data, and stores the data again, A data storage unit for temporarily storing various processing data in an updatable manner separately from the data memory; an instruction fetch unit for receiving at least an input of a bit operation instruction; and an instruction for decoding an instruction input to the instruction fetch unit Decoding means; address generation means for generating an execution address of processing data for performing bit operation from the instruction decoded by the instruction decoding means; and the data memory and the data storage means using the execution address generated by the address generation means. Data reading means for reading processing data from one of the A bit operating means for performing a bit operation of the instruction decoded by the instruction decoding means on the processing data read out by the instruction decoding means; and an execution address generated by the address generating means by the processing data bit-operated by the bit operating means. With the provision of the data memory and the data storage means for storing the data in one of the data storage means, only one command to be input for the bit operation is required, so that the capacity of the program can be reduced. The burden of creation can be reduced, the data processing of the bit operation can be completed in 6 clocks, and even if the subsequent data processing accesses the data memory, the pause can be at most 2 clocks. If one of the data storage means is used for bit manipulation and the other is used for subsequent data processing, There is no need to pause the sense, it is possible to improve the processing speed.

【0077】請求項4記載の発明のデータ処理装置は、
各種の処理データを更新自在に一時記憶するデータメモ
リと、該データメモリとは別個に各種の処理データを更
新自在に一時記憶するデータ記憶手段と、少なくともビ
ット操作の命令の入力を受け付ける命令フェッチ手段
と、該命令フェッチ手段に入力された命令をデコードす
る命令デコード手段と、該命令デコード手段でデコード
された命令からビット操作する処理データの実行アドレ
スを生成するアドレス生成手段と、該アドレス生成手段
により生成された実行アドレスで前記データメモリと前
記データ記憶手段との一方から処理データを読み出すデ
ータ読出手段と、該データ読出手段で読み出された処理
データに前記命令デコード手段でデコードされた命令の
ビット操作を実行するビット操作手段と、該ビット操作
手段でビット操作された処理データを前記アドレス生成
手段により生成された実行アドレスで前記データメモリ
と前記データ記憶手段との一方に格納するデータ格納手
段と、を具備していることにより、ビット操作に対して
入力する命令が一つで良いので、プログラムの容量を削
減して作成の負担を軽減することができ、ビット操作の
データ処理を6クロックで完了することができ、後続す
るデータ処理がデータメモリにアクセスする場合でも一
時停止は最大で2クロックで良く、データメモリとデー
タ記憶手段との一方をビット操作に利用して他方を後続
のデータ処理に利用するならば、この後続のデータ処理
を一時停止する必要はないので、処理速度を向上させる
ことができる。
According to a fourth aspect of the present invention, there is provided a data processing apparatus comprising:
A data memory for temporarily storing various processing data in an updatable manner; a data storage means for temporarily storing various processing data in an updatable manner separately from the data memory; and an instruction fetch means for receiving at least an input of a bit manipulation instruction Instruction decoding means for decoding an instruction input to the instruction fetch means; address generation means for generating an execution address of processing data for performing bit operation from the instruction decoded by the instruction decoding means; Data reading means for reading processing data from one of the data memory and the data storage means with the generated execution address; and bits of an instruction decoded by the instruction decoding means into processing data read by the data reading means. Bit operation means for performing an operation, and bit operation performed by the bit operation means. And a data storage unit for storing the processed data in one of the data memory and the data storage unit at an execution address generated by the address generation unit. In the case where only one is necessary, the capacity of the program can be reduced and the burden of creation can be reduced, the data processing of the bit operation can be completed in 6 clocks, and the subsequent data processing accesses the data memory. However, the suspension can be performed at a maximum of two clocks. If one of the data memory and the data storage means is used for bit operation and the other is used for subsequent data processing, it is not necessary to suspend the subsequent data processing. Since there is no processing speed, the processing speed can be improved.

【0078】請求項5記載の発明のデータ処理方法は、
各種の処理データを更新自在に一時記憶するデータメモ
リにビット操作の命令に対応してアクセスし、該データ
メモリから処理データを読み出してビット操作してから
再度格納するデータ処理方法において、少なくともビッ
ト操作の命令の入力を受け付け、この入力された命令を
デコードし、このデコードされた命令からビット操作す
る処理データの実行アドレスを生成し、この生成された
実行アドレスで前記データメモリから処理データを読み
出し、この読み出された処理データにデコードされた命
令のビット操作を実行し、このビット操作された処理デ
ータを生成された実行アドレスで前記データメモリに格
納するようにしたことにより、ビット操作に対して入力
する命令が一つで良いので、プログラムの容量を削減し
て作成の負担を軽減することができ、ビット操作のデー
タ処理を6クロックで完了することができ、後続するデ
ータ処理がデータメモリにアクセスする場合でも、その
一時停止が最大で2クロックなので、処理速度を向上さ
せることができる。
According to a fifth aspect of the present invention, there is provided a data processing method comprising:
In a data processing method of accessing a data memory for temporarily storing various processing data in an updatable manner in accordance with a bit operation instruction, reading processing data from the data memory, performing bit operation, and storing the data again, at least a bit operation is performed. Receives the input of the instruction, decodes the input instruction, generates an execution address of processing data for performing bit operation from the decoded instruction, reads processing data from the data memory with the generated execution address, A bit operation of the decoded instruction is performed on the read processing data, and the bit-processed processing data is stored in the data memory at the generated execution address. Since only one instruction needs to be input, it is possible to reduce the capacity of the program and reduce the burden of creation. The data processing of the bit operation can be completed in 6 clocks, and even if the subsequent data processing accesses the data memory, the pause is up to 2 clocks, so that the processing speed can be improved. it can.

【0079】請求項6記載の発明のデータ処理方法は、
各種の処理データを更新自在に一時記憶するデータメモ
リとデータ記憶手段との一方にビット操作の命令に対応
してアクセスし、前記データメモリと前記データ記憶手
段との一方から処理データを読み出してビット操作して
から再度格納するデータ処理方法において、少なくとも
ビット操作の命令の入力を受け付け、この入力された命
令をデコードし、このデコードされた命令からビット操
作する処理データの実行アドレスを生成し、この生成さ
れた実行アドレスで前記データメモリと前記データ記憶
手段との一方から処理データを読み出し、この読み出さ
れた処理データにデコードされた命令のビット操作を実
行し、このビット操作された処理データを生成された実
行アドレスで前記データメモリと前記データ記憶手段と
の一方に格納するようにしたことにより、ビット操作に
対して入力する命令が一つで良いので、プログラムの容
量を削減して作成の負担を軽減することができ、ビット
操作のデータ処理を6クロックで完了することができ、
後続するデータ処理がデータメモリにアクセスする場合
でも、その一時停止が最大で2クロックなので、処理速
度を向上させることができる。
According to a sixth aspect of the present invention, there is provided a data processing method comprising:
One of a data memory and a data storage means for temporarily storing various processing data in an updatable manner is accessed in response to a bit manipulation instruction, and processing data is read out from one of the data memory and the data storage means to read a bit. In the data processing method of storing data after operation, at least receiving an input of an instruction for bit operation, decoding the input instruction, generating an execution address of processing data for bit operation from the decoded instruction, The processing data is read from one of the data memory and the data storage means at the generated execution address, and a bit operation of a decoded instruction is performed on the read processing data. The generated execution address is stored in one of the data memory and the data storage unit. With this configuration, since only one instruction needs to be input for the bit operation, it is possible to reduce the program capacity by reducing the program capacity and complete the bit operation data processing in six clocks. Can,
Even when subsequent data processing accesses the data memory, the processing speed can be improved because the suspension is performed at a maximum of two clocks.

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

【図1】本発明の実施の一形態のデータ処理装置のハー
ドウェアをパイプラインの処理手順に対応して表現した
模式的なブロック図である。
FIG. 1 is a schematic block diagram illustrating hardware of a data processing device according to an embodiment of the present invention in correspondence with a processing procedure of a pipeline.

【図2】ビット操作器の内部構造を示すブロック図であ
る。
FIG. 2 is a block diagram showing an internal structure of a bit operator.

【図3】ビット操作の命令コードのフォーマットを示す
模式図である。
FIG. 3 is a schematic diagram showing a format of an instruction code of a bit operation.

【図4】各種のビット操作のニモニックコードを示す模
式図である。
FIG. 4 is a schematic diagram showing mnemonic codes for various bit operations.

【図5】二つの命令のパイプライン処理の処理手順を示
す模式的なタイムチャートである。
FIG. 5 is a schematic time chart showing a processing procedure of pipeline processing of two instructions.

【図6】ビット操作の命令コードのフォーマットの一変
形例を示す模式図である。
FIG. 6 is a schematic diagram showing a modification of the format of a bit operation instruction code.

【図7】一変形例のデータ処理装置のハードウェアをパ
イプラインの処理手順に対応して表現した模式的なブロ
ック図である。
FIG. 7 is a schematic block diagram illustrating hardware of a data processing device according to a modified example in correspondence with a processing procedure of a pipeline.

【図8】一従来例のデータ処理装置のハードウェアをパ
イプラインの処理手順に対応して表現した模式的なブロ
ック図である。
FIG. 8 is a schematic block diagram illustrating hardware of a data processing device of a conventional example in correspondence with a processing procedure of a pipeline.

【図9】各種の命令の命令コードのフォーマットを示す
模式図である。
FIG. 9 is a schematic diagram showing the format of instruction codes of various instructions.

【図10】各種のビット操作のニモニックコードを示す
模式図である。
FIG. 10 is a schematic diagram showing mnemonic codes for various bit operations.

【図11】二つの命令のパイプライン処理の処理手順を
示す模式的なタイムチャートである。
FIG. 11 is a schematic time chart showing a processing procedure of pipeline processing of two instructions.

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

31 命令フェッチ手段に相当する命令フェッチステ
ージ 32 命令デコード手段に相当する命令デコードステ
ージ 33 アドレス生成手段に相当するアドレス生成ステ
ージ 34 データ読出手段に相当するメモリリードステー
ジ 35 ビット操作手段に相当するビットオペレートス
テージ 36 データ格納手段に相当するメモリライトステー
ジ 71 データ記憶手段であるSFR 200,300 データ処理装置 201 データメモリ
31 instruction fetch stage corresponding to instruction fetch means 32 instruction decode stage corresponding to instruction decode means 33 address generation stage corresponding to address generation means 34 memory read stage corresponding to data read means 35 bit operation stage corresponding to bit operation means 36 Memory write stage corresponding to data storage means 71 SFR 200, 300 as data storage means Data processing device 201 Data memory

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 各種の処理データを更新自在に一時記憶
する別体のデータメモリにビット操作の命令に対応して
アクセスし、該データメモリから処理データを読み出し
てビット操作してから再度格納するデータ処理装置にお
いて、 少なくともビット操作の命令の入力を受け付ける命令フ
ェッチ手段と、 該命令フェッチ手段に入力された命令をデコードする命
令デコード手段と、 該命令デコード手段でデコードされた命令からビット操
作する処理データの実行アドレスを生成するアドレス生
成手段と、 該アドレス生成手段により生成された実行アドレスで前
記データメモリから処理データを読み出すデータ読出手
段と、 該データ読出手段で読み出された処理データに前記命令
デコード手段でデコードされた命令のビット操作を実行
するビット操作手段と、 該ビット操作手段でビット操作された処理データを前記
アドレス生成手段により生成された実行アドレスで前記
データメモリに格納するデータ格納手段と、を具備して
いることを特徴とするデータ処理装置。
1. Accessing a separate data memory for temporarily storing various processing data in an updatable manner in response to a bit manipulation instruction, reading the processing data from the data memory, performing bit manipulation, and storing again. In a data processing device, an instruction fetch unit that receives at least an input of an instruction for bit operation, an instruction decode unit that decodes an instruction input to the instruction fetch unit, and a process that performs a bit operation on the instruction decoded by the instruction decode unit Address generation means for generating an execution address of data; data reading means for reading processing data from the data memory with the execution address generated by the address generation means; and an instruction for processing data read by the data reading means. A bit for performing a bit operation on the instruction decoded by the decoding means Data processing means for storing processing data bit-operated by the bit operating means in the data memory at an execution address generated by the address generating means. apparatus.
【請求項2】 各種の処理データを更新自在に一時記憶
するデータメモリと、 少なくともビット操作の命令の入力を受け付ける命令フ
ェッチ手段と、 該命令フェッチ手段に入力された命令をデコードする命
令デコード手段と、 該命令デコード手段でデコードされた命令からビット操
作する処理データの実行アドレスを生成するアドレス生
成手段と、 該アドレス生成手段により生成された実行アドレスで前
記データメモリから処理データを読み出すデータ読出手
段と、 該データ読出手段で読み出された処理データに前記命令
デコード手段でデコードされた命令のビット操作を実行
するビット操作手段と、 該ビット操作手段でビット操作された処理データを前記
アドレス生成手段により生成された実行アドレスで前記
データメモリに格納するデータ格納手段と、を具備して
いるデータ処理装置。
2. A data memory for temporarily storing various processing data in an updatable manner, an instruction fetch means for receiving at least an input of a bit operation instruction, and an instruction decoding means for decoding an instruction input to the instruction fetch means. Address generation means for generating an execution address of processing data to be bit-operated from the instruction decoded by the instruction decoding means; data reading means for reading processing data from the data memory with the execution address generated by the address generation means; Bit operation means for executing bit operation of an instruction decoded by the instruction decoding means on the processing data read by the data reading means; and processing the bit data operated by the bit operation means by the address generation means. The data to be stored in the data memory with the generated execution address And a data storage unit.
【請求項3】 各種の処理データを更新自在に一時記憶
する別体のデータメモリにビット操作の命令に対応して
アクセスし、該データメモリから処理データを読み出し
てビット操作してから再度格納するデータ処理装置にお
いて、 前記データメモリとは別個に各種の処理データを更新自
在に一時記憶するデータ記憶手段と、 少なくともビット操作の命令の入力を受け付ける命令フ
ェッチ手段と、 該命令フェッチ手段に入力された命令をデコードする命
令デコード手段と、 該命令デコード手段でデコードされた命令からビット操
作する処理データの実行アドレスを生成するアドレス生
成手段と、 該アドレス生成手段により生成された実行アドレスで前
記データメモリと前記データ記憶手段との一方から処理
データを読み出すデータ読出手段と、 該データ読出手段で読み出された処理データに前記命令
デコード手段でデコードされた命令のビット操作を実行
するビット操作手段と、 該ビット操作手段でビット操作された処理データを前記
アドレス生成手段により生成された実行アドレスで前記
データメモリと前記データ記憶手段との一方に格納する
データ格納手段と、を具備していることを特徴とするデ
ータ処理装置。
3. Accessing a separate data memory for temporarily storing various processing data in an updatable manner in accordance with a bit manipulation instruction, reading the processing data from the data memory, performing bit manipulation, and then storing the data again. In the data processing apparatus, data storage means for temporarily storing various processing data in an updatable manner separately from the data memory; instruction fetch means for receiving at least an input of a bit manipulation instruction; and input to the instruction fetch means. Instruction decoding means for decoding an instruction; address generation means for generating an execution address of processing data to be bit-operated from the instruction decoded by the instruction decoding means; and an execution address generated by the address generation means; Data reading means for reading processing data from one of the data storage means; Bit operation means for performing bit operation of an instruction decoded by the instruction decoding means on the processing data read by the data reading means; and processing data bit-operated by the bit operation means generated by the address generation means A data storage unit for storing the execution address in one of the data memory and the data storage unit.
【請求項4】 各種の処理データを更新自在に一時記憶
するデータメモリと、 該データメモリとは別個に各種の処理データを更新自在
に一時記憶するデータ記憶手段と、 少なくともビット操作の命令の入力を受け付ける命令フ
ェッチ手段と、 該命令フェッチ手段に入力された命令をデコードする命
令デコード手段と、 該命令デコード手段でデコードされた命令からビット操
作する処理データの実行アドレスを生成するアドレス生
成手段と、 該アドレス生成手段により生成された実行アドレスで前
記データメモリと前記データ記憶手段との一方から処理
データを読み出すデータ読出手段と、 該データ読出手段で読み出された処理データに前記命令
デコード手段でデコードされた命令のビット操作を実行
するビット操作手段と、 該ビット操作手段でビット操作された処理データを前記
アドレス生成手段により生成された実行アドレスで前記
データメモリと前記データ記憶手段との一方に格納する
データ格納手段と、を具備しているデータ処理装置。
4. A data memory for temporarily storing various processing data in an updatable manner, a data storage means for temporarily storing various processing data in an updatable manner separately from the data memory, and inputting at least a bit operation instruction. Instruction fetch means for receiving an instruction, instruction decode means for decoding an instruction input to the instruction fetch means, address generation means for generating an execution address of processing data for performing bit operation from the instruction decoded by the instruction decode means, Data reading means for reading processing data from one of the data memory and the data storage means with the execution address generated by the address generating means; and decoding the processing data read by the data reading means with the instruction decoding means. Bit operation means for performing a bit operation of the executed instruction, and the bit operation Data storage means and, in that the data processing apparatus comprising a storing processing data bit manipulation in stage one of said data storage means and the data memory in the generated execution address by the address generating means.
【請求項5】 各種の処理データを更新自在に一時記憶
するデータメモリにビット操作の命令に対応してアクセ
スし、該データメモリから処理データを読み出してビッ
ト操作してから再度格納するデータ処理方法において、 少なくともビット操作の命令の入力を受け付け、 この入力された命令をデコードし、 このデコードされた命令からビット操作する処理データ
の実行アドレスを生成し、 この生成された実行アドレスで前記データメモリから処
理データを読み出し、 この読み出された処理データにデコードされた命令のビ
ット操作を実行し、 このビット操作された処理データを生成された実行アド
レスで前記データメモリに格納するようにしたことを特
徴とするデータ処理方法。
5. A data processing method for accessing a data memory for temporarily storing various processing data in an updatable manner in accordance with a bit manipulation instruction, reading the processing data from the data memory, performing bit manipulation, and then storing the data again. Receiving at least an input of a bit operation instruction, decoding the input instruction, generating an execution address of processing data for performing bit operation from the decoded instruction, and using the generated execution address from the data memory. Processing data is read, a bit operation of an instruction decoded into the read processing data is performed, and the bit-processed processing data is stored in the data memory at a generated execution address. Data processing method.
【請求項6】 各種の処理データを更新自在に一時記憶
するデータメモリとデータ記憶手段との一方にビット操
作の命令に対応してアクセスし、前記データメモリと前
記データ記憶手段との一方から処理データを読み出して
ビット操作してから再度格納するデータ処理方法におい
て、 少なくともビット操作の命令の入力を受け付け、 この入力された命令をデコードし、 このデコードされた命令からビット操作する処理データ
の実行アドレスを生成し、 この生成された実行アドレスで前記データメモリと前記
データ記憶手段との一方から処理データを読み出し、 この読み出された処理データにデコードされた命令のビ
ット操作を実行し、 このビット操作された処理データを生成された実行アド
レスで前記データメモリと前記データ記憶手段との一方
に格納するようにしたことを特徴とするデータ処理方
法。
6. Accessing one of a data memory and a data storage means for temporarily storing various kinds of processing data in an updatable manner in response to a bit manipulation instruction, and performing processing from one of the data memory and the data storage means. In a data processing method for reading data, performing bit manipulation, and then storing the data again, at least receiving an input of a bit manipulation instruction, decoding the input instruction, and executing an execution address of processing data for performing bit manipulation from the decoded instruction The processing data is read from one of the data memory and the data storage means at the generated execution address, and a bit operation of a decoded instruction is performed on the read processing data. The data memory and the data storage means at the execution address at which the processed data is generated. A data processing method characterized in that the data is stored in one of the following.
JP9277561A 1997-10-09 1997-10-09 Data processing method Expired - Fee Related JP3019818B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9277561A JP3019818B2 (en) 1997-10-09 1997-10-09 Data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9277561A JP3019818B2 (en) 1997-10-09 1997-10-09 Data processing method

Publications (2)

Publication Number Publication Date
JPH11119995A true JPH11119995A (en) 1999-04-30
JP3019818B2 JP3019818B2 (en) 2000-03-13

Family

ID=17585240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9277561A Expired - Fee Related JP3019818B2 (en) 1997-10-09 1997-10-09 Data processing method

Country Status (1)

Country Link
JP (1) JP3019818B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002342073A (en) * 2001-05-21 2002-11-29 Hitachi Ltd Data processor
JP2012123719A (en) * 2010-12-10 2012-06-28 Hitachi Ltd Programmable controller

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002342073A (en) * 2001-05-21 2002-11-29 Hitachi Ltd Data processor
JP2012123719A (en) * 2010-12-10 2012-06-28 Hitachi Ltd Programmable controller
CN103262029A (en) * 2010-12-10 2013-08-21 株式会社日立制作所 Programmable controller

Also Published As

Publication number Publication date
JP3019818B2 (en) 2000-03-13

Similar Documents

Publication Publication Date Title
JP3592230B2 (en) Data processing device
TWI541658B (en) Data processing apparatus and semiconductor integrated circuit device
US20050289321A1 (en) Microprocessor architecture having extendible logic
JPH0719215B2 (en) Microprocessor
JP2003085000A (en) Trace information production device and its method
JPH1091443A (en) Information processing circuit, microcomputer and electronic equipment
JP2507638B2 (en) Data processing device
JP2581236B2 (en) Data processing device
JP3781519B2 (en) Instruction control mechanism of processor
JP2001504959A (en) 8-bit microcontroller with RISC architecture
JP3212213B2 (en) Data processing device
JPH0391029A (en) Data processor
EP1499956B1 (en) Method and apparatus for swapping the contents of address registers
JP2556182B2 (en) Data processing device
JP3019818B2 (en) Data processing method
JP2668456B2 (en) Bit search circuit and data processing device having the same
JP3570287B2 (en) Microcomputer
JP2504312B2 (en) Priority encoder and data processing device having the same
JP3511691B2 (en) Arithmetic processing unit
JPH0524537B2 (en)
JPH0377137A (en) Information processor
JP3147884B2 (en) Storage device and information processing device
JPS63293638A (en) Data processing system
JP2696578B2 (en) Data processing device
Chalk et al. Fetching and Executing Instructions

Legal Events

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