JPH0426494B2 - - Google Patents

Info

Publication number
JPH0426494B2
JPH0426494B2 JP1832585A JP1832585A JPH0426494B2 JP H0426494 B2 JPH0426494 B2 JP H0426494B2 JP 1832585 A JP1832585 A JP 1832585A JP 1832585 A JP1832585 A JP 1832585A JP H0426494 B2 JPH0426494 B2 JP H0426494B2
Authority
JP
Japan
Prior art keywords
data
byte
data register
contents
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP1832585A
Other languages
Japanese (ja)
Other versions
JPS61177540A (en
Inventor
Shinichi Okugawa
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1832585A priority Critical patent/JPS61177540A/en
Publication of JPS61177540A publication Critical patent/JPS61177540A/en
Publication of JPH0426494B2 publication Critical patent/JPH0426494B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はマイクロプロセサにおけるストリング
データ制御回路に関し、特にワードバウンダリで
はないバイトストリングデータを処理するための
ストリングデータ制御回路に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a string data control circuit in a microprocessor, and more particularly to a string data control circuit for processing byte string data that is not a word boundary.

(従来の技術) データ処理装置において、複数バイトから成る
ワードを単位としてアクセスすることも可能な外
部記憶装置に格納されているバイトストリングデ
ータを処理する場合には、マイクロプロセサによ
りワード単位の処理を行うためにデータを読出し
ても、ワードバウンダリによつて規定されていな
いデータの時には、1時間に読出した2つのワー
ドデータのバイト位置がずれていることがあるた
め、データの桁合せをやらなければならなかつ
た。しかし、データの桁合せの制御は複雑である
ため、一般に従来はバイト単位でデータアクセス
および処理を行わなければならなかつた。
(Prior Art) In a data processing device, when processing byte string data stored in an external storage device that can be accessed in units of words consisting of multiple bytes, processing is performed in units of words using a microprocessor. Even if the data is read for the purpose of executing the data, if the data is not specified by the word boundary, the byte positions of the two word data read in one hour may be shifted, so the data digits must be aligned. It was impossible. However, since controlling data digit alignment is complicated, conventionally data has generally had to be accessed and processed in byte units.

(発明が解決しようとする問題点) 上に説明したように、従来技術にによればデー
タアクセスおよび演算を1バイトずつ逐次実行す
るため、特に長いデータの時には多くのステツプ
を実行する必要があつて処理速度が遅くなると云
う欠点があつた。
(Problems to be Solved by the Invention) As explained above, according to the prior art, data access and operations are performed sequentially one byte at a time, so many steps need to be executed, especially when the data is long. The disadvantage was that the processing speed was slow.

本発明のの目的は、複数バイトから成るワード
幅でバイト単位のシフトを行い、2つのバイトス
トリングデータのアドレスの下位の一部を格納し
ておき、格納されている情報よりバイトリングシ
フトフアンクシヨンを決定すると共に、バイトス
トリングデータをワード幅で一時格納してからバ
イトリングシフトフアンクシヨンに従つてマージ
することによつて上記欠点を解決し、ワード幅で
演算を実行することができるように構成したスリ
ングデータ制御回路を提供することにある。
The purpose of the present invention is to perform a byte-by-byte shift in a word width consisting of multiple bytes, store a lower part of the address of two byte string data, and then use the stored information to perform a byte-by-byte shift. This problem can be solved by determining the word-width byte string data, temporarily storing the byte string data in word width, and then merging it according to the byte ring shift function, so that operations can be performed in word width. An object of the present invention is to provide a sling data control circuit configured as follows.

(問題点を解決するための手段) 本発明によるストリングデータ制御回路はバイ
トリングシフタと、一対のアドレスレジスタと、
フアンクシヨン決定ブロツクと、第1〜第3のの
データレジスタと、演算ブロツクとを備えて構成
したもである。
(Means for Solving the Problems) A string data control circuit according to the present invention includes a byte ring shifter, a pair of address registers,
It is configured to include a function determining block, first to third data registers, and an arithmetic block.

バイトリングシフタは、複数バイトから成るワ
ード幅でバイト単位のシフトを行うためのもので
ある。
A byte ring shifter is used to perform byte-by-byte shifts in a word width consisting of multiple bytes.

一対のアドレスレジスタは、一対のバイトスト
リングデータの下位アドレスの一部を格納するた
めのものである。
The pair of address registers are for storing part of the lower addresses of the pair of byte string data.

フアンクシヨン決定ブロツクは、一対のアドレ
スレジスタに格納された情報よりバイトリングシ
フタのフアンクシヨンを決定するためのものであ
る。
The function determination block is for determining the function of the byte ring shifter from the information stored in the pair of address registers.

第1のデータレジスタはワード幅に等しい大き
さを有し、バイトストリングデータを一時的に格
納するためのものである。
The first data register has a size equal to the word width and is for temporarily storing byte string data.

第2のデータレジスタは、第1のデータレジス
タの内容をバイトリングシフタでシフトした後、
一時的にその結果を格納するためのものである。
The second data register shifts the contents of the first data register with the byte ring shifter, and then
It is used to temporarily store the results.

第3のデータレジスタは第1のデータレジスタ
の内容をバイトリングシフタでシフトして得た結
果と、第2ののデータレジスタの内容をバイトリ
ングシフタのフアンクシヨンに従つてマージして
得たデータとを格納するためのものである。
The third data register contains the result obtained by shifting the contents of the first data register by the byte ring shifter and the data obtained by merging the contents of the second data register according to the function of the byte ring shifter. It is for storing.

演算ブロツクは、第1および第3のデータレジ
スタの内容をワード幅で演算するためのものであ
る。
The arithmetic block is for word-width arithmetic on the contents of the first and third data registers.

(実施例) 次に、本発明について図面を参照して詳細に説
明する。
(Example) Next, the present invention will be described in detail with reference to the drawings.

第1図は、本発明によるストリングデータ制御
回路の一実施例を示すブロツク図である。第1図
において、1は本発明を適用したマイクロプロセ
サ、2はバイトストリングデータを格納するため
の外部記憶装置、3〜5はそれぞれバイトストリ
ングデータを一時的に格納するための4バイト幅
の第1〜第3のデータレジスタ、6はバイトリン
グシフタ、7はバイトリングシフタ6のフアンク
シヨン決定するためのフアンクシヨンブロツク、
8,9はそれぞれ2つのバイトストリングデータ
の各アドレスの最下位2ビツトを格納するための
アドレスレジスタ、10はバイトストリングデー
タのアドレスを生成するためのアドレス生成ブロ
ツク、11は4バイト幅の演算ブロツク、20は
外部記憶装置2からの4バイト幅のデータバス、
21はアドレス生成ブロツク10によつて生成さ
れたアドレスを外部記憶装置2に与えるためのア
ドレスである。
FIG. 1 is a block diagram showing one embodiment of a string data control circuit according to the present invention. In FIG. 1, 1 is a microprocessor to which the present invention is applied, 2 is an external storage device for storing byte string data, and 3 to 5 are 4-byte wide storage devices for temporarily storing byte string data. 1 to 3rd data registers, 6 a byte ring shifter, 7 a function block for determining the function of the byte ring shifter 6;
8 and 9 are address registers for storing the lowest two bits of each address of two byte string data, 10 is an address generation block for generating the address of the byte string data, and 11 is a 4-byte wide arithmetic block. , 20 is a 4-byte wide data bus from the external storage device 2,
21 is an address for giving the address generated by the address generation block 10 to the external storage device 2.

第2図は、本実施例で使用する2つのバイトス
トリングデータを示す説明図である。第2図に示
すデータは外部記憶装置2に格納されており、
AS1がデータAのアドレス、AS2がデータBの
アドレスを表わし、それぞれ最下位2ビツトは
11,01であつて、A1〜A3,B1〜B3は1時
期にアクセスされる4バイトバウンダリ(4バイ
ト幅)のデータ単位である。
FIG. 2 is an explanatory diagram showing two byte string data used in this embodiment. The data shown in FIG. 2 is stored in the external storage device 2,
AS1 represents the address of data A, AS2 represents the address of data B, and the least significant two bits of each are
11, 01, A1 to A3 and B1 to B3 are 4-byte boundary (4-byte width) data units that are accessed at one time.

第3図は、バイトリングシフタ6のフアンクシ
ヨンの種類と、その動作と、レジスタ8,9に格
納された2つのデータの組合せによりフアンクシ
ヨンをどのように決定するかの方法を示した説明
図である。
FIG. 3 is an explanatory diagram showing the types of functions of the byte ring shifter 6, their operations, and how to determine the functions by a combination of two data stored in the registers 8 and 9. .

第4図は、本実施例において第2図のデータを
処理する過程を示した説明図である。次に、第4
図に従つて本実施例の動作を説明する。第4図に
おいて、フエーズでは第1のデータレジスタ3
に格納されたAS1,AS2の最下位の各2ビツト
11,01よりフアンクシヨン決定ブロツク7によつ
てバイトリングシフタ6のフアンクシヨを第3図
に従つて2バイトエクスチエンジモードに設定
し、バイトリングシフタ6を2バイトのエクスチ
エンジを行うシフタとして動作させる。その後
に、第1のデータレジスタ3にデータAの最初の
4バイトのデータA1を格納し、さらにその内容
をバイトリングシフタ6を通して第2のデータレ
ジスタ4に格納する。
FIG. 4 is an explanatory diagram showing the process of processing the data in FIG. 2 in this embodiment. Next, the fourth
The operation of this embodiment will be explained according to the figures. In FIG. 4, in the phase, the first data register 3
The lowest two bits of AS1 and AS2 stored in
11,01, the function of the bite ring shifter 6 is set to the 2-byte exchange mode according to FIG. 3 by the function determining block 7, and the bite ring shifter 6 is operated as a shifter that performs a 2-byte exchange. Thereafter, the first 4 bytes of data A1 of data A are stored in the first data register 3, and the contents are further stored in the second data register 4 through the byte ring shifter 6.

次に、フエーズでは、データAの次の4バイ
トのデータA2をレジスタ3に格納した後、その
内容をバイトリングシフタ6を通して得たデータ
と、フエーズで第2のデータレジスタ4に格納
したデータとをマージして第3のデータレジスタ
5に格納する。このマージの仕方も、フアンクシ
ヨン決定ブロツクで決定されたフアンクシヨンに
従う。その後、第2のデータレジスタ4にはバイ
トリングシフタ6の出力データを格納しておく。
第3のデータレジスタ5にはデータBに桁合せさ
れたデータAが格納されているため、続いてフエ
ーズで第1のデータレジスタ3にデータBの最
初の4バイトのデータB1を読込むと、演算ブロ
ツク11でそのまま演算を行うことができる。
Next, in the phase, after storing the next 4 bytes of data A2 in the register 3, its contents are combined with the data obtained through the byte ring shifter 6 and the data stored in the second data register 4 in the phase. are merged and stored in the third data register 5. This merging method also follows the function determined by the function determination block. Thereafter, the output data of the bite ring shifter 6 is stored in the second data register 4.
Since the third data register 5 stores data A whose digits are aligned with data B, when the first 4 bytes of data B1 of data B are subsequently read into the first data register 3 in the phase, the calculation is performed. Calculation can be performed directly in block 11.

同様にして、フエーズでデータAの次の4バ
イトのデータA3を読込んで、先に第2のデータ
レジスタ4に格納してあつたデータと共にマージ
して第3のデータレジスタ5に格納すると共に第
2のデータレジスタ4には新しい内容をセツトす
る。続いて、フエーズでデータBの次の4バイ
トのデータB1を読込むと、2回目の演算データ
が第1のデータレジスタ3と第3のデータレジス
タ5とにセツトされ、演算ブロツク11で2回目
の演算を行う。最終回は、フエーズで示すよう
に第2のデータレジスタ4に残つていた最後の1
バイトd1′を第3のデータレジスタ5に転送した
後、フエーズでデータBの最後の4バイトのデ
ータB3を第1のデータレジスタ3に読込んで演
算ブロツク11で最終回ほ演算を行えばよい。
Similarly, the next 4 bytes of data A3 after data A are read in the phase, merged with the data previously stored in the second data register 4, stored in the third data register 5, and stored in the third data register 5. New contents are set in the data register 4 of No. 2. Next, when the next 4 bytes of data B1 after data B are read in the phase, the second operation data is set in the first data register 3 and the third data register 5, and the second operation data is set in the operation block 11. Perform calculations. In the final episode, the last one remaining in the second data register 4 is
After transferring the byte d 1 ' to the third data register 5, the last 4 bytes of data B3 of data B can be read into the first data register 3 in the phase, and the final calculation can be performed in the calculation block 11. .

なお、本実施例では1ワードが4バイトより成
る実施例を説明したが、本発明は4バイトに限ら
れることはなく、1ワードが2バイト、あるは8
バイトより成る場合でも同様の方法で桁合せ、お
よび演算が実行できる。
In this embodiment, one word consists of 4 bytes, but the present invention is not limited to 4 bytes, and one word consists of 2 bytes, or even 8 bytes.
Even if it consists of bytes, digit alignment and operations can be performed in the same way.

(発明の効果) 以上説明したように本発明では、データのアド
レスの下位ビツトの情報を使つてバイトリングシ
フタを操作することにより、ワードバウンダでは
ないデータに対しても容易に、データの桁合せを
行わせることができ、ワード幅での演算を簡単に
実行することができると云う効果がある。
(Effects of the Invention) As explained above, in the present invention, by operating the byte ring shifter using the information of the lower bits of the data address, data digit alignment can be easily performed even for data that is not a word boundary. This has the advantage that word-width operations can be easily executed.

【図面の簡単な説明】 第1図は、本発明によるストリングデータ制御
回路の一実施例を示すブロツク図である。第2図
は、本実施例の2つのバイトストリングデータの
状況を示す説明図である。第3図は、バイトリン
グシフタのフアンクシヨンの種類、その動作、お
よびフアンクシヨンを決定するための条件を示す
説明図である。第4図は、本実施例の動作過程を
示す説明図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing one embodiment of a string data control circuit according to the present invention. FIG. 2 is an explanatory diagram showing the status of two byte string data in this embodiment. FIG. 3 is an explanatory diagram showing the types of functions of the bite ring shifter, their operations, and conditions for determining the functions. FIG. 4 is an explanatory diagram showing the operation process of this embodiment.

1……マイクロプロセサ、2……外部記憶装
置、3〜5,8〜9……レジスタ、6……バイト
リングシフタ、7……シフトフアンクシヨン決定
ブロツク、10……データアドレス生成ブロツ
ク、11……演算ブロツク、20,21……バ
ス、AS1,AS2……アドレス、A1〜A3,B
1〜B3……データ。
1...Microprocessor, 2...External storage device, 3-5, 8-9...Register, 6...Byte ring shifter, 7...Shift function determination block, 10...Data address generation block, 11 ...Arithmetic block, 20, 21...Bus, AS1, AS2...Address, A1 to A3, B
1-B3...Data.

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

第1図は、本発明によるストリングデータ制御
回路の一実施例を示すブロツク図である。第2図
は、本実施例の2つのバイトストリングデータの
状況を示す説明図である。第3図は、バイトリン
グシフタのフアンクシヨンの種類、その動作、お
よびフアンクシヨンを決定するための条件を示す
説明図である。第4図は、本実施例の動作過程を
示す説明図である。 納する。このマージの仕方も、フアンクシヨン決
定ブロツクで決定されたフアンクシヨンに従う。
その後、第2のデータレジスタ4にはバイトリン
グシフタ6の出力データを格納しておく。第3の
データレジスタ5にはデータBに桁合せされたデ
ータAが格納されているため、続いてフエーズ
で第1のデータレジスタ3にデータBの最初の4
バイトのデータB1を読込むと、演算ブロツク1
1でそのまま演算を行うことができる。 同様にして、フエーズでデータAの次の4バ
イトのデータA3を読込んで、先に第2のデータ
レジスタ4に格納してあつたデータと共にマージ
して第3のデータレジスタ5に格納すると共に第
2のデータレジスタ4には新しい内容をセツトす
る。続いて、フエーズでデータBの次の4バイ
トのデータB1を読込むと、2回目の演算データ
が第1のデータレジスタ3と第3のデータレジス
タ5とにセツトされ、演算ブロツク11で2回目
の演算を行う。最終回は、フエーズで示すよう
に第2のデータレジスタ4に残つていた最後の1
バイトd1′を第3のデータレジスタ5に転送した
後、フエーズでデータBの最後の4バイトのデ
ータB3を第1のデータレジスタ3に読込んで演
算ブロツク11で最終回ほ演算を行えばよい。 なお、本実施例では1ワードが4バイトより成
る実施例を説明したが、本発明は4バイトに限ら
れることはなく、1ワードが2バイト、あるは8
バイトより成る場合でも同様の方法で桁合せ、お
よび演算が実行できる。 (発明の効果) 以上説明したように本発明では、データのアド
レスの下位ビツトの情報を使つてバイトリングシ
フタを操作することにより、ワードバウンダでは
ないデータに対しても容易に、データの桁合せを
行わせることができ、ワード幅での演算を簡単に
実行することができると云う効果がある。
FIG. 1 is a block diagram showing one embodiment of a string data control circuit according to the present invention. FIG. 2 is an explanatory diagram showing the status of two byte string data in this embodiment. FIG. 3 is an explanatory diagram showing the types of functions of the bite ring shifter, their operations, and conditions for determining the functions. FIG. 4 is an explanatory diagram showing the operation process of this embodiment. pay. This merging method also follows the function determined by the function determination block.
Thereafter, the output data of the bite ring shifter 6 is stored in the second data register 4. Since the third data register 5 stores data A whose digits are aligned with data B, the first 4 of data B are then stored in the first data register 3 in the phase.
When byte data B1 is read, calculation block 1
1 allows you to perform calculations as is. Similarly, the next 4 bytes of data A3 after data A are read in the phase, merged with the data previously stored in the second data register 4, stored in the third data register 5, and stored in the third data register 5. New contents are set in the data register 4 of No. 2. Next, when the next 4 bytes of data B1 after data B are read in the phase, the second operation data is set in the first data register 3 and the third data register 5, and the second operation data is set in the operation block 11. Perform calculations. In the final episode, the last one remaining in the second data register 4 is
After transferring the byte d 1 ' to the third data register 5, the last 4 bytes of data B3 of data B can be read into the first data register 3 in the phase, and the final calculation can be performed in the calculation block 11. . In this embodiment, one word consists of 4 bytes, but the present invention is not limited to 4 bytes, and one word consists of 2 bytes, or even 8 bytes.
Even if it consists of bytes, digit alignment and operations can be performed in the same way. (Effects of the Invention) As explained above, in the present invention, by operating the byte ring shifter using the information of the lower bits of the data address, data digit alignment can be easily performed even for data that is not a word boundary. This has the advantage that word-width operations can be easily executed.

Claims (1)

【特許請求の範囲】[Claims] 1 複数バイトから成るワード幅でバイト単位の
シフトを行うためのバイトリングシフタと、一対
のバイトストリングデータの下位アドレスの一部
を格納するための一対のアドレスレジスタと、前
記一対のアドレスレジスタに格納された情報より
前記バイトリングシフタのフアンクシヨンを決定
するためのフアンクシヨン決定ブロツクと、ワー
ド幅に等しい大きさを有すると共に前記バイトス
トリングデータを一時的に格納するための第1の
データレジスタと、前記第1のデータレジスタの
内容を前記バイトリングシフタでシフトした後に
一時的に前記内容を格納するための第2のデータ
レジスタと、前記第1のデータレジスタの内容を
前記バイトリングシフタでシフトして得た結果と
前記第2のデータレジスタの内容を前記バイトリ
ングシフタのフアンクシヨンに従つてマージして
得たデータとを格納するための第3のデータレジ
スタと、前記第1および第3のデータレジスタの
内容をワード幅で演算するための演算ブロツクと
を具備して構成したことを特徴とするストリング
データ制御回路。
1. A byte ring shifter for performing a byte-by-byte shift in a word width consisting of multiple bytes, a pair of address registers for storing a part of the lower address of a pair of byte string data, and storage in the pair of address registers. a first data register having a size equal to a word width and for temporarily storing the byte string data; a second data register for temporarily storing the contents after shifting the contents of the first data register by the byte ring shifter; and a second data register for temporarily storing the contents after shifting the contents of the first data register by the byte ring shifter; a third data register for storing the result obtained by merging the contents of the second data register and the data obtained by merging the contents of the second data register according to the function of the byte ring shifter; 1. A string data control circuit comprising: a calculation block for calculating contents in word width.
JP1832585A 1985-02-01 1985-02-01 Control circuit for string data Granted JPS61177540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1832585A JPS61177540A (en) 1985-02-01 1985-02-01 Control circuit for string data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1832585A JPS61177540A (en) 1985-02-01 1985-02-01 Control circuit for string data

Publications (2)

Publication Number Publication Date
JPS61177540A JPS61177540A (en) 1986-08-09
JPH0426494B2 true JPH0426494B2 (en) 1992-05-07

Family

ID=11968461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1832585A Granted JPS61177540A (en) 1985-02-01 1985-02-01 Control circuit for string data

Country Status (1)

Country Link
JP (1) JPS61177540A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0580109B1 (en) * 1992-07-23 1997-12-10 Rockwell International Corporation Data acces in a RISC digital signal processor

Also Published As

Publication number Publication date
JPS61177540A (en) 1986-08-09

Similar Documents

Publication Publication Date Title
JPS59146345A (en) Control flow parallel computer system
JPH0248931B2 (en)
JPH0414385B2 (en)
JPS59111569A (en) Vector processing device
JP2617974B2 (en) Data processing device
JPS6227412B2 (en)
JPS623461B2 (en)
JPH034936B2 (en)
EP0240606A2 (en) Pipe-line processing system and microprocessor using the system
JPS62140137A (en) Data holding system using arithmetic logic unit
JPH0426494B2 (en)
US4723258A (en) Counter circuit
JPH0831033B2 (en) Data processing device
JP3043861B2 (en) Data processing device
JPS60134937A (en) Address extension device
JPS5821300B2 (en) Memory address information
JP2566009B2 (en) Data processing device
JPS63251835A (en) Vector processor
JPS6226730B2 (en)
JPH01255933A (en) Sweeping-out control system
JPS60665Y2 (en) Arithmetic control unit
JPS6111493B2 (en)
JP3124361B2 (en) Memory data loading device
JP2764947B2 (en) Instruction control method
JPS63305405A (en) Method and device for processing sequence control