JPS61177540A - Control circuit for string data - Google Patents

Control circuit for string data

Info

Publication number
JPS61177540A
JPS61177540A JP1832585A JP1832585A JPS61177540A JP S61177540 A JPS61177540 A JP S61177540A JP 1832585 A JP1832585 A JP 1832585A JP 1832585 A JP1832585 A JP 1832585A JP S61177540 A JPS61177540 A JP S61177540A
Authority
JP
Japan
Prior art keywords
data
byte
data register
shifter
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.)
Granted
Application number
JP1832585A
Other languages
Japanese (ja)
Other versions
JPH0426494B2 (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
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 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)

Abstract

PURPOSE:To easily uniform the digits of even data which is not at a word boundary and to easily perform arithmetic on word-width basis by operating a byte ring shifter by using information of the low-order digit bits of the address of the date. CONSTITUTION:The function of the byte ring shifter 6 is set to a 2-byte exchange mode by a function determining block 7 on the basis of the two least significant digit bits of AS1 and AS2 stored in the 1st data register 3 and then the byte ring shifter 6 operates as a shifter which exchanges two bytes. Then, the starting 1-byte data A1 of data A is stored in the 1st data register 3 and its contents are further stored in the 2nd data register 4 through the byte ring shifter 6. When the starting 4-byte data B1 of data B is read in the 1st data register 3, an arithmetic block 11 performs arithmetic as it is.

Description

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

(従来の技術) データ処理装置において、複数バイトから成るワードを
単位としてアクセスすることも可能な外部記憶装量に格
納されているバイトストリンクデータを処理する場合に
は、マイクロプロセサによりワード単位の処理を行うた
めにデータを読出しても、ワードバウンダリによって規
定されていないデータの時には、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, a microprocessor is used to process byte string data in units of words. Even if data is read for processing, if the data is not defined by word boundaries, the byte positions of the two word data read in one hour may be shifted, so the data digits must be aligned. I had to. However, since controlling data digit alignment is complex, 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 executed 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 object 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 determine a byte ring shift function from the stored information. In addition, the above disadvantages are solved by temporarily storing byte string data in word width, and then merging according to the byte ring shift function, and the sling data is configured so that operations can be performed in word width. The purpose is to provide a control circuit.

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

バイトリングシフタに、複数バイトから成るワード幅で
バイト単位のシフトを行うためのものである。
This is used to perform a byte-by-byte shift in a byte ring shifter with 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のデータレジスタの内容
をバイトリングシフタでシフトLi後、一時的にその結
果を格納するためのものである。
The second data register is for temporarily storing the result after the contents of the first data register are shifted by the byte ring shifter.

第3のデータレジスタは第1のデータレジスタの内容を
バイトリングシフタでシフトして得九結果と、第2のデ
ータレジスタの内容をバイトリングシフタのファンクシ
ョンに従ってマージして得たデータとを格納する九めの
ものである。
The third data register stores 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 the ninth one.

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

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

第1図は、本発明によるストリングデータ制御回路の一
実施例を示すブロック図である。第1図において、1は
本発明を適用したマイクロプロセサ、2はバイトストリ
ングデータを格納するための外部記憶装置、3〜5はそ
れぞれバイトストリングデータを一時的に格納するため
の4バイト幅の第1〜第3のデータレジスタ、6はバイ
トリングシフタ、7はバイトリングシフタ6のファンク
ションを決定するためのファンクション決定ブロック、
8.9はそれぞれ2つのバイトストリングデータの各ア
ドレスの最下位2ビツトを格納するためのアドレスレジ
スタ、1Gはバイトストリングデータのアドレスを生成
するためのアドレス生成ブロック、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 determination block for determining the function of the byte ring shifter 6;
8.9 is an address register for storing the lowest two bits of each address of two byte string data, 1G is an address generation block for generating the address of byte string data, and 11 is a 4-byte wide calculation block. , 20 is a 4-byte wide data bus from the external storage device 2, and 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に格納されており、A81がデータ人のアド
レス、AS2がデータBのアドレスを表わし、それぞれ
の最下位2ビツトは11 、01であって、Al−A3
.B1−83は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, A81 represents the address of the data person, AS2 represents the address of the data B, and the lowest two bits of each are 11 and 01, and Al-A3
.. B1-83 is a 4-byte boundary (4-byte width) data unit that is accessed at one time.

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

第4図は、本実施例において第2図のデータを処理する
過程を示した説明図である。次に、第4図に従って本実
施例の動作を説明する。第4図においで、フェーズ1)
では第1のデータレジスタ3に格納されたASI、AS
2の最下位の各2ビツト11.01よりファンクション
決定ブロック7によってバイトリングシフタ6のファン
クションを第3図に従って2バイトエクスチエンジモー
ドに設定し、バイトリングシフタ6を2バイトのエクス
チェンジを行うシフタとして動作させる。その後に、第
1のデータレジスタ3にデータ人の最初の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 operation of this embodiment will be explained according to FIG. In Figure 4, Phase 1)
Now, the ASI and AS stored in the first data register 3
2, the function determination block 7 sets the function of the biting ring shifter 6 to the 2-byte exchange mode according to FIG. make it work. Thereafter, the first 4 bytes of data A1 of the data person 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.

次に、フェーズ11)では、データ人の次の4バイトの
データA2をレジスタ3に格納した後、その内容をバイ
トリングシフタ6を通して得たデータと、フェーズl)
で第2のデータレジスタ4に格納したデータとをマージ
して第3のデータレジスタ5に格納する。このマージの
仕方も、ファンクション決定ブロックで決定されたファ
ンクションに従う。その後、第2のデータレジスタ4に
はバイトリングシフタ6の出力データを格納しておく。
Next, in phase 11), 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 in phase 1)
The data stored in the second data register 4 is merged with the data stored in the third data register 5. This method of merging 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.

第3のデータレジスタ5にはデータBに桁合せされたデ
ータ人が格納されているため、続いてフェーズ111)
で第1のデータレジスタ3にデータBの最初の4バイト
のデータBlを読込むと、演算ブロック11でその11
演算を行うことができる。
Since the third data register 5 stores the data whose digits are aligned with the data B, the phase 111)
When the first 4 bytes of data Bl of data B are read into the first data register 3, the arithmetic block 11 reads the first 4 bytes of data Bl.
Can perform calculations.

同様にして、フェーズIV)でデータAの次の4バイト
のデータA3を読込んで、先に第2のデータレジスタ4
に格納してあったデータと共にマージして第3のデータ
レジスタ5に格納すると共に第2のデータレジスタ4に
は新しい内容をセットする。続いて、フェーズV)でデ
ータBの次の4バイトのデータBlを読込むと、2回目
の演算データが第1のデータレジスタ3と第3のデータ
レジスタ5とにセットされ、演算ブロック11で2回目
の演算を行う。最終回は、フェーズvl)で示すように
第2のデータレジスタ4に残っていた最後の1バイトd
l′を第3のデータレジスタ5に転送した後、フェーズ
wit )でデータBの最後の4バイトのデータB3を
第1のデータレジスタ3に読込んで演算ブロック11で
最終回の演算を行えばよい。
Similarly, in phase IV), the next 4 bytes of data A3 after data A are read, and the second data register 4 is first read.
The data is merged with the data previously stored in the data register 5 and stored in the third data register 5, and new contents are set in the second data register 4. Then, in phase V), when the next 4 bytes of data Bl of data B are read, the second operation data is set in the first data register 3 and the third data register 5, and the operation block 11 sets the second operation data. Perform the second calculation. The last byte d remaining in the second data register 4 as shown in phase vl)
After transferring l' 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 phase (wit), and the final calculation can be performed in the calculation block 11. .

なお、本実施例では1ワードが4バイトより成る実施例
を説明したが、本発明は4バイ)K限られることはなく
s  1ワードが2バイト、あるいは8バイトより成る
場合でも同様の方法で桁合せ、および演算が実行できる
In this embodiment, an example in which one word consists of 4 bytes has been explained, but the present invention is not limited to 4 bytes, and even when one word consists of 2 bytes or 8 bytes, the same method can be applied. Can perform digit alignment and calculations.

(発明の効果) 以上説明したように本発明では、データのアドレスの下
位ビットの情報を使ってバイトリングシフタを操作する
ことにより、ワードバウンダリではないデータに対して
も容易に、データの桁合せを行わせることができ、ワー
ド幅での演算を簡単に実行することができると云う効果
がある。
(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.

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

第1図は、本発明によるストリングデータ制御回路の一
実施例を示すブロック図である。 第2図は、本実施例の2つのバイトストリングデータの
状況を示す説明図である。 第3図は、バイトリングシフタのファンクションの種類
、その動作、およびファンクションを決定するための条
件を示す説明図である。 第4図は、本実施例の動作過程を示す説明図である。 1・・・マイクロプロセサ  2・・・外部記憶装置3
〜5,8.9・・・レジスタ 6・・・バイトリングシフタ 7・・・シフトファンクション決定ブロックlO・・・
データアドレス生成ブロック11・・・演算フロック 
 20.21・・・バスAs1.A82・・・アドレス Al−A3.B1−B5・・・データ 特許出願人  日本電気株式会社 代理人 弁理士 井 ノ  ロ   壽才1図 才2m 第3図 才4図
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...Microprocessor 2...External storage device 3
~5,8.9... Register 6... Byte ring shifter 7... Shift function determination block lO...
Data address generation block 11... operation block
20.21...Bus As1. A82...Address Al-A3. B1-B5... Data patent applicant NEC Co., Ltd. agent Patent attorney Inoro Jusai 1 figure 2 meters Figure 3 figure 4

Claims (1)

【特許請求の範囲】[Claims] 複数バイトから成るワード幅でバイト単位のシフトを行
うためのバイトリングシフタと、一対のバイトストリン
グデータの下位アドレスの一部を格納するための一対の
アドレスレジスタと、前記一対のアドレスレジスタに格
納された情報より前記バイトリングシフタのファンクシ
ョンを決定するためのファンクション決定ブロックと、
ワード幅に等しい大きさを有すると共に前記バイトスト
リングデータを一時的に格納するための第1のデータレ
ジスタと、前記第1のデータレジスタの内容を前記バイ
トリングシフタでシフトした後に一時的に前記内容を格
納するための第2のデータレジスタと、前記第1のデー
タレジスタの内容を前記バイトリングシフタでシフトし
て得た結果と前記第2のデータレジスタの内容を前記バ
イトリングシフタのファンクションに従つてマージして
得たデータとを格納するための第3のデータレジスタと
、前記第1および第3のデータレジスタの内容をワード
幅で演算するための演算ブロックとを具備して構成した
ことを特徴とするストリングデータ制御回路。
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 part of the lower address of a pair of byte string data; a function determination block for determining a function of the biting shifter from the information;
a first data register having a size equal to a word width and for temporarily storing the byte string data; and a first data register having a size equal to a word width and for temporarily storing the byte string data; and a second data register for storing the contents of the first data register by the byte ring shifter, and a result obtained by shifting the contents of the first data register by the byte ring shifter and the contents of the second data register according to the function of the byte ring shifter. and a third data register for storing the data obtained by merging the first and second data registers, and a calculation block for calculating the contents of the first and third data registers in word width. Characteristic string data control circuit.
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 true JPS61177540A (en) 1986-08-09
JPH0426494B2 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)

Cited By (1)

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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0580109A2 (en) * 1992-07-23 1994-01-26 Rockwell International Corporation Data acces in a RISC digital signal processor
EP0580109A3 (en) * 1992-07-23 1994-04-06 Rockwell International Corp
US5586284A (en) * 1992-07-23 1996-12-17 Rockwell International Corporation Triple register RISC digital signal processor

Also Published As

Publication number Publication date
JPH0426494B2 (en) 1992-05-07

Similar Documents

Publication Publication Date Title
JP2633331B2 (en) Microprocessor
JPS59146345A (en) Control flow parallel computer system
JPH0414385B2 (en)
JPH04363736A (en) Information processor
JP2617974B2 (en) Data processing device
JPH034936B2 (en)
JPS62140137A (en) Data holding system using arithmetic logic unit
JPS61177540A (en) Control circuit for string data
JPS5826584B2 (en) data processing equipment
JPH0831033B2 (en) Data processing device
JP3055558B2 (en) n-bit arithmetic unit
JP2566009B2 (en) Data processing device
JPS60134937A (en) Address extension device
JPS619725A (en) Microprogram control circuit
JPH0588887A (en) Data processor
JPS60665Y2 (en) Arithmetic control unit
JPH02230320A (en) Data processor
JPH0778723B2 (en) Information processing equipment
JPS63291115A (en) Converting system for decimal data
JP2615746B2 (en) Bit operation circuit
JPS6111493B2 (en)
JPH037971B2 (en)
JPH03189868A (en) Data processor
JPH06250711A (en) Programmable controller
JPS61282933A (en) Digital signal processor