JPH0675742A - Data converter - Google Patents

Data converter

Info

Publication number
JPH0675742A
JPH0675742A JP22978792A JP22978792A JPH0675742A JP H0675742 A JPH0675742 A JP H0675742A JP 22978792 A JP22978792 A JP 22978792A JP 22978792 A JP22978792 A JP 22978792A JP H0675742 A JPH0675742 A JP H0675742A
Authority
JP
Japan
Prior art keywords
data
processor
signal
bus
format
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
Application number
JP22978792A
Other languages
Japanese (ja)
Inventor
Hiroo Hayashi
宏雄 林
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP22978792A priority Critical patent/JPH0675742A/en
Publication of JPH0675742A publication Critical patent/JPH0675742A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a data converter which can automatically convert the array of bytes in a memory access mode. CONSTITUTION:The data buses 5-8 are connected to a processor 9 via a selector 21. The information 17 showing the arrangement sequence of the data on pages is stored in response to each page in a page table 14 of an address converter used by the processor 9 in a memory access mode. Thus the selector 21 refers to the information 17 in a memory access mode and supplies the data to the processor 9 after conversion of the arrangement order of data on the data buses.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電子計算機装置に関わ
り、特にプロセッサのデータ・バス上のデータに対する
アクセスを制御するデータ変換装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system, and more particularly to a data conversion system for controlling access to data on a data bus of a processor.

【0002】[0002]

【従来の技術】複数バイトの整数データをメモリに格納
する場合、その各バイト・データをメモリに格納する順
序として幾つかの方法がある。これらの格納方式として
littleendian と呼ばれるものとbig endianと呼ばれる
ものが広く用いられている。
2. Description of the Related Art When storing a plurality of bytes of integer data in a memory, there are several methods for storing each byte data in the memory. As a storage method for these
What is called little endian and what is called big endian are widely used.

【0003】このうちlittle endian と呼ばれるもの
は、複数バイトからなるデータのうち最下位のバイト・
データから順に、それぞれ若いアドレスから順に格納さ
れる。これに対してbig endianと呼ばれるものは、最上
位のバイト・データから順に、それぞれ若いアドレスか
ら順に格納される。
Of these, the one called "little endian" is the least significant byte of data consisting of multiple bytes.
The data is stored in order from the youngest address, and the data is stored in order from the lowest address. On the other hand, what is called big endian is stored in order from the most significant byte data, and from a young address.

【0004】従来複数バイト・データにアクセスを行な
う場合、メモリ・アクセスを行なう装置が仮定している
データ順序と、メモリに格納されているデータの格納順
序が異なる場合、ソフトウェアでデータ順序を変換する
必要があった。
When a plurality of bytes of data are conventionally accessed, the data order stored in the memory is different from the storage order of the data stored in the memory, and the data order is converted by software. There was a need.

【0005】例えばデータがlittle endian で格納され
ていることを前提に設計されたプロセッサがbig endian
で格納された2バイトのワード・データを読み出す場
合、本来下位バイトに読み込まれるバイト・データが上
位バイトに、上位バイトに格納されるべきバイト・デー
タが下位バイトに、それぞれ格納されてしまうことにな
る。そこでこのデータを使用する前にバイト順序を入れ
換える必要がある。書き込みの場合も同様にバイト順序
を変えてから、メモリに書き込まなければならない。こ
れらの変換操作はソフトウェアで行なわなければならな
い。ここでプロセッサが読み込んだデータのバイト並び
を変換する命令を持っていたとしても、その命令をソフ
トウェアで明示的に実行しなければならない。
For example, a processor designed on the assumption that data is stored in little endian is a big endian
When reading the 2-byte word data stored in, the byte data originally read in the lower byte is stored in the upper byte, and the byte data that should be stored in the upper byte is stored in the lower byte. Become. Therefore, it is necessary to change the byte order before using this data. Similarly, when writing, the byte order must be changed before writing to memory. These conversion operations must be done in software. Even if the processor has an instruction to convert the byte sequence of the read data, the instruction must be explicitly executed by software.

【0006】図2に示す密結合共有メモリsystemを例に
あげる。このsystemは、メモリ上のデータをlittle end
ian で格納されているものとしてアクセスするprocessr
o (1)(例えばDEC社のVAXシリーズ、Inte
l社の86シリーズなど)と、big endianで格納されて
いるものとしてアクセスするprocessor (2)(例えば
Motorola社の68000 シリーズ、SUN社のSPARCプ
ロセッサなど)と、これらのプロセッサがアクセスする
共有メモリ(3)と、これらを結合するデータ・バス
(4)からなる。ここでlittle endian のプロセッサが
書き込んだデータをbig endianのプロセッサが読み出す
場合、ソフトウェアで一旦バイト並びを変換してから扱
わなければならなかった。
The tightly coupled shared memory system shown in FIG. 2 will be taken as an example. This system little end the data in memory
processr to access as stored in ian
o (1) (eg DEC VAX series, Inte
l company's 86 series, etc.) and a processor (2) that accesses as stored as big endian (for example,
Motorola 68000 series, SUN SPARC processor, etc.), shared memory (3) accessed by these processors, and a data bus (4) connecting them. Here, when the data written by the little endian processor is read by the big endian processor, software had to first convert the byte sequence and then handle it.

【0007】また従来ネットワークを用いた分散環境な
どでendianの異なるデータをアクセスする場合、基本ソ
フトウェアでアクセスする毎にデータ・サイズを指定
し、必要に応じてバイト並びを変換してからデータをア
プリケーション・ソフトウェアに渡している。この場合
もバイト並びを変換が必要な場合はソフトウェアで変換
を行なうことに変わりはない。
When accessing data with different endians in a distributed environment using a conventional network, the data size is specified for each access by the basic software, the byte sequence is converted as necessary, and then the data is applied to the application.・ It is passed to the software. Even in this case, if the byte arrangement needs to be converted, the conversion is performed by software.

【0008】またMIPS社のR4000、Motorola社
M88000などのプロセッサでは、内部レジスタの値
を書き換えることによりlittle endian とbig endianを
切替えることが可能となっている。このレジスタの値を
書き換えることにより、それ以後の全てのメモリ・アク
セスの並びを変換する。ここでメモリ・アクセスは命令
コードに対するものとデータに対するものに分類される
が、これらのプロセッサにおいてメモリ・アクセスの並
びを変換した場合、命令コードのアクセスにおけるデー
タの並びも変換してしまう。ここでlittle endian のデ
ータにアクセスする命令コードはlittle endian でなく
てはならないため、一つのプログラム・コード内に異な
るデータ並びの命令コードが混在しなければならない。
このためプログラム・コードの生成が繁雑となる。また
このプログラム・コードの生成が繁雑となる問題は、プ
ログラム・コードのバイト並びは固定とし、データに対
するメモリ・アクセスのデータ並びのみを変換するよう
にすることにより解決されるが、この場合でもデータ並
びの異なるデータをアクセスする毎に、そのデータのデ
ータ並びに合わせてデータ並びを変換する命令(内部レ
ジスタへの書き込み命令)を挿入しなければならない。
In processors such as R4000 manufactured by MIPS and M88000 manufactured by Motorola, little endian and big endian can be switched by rewriting the value of the internal register. By rewriting the value of this register, the sequence of all subsequent memory accesses is converted. Here, memory access is classified into one for instruction codes and one for data. However, when the arrangement of memory accesses is converted in these processors, the arrangement of data in the access of instruction codes is also converted. Here, the instruction code to access little endian data must be little endian, so instruction codes with different data sequences must be mixed in one program code.
Therefore, the generation of program code becomes complicated. The problem of complicated program code generation can be solved by fixing the byte sequence of the program code and converting only the data sequence of the memory access to the data. Every time the data having a different arrangement is accessed, the data of the data and an instruction for converting the arrangement of the data (writing instruction to the internal register) must be inserted.

【0009】次に浮動小数データの変換を例にあげる。
データ並びと同様にデータ・フォーマットつまり浮動小
数値のビット表現方法として幾つかの方法が用いられて
いる。例えばIEEE標準フォーマット、IBMフォー
マット、DECフォーマットなどが広く用いられてい
る。従来これらのデータをアクセスする時、プログラム
でその対象のデータがどのフォーマットであるかを意識
し、必要であればプログラム中に変換命令などを入れる
ことによって明示的にデータ・フォーマットを変換しな
ければならなかった。
Next, conversion of floating point data will be described as an example.
Similar to the data arrangement, several methods are used as a data format, that is, a bit representation method of a floating point value. For example, the IEEE standard format, the IBM format, the DEC format and the like are widely used. Conventionally, when accessing these data, the program must be aware of the format of the target data, and if necessary, explicitly convert the data format by including a conversion instruction in the program. did not become.

【0010】[0010]

【発明が解決しようとする課題】以上述べたように、従
来プロセッサなどで、そのプロセッサが仮定しているバ
イト並びと異なるバイト並びのデータをアクセスしよう
とした場合、そのデータ並びを考慮して、ソフトウェア
でデータの並びを変えるか、メモリアクセス時にバイト
並びを変換することを指示する命令を入れるなど、その
データの並びを意識してアクセスしなければならなかっ
た。
As described above, when a conventional processor or the like attempts to access data in a byte arrangement different from the byte arrangement assumed by the processor, the data arrangement is taken into consideration. It was necessary to access while paying attention to the arrangement of the data, such as changing the arrangement of the data by software or inserting an instruction to convert the byte arrangement when accessing the memory.

【0011】また浮動小数点デ−タなどの場合も、アク
セスするデ−タがどのフォ−マットであるかを意識し
て、必要に応じてソフトウェアでフォ−マットを変換し
なければならなかった。
Also in the case of floating point data, it is necessary to convert the format by software, if necessary, in consideration of which format the accessed data is.

【0012】本発明は以上の点を鑑みてなされたもの
で、メモリアクセス時にバイト並びあるいはデ−タフォ
−マットの変換を自動的に行うことのできるデータ変換
装置の提供を目的とする。
The present invention has been made in view of the above points, and an object of the present invention is to provide a data conversion device capable of automatically converting byte arrangement or data format at the time of memory access.

【0013】[0013]

【課題を解決するための手段】本発明に係るデータ変換
装置は、データ・バスとプロセッサをつなぐものであっ
て、アドレスによってそのアドレスのデータのデータ・
バス上での配列順序を知る手段と、この配列順序にした
がってデータ・バス上のデータの配列順序を変換してプ
ロセッサに供給する手段とを具備する。
A data conversion apparatus according to the present invention connects a data bus and a processor, and a data converter for data of an address
Means for knowing the arrangement order on the bus and means for converting the arrangement order of the data on the data bus according to the arrangement order and supplying the data to the processor are provided.

【0014】また本発明は上記の配列順序を知る手段と
して、アドレス変換装置内のページ・テーブルの各エン
トリに、対応するそれぞれのページのデータ・バス上で
の配列順序を格納する手段を具備する。
The present invention further comprises means for storing the arrangement order on the data bus of each corresponding page in each entry of the page table in the address translation device as means for knowing the arrangement order. .

【0015】また本発明のもう1つの発明に係るデータ
変換装置は、データ・バス上のデータの配列順序を示す
データ・バスから供給される信号にしたがってデータ・
バス上のデータの配列順序を変換してプロセッサに供給
する手段を具備する。
A data conversion device according to another invention of the present invention is a data conversion device which operates in accordance with a signal supplied from a data bus which indicates an arrangement order of data on the data bus.
A means for converting the arrangement order of the data on the bus and supplying it to the processor is provided.

【0016】[0016]

【作用】本発明によれば、データ・アクセス時にそのデ
ータ・アドレスによってデータの配列順序を知ることが
可能となる。この情報によってデータの配列順序を変更
する必要があることが判明した場合は、配列順序を変換
する手段を用いてデータの配列順序を変換する。
According to the present invention, it becomes possible to know the data arrangement order from the data address at the time of data access. When it is found that the arrangement order of the data needs to be changed by this information, the arrangement order of the data is changed by using the means for changing the arrangement order.

【0017】また本発明によれば、アドレス変換装置内
のページ・テーブル各エントリにそれぞれのページのデ
ータの配列順序を格納することにより、データ・アクセ
ス時にそのアクセス・アドレスによってページ・テーブ
ルを引き、対応するページ・テーブル・エントリのこの
配列順序を示す情報を得ることが可能となる。これによ
り必要に応じてデータの配列順序の変換を行なう。
Further, according to the present invention, by storing the arrangement order of the data of each page in each page table entry in the address translation device, the page table is pulled by the access address at the time of data access, It is possible to obtain information indicating this ordering of the corresponding page table entries. Thereby, the arrangement order of the data is changed as necessary.

【0018】また本発明によれば、データ・バスからデ
ータ・アクセス時にデータと共にデータの配列順序を示
す信号が供給される。そしてこの信号で示されるデータ
配列情報によって、必要に応じてデータの配列順序の変
換を行なう。
Further, according to the present invention, a signal indicating the data arrangement order is supplied from the data bus together with the data when the data is accessed. Then, according to the data arrangement information indicated by this signal, the arrangement order of the data is changed as necessary.

【0019】[0019]

【実施例】図1に本発明の第1の実施例に係るデータ変
換装置の構成を示す。これはlittle endian もしくはbi
g endianのデータが現れる32bitのシステム・デー
タ・バス(5),(6),(7),(8)と32bit
プロセッサ(9)のデータ・バスであるプロセッサ・デ
ータ・バス(10),(11),(12),(13)と
を接続するものである。システム・データ・バス(5〜
8)は、図2のシステム・バス4に相当し、他のプロセ
ッサやI/O機器,メモリ等のデータ入出力装置が接続
されている。プロセッサ(9)はこれらのデータ・バス
を介して他のデータ入出力装置へアクセス(読出/書
込)を行う。
FIG. 1 shows the configuration of a data converter according to a first embodiment of the present invention. This is little endian or bi
32 bit system data bus (5), (6), (7), (8) and 32 bit where gendian data appears
The processor data buses (10), (11), (12) and (13) which are the data buses of the processor (9) are connected to each other. System data bus (5-
Reference numeral 8) corresponds to the system bus 4 in FIG. 2, and is connected with other processors, I / O devices, data input / output devices such as memories. The processor (9) accesses (reads / writes) other data input / output devices via these data buses.

【0020】なおここでは、ショート・ワード(2by
te)、ワード(4byte)のデータはそれぞれのワ
ード境界に合わせられるものとする。つまりショート・
ワード・データはアドレスの最下位1bitが0、ワー
ド・データはアドレスの最下位2bitが0であるもの
とする。
In this example, the short word (2by
te) and word (4 byte) data are aligned with the respective word boundaries. I mean short
It is assumed that the lowest 1 bit of the address of the word data is 0 and the lowest 2 bits of the address of the word data is 0.

【0021】32bitのシステム・データ・バスは8
bit毎に4つの組に分けられる。以下0bit目から
7bit目をB0(5)、8bit目から15bit目
をB1(6)、16bit目から23bit目をB2
(7)、24bit目から31bit目をB3(8)と
それぞれ呼ぶ。図3に示されるように、バイト・データ
はそのアドレスの最下位2bitによって、アドレスの
下位2bitが2進表現で00、01、10、11のバ
イト・データはそれぞれB0、B1、B2、B3にそれ
ぞれ現れる。
8 32-bit system data bus
Each bit is divided into four groups. Below, B0 (5) from 0th bit to 7th bit, B1 (6) from 8th bit to 15th bit, and B2 from 16th bit to 23th bit.
(7), the 24th bit to the 31st bit are called B3 (8), respectively. As shown in FIG. 3, the byte data is the least significant 2 bits of the address, and the least significant 2 bits of the address are in binary notation 00, 01, 10 and 11 in the byte data B0, B1, B2 and B3, respectively. Each appears.

【0022】同様に32bitのプロセッサ・データ・
バスも8bit毎に4つの組に分けられる。下位から0
bit目から7bit目をP0(10)、8bit目か
ら15bit目をP1(11)、16bit目から23
bit目をP2(12)、24bit目から31bit
目をP3(13)とそれぞれ呼ぶ。このプロセッサ・デ
ータ・バスにはプロセッサ内部で使用されるbit順序
で信号が現れる。つまり最下位バイトから順にP0,P
1,P2,P3に現れる。
Similarly, 32 bits of processor data
The buses are also divided into 4 groups every 8 bits. 0 from the bottom
P0 (10) from the 7th bit to P1 (11) from the 8th bit to 15th bit, and 23 from the 16th bit
Bit 2 is P2 (12), 24 bits to 31 bits
The eyes are called P3 (13), respectively. Signals appear on this processor data bus in the bit order used within the processor. That is, P0 and P in order from the least significant byte
Appears at 1, P2, P3.

【0023】図1において、ページ・テーブル(14)
は通常のアドレス変換・データ保護などを行なうための
情報の他に、現在アクセスされているデータ・アドレス
のデータ並びがlittle endian であるかbig endianであ
るかを示す1bitの情報を格納し、アクセスされてい
るページに対応するこのデータ並びを示す信号を出力す
る。このページ・テーブルのそれぞれのページ・テーブ
ル・エントリには、通常の対応するページの物理ページ
番号(15)、アクセス保護情報などを格納する幾つか
のフラグ・ビット(16)などの他に、そのページのデ
ータがシステム・データ・バス上でbig endianで現れる
か、little endian で現れるかを示すendian bit(1
7)を持つ。データ・アクセス時には対応するページの
endian bitの値がendian信号(18)として出力され
る。
In FIG. 1, the page table (14)
Stores 1-bit information indicating whether the data arrangement of the currently accessed data address is little endian or big endian, in addition to the information for normal address translation / data protection, etc. A signal indicating this data sequence corresponding to the page being output is output. Each page table entry of this page table contains, in addition to the physical page number of the normal corresponding page (15), some flag bits (16) for storing access protection information, etc. Endian bit (1 indicating whether page data appears as big endian or little endian on the system data bus
Have 7). When accessing data, the corresponding page
The value of the endian bit is output as the endian signal (18).

【0024】図1においてデータ・サイズ信号size
(19)はプロセッサが出力する信号で、データ・アク
セス時にそのデータ・アクセス・サイズが、バイト(8
bit)、ショート・ワード(16bit)、ワード
(32bit)のいずれかであることを示す。同様にア
ドレス信号adrs[1:0](20)もプロセッサに
よって出力される信号で、データ・アクセス時にそのデ
ータ・アドレスの最下位2bitを示す。
In FIG. 1, the data size signal size
(19) is a signal output by the processor, and the data access size at the time of data access is byte (8
bit), short word (16 bits), or word (32 bits). Similarly, the address signal adrs [1: 0] (20) is also a signal output by the processor and indicates the lowest 2 bits of the data address at the time of data access.

【0025】図1において(21)は、その入力制御信
号であるendian信号、データ・サイズ信号size、ア
ドレス信号adrs[1:0]の値に従って、システム
・データ・バスとプロセッサ・データ・バスとをバイト
並びを変換して接続するデータ選択装置である(図
4)。
In FIG. 1, (21) indicates a system data bus and a processor data bus according to the values of the endian signal, the data size signal size, and the address signal adrs [1: 0] which are the input control signals. Is a data selection device for converting byte sequences and connecting them (FIG. 4).

【0026】このデータ選択装置内には4組みの8bi
t信号選択装置(22),(23),(24),(2
5)がある。これらはそれぞれに対応する制御信号C0
(26),C1(27),C2(28),C3(29)
の値にしたがってシステム・データ・バス側の2もしく
は4組の8bit信号のいずれかとプロセッサ側の8b
it信号を接続する。例えば内部制御信号C2が0の時
はプロセッサ・データ・バスのP2とシステム・データ
・バスのB1とを接続する。同様に内部制御信号C2が
1の時はプロセッサ・データ・バスのP2とシステム・
データ・バスのB2とを接続する。
In this data selection device, four sets of 8 bi
t signal selection device (22), (23), (24), (2
There is 5). These are control signals C0 corresponding to the respective
(26), C1 (27), C2 (28), C3 (29)
Either 2 or 4 sets of 8 bit signals on the system data bus side and 8b on the processor side according to the value of
Connect the it signal. For example, when the internal control signal C2 is 0, the processor data bus P2 and the system data bus B1 are connected. Similarly, when the internal control signal C2 is 1, the processor data bus P2 and system
Connect to B2 of data bus.

【0027】プロセッサ(9)がlittle endian である
場合のデータ選択装置の、入力制御信号、endian信号、
データ・サイズ信号size、アドレス信号adrs
[1:0]のそれぞれの値と、内部制御信号C0,C
1,C2,C3との対応を図5に示す。また同図にはこ
れらの入力制御信号に従って生成される内部制御信号に
従って、プロセッサ・データ・バスとシステム・データ
・バスとが各々どのように接続されるかも示されてい
る。尚、big endianのアクセスをするプロセッサに接続
されている選択装置の場合は、endian信号がlittleのと
きには表の下段に示す動作を行い、endian信号がbig の
ときには表の上段に示す動作をすることになる。以下本
実施例のデータ・アクセス時の動作を説明する。動作の
流れを図6に示す。
When the processor (9) is little endian, the input control signal, endian signal,
Data size signal size, address signal adrs
Each value of [1: 0] and internal control signals C0, C
The correspondence with 1, C2 and C3 is shown in FIG. The figure also shows how the processor data bus and the system data bus are connected according to internal control signals generated according to these input control signals. For a selection device connected to a processor that accesses big endian, perform the operation shown in the lower part of the table when the endian signal is little and the operation shown in the upper part of the table when the endian signal is big. become. The operation at the time of data access of this embodiment will be described below. The operation flow is shown in FIG.

【0028】まずプロセッサ(9)はアクセスするデー
タの論理アドレスを出力する(S1)。この論理アドレ
スが含まれるメモリ・ページに対応するエントリをペー
ジ・テーブル(14)から選択する(S2)。このペー
ジ・テーブルにあらかじめ、そのページの物理アドレス
(15)や保護情報(16)などと共に、そのページの
バイト並びを示す情報(17)が格納されている。メモ
リ・アクセス時にはこの選択されたページ・テーブル・
エントリ・バイト並びを示す情報がendian信号(18)
として出力される(S3)。
First, the processor (9) outputs the logical address of the data to be accessed (S1). The entry corresponding to the memory page including this logical address is selected from the page table (14) (S2). In this page table, information (17) indicating the byte order of the page is stored in advance together with the physical address (15) and protection information (16) of the page. When accessing the memory, this selected page table
Information indicating the entry byte sequence is the endian signal (18)
Is output as (S3).

【0029】またプロセッサ(9)からアドレスととも
にそのデータ・アクセスのデータ・サイズを示すsiz
e信号(19)も出力される。このsize(19)信
号と先のendian信号(18)とアドレス信号の下位2bit
(20)を選択装置に与える。選択装置はこれらの信号
から内部制御信号C0(26),C1(27),C2
(28),C3(29)を生成し、4組みの8bit信
号選択装置(22),(23),(24),(25)に
与える(S4,S5)。これによりシステム・データ・
バス(5),(6),(7),(8)とプロセッサ・デ
ータ・バス(10),(11),(12),(13)が
適切にバイト並びが変換されて接続される(S6)。す
なわち、データがlittle endian で格納されているもの
としてアクセスするプロセッサに対してはlittle endia
n に変換されたデータが供給され、big endianとしてア
クセスするプロッサに対してはbig endianに変換された
データが供給される。
Also, siz indicates the data size of the data access together with the address from the processor (9).
The e signal (19) is also output. This size (19) signal, the previous endian signal (18), and the lower 2 bits of the address signal
(20) is given to the selection device. From these signals, the selector selects the internal control signals C0 (26), C1 (27), C2.
(28) and C3 (29) are generated and given to the four sets of 8-bit signal selection devices (22), (23), (24) and (25) (S4, S5). This allows system data
The buses (5), (6), (7) and (8) and the processor data buses (10), (11), (12) and (13) are connected with their byte sequences appropriately converted ( S6). That is, for processors that access as if the data is stored in little endian, little endia
The data converted to n is supplied, and the processor converted as big endian is supplied with the data converted to big endian.

【0030】さらに、図5からわかるように、ワード・
データやショート・ワード・データについてはendianを
変換し、バイト・データについては変換しないため、数
値データと文字データが混在している場合にも、数値デ
ータ(ワード)についてはendianを変換し、文字データ
(バイト)については変換しないという動作がソフトウ
ェアによらずに実現できる。
Further, as can be seen from FIG.
Since endian is converted for data and short word data, but not for byte data, even if numeric data and character data are mixed, endian is converted for numeric data (word) and character The operation of not converting data (bytes) can be realized without using software.

【0031】次に図7に本発明の第2の実施例を示す。
これも先の実施例と同様にlittle endian もしくはbig
endianのデータが現れる32bitのシステム・データ
・バスと33bitプロセッサ・データ・バスとを接続
するものであり、システム・データ・バスにはデータ入
出力装置31が接続されている。
Next, FIG. 7 shows a second embodiment of the present invention.
This is also a little endian or big as in the previous embodiment.
It connects the 32-bit system data bus where the endian data appears and the 33-bit processor data bus, and the data input / output device 31 is connected to the system data bus.

【0032】これは、システム・データ・バスにデータ
並びを示す信号線(30)を設け、データ入出力装置に
信号線駆動部32を設ける。また通常このシステム・デ
ータ・バス上にはlittle endian でデータが与えられる
ものとする。データ並びを示す信号(30)はハイ・レ
ベルにプル・アップされている。このシステム・データ
・バスにlittl endianデータを出力する場合は、この信
号をハイ・レベルのままにしておく。一方big endianで
データ出力する装置(プロセッサ、I/O機器、メモリ
など)は信号線駆動部32を用いてデータ出力時にこの
信号(30)をロウ・レベルにプル・ダウンする。1つ
のデータ入出力装置にlittle endeianとbig endianのデ
ータが混在する場合には、そのデータ格納位置等に基づ
いて信号線駆動部がどちらのendianであるかを判断す
る。これによりデータをバスから入力する装置は、この
信号を先に説明した選択装置(21)に供給することに
より、データのバイト並びを適切に変換することが可能
となる。
In this system, the system data bus is provided with a signal line (30) indicating a data arrangement, and the data input / output device is provided with a signal line drive section 32. Also, it is assumed that data is normally provided on this system data bus in little endian. The signal (30) indicating the data arrangement is pulled up to the high level. Leave this signal high for littl endian data to be output on this system data bus. On the other hand, a device (processor, I / O device, memory, etc.) that outputs data in big endian uses the signal line driver 32 to pull down this signal (30) to a low level when outputting data. When little endeian and big endian data are mixed in one data input / output device, it is determined which endian the signal line driving unit is based on the data storage position or the like. As a result, the device that inputs data from the bus can appropriately convert the byte order of the data by supplying this signal to the selection device (21) described above.

【0033】以上の実施例において、プロセッサから現
在のデータ・アクセスが浮動小数データへのアクセスで
あることを示す信号を選択装置に対して出力するように
すれば、同様の手段で浮動小数フォーマットを変換する
ことが出来る。例えば第一の実施例において、ページ・
テーブルのバイト並びの情報を格納する代わりに浮動小
数フォーマットの種類を表す情報(仮数部と指数部の各
々の桁数等)を格納し、さらに選択装置をこのフォーマ
ット情報にしたがって浮動小数データに対するアクセス
時にフォーマット変換を行なうようにする。これにより
浮動小数データのデータ・フォーマットを適切に変換す
ることが可能となる。
In the above embodiment, if the signal indicating that the current data access is an access to floating point data is output from the processor to the selecting device, the floating point format is converted by the same means. Can be converted. For example, in the first embodiment, the page
Instead of storing the information on the byte arrangement of the table, the information indicating the type of the floating point format (the number of digits of each of the mantissa part and exponent part) is stored, and the selection device accesses the floating point data according to this format information Sometimes it does a format conversion. This makes it possible to properly convert the data format of floating point data.

【0034】[0034]

【発明の効果】以上のように本発明によれば、従来プロ
セッサなどそのプロセッサが仮定しているバイト並びと
異なるバイト並びのデータをアクセスしようとする場合
でも、そのアクセス時にバイト並びの変換が自動的に行
なわれる。これにより、従来のようにソフトウェアでデ
ータの並びを変えたり、メモリアクセス時にバイト並び
を変換することを指示する命令を入れる必要がなくな
る。
As described above, according to the present invention, even when attempting to access data having a byte arrangement different from the byte arrangement assumed by the processor such as a conventional processor, conversion of the byte arrangement is automatically performed at the time of access. Will be performed. As a result, it becomes unnecessary to change the data arrangement by software and to insert an instruction for converting the byte arrangement at the time of memory access as in the conventional case.

【0035】また同様に浮動小数データなどの場合も、
アクセスするデータがどのフォーマットであるかを意識
して、必要に応じてソフトウェアでフォーマットを変換
する必要がなくなる。
Similarly, in the case of floating point data,
It becomes unnecessary to convert the format by software when necessary, considering which format the data to access is.

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

【図1】 本発明の第1の実施例に係るデータ変換装置
の構成図
FIG. 1 is a configuration diagram of a data conversion device according to a first embodiment of the present invention.

【図2】 密結合共有メモリSystemの構成図[Fig. 2] Configuration diagram of the tightly coupled shared memory system

【図3】 外部Data Bus上のデータとアドレス最下位2
bitとの対応を表す図
[Fig. 3] Data on external Data Bus and lowest 2 of address
Diagram showing the correspondence with bits

【図4】 図1の選択装置の構成図FIG. 4 is a block diagram of the selection device of FIG.

【図5】 図1の選択装置の動作を表す図5 is a diagram showing the operation of the selection device of FIG.

【図6】 第1の実施例装置の動作を表すフロー・チャ
ート
FIG. 6 is a flow chart showing the operation of the first embodiment device.

【図7】 本発明の第2の実施例に係るデータ変換装置
の構成図
FIG. 7 is a configuration diagram of a data conversion device according to a second embodiment of the present invention.

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

1 little endian のプロセッサ 2 big endianのプロセッサ 3 共有メモリ 4 システム・データ・バス 5 システム・データ・バス(0−7bit) 6 システム・データ・バス(8−15bit) 7 システム・データ・バス(16−23bit) 8 システム・データ・バス(24−31bit) 9 プロセッサ 10 プロセッサ・データ・バス(0−7bit) 11 プロセッサ・データ・バス(8−15bit) 12 プロセッサ・データ・バス(16−23bit) 13 プロセッサ・データ・バス(24−31bit) 14 ページ・テーブル 15 物理ページ番号 16 アクセス保護情報などのフラグ 17 endian bit 18 endian信号 19 データ・サイズ信号 20 アドレス信号 21 データ選択装置 22,23,24,25 8bit信号選択装置 26,27,28,29 8bit信号選択装置の制御
信号 30 データ並びを表す信号 31 データ入出力装置 32 信号線駆動部 33 データ格納部
1 little endian processor 2 big endian processor 3 shared memory 4 system data bus 5 system data bus (0-7 bits) 6 system data bus (8-15 bits) 7 system data bus (16- 23 bit) 8 system data bus (24-31 bit) 9 processor 10 processor data bus (0-7 bit) 11 processor data bus (8-15 bit) 12 processor data bus (16-23 bit) 13 processor Data bus (24-31 bits) 14 page table 15 physical page number 16 flags such as access protection information 17 endian bit 18 endian signal 19 data size signal 20 address signal 21 data selection device 22, 23, 24, 258 bit Signal selection equipment 26, 27, 28, 29 8bit signal control signal 30 signal 31 data input-output device 32 a signal line drive unit 33 data storage unit representing the data arrangement of the selection device

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 データ・バスとプロセッサをつなぐデー
タ変換装置において、アドレスによってそのアドレスの
データのデータ・バス上での配列順序あるいはフォ−マ
ットの種類を知る手段と、この配列順序あるいはフォ−
マットの種類にしたがってデータ・バス上のデータの配
列順序あるいはフォ−マットを変換してプロセッサに供
給する手段とを具備したことを特徴とするデータ変換装
置。
1. A data conversion device for connecting a data bus and a processor, and means for knowing the arrangement order or format type of the data of the address on the data bus by the address, and the arrangement order or format.
And a means for converting the arrangement order of data on the data bus or the format according to the type of mat and supplying the converted format to the processor.
【請求項2】 請求項1記載のデータ変換装置におい
て、プロセッサがアクセスするデータのアドレスを管理
する手段を備え、この管理を行うためのページ・テーブ
ルの各エントリに、対応するそれぞれのページのデータ
・バス上での配列順序あるいはフォ−マットの種類を示
す情報を予め格納しておき、この情報を参照することに
より配列順序あるいはフォ−マットの種類を知ることを
特徴とするデータ変換装置。
2. The data conversion device according to claim 1, further comprising means for managing an address of data accessed by the processor, and data of each page corresponding to each entry of the page table for performing this management. A data conversion device characterized in that information indicating the arrangement order or the type of format on the bus is stored in advance and the arrangement order or the type of format is known by referring to this information.
【請求項3】 データ・バスとプロセッサをつなぐデー
タ変換装置において、前記デ−タ・バスにデータ・バス
上のデータの配列順序あるいはフォ−マットの種類を示
す信号線を設け、この信号線から供給される信号にした
がって前記データ・バス上のデータの配列順序を変換し
てプロセッサに供給する手段を具備したことを特徴とす
るデータ変換装置。
3. A data converter for connecting a data bus and a processor, wherein the data bus is provided with a signal line indicating an arrangement order of data on the data bus or a type of format. A data conversion device comprising means for converting the arrangement order of data on the data bus according to a signal supplied and supplying the converted data to a processor.
JP22978792A 1992-08-28 1992-08-28 Data converter Pending JPH0675742A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22978792A JPH0675742A (en) 1992-08-28 1992-08-28 Data converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22978792A JPH0675742A (en) 1992-08-28 1992-08-28 Data converter

Publications (1)

Publication Number Publication Date
JPH0675742A true JPH0675742A (en) 1994-03-18

Family

ID=16897671

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22978792A Pending JPH0675742A (en) 1992-08-28 1992-08-28 Data converter

Country Status (1)

Country Link
JP (1) JPH0675742A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100329373B1 (en) * 1997-10-28 2002-09-26 닛본 덴기 가부시끼가이샤 Improved Byte-Switching Operator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100329373B1 (en) * 1997-10-28 2002-09-26 닛본 덴기 가부시끼가이샤 Improved Byte-Switching Operator

Similar Documents

Publication Publication Date Title
US4361868A (en) Device for increasing the length of a logic computer address
US5724540A (en) Memory system having a column address counter and a page address counter
US5386523A (en) Addressing scheme for accessing a portion of a large memory space
US5276891A (en) Alignment of sign, data, edit byte operand results for storage in memory
EP0248436A2 (en) Method of and apparatus for processing data
JPH07312078A (en) System for conversion of serial ram-based fifo memory into parallel one and of parallel one into serial one
EP0840228A2 (en) Programmable memory access
US5127096A (en) Information processor operative both in direct mapping and in bank mapping, and the method of switching the mapping schemes
US5848436A (en) Method and apparatus for efficiently providing data from a data storage medium to a processing entity
US4691282A (en) 16-bit microprocessor system
JPH0675742A (en) Data converter
EP0049137B1 (en) Fixed data reading apparatus and method
US5771368A (en) Memory addressing scheme for increasing the number of memory locations available in a computer for storing higher precision numbers
JP2005222519A (en) Access to bit value in data word stored in memory
US20030126402A1 (en) Device and method for information processing
US6321319B2 (en) Computer system for allowing a two word jump instruction to be executed in the same number of cycles as a single word jump instruction
US7370159B2 (en) Microprocessor having an extended addressable space
EP0321044B1 (en) Data bus control of ROM units in information processing system
JPS58137047A (en) Cotroller for omitting instruction of computer
KR0147476B1 (en) I/o configuration setting system of computer and method thereof
JP2954988B2 (en) Information processing device
JP3217815B2 (en) Address translation method
KR100262014B1 (en) Input/output port for operating bits
JPH1040165A (en) Data read method and read buffer
JP3345050B2 (en) Two-dimensional array type memory system