JP2000082009A - Data processor - Google Patents

Data processor

Info

Publication number
JP2000082009A
JP2000082009A JP10250729A JP25072998A JP2000082009A JP 2000082009 A JP2000082009 A JP 2000082009A JP 10250729 A JP10250729 A JP 10250729A JP 25072998 A JP25072998 A JP 25072998A JP 2000082009 A JP2000082009 A JP 2000082009A
Authority
JP
Japan
Prior art keywords
data
memory
endian
address
bus
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.)
Withdrawn
Application number
JP10250729A
Other languages
Japanese (ja)
Inventor
Yasuyuki Murakami
康之 村上
Atsushi Kiuchi
淳 木内
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP10250729A priority Critical patent/JP2000082009A/en
Publication of JP2000082009A publication Critical patent/JP2000082009A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide the data processor which can switch endians during operation in a system where a big endian and a little endian are both prevent. SOLUTION: The processor has an arithmetic control means 110 which recognizes the byte order of a word in 1st, word order and is provided with an alignment means which is connected to the arithmetic control means 110 and can selectively switch the byte order of an output word to an input word between 1st word order and 2nd word order, and instructs the 1st word order or 2nd word order to the alignment means. Interruption control means 180 and 181 varies the value of a flag means 182 182 after saving the value of the flag means 182 in response to a specific interruption to the arithmetic control means, and reloads the saved value to the flag means 182 in response to a recovery from the interruption.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、情報処理単位の一
つであるワード内のバイト順に対する定義の異なるデー
タを処理できるデータ処理装置に係り、例えば半導体チ
ップ上に形成されたCPU(Central Processing Uni
t:中央処理装置)とDSP(Digital Signal Processo
r:ディジタル信号処理装置)とを含むマイクロプロセ
ッサ若しくはデータプロセッサ、更にはビッグエンディ
アンとリトルエンディアンの双方のフォーマットが混在
されて使用されるデータ処理システムに適用して有効な
技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus capable of processing data having different definitions with respect to the byte order in a word, which is one of information processing units, and for example, a CPU (Central Processing) formed on a semiconductor chip. Uni
t: Central processing unit) and DSP (Digital Signal Processo)
r: a digital signal processing device) and a technology effective when applied to a data processing system in which both big-endian and little-endian formats are used in combination.

【0002】[0002]

【従来の技術】データをメモリ上に格納する方式、若し
くはプロセッサがレジスタとメモリ間でデータ転送を行
うときの形式に、ビッグエンディアンとリトルエンディ
アンがある。例えば、32ビットのデータをメモリ上の
4n(nは0以上の整数)番地に格納する場合、32ビ
ットのデータをバイト(8bit)毎に4分割して、デー
タの最上位バイトから、4n番地、4n+1番地、4n
+2番地、4n+3番地の順に格納する方式をビッグエ
ンディアン、データの最下位バイトから、4n番地、4
n+1番地、4n+2番地、4n+3番地の順に格納す
る方式をリトルエンディアンという。即ち、上記エンデ
ィアンとは、ワード内のバイト順序をどのようにするか
と言う規約であり、ワードアドレスと一致するバイトア
ドレスがワードの最下位バイトを指す場合がリトルエン
ディアンであり、逆に、ワードアドレスと一致するバイ
トアドレスがワードの最上位バイトを指す場合がビッグ
エンディアンである。エンディアンは、同一ワード内の
データをワード単位及びバイト単位でアクセスする場合
に影響する。どちらのエンディアンを採用するかは、マ
イクロプロセッサ若しくはデータプロセッサのアーキテ
クチャーによって選択される。
2. Description of the Related Art Big endian and little endian are known as a method of storing data in a memory or a form in which a processor transfers data between a register and a memory. For example, when storing 32-bit data at the address 4n (n is an integer of 0 or more) on the memory, the 32-bit data is divided into four for each byte (8 bits), and the uppermost byte of the data is allocated to the address 4n , 4n + 1 address, 4n
+2 address, 4n + 3 address in the order of big endian, from the least significant byte of data to 4n address, 4n
A method of storing addresses in the order of n + 1, 4n + 2, and 4n + 3 is called little endian. That is, the endian is a rule for determining the byte order in a word. When the byte address that matches the word address indicates the least significant byte of the word, it is little endian. Big endian is when the byte address that matches with points to the most significant byte of the word. The endian affects data in the same word in units of words and bytes. Which endian is adopted is selected depending on the architecture of the microprocessor or the data processor.

【0003】近年のハンドヘルドパーソナルコンピュー
タ(以下ハンドヘルドPCとする)やパーソナルディジ
タルアシスタント(以下PDAとする)には、デスクト
ップパソコンやノートパソコン等で使用されるオペレー
ティングシステム(以下OSとする)を搭載するものが
主流となってきている。このようなOS処理を行うシス
テムでは、通常リトルエンディアンを使用するため、使
用するデータ処理装置もシステム内のメモリとのデータ
のやり取りをリトルエンディアンで行う必要がある。ま
た、ディジタル携帯電話やパーソナルハンディーフォン
システム(PHS)等のシステムでは、音声符号化複合
化等のディジタル信号処理を、積和演算を高速に実行可
能なディジタルシグナルプロセッサ(以下DSPとす
る)で処理し、通信プロトコルやキー操作などの処理を
マイクロコンピュータで処理をする。このような通信処
理を行うシステムでは、ビッグエンディアンを使用する
ことが多いため、使用するデータ処理装置もシステム内
のメモリとのデータのやり取りをビッグエンディアンで
行う必要がある。
[0003] In recent years, hand-held personal computers (hereinafter, referred to as hand-held PCs) and personal digital assistants (hereinafter, referred to as PDAs) are equipped with operating systems (hereinafter, referred to as OSs) used in desktop personal computers and notebook personal computers. Is becoming mainstream. Since a system that performs such OS processing normally uses little endian, the data processing device to be used also needs to exchange data with a memory in the system in little endian. In systems such as digital mobile phones and personal handy phone systems (PHS), digital signal processing such as voice coding and decoding is processed by a digital signal processor (hereinafter referred to as DSP) that can execute multiply-accumulate operations at high speed. Then, processing such as a communication protocol and key operation is performed by a microcomputer. Since a system that performs such communication processing often uses big endian, a data processing device to be used also needs to exchange data with a memory in the system in big endian.

【0004】エンディアンについて記載された文献の例
としては「最新マイクロプロセッサテクノロジ(日経B
P社 1996年5月10日発行)」の第65頁があ
る。そこには、最近のRISC(Redundancy Instructi
on Set Computer)アーキテクチャでは動作モードでエ
ンディアンを切換えられるようになっている、と記載が
ある。
As an example of a document describing endian, refer to “Latest Microprocessor Technology (Nikkei B)
P company, published on May 10, 1996). There is a recent RISC (Redundancy Instructi
It is stated that the endian can be switched in the operation mode in the "on set computer" architecture.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、動作モ
ードによるエンディアンの切換えを具体的にどのように
行うかは上記従来技術には示されていない。例えば、マ
イクロプロセッサの所定の外部ピンを使ってビッグエン
ディアンとリトルエンディアンを切り替えることが考え
られる。本発明者は特に、ビッグエンディアンとリトル
エンディアンの双方のフォーマットが混在するようなシ
ステムにおいて、プロセッサが動作している最中に、ビ
ッグエンディアンとリトルエンディアンの切り換えを行
うことについて検討した。今後、ハンドヘルドPCやP
DAはますます高機能化が進むことが予想され、システ
ムのコアとなるデータ処理装置もOS処理だけでなく、
さまざまな処理を行う必要が出てくる。例えば、データ
通信機能を備えたハンドヘルドPCやPDAである。こ
のシステムではリトルエンディアンを使用するOS処理
とビッグエンディアンを使用する通信処理とをシステム
内に同時に搭載する必要がある。このとき、ビッグエン
ディアンとリトルエンディアンを切り換える際、毎回パ
ワーオンリセット等の処理を要するならば、パワーオン
リセットを行うためシステムの初期化プログラムや各種
初期設定をビッグエンディアンとリトルエンディアンを
切り換える度に行うこととなり、通信処理とOS処理が
頻繁に切り替わる場合は処理量が増大してしまう。
However, the above-mentioned prior art does not show how to switch the endian in accordance with the operation mode. For example, switching between big endian and little endian using a predetermined external pin of a microprocessor can be considered. In particular, the present inventor has studied switching between big endian and little endian while the processor is operating in a system in which both big endian and little endian formats are mixed. In the future, handheld PC and P
DA is expected to become more and more sophisticated, and the data processing device that is the core of the system is not only OS processing,
Various processes need to be performed. For example, a handheld PC or PDA having a data communication function. In this system, OS processing using little endian and communication processing using big endian need to be simultaneously installed in the system. At this time, if processing such as power-on reset is required every time switching between big endian and little endian, a system initialization program and various initial settings for power-on reset are performed every time switching between big endian and little endian. That is, when the communication processing and the OS processing are frequently switched, the processing amount increases.

【0006】本発明の目的は、情報処理単位の一つであ
る複数語の情報に対する語順の認識を動作中であっても
動的に切換えることができるデータ処理装置を提供する
ことに在る。
An object of the present invention is to provide a data processing apparatus capable of dynamically switching the recognition of word order for information of a plurality of words as one of information processing units even during operation.

【0007】本発明の更に具体的な目的は、ビッグエン
ディアンとリトルエンディアンの双方のフォーマットが
混在するシステムにおいて、システムの動作中であって
もエンディアンの切り換えを行うことができるデータ処
理装置並びにデータ処理システムを提供することにあ
る。
A more specific object of the present invention is to provide a data processing apparatus and a data processing system capable of performing endian switching even during operation of a system in a system in which both big endian and little endian formats are mixed. It is to provide a system.

【0008】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

【0009】[0009]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The following is a brief description of an outline of a typical invention among the inventions disclosed in the present application.

【0010】すなわち、データ処理装置(100)は演
算制御手段(110,111)を有し、そのアーキテク
チャ上、情報処理単位の一つである複数語の情報を第1
の語順で認識する。例えば、ワード内のバイト順序の認
識を第1の語順で行う。第1の語順は例えばビッグエン
ディアン形式である。演算制御手段のこのアーキテクチ
ャに対して、ビッグエンディアンとリトルエンディアン
の双方のフォーマットを含むシステムへの適応と言う点
に関し、先ず、前記演算制御手段に接続され前記複数語
の入力情報に対する複数語の出力情報の語順を第1の語
順又は第2の語順に選択的に切換え可能なアライメント
手段(202〜204)を設ける。第2の語順は例えば
リトルエンディアン形式である。ビッグエンディアンの
ような第1の語順に準拠したフォーマットは演算制御手
段本来のアーキテクチャと同一形式であるから、アライ
メント手段には入力データと出力データのフォーマット
に第1の語順を選択させればよい。リトルエンディアン
のような第2の語順に準拠したフォーマットのデータに
対しては演算制御手段本来のアーキテクチャでサポート
できるデータ形式に変換可能なように、アライメント手
段には、第2の語順を第1の語順に変換して演算制御装
置へ供給し、演算制御手段の出力を第2の語順に変換す
る状態を選択させればよい。前記アライメント手段の選
択状態はフラグ手段(182)に値によって決定する。
フラグ手段に対する操作は、割り込み制御を用いる。即
ち、前記演算制御手段に対する所定の割り込み、例えば
リトルエンディアンのような第2の語順に準拠したフォ
ーマットのデータを用いるサブルーチン処理の要求、に
応答して、前記フラグ手段の値を退避してから当該フラ
グ手段の値を変更し、当該サブルーチン処理へ分岐し、
前記割り込みからの復帰に応答して前記退避された値を
フラグ手段に復帰させる。上記により、例えば、リトル
エンディアンのフォーマットを使用するOS処理とビッ
グエンディアンのフォーマットを使用する通信処理とを
混在させたシステムにおいてエンディアンの切換えをシ
ステムの動作途中で動的に行うことが可能になる。
That is, the data processing device (100) has operation control means (110, 111), and in terms of its architecture, stores information of a plurality of words, which is one of information processing units, in the first word.
Recognize in word order. For example, recognition of byte order in a word is performed in a first word order. The first word order is, for example, a big endian format. Regarding this architecture of the arithmetic control means, in terms of adaptation to a system including both big-endian and little-endian formats, first, a multi-word output for the multi-word input information connected to the arithmetic control means Alignment means (202 to 204) are provided which can selectively switch the word order of information in the first word order or the second word order. The second word order is, for example, a little endian format. Since the format conforming to the first word order, such as big endian, has the same format as the original architecture of the arithmetic control means, the alignment means may be made to select the first word order for the format of input data and output data. In order to convert data in a format conforming to the second word order such as little endian into a data format that can be supported by the original architecture of the arithmetic control means, the alignment means sets the second word order to the first word order. What is necessary is to convert the word order and supply it to the arithmetic and control unit, and to select the state where the output of the arithmetic and control unit is converted to the second word order. The selected state of the alignment means is determined by the value of the flag means (182).
The operation on the flag means uses interrupt control. That is, in response to a predetermined interrupt to the arithmetic control means, for example, a request for a subroutine process using data in a format conforming to the second word order such as little endian, the value of the flag means is saved, Change the value of the flag means, branch to the subroutine processing,
The saved value is returned to the flag means in response to the return from the interrupt. As described above, for example, in a system in which the OS processing using the little endian format and the communication processing using the big endian format are mixed, it is possible to dynamically switch the endian during the operation of the system.

【0011】前記演算制御手段としては、算術論理演算
器を持ちフェッチした命令を実行する中央処理装置(1
10)と、前記中央処理装置の制御を受けて積和演算を
行う積和演算装置(111)との双方を1個の半導体基
板上に形成して採用することができる。例えば、中央処
理装置はOS処理を行い、積和演算装置は通信処理を行
う。
The arithmetic control means includes a central processing unit (1) having an arithmetic logic unit and executing a fetched instruction.
10) and a product-sum operation device (111) that performs a product-sum operation under the control of the central processing unit can be formed on a single semiconductor substrate and employed. For example, the central processing unit performs OS processing, and the product-sum operation unit performs communication processing.

【0012】具体的な態様では、データ処理装置は更
に、キャッシュメモリ(112)と、ワークメモリ(1
13,114)と、前記中央処理装置の命令実行状態に
応答して前記キャッシュメモリ及びワークメモリを制御
するキャッシュコントローラ(115)と、内蔵周辺回
路(118)と、前記キャッシュコントローラからの指
示に応答してデータ処理装置の外部又は前記内蔵周辺回
路のアクセスを制御するバスステートコントローラ(1
16)とを含む。前記アライメント手段は前記キャッシ
ュコントローラに設けることができる。このアライメン
ト手段を、前記キャッシュメモリ、ワークメモリ及びバ
スステートコントローラが接続される第1バス(14
2,143,144)と、前記中央処理装置及び積和演
算装置に接続する第2バス(220,134B,134
C)との間に配置することができる。この態様におい
て、演算制御手段は、そのアーキテクチャ上、情報処理
単位の一つである複数語の情報を第1の語順で認識する
が、キャッシュメモリ、ワークメモリ及び外部メモリ上
には第1の語順の情報と第2の語順の情報とを混在させ
て配置することができる。
In a specific embodiment, the data processing device further includes a cache memory (112) and a work memory (1).
13, 114), a cache controller (115) for controlling the cache memory and the work memory in response to an instruction execution state of the central processing unit, a built-in peripheral circuit (118), and a response to an instruction from the cache controller. A bus state controller (1) for controlling access to the outside of the data processing device or the built-in peripheral circuit.
16). The alignment means may be provided in the cache controller. This alignment means is connected to the first bus (14) to which the cache memory, work memory, and bus state controller are connected.
2, 143, 144) and a second bus (220, 134B, 134) connected to the central processing unit and the product-sum operation unit.
C). In this aspect, the arithmetic control unit recognizes information of a plurality of words, which is one of the information processing units, in the first word order due to its architecture, but the first word order is stored in the cache memory, the work memory, and the external memory. And the information in the second word order can be mixed and arranged.

【0013】もう一つの具体的な態様では、前記バスス
テートコントローラ(116A)に前記アライメント手
段(202A,203A)を配置する。この時の前記ア
ライメント手段は、前記キャッシュコントローラが接続
される第3バス(151)と、前記内蔵周辺回路及び外
部バスに接続する第4バス(163,157)との間に
配置することができる。この態様において、演算制御手
段はアライメント手段を全く経由せずにワークメモリな
どをアクセスしなければならないことがある。したがっ
て、この態様では、キャッシュメモリ及びワークメモリ
は第1の語順でアクセスされなければならない。データ
処理装置の外部メモリ上には第1の語順の情報と第2の
語順の情報とを混在させて配置することができる。
In another specific embodiment, the alignment means (202A, 203A) is arranged in the bus state controller (116A). At this time, the alignment means can be arranged between a third bus (151) to which the cache controller is connected and a fourth bus (163, 157) to be connected to the built-in peripheral circuit and the external bus. . In this aspect, the arithmetic and control unit may need to access the work memory or the like without passing through the alignment unit at all. Therefore, in this aspect, the cache memory and the work memory must be accessed in the first word order. The information in the first word order and the information in the second word order can be mixedly arranged on the external memory of the data processing device.

【0014】上記データ処理装置は、当該データ処理装
置の演算制御手段のためのプログラム情報及びデータ情
報が格納される外部メモリ等と一緒に、ハンドヘルドP
CやPDA等のデータ処理システムを構成することがで
きる。
The data processing device is provided with a handheld P together with an external memory for storing program information and data information for the arithmetic control means of the data processing device.
A data processing system such as C or PDA can be configured.

【0015】[0015]

【発明の実施の形態】図1には本発明に係るデータ処理
装置の一例であるマイクロプロセッサ100とこれを適
用したデータ処理システムの一つが示される。
FIG. 1 shows a microprocessor 100 which is an example of a data processing apparatus according to the present invention, and one data processing system to which the microprocessor 100 is applied.

【0016】マイクロプロセッサ100は、特に制限さ
れないがRISCプロセッサとしての縮小命令セット
(例えば16ビット固定長命令セット)が適用されるC
PU110と、演算とデータのロード・ストアを並列に
実行することによって積和演算を高速に実行可能なDS
P111を有する。
The microprocessor 100 is not particularly limited, but employs a reduced instruction set (for example, a 16-bit fixed-length instruction set) as a RISC processor.
PU 110 and DS capable of performing multiply-accumulate operations at high speed by executing operations and data load / store in parallel
It has P111.

【0017】前記CPU100は、フェッチした命令を
命令デコーダでデコードし、デコード結果に従って汎用
レジスタや算術論理演算器(ALU)を用いてアドレス
情報やデータ情報の演算を行う。DSP111は、DS
P命令を解読するデコーダ、乗算器、算術論理演算器
(ALU)、積和演算専用のデータレジスタファイル等
を有する。特に制限されないが、DSP111の演算に
必要なデータのアクセス制御はCPU110が行う。D
SP111はCPU110のアクセス制御によってメモ
リから読み出されたデータを入力して信号処理演算を行
い、DSP111から出力される演算結果データはCP
U110のアクセス制御によってメモリなどに格納され
る。
The CPU 100 decodes the fetched instruction with an instruction decoder, and calculates address information and data information using a general-purpose register and an arithmetic and logic unit (ALU) according to the decoded result. The DSP 111 uses the DS
It has a decoder for decoding the P instruction, a multiplier, an arithmetic and logic unit (ALU), a data register file dedicated to the product-sum operation, and the like. Although not particularly limited, the CPU 110 controls access to data necessary for the operation of the DSP 111. D
The SP 111 inputs the data read from the memory under the access control of the CPU 110 and performs a signal processing operation. The operation result data output from the DSP 111 is a CP
It is stored in a memory or the like by the access control of U110.

【0018】前記CPU110は、32ビット若しくは
その整数倍のビット数を有する汎用レジスタを有し、C
PU110の内部は32ビットのデータバス133に接
続され、前記レジスタファイルや算術論理演算器は32
ビット単位でデータ演算やアドレス演算を行えるように
なっている。このとき、CPU110は、32ビット
(1ワード:4バイト)に対するバイト順にビッグエン
ディアンを採用するアーキテクチャを有している。従っ
てCPU110は、内部の汎用レジスタと外部メモリ間
のデータ転送では、ワードアドレスと一致するバイトア
ドレスがワードの最上位バイトを指すようにデータ転送
とデータ認識とを行う。
The CPU 110 has a general-purpose register having a bit number of 32 bits or an integer multiple thereof,
The inside of the PU 110 is connected to a 32-bit data bus 133, and the register file and the arithmetic and logic unit
Data operation and address operation can be performed in bit units. At this time, the CPU 110 has an architecture that employs big endian in the byte order for 32 bits (1 word: 4 bytes). Therefore, in the data transfer between the internal general-purpose register and the external memory, the CPU 110 performs the data transfer and the data recognition so that the byte address matching the word address points to the most significant byte of the word.

【0019】このマイクロプロセッサ100は前記ビッ
グエンディアンとリトルエンディアンの双方のフォーマ
ットが混在するシステムに対応し、更にエンディアンの
切換えをマイクロプロセッサ110の動作中に動的に可
能に構成されている。エンディアン切換えのためのバイ
ト順(語順)の変更はキャッシュコントローラ(CC
N)115で行う。キャッシュコントローラ115には
前記CPU110、DSP111の他に、システムアド
レスバス(CAB,XAB,YAB))120〜12
2、システムデータバス(CDB,XDB,YDB)1
42〜144、そして内部アドレスバス(IAB)15
0と内部データバス(IDB)151が接続されてい
る。前記システムアドレスバス120〜122及びシス
テムデータバス142〜144には、キャッシュエント
リが格納されるキャッシュメモリ112、DSP111
による積和演算やCPU110のワークメモリとして利
用されるXメモリ113及びYメモリ114が接続され
る。内部バス150,151にはバスステートコントロ
ーラ(BSC)116が接続され、BSC116は周辺
アドレスバス(PAB)165及び周辺データバス(P
DB)157に接続された周辺回路117,118をア
クセスするたに最適なバスサイクルの起動を制御し、ま
た、外部アドレスバス(EAB)162及び外部データ
バス(EDB)163に接続された外部メモリ101な
どの外部回路をアクセスするために最適な外部バスサイ
クルの起動を制御する。
The microprocessor 100 is compatible with a system in which both the big-endian format and the little-endian format are mixed, and is configured such that the endian can be switched dynamically during the operation of the microprocessor 110. Changing the byte order (word order) for endian switching is performed by the cache controller (CC
N) Perform 115. The cache controller 115 has system address buses (CAB, XAB, YAB) 120 to 12 in addition to the CPU 110 and the DSP 111.
2. System data bus (CDB, XDB, YDB) 1
42 to 144, and the internal address bus (IAB) 15
0 and the internal data bus (IDB) 151 are connected. The system address buses 120 to 122 and the system data buses 142 to 144 include a cache memory 112 for storing cache entries, a DSP 111
And an X memory 113 and a Y memory 114 used as a work memory of the CPU 110 are connected. A bus state controller (BSC) 116 is connected to the internal buses 150 and 151, and the BSC 116 is connected to a peripheral address bus (PAB) 165 and a peripheral data bus (P
DB) 157 controls the activation of a bus cycle optimal for accessing the peripheral circuits 117 and 118 connected to the external circuits. The external memory is connected to an external address bus (EAB) 162 and an external data bus (EDB) 163. The activation of an external bus cycle optimal for accessing an external circuit such as 101 is controlled.

【0020】図2にはCCN115の一例が示される。
アドレス比較回路205はCPU110のアドレス出力
132を入力し、そのアクセスアドレスがキャッシュ可
能なアドレスエリアに対してキャッシュヒット又はキャ
ッシュミスに係るアドレスであるか、また、内蔵メモリ
に割当てられたアドレスであるかを判定する。その判定
結果により、周辺バスや外部バスのアクセスが必要な場
合にはBSC116を介してそのためのバスサイクルを
起動させる。前記判定の結果、キャッシュメモリ11
2、Xメモリ113、Yメモリ114をアクセスする場
合には内蔵メモリアクセス回路206を介してそれらメ
モリをアクセスさせる。
FIG. 2 shows an example of the CCN 115.
The address comparison circuit 205 inputs the address output 132 of the CPU 110, and determines whether the access address is an address related to a cache hit or a cache miss with respect to the cacheable address area, or whether the access address is an address assigned to the internal memory. Is determined. As a result of the determination, if access to the peripheral bus or the external bus is required, a bus cycle for that is activated via the BSC 116. As a result of the determination, the cache memory 11
2. When accessing the X memory 113 and the Y memory 114, those memories are accessed via the built-in memory access circuit 206.

【0021】CCN115は前記エンディアンの切換え
のために、エンディアン切換え回路201、データ並べ
替え回路202〜204を有する。データ並び替え回路
202〜204の一方の入出力インタフェース部分はバ
ス220、134B、134Cを介してCPU110と
DSP111に接続され、データ並び替え回路202〜
204の他方の入出力インタフェース部分はバス217
〜219を介してシステムデータバス142〜144と
内部データバス154とに接続されている。データ並べ
替え回路202〜204による並べ替えの態様はエンデ
ィアン切換え回路201から出力される信号215によ
って制御される。
The CCN 115 has an endian switching circuit 201 and data rearranging circuits 202 to 204 for switching the endian. One of the input / output interface portions of the data rearranging circuits 202 to 204 is connected to the CPU 110 and the DSP 111 via buses 220, 134B, and 134C.
The other input / output interface part of the bus 204
Through 219 to the system data buses 142 to 144 and the internal data bus 154. The manner of rearrangement by the data rearrangement circuits 202 to 204 is controlled by a signal 215 output from the endian switching circuit 201.

【0022】図3にはデータ並び替え回路202〜20
4の詳細な一例が示される。図3において、データバス
142は32ビットであり、バイト単位の信号線142
A(最上位バイト)〜142D(最下位バイト)が示さ
れている。データバス143は16ビットであり、バイ
ト単位の信号線143A(上位バイト)、143B(下
位バイト)が示されている。データバス144も16ビ
ットであり、バイト単位の信号線144A(上位バイ
ト)、144B(下位バイト)が示されている。前記バ
ス220はバイト単位の信号線220A(最上位バイ
ト)〜220D(最下位バイト)によって示され、前記
バス134Bはバイト単位の信号線134B−A(上位
バイト)、134B−B(下位バイト)によって示さ
れ、前記バス134Cはバイト単位の信号線134C−
A(上位バイト)、134C−B(下位バイト)によっ
て示されている。301〜308で示されるものはセレ
クタである。
FIG. 3 shows data rearranging circuits 202 to 20.
4, a detailed example is shown. In FIG. 3, the data bus 142 is 32 bits, and the signal line 142 is a byte unit.
A (most significant byte) to 142D (least significant byte) are shown. The data bus 143 is 16 bits, and shows signal lines 143A (upper byte) and 143B (lower byte) in byte units. The data bus 144 is also 16 bits, and the signal lines 144A (upper byte) and 144B (lower byte) in byte units are shown. The bus 220 is indicated by signal lines 220A (most significant byte) to 220D (least significant byte) in byte units, and the bus 134B is signal lines 134B-A (high byte) and 134B-B (low byte) in byte units. The bus 134C is indicated by a signal line 134C-
A (high byte), 134C-B (low byte). Reference numerals 301 to 308 denote selectors.

【0023】前述の如く、CPU110のアーキテクチ
ャはビッグエンディアンであるから、バス220上にお
けるバイト順は、最上位側から220A,220B,2
20C,220Dの順番になる。したがって、バス14
2,143,144のビッグエンディアンのデータをバ
ス220,134B,134Cに取込む場合、或いは、
バス142,143,144にビッグエンディアンのデ
ータを供給する場合には、バス142,143,144
の上位及び下位と、バス220,134B,134Cの
上位及び下位とをそのまま対応させるようにセレクタ3
01〜308の選択状態を制御すればよい。例えば22
0Aを142Aに、220Bを142Bに、220Cを
142Cに、220Dを142Dに接続すればよい。こ
の接続状態(ビッグエンディアン選択状態)は制御信号
215の論理値“1”によって選択される。一方、バス
142,143,144のリトルエンディアンのデータ
をバス220,134B,134Cに取込む場合、或い
は、バス142,143,144にリトルエンディアン
のデータを供給する場合には、バス142,143,1
44の上位及び下位と、バス220,134B,134
Cの上位及び下位とを逆にするようにセレクタ301〜
308の選択状態を制御すればよい。例えば220Aを
142Dに、220Bを142Cに、220Cを142
Bに、220Dを142Aに接続すればよい。この接続
状態(リトルエンディアン選択状態)は制御信号215
の論理値“0”によって選択される。
As described above, since the architecture of the CPU 110 is big-endian, the byte order on the bus 220 is 220A, 220B, 2
The order is 20C, 220D. Therefore, bus 14
When the big endian data of 2,143,144 is taken into the buses 220, 134B, 134C, or
When supplying big endian data to the buses 142, 143, 144, the buses 142, 143, 144
Of the buses 220, 134B and 134C so that the upper and lower levels of the buses 220, 134B and 134C correspond to each other.
What is necessary is just to control the selection state of 01-308. For example, 22
What is necessary is just to connect 0A to 142A, 220B to 142B, 220C to 142C, and 220D to 142D. This connection state (big endian selection state) is selected by the logical value “1” of the control signal 215. On the other hand, when the little endian data of the buses 142, 143, 144 is taken into the buses 220, 134B, 134C, or when the little endian data is supplied to the buses 142, 143, 144, the buses 142, 143, 144 are used. 1
44 and the buses 220, 134B, 134
The selectors 301 to 301 are arranged so that the upper and lower parts of C are reversed.
The selection state of 308 may be controlled. For example, 220A is 142D, 220B is 142C, 220C is 142
B and 220D may be connected to 142A. This connection state (little endian selected state) is controlled by the control signal 215.
Is selected by the logical value "0".

【0024】前記エンディアン切換え回路201が生成
する制御信号215の論理値をどの値にするかは信号1
71の値によって決定される。信号は図1に示される割
り込み制御回路(INTC)117から出力される。
The logical value of the control signal 215 generated by the endian switching circuit 201 is determined by the signal 1
71. The signal is output from the interrupt control circuit (INTC) 117 shown in FIG.

【0025】図1において割り込み制御回路117は割
込み設定レジスタ180、割り込み判定回路181、エ
ンディアンフラグ182及びフラグ状態退避回路183
を有する。信号171はエンディアンフラグ182の値
である。
In FIG. 1, an interrupt control circuit 117 includes an interrupt setting register 180, an interrupt determination circuit 181, an endian flag 182, and a flag state saving circuit 183.
Having. The signal 171 is the value of the endian flag 182.

【0026】割り込み設定レジスタ180はBSC11
6、PAB156、PDB157を用いて書き込みと読
み出しが可能なレジスタとなっており、ビッグエンディ
アンのデータフォーマットを用いる処理に対応される割
り込み(ビッグエンディアン方式の割り込み)要求のベ
クタ番号が、前記CPU110によって設定される。エ
ンディアンフラグ182はマイクロプロセッサ100が
前記リトルエンディアン選択状態で動作する場合は論理
値“0”、ビッグエンディアン選択状態で動作する場合
は論理値“1”がセットされることになる。
The interrupt setting register 180 stores the BSC11
6, a register that can be written and read using PAB 156 and PDB 157. The CPU 110 sets the vector number of an interrupt (big-endian interrupt) request corresponding to processing using a big-endian data format. Is done. The endian flag 182 is set to a logical value “0” when the microprocessor 100 operates in the little endian selection state, and a logical value “1” when the microprocessor 100 operates in the big endian selection state.

【0027】マイクロプロセッサ100の外部に接続さ
れた割り込みベクタ生成回路184は、マイクロプロセ
ッサ100へのさまざまな割り込み要求175を割り込
みベクタ173に変換して、INTC117内部の割り
込み判定回路181に入力する。割り込み判定回路18
1は割り込み設定レジスタ180に格納されているビッ
グエンディアン方式の割り込みベクタ番号と、割り込み
ベクタ生成回路184で生成された割り込み要求のベク
タ番号173とを比較して、ビッグエンディアン方式の
割り込みだった場合に、フラグ状態退避回路183に割
り込み発生前のエンディアンフラグ182の値を退避
し、エンディアンフラグ182に“1”をセットすると
同時に、CPU110に割り込み処理が発生したことを
信号線172を通して伝える。エンディアンフラグ18
2が論理値“1”にセットされると、エンディアンフラ
グ信号171を通してCCN115内部のデータ並べ替
え回路202〜204に論理値“1”の制御信号215
を与え、データ並べ替え回路202〜204を前記ビッ
グエンディアン選択状態に切り換える。ビッグエンディ
アン方式の割り込み処理が終了し、CPU110から割
り込み処理実行終了信号174がフラグ状態退避回路1
74に入力されると、フラグ状態退避回路183に退避
された割り込み発生前のフラグの値を、エンディアンフ
ラグ182に格納する。エンディアンフラグ182の値
はエンディアンフラグ信号171を通してCCN115
内部のデータ並べ替え回路に伝えられ、CCN115内
のデータ並べ替え回路を割り込み発生前の状態、即ち、
前記リトルエンディアン選択状態に戻す。割り込み発生
前のにフラグ状態退避回路183は保持回路を複数持っ
ており、割り込み処理を実行中に新たに割り込みが発生
しても対応できる。尚、割り込み判定回路は、割り込み
優先レベルやマスクレベルに応じた公知の割り込み制御
も行うことができる。
An interrupt vector generation circuit 184 connected to the outside of the microprocessor 100 converts various interrupt requests 175 to the microprocessor 100 into an interrupt vector 173 and inputs the interrupt vector 173 to an interrupt determination circuit 181 inside the INTC 117. Interrupt determination circuit 18
1 is a comparison between the big endian interrupt vector number stored in the interrupt setting register 180 and the interrupt request vector number 173 generated by the interrupt vector generation circuit 184, and if the interrupt is a big endian interrupt, Then, the value of the endian flag 182 before the occurrence of the interrupt is saved in the flag state saving circuit 183, and “1” is set in the endian flag 182, and at the same time, the fact that the interrupt process has occurred is notified to the CPU 110 through the signal line 172. Endian flag 18
When 2 is set to the logical value “1”, the control signal 215 of the logical value “1” is transmitted to the data rearranging circuits 202 to 204 inside the CCN 115 through the endian flag signal 171.
To switch the data rearrangement circuits 202 to 204 to the big endian selection state. The big endian interrupt processing is completed, and the interrupt processing execution end signal 174 is output from the CPU 110 to the flag state saving circuit 1.
When input to the flag 74, the flag value saved in the flag state saving circuit 183 before the occurrence of the interrupt is stored in the endian flag 182. The value of the endian flag 182 is transmitted through the endian flag signal 171 to the CCN 115.
The data is transmitted to the internal data rearrangement circuit, and the data rearrangement circuit in the CCN 115 is changed to the state before the occurrence of the interrupt, ie,
Return to the little endian selection state. The flag state saving circuit 183 has a plurality of holding circuits before an interrupt occurs, and can cope with a new interrupt occurring during execution of the interrupt processing. The interrupt determination circuit can also perform a known interrupt control according to the interrupt priority level and the mask level.

【0028】例えば上記リトルエンディアン選択状態は
OS処理に用い、ビッグエンディアン選択状態はサブル
ーチンとしての通信処理に用いることができる。このと
き、OS処理に用いられるデータ情報やプログラム情報
はリトルエンディアンとされる。通信データはビッグエ
ンディアンとされる。そのような場合に、上記のような
リトルエンディアン方式のOS処理を実行中にビッグエ
ンディアン方式の通信処理の割り込みが発生した場合、
エンディアン切り換え回路201にINTC117のエ
ンディアンフラグ182の値が論理値“1”にセットさ
れたことが、信号線171を通してエンディアン切り換
え回路201に入力されると、エンディアン切り換え制
御信号215が論理値“1”にされてデータ並べ替え回
路202、203、204に入力される。各データ並べ
替え回路202、203、204はエンディアン切り換
え制御信号215の論理値“1”に応答して、リトルエ
ンディアン選択状態からビッグエンディアン選択状態に
切り換えられる。これによって、CPU110のレジス
タとメモリとの間のデータ転送などをビッグエンディア
ンで行うことが可能になる。通信処理の割り込みルーチ
ンが終了すると、エンディアンフラグ182の値が論理
値“0”にクリアされ、その情報がエンディアン切り換
え回路201に信号線171を通して入力され、エンデ
ィアン切り換え制御信号215が論理値“0”となり、
ビッグエンディアン方式からリトルエンディアン方式に
切り換えてOS処理を実行可能にされる。リトルエンデ
ィアン方式のOS処理を実行中に他のリトルエンディア
ン方式の割り込みが発生した場合、エンディアン切り換
え回路201にINTC117のエンディアンフラグ1
82の値が論理値“0”のまま変化しないため、エンデ
ィアン切り換え制御信号215も論理値“0”のままで
あるので、リトルエンディアン方式で処理を実行する。
この場合、割り込み処理が終了した際もエンディアンフ
ラグ182の値は論理値“0”のまま変化しないので、
次の処理もリトルエンディアン方式で実行される。この
ように、割り込み発生前のエンディアンフラグ182の
状態が保持されているため、割り込みが多重に発生して
もエンディアンの切り換えを正しく実行することができ
る。
For example, the little endian selected state can be used for OS processing, and the big endian selected state can be used for communication processing as a subroutine. At this time, data information and program information used for the OS processing are little endian. Communication data is assumed to be big endian. In such a case, if an interrupt of the big endian communication processing occurs while executing the little endian OS processing as described above,
When the value of the endian flag 182 of the INTC 117 is set to the logical value “1” by the endian switching circuit 201 and input to the endian switching circuit 201 through the signal line 171, the endian switching control signal 215 changes to the logical value “1”. And input to the data rearrangement circuits 202, 203, and 204. Each of the data rearranging circuits 202, 203, and 204 is switched from the little endian selection state to the big endian selection state in response to the logical value "1" of the endian switching control signal 215. Thus, data transfer between the register and the memory of the CPU 110 can be performed in big endian. When the interrupt routine of the communication process is completed, the value of the endian flag 182 is cleared to the logical value “0”, the information is input to the endian switching circuit 201 through the signal line 171, and the endian switching control signal 215 is set to the logical value “0”. Becomes
OS processing can be executed by switching from the big endian system to the little endian system. If another little endian interrupt occurs while executing little endian OS processing, the endian switching circuit 201 sends the endian flag 1 of the INTC 117 to the endian switching circuit 201.
Since the value of 82 does not change while maintaining the logical value “0”, the endian switching control signal 215 also maintains the logical value “0”, so that the processing is executed in the little endian system.
In this case, the value of the endian flag 182 does not change with the logical value “0” even when the interrupt processing is completed.
The next processing is also executed in the little endian system. As described above, since the state of the endian flag 182 before the occurrence of the interrupt is held, the endian can be correctly switched even if multiple interrupts occur.

【0029】エンディアンフラグ182の切換えタイミ
ングは、ビッグエンディアン選択状態への切換えは、割
り込みによる全ての退避処理を完了した後である。退避
処理が完了される前にエンディアンの切換えが行われて
しまうと、復帰後の処理データのフォーマットが一定し
なくなるからである。リトルエンディアン選択状態への
切換えに際しては、復帰処理の前にエンディアンの切換
え処理が完了されなければならない。
The switching timing of the endian flag 182 is after the switching to the big endian selection state is completed after all the evacuation processing by interruption is completed. This is because if the endian is switched before the save processing is completed, the format of the processed data after restoration will not be constant. When switching to the little endian selection state, the endian switching process must be completed before the return process.

【0030】次に、マイクロプロセッサ100の全体的
な動作を更に詳細に説明する。前述のように、図1のシ
ステムでは、リトルエンディアンのフォーマットに準拠
したデータ情報及び命令情報を用いてデータ処理を行う
OS処理と、ビッグエンディアンのフォーマットに準拠
したデータ情報及び命令情報を用いてデータ処理を行う
通信処理とが混在する。このシステムでは通常リトルエ
ンディアンに準拠してOS処理を実行しており、通信処
理の割り込みが発生した際にビッグエンディアンに準拠
したデータフォーマットへ切り換え、割り込みから復帰
するときにリトルエンディアンに切り換える。CPU1
10はキャッシュメモリ112や外部メモリ101から
命令をフェッチし、内部の命令デコーダで命令を解読し
て、演算やメモリアクセスなどの処理を命令通りに実行
させるように、マイクロプロセッサ100内の各部を制
御する。DSP111はCPU110での命令デコード
の結果、DSP111内の乗算器やALUを使用する命
令であった場合に動作する。CPU110の汎用レジス
タはDSP111がメモリアクセスする際のアドレスポ
インタを兼ねており、Xメモリ113とYメモリ114
にXDB143とYDB144を使用してアクセスする
際のアドレスを、CCN115を通してXAB121と
YAB122に出力する。
Next, the overall operation of the microprocessor 100 will be described in more detail. As described above, in the system of FIG. 1, the OS processing for performing data processing using data information and instruction information conforming to the little endian format, and the data processing using the data information and instruction information conforming to the big endian format are used. Communication processing that performs processing is mixed. In this system, OS processing is normally performed in accordance with little endian. When an interrupt occurs in communication processing, the data format is switched to big endian, and when returning from the interrupt, the data format is switched to little endian. CPU1
10 fetches an instruction from the cache memory 112 or the external memory 101, decodes the instruction with an internal instruction decoder, and controls each unit in the microprocessor 100 so that processing such as operation and memory access is executed according to the instruction. I do. The DSP 111 operates when an instruction decoded by the CPU 110 is an instruction that uses a multiplier or an ALU in the DSP 111. The general-purpose register of the CPU 110 also serves as an address pointer when the DSP 111 accesses the memory, and the X memory 113 and the Y memory 114
The address at the time of access using the XDB 143 and the YDB 144 is output to the XAB 121 and the YAB 122 through the CCN 115.

【0031】OS処理のようなリトルエンディアン方式
の処理を実行中のマイクロプロセッサ100のメモリア
クセス動作は下記の通りである。CPU110は、内部
のプログラムカウンタ等から、フェッチする命令が格納
されているメモリアドレスをアドレス出力132よりC
CN115に出力する。CCN115ではCPU110
から受け取ったアドレスから、CPU110がフェッチ
しようとする命令がキャッシュメモリ112に格納され
ているかどうかを判定する。判定の結果、CPU110
がフェッチしようとする命令がキャッシュメモリ112
に格納されている場合、その命令が格納されているキャ
ッシュメモリ112のアドレスをアドレス出力136か
らCAB120に出力する。キャッシュメモリ112
は、アドレス入力137より受け取ったアドレスの部分
に格納された命令をデータ入出力145を通してCDB
142に出力する。CDB142に出力された命令はC
CN115を通り、データ入出力133からCPU11
0へ入力され、命令デコーダでデコードされる。また、
CCN115での判定の結果、CPU110がフェッチ
しようとする命令が、キャッシュメモリ112に格納さ
れていない場合、CCN115はBSC116に対し外
部メモリアクセスの要求を出すと同時に、アドレス出力
152からIAB150にアドレスを出力する。BSC
116はアドレス入力153からアドレスを受け取り、
アドレスが外部メモリ101を示している時はアドレス
出力164、外部アドレスバス162、アドレス入力1
65を通してアドレスを与え、アドレスが外部メモリ1
02を示している時はアドレス出力164、外部アドレ
スバス162、アドレス入力166を通してアドレスを
与える。外部メモリ101は与えられたアドレスに格納
された命令を、データ入出力168、外部データバス1
63、データ入出力167を通してBSC116に入力
する。BSC116は外部メモリ101から受け取った
命令を、データ入出力155、IDB151、データ入
出力154を通してCCN115に入力する。CCN1
15ではリトルエンディアン方式の命令を内部のデータ
並べ替え回路で上述の如くバイト単位でビッグエンディ
アン形式に並べ替えを行い、データ入出力133を通し
てCPU110に入力する。CPU110では内部の命
令デコーダで命令をデコードし、マイクロプロセッサ1
00を命令通りに動作させる。
The memory access operation of the microprocessor 100 during execution of the little endian processing such as the OS processing is as follows. The CPU 110 outputs a memory address storing an instruction to be fetched from an address output 132 from an internal program counter or the like from an address output 132.
Output to CN115. CPU 110 in CCN 115
It is determined from the address received from the CPU whether the instruction to be fetched by the CPU 110 is stored in the cache memory 112. As a result of the determination, the CPU 110
The instruction to be fetched by the cache memory 112
If the instruction is stored in the cache memory 112, the address of the cache memory 112 in which the instruction is stored is output from the address output 136 to the CAB 120. Cache memory 112
Sends the instruction stored in the address portion received from the address input 137 to the CDB through the data input / output 145.
142. The instruction output to CDB 142 is C
The data input / output 133 passes through the CN 115 to the CPU 11
0 and decoded by the instruction decoder. Also,
As a result of the determination by the CCN 115, if the instruction to be fetched by the CPU 110 is not stored in the cache memory 112, the CCN 115 issues an external memory access request to the BSC 116 and simultaneously outputs an address from the address output 152 to the IAB 150. I do. BSC
116 receives the address from address input 153,
When the address indicates the external memory 101, the address output 164, the external address bus 162, the address input 1
Address through the external memory 1
When "02" is indicated, an address is supplied through the address output 164, the external address bus 162, and the address input 166. The external memory 101 transmits an instruction stored at a given address to the data input / output 168 and the external data bus 1.
63, input to the BSC 116 through the data input / output 167. The BSC 116 inputs the command received from the external memory 101 to the CCN 115 through the data input / output 155, the IDB 151, and the data input / output 154. CCN1
At 15, the little endian instructions are rearranged in big endian format by the internal data rearranging circuit in byte units as described above, and input to the CPU 110 through the data input / output 133. The CPU 110 decodes an instruction with an internal instruction decoder, and
00 is operated as instructed.

【0032】命令フェッチを行いデコードした結果、命
令がCPU110内汎用レジスタのメモリアクセスを示
す命令の時で、外部メモリ101から汎用レジスタへの
データ転送を行う命令の場合、命令フェッチの動作と同
様に動作してCPU110内の汎用レジスタにデータが
入力される。命令デコードの結果、汎用レジスタから外
部メモリ101へのデータ転送を行う命令の場合は、C
PU110のアドレス出力132から出力されるアドレ
スと、データ入出力133から出力されるライトデータ
をCCN115が受け取り、CPU110がライトしよ
うとするアドレスのデータが、キャッシュメモリ112
に格納されているかどうかを判定する。判定の結果、ラ
イトしようとするアドレスがキャッシュメモリ112に
格納されている場合、CAB120にアドレス出力13
6を通してアドレスを、CDB142にCCN115内
のデータ並べ替え回路でリトルエンディアン方式のデー
タになるように並べ替えを行ったライトデータをそれぞ
れ出力する。キャッシュメモリ112はアドレス入力1
37からアドレスを、データ入出力145からライトデ
ータをそれぞれ受け取り、指定されたアドレス部分にリ
トルエンディアン方式でライトデータを格納する。ま
た、CCN115での判定の結果、ライトしようとする
アドレスがキャッシュメモリ112に格納されていない
場合、キャッシュメモリ112に上記と同様の動作でデ
ータを格納するのと同時に、CCN115からBSC1
16に外部メモリアクセス要求を出す。CCN115は
IAB150にアドレス出力152からアドレスを出力
し、同時に、IDB151にデータ入出力154からC
CN115内のデータ並べ替え回路でリトルエンディア
ン方式のデータになるように並べ替えを行ったライトデ
ータを出力する。BSC116はアドレス入力153か
らアドレスを、データ入出力155からライトデータを
受け取り、外部アドレスバス162にアドレス出力16
4を通してアドレスを、外部データバス163にデータ
入出力167を通してライトデータをそれぞれ出力す
る。それと同時に外部メモリ101に対し、メモリアク
セスに必要な制御信号170を与え、それにより外部メ
モリ101は、アドレス入力165からアドレスを、デ
ータ入出力168からライトデータを受け取り、指定さ
れたアドレスにデータを格納する。
As a result of the instruction fetch and decoding, if the instruction is an instruction indicating memory access to a general-purpose register in the CPU 110, and if the instruction transfers data from the external memory 101 to the general-purpose register, the operation is performed in the same manner as the instruction fetch operation. It operates and data is input to a general-purpose register in the CPU 110. As a result of the instruction decode, if the instruction is to transfer data from the general-purpose register to the external memory 101, C
The address output from the address output 132 of the PU 110 and the write data output from the data input / output 133 are received by the CCN 115, and the data of the address to be written by the CPU 110 is stored in the cache memory 112.
It is determined whether it is stored in. If it is determined that the address to be written is stored in the cache memory 112, the address output 13 is output to the CAB 120.
6 and the write data output to the CDB 142 by the data rearranging circuit in the CCN 115 so that the data is rearranged into little endian data. Cache memory 112 has address input 1
37, and receives write data from the data input / output 145, and stores the write data in the specified address portion in the little endian system. If the address to be written is not stored in the cache memory 112 as a result of the determination by the CCN 115, the data is stored in the cache memory 112 by the same operation as described above, and at the same time, the CCN 115
An external memory access request is issued to 16. The CCN 115 outputs the address from the address output 152 to the IAB 150, and simultaneously outputs the address from the data input / output 154 to the IDB 151.
The data rearrangement circuit in the CN 115 outputs the write data that has been rearranged to be little endian data. The BSC 116 receives the address from the address input 153 and the write data from the data input / output 155, and outputs the address output 16 to the external address bus 162.
4 and the write data to the external data bus 163 through the data input / output 167. At the same time, a control signal 170 necessary for memory access is given to the external memory 101, whereby the external memory 101 receives an address from the address input 165, receives write data from the data input / output 168, and writes data to the designated address. Store.

【0033】命令フェッチを行いデコードした結果、命
令がCPU110内の汎用レジスタのXメモリ113と
のデータ転送を示す命令の場合は、CPU110からア
クセスするXメモリアドレスがアドレス出力132から
CCN115に出力され、CCN115ではアドレスの
判定を行わずCAB120にアドレス出力136を通し
てアドレスを出力する。Xメモリ113はアドレス入力
138からアドレスを受け取り、指定されたアドレスに
CCN115内のデータ並べ替え回路でリトルエンディ
アン方式のデータになるように並べ替えを行ったデータ
を、CDB142、データ入出力146を通して格納し
たり、リトルエンディアン方式のデータを出力したりし
て、CPU110内汎用レジスタとデータのやり取りを
行う。また、命令がCPU110内汎用レジスタのYメ
モリ114とのデータ転送を示す命令の場合、Yメモリ
114はXメモリアクセスの時と同様の動作でCAB1
20へ出力されたアドレスをアドレス入力139から受
け取り、データ入出力149を通してCDB142との
データのやり取りを行い、CPU110内汎用レジスタ
とデータやり取りを行う。
As a result of instruction fetch and decoding, if the instruction is an instruction indicating data transfer to / from X memory 113 of a general-purpose register in CPU 110, the X memory address accessed from CPU 110 is output from address output 132 to CCN 115, The CCN 115 outputs the address to the CAB 120 through the address output 136 without performing the address determination. The X memory 113 receives the address from the address input 138, and stores, through the CDB 142 and the data input / output 146, the data that has been rearranged to the specified address by the data rearranging circuit in the CCN 115 so as to be little endian data. Or output little-endian data to exchange data with general-purpose registers in the CPU 110. When the instruction is an instruction indicating data transfer to / from the Y memory 114 of the general-purpose register in the CPU 110, the Y memory 114 operates in the same manner as in the case of the X memory access.
The address output to the CPU 20 is received from the address input 139, data is exchanged with the CDB 142 through the data input / output 149, and data is exchanged with the general-purpose register in the CPU 110.

【0034】命令フェッチを行いデコードした結果、命
令がDSP111内のデータレジスタのメモリアクセス
を示す命令で、アクセスするメモリアドレスが外部メモ
リ101を指定している場合は、CPU110の汎用レ
ジスタのメモリアクセスと同様の動作でメモリアクセス
を実行し、CCN115からデータ入出力134を通し
てデータのやり取りを行う。アクセスするメモリアドレ
スがXメモリ113またはYメモリ114を指定してい
る場合、CCN115はアドレス判定を行わず、CAB
120にアドレス出力136からアドレスを出力する。
Xメモリ113またはYメモリ114は、アドレス入力
138またはアドレス入力139からアドレスを受け取
り、データ入出力146または147を通してCDB1
42から指定されたアドレスにCCN115内データ並
べ替え回路でリトルエンディアン方式のデータになるよ
うに並べ替えを行ったデータを格納したり、CDB14
2に指定されたアドレスからデータを読み出したりす
る。CDB142を使用したDSP111内のデータレ
ジスタのメモリアクセスの際、CCN115はデータ入
出力134を通してメモリアクセス用のデータをやり取
り行う。
As a result of the instruction fetch and decoding, if the instruction is an instruction indicating a memory access of a data register in the DSP 111 and the memory address to be accessed specifies the external memory 101, the memory access of the general-purpose register of the CPU 110 is performed. The memory access is executed by the same operation, and data is exchanged from the CCN 115 through the data input / output 134. When the memory address to be accessed specifies the X memory 113 or the Y memory 114, the CCN 115 does not perform the address determination and the CAB
The address is output from the address output 136 to 120.
The X memory 113 or the Y memory 114 receives an address from the address input 138 or the address input 139, and outputs the CDB1 through the data input / output 146 or 147.
The data rearranged by the data rearrangement circuit in the CCN 115 so as to be the data of the little endian system is stored in the address designated from 42, and the CDB 14
For example, data is read from the address designated as 2. When the memory of the data register in the DSP 111 is accessed using the CDB 142, the CCN 115 exchanges data for memory access through the data input / output 134.

【0035】命令デコードの結果、XバスとYバスを用
いた並列メモリアクセスを示す命令だった場合、CPU
110のアドレス出力132からXアドレスとYアドレ
スの2種類のアドレスが同時にCCN115に出力され
る。CCN115は受け取った2つのアドレスをアドレ
ス判定を行わず、Xアドレス出力130を通してXAB
121に、Yアドレス出力122を通してYAB122
にそれぞれアドレスを出力する。Xメモリ113は、X
アドレス入力140からアドレスを受け取り、XDB1
42からXデータ入出力148を通してCCN115内
のデータ並べ替え回路でリトルエンディアン方式のデー
タになるようにデータの並べ替えを行ったライトデータ
を受け取り指定された場所に格納したり、指定された場
所からXデータ入出力148を通してデータをXDB1
43に出力したりする。Yメモリ114は、Yアドレス
入力141からアドレスを受け取り、YDB143から
Yデータ入出力149を通してCCN115内のデータ
並べ替え回路でリトルエンディアン方式のデータになる
ようにデータの並べ替えを行ったライトデータを受け取
り、指定された場所に格納したり、指定された場所から
Yデータ入出力149を通してデータをYDB144に
出力したりする。この時、Xメモリ113へのアクセス
とYメモリ114へのアクセスは同時に実行される。C
CN115はデータ入出力134を通してDSP111
とデータのやり取りを行う。
If the result of the instruction decode indicates that the instruction indicates a parallel memory access using the X bus and the Y bus,
Two types of addresses, an X address and a Y address, are simultaneously output from the address output 132 of the CC 110 to the CCN 115. The CCN 115 does not perform the address determination on the two received addresses, and performs XAB through the X address output 130.
YAB 122 through Y address output 122
Output the respective address. X memory 113 stores X
The address is received from the address input 140, and XDB1 is received.
42, the write data received by the data rearranging circuit in the CCN 115 through the X data input / output 148 is rearranged so that the data becomes little endian data, and is stored in a specified location, or from the specified location. XDB1 through X data input / output 148
43. The Y memory 114 receives the address from the Y address input 141 and receives the write data from the YDB 143 through the Y data input / output 149, in which the data rearrangement circuit in the CCN 115 rearranges the data so that the data becomes little endian data. , And outputs data to the YDB 144 through the Y data input / output 149 from the specified location. At this time, the access to the X memory 113 and the access to the Y memory 114 are performed simultaneously. C
The CN 115 is connected to the DSP 111 through the data input / output 134.
To exchange data with

【0036】通信処理のようなビッグエンディアン方式
の処理を実行中のマイクロプロセッサ100のメモリア
クセス動作では、CCN115内のデータ並べ替え回路
によるバイト単位のデータの並べ替えを行わないこと以
外は、上記リトルエンディアン方式の処理を実行中と同
様に動作される。
In the memory access operation of the microprocessor 100 during execution of the big endian processing such as the communication processing, except that the data rearrangement circuit in the CCN 115 does not rearrange the data in units of bytes, The operation is performed in the same manner as during the endian processing.

【0037】OS処理を実行中のCCN115の動作を
更に詳しく説明する。OS処理を実行中のため、INT
C117内のエンディアンフラグ182は“0”になっ
ており、信号線171によりエンディアン切り換え回路
201はリトルエンディアン方式に設定されている。命
令フェッチの為にCPU110からアドレス出力132
を通して受け取ったアドレスは、アドレス比較回路20
5に入力される。アドレス比較回路205では、受け取
ったアドレスからフェッチしようとする命令がキャッシ
ュメモリ112に格納されているかどうかを判定する。
判定の結果、命令がキャッシュメモリ112に格納され
ている場合は、内蔵メモリアクセス回路206にアドレ
ス出力210を通してアドレスを送る。内蔵メモリアク
セス回路206は受け取ったアドレスから、アクセス制
御信号211と、アドレス出力136、CAB120、
アドレス入力137を通してアドレスを、キャッシュメ
モリ112に出力する。キャッシュメモリ112は受け
取ったアドレスに格納されている命令をデータ入出力1
45、CDB142、データ入出力217を通してCバ
スアクセス用データ並べ替え回路202に入力する。C
バスアクセス用データ並べ替え回路202はエンディア
ン切り換え回路201からの制御信号215によって、
リトルエンディアン形式の命令をビッグエンディアン形
式に並べ替えてデータ入出力220を通してセレクタ2
07に出力する。セレクタ207はCPU110への出
力を選択し、データ入出力133を通して、命令をCP
U110に入力する。また、アドレス比較回路205で
の判定の結果、フェッチしようとする命令がキャッシュ
メモリ112に格納されていない場合、アドレス比較回
路205はBSC116に外部メモリアクセス要求信号
214を送り、同時にアドレス出力152からIAB1
50にアドレスを出力する。CCN115はBSC11
6で外部メモリにアクセスして送られてきた命令を、デ
ータ入出力154、CDB142を通してCバスアクセ
ス用データ並べ替え回路202に入力する。Cバスアク
セス用データ並べ替え回路202では、同様にリトルエ
ンディアン形式の命令をビッグエンディアン形式に並べ
替えて、データ入出力217を通してセレクタ207に
出力する。セレクタ207はCPU110への出力を選
択し、データ入出力133を通して、命令をCPU11
0に入力する。
The operation of the CCN 115 during the execution of the OS process will be described in more detail. Since OS processing is being executed, INT
The endian flag 182 in C117 is “0”, and the endian switching circuit 201 is set to little endian by the signal line 171. Address output 132 from CPU 110 for instruction fetch
The address received through the address comparison circuit 20
5 is input. The address comparison circuit 205 determines whether an instruction to be fetched from the received address is stored in the cache memory 112.
As a result of the determination, if the instruction is stored in the cache memory 112, the address is sent to the internal memory access circuit 206 through the address output 210. The built-in memory access circuit 206 calculates an access control signal 211, an address output 136, a CAB 120,
The address is output to the cache memory 112 through the address input 137. The cache memory 112 stores the instruction stored at the received address in the data input / output 1
45, the CDB 142, and the data input / output 217, and input to the C bus access data rearranging circuit 202. C
The bus access data rearranging circuit 202 is controlled by the control signal 215 from the endian switching circuit 201.
The instructions in little endian format are rearranged in big endian format and selector 2 is passed through data input / output 220.
07. The selector 207 selects an output to the CPU 110 and, through the data input / output 133,
Input to U110. If the result of the determination by the address comparison circuit 205 indicates that the instruction to be fetched is not stored in the cache memory 112, the address comparison circuit 205 sends an external memory access request signal 214 to the BSC 116, and at the same time, outputs the IAB 1
The address is output to 50. CCN115 is BSC11
The instruction sent by accessing the external memory at 6 is input to the C bus access data rearranging circuit 202 through the data input / output 154 and the CDB 142. Similarly, the C bus access data rearranging circuit 202 rearranges the instructions in little endian format into big endian format and outputs the instructions to the selector 207 through the data input / output 217. The selector 207 selects an output to the CPU 110 and sends an instruction to the CPU 11 through the data input / output 133.
Enter 0.

【0038】命令フェッチを行いデコードした結果、外
部メモリ101からCPU110内汎用レジスタへのデ
ータ転送を行う命令であった時は、上記命令フェッチ時
と同様の動作をする。命令デコードの結果、CPU11
0内汎用レジスタから外部メモリ101へのデータ転送
を実行する命令だった場合、CPU110からデータ入
出力133を通して出力されたデータがセレクタ207
データ入出力220を通してCバスアクセス用データ並
べ替え回路202に出力される。Cバスアクセス用デー
タ並べ替え回路202では、データをビッグエンディア
ン形式からリトルエンディアン形式に並べ替えて、デー
タ入出力217を通してCDB142に出力する。この
時、アドレス比較回路205は、メモリアクセスの為に
CPU110からアドレス出力132を通して出力され
るアドレスがキャッシュメモリ112に格納されている
かどうかを判定し、キャッシュメモリ112に格納され
ている場合は、内蔵メモリアクセス回路206にアドレ
ス出力210を通して出力する。内蔵メモリアクセス回
路206はアクセス制御信号211と、アドレス出力1
36、CAB137、アドレス入力137を通してアド
レスを、キャッシュメモリ112に出力する。キャッシ
ュメモリ112はアドレスにより指定された部分にCD
B142上のリトルエンディアン形式のデータを格納す
る。判定の結果、キャッシュメモリ112に格納されて
いない場合は、上記同様にしてキャッシュメモリ112
にデータを格納するのと同時に、BSC116に外部ア
クセス要求信号214を送り、アドレス出力152から
IAB150にアドレスを、データ入出力154を通し
てIDB151にリトルエンディアン形式のデータをそ
れぞれ出力し、外部メモリ101にデータを格納する。
As a result of the instruction fetch and decoding, if the instruction is to transfer data from the external memory 101 to the general-purpose register in the CPU 110, the same operation as in the above-described instruction fetch is performed. As a result of the instruction decoding, the CPU 11
If the instruction is to execute data transfer from the general-purpose register in 0 to the external memory 101, the data output from the CPU 110 through the data input / output 133 is the selector 207.
The data is output to the C bus access data rearranging circuit 202 through the data input / output 220. The C bus access data rearranging circuit 202 rearranges the data from the big endian format to the little endian format and outputs the data to the CDB 142 via the data input / output 217. At this time, the address comparison circuit 205 determines whether the address output from the CPU 110 through the address output 132 for memory access is stored in the cache memory 112, and if the address is stored in the cache memory 112, The data is output to the memory access circuit 206 through the address output 210. The built-in memory access circuit 206 receives the access control signal 211 and the address output 1
36, the CAB 137, and the address are output to the cache memory 112 through the address input 137. The cache memory 112 stores a CD in the portion designated by the address.
The little endian format data on B142 is stored. As a result of the determination, if the data is not stored in the cache memory 112,
At the same time as sending data to the external memory 101, the external access request signal 214 is sent to the BSC 116, an address is output from the address output 152 to the IAB 150, little endian data is output to the IDB 151 through the data input / output 154, and the data is output to the external memory 101. Is stored.

【0039】命令デコードの結果、CPU110内汎用
レジスタとXメモリ113またはYメモリ114との間
のデータ転送命令だった場合、CPU110のアドレス
出力132からアドレス比較回路205に出力されたア
ドレスは、アドレス判定を行わずアドレス出力210を
通して内蔵メモリアクセス回路206に入力される。X
メモリ113へのアクセスの場合、Xメモリ113は内
蔵メモリアクセス回路206からアクセス制御信号21
2と、アドレス出力136、CAB120、アドレス入
力138を通してアドレスを受け取り、データ入出力1
46、CDB142を通してリトルエンディアン形式の
データをやり取りする。また、Yメモリ114へのアク
セスの場合、Yメモリ114は内蔵メモリアクセス回路
206からアクセス制御信号213、アドレス出力13
6、CAB120、アドレス入力139を通してアドレ
スを受け取り、データ入出力147、CDB142を通
してリトルエンディアン方式のデータをやり取りする。
データ並べ替え回路202の動作は、CPU110内汎
用レジスタと外部メモリ101または102間のデータ
転送時と同様である。
As a result of the instruction decoding, if the instruction is a data transfer instruction between the general-purpose register in the CPU 110 and the X memory 113 or the Y memory 114, the address output from the address output 132 of the CPU 110 to the address comparison circuit 205 is , And is input to the built-in memory access circuit 206 through the address output 210. X
In the case of accessing the memory 113, the X memory 113 sends the access control signal 21
2 and an address through address output 136, CAB 120 and address input 138, and data input / output 1
46, exchange little-endian data through the CDB 142. When accessing the Y memory 114, the Y memory 114 receives an access control signal 213 and an address output 13 from the built-in memory access circuit 206.
6, receives an address through the CAB 120 and the address input 139, and exchanges little-endian data through the data input / output 147 and the CDB 142.
The operation of the data rearrangement circuit 202 is the same as when data is transferred between the general-purpose register in the CPU 110 and the external memory 101 or 102.

【0040】命令デコードの結果、DSP111内専用
データレジスタと外部メモリ101または102とのデ
ータ転送命令である場合、セレクタ207がDSP11
1のデータ入出力134Aをセレクトすること以外は、
上記CPU110内汎用レジスタと外部メモリ101ま
たは102とのデータ転送命令を実行する際と、同様に
動作する。また、DSP111内専用データレジスタと
Xメモリ113またはYメモリ114とのデータ転送命
令であった場合も、セレクタ207がDSP111のの
データ入出力134Aをセレクトすること以外は、CP
U110内汎用レジスタとXメモリ113またはYメモ
リ114とのデータ転送命令を実行する際と同様に動作
する。
As a result of the instruction decoding, when the instruction is a data transfer instruction between the dedicated data register in the DSP 111 and the external memory 101 or 102, the selector 207 sets the
1 except that the data input / output 134A is selected.
The operation is the same as when the data transfer instruction between the general-purpose register in the CPU 110 and the external memory 101 or 102 is executed. Also, when the instruction is a data transfer instruction between the dedicated data register in the DSP 111 and the X memory 113 or the Y memory 114, except that the selector 207 selects the data input / output 134A of the DSP 111,
The operation is the same as when a data transfer instruction between the general-purpose register in the U110 and the X memory 113 or the Y memory 114 is executed.

【0041】命令デコードの結果、XバスとYバスを用
いた並列メモリアクセスを示す命令だった場合、CPU
110からアドレス出力132を通して受け取ったXア
ドレスとYアドレスがアドレス比較回路205に入力さ
れる。アドレス比較回路205ではアドレスの判定を行
わず、アドレス出力210を通して内蔵メモリアクセス
回路206に入力される。内蔵メモリアクセス回路20
6はXメモリ113にアクセス制御信号212、Xアド
レス出力130、XAB121、Xアドレス入力140
を通してアドレスを送る。同時にYメモリ114にアク
セス制御信号213、Yアドレス出力131、YAB1
22、Yアドレス入力141を通してアドレスを送る。
Xメモリ113はXデータ入出力148、XDB14
3、Xデータ入出力218を通して、Xバスアクセス用
データ並べ替え回路203とリトルエンディアン方式で
データのやり取りを行う。同時にYメモリ114はYデ
ータ入出力149、YDB144、Yデータ入出力21
9を通して、Yバスアクセス用データ並べ替え回路20
4とリトルエンディアン方式でデータのやり取りを行
う。Xバスアクセス用データ並べ替え回路203とYバ
スアクセス用データ並べ替え回路204で、Xメモリ1
13とYメモリ114から送られてきたデータを並べ替
えて、データ入出力134Bまたは134CからDSP
111に出力したり、DSP111からデータ入出力1
34Bまたは134Cから出力されたデータをリトルエ
ンディアン方式に並べ替えて、XDB143またはYD
B144に出力したりする。
If the result of the instruction decode indicates that the instruction indicates a parallel memory access using the X bus and the Y bus,
The X address and the Y address received from the address 110 through the address output 132 are input to the address comparison circuit 205. The address comparison circuit 205 does not judge the address and inputs the address to the internal memory access circuit 206 through the address output 210. Built-in memory access circuit 20
Reference numeral 6 denotes an access control signal 212, an X address output 130, an XAB 121, and an X address input 140
Send the address through. At the same time, the access control signal 213, the Y address output 131, and the YAB1 are sent to the Y memory 114.
22, the address is sent through the Y address input 141.
X memory 113 has X data input / output 148, XDB 14
3. Data is exchanged with the X bus access data rearranging circuit 203 through the X data input / output 218 using the little endian system. At the same time, the Y memory 114 stores the Y data input / output 149, the YDB 144, and the Y data input / output 21.
9, the data rearranging circuit for Y bus access 20
4 and exchange data in little endian format. The X memory access data rearranging circuit 203 and the Y bus access data rearranging circuit 204
13 and the data transmitted from the Y memory 114 are rearranged, and the DSP is transmitted from the data input / output 134B or 134C.
111 and data input / output 1
The data output from the 34B or 134C is rearranged in the little endian format, and the XDB 143 or the YD
B144.

【0042】先に述べたとおり、通信処理のようなビッ
グエンディアン形式の処理を実行するときは、データ並
べ替え回路202・203・204でのデータの並べ替
えが異なるだけで、それ以外はリトルエンディアン方式
で実行している時と同様の動作である。この例ではCP
U110のアーキテクチャはビッグエンディアンである
から、この時はデータの上位と下位を入れ替えることを
要しない。
As described above, when performing the processing of the big endian format such as the communication processing, only the data rearrangement in the data rearrangement circuits 202, 203, and 204 is different, and otherwise, little endian. This is the same operation as when executing in the system. In this example, CP
Since the architecture of U110 is big-endian, it is not necessary to switch the upper and lower data positions at this time.

【0043】図4には図1で説明したデータ並べ替え回
路をBSC116Aに持つマイクロプロセッサ400の
構成が示される。キャッシュコントローラ115Aには
データ並び替え回路202〜204は設けられていな
い。このマイクロプロセッサ400において、データ並
べ替え回路202A、203Aの一例は図5に示され
る。基本的な構成は図3と同じであり、内部データバス
151A〜151Dと外部データバス163A〜163
Dとの間にデータ並べ替え回路202Aが配置され、内
部データバス151C,151Dと周辺データバス15
7A,157Bとの間にデータ並べ替え回路203Aが
配置されている。151A〜151D、163A〜16
3D、157A,157Bは夫々バイト単位の信号線を
意味し、上位と下位の関係は図3の場合と同じである。
データ並べ替え回路202A,203Aはバイト単位の
信号線毎に設けられたセレクタ301A〜306Aによ
って構成されている。信号215によるセレクタ301
A〜306Aの動作は図3の場合と同様であり、ビッグ
エンディアン選択状態ではバイト単位の信号線を上位バ
イトと下位バイトとの間で入れ替えず、リトルエンディ
アン選択状態ではバイト単位の信号線を上位バイトと下
位バイトとを入れ替える。この切換え態様において、C
PU110はデータ切換え回路202A,203Aを全
く経由せずに内蔵メモリ112〜114をアクセスしな
ければならないことがある。したがって、図4のマイク
ロプロセッサ400では、内蔵メモリ112〜114は
ビッグエンディアンのフォーマットで情報を格納する。
外部メモリ101にはビッグエンディアンとリトルエン
ディアンの双方のフォーマットを混在させてデータ情報
及び命令情報を配置することができる。換言すれば、キ
ャッシュメモリ112、Xメモリ113、Yメモリ11
4のような内蔵メモリへのアクセスは、必ずビッグエン
ディアン形式で実行される。それ以外は、マイクロプロ
セッサ100と同様に動作される。
FIG. 4 shows a configuration of a microprocessor 400 having the data rearrangement circuit described in FIG. 1 in the BSC 116A. The cache controller 115A is not provided with the data rearrangement circuits 202 to 204. FIG. 5 shows an example of the data rearranging circuits 202A and 203A in the microprocessor 400. The basic configuration is the same as that of FIG. 3, and internal data buses 151A to 151D and external data buses 163A to 163 are provided.
D, a data rearranging circuit 202A is arranged between the internal data buses 151C and 151D and the peripheral data bus 15A.
7A and 157B, a data rearranging circuit 203A is arranged. 151A to 151D, 163A to 16
3D, 157A, and 157B indicate signal lines in byte units, respectively, and the relationship between the upper and lower bits is the same as in FIG.
The data rearrangement circuits 202A and 203A are configured by selectors 301A to 306A provided for each signal line in byte units. Selector 301 by signal 215
The operations of A to 306A are the same as those in FIG. 3. In the big endian selection state, the byte-based signal line is not switched between the upper byte and the lower byte. Swap bytes with lower byte. In this switching mode, C
The PU 110 may need to access the built-in memories 112 to 114 without passing through the data switching circuits 202A and 203A at all. Therefore, in the microprocessor 400 of FIG. 4, the internal memories 112 to 114 store information in a big endian format.
In the external memory 101, data information and instruction information can be arranged in a mixture of both big endian and little endian formats. In other words, the cache memory 112, the X memory 113, and the Y memory 11
Access to the built-in memory such as No. 4 is always executed in big endian format. Otherwise, the operation is the same as that of the microprocessor 100.

【0044】図6には上記マイクロプロセッサ100を
適用したハンドヘルドPCの一例が示される。マイクロ
プロセッサ100は、その他周辺モジュール118とし
て、タイマ400、キーボードインタフェース401、
D/A変換器402、A/D変換器403、赤外線等の
光通信インタフェース(IrDA)404、シリアルコ
ミュニケーションインタフェース(SCI)405、リ
アルタイムクロック(RTC)406、クロックパルス
ジェネレータ(CPG)407を有する。また、図6に
おいてマイクロプロセッサ100は、更に、メモリマネ
ージメントユニット(MMU)408、ダイレクトメモ
リアクセスコントローラ(DMAC)415を有する。
マイクロプロセッサ100には入力デバイスとして、キ
ーボード410及びタブレット(ペン入力装置)412
が接続され、出力デバイスとしてスピーカ411が接続
されている。前記SCI405には図示を省略するモデ
ムを介して通信回線に接続されている。前記BSC11
6には外部バス162,163が接続され、外部バス1
62,163には、特に制限されないが、PCカードに
接続可能なPCMCIA(Personal Computer Memory C
ard InternationalAssociation)カードインタフェース
420、ミニチュアカードインタフェース421、パラ
レルポートなどのI/Oポート422、カラー液晶ディ
スプレイ424に対する表示駆動制御を行うカラー液晶
コントローラ(カラーLCDC)423、及びDRAM
やROMなどの外部メモリ101が接続されている。
FIG. 6 shows an example of a handheld PC to which the microprocessor 100 is applied. The microprocessor 100 includes, as other peripheral modules 118, a timer 400, a keyboard interface 401,
It has a D / A converter 402, an A / D converter 403, an optical communication interface (IrDA) 404 for infrared rays, a serial communication interface (SCI) 405, a real-time clock (RTC) 406, and a clock pulse generator (CPG) 407. In FIG. 6, the microprocessor 100 further includes a memory management unit (MMU) 408 and a direct memory access controller (DMAC) 415.
The microprocessor 100 includes a keyboard 410 and a tablet (pen input device) 412 as input devices.
Are connected, and a speaker 411 is connected as an output device. The SCI 405 is connected to a communication line via a modem (not shown). The BSC11
6, external buses 162 and 163 are connected.
Although not particularly limited, PCMCIA (Personal Computer Memory C) 62 and 163 can be connected to a PC card.
ard International Association) card interface 420, miniature card interface 421, I / O port 422 such as a parallel port, color liquid crystal controller (color LCDC) 423 for controlling display driving of color liquid crystal display 424, and DRAM
And an external memory 101 such as a ROM.

【0045】図6のハンドヘルドPCにおいて、IrD
A404を介する光通信処理の割り込みが要求されたと
き、SCI405を介するシリアル通信処理の割り込み
が要求されたときに、前記リトルエンディアン選択状態
が達成される。通信処理からOS処理に復帰するときは
前記ビッグエンディアン選択状態が達成される。
In the handheld PC shown in FIG.
The little endian selection state is achieved when an interrupt for the optical communication process via the A404 is requested and when an interrupt for the serial communication process via the SCI 405 is requested. When returning from the communication process to the OS process, the big endian selection state is achieved.

【0046】以上本発明者によってなされた発明を実施
形態に基づいて具体的に説明したが、本発明はそれに限
定されるものではなく、その要旨を逸脱しない範囲にお
いて種々変更可能であることは言うまでもない。
Although the invention made by the present inventor has been specifically described based on the embodiment, it is needless to say that the present invention is not limited to the embodiment and can be variously modified without departing from the gist thereof. No.

【0047】例えば、CPUの基本的なアーキテクチャ
はビッグエンディアンに限らず、リトルエンディアンで
あってもよい。また、データ処理装置が内蔵する回路モ
ジュールは以上の説明に限定されず、それ以外の回路モ
ジュールを含んでもよいし、また、適宜の周辺回路モジ
ュールを削除してもよい。積和演算装置はDSPに限定
されず浮動小数点演算ユニットであってもよい。
For example, the basic architecture of the CPU is not limited to big endian, but may be little endian. Further, the circuit module included in the data processing device is not limited to the above description, and may include other circuit modules, or may delete appropriate peripheral circuit modules. The product-sum operation device is not limited to the DSP, but may be a floating-point operation unit.

【0048】[0048]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。
The effects obtained by typical ones of the inventions disclosed in the present application will be briefly described as follows.

【0049】すなわち、情報処理単位の一つである複数
語の情報に対する語順の認識を動作中であっても動的に
切換えることができる。具体的には、ビッグエンディア
ンとリトルエンディアンの双方のフォーマットが混在す
るシステムにおいて、システムの動作中であってもエン
ディアンの切り換えを行うことができる。例えば、リト
ルエンディアンのフォーマットを使用するOS処理とビ
ッグエンディアンのフォーマットを使用する通信処理と
を混在させたシステムにおいてエンディアンの切換えを
システムの動作途中で動的に行うことが可能になる。
That is, it is possible to dynamically switch the recognition of the word order for the information of a plurality of words, which is one of the information processing units, even during the operation. Specifically, in a system in which both big-endian and little-endian formats are mixed, the endian can be switched even during the operation of the system. For example, in a system in which OS processing using a little endian format and communication processing using a big endian format are mixed, it is possible to dynamically switch the endian during the operation of the system.

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

【図1】本発明に係るデータ処理装置の一例であるマイ
クロプロセッサとこれを適用したデータ処理システムの
一例を示すブロック図である。
FIG. 1 is a block diagram showing an example of a microprocessor as an example of a data processing device according to the present invention and an example of a data processing system to which the microprocessor is applied.

【図2】データ並べ替え回路を含むキャッシュコントロ
ーラの一例を示すブロック図である。
FIG. 2 is a block diagram illustrating an example of a cache controller including a data rearranging circuit.

【図3】データ並び替え回路の詳細な一例を示す論理回
路図である。
FIG. 3 is a logic circuit diagram showing a detailed example of a data rearrangement circuit.

【図4】データ並べ替え回路をバスステートコントロー
ラに備えたマイクロプロセッサとこれを適用したデータ
処理システムの一例を示すブロック図である。
FIG. 4 is a block diagram illustrating an example of a microprocessor including a data rearrangement circuit in a bus state controller and a data processing system to which the microprocessor is applied;

【図5】バスステートコントローラに含まれるデータ並
べ替え回路の一例を示す論理回路図である。
FIG. 5 is a logic circuit diagram showing an example of a data rearrangement circuit included in the bus state controller.

【図6】マイクロプロセッサを適用したハンドヘルドP
Cの一例を示すブロック図である。
FIG. 6 shows a handheld P to which a microprocessor is applied.
It is a block diagram showing an example of C.

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

100 マイクロプロセッサ 101 外部メモリ 110 CPU 111 DSP 112 キャッシュメモリ 113 Xメモリ 114 Yメモリ 115 キャッシュコントローラ(CCN) 116 バスステートコントローラ(BSC) 117 割り込みコントローラ(INTC) 118 その他の周辺モジュール 120 キャッシュアドレスバス(CAB) 121 Xアドレスバス(XAB) 122 Yアドレスバス(YAB) 142 キャッシュデータバス(CDB) 143 Xデータバス(XDB) 144 Yデータバス(YDB) 150 内部アドレスバス(IAB) 151 内部データバス(IDB) 156 周辺アドレスバス(PAB) 157 周辺データバス(PDB) 162 外部アドレスバス(EAB) 163 外部データバス(EDB) 170 外部メモリアクセス制御信号 171 エンディアンフラグ信号 172 割り込み発生信号 173 割り込み要求ベクタ信号 174 割り込み処理実行終了信号 175 割り込み要求信号 180 割り込み設定レジスタ 181 割り込み判定回路 182 エンディアンフラグ 183 フラグ状態退避回路 184 割り込みベクタ生成回路 201 エンディアン切り換え回路 202 Cバスアクセス用データ並べ替え回路 203 Xバスアクセス用データ並べ替え回路 204 Yバスアクセス用データ並べ替え回路 205 アドレス比較回路 206 内蔵メモリアクセス回路 207 セレクタ 210 CCN内部アドレスバス 211 キャッシュメモリアクセス制御信号 212 Xメモリアクセス制御信号 213 Yメモリアクセス制御信号 214 外部メモリアクセス要求信号 215 エンディアン切り換え制御信号 301〜308 セレクタ REFERENCE SIGNS LIST 100 Microprocessor 101 External memory 110 CPU 111 DSP 112 Cache memory 113 X memory 114 Y memory 115 Cache controller (CCN) 116 Bus state controller (BSC) 117 Interrupt controller (INTC) 118 Other peripheral modules 120 Cache address bus (CAB) 121 X address bus (XAB) 122 Y address bus (YAB) 142 Cache data bus (CDB) 143 X data bus (XDB) 144 Y data bus (YDB) 150 Internal address bus (IAB) 151 Internal data bus (IDB) 156 Peripheral address bus (PAB) 157 Peripheral data bus (PDB) 162 External address bus (EAB) 163 External data bus (EDB) 1 70 External memory access control signal 171 Endian flag signal 172 Interrupt generation signal 173 Interrupt request vector signal 174 Interrupt processing execution end signal 175 Interrupt request signal 180 Interrupt setting register 181 Interrupt determination circuit 182 Endian flag 183 Flag state saving circuit 184 Interrupt vector generation circuit Reference Signs List 201 endian switching circuit 202 data rearranging circuit for C bus access 203 data rearranging circuit for X bus access 204 data rearranging circuit for Y bus access 205 address comparing circuit 206 built-in memory access circuit 207 selector 210 CCN internal address bus 211 cache memory Access control signal 212 X memory access control signal 213 Y memory access control signal 214 External memory Li access request signal 215 endian switching control signals 301 to 308 selectors

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 情報処理単位の一つである複数語の情報
を第1の語順で認識する演算制御手段と、前記演算制御
手段に接続され前記複数語の入力情報に対する複数語の
出力情報の語順を第1の語順又は第2の語順に選択的に
切換え可能なアライメント手段と、前記アライメント手
段に前記第1の語順又は第2の語順を指示するフラグ手
段と、前記演算制御手段に対する所定の割り込みに応答
して前記フラグ手段の値を退避してから当該フラグ手段
の値を変更し、前記割り込みからの復帰に応答して前記
退避された値をフラグ手段に復帰させる割り込み制御手
段と、を含んで成るものであることを特徴とするデータ
処理装置。
1. An arithmetic control unit for recognizing information of a plurality of words, which is one of information processing units, in a first word order, and connected to the arithmetic control unit to output information of a plurality of words with respect to the input information of the plurality of words. An alignment means capable of selectively switching the word order to a first word order or a second word order; a flag means for instructing the alignment means on the first word order or the second word order; Interrupt control means for changing the value of the flag means after saving the value of the flag means in response to the interrupt, and returning the saved value to the flag means in response to return from the interrupt; A data processing device comprising:
【請求項2】 前記演算制御手段は、算術論理演算器を
持ちフェッチした命令を実行する中央処理装置と、前記
中央処理装置の制御を受けて積和演算を行う積和演算装
置とを有し、1個の半導体基板上に形成されて成るもの
であることを特徴とする請求項1記載のデータ処理装
置。
2. The arithmetic control means includes a central processing unit having an arithmetic and logic unit for executing a fetched instruction, and a product-sum arithmetic unit for performing a product-sum operation under the control of the central processing unit. 2. The data processing apparatus according to claim 1, wherein the data processing apparatus is formed on one semiconductor substrate.
【請求項3】 前記第1の語順は前記中央処理装置が処
理する情報の処理単位の一つであるワード情報に対する
バイト順の一つの態様であるリトルエンディアンであ
り、第2の語順は前記バイト順のもう一つの態様である
ビッグエンディアンであることを特徴とする請求項2記
載のデータ処理装置。
3. The first word order is little endian, which is one mode of byte order for word information, which is one of the processing units of information processed by the central processing unit, and the second word order is the byte order. 3. The data processing device according to claim 2, wherein the data is big endian, which is another aspect of the order.
【請求項4】 前記第1の語順は前記中央処理装置が処
理する情報の処理単位の一つであるワード情報に対する
バイト順の一つの態様であるビッグエンディアンであ
り、第2の語順は前記バイト順のもう一つの態様である
リトルエンディアンであることを特徴とする請求項2記
載のデータ処理装置。
4. The first word order is big endian, which is one mode of byte order for word information, which is one of the processing units of information processed by the central processing unit, and the second word order is the byte order. 3. The data processing device according to claim 2, wherein the data is in little endian, which is another aspect of the order.
【請求項5】 キャッシュメモリと、ワークメモリと、
前記中央処理装置の命令実行状態に応答して前記キャッ
シュメモリ及びワークメモリを制御するキャッシュコン
トローラと、内蔵周辺回路と、前記キャッシュコントロ
ーラからの指示に応答してデータ処理装置の外部又は前
記内蔵周辺回路のアクセスを制御するバスステートコン
トローラと、を更に含み、 前記キャッシュコントローラは前記アライメント手段を
含み、前記アライメント手段は、前記キャッシュメモ
リ、ワークメモリ及びバスステートコントローラが接続
される第1バスと、前記中央処理装置及び積和演算装置
に接続する第2バスとの間に配置されて成るものである
ことを特徴とする請求項2記載のデータ処理装置。
5. A cache memory, a work memory,
A cache controller that controls the cache memory and the work memory in response to an instruction execution state of the central processing unit, a built-in peripheral circuit, and an external or built-in peripheral circuit of a data processing device in response to an instruction from the cache controller A bus state controller that controls access to the cache memory; the cache controller includes the alignment unit; the alignment unit includes a first bus to which the cache memory, the work memory, and the bus state controller are connected; 3. The data processing device according to claim 2, wherein the data processing device is arranged between the processing device and a second bus connected to the product-sum operation device.
【請求項6】 キャッシュメモリと、ワークメモリと、
前記中央処理装置の命令実行状態に応答して前記キャッ
シュメモリ及びワークメモリを制御するキャッシュコン
トローラと、内蔵周辺回路と、前記キャッシュコントロ
ーラからの指示に応答してデータ処理装置の外部又は前
記内蔵周辺回路のアクセスを制御するバスステートコン
トローラと、を更に含み、 前記バスステートコントローラは前記アライメント手段
を含み、前記アライメント手段は、前記キャッシュメコ
ントローラが接続される第3バスと、前記内蔵周辺回路
及び外部バスに接続する第4バスとの間に配置されて成
るものであることを特徴とする請求項2記載のデータ処
理装置。
6. A cache memory, a work memory,
A cache controller that controls the cache memory and the work memory in response to an instruction execution state of the central processing unit, a built-in peripheral circuit, and an external or built-in peripheral circuit of a data processing device in response to an instruction from the cache controller And a bus state controller for controlling access to the memory. The bus state controller includes the alignment unit, the alignment unit includes a third bus to which the cache memory controller is connected, the built-in peripheral circuit, and an external bus. 3. The data processing apparatus according to claim 2, wherein the data processing apparatus is arranged between the first bus and a fourth bus.
【請求項7】 請求項5又は6に記載のデータ処理装置
と、前記データ処理装置の演算制御手段のためのプログ
ラム情報及びデータ情報が格納される外部メモリとを有
して成るものであることを特徴とするデータ処理システ
ム。
7. A data processing device according to claim 5, further comprising an external memory for storing program information and data information for arithmetic control means of said data processing device. A data processing system characterized by the following.
JP10250729A 1998-09-04 1998-09-04 Data processor Withdrawn JP2000082009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10250729A JP2000082009A (en) 1998-09-04 1998-09-04 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10250729A JP2000082009A (en) 1998-09-04 1998-09-04 Data processor

Publications (1)

Publication Number Publication Date
JP2000082009A true JP2000082009A (en) 2000-03-21

Family

ID=17212182

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10250729A Withdrawn JP2000082009A (en) 1998-09-04 1998-09-04 Data processor

Country Status (1)

Country Link
JP (1) JP2000082009A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6981121B2 (en) 2002-06-28 2005-12-27 Fujitsu Limited Method for aligning stored data
JP5292406B2 (en) * 2008-09-12 2013-09-18 ルネサスエレクトロニクス株式会社 Semiconductor integrated circuit device
CN112835842A (en) * 2021-03-05 2021-05-25 深圳市汇顶科技股份有限公司 Terminal sequence processing method, circuit, chip and electronic terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6981121B2 (en) 2002-06-28 2005-12-27 Fujitsu Limited Method for aligning stored data
JP5292406B2 (en) * 2008-09-12 2013-09-18 ルネサスエレクトロニクス株式会社 Semiconductor integrated circuit device
JP2014179107A (en) * 2008-09-12 2014-09-25 Renesas Electronics Corp Semiconductor integrated circuit device
US9524237B2 (en) 2008-09-12 2016-12-20 Renesas Electronics Corporation Data processing device and semiconductor intergrated circuit device for a bi-endian system
CN112835842A (en) * 2021-03-05 2021-05-25 深圳市汇顶科技股份有限公司 Terminal sequence processing method, circuit, chip and electronic terminal
CN112835842B (en) * 2021-03-05 2024-04-30 深圳市汇顶科技股份有限公司 Terminal sequence processing method, circuit, chip and electronic terminal

Similar Documents

Publication Publication Date Title
US6378041B2 (en) Shared instruction cache for multiple processors
US4942519A (en) Coprocessor having a slave processor capable of checking address mapping
JPH02190930A (en) Software instruction executing apparatus
JPH0612327A (en) Data processor having cache memory
JPH10187533A (en) Cache system, processor, and method for operating processor
JP4226085B2 (en) Microprocessor and multiprocessor system
JPH076151A (en) Cpu core bus optimized for access of on-chip memory device
JPH0135367B2 (en)
US5226170A (en) Interface between processor and special instruction processor in digital data processing system
JPH03216776A (en) Integrated circuit device and microprocessor consisting of this circuit device
WO1996008769A1 (en) Computer instruction prefetch system
EP0797148B1 (en) Multi-mode cache structure
JPH06230962A (en) System and method for data processing for provision of open-ended register
EP0729604B1 (en) Register status protection during read-modify-write operation
JP2000082009A (en) Data processor
JP3088303B2 (en) Cache memory bank controller
JP3705811B2 (en) Microcontroller with reconfigurable program status word
EP4266185A1 (en) Microcontroller chip containing multi-protocol communication interface peripheral and operation method therefor
JP3822885B2 (en) 1 chip data processor
US6601122B1 (en) Exceptions and interrupts with dynamic priority and vector routing
JP3650519B2 (en) Microcomputer
US6681273B1 (en) High performance, variable data width FIFO buffer
JP3206960B2 (en) Extended central processing unit
JP3097602B2 (en) Data processing device
JPH05165641A (en) Single chip microcomputer

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060110