JP2005267215A - Device and method for writing out data in processor - Google Patents
Device and method for writing out data in processor Download PDFInfo
- Publication number
- JP2005267215A JP2005267215A JP2004078339A JP2004078339A JP2005267215A JP 2005267215 A JP2005267215 A JP 2005267215A JP 2004078339 A JP2004078339 A JP 2004078339A JP 2004078339 A JP2004078339 A JP 2004078339A JP 2005267215 A JP2005267215 A JP 2005267215A
- Authority
- JP
- Japan
- Prior art keywords
- data
- writing
- rotation
- processor
- storage device
- 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.)
- Pending
Links
Images
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Description
本発明はデータ処理の技術領域に係り、特に、一種のプロセッサ中でデータを書き出す装置及び方法に関する。 The present invention relates to the technical field of data processing, and more particularly to an apparatus and method for writing data in a kind of processor.
プロセッサがデータ処理する時、データがアライメントしているか否かは多くの鍵となる演算の機能、例えばストリング、アレイ等の演算の機能に関係する。図1に示されるように、処理を必要とするデータ(ABCDEFGHIJKL)がレジスタR16、17、18中より記憶装置100の101hから100Ch部分に書き出される時、往々にして記憶装置100のデータ保存境界を跨ぐ。記憶装置100にはデータ処理の能力がないため、プロセッサが該記憶装置100の非アライメント位置にデータを保存しようとする時、プロセッサは余分に多くの演算を行なわなければならない。
When a processor processes data, whether or not the data is aligned is related to a number of key calculation functions, such as strings and arrays. As shown in FIG. 1, when data (ABCDEFGHIJKL) requiring processing is written from the registers R16, 17 and 18 to the 101Ch to 100Ch portion of the
データ処理の未アライメントの問題を改善する周知の方法によると、該記憶装置100の非アライメント位置部分のデータをプロセッサにロードした後、さらに各種のプロセッサ命令操作を利用して必要なデータを得る。図2に示されるように、データABCDを非アライメント位置に書き込む必要がある時、まず100h部分に位置するデータ(abcd)をレジスタR1中にロードし、レジスタR1を左に24ビット移動させて保存が必要なデータ(a)を適当な位置に放置する。さらにレジスタR16のデータ(ABCD)を右に8ビット移動させてレジスタR2(0ABC)中に保存し、レジスタR1とレジスタR2にOR演算を行なわせて結果をR1中に保存する(aABC)。次に、まず104h部分に位置するデータ(efgh)をレジスタR1中にロードし、レジスタR1を左に8ビット移動させて保存が必要なデータ(fgh)を保存し、レジスタR1を右に8ビット移動させて保存が必要なデータ(fgh)を適当な位置に保存する。更にレジスタR16のデータ(ABCD)を左に24ビット移動させて更にレジスタR2(D000)に保存し、レジスタR1とレジスタR2にOR演算させて結果をレジスタR1中に保存する(Dfgh)、最後にレジスタR1の内容を記憶装置104h部分に書き込む。
According to a well-known method for solving the problem of unalignment of data processing, after loading the data of the non-alignment position portion of the
以上の説明から分かるように、記憶装置に書き出しが必要な未アライメントデータの長さがn個ワード(一つのワードは32ビット)であれば、周知の方法によると、12n個の命令が無ければ書き出し動作を記述できず、また少なくとも12nの命令周期がなければ書き出し動作を完成できない。このためプログラムコードが冗長となり、保存空間を占拠し、またプロセッサの負担を増してプロセッサの効率が明らかでなくなる。 As can be seen from the above description, if the length of unaligned data that needs to be written to the storage device is n words (one word is 32 bits), according to a well-known method, if there are 12n instructions, The write operation cannot be described, and the write operation cannot be completed without an instruction period of at least 12n. As a result, the program code becomes redundant, occupies a storage space, and increases the burden on the processor, making the efficiency of the processor unclear.
周知の方法の、プロセッサ命令を使用して未アライメントデータを処理するために引き起こされるプログラムコードの冗長及び効率の問題に対して、特許文献1には、未アライメントデータをロードすると同時にアライメント動作を行ない、並びに境界を跨ぐデータを二回に分けて書き出す方法が記載されている。図3に示されるように、この方法によると、まずレジスタR16中の内容(ABC)を101hから103h部分に書き出し、この時、記憶装置100h部分のデータに変更はない。さらにレジスタR16中の内容(D)が記憶装置104h部分に書き出され、この時、記憶装置105hから107h部分のデータに変更はない。同様に、レジスタR17及びレジスタR18の内容が記憶装置105hから10Chに書き出される。
In order to solve the problem of program code redundancy and efficiency caused by processing unaligned data using processor instructions in a well-known method,
以上の説明から分かるように、特許文献1に記載の技術によると、書き出しが必要な未アライメントデータの長さがn個ワード(1ワードは32ビット)であれば、2n個の命令がなければ書き出し動作を記述できず、且つ同一記憶装置とレジスタの位置に対して重複する読み書きを行なうため、プロセッサにパイプライン遅滞(stall)を引き起こす可能性が高まる。且つ同一記憶装置位置に対して重複して書き出すため、バス周波数幅を浪費し、特にフラッシュ記憶装置を具備しないシステムにあっては、形成するエラーが更に明らかになる。これにより、周知のプロセッサの設計には多くの欠点があり、改善の必要がある。
As can be seen from the above description, according to the technique described in
ゆえに本発明は一種のプロセッサ中でデータを書き出す装置及び方法を提供し、周知の技術の、多くの命令を使用しなければ書き出し動作を記述できない問題を解決すると共に、命令周期を減らして書き出し動作を完成できるようにし、実行効率を高めることを目的とする。 Therefore, the present invention provides an apparatus and method for writing data in a kind of processor, and solves the problem of the writing technique that cannot be written unless many instructions are used in the well-known technique, and writing operation with a reduced instruction cycle. The purpose is to improve the execution efficiency.
請求項1の発明は、プロセッサ中でデータを書き出す方法であり、そのうち、データは記憶装置中の未アライメントアドレスに書き出され、該記憶装置はワード境界により複数のmビットのワードに分割され、この方法は、開始回転ステップ、第1遮蔽書き出しステップ、中継回転ステップ、第1書き出しステップ、終了回転ステップ、第2書き出しステップ、第2遮蔽書き出しステップを具え、
該開始回転ステップでは該データをキャプチャし並びに書き出しの未アライメントアドレスによりそれを第1位置に回転させて第1回転データを生成し、
該第1遮蔽書き出しステップでは、書き出しの未アライメントアドスにより第1回転データに対して遮蔽し並びに該記憶装置に書き出し、
該中継回転ステップでは、該データの後続データをキャプチャし、書き出しの未アライメントアドレスによりそれを第1位置に回転させて、第2回転データを生成し、
該第1書き出しステップでは、第1回転データの未書き出し部分及び第2回転データの一部を組み合わせ、並びに該記憶装置に書き出し、
該終了回転ステップでは、該データの後続データを第1位置に回転させて、第3回転データを生成し、
該第2書き出しステップでは、第2回転データの未書き出し部分と第3回転データの一部を組み合わせ、並びに該記憶装置に書き出し、
該第2遮蔽書き出しステップでは、第3回転データを遮蔽し並びに該記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項2の発明は、請求項1記載のプロセッサ中でデータを書き出す方法において、mは32とされたことを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項3の発明は、請求項2記載のプロセッサ中でデータを書き出す方法において、第1位置への回転は右向きの8ビットの回転とされることを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項4の発明は、請求項2記載のプロセッサ中でデータを書き出す方法において、第1位置への回転は右向きの16ビットの回転とされることを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項5の発明は、請求項2記載のプロセッサ中でデータを書き出す方法において、第1位置への回転は右向きの24ビットの回転とされることを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項6の発明は、プロセッサ中でデータを書き出す方法であり、そのうち、データは一つの記憶装置中の未アライメントアドレスに書き出され、該記憶装置はワード境界により複数のmビットのワードに分割され、この方法は、開始回転ステップ、第1遮蔽書き出しステップ、第2遮蔽書き出しステップを具え、
該開始回転ステップではデータをキャプチャし並びに書き出しの未アライメントアドレスによりそれを第1位置に回転させて第1回転データを生成し、
該第1遮蔽書き出しステップでは未アライメントアドレスにより該第1回転データを遮蔽し並びに該記憶装置に書き出し、
該第2遮蔽書き出しステップでは、第1回転データの未書き出し部分に対して、遮蔽と記憶装置への書き出しを実行することを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項7の発明は、請求項6記載のプロセッサ中でデータを書き出す方法において、第1回転データ中の未書き出し部分がmビットより小さいことを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項8の発明は、請求項6記載のプロセッサ中でデータを書き出す方法において、mが32とされたことを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項9の発明は、請求項8記載のプロセッサ中でデータを書き出す方法において、第1位置への回転は右向きの8ビットの回転とされることを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項10の発明は、請求項8記載のプロセッサ中でデータを書き出す方法において、第1位置への回転は右向きの16ビットの回転とされることを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項11の発明は、請求項8記載のプロセッサ中でデータを書き出す方法において、第1位置への回転は右向きの24ビットの回転とされることを特徴とする、プロセッサ中でデータを書き出す方法としている。
請求項12の発明は、プロセッサ中でデータを書き出す装置であり、該データはプロセッサの内部レジスタに保存され、記憶装置中の未アライメントアドレスに書き出され、該記憶装置はワード境界により複数のmビットのワードに分割され、この装置は、回転装置、ストアコンバインレジスタ、及び選択遮蔽装置を具え、
該回転装置は該内部レジスタに結合され、該未アライメントデータの書き出しアドレスにより、該内部レジスタのデータを第1位置に回転させ、
該ストアコンバインレジスタは該回転装置に結合されて、該回転装置のデータを暫時保存し、
該選択遮蔽装置は該回転装置及び該ストアコンバインレジスタに結合され、該書き出しアドレスにより、該回転装置及び該ストアコンバインレジスタのデータを選択遮蔽し、並びにそれを該記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項13の発明は、請求項12記載のプロセッサ中でデータを書き出す装置において、プロセッサが第1命令を実行して回転装置に該データの書き出しのアドレスにより、内部レジスタのデータを第1位置に回転させて、第1回転データを生成し、並びにストアコンバインレジスタに保存し、選択遮蔽装置が該データの書き出しのアドレスにより、該回転装置及びストアコンバインレジスタのデータを選択的に遮蔽し並びにそれを記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項14の発明は、請求項12記載のプロセッサ中でデータを書き出す装置において、プロセッサが第2命令を実行して回転装置に該データの後続データをキャプチャさせ、並びにそれを第1位置に回転させ、第2回転データを生成し、並びにストアコンバインレジスタに保存し、該選択遮蔽装置が該データの書き出しアドレスにより、第1回転データの未書き出し部分と第2回転データの一部を組み合わせ、並びにそれを記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項15の発明は、請求項12記載のプロセッサ中でデータを書き出す装置において、プロセッサが第3命令を実行して回転装置に該データの後続データをキャプチャさせ、並びにそれを第1位置に回転させ、第3回転データを生成し、並びにストアコンバインレジスタに保存し、該選択遮蔽装置が該データの書き出しアドレスにより、第2回転データの未書き出し部分と第3回転データの一部を組み合わせ、並びにそれを記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項16の発明は、請求項15記載のプロセッサ中でデータを書き出す装置において、選択遮蔽装置が該データの書き出しのアドレスにより、第3回転データの未書き出しの部分に対して、それを記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項17の発明は、請求項12記載のプロセッサ中でデータを書き出す装置において、mは32とされることを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項18の発明は、請求項17記載のプロセッサ中でデータを書き出す装置において、回転装置は右向きに8ビット回転させることを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項19の発明は、請求項17記載のプロセッサ中でデータを書き出す装置において、回転装置は右向きに16ビット回転させることを特徴とする、プロセッサ中でデータを書き出す装置としている。
請求項20の発明は、請求項17記載のプロセッサ中でデータを書き出す装置において、回転装置は右向きに24ビット回転させることを特徴とする、プロセッサ中でデータを書き出す装置としている。
The invention of
The starting rotation step captures the data and rotates it to the first position by the unaligned address of writing to generate first rotation data;
In the first shield writing step, the first rotation data is shielded by the unaligned address of writing and written to the storage device,
In the relay rotation step, the subsequent data of the data is captured and rotated to the first position by the unaligned address of the writing to generate the second rotation data,
In the first writing step, the unwritten portion of the first rotation data and a part of the second rotation data are combined and written to the storage device,
In the end rotation step, the subsequent data of the data is rotated to the first position to generate third rotation data,
In the second writing step, the unwritten portion of the second rotation data and a part of the third rotation data are combined and written to the storage device,
In the second shield writing step, the third rotation data is shielded and written to the storage device, and the data is written in the processor.
The invention of
The invention according to
4. The method of writing data in the processor according to
The invention according to claim 5 is the method for writing data in the processor according to
The invention of claim 6 is a method for writing data in a processor, in which data is written to an unaligned address in one storage device, and the storage device is divided into a plurality of m-bit words by word boundaries. The method comprises a starting rotation step, a first shield writing step, a second shield writing step,
The starting rotation step captures data and rotates it to the first position by the unaligned address of writing to generate first rotation data;
In the first shield writing step, the first rotation data is shielded by an unaligned address and written to the storage device;
In the second shield writing step, a method of writing data in the processor is characterized in that shielding and writing to the storage device are executed for the unwritten portion of the first rotation data.
The invention according to claim 7 is the method for writing data in the processor according to claim 6, wherein the unwritten portion in the first rotation data is smaller than m bits. .
The invention of claim 8 is the method for writing data in the processor according to claim 6, wherein m is 32.
The invention according to claim 9 is the method for writing data in the processor according to claim 8, wherein the rotation to the first position is a rightward 8-bit rotation. It is said.
The invention according to claim 10 is the method for writing data in the processor according to claim 8, wherein the rotation to the first position is a 16-bit rotation to the right. It is said.
The invention according to claim 11 is the method for writing data in the processor according to claim 8, wherein the rotation to the first position is a 24-bit rotation to the right. It is said.
The invention of claim 12 is an apparatus for writing data in a processor, the data is stored in an internal register of the processor and written to an unaligned address in a storage device, and the storage device has a plurality of m by a word boundary. Divided into words of bits, the device comprises a rotating device, a store combine register, and a selective shielding device,
The rotating device is coupled to the internal register, and rotates the data in the internal register to the first position by the write address of the unaligned data.
The store combine register is coupled to the rotator to store the rotator data for a while,
The selective shielding device is coupled to the rotating device and the store combine register, and the data of the rotating device and the store combine register is selectively shielded by the write address and written to the storage device. , A device for writing data in the processor.
According to a thirteenth aspect of the present invention, in the apparatus for writing data in the processor according to the twelfth aspect, the processor executes the first instruction and sets the data in the internal register to the first position by the address of the data write to the rotating device. Rotating to generate the first rotation data and storing it in the store combine register, and the selective shielding device selectively shields the data of the rotating device and the store combine register by the address of the data write and A device for writing data in a processor is characterized by writing to a storage device.
The invention according to claim 14 is the apparatus for writing data in the processor according to claim 12, wherein the processor executes the second instruction to cause the rotating device to capture subsequent data of the data and to rotate it to the first position. Generating the second rotation data and storing the second rotation data in the store combine register, the selective shielding device combining the unwritten portion of the first rotation data and a part of the second rotation data according to the data write address, and This is a device for writing data in a processor, which is characterized by writing it to a storage device.
The invention according to claim 15 is the apparatus for writing data in the processor according to claim 12, wherein the processor executes a third instruction to cause the rotating device to capture subsequent data of the data and to rotate it to the first position. Generating the third rotation data and storing it in the store combine register, and the selective shielding device combines the unwritten portion of the second rotation data and a part of the third rotation data according to the write address of the data, and This is a device for writing data in a processor, which is characterized by writing it to a storage device.
According to a sixteenth aspect of the present invention, in the apparatus for writing data in the processor according to the fifteenth aspect, the selective shielding device stores the unrotated portion of the third rotation data according to the write start address of the data. It is a device for writing data in a processor, which is characterized by being written to.
The invention according to claim 17 is the apparatus for writing data in the processor according to claim 12, wherein m is 32, and the apparatus writes data in the processor.
The eighteenth aspect of the present invention is the apparatus for writing data in the processor according to the seventeenth aspect, wherein the rotating apparatus rotates the data by 8 bits to the right.
According to a nineteenth aspect of the present invention, there is provided an apparatus for writing data in a processor according to the seventeenth aspect, wherein the rotating device rotates 16 bits to the right.
According to a twentieth aspect of the present invention, in the apparatus for writing data in the processor according to the seventeenth aspect, the rotating apparatus rotates data by 24 bits to the right.
もし記憶装置500に書き出しが必要なデータの未アライメントアドレスのデータの長さがn個のワードであれば、本発明の技術はただ(n+1)個の命令で書き出し動作を記述でき、プログラムコードを短縮するだけでなく、ただ(n+1)個の命令周期があれば書き出し動作を完成でき、大幅に実行効率を高めることができる。且つ同一記憶装置とレジスタ位置に対して重複した書き出しを行なわず、プロセッサ管線の遅滞(stall)の可能性を減らし、同一記憶装置位置に対して只一度の書き出しを行なうだけでよく、バス周波数幅を減らし、バスの周波数幅の使用を最適化する。
If the data length of the unaligned address of the data that needs to be written to the
総合すると、本発明はその目的、手段、機能のいずれにおいても周知の技術の特徴とは異なっており、極めて実用価値を有している。 In summary, the present invention differs from the features of known techniques in any of its purposes, means, and functions, and has extremely practical value.
本発明はプロセッサ中でデータを書き出す方法を提供し、そのうち、データは一つの内部レジスタに保存され、該内部レジスタはワード境界により複数のmビットのワードに分割され、この方法は、開始回転ステップ、第1遮蔽書き出しステップ、中継回転ステップ、第1書き出しップ、終了回転ステップ、第2書き出しステップ、第2遮蔽書き出しステップを具えている。該開始回転ステップではデータをキャプチャし並びに書き出しの未アライメントアドレスによりそれを第1位置に回転させて第1回転データを生成する。第1遮蔽書き出しステップでは、書き出しの未アライメントアドレスにより第1回転データに対して遮蔽し並びに該記憶装置に書き出す。中継回転ステップでは、該データの後続データをキャプチャし、書き出しの未アライメントアドレスによりそれを第1位置に回転させて、第2回転データを生成する。第1書き出しステップでは、第1回転データの未書き出し部分及び第2回転データの一部を組み合わせ、並びに該記憶装置に書き出す。終了回転ステップでは、該データの後続データを第1位置に回転させて、第3回転データを生成する。第2書き出しステップでは、第2回転データの未書き出し部分と第3回転データの一部を組み合わせ、並びに該記憶装置に書き出す。第2遮蔽書き出しステップでは、第3回転データを遮蔽し並びに該記憶装置に書き出す。 The present invention provides a method for writing data in a processor, wherein the data is stored in one internal register, which is divided into a plurality of m-bit words by word boundaries, the method comprising a starting rotation step , A first shield writing step, a relay rotation step, a first writing top, an end rotation step, a second writing step, and a second shielding writing step. In the start rotation step, data is captured and rotated to the first position by the unaligned address of writing to generate first rotation data. In the first shield writing step, the first rotation data is shielded by the unaligned address of writing and is written to the storage device. In the relay rotation step, the subsequent data of the data is captured and rotated to the first position by the unaligned address that has been written to generate second rotation data. In the first writing step, the unwritten portion of the first rotation data and a part of the second rotation data are combined and written to the storage device. In the end rotation step, the subsequent data of the data is rotated to the first position to generate third rotation data. In the second writing step, the unwritten portion of the second rotation data and a part of the third rotation data are combined and written to the storage device. In the second shield writing step, the third rotation data is shielded and written to the storage device.
本発明はまた、プロセッサ中でデータを書き出す方法を提供し、そのうち、データは一つの記憶装置中の未アライメントアドレスに書き出され、該記憶装置はワード境界により複数のmビットのワードに分割され、この方法は、開始回転ステップ、第1遮蔽書き出しステップ、第2遮蔽書き出しステップを具えている。該開始回転ステップではデータをキャプチャし並びに書き出しの未アライメントアドレスによりそれを第1位置に回転させて第1回転データを生成する。該第1遮蔽書き出しステップでは未アライメントアドレスにより該第1回転データを遮蔽し並びに該記憶装置に書き出す。第2遮蔽書き出しステップでは、第1回転データの未書き出し部分に対して、遮蔽と記憶装置への書き出しを実行する。 The present invention also provides a method for writing data in a processor, wherein data is written to unaligned addresses in one storage device, and the storage device is divided into multiple m-bit words by word boundaries. The method includes a starting rotation step, a first shield writing step, and a second shield writing step. In the start rotation step, data is captured and rotated to the first position by the unaligned address of writing to generate first rotation data. In the first shield writing step, the first rotation data is shielded by the unaligned address and written to the storage device. In the second shield writing step, shielding and writing to the storage device are executed for the unwritten portion of the first rotation data.
本発明はまた、プロセッサ中でデータを書き出す装置を提供する。そのうち、データは一つの内部レジスタに保存され、記憶装置中の未アライメントアドレスに書き出され、該記憶装置はワード境界により複数のmビットのワードに分割され、この装置は、回転装置、ストアコンバインレジスタ、及び選択遮蔽装置を具えている。該回転装置は該内部レジスタに結合され、該未アライメントデータの書き出しアドレスにより、該内部レジスタのデータを第1位置に回転させる。該ストアコンバインレジスタは該回転装置に結合されて、該回転装置のデータを暫時保存する。該選択遮蔽装置は該回転装置及び該ストアコンバインレジスタに結合され、該書き出しアドレスにより、該回転装置及び該ストアコンバインレジスタのデータを選択遮蔽し、並びにそれを該記憶装置に書き出す。 The present invention also provides an apparatus for writing data in a processor. Among them, data is stored in one internal register and written to an unaligned address in the storage device, and the storage device is divided into a plurality of m-bit words by word boundaries. A resistor and a selective shielding device are provided. The rotation device is coupled to the internal register, and rotates the data in the internal register to the first position according to the write address of the unaligned data. The store combine register is coupled to the rotator and stores the data of the rotator for a while. The selective shielding device is coupled to the rotating device and the store combine register, and selectively writes the data of the rotating device and the store combine register according to the write address, and writes it to the storage device.
図4は本発明のプロセッサ中でデータを書き出す装置のブロック図である。それは、回転装置200、ストアコンバインレジスタ300、及び選択遮蔽装置400を具えている。そのうち、データはプロセッサの内部レジスタ100内に保存され、それは記憶装置500の未アライメント位置に書き出され、該記憶装置500はワード境界で複数のmビットのワードに分割され、本実施例では、mは32ビットとされ、即ち該記憶装置500は複数の32ビットのワードで組成されている。
FIG. 4 is a block diagram of an apparatus for writing data in the processor of the present invention. It comprises a
該回転装置200は該内部レジスタ100に結合され、該データの書き出し未アライメントアドレスにより、該内部レジスタ100のデータを第1位置に回転させる。該ストアコンバインレジスタ300は該回転装置200に結合され、該回転装置200のデータを暫時保存する。該選択遮蔽装置400は該回転装置200及びストアコンバインレジスタ300に結合されて、該データの書き出し未アライメントアドレスにより、該回転装置200とストアコンバインレジスタ300のデータを選択的に遮蔽し並びにそれを該記憶装置500に書き出す。
The
本発明のプロセッサ中でデータを書き出す装置には三つの命令が定義されて回転装置200、ストアコンバインレジスタ300、及び選択遮蔽装置400に関係する制御信号を発生させる。この三つの命令はそれぞれストアコンバイン開始(Store Combine Begin;SCB)、ソトアコンバインワード(Store Combine Word;SCW)、ストアコンバイン終了(Store Combine End;SCE)である。その形式は図5に示されるようである。
In the apparatus for writing data in the processor of the present invention, three instructions are defined to generate control signals related to the
SCB rD〔Addr〕命令は図6に示されるように、レジスタrD内容値を書き出しのアドレスAddr(s=Addr〔1:0〕)により、0、1、2及び3個のバイト回転させ、さらにストアコンバインレジスタ300(STCR)に書き出し、並びに書き出しのアドレスAddr(s=Addr〔1:0〕)によりそぞれ0、1、2及び3個のバイトを遮蔽し、さらに記憶装置500に書き出す。例えばSCB R16,〔101h〕はレジスタR16の内容値を書き出しのアドレス101h(s=1)により一つのバイト回転させ、さらにストアコンバインレジスタ300(STCR)に書き出し、並びに書き出しのアドレス101h(s=1)により一つのバイトを遮蔽した後、さらに記憶装置500のアドレス101h部分に書き出し、レジスタR16の内容値をABCDとし且つSCB R16,〔101h〕命令を実行完了した後、ストアコンバインレジスタ300(STCR)の内容値はDABCとなり、記憶装置のアドレス101hから013h部分の内容値はABCとなり、且つ記憶装置アドレス100h部分の内容値に変更はない。
As shown in FIG. 6, the SCB rD [Addr] instruction rotates the contents of the register rD by 0, 1, 2, and 3 bytes according to the write address Addr (s = Addr [1: 0]). Writing to the store combine register 300 (STCR) and shielding the 0, 1, 2, and 3 bytes respectively by the write address Addr (s = Addr [1: 0]), and further writing to the
SCW rD,〔Addr〕命令は図7に示されるように、レジスタrDの内容値をアドレスAddr(s=Addr〔1:0〕)によりそれぞれ0、1、2及び3個のバイト回転させ、並びに書き出しのアドレスAddr(s=Addr〔1:0〕)により0、1、2及び3個のバイトを遮蔽した後、さらにストアコンバインレジスタ300(STCR)に保存されたバイトと組み合わせた後、記憶装置500に書き込む。最後に、回転済みのレジスタrDの内容値をストアコンバインレジスタ300(STCR)中に書き出す。例えば、SCW R16,〔101h〕命令はレジスタR16内容値(ABCD)を書き出しのアドレス101h(s=1)により一つのバイト回転させ(DABC)、並びに書き出しのアドレス101h(s=1)により一つのバイト(D)を遮蔽し、さらにストアコンバインレジスタ300(STCR)に保存されたバイト(abcd)と組み合わせた後(aABC)、さらに記憶装置500のアドレス101h部分に書き出し(aABC)、最後に回転済みのレジスタrDの内容値(DABC)をストアコンバインレジスタ300(STCR)中に書き出し、ゆえにSCW R16,〔101h〕命令実行完了後に、該ストアコンバインレジスタ300(STCR)の内容値はDABCとなり、記憶装置のアドレス101hから013h部分の内容値はABCとなり、且つ記憶装置のアドレス100h部分の内容値はaとなる。
The SCW rD, [Addr] instruction rotates the contents of the register rD by 0, 1, 2, and 3 bytes, respectively, by the address Addr (s = Addr [1: 0]), as shown in FIG. After 0, 1, 2, and 3 bytes are shielded by the write address Addr (s = Addr [1: 0]) and further combined with the bytes stored in the store combine register 300 (STCR), the storage device Write to 500. Finally, the content value of the rotated register rD is written into the store combine register 300 (STCR). For example, the SCW R16, [101h] instruction rotates the contents of the register R16 (ABCD) by one byte (DABC) by the
SCE〔Addr〕命令は図8に示されるようであり、ストアコンバインレジスタ300(STCR)の内容値を書き出しのアドレスAddr(s=Addr〔1:0〕)によりそれぞれ0、1、2及び3個のバイトを遮蔽し、さらに記憶装置500に書き出す。例えばSCW〔101h〕命令でストアコンバインレジスタ300(STCR)の内容値(abcd)に対して書き出しのアドレス101h(s=1)により三つのバイト(bcd)を遮蔽し、さらに記憶装置500のアドレス100h部分(a)に書き込み、ゆえに、SCE〔101h〕命令実行後に、記憶装置アドレス101hから103h部分の内容値は未改変で、且つ記憶装置アドレス100h部分の内容値はaとなる。
The SCE [Addr] instruction is as shown in FIG. 8, and the contents of the store combine register 300 (STCR) are 0, 1, 2, and 3 respectively depending on the address Addr (s = Addr [1: 0]) to be written. Are then written to the
図9はSCB rD,〔Addr〕、SCW rD,〔Addr〕、SCE〔Addr〕命令が二種類のデータ配列方式(little endian、big endian)にある時の各種の実行状況を示す。そのうち、該ストアコンバインレジスタ200(LDCR)中のデータはabcdとされ、記憶装置中の100h〜103h部分のデータはXYZWとされ、レジスタrD中のデータはABCDとされ、s=0はアクセス記憶装置アドレスが4Nであることを代表し、s=1はアクセス記憶装置アドレスが4N+1であることを代表し、s=2はアクセス記憶装置アドレスが4N+2であることを代表し、s=3はアクセス記憶装置アドレスが4N+3であることを代表する。Nは正の整数である。 FIG. 9 shows various execution situations when the SCB rD, [Addr], SCW rD, [Addr], and SCE [Addr] instructions are in two types of data arrangement methods (little endian and big endian). Among them, the data in the store combine register 200 (LDCR) is abcd, the data of the 100h to 103h portions in the storage device is XYZW, the data in the register rD is ABCD, and s = 0 is the access storage device The address is 4N, s = 1 represents the access storage device address is 4N + 1, s = 2 represents the access storage device address is 4N + 2, and s = 3 is the access storage. It represents that the device address is 4N + 3. N is a positive integer.
図10は本発明の応用例表示図である。一組のレジスタR16、R17、R18中のデータ(ABCDEFGHIJKL)を記憶装置500の101h〜10Ch位置に書き込む時は、まずSCB R16〔101h〕命令を実行し、レジスタR16の内容値を書き出しのアドレス101h(s=1)により、一つのバイト回転させ(DABC)(開始回転ステップ)、さらに、ストアコンバインレジスタ300(STCR)に書き出し、並びに書き出しのアドレス101h(s=1)により1個のバイトを遮蔽し、さらに記憶装置500の101h〜103h部分に書き出す(第1遮蔽書き出しステップ)、ゆえにSCB R16〔101h〕命令の実行完了後、該ストアコンバインレジスタ300(STCR)の内容値はDABCとなり、記憶装置のアドレス101hから103hの内容値はABCとなり、且つ記憶装置のアドレス100h部分の内容値に変更はなく(a)となる。
FIG. 10 is an application example display diagram of the present invention. When writing the data (ABCDEFGHIJKL) in the set of registers R16, R17, and R18 to the
さらにSCW R17,〔105h〕命令を実行する。レジスタR17の内容値(EFGH)を書き出しのアドレス105h(s=1)により1個のバイト回転させ(HEFG)(中継回転ステップ)、並びに書き出しのアドレス105h(s=1)により1個のバイト(H)を遮蔽した後、さらにストアコンバインレジスタ300(STCR)に保存されたバイト(DABC)と組み合わせた後(DEFG)、さらに記憶装置500のアドレス105hを含む四つのバイト104h〜108h部分に書き出し(DEFG)(第1書き出しステップ)。最後に、回転済みのレジスタR17の内容値をストアコンバインレジスタ300(STCR)中に書き出す。ゆえに、SCW R17,〔105h〕命令実行後に、該ストアコンバインレジスタ300(STCR)の内容値はHEFGとなり、記憶装置アドレス104hから107h部分の内容値はDEFGとなる。
Further, the SCW R17, [105h] instruction is executed. The content value (EFGH) of the register R17 is rotated by one byte by the
その後、さらにSCW R18,〔109h〕命令を実行し、レジスタR18の内容値(IJKL)を書き出しのアドレス109h(s=1)により一つのバイト回転させ(LIJK)(中継回転ステップ)、並びに書き出しのアドレス109h(s=1)により一つのバイト(L)を遮蔽し、さらにストアコンバインレジスタ300(STCR)に保存されたバイト(HEFG)と組み合わせた後(HIJK)、さらに記憶装置500のアドレス109h部分を含む四つのバイト108h〜10Bh部分に書き出し(HIJK)(第2書き出しステップ)、最後に回転済みのレジスタR18の内容値(IJKL)をストアコンバインレジスタ300(STCR)中に書き出し、ゆえにSCW R18,〔109h〕命令実行後に、ストアコンバインレジスタ300(STCR)の内容値はLIJKとなり、記憶装置のアドレス108hから10Chの内容値はHIJKとなる。
Thereafter, the SCW R18, [109h] instruction is further executed, and the content value (IJKL) of the register R18 is rotated by one byte by the write address 109h (s = 1) (LIJK) (relay rotation step), and the write One byte (L) is shielded by the address 109h (s = 1) and further combined with the byte (HEFG) stored in the store combine register 300 (STCR) (HIJK), and further the address 109h portion of the
最後に、SCE 〔10Dh〕命令を実行し、ストアコンバインレジスタ300(STCR)の内容値(LIJK)に対して書き出しのアドレス10Dh(s=1)により三つのバイト(IJK)を遮蔽し、さらに該記憶装置500のアドレス10Ch部分に書き出し(第1遮蔽書き出しステップ)、ゆえにSCE 〔10Dh〕命令実行後に、該ストアコンバインレジスタ300(STCR)内容値はLIJKであり、記憶装置アドレス10Dhから10Fn部分の内容値は未改変(n,o,p)であり、且つ記憶装置のアドレス10Ch部分の内容値はLとなる。 Finally, the SCE [10Dh] instruction is executed, and the three bytes (IJK) are shielded by the write address 10Dh (s = 1) with respect to the content value (LIJK) of the store combine register 300 (STCR). Writing to the address 10Ch portion of the storage device 500 (first shield writing step), therefore, after execution of the SCE [10Dh] instruction, the content value of the store combine register 300 (STCR) is LIJK, and the contents of the storage device addresses 10Dh to 10Fn The value is unmodified (n, o, p), and the content value of the address 10Ch portion of the storage device is L.
図11は本発明のもう一つの運用の表示図であり、一組のレジスタR16中のデータ(ABCD)が記憶装置500の101h〜104h位置に書き込まれる時、まずSCB R16,〔101h〕命令が実行されて、レジスタR16の内容値(ABCD)が書き出しのアドレス101h(s=1)により一つのバイト回転され(DABC)、さらにストアコンバインレジスタ300(STCR)に書き込まれ、並びに書き出しのアドレス101h(s=1)により一つのバイトが遮蔽された後、記憶装置500のアドレス101h〜103h部分に書き出され、ゆえにSCB R16,〔101h〕命令の実行完了後、該ストアコンバインレジスタ300(STCR)の内容値はDABCとなり、記憶装置のアドレス101hから013h部分の内容値はABCとなり、且つ記憶装置のアドレス100h部分の内容値は未改変(a)となる。
FIG. 11 is a display diagram of another operation of the present invention. When the data (ABCD) in the set of registers R16 is written in the
その後、SCE〔105h〕命令が実行され、ストアコンバインレジスタ300(STCR)の内容値(DABC)に対して書き出しのアドレス105h(s=1)により三つのバイト(ABC)が遮蔽され、さらに記憶装置500のアドレス104h部分に書き出され(D)、ゆえにSCE〔105h〕命令の実行完了後、ストアコンバインレジスタ300(STCR)の内容値はDABCとなり、記憶装置のアドレス105hから107h部分の内容値は未改変(f,g,h)となり、且つ記憶装置のアドレス104h部分の内容値はDとなる。
Thereafter, the SCE [105h] instruction is executed, and the three bytes (ABC) are shielded by the
100 レジスタ 200 回転装置
300 ストアコンバインレジスタ 400 選択遮蔽装置
500 記憶装置
100
Claims (20)
該開始回転ステップでは該データをキャプチャし並びに書き出しの未アライメントアドレスによりそれを第1位置に回転させて第1回転データを生成し、
該第1遮蔽書き出しステップでは、書き出しの未アライメントアドスにより第1回転データに対して遮蔽し並びに該記憶装置に書き出し、
該中継回転ステップでは、該データの後続データをキャプチャし、書き出しの未アライメントアドレスによりそれを第1位置に回転させて、第2回転データを生成し、
該第1書き出しステップでは、第1回転データの未書き出し部分及び第2回転データの一部を組み合わせ、並びに該記憶装置に書き出し、
該終了回転ステップでは、該データの後続データを第1位置に回転させて、第3回転データを生成し、
該第2書き出しステップでは、第2回転データの未書き出し部分と第3回転データの一部を組み合わせ、並びに該記憶装置に書き出し、
該第2遮蔽書き出しステップでは、第3回転データを遮蔽し並びに該記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す方法。 A method for writing data in a processor, wherein data is written to unaligned addresses in a storage device, and the storage device is divided into a plurality of m-bit words by word boundaries, the method comprising a starting rotation step A first shielding writing step, a relay rotation step, a first writing step, an end rotation step, a second writing step, a second shielding writing step,
The starting rotation step captures the data and rotates it to the first position by the unaligned address of writing to generate first rotation data;
In the first shield writing step, the first rotation data is shielded by the unaligned address of writing and written to the storage device,
In the relay rotation step, the subsequent data of the data is captured and rotated to the first position by the unaligned address of the writing to generate the second rotation data,
In the first writing step, the unwritten portion of the first rotation data and a part of the second rotation data are combined and written to the storage device,
In the end rotation step, the subsequent data of the data is rotated to the first position to generate third rotation data,
In the second writing step, the unwritten portion of the second rotation data and a part of the third rotation data are combined and written to the storage device,
A method of writing data in a processor, characterized in that, in the second shield writing step, the third rotation data is shielded and written to the storage device.
該開始回転ステップではデータをキャプチャし並びに書き出しの未アライメントアドレスによりそれを第1位置に回転させて第1回転データを生成し、
該第1遮蔽書き出しステップでは未アライメントアドレスにより該第1回転データを遮蔽し並びに該記憶装置に書き出し、
該第2遮蔽書き出しステップでは、第1回転データの未書き出し部分に対して、遮蔽と記憶装置への書き出しを実行することを特徴とする、プロセッサ中でデータを書き出す方法。 A method for writing data in a processor, wherein data is written to unaligned addresses in one storage device, and the storage device is divided into a plurality of m-bit words by word boundaries, the method starts Comprising a rotation step, a first shield writing step, a second shield writing step,
The starting rotation step captures data and rotates it to the first position by the unaligned address of writing to generate first rotation data;
In the first shield writing step, the first rotation data is shielded by an unaligned address and written to the storage device;
A method of writing data in a processor, wherein, in the second shielding writing step, shielding and writing to a storage device are executed for an unwritten portion of the first rotation data.
該回転装置は該内部レジスタに結合され、該未アライメントデータの書き出しアドレスにより、該内部レジスタのデータを第1位置に回転させ、
該ストアコンバインレジスタは該回転装置に結合されて、該回転装置のデータを暫時保存し、
該選択遮蔽装置は該回転装置及び該ストアコンバインレジスタに結合され、該書き出しアドレスにより、該回転装置及び該ストアコンバインレジスタのデータを選択遮蔽し、並びにそれを該記憶装置に書き出すことを特徴とする、プロセッサ中でデータを書き出す装置。 A device for writing data in a processor, the data being stored in an internal register of the processor and written to an unaligned address in a storage device, the storage device being divided into a plurality of m-bit words by word boundaries; The device comprises a rotating device, a store combine register, and a selective shielding device,
The rotating device is coupled to the internal register, and rotates the data in the internal register to the first position by the write address of the unaligned data.
The store combine register is coupled to the rotator to store the rotator data for a while,
The selective shielding device is coupled to the rotating device and the store combine register, and the data of the rotating device and the store combine register is selectively shielded by the write address and written to the storage device. A device that writes data in the processor.
18. The apparatus for writing data in a processor according to claim 17, wherein the rotating device rotates 24 bits to the right.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004078339A JP2005267215A (en) | 2004-03-18 | 2004-03-18 | Device and method for writing out data in processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004078339A JP2005267215A (en) | 2004-03-18 | 2004-03-18 | Device and method for writing out data in processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005267215A true JP2005267215A (en) | 2005-09-29 |
Family
ID=35091706
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004078339A Pending JP2005267215A (en) | 2004-03-18 | 2004-03-18 | Device and method for writing out data in processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005267215A (en) |
-
2004
- 2004-03-18 JP JP2004078339A patent/JP2005267215A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5450605A (en) | Boundary markers for indicating the boundary of a variable length instruction to facilitate parallel processing of sequential instructions | |
JPH06332792A (en) | Data processor, data reading control circuit thereof and data writing control circuit | |
JP3203401B2 (en) | Data processing device | |
US20100138638A1 (en) | System and method of instruction modification | |
JP2005267215A (en) | Device and method for writing out data in processor | |
JP2748957B2 (en) | Data processing device | |
JPH0363092B2 (en) | ||
US7308556B2 (en) | Device and method for writing data in a processor to memory at unaligned location | |
US7308554B2 (en) | Processor-based automatic alignment device and method for data movement | |
US7308555B2 (en) | Processor-based structure and method for loading unaligned data | |
JP2005275703A (en) | Processor, and context switching method | |
JP2005267209A (en) | Device and method for reading unaligned data in processor | |
JPS6047615B2 (en) | Serialized instruction execution control method | |
JPS6149695B2 (en) | ||
JPS61241836A (en) | Storage device | |
JPH05257807A (en) | Cache memory controller | |
JPH0546389A (en) | Parallel processor | |
JP2622026B2 (en) | Register writing control method in central processing unit | |
JP2003187583A (en) | Semiconductor memory device and controller | |
JP2002007154A (en) | Information processor | |
JPS58154045A (en) | Information processor | |
JPH0752402B2 (en) | Data processing device | |
JP2001109669A (en) | Method and circuit for testing ram | |
JPH02183332A (en) | Programmed control system | |
JP2000207227A (en) | Arithmetic and logic unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20050824 |
|
A602 | Written permission of extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A602 Effective date: 20050829 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20051227 |