JP2003131873A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JP2003131873A
JP2003131873A JP2002259483A JP2002259483A JP2003131873A JP 2003131873 A JP2003131873 A JP 2003131873A JP 2002259483 A JP2002259483 A JP 2002259483A JP 2002259483 A JP2002259483 A JP 2002259483A JP 2003131873 A JP2003131873 A JP 2003131873A
Authority
JP
Japan
Prior art keywords
instruction
dsp
register
data
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002259483A
Other languages
Japanese (ja)
Other versions
JP3765782B2 (en
Inventor
Hiroshi Osuga
宏 大須賀
Atsushi Kiuchi
淳 木内
Hironori Hasegawa
博宣 長谷川
Toru Umaji
徹 馬路
Yoshiki Noguchi
孝樹 野口
Yasushi Akao
泰 赤尾
Shiro Baba
志朗 馬場
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 JP2002259483A priority Critical patent/JP3765782B2/en
Publication of JP2003131873A publication Critical patent/JP2003131873A/en
Application granted granted Critical
Publication of JP3765782B2 publication Critical patent/JP3765782B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To suppress growth in logic size such as an instruction decode circuit in a microcomputer in which a DSP engine is mounted on a single LSI together with a CPU core. SOLUTION: This microcomputer is constituted with a CPU (2), a memory unit which access is trolled by the CPU, a data bus to transfer between the above memory unit and the above CPU, and a DSP (3) connected to the above data bus. The CPU has a CPU instruction of 16 bit fixed length, an instruction register (25) to fetch a DSP instruction of 16 bit or 32 bit length for the DSP, and a decoder (24) to generate the first control signal (247) to identify the CPU instruction or the DSP instruction based on a part of the instruction fetched by the above instruction register and control behavior of the CPU in accordance with an outcome of identification, and the second control signal (20) to control the behavior of the DSP. The DSP includes a decoder (34) to decode the second control signal received from the CPU.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はセントラルプロセッ
シングユニットとディジタル信号処理ユニットとを有す
る半導体集積回路化された論理LSIに係り、高速演算
処理を要するマイクロコンピュータに適用して有効な技
術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a logic LSI formed into a semiconductor integrated circuit having a central processing unit and a digital signal processing unit, and relates to a technique effective when applied to a microcomputer requiring high-speed arithmetic processing.

【0002】[0002]

【従来の技術】算術論理演算器と共に乗算器を同一チッ
プに搭載したマイクロコンピュータについて記載された
ものの例としては特願平4−296778号又は米国特
許出願第145157号がある。これによればマイクロ
コンピュータのようなロジックLSIチップは、セント
ラルプロセッシングユニット、バス、メモリ、乗算器を
供え、特にメモリからデータを読み出す間に、該読出し
データに関する乗算命令のコマンドをセントラルプロセ
ッシングユニットから乗算器へ転送するコマンド信号線
を有する。その結果、セントラルプロセッシングユニッ
トがメモリからデータを読み出す間に、読み出しデータ
に関する乗算命令のコマンドをセントラルプロセッシン
グユニットから乗算器へ転送するので、メモリと乗算器
との間で直接データを転送することが可能になる。
2. Description of the Related Art Japanese Patent Application No. 4-296778 or U.S. Pat. App. No. 145157 is an example of a microcomputer in which a multiplier and an arithmetic logic unit are mounted on the same chip. According to this, a logic LSI chip such as a microcomputer is provided with a central processing unit, a bus, a memory and a multiplier, and in particular, while reading data from the memory, a command of a multiplication instruction regarding the read data is multiplied from the central processing unit. It has a command signal line for transferring to a container. As a result, while the central processing unit reads the data from the memory, the command of the multiply instruction regarding the read data is transferred from the central processing unit to the multiplier, so that the data can be directly transferred between the memory and the multiplier. become.

【0003】[0003]

【発明が解決しようとする課題】本発明者らはセントラ
ルプロセッシングユニットと共にディジタル信号処理ユ
ニットを一つのLSIに搭載してディジタル信号処理を
高速化することについて検討した。このとき、前記従来
技術はメモリから乗算器へ直接データを転送可能にして
いる点において乗算処理の高速化を実現しているが、セ
ントラルプロセッシングユニットによる命令実行のパイ
プライン処理を想定したとき、セントラルプロセッシン
グユニットが実行すべき命令のフェッチサイクルと乗算
処理のためのメモリアクセスサイクルとが競合するよう
な事態に対しては考慮されていなかった。また、加算や
乗算のための複数のオペランドを並列的にメモリから読
み出して演算処理の高速化を図る点についても考慮され
ていない。更にその場合には、セントラルプロセッシン
グユニットによる外部アクセスとの関係も考慮しなけれ
ば、マイクロコンピュータの使い勝手が悪くなることが
見出された。また、セントラルプロセッシングユニット
と共にディジタル信号処理ユニットを一つのLSIに搭
載する場合、CPU命令とDSP命令とのコード割り当
てやDSP命令のフォーマットを工夫することも、命令
デコード回路などの論理規模の増大を極力抑える上にお
いては必要であることが見出された。
DISCLOSURE OF THE INVENTION The present inventors have examined how to speed up digital signal processing by mounting a digital signal processing unit together with a central processing unit in one LSI. At this time, the above-mentioned conventional technique realizes high-speed multiplication processing in that data can be directly transferred from the memory to the multiplier. However, when pipeline processing of instruction execution by the central processing unit is assumed, No consideration was given to the situation where the fetch cycle of the instruction to be executed by the processing unit and the memory access cycle for the multiplication process compete with each other. Further, no consideration is given to the fact that a plurality of operands for addition and multiplication are read out from the memory in parallel to speed up the arithmetic processing. Further, in that case, it has been found that the usability of the microcomputer is deteriorated unless the relationship with the external access by the central processing unit is taken into consideration. Further, when the digital signal processing unit is mounted on one LSI together with the central processing unit, the code allocation between the CPU instruction and the DSP instruction and the format of the DSP instruction can be devised to increase the logical scale of the instruction decoding circuit as much as possible. It has been found necessary to suppress it.

【0004】本発明の目的は、セントラルプロセッシン
グユニットと共にディジタル信号処理ユニットを一つの
LSIに搭載してディジタル信号処理を高速化すること
にある。本発明の別の目的は、セントラルプロセッシン
グユニットと共にディジタル信号処理ユニットを一つの
LSIに搭載したとき、その物理的な規模の増大を極力
抑えることである。
An object of the present invention is to mount a digital signal processing unit together with a central processing unit in one LSI to speed up digital signal processing. Another object of the present invention is to suppress an increase in the physical scale of a digital processing unit mounted on one LSI together with a central processing unit as much as possible.

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

【0006】[0006]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The outline of the representative one of the inventions disclosed in the present application will be briefly described as follows.

【0007】すなわち、マイクロコンピュータは、セン
トラルプロセッシングユニット(2)と、該セントラル
プロセッシングユニットから選択的にアドレスが伝達さ
れる第1乃至第3のアドレスバス(IAB,YAB,X
AB)と、前記第1のアドレスバス(IAB)及び第2
のアドレスバス(YAB)に接続され、セントラルプロ
セッシングユニットからのアドレスによってアクセスさ
れる第1のメモリ(5,7)と、前記第1のアドレスバ
ス(IAB)及び第3のアドレスバス(XAB)に接続
され、セントラルプロセッシングユニットからのアドレ
スによってアクセスされる第2のメモリ(4,6)と、
前記第1及び第2のメモリと前記セントラルプロセッシ
ングユニットとに接続されてデータが伝達される第1の
データバス(IDB)と、前記第1のメモリに接続され
てデータが伝達される第2のデータバス(YDB)と、
前記第2のメモリに接続されてデータが伝達される第3
のデータバス(XDB)と、前記第1のアドレスバスと
第1のデータバスに接続された外部インタフェース回路
(12)と、第1乃至第3のデータバスに接続されセン
トラルプロセッシングユニットに同期動作されるディジ
タル信号処理ユニット(3)と、前記ディジタル信号処
理ユニットの動作を制御するDSP制御信号(20)を
セントラルプロセッシングユニットからディジタル信号
処理ユニットに伝達する制御信号線とを1チップに含ん
で半導体集積回路化されて成る。
That is, the microcomputer includes a central processing unit (2) and first to third address buses (IAB, YAB, X) to which addresses are selectively transmitted from the central processing unit.
AB), the first address bus (IAB) and the second address bus (IAB)
To the first memory (5, 7) connected to the address bus (YAB) of the central processing unit and accessed by the address from the central processing unit, and to the first address bus (IAB) and the third address bus (XAB). A second memory (4, 6) connected and accessed by an address from the central processing unit,
A first data bus (IDB) connected to the first and second memories and the central processing unit for transmitting data, and a second data bus connected to the first memory for transmitting data. Data bus (YDB),
A third connected to the second memory to transfer data
Data bus (XDB), an external interface circuit (12) connected to the first address bus and the first data bus, and first to third data buses, which are synchronously operated by the central processing unit. A semiconductor integrated circuit including a digital signal processing unit (3) for controlling the operation of the digital signal processing unit and a control signal line for transmitting a DSP control signal (20) for controlling the operation of the digital signal processing unit from the central processing unit to the digital signal processing unit in one chip. It is made into a circuit.

【0008】上記した手段によれば、内蔵メモリは、デ
ィジタル信号処理プロセッサ(3)による積和演算を考
慮して第1のメモリ(5,7)と第2のメモリ(4,
6)に2面化され、セントラルプロセッシングユニット
(2)が第1のメモリと第2のメモリを第3のバス(X
AB,XDB)と第2のバス(YAB,YDB)によっ
てそれぞれ並列的にアクセス可能にされている。これに
より、内蔵メモリから2個のデータを同時にディジタル
信号処理ユニットに転送可能にされる。さらに、第3の
バス(XAB,XDB)と第2のバス(YAB,YD
B)は、外部にインタフェースされる第1のバス(IA
B,IDB)とも個別化されているので、セントラルプ
ロセッシングユニットは第2のメモリ(4,6)と第1
のメモリ(5,7)のアクセスに並行して外部メモリア
クセスも可能にされる。このように、それぞれセントラ
ルプロセッシングユニット(2)に接続された第1乃至
第3の3種類のアドレスバス(IAB,XAB,YA
B)及びデータバス(IDB,XDB,YDB)がある
ために、当該3種類の内部バスを使用して同一クロック
サイクルで異なるメモリアクセス動作を実行することが
可能である。したがって、プログラムやデータが外部メ
モリに存在する場合にも容易に対応して演算処理の高速
化を実現できる。
According to the above means, the built-in memory has the first memory (5, 7) and the second memory (4) in consideration of the sum of products operation by the digital signal processor (3).
6), the central processing unit (2) connects the first memory and the second memory to the third bus (X
AB, XDB) and the second bus (YAB, YDB) are accessible in parallel. As a result, two pieces of data can be transferred simultaneously from the built-in memory to the digital signal processing unit. Furthermore, the third bus (XAB, XDB) and the second bus (YAB, YD)
B) is a first bus (IA) interfaced to the outside.
(B, IDB) are also individualized, the central processing unit is the second memory (4, 6) and the first memory unit.
External memory access is enabled in parallel with the access to the memory (5, 7). As described above, the first to third types of address buses (IAB, XAB, YA) connected to the central processing unit (2) respectively.
B) and the data buses (IDB, XDB, YDB), it is possible to execute different memory access operations in the same clock cycle using the three types of internal buses. Therefore, even when a program or data exists in the external memory, it is possible to easily cope with the speedup of the arithmetic processing.

【0009】マイクロコンピュータの使い勝手を向上さ
せるには、前記第1のメモリと第2のメモリの夫々をR
AMとROMから構成するとよい。
In order to improve the usability of the microcomputer, the first memory and the second memory are each read as R.
It is preferable to be composed of AM and ROM.

【0010】前記セントラルプロセッシングユニットに
おける積和演算などの繰返し演算のためのアドレス生成
の高速化のためには、セントラルプロセッシングユニッ
トはモジュロアドレス出力部(200)を備えるとよ
い。このとき、モジュロアドレス出力部で生成されたア
ドレスは前記第2又は第3のアドレスバスに選択的に出
力可能にすることが望ましい。
In order to speed up address generation for repetitive operations such as multiply-add operations in the central processing unit, the central processing unit may include a modulo address output section (200). At this time, it is desirable that the address generated by the modulo address output unit can be selectively output to the second or third address bus.

【0011】前記ディジタル信号処理プロセッサは、第
1乃至第3のデータバス(IDB,YDB,XDB)と
個別的にインタフェースされる第1乃至第3のデータバ
ッファ手段(MDBI,MDBY,MDBX)と、夫々
のデータバッファ手段に内部バスを介して接続可能にさ
れた複数のレジスタ手段(305〜308)と、前記内
部バスに接続された乗算器(304)及び算術論理演算
器(302)と、前記DSP制御信号をデコードして前
記データバッファ手段、乗算器、算術論理演算器、及び
レジスタ手段の動作を制御するデコーダ(34)とを含
んで構成することができる。
The digital signal processor includes first to third data buffer means (MDBI, MDBY, MDBX) individually interfaced with the first to third data buses (IDB, YDB, XDB), A plurality of register means (305 to 308) connectable to the respective data buffer means via an internal bus; a multiplier (304) and an arithmetic logic unit (302) connected to the internal bus; A decoder (34) for decoding the DSP control signal to control the operations of the data buffer means, the multiplier, the arithmetic and logic unit, and the register means can be configured.

【0012】命令デコードという点に着目したとき、マ
イクロコンピュータは、セントラルプロセッシングユニ
ット(2)と、前記セントラルプロセッシングユニット
によってアクセス制御されるメモリ(4〜7)と、前記
メモリ及び前記セントラルプロセッシングユニットとの
間でデータが伝達されセントラルプロセッシングユニッ
トに同期動作されるディジタル信号処理ユニット(3)
とを1チップに含んで半導体集積回路化される。このマ
イクロコンピュータによって実行可能な命令セットは、
セントラルプロセッシングユニット(2)が実行すべき
CPU命令と、データフェッチのためのアドレス演算等
の一部の処理をセントラルプロセッシングユニットに負
担させてディジタル信号処理ユニット(3)が実行すべ
きDSP命令とを含む。前記セントラルプロセッシング
ユニットは、前記データバスを介して16ビット固定長
のCPU命令と、16ビット又は32ビット長のDSP
命令とをフェッチする命令レジスタ(25)と、前記命
令レジスタにフェッチされた命令の一部の複数ビットに
基づいて、CPU命令とDSP命令とを識別し、識別結
果に応じて、前記ディジタル信号処理ユニットの動作制
御のためのDSP制御信号(20)とセントラルプロセ
ッシングユニットの動作制御のためのCPU制御信号と
を生成するデコーダ(24)とを含んで構成することが
できる。
Focusing on the point of instruction decoding, the microcomputer includes a central processing unit (2), memories (4 to 7) whose access is controlled by the central processing unit, the memory and the central processing unit. Digital signal processing unit (3) in which data is transmitted between the two and synchronized with the central processing unit
And are included in one chip to be a semiconductor integrated circuit. The instruction set that can be executed by this microcomputer is
A CPU instruction to be executed by the central processing unit (2) and a DSP instruction to be executed by the digital signal processing unit (3) by causing the central processing unit to bear a part of processing such as address calculation for data fetching. Including. The central processing unit includes a 16-bit fixed-length CPU instruction and a 16-bit or 32-bit DSP, via the data bus.
An instruction register (25) for fetching an instruction and a CPU instruction and a DSP instruction on the basis of a plurality of bits of a part of the instruction fetched in the instruction register, and the digital signal processing according to the identification result. It may include a DSP control signal (20) for controlling the operation of the unit and a decoder (24) for generating a CPU control signal for controlling the operation of the central processing unit.

【0013】例えば、CPU命令は命令コードの最上位
4ビットが”0000”〜”1110”とされる範囲に
割り当てられている。DSP命令は、命令コードの最上
位4ビットが”1111”とされる範囲に割り当てられ
ている。さらに命令コードの最上位6ビットが”111
100”及び”111101”の範囲にに割り当てられ
た命令は、DSP命令でも16ビット長の命令コードと
される。命令コードの最上位6ビットが”11111
0”の命令は、32ビット長の命令コードとされる。命
令コードの最上位6ビットが”111111”の範囲に
は命令を割り当てておらず、その範囲を未使用領域とす
る。このように、最大32ビットの命令に対するコード
割り当てに上記のような規則を設けることにより、各命
令コードの一部例えば最上位側6ビットをデコードすれ
ば、当該命令がCPU命令であるか、16ビット長のD
SP命令であるか、32ビット長のDSP命令であるか
を、小さな論理規模のデコーダで判定することができ、
常に32ビット全部を一度にデコードすることを要しな
い。
For example, the CPU instruction is assigned to a range in which the most significant 4 bits of the instruction code are "0000" to "1110". The DSP instruction is assigned to a range in which the most significant 4 bits of the instruction code are "1111". Furthermore, the most significant 6 bits of the instruction code are "111".
The instruction assigned to the range of "100" and "111101" is a 16-bit instruction code even in the DSP instruction. The most significant 6 bits of the instruction code are "11111".
The instruction of “0” is an instruction code of 32 bit length. The instruction is not assigned to the range where the most significant 6 bits of the instruction code is “111111”, and the range is set as an unused area. , By providing the above rule for code allocation for a maximum of 32 bits, if a part of each instruction code, for example, the 6 most significant bits, is decoded, it is determined whether the instruction is a CPU instruction or a 16-bit length. D
It is possible to determine whether the instruction is an SP instruction or a DSP instruction having a 32-bit length with a small logic scale decoder.
It is not always necessary to decode all 32 bits at once.

【0014】前記デコーダは、命令レジスタの上位16
ビットをデコードして前記CPUデコード信号(24
3)及びDSPデコード信号(244)を生成する第1
のデコード回路(240)と、第1のデコード回路にて
32ビット長のDSP命令を識別したときには命令レジ
スタの下位16ビットをコード化した信号を、それ以外
の命令を識別したときには出力が無効であることを意味
するコードを出力するコード変換回路(242)とを含
み、前記DSPデコード信号及びコード変換回路の出力
をDSP制御信号(20)とする。
The decoder is composed of the upper 16 bits of the instruction register.
Bits are decoded and the CPU decode signal (24
3) and a first to generate a DSP decode signal (244)
When the 32-bit length DSP instruction is identified by the first decode circuit and the decode circuit (240), the signal that codes the lower 16 bits of the instruction register is invalid, and when the other instruction is identified, the output is invalid. And a code conversion circuit (242) for outputting a code meaning that there is an output, and the output of the DSP decode signal and the code conversion circuit is a DSP control signal (20).

【0015】DSP命令の命令フォーマットの点に着目
したとき、マイクロコンピュータは、セントラルプロセ
ッシングユニット(2)と、前記セントラルプロセッシ
ングユニットに同期動作されるディジタル信号処理ユニ
ット(3)と、前記セントラルプロセッシングユニット
及び前記ディジタル信号処理ユニットが共通接続された
内部バス(IDB)とを含んで半導体集積回路化され、
前記セントラルプロセッシングユニットは、ディジタル
信号処理ユニットとの間でのデータ転送を当該セントラ
ルプロセッシングユニットに対して規定する第1のコー
ド領域(図18に例示される16ビットDSP命令のビ
ット9〜ビット0)を有する第1フォーマットの命令
と、前記第1のコード領域と同一フォーマットの第2の
コード領域(図20、図21に例示される32ビットの
DSP命令のAフィールド)を有すると共に、当該第2
のコード領域で規定された転送データを用いた演算処理
をディジタル信号処理ユニットに対して規定する第3の
コード領域(図20、図21に例示される32ビットの
DSP命令のBフィールド)を有する第2フォーマット
の命令とを実行するための実行制御手段を備えて成る。
Focusing on the instruction format of the DSP instruction, the microcomputer includes a central processing unit (2), a digital signal processing unit (3) operated in synchronization with the central processing unit, the central processing unit, and A semiconductor integrated circuit including an internal bus (IDB) to which the digital signal processing unit is commonly connected,
The central processing unit defines a first code area (bit 9 to bit 0 of the 16-bit DSP instruction illustrated in FIG. 18) that defines a data transfer with the digital signal processing unit for the central processing unit. And a second code area (A field of the 32-bit DSP instruction illustrated in FIGS. 20 and 21) having the same format as the first code area.
Has a third code area (B field of the 32-bit DSP instruction illustrated in FIGS. 20 and 21) that specifies, for the digital signal processing unit, the arithmetic processing using the transfer data defined in the code area of FIG. And an execution control means for executing the second format instruction.

【0016】これにより、実行制御手段は、第1及び第
2フォーマットの夫々の命令を実行するとき、第1のコ
ード領域と第2のコード領域に対して共通のデコード論
理を持つデコード手段を採用でき、マイクロコンピュー
タの論理規模の縮小に寄与する。
As a result, the execution control means employs a decoding means having a common decoding logic for the first code area and the second code area when executing the respective instructions of the first and second formats. This contributes to the reduction of the logic scale of the microcomputer.

【0017】前記第1フォーマットの命令及び第2フォ
ーマットの命令は、それが第1フォーマットか第2フォ
ーマットかを示すための第4コード領域(例えば16ビ
ットDSP命令におけるビット15〜ビット10、32
ビットDSP命令におけるビット32〜ビット26)を
有する。
The first format instruction and the second format instruction include a fourth code area (for example, bit 15 to bit 10, 32 in a 16-bit DSP instruction) for indicating whether it is the first format or the second format.
Bit 32 to bit 26) in the DSP instruction.

【0018】前記実行制御手段は、前記第1フォーマッ
トの命令と第2フォーマットの命令に共通に用いられる
命令レジスタ(25)と、前記命令レジスタにフェッチ
された命令に含まれる前記第1のコード領域と第4のコ
ード領域又は第2のコード領域と第4のコード領域をデ
コードするデコード手段(240)と、そのデコード結
果に従ってアドレス演算を行い、前記データ転送制御を
行う実行手段とを含んで構成することができる。
The execution control means includes an instruction register (25) commonly used for the first format instruction and the second format instruction, and the first code area included in the instruction fetched in the instruction register. And a fourth code area or a decoding means (240) for decoding the second code area and the fourth code area, and an execution means for performing an address operation according to the decoding result and performing the data transfer control. can do.

【0019】前記命令レジスタは、前記第1のコード領
域と第4のコード領域又は第2のコード領域と第4のコ
ード領域の保持に共用される上位領域(UIR)と、前
記第3のコード領域の保持に利用される下位領域(LI
R)とを有し、前記デコード手段は、前記第4のコード
領域のデコード結果に基づいて、前記命令レジスタが第
2フォーマットの命令を保持したことを示す制御信号
(248)を出力し、その制御信号に基づいて、前記下
位領域から第3のコード領域のコードデータを前記ディ
ジタル信号処理ユニットに向けて供給する手段(24
2,242A,242B)を含むことができる。
The instruction register includes an upper area (UIR) shared for holding the first code area and the fourth code area or the second code area and the fourth code area, and the third code area. Lower area (LI
R) and the decoding means outputs a control signal (248) indicating that the instruction register holds an instruction of the second format based on the decoding result of the fourth code area, and A means (24) for supplying code data in the third code area from the lower area to the digital signal processing unit based on a control signal.
2, 242A, 242B).

【0020】[0020]

【発明の実施の形態】図1には本発明の一実施例に係る
マイクロコンピュータ1の全体的なブロック図が示され
る。同図に示されるマイクロコンピュータは半導体集積
回路製造技術によって単結晶シリコンのような1個の半
導体基板に形成されている。マイクロコンピュータ1
は、セントラルプロセッシングユニットとしてのCPU
コア(CPU Core)2、ディジタル信号処理ユニットとし
てのDSPエンジン(DSP Engine)3、X-ROM4、
Y-ROM5、X-RAM6、Y-RAM7、割り込みコ
ントローラ(Interrupt Controller)8、バスステート
コントローラ(Bus State Conttroller)9、内蔵周辺
回路(Peripheral Circuit)10、11、外部メモリイ
ンターフェース(External Memory Interface)12、
クロックパルスジェネレータ(CPG)13より構成さ
れている。前記X-ROM4,Y-ROM5は命令若しく
は定数データ等を格納するための読み出し専用又は電気
的に書き換え可能なリード・オンリ・メモリであり、X
-RAM6,Y-RAM7はデータの一時格納若しくはC
PUコア2とDSPエンジン3の作業領域などとして利
用されるランダム・アクセス・メモリである。前記X-
ROM4とX-RAM6を内部命令/データ用のXメモ
リ(Internal Instrucution/Data X Mem.)と総称し、
Y-ROM5とY-RAM7を内部命令/データ用のYメ
モリ(Internal Instrucution/Data Y Mem.)と総称す
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows an overall block diagram of a microcomputer 1 according to an embodiment of the present invention. The microcomputer shown in the figure is formed on one semiconductor substrate such as single crystal silicon by a semiconductor integrated circuit manufacturing technique. Microcomputer 1
Is a CPU as a central processing unit
Core (CPU Core) 2, DSP engine (DSP Engine) 3 as a digital signal processing unit, X-ROM 4,
Y-ROM 5, X-RAM 6, Y-RAM 7, interrupt controller (Interrupt Controller) 8, bus state controller (Bus State Controller) 9, built-in peripheral circuits (Peripheral Circuit) 10, 11, external memory interface (External Memory Interface) 12 ,
It is composed of a clock pulse generator (CPG) 13. The X-ROM 4 and the Y-ROM 5 are read-only or electrically rewritable read-only memories for storing instructions or constant data.
-RAM6 and Y-RAM7 are temporary storage of data or C
It is a random access memory used as a work area for the PU core 2 and the DSP engine 3. X-
The ROM 4 and the X-RAM 6 are collectively referred to as an internal instruction / data X memory (Internal Instrument / Data X Mem.),
The Y-ROM 5 and the Y-RAM 7 are collectively referred to as an internal instruction / data Y memory (Internal Instrument / Data Y Mem.).

【0021】本実施例のマイクロコンピュータ1はその
バス構成として、外部メモリインタフェース12に結合
される内部アドレスバスIAB及び内部データバスID
B、外部メモリインタフェース12に結合されない内部
アドレスバスXAB及び内部データバスXDB、外部メ
モリインタフェース12に結合されない内部アドレスバ
スYAB及び内部データバスYDB、そして内蔵周辺回
路10,11のための周辺アドレスバスPAB及び周辺
データバスPDBを備える。尚、コントロールバスにつ
いては図示を省略してあるが、アドレスバス及びデータ
バスの対に対応してそれぞれ設けられている。
The microcomputer 1 of this embodiment has, as its bus configuration, an internal address bus IAB and an internal data bus ID coupled to the external memory interface 12.
B, internal address bus XAB and internal data bus XDB not coupled to external memory interface 12, internal address bus YAB and internal data bus YDB not coupled to external memory interface 12, and peripheral address bus PAB for internal peripheral circuits 10 and 11. And a peripheral data bus PDB. Although not shown in the drawing, the control bus is provided corresponding to each pair of the address bus and the data bus.

【0022】CPUコア2には、外部メモリインターフ
ェース12を通してチップ外部に接続可能なデータバス
IDBが接続され、割り込みコントローラ8からの割り
込み信号80が与えられる。CPUコア2はDSPエン
ジン3を制御するための制御信号20をDSPエンジン
3に供給する。さらにCPUコア2は、外部メモリイン
ターフェース12を通してチップ外部に接続可能なアド
レスバスIABと外部メモリインターフェース12には
接続されていないアドレスバスXAB,YABにアドレ
ス信号を出力する。CPUコア2は、クロックパルスジ
ェネレータ(CPG)13から出力されるノンオーバー
ラップ2相のクロック信号Clock1,Clock2
を動作基準クロック信号として動作される。CPUコア
2についてはその詳細を後述するが、図1のCPUコア
2には、レジスタファイル21、算術論理演算器(AL
U)22、アドレス加算器(Add-ALU)23、デコーダ
24、命令レジスタ(IR)25が代表的に図示されて
いる。レジスタファイル21はアドレスレジスタやデー
タレジスタとして任意に利用され、また、プログラムカ
ウンタ、そしてコントロールレジスタなどを含む。デコ
ーダ24は命令レジスタ25にフェッチされた命令をデ
コードして内部制御信号(図1には図示を省略)及び制
御信号20を生成する。命令レジスタ(IR)25は、
それぞれ16ビットの上位側領域(UIR)と下位側領
域(LIR)から成る。詳細については後述するが、下
位側領域(LIR)の値は選択的に上位側領域(UI
R)にシフト可能にされている。尚、割込み等の例外発
生時の命令実行手順を制御したり、例外発生に対する内
部状態の退避復帰をハードウェア的に制御したりするた
めのシーケンス制御回路は図示を省略してある。
A data bus IDB connectable to the outside of the chip is connected to the CPU core 2 through an external memory interface 12, and an interrupt signal 80 from an interrupt controller 8 is given to it. The CPU core 2 supplies the DSP engine 3 with a control signal 20 for controlling the DSP engine 3. Further, the CPU core 2 outputs an address signal to the address bus IAB connectable to the outside of the chip through the external memory interface 12 and the address buses XAB and YAB not connected to the external memory interface 12. The CPU core 2 outputs the non-overlap two-phase clock signals Clock1 and Clock2 output from the clock pulse generator (CPG) 13.
Is used as the operation reference clock signal. The CPU core 2 will be described in detail later, but the CPU core 2 in FIG. 1 includes a register file 21 and an arithmetic logic unit (AL).
U) 22, address adder (Add-ALU) 23, decoder 24, and instruction register (IR) 25 are representatively shown. The register file 21 is arbitrarily used as an address register and a data register, and includes a program counter, a control register, and the like. The decoder 24 decodes the instruction fetched in the instruction register 25 and generates an internal control signal (not shown in FIG. 1) and a control signal 20. The instruction register (IR) 25 is
Each consists of a 16-bit upper side area (UIR) and a lower side area (LIR). Although details will be described later, the value of the lower side area (LIR) is selectively set to the upper side area (UI).
R) can be shifted. A sequence control circuit for controlling the instruction execution procedure when an exception such as an interrupt occurs and for controlling the saving / restoring of the internal state in response to the exception by hardware is not shown.

【0023】DSPエンジン3は前記データバスID
B,XDB,YDBに接続され、クロック信号Cloc
k1,Clock2を動作基準クロック信号として動作
される。DSPエンジン3についてはその詳細を後述す
るが、図1のDSPエンジン3には、データレジスタフ
ァイル31、算術論理演算器及びシフタ(ALU/Shifte
r)32、乗算器(MAC)33、及びデコーダ34が
代表的に図示されている。データレジスタファイル31
は積和演算等に利用される。デコーダ34はCPUコア
2から与えられる制御信号20をデコードして、DSP
エンジン3の内部制御信号(図1には図示を省略)を生
成する。
The DSP engine 3 uses the data bus ID
Clock signal Cloc connected to B, XDB, and YDB
It is operated by using k1 and Clock2 as operation reference clock signals. The details of the DSP engine 3 will be described later, but the DSP engine 3 of FIG.
r) 32, multiplier (MAC) 33, and decoder 34 are typically shown. Data register file 31
Is used for multiply-accumulate operations. The decoder 34 decodes the control signal 20 provided from the CPU core 2 and
An internal control signal (not shown in FIG. 1) of the engine 3 is generated.

【0024】X-ROM4及びX-RAM6はアドレスバ
スIAB,XABとデータバスIDB,XDBに接続さ
れている。Y-ROM5及びY-RAM7はアドレスバス
IAB,YABとデータバスIDB,YDBに接続され
ている。内蔵メモリは、DSPエンジン3による積和演
算を考慮してXメモリ4,6とYメモリ5,7に2面化
され、内部バスXAB,XDBとYAB,YDBによっ
てそれぞれ並列的にアクセス可能にされている。さら
に、内部バスXAB,XDBとYAB,YDBは外部に
インタフェースされるバスIAB,IDBとも個別化さ
れているので、Xメモリ4,6とYメモリ5,7のアク
セスに並行して外部メモリアクセスも可能にされる。X
メモリ4,6及びYメモリ5,7はDSPエンジン3に
よる積和演算のためのデータ一時記憶領域、定数データ
の記憶領域などとして利用される。尚、X−RAM,Y
−RAMはCPUコア2のデータ一時記憶領域若しくは
ワーク領域としても利用可能であることは言うまでもな
い。
The X-ROM 4 and the X-RAM 6 are connected to the address buses IAB, XAB and the data buses IDB, XDB. The Y-ROM 5 and the Y-RAM 7 are connected to the address buses IAB, YAB and the data buses IDB, YDB. The built-in memory is divided into X memories 4 and 6 and Y memories 5 and 7 in consideration of multiply-accumulate operation by the DSP engine 3, and is made accessible in parallel by internal buses XAB, XDB and YAB, YDB. ing. Further, since the internal buses XAB, XDB and YAB, YDB are also individualized with the buses IAB, IDB which are interfaced to the outside, the external memory access is also performed in parallel with the access of the X memories 4, 6 and the Y memories 5, 7. Enabled X
The memories 4 and 6 and the Y memories 5 and 7 are used as a data temporary storage area for the product-sum calculation by the DSP engine 3 and a storage area for constant data. In addition, X-RAM, Y
It goes without saying that the RAM can also be used as a temporary data storage area or work area of the CPU core 2.

【0025】前記割り込みコントローラ8は、内蔵周辺
回路10,11などからの割り込み要求信号(Interrup
ts)81を入力し、各種割込み要求に対する優先順位付
けや割込み要求に対するマスキングのための情報に従っ
て割込み要求を調停して受け付け、受け付けた割込み要
求に応ずる割り込みベクタ(Interrupt Vector)82を
アドレスバスIABに出力し、さらに割り込み信号80
をCPUコア2に出力する。
The interrupt controller 8 receives an interrupt request signal (Interrup) from the internal peripheral circuits 10 and 11, etc.
ts) 81, arbitrates and accepts interrupt requests according to information for prioritizing various interrupt requests and masking the interrupt requests, and sends an interrupt vector (Interrupt Vector) 82 corresponding to the accepted interrupt request to the address bus IAB. Output, and interrupt signal 80
Is output to the CPU core 2.

【0026】バスステートコントローラ9はアドレスバ
スIAB,PABとデータバスIDB,PDBに接続さ
れ、アドレスバスPAB及びデータバスPDBに接続さ
れている内蔵周辺回路10,11とCPUコア2とのイ
ンタフェース制御を行う。
The bus state controller 9 is connected to the address buses IAB, PAB and the data buses IDB, PDB, and controls the interface between the CPU core 2 and the built-in peripheral circuits 10, 11 connected to the address buses PAB and PDB. To do.

【0027】外部メモリインターフェース12は、アド
レスバスIABとデータバスIDBに接続され、マイク
ロコンピュータ1のチップ外部の図示を省略したアドレ
スバスとデータバスに接続され、外部とのインタフェー
ス制御を行う。
The external memory interface 12 is connected to the address bus IAB and the data bus IDB, is connected to an address bus and a data bus (not shown) outside the chip of the microcomputer 1, and controls the interface with the outside.

【0028】図2にマイクロコンピュータ1のアドレス
マップの一例が示される。本実施例のマイクロコンピュ
ータ1は32ビットで規定されるアドレス空間を管理す
る。前記アドレスバスIABはビット幅が32ビットと
される。そのアドレス空間の中には、例外処理ベクタ領
域、X-ROM空間(X−ROM4に割り当てられたア
ドレス空間)、X-RAM空間(X−RAM7に割り当
てられたアドレス空間)、Y-ROM空間(Y−ROM
5に割り当てられたアドレス空間)、Y-RAM空間
(Y−RAM7に割り当てられたアドレス空間)、内蔵
周辺回路割付け空間(内蔵周辺回路10,11が割り当
てられたアドレス空間)などが存在する。図2の例はX
-ROM4は24KB、X-RAM6は4KB、Y-RO
M5は24KB、Y-RAM7は4KBが割り当てられ
ている。
FIG. 2 shows an example of the address map of the microcomputer 1. The microcomputer 1 of this embodiment manages an address space defined by 32 bits. The address bus IAB has a bit width of 32 bits. In the address space, an exception processing vector area, an X-ROM space (address space allocated to the X-ROM 4), an X-RAM space (address space allocated to the X-RAM 7), a Y-ROM space ( Y-ROM
5), Y-RAM space (address space allocated to Y-RAM 7), internal peripheral circuit allocation space (address space to which internal peripheral circuits 10 and 11 are allocated), and the like. 2 is X
-ROM4 is 24KB, X-RAM6 is 4KB, Y-RO
24 KB is allocated to M5 and 4 KB is allocated to Y-RAM7.

【0029】図2に従えば、16進数表記でH'000
00000〜H'000003FFの空間の256B領
域には例外処理ベクタ領域が割り付けられている。H'
00000400〜H'01FFFFFFにはユーザに
よって使用可能な通常空間が割り付けられている。通常
空間はマイクロコンピュータ1の外部に接続可能なメモ
リ領域とされる。H'02000000〜H'02005
FFFには、X-ROM空間が割り付けられている。H'
02006000〜H'02006FFFには、X-RA
M空間が割り付けられている。H'02007000〜
H'02007FFFはX-RAM_Mirror空間となって
おり、ここをアクセスすると実際にはH'020060
00〜H'02006FFFのX-RAM空間をアクセス
することになる。H'02008000〜H'0200F
FFFは、X-RAM,RAM_Mirror空間となってお
り、ここをアクセスすると実際にはH'0200000
0〜H'02007FFFのX-ROM空間およびX-R
AM空間をアクセスすることになる。H'020100
00〜H'02015FFFには、Y-ROM空間が割り
付けられている。H'02016000〜H'02016
FFFには、Y-RAM空間が割り付けられている。H'
02017000〜H'02017FFFはY-RAM_
Mirror空間となっており、ここをアクセスすると実際
にはH'02016000〜H'02016FFFのY-
RAM空間をアクセスすることになる。H'02018
000〜H'0201FFFFは、Y-ROM,RAM_
Mirror空間となっており、ここをアクセスすると実際
にはH'02010000〜H'02017FFFのY-
ROM空間およびY-RAM空間をアクセスすることに
なる。H'02020000〜H'07FFFFFFFに
は、通常空間が割り付けられている。H'080000
00〜H'1FFFFFFFFには、予約領域が割り付
けられている。この予約領域は、ユーザチップ(実チッ
プ)の場合にはアクセス不可能になっており、エバチッ
プ(エミュレーションなどに利用される評価用チップ)
の場合にはASE空間(エミュレーション用の制御空
間)領域として割り当てられる。H'20000000
〜H'27FFFFFFFには、通常空間が割り付けら
れている。H'28000000〜H'FFFFFDFF
には、予約領域が割り付けられている。H'FFFFF
E00〜H'FFFFFFFFには 内蔵周辺回路のレ
ジスタアドレス値を割り付ける内蔵周辺回路割り付け領
域が割り付けられている。
According to FIG. 2, H'000 in hexadecimal notation
An exception processing vector area is allocated to the 256B area in the space of 0000 to H'000003FF. H '
A normal space usable by the user is allocated to 00000400 to H'01FFFFFF. The normal space is a memory area that can be connected to the outside of the microcomputer 1. H'02000000 ~ H'02005
An X-ROM space is allocated to the FFF. H '
X-RA is available for 0200000-H'02006FFF.
M space is allocated. H'02000700
H'02007FFF is an X-RAM_Mirror space, and when you access it, it is actually H'020060.
The X-RAM space of 00 to H'02006FFF will be accessed. H'020008000 to H'0200F
The FFF is an X-RAM, RAM_Mirror space, and when you access it, it is actually H'0200000.
0-H'02007FFF X-ROM space and X-R
You will be accessing the AM space. H'020100
A Y-ROM space is allocated to 00 to H'02015FFF. H'020160000-H'02016
A Y-RAM space is allocated to the FFF. H '
02017000-H'02017FFF is Y-RAM_
It is a Mirar space, and when you access it, it is actually Y-of H'020160000-H'02016FFF.
RAM space will be accessed. H'02018
000-H'0201FFFF is Y-ROM, RAM_
It is a Mirar space, and when you access it, it is actually Y-of H'0201000-H'02017FFF.
The ROM space and the Y-RAM space will be accessed. A normal space is allocated to H'0202000-H'07FFFFFFF. H'080000
Reserved areas are allocated to 00 to H'1FFFFFFFF. This reserved area is inaccessible in the case of a user chip (real chip), and an evaluation chip (evaluation chip used for emulation etc.)
In the case of, the ASE space (control space for emulation) is allocated. H'20000000
A normal space is allocated to H'27FFFFFFF. H'2800000-H'FFFFFDFF
A reserved area is allocated to. H'FFFFFF
A built-in peripheral circuit allocation area for allocating the register address value of the built-in peripheral circuit is allocated to E00 to H'FFFFFFFF.

【0030】図3にはモジュロアドレス出力部を詳細に
示したCPUコア2のブロック図が示される。図3にお
いて破線で囲った部分がモジュロアドレス出力部200
である。モジュロアドレス出力部200は、モジュロア
ドレスレジスタ(例えばA0X)より出力した値をバッ
ファ(例えばMABX)を通してアドレスバス(例えば
XAB)に出力すると同時に、モジュロアドレスレジス
タ(A0X)より出力した値を加算手段(例えばAL
U)で加算して再びモジュロアドレスレジスタ(A0
X)に格納するアドレス更新出力動作などを行う回路ブ
ロックであり、積和演算のような繰返し演算のためのデ
ータアクセスアドレスを順次更新して生成する。ランダ
ムロジック回路(Random Logic Circuit)201と記載
された回路ブロックは、図1のデコーダ24や前記シー
ケンス制御回路、そしてコントロールレジスタやステー
タスレジスタなどを含む回路ブロックである。
FIG. 3 is a block diagram of the CPU core 2 showing the modulo address output unit in detail. In FIG. 3, the part surrounded by the broken line is the modulo address output unit 200.
Is. The modulo address output unit 200 outputs the value output from the modulo address register (for example, A0X) to the address bus (for example, XAB) through the buffer (for example, MABX), and at the same time, adds the value output from the modulo address register (A0X) for adding means ( AL for example
U) and add again modulo address register (A0
X) is a circuit block that performs an address update output operation, etc., and sequentially updates and generates data access addresses for iterative operations such as product-sum operations. A circuit block described as a random logic circuit 201 is a circuit block including the decoder 24 of FIG. 1, the sequence control circuit, a control register, a status register, and the like.

【0031】図3においてC1,C2,DR,A1,B
1,A2,B2,DWはそれぞれCPUコア2内部の代
表的に示されたバスである。CPUコア2とデータバス
IDBとのインタフェースは前記命令レジスタ(IR)
25及びデータバッファ(Data Buffer)203にて行
われる。命令レジスタ(IR)25にフェッチされた命
令はランダムロジック回路(Random Logic Circuit)2
01に含まれる前記デコーダ24等に供給される。CP
Uコア2とアドレスバスIABとのインタフェースはプ
ログラムカウンタ(PC)204及びアドレスバッファ
(Address Buffer)205で行われる。CPUコア2と
アドレスバスXABとのインタフェースはメモリアドレ
スバッファ(MABX)206で行われ、CPUコア2
とアドレスバスYABとのインタフェースはメモリアド
レスバッファ(MABY)207で行われる。アドレス
バッファ205へのアドレス情報の入力経路は、バスC
1,A1,A2の中から選択可能にされ、メモリアドレ
スバッファ206,207へのアドレス情報の入力経路
は、バスC1,C2,A1,A2の中から選択可能にさ
れる。算術演算器(AU)208はプログラムカウンタ
204の値のインクリメントに利用される。209は汎
用レジスタ(Reg.)、210はアドレスのインデックス
修飾に利用されるインデックスレジスタ(Ix)、21
1は同じくインデックス修飾に利用されるインデックス
レジスタ(Iy)、212はアドレス演算専用の加算器
(PAU)、213は算術論理演算器(ALU)であ
る。
In FIG. 3, C1, C2, DR, A1, B
1, A2, B2 and DW are representatively shown buses inside the CPU core 2. The interface between the CPU core 2 and the data bus IDB is the instruction register (IR).
25 and the data buffer (Data Buffer) 203. The instruction fetched in the instruction register (IR) 25 is a random logic circuit (Random Logic Circuit) 2
01 is supplied to the decoder 24 and the like. CP
The interface between the U core 2 and the address bus IAB is performed by a program counter (PC) 204 and an address buffer (Address Buffer) 205. The interface between the CPU core 2 and the address bus XAB is performed by the memory address buffer (MABX) 206.
The memory address buffer (MABY) 207 interfaces with the address bus YAB. The input path of the address information to the address buffer 205 is the bus C.
1, A1, A2 can be selected, and the input path of the address information to the memory address buffers 206, 207 can be selected from the buses C1, C2, A1, A2. The arithmetic unit (AU) 208 is used to increment the value of the program counter 204. 209 is a general-purpose register (Reg.), 210 is an index register (Ix) used for address index modification, 21
Reference numeral 1 is an index register (Iy) which is also used for index modification, 212 is an adder (PAU) dedicated to address calculation, and 213 is an arithmetic logic unit (ALU).

【0032】制御ビットMXYはアドレスバスXAB又
はアドレスバスYABのどちらのアドレスに対しモジュ
ロ演算を行うかを指定し、論理値”1”によってアドレ
スバスXABを、論理値”0”によってアドレスバスY
ABを指定する。制御ビットDMはモジュロ演算を行う
か否かを指示し、論理値”1”によってモジュロ演算を
行うことを指示し、論理値”0”によってモジュロ演算
を行わないことを指示する。モジュロスタートアドレス
レジスタ(MS)214はモジュロ演算開始アドレスを
格納し、モジュロエンドアドレスレジスタ(ME)21
5はモジュロ演算終了アドレスを格納する。
The control bit MXY designates which address of the address bus XAB or the address bus YAB is to be subjected to the modulo operation. The logical value "1" indicates the address bus XAB and the logical value "0" indicates the address bus Y.
Specify AB. The control bit DM indicates whether to perform a modulo operation, a logical value "1" indicates that the modulo operation is performed, and a logical value "0" indicates that the modulo operation is not performed. The modulo start address register (MS) 214 stores the modulo operation start address, and the modulo end address register (ME) 21
5 stores the modulo operation end address.

【0033】モジュロアドレスレジスタ(A0x,A1
x)216は現在のモジュロアドレスを格納するカレン
トアドレスレジスタ、217はモジュロエンドアドレス
レジスタ(ME)215の値とモジュロアドレスレジス
タ(A0x,A1x)216の値とを比較するコンパレ
ータ(CMP)、218はコンパレータ217の出力と
制御ビットMXY,DMの3入力に対して論理積を採る
アンドゲート、219はバスC1の値とモジュロスター
トアドレスレジスタ(MS)214の値とを選択するセ
レクタであり、それらはアドレスバスXABに関するモ
ジュロ演算に利用される。セレクタ219はアンドゲー
ト218の論理値”1”出力によってレジスタ(MS)
214の値を選択し、選択した値をモジュロアドレスレ
ジスタ(A0x,A1x)216に与える。モジュロア
ドレスレジスタ216はA0x又はA1xの何れかが選
択されて利用される。
Modulo address register (A0x, A1
x) 216 is a current address register for storing the current modulo address, 217 is a comparator (CMP) for comparing the value of the modulo end address register (ME) 215 with the value of the modulo address register (A0x, A1x) 216, and 218 is for An AND gate 219 that takes the logical product of the output of the comparator 217 and the three inputs of the control bits MXY and DM is a selector that selects the value of the bus C1 and the value of the modulo start address register (MS) 214. Used for modulo arithmetic on address bus XAB. The selector 219 registers (MS) with the logical value “1” output from the AND gate 218.
The value of 214 is selected, and the selected value is given to the modulo address register (A0x, A1x) 216. The modulo address register 216 is used by selecting either A0x or A1x.

【0034】モジュロアドレスレジスタ(A0y,A1
y)226は現在のモジュロアドレスを格納するカレン
トアドレスレジスタ、227はモジュロエンドアドレス
レジスタ(ME)215の値とモジュロアドレスレジス
タ(A0y,A1y)216の値とを比較するコンパレ
ータ(CMP)、228はコンパレータ227の出力と
制御ビットMXYの反転ビットと制御ビットDMとの3
入力に対して論理積を採るアンドゲート、229はバス
C2の値とモジュロスタートアドレスレジスタ(MS)
214の値とを選択するセレクタであり、それらはアド
レスバスYABに関するモジュロ演算に利用される。セ
レクタ229はアンドゲート228の論理値”1”出力
によってレジスタ(MS)214の値を選択し、選択し
た値をモジュロアドレスレジスタ(A0y,A1y)2
26に与える。モジュロアドレスレジスタ226はA0
y又はA1yの何れかが選択されて利用される。
Modulo address register (A0y, A1
y) 226 is a current address register that stores the current modulo address, 227 is a comparator (CMP) that compares the value of the modulo end address register (ME) 215 with the value of the modulo address register (A0y, A1y) 216, and 228 is 3 of the output of the comparator 227, the inverted bit of the control bit MXY, and the control bit DM
An AND gate that takes the logical product of the inputs, 229 is the value of the bus C2 and the modulo start address register (MS)
Selectors for selecting the value of 214 and they are used for the modulo operation on the address bus YAB. The selector 229 selects the value of the register (MS) 214 by the logical value “1” output of the AND gate 228, and selects the selected value as the modulo address register (A0y, A1y) 2
Give to 26. Modulo address register 226 is A0
Either y or A1y is selected and used.

【0035】尚、ランダムロジック回路201に記載さ
れたOP Codeは命令レジスタ25から供給される命令コ
ードを意味し、CONSTは定数値を意味する。
The OP Code described in the random logic circuit 201 means the instruction code supplied from the instruction register 25, and the CONST means a constant value.

【0036】ここで、CPUコア2におけるモジュロ演
算動作として、例えば、モジュロアドレスレジスタ(A
0x)216を用いて、アドレスバスXABへ供給すべ
きアドレス情報をモジュロ演算にて生成する動作を説明
する。
Here, as a modulo arithmetic operation in the CPU core 2, for example, a modulo address register (A
0x) 216 will be used to describe the operation of generating address information to be supplied to the address bus XAB by modulo arithmetic.

【0037】先ず、モジュロ演算開始アドレスがモジュ
ロスタートアドレスレジスタ(MS)214に、モジュ
ロ演算終了アドレスがモジュロエンドアドレスレジスタ
(ME)215にそれぞれ書き込まれる。モジュロアド
レスレジスタ(A0x)にはモジュロ演算を開始するア
ドレス値が書き込まれる。次にアドレスバスXABのア
ドレスに対しモジュロ演算を行うので、XAB、YAB
のどちらのアドレスに対しモジュロ演算を行うかを決定
する制御ビットMXYに対し論理値”1”が書き込まれ
る(アドレスバスYABに対しモジュロ演算を行う場合
は、制御ビットMXYに論理値”0”が書き込まれ
る)。最後にモジュロ演算を行うか否かを判定する制御
ビットDMに論理値”1”が書き込まれる。
First, the modulo operation start address is written in the modulo start address register (MS) 214, and the modulo operation end address is written in the modulo end address register (ME) 215. An address value for starting the modulo operation is written in the modulo address register (A0x). Next, since modulo arithmetic is performed on the address of the address bus XAB, XAB, YAB
A logical value "1" is written to the control bit MXY that determines which address of the control bit MXY is to be operated (when performing a modulo operation to the address bus YAB, a logical value "0" is written to the control bit MXY. Written). Finally, the logical value "1" is written in the control bit DM that determines whether or not to perform the modulo operation.

【0038】モジュロ演算命令は例えば、MOVS.W
@Ax, Dxとされる。この命令記述において、Axは
モジュロアドレスレジスタ(A0x)216又はモジュ
ロアドレスレジスタ(A1x)216とされ、DxはD
SPエンジン3内のレジスタに対応する。図3にはDx
は図示されていない。上記モジュロ演算命令が実行され
ると、モジュロアドレスレジスタ(A0x)216より
値が読み出され、メモリアドレスバッファ(MABX)
206及び算術論理演算器(ALU)213に入力され
る。メモリアドレスバッファ(MABX)206に入力
された値はそのままアドレスバスXABに出力されて、
XROM4またはXRAM6のアドレスを指定する。一
方、算術論理演算器(ALU)213に入力されたモジ
ュロアドレスレジスタ(A0x)216の値は、インデ
ックスレジスタ(Ix)210の値又は定数(Const)
が加算される。インデックスレジスタ(Ix)210と
の加算を行なう場合は、命令MOVS.W @(Ax, I
x), Dx等を実行したときであり、定数加算される場
合は命令MOVS.W @Ax, Dx等を実行したときで
ある。その加算結果は算術論理演算器(ALU)213
より出力される。算術論理演算器(ALU)213より
出力された値は、セレクタ219に入る。このセレクタ
219のもう一方の入力は、モジュロスタートアドレス
レジスタ(MS)214に格納されているモジュロ演算
開始アドレスである。
The modulo arithmetic instruction is, for example, MOVS.W.
@Ax, Dx. In this instruction description, Ax is the modulo address register (A0x) 216 or modulo address register (A1x) 216, and Dx is D
Corresponds to a register in the SP engine 3. In Figure 3, Dx
Are not shown. When the modulo arithmetic instruction is executed, the value is read from the modulo address register (A0x) 216 and the memory address buffer (MABX) is read.
206 and the arithmetic logic unit (ALU) 213. The value input to the memory address buffer (MABX) 206 is output to the address bus XAB as it is,
The address of XROM4 or XRAM6 is designated. On the other hand, the value of the modulo address register (A0x) 216 input to the arithmetic logic unit (ALU) 213 is the value of the index register (Ix) 210 or the constant (Const).
Is added. When performing addition with the index register (Ix) 210, the instruction MOVS.W @ (Ax, I
x), Dx, etc. are executed, and when constant addition is performed, the instruction MOVS.W @Ax, Dx, etc. is executed. The addition result is the arithmetic logic unit (ALU) 213.
Will be output. The value output from the arithmetic logic unit (ALU) 213 enters the selector 219. The other input of the selector 219 is the modulo arithmetic start address stored in the modulo start address register (MS) 214.

【0039】セレクタ219の出力が算術論理演算器
(ALU)213の出力になるか、モジュロスタートア
ドレスレジスタ(MS)214の値になるかは、次のよ
うにして決定される。モジュロアドレスレジスタ(A0
x)216の値とモジュロエンドアドレスレジスタ(M
E)215の値は、コンパレータ(CMP)217で常
に比較されており、一致すればコンパレータ(CMP)
217より論理値”1”が出力され、不一致ならば論理
値”0”が出力される。コンパレータ(CMP)217
より出力された値は、制御ビットDM,MXYと共にア
ンドゲート218で論理積が採られ(この例の場合、D
M、MXY共に論理値”1”なので、コンパレータ21
7の値がそのままアンドゲート218から出力され
る。)、セレクタ219に入力される。セレクタ219
は、アンドゲート218より入力される値が論理値”
1”の場合にモジュロスタートアドレスレジスタ(M
S)214の値を選択し、論理値”0”の場合には算術
論理演算器(ALU)213からの出力値を選択する。
Whether the output of the selector 219 becomes the output of the arithmetic logic unit (ALU) 213 or the value of the modulo start address register (MS) 214 is determined as follows. Modulo address register (A0
x) value of 216 and modulo end address register (M
E) The value of 215 is constantly compared by the comparator (CMP) 217, and if they match, the value of the comparator (CMP)
A logical value "1" is output from 217, and a logical value "0" is output if they do not match. Comparator (CMP) 217
The output value is ANDed with the control bits DM and MXY by the AND gate 218 (in this example, D
Since both M and MXY have the logical value "1", the comparator 21
The value of 7 is output from the AND gate 218 as it is. ), And is input to the selector 219. Selector 219
Is the logical value of the value input from the AND gate 218.
In case of 1 ”, modulo start address register (M
S) 214 value is selected, and when the logical value is “0”, the output value from the arithmetic logic unit (ALU) 213 is selected.

【0040】アンドゲート218より入力される値が論
理値”0”の間は、算術論理演算器(ALU)213か
らの出力値を選択し続けるため、アドレスバスXABに
出力される値は、順次更新されていく。モジュロエンド
アドレスレジスタ(ME)215の値とモジュロアドレ
スレジスタ(A0x)216の値とが一致すると、アン
ドゲート218からセレクタ219に入力される値が論
理値”1”になり、モジュロスタートアドレスレジスタ
(MS)214の値を選択する。それによって、モジュ
ロアドレスレジスタ(A0x)216はモジュロスター
トアドレスレジスタ(MS)214の値によって初期化
される。
While the value input from the AND gate 218 is the logical value "0", the output value from the arithmetic and logic unit (ALU) 213 is continuously selected, so that the value output to the address bus XAB is sequentially. Will be updated. When the value of the modulo end address register (ME) 215 matches the value of the modulo address register (A0x) 216, the value input from the AND gate 218 to the selector 219 becomes the logical value "1", and the modulo start address register ( MS) 214 value. Thereby, the modulo address register (A0x) 216 is initialized by the value of the modulo start address register (MS) 214.

【0041】上記モジュロ演算の説明では、モジュロア
ドレスレジスタ(A0x)216を利用したときの動作
を説明をしたが、モジュロ演算命令MOVS.W @A
x, DxにおけるAxをモジュロアドレスレジスタ(A
1x)216に指定することも可能である。また制御ビ
ットMXYに論理値”0”を指定すれば、アドレスバス
YABに対してモジュロ演算が可能になる。この場合、
モジュロ演算命令MOVS.W @Ax, DxにおけるA
xを、モジュロアドレスレジスタ(A0y)226又は
(A1y)226を指定するための値Ayに変更しなけ
ればならない。また制御ビットDMに0を指定すれば、
モジュロ演算の実行を禁止することもできる。
In the above description of the modulo operation, the operation when the modulo address register (A0x) 216 is used has been described. However, the modulo operation instruction MOVS.W@A
x, Ax in Dx is modulo address register (A
It is also possible to specify 1x) 216. If a logical value "0" is designated in the control bit MXY, modulo arithmetic can be performed on the address bus YAB. in this case,
Modulo arithmetic instruction MOVS.W @A in Ax, Dx
x must be changed to the value Ay to specify the modulo address register (A0y) 226 or (A1y) 226. If 0 is specified in the control bit DM,
It is also possible to prohibit the execution of modulo arithmetic.

【0042】図4にはDSPエンジン3の一例ブロック
図が示される。ランダムロジック回路(Random Logic C
ircuit)301と記載された回路ブロックは、図1のデ
コーダ34や制御回路、そしてコントロールレジスタや
ステータスレジスタなどを含む回路ブロックである。そ
の他にDSPエンジン3は、算術論理演算器(ALU)
302、シフタ(SFT)303、乗算器(MAC)3
04、レジスタ(Reg.)305、レジスタ(A0,A
1)306、レジスタ(Y0,Y1)307、レジスタ
(X0,X1)308、メモリデータバッファ(MDB
I)309、メモリデータバッファ(MDBX)31
0、メモリデータバッファ(MDBY)311を備え
る。メモリデータバッファ(MDBY)311はデータ
バスYDBとバスD2を接続する。メモリデータバッフ
ァ(MDBX)310はデータバスXDBとバスD1を
接続する。メモリデータバッファ(MDBI)309は
データバスIDBとバスC1,D1,A1,B1に接続
している。乗算器(MAC)304はバスA1及びB1
よりデータを入力し、それに対する乗算結果をバスC1
及びD1に出力する。シフタ(SFT)303はバスA
2よりデータを入力し、シフト演算結果をバスC2に出
力する。算術論理演算器(ALU)302はバスA2及
びB2よりデータを入力し、演算結果をバスC2に出力
する。
FIG. 4 shows an example block diagram of the DSP engine 3. Random Logic C
The circuit block described as ircuit) 301 is a circuit block including the decoder 34 and the control circuit of FIG. 1, and a control register and a status register. In addition, the DSP engine 3 is an arithmetic logic unit (ALU)
302, shifter (SFT) 303, multiplier (MAC) 3
04, register (Reg.) 305, register (A0, A
1) 306, register (Y0, Y1) 307, register (X0, X1) 308, memory data buffer (MDB
I) 309, memory data buffer (MDBX) 31
0, a memory data buffer (MDBY) 311 is provided. The memory data buffer (MDBY) 311 connects the data bus YDB and the bus D2. The memory data buffer (MDBX) 310 connects the data bus XDB and the bus D1. A memory data buffer (MDBI) 309 is connected to the data bus IDB and buses C1, D1, A1 and B1. Multiplier (MAC) 304 includes buses A1 and B1
More data is input, and the multiplication result is input to the bus C1.
And D1. Shifter (SFT) 303 is bus A
Data is input from 2 and the shift operation result is output to the bus C2. An arithmetic logic unit (ALU) 302 receives data from the buses A2 and B2 and outputs the operation result to the bus C2.

【0043】図5にはマイクロコンピュータ1の命令セ
ットに含まれる命令のフォーマット及び命令コードの一
例が示される。マイクロコンピュータ1は、CPU命令
とDSP命令の2種類の命令をサポートしている。CP
U命令の全てとDSP命令の一部は、16ビット長の命
令コードであり、残りのDSP命令は32ビット長の命
令コードになっている。CPU命令とは、DSPエンジ
ン3を動作させることなく専らCPUコア2によって実
行される命令である。DSP命令とは、アドレス演算若
しくはオペランドアクセスなどの一部の処理をCPUコ
ア2に負担させてDSPエンジン3が実行する命令であ
る。
FIG. 5 shows an example of an instruction format and an instruction code included in the instruction set of the microcomputer 1. The microcomputer 1 supports two types of instructions, a CPU instruction and a DSP instruction. CP
All U instructions and some DSP instructions are 16-bit long instruction codes, and the remaining DSP instructions are 32-bit long instruction codes. The CPU instruction is an instruction executed exclusively by the CPU core 2 without operating the DSP engine 3. The DSP instruction is an instruction executed by the DSP engine 3 by causing the CPU core 2 to bear a part of processing such as address calculation or operand access.

【0044】CPU命令は命令コードの最上位側の4ビ
ットが”0000”〜”1110”までの空間に命令が
割り当てられている。DSP命令は、命令コードの最上
位側の4ビットが”1111”に全て割り当てられてい
る。さらに命令コードの最上位側の6ビットが”111
100”及び”111101”に割り当てられた命令
は、DSP命令でも16ビット長の命令コードになって
いる。命令コードの最上位側の6ビットが”11111
0”の命令は、32ビット長の命令コードになってい
る。命令コードの最上位側の6ビットが”11111
1”の空間には命令を割り当てておらず、未使用領域
(未定義命令領域)となっている。将来この領域を利用
して命令コードを更に拡張することができる。この命令
フォーマットより明らかなように、各命令コードの最上
位側の6ビットをデコードすれば、当該命令がCPU命
令であるか、16ビット長のDSP命令であるか、32
ビット長のDSP命令であるか、未定義命令であるかの
判定を、小さな論理規模のデコーダで行うことができ
る。図5のCPU命令フォーマットにおいて、nnnn
はディスティネーションオペランドの指定領域、sss
sはソースオペランドの指定領域、ddddはディスプ
レースメントの指定領域、iiiiiiiiはイミディ
エイト値の指定領域である。尚、ADD命令などの場合
は、nnnnもソースオペランドの指定領域とされ、演
算結果はnnnnに格納される。また、図3に基づいて
説明した前記モジュロ演算命令は、図5の命令MOV
S.W @R2,A0に対応されるが、図5における命令
記述はオペランド指定の記述形態が図3で説明した内容
と相違されている。これは単なる形式の相違であり、実
質は同じである。
As for the CPU instruction, the instruction is assigned to a space in which the most significant 4 bits of the instruction code are "0000" to "1110". In the DSP instruction, all the 4 most significant bits of the instruction code are assigned to “1111”. In addition, the 6 most significant bits of the instruction code are "111".
The instructions assigned to "100" and "111101" are 16-bit instruction codes even for DSP instructions. The uppermost 6 bits of the instruction code are "11111".
The instruction of “0” has an instruction code of 32 bits in length. The uppermost 6 bits of the instruction code is “11111”.
No instruction is allocated to the 1 "space, which is an unused area (undefined instruction area). The instruction code can be further expanded by using this area in the future. As described above, if the most significant 6 bits of each instruction code are decoded, it is determined whether the instruction is a CPU instruction or a 16-bit DSP instruction.
It is possible to determine whether the instruction is a DSP instruction having a bit length or an undefined instruction with a decoder having a small logic scale. In the CPU command format of FIG. 5, nnnn
Is the specified area of the destination operand, sss
s is a source operand designation area, dddd is a displacement designation area, and iiiiiiiii is an immediate value designation area. In the case of an ADD instruction, nnnn is also the designated area of the source operand, and the operation result is stored in nnnn. Further, the modulo operation instruction described with reference to FIG. 3 is the instruction MOV of FIG.
Although it corresponds to SW @ R2, A0, the instruction description in FIG. 5 is different in the description form of the operand designation from the content described in FIG. This is just a difference in form, and is essentially the same.

【0045】図6にはCPUコア2のデコーダ24とD
SPエンジン3のデコーダ34との接続構成例が示され
る。マイクロコンピュータ1による命令フェッチは32
ビット単位で命令レジスタ(IR)25に行われる。デ
コーダ24は第1のデコード回路240、第2のデコー
ド回路241、及びコード変換回路242を備える。第
1のデコード回路240は命令レジスタ(IR)25の
上位側16ビットの領域(UIR)の値をデコードし
て、当該命令がCPU命令か、16ビットのDSP命令
か、32ビットのDSP命令かに応じて、CPUデコー
ド信号243、DSPデコード信号244、コード変換
制御信号245、及びシフト制御信号246を生成す
る。第2のデコード回路241はCPUデコード信号2
43をデコードして、CPUコア2内部の演算器やレジ
スタ選択などを行う各種内部制御信号(CPU制御信
号)247を生成する。コード変換回路242は、コー
ド変換制御信号245にて活性化されると、命令レジス
タ(IR)25の下位側16ビットの領域(LIR)が
保持する情報のビット数を圧縮し若しくはそのまま出力
し、コード変換制御信号245にて非活性化されると、
その出力の無効を意味する情報(ノンオペレーションコ
ード)を出力する。コード変換回路242は、信号24
5が非活性状態のとき下位側16ビットの領域(LI
R)の値に代えてノンオペレーションコードを出力する
という意味では、セレクタによって実現することも可能
である。DSPデコード信号244とコード変換回路2
42の出力は、前記DSP制御信号20としてDSPエ
ンジン3のデコーダ34に供給される。前記第1のデコ
ード回路240は、命令レジスタ(IR)25の上位側
16ビットの領域(UIR)に格納された最上位側の6
ビットをデコードすることにより、当該命令コードがC
PU命令か、16ビットのDSP命令か、32ビットの
DSP命令かを判定することができる。
FIG. 6 shows the decoder 24 and D of the CPU core 2.
An example of the connection configuration of the SP engine 3 with the decoder 34 is shown. 32 instruction fetches by the microcomputer 1
It is performed in the instruction register (IR) 25 bit by bit. The decoder 24 includes a first decoding circuit 240, a second decoding circuit 241, and a code conversion circuit 242. The first decoding circuit 240 decodes the value of the upper 16-bit area (UIR) of the instruction register (IR) 25 to determine whether the instruction is a CPU instruction, a 16-bit DSP instruction, or a 32-bit DSP instruction. CPU decode signal 243, DSP decode signal 244, code conversion control signal 245, and shift control signal 246 are generated. The second decode circuit 241 uses the CPU decode signal 2
43 is decoded to generate various internal control signals (CPU control signals) 247 for selecting arithmetic units and registers inside the CPU core 2. When the code conversion circuit 242 is activated by the code conversion control signal 245, the code conversion circuit 242 compresses or outputs the number of bits of information held in the lower 16-bit area (LIR) of the instruction register (IR) 25, When it is deactivated by the code conversion control signal 245,
Information (non-operation code) indicating that the output is invalid is output. The code conversion circuit 242 uses the signal 24
When 5 is inactive, the lower 16-bit area (LI
In the sense that a non-operation code is output instead of the value of R), it can be realized by a selector. DSP decode signal 244 and code conversion circuit 2
The output of 42 is supplied to the decoder 34 of the DSP engine 3 as the DSP control signal 20. The first decoding circuit 240 includes the uppermost 6 bits stored in the upper 16-bit area (UIR) of the instruction register (IR) 25.
By decoding the bit, the relevant instruction code becomes C
It is possible to determine whether it is a PU instruction, a 16-bit DSP instruction, or a 32-bit DSP instruction.

【0046】デコードされた命令が16ビット命令であ
る場合、コード変換制御信号245は非活性状態とさ
れ、それによってコード変換回路242は出力の無効を
意味するノンオペレーションコードを出力する。また、
デコードされた命令が16ビット命令である場合にはシ
フト制御信号246が活性化され、それを受ける命令レ
ジスタ(IR)25はその下位側16ビットの領域(L
IR)の値を上位側16ビットの領域(LIR)にシフ
トさせ、シフトされた命令を次に実行すべき命令の全部
若しくは一部として利用する。例えば命令レジスタIR
の上位側16ビット領域UIRに16ビットCPU命令
が格納され、下位側ビット領域LIRに32ビットDS
P命令の上位16ビットの命令コードが格納された場合
について説明する。まず、上位側16ビット領域UIR
に格納された16ビットCPU命令が第1デコード回路
240にてデコードされ、その結果に従ってCPUコア
2はその命令を実行し、下位側16ビット領域LIRに
格納された32ビットDSP命令の上位16ビットの命
令コードデータは、上位側16ビット領域UIRに転送
される。このときランダムロジック回路201は、算術
演算器AU208に対し、プログラムカウンタPCに格
納されるべきアドレスのアドレス演算を実行させる。プ
ログラムカウンタPCは、算術演算器AU208によっ
て演算されたアドレス演算結果に従うアドレスを格納す
る。プログラムカウンタPCに格納されたアドレスに従
って、上記32ビットDSP命令の下位16ビットの命
令コードデータが、それを格納する命令メモリから命令
レジスタIRの下位側16ビット領域LIRに転送され
る。これにより、32ビットDSP命令が命令レジスタ
IRに格納される。そして、この命令レジスタIRに格
納された32ビットDSP命令は、デコーダ24を介し
てDSPエンジン3のデコーダ34に供給される。ま
た、他の方法として、図示していないが、複数の命令プ
リフェッチバッファがCPUコア2内に設けられてい
る。複数の命令プリフェッチバッファは、現在実行され
ている命令から数サイクル先に実行されるべき命令をプ
リフェッチする。このようなプリフェッチバッファが設
けられている場合において、上述のように32ビットD
SP命令の上位16ビットの命令コードデータが下位側
領域LIRから上位側16ビット領域UIRに転送され
るとき、ランダムロジック回路201は、上記32ビッ
トDSP命令の下位16ビットの命令コードデータがプ
リフェッチされている命令プリフェッチバッファを選択
する。その選択された命令プリフェッチバッファから3
2ビットDSP命令の下位16ビットの命令コードデー
タが読み出され、命令レジスタIRの下位側16ビット
領域LIRに格納される。
When the decoded instruction is a 16-bit instruction, the code conversion control signal 245 is inactivated, so that the code conversion circuit 242 outputs a non-operation code meaning that the output is invalid. Also,
If the decoded instruction is a 16-bit instruction, the shift control signal 246 is activated, and the instruction register (IR) 25 that receives it is in the lower 16-bit area (L).
The value of (IR) is shifted to the upper 16-bit area (LIR), and the shifted instruction is used as all or part of the instruction to be executed next. For example, instruction register IR
16-bit CPU instruction is stored in the upper 16-bit area UIR of the
A case where the upper 16-bit instruction code of the P instruction is stored will be described. First, the upper 16-bit area UIR
The 16-bit CPU instruction stored in is decoded by the first decoding circuit 240, the CPU core 2 executes the instruction according to the result, and the upper 16 bits of the 32-bit DSP instruction stored in the lower 16-bit area LIR. The instruction code data of is transferred to the upper 16-bit area UIR. At this time, the random logic circuit 201 causes the arithmetic operation unit AU208 to execute the address operation of the address to be stored in the program counter PC. The program counter PC stores an address according to the address calculation result calculated by the arithmetic operation unit AU208. According to the address stored in the program counter PC, the lower 16-bit instruction code data of the 32-bit DSP instruction is transferred from the instruction memory storing it to the lower 16-bit area LIR of the instruction register IR. As a result, the 32-bit DSP instruction is stored in the instruction register IR. Then, the 32-bit DSP instruction stored in the instruction register IR is supplied to the decoder 34 of the DSP engine 3 via the decoder 24. As another method, although not shown, a plurality of instruction prefetch buffers are provided in the CPU core 2. The plurality of instruction prefetch buffers prefetch an instruction to be executed several cycles ahead of the currently executed instruction. When such a prefetch buffer is provided, as described above, 32-bit D
When the upper 16-bit instruction code data of the SP instruction is transferred from the lower-side area LIR to the upper-side 16-bit area UIR, the random logic circuit 201 prefetches the lower 16-bit instruction code data of the 32-bit DSP instruction. Selected instruction prefetch buffer. 3 from the selected instruction prefetch buffer
The lower 16-bit instruction code data of the 2-bit DSP instruction is read and stored in the lower 16-bit area LIR of the instruction register IR.

【0047】デコードされた命令が16ビットのCPU
命令である場合、DSPデコード信号244はノンオペ
レーションを意味するコードとされる。デコードされた
命令が16ビットのDSP命令である場合には、CPU
制御信号247はCPUデコード信号243に基づいて
第2のデコード回路241が生成し、DSPエンジン3
内部の制御信号は実質的にDSPデコード信号244を
デコーダ34が解読して生成する。デコードされた命令
が32ビットのDSP命令である場合、CPU制御信号
247はCPUデコード信号243に基づいて第2のデ
コード回路241が生成し、DSPエンジン3内部の制
御信号はDSPデコード信号244とコード変換回路2
42の出力をデコーダ34が解読して生成する。
CPU whose decoded instruction is 16 bits
If it is an instruction, the DSP decode signal 244 is a code that means non-operation. CPU if the decoded instruction is a 16-bit DSP instruction
The control signal 247 is generated by the second decode circuit 241 based on the CPU decode signal 243, and the DSP engine 3
The internal control signal is substantially generated by the decoder 34 decoding the DSP decode signal 244. When the decoded instruction is a 32-bit DSP instruction, the CPU control signal 247 is generated by the second decoding circuit 241 based on the CPU decode signal 243, and the control signal inside the DSP engine 3 is the code including the DSP decode signal 244. Conversion circuit 2
Decoder 34 decodes and produces the output of 42.

【0048】マイクロコンピュータ1の命令セットには
命令コード長が、16ビットのものと32ビットのもの
があり、上述のように16ビット長命令と32ビット長
命令では処理が異なるので、それぞれの場合を分けてそ
の動作を詳述する。
The instruction set of the microcomputer 1 has an instruction code length of 16 bits and an instruction code length of 32 bits, and the processing is different between the 16-bit length instruction and the 32-bit length instruction as described above. The operation will be described in detail.

【0049】始めに16ビット長命令の場合について説
明する。第1のデコード回路240は命令レジスタ(I
R)25にフェッチされた32ビットの命令コードの
内、上位16ビットをデコードする。第1のデコード回
路240では、命令コードの最上位6ビットのコード
が”111110”、”11111”以外のときは16
ビット長命令であることがわかるので、このときはCP
Uデコード信号243とDSPデコード信号244の出
力と共に、命令レジスタ(IR)25の下位16ビット
領域LIRの命令コードデータを上位16ビット領域U
IRにシフトさせるシフト制御信号246を活性化す
る。活性化されたシフト制御信号246を受けた命令レ
ジスタ(IR)25は、下位16ビット領域LIRに格
納されている命令コードを上位16ビット領域UIRに
シフトする。シフトされた命令コードは、その次に第1
のデコード回路240でデコードされることになる。デ
コーダ24より出力されるCPUデコード信号243
は、第2デコード回路241に出力され、DSPデコー
ド信号244は、DSPエンジン3に供給される。ま
た、第1のデコード回路240は16ビット長命令であ
ることがわかると、コード変換制御信号245を非活性
とし、これによってコード変換回路242は、下位16
ビットの命令コードが無効であることを示すコードをD
SP制御信号20の一部として生成する。DSPエンジ
ン3側では第1のデコード回路240より出力されたD
SPデコード信号244とコード変換回路242より出
力されたコード信号とをDSP制御信号20として入力
すると、デコーダ34が当該DSP制御信号20のデコ
ードを行なう。16ビットのDSP命令の場合、コード
変換回路242より出力されたDSP制御信号は無効を
表わす信号になっているので、デコーダ34はDSPデ
コード信号244に着目して、DSPエンジン3内にあ
る乗算器(MAC)304、算術論理演算器(ALU)
302、及びシフタ(SFT)303等の制御信号を出
力する。DSPエンジン3はそれら制御信号に従って演
算処理を行なう。
First, the case of a 16-bit length instruction will be described. The first decoding circuit 240 includes an instruction register (I
R) The upper 16 bits of the 32-bit instruction code fetched by R) 25 are decoded. In the first decoding circuit 240, when the most significant 6-bit code of the instruction code is other than "111110" and "11111", 16
Since it can be seen that it is a bit length instruction, CP at this time
Along with the output of the U decode signal 243 and the DSP decode signal 244, the instruction code data in the lower 16-bit area LIR of the instruction register (IR) 25 is transferred to the upper 16-bit area U.
The shift control signal 246 for shifting to IR is activated. The instruction register (IR) 25 receiving the activated shift control signal 246 shifts the instruction code stored in the lower 16-bit area LIR to the upper 16-bit area UIR. The shifted instruction code is the first
Will be decoded by the decoding circuit 240. CPU decode signal 243 output from the decoder 24
Is output to the second decode circuit 241, and the DSP decode signal 244 is supplied to the DSP engine 3. When the first decoding circuit 240 finds that the instruction is a 16-bit length instruction, it deactivates the code conversion control signal 245, so that the code conversion circuit 242 causes the lower 16 bits.
The code indicating that the instruction code of the bit is invalid is D
It is generated as a part of the SP control signal 20. On the DSP engine 3 side, D output from the first decoding circuit 240
When the SP decode signal 244 and the code signal output from the code conversion circuit 242 are input as the DSP control signal 20, the decoder 34 decodes the DSP control signal 20. In the case of a 16-bit DSP instruction, the DSP control signal output from the code conversion circuit 242 is a signal indicating invalidity. (MAC) 304, arithmetic logic unit (ALU)
The control signals of 302 and the shifter (SFT) 303 are output. The DSP engine 3 performs arithmetic processing according to those control signals.

【0050】次に32ビット長命令の場合について説明
する。CPUコア2内部にある第1のデコード回路24
0では、命令レジスタ(IR)25に32ビットの命令
コードを格納する。そして上位16ビットを第1のデコ
ード回路240でデコードし、デコード信号243,2
44を出力する。第1のデコード回路240では、命令
コードの最上位6ビットのコードが”111110”の
ときは32ビット長命令であることがわかるので、コー
ド変換制御信号245を活性化し、これによってコード
変換回路242は、命令レジスタ(IR)25の下位1
6ビットの命令コードをコード変換する。コード変換さ
れた情報はDSPデコード信号244と共にDSPエン
ジン3にDSP制御信号20として供給される。デコー
ダ34はDSP制御信号20をデコードしてDSPエン
ジン3内部の制御信号を生成する。尚、デコーダ24,
34は例えばランダムロジック回路で実現することがで
きる。
Next, the case of a 32-bit length instruction will be described. The first decoding circuit 24 inside the CPU core 2
At 0, a 32-bit instruction code is stored in the instruction register (IR) 25. Then, the upper 16 bits are decoded by the first decoding circuit 240, and the decoded signals 243, 2
44 is output. In the first decoding circuit 240, when the most significant 6-bit code of the instruction code is "111110", it is understood that the instruction is a 32-bit length instruction. Therefore, the code conversion control signal 245 is activated, whereby the code conversion circuit 242 is activated. Is the lower 1 of the instruction register (IR) 25
6-bit instruction code is converted. The code-converted information is supplied to the DSP engine 3 as the DSP control signal 20 together with the DSP decode signal 244. The decoder 34 decodes the DSP control signal 20 to generate a control signal inside the DSP engine 3. Incidentally, the decoder 24,
34 can be realized by a random logic circuit, for example.

【0051】図17には図6に対応される別の実施例が
示される。図6の実施例では、命令レジスタ25の下位
領域LIRの命令データが上位領域UIRにシフトされ
るものとして説明した。図17の実施例は、前記命令レ
ジスタ25と内部データバスIDBとの間に、命令プリ
フェッチキューを構成する直列2段の命令プリフェッチ
バッファ250,251を供え、命令プリフェッチバッ
ファ250,251の保持データをセレクタ252で選
択して命令レジスタ25に与えるよいうになっている。
命令プリフェッチバッファ250,251及び命令レジ
スタ25の夫々は、32ビット単位でデータを保持し、
その保持動作は、制御信号φ1〜φ3(CLK1に同
期)によって制御される。特に図示されないが、命令プ
リフェッチバッファ250,251及び命令レジスタ2
5の夫々は、マスタ・スレーブの構成を有し、マスタ段
は対応される制御信号の立ち上がりに同期して入力のラ
ッチ動作を行い、スレーブ段は対応される制御信号の立
ち下がりに同期して入力のラッチ動作を行う。これによ
って、直列2段の命令プリフェッチバッファ250,2
51には、プリフェッチされた前後の命令データが格納
される。
FIG. 17 shows another embodiment corresponding to FIG. In the embodiment shown in FIG. 6, the instruction data in the lower area LIR of the instruction register 25 is shifted to the upper area UIR. In the embodiment shown in FIG. 17, between the instruction register 25 and the internal data bus IDB, serial two-stage instruction prefetch buffers 250 and 251 forming an instruction prefetch queue are provided, and the data held in the instruction prefetch buffers 250 and 251 are stored. The selection is made by the selector 252 and is given to the instruction register 25.
Each of the instruction prefetch buffers 250 and 251 and the instruction register 25 holds data in 32-bit units,
The holding operation is controlled by control signals φ1 to φ3 (synchronized with CLK1). Although not particularly shown, the instruction prefetch buffers 250 and 251 and the instruction register 2
Each of 5 has a master-slave configuration, the master stage performs an input latch operation in synchronization with the rising edge of the corresponding control signal, and the slave stage synchronizes with the falling edge of the corresponding control signal. Performs input latch operation. As a result, the serial two-stage instruction prefetch buffers 250, 2
In 51, instruction data before and after prefetching is stored.

【0052】前記セレクタ252は、選択制御信号φ4
に従って、ポートPaに供給される32ビットの命令デ
ータ又はポートPb供給される32ビットの命令データ
を選択して命令レジスタ25に与える。前記ポートPa
には、命令プリフェッチバッファ250の上位16ビッ
ト領域UPB1を下位側とし、命令プリフェッチバッフ
ァ251の下位16ビット領域LPB2を上位側とする
32ビットの命令データが供給される。ポートPbには
命令プリフェッチバッファ251に格納されている32
ビットの命令データがそのまま供給される。
The selector 252 has a selection control signal φ4.
According to the above, the 32-bit instruction data supplied to the port Pa or the 32-bit instruction data supplied to the port Pb is selected and given to the instruction register 25. The port Pa
Is supplied with 32-bit instruction data having the upper 16-bit area UPB1 of the instruction prefetch buffer 250 as the lower side and the lower 16-bit area LPB2 of the instruction prefetch buffer 251 as the upper side. 32 stored in the instruction prefetch buffer 251 at the port Pb
Bit instruction data is supplied as it is.

【0053】これにより、命令プリフェッチバッファ2
51が32ビットのDSP命令を保持しているとき、セ
レクタ252は、ポートPbの出力を選択することによ
って当該32ビットのDSP命令を命令レジスタ25に
セットすることができる。命令プリフェッチバッファ2
51が16ビットのDSP命令又は16ビットのCPU
命令を上位領域UPB2に保持しているとき、セレクタ
252は、ポートPbの出力を選択することによって当
該16ビットの命令を命令レジスタ25の上位領域UI
Rにセットすることができる。命令プリフェッチバッフ
ァ251が16ビットのDSP命令又は16ビットのC
PU命令を下位領域LPB2に保持しているときは、セ
レクタ252が、ポートPaの出力を選択することによ
って当該16ビットの命令を命令レジスタ25の上位領
域UIRにセットすることができる。命令プリフェッチ
バッファ251が32ビットDSP命令の上位側16ビ
ット命令コードを下位領域LPB2に保持し、命令プリ
フェッチバッファ250がその上位領域UPB1に当該
32ビットDSP命令の下位側16ビット命令コードを
保持しているときは、セレクタ252が、ポートPaの
出力を選択することによって当該32ビットDSP命令
を命令レジスタ25にセットすることができる。
As a result, the instruction prefetch buffer 2
When 51 holds a 32-bit DSP instruction, the selector 252 can set the 32-bit DSP instruction in the instruction register 25 by selecting the output of the port Pb. Instruction prefetch buffer 2
51 is a 16-bit DSP instruction or 16-bit CPU
When the instruction is held in the upper area UPB2, the selector 252 selects the output of the port Pb to output the 16-bit instruction to the upper area UI of the instruction register 25.
Can be set to R. The instruction prefetch buffer 251 has a 16-bit DSP instruction or a 16-bit C instruction.
When the PU instruction is held in the lower area LPB2, the selector 252 can set the 16-bit instruction in the upper area UIR of the instruction register 25 by selecting the output of the port Pa. The instruction prefetch buffer 251 holds the upper 16-bit instruction code of the 32-bit DSP instruction in the lower area LPB2, and the instruction prefetch buffer 250 holds the lower 16-bit instruction code of the 32-bit DSP instruction in the upper area UPB1. If so, the selector 252 can set the 32-bit DSP instruction in the instruction register 25 by selecting the output of the port Pa.

【0054】図17において253は、前記命令プリフ
ェッチバッファのラッチ制御信号φ1,φ2、命令レジ
スタ25のラッチ制御信号φ3、及び前記選択制御信号
φ4を生成する制御ロジックである。この制御ロジック
253は、16ビット命令か32ビット命令かを示す制
御信号248と命令プリフェッチバッファ250,25
1の各領域に実行されないまま残っている命令コードの
状態に従って、前記制御信号φ1〜φ4を生成する。こ
の制御ロジック253は命令フェッチのための制御論理
の一部を構成する。尚、前記制御信号248は、第1の
デコード回路240が命令レジスタ25の上位領域UI
Rから供給される命令コードデータの上位側6ビットを
デコードして生成されるものであり、その詳細について
は後述する。
In FIG. 17, reference numeral 253 is a control logic for generating the latch control signals φ1 and φ2 of the instruction prefetch buffer, the latch control signal φ3 of the instruction register 25, and the selection control signal φ4. The control logic 253 has a control signal 248 indicating whether it is a 16-bit instruction or a 32-bit instruction and the instruction prefetch buffers 250 and 25.
The control signals .phi.1 to .phi.4 are generated in accordance with the state of the instruction code that remains unexecuted in each area of 1. This control logic 253 forms part of the control logic for instruction fetch. It should be noted that the control signal 248 indicates that the first decoding circuit 240 has an upper area UI of the instruction register 25.
It is generated by decoding the upper 6 bits of the instruction code data supplied from R, and the details thereof will be described later.

【0055】前記制御論理253による命令レジスタ2
5への命令コードデータのセットは以下のようにされ
る。外部からの命令フェッチは、CPUコア2の命令フ
ェッチタイミング(例えば後述する複数段のパイプライ
ンステージにおける命令フェッチステージIF)におい
て、命令プリフェッチバッファ250に32ビットの命
令コードデータを新たに格納する余地がある場合に行わ
れる。そのタイミングで命令フェッチが行われるとき
は、命令プリフェッチバッファ251にはまだ実行され
ていない命令が残っている。命令プリフェッチバッファ
251の領域UPB2,LPB2に格納されている命令
コードの双方がまだ実行されていない第1の状態の場合
には、命令プリフェッチバッファ251の32ビットの
出力がポートPbを介してセレクタ252で選択されて
命令レジスタ25にセットされる。一方、命令プリフェ
ッチバッファ251の下位領域LPB2に格納されてい
る命令コードだけがまだ実行されていない第2の状態の
場合には、命令プリフェッチバッファ250にプリフェ
ッチした上位領域UPB1と命令プリフェッチバッファ
251の下位領域LPB2の命令コードデータがポート
Paを介して命令レジスタ25にセットされる。
Instruction register 2 by the control logic 253
The instruction code data set to 5 is as follows. For the instruction fetch from the outside, there is room for newly storing 32-bit instruction code data in the instruction prefetch buffer 250 at the instruction fetch timing of the CPU core 2 (for example, the instruction fetch stage IF in a plurality of pipeline stages described later). In some cases. When an instruction is fetched at that timing, the instruction that has not been executed remains in the instruction prefetch buffer 251. In the first state where both of the instruction codes stored in the areas UPB2 and LPB2 of the instruction prefetch buffer 251 have not been executed yet, the 32-bit output of the instruction prefetch buffer 251 is output via the port Pb to the selector 252. Is selected in and set in the instruction register 25. On the other hand, in the second state where only the instruction code stored in the lower area LPB2 of the instruction prefetch buffer 251 is not yet executed, the upper area UPB1 prefetched in the instruction prefetch buffer 250 and the lower area of the instruction prefetch buffer 251 are prefetched. The instruction code data in the area LPB2 is set in the instruction register 25 via the port Pa.

【0056】前記第1の状態において、命令レジスタ2
5の上位領域UIRにセットされた命令コードデータを
デコード回路240がデコードした結果、それが32ビ
ット命令を構成するものである場合には、そのとき、命
令プリフェッチバッファ250にプリフェッチされた3
2ビットの命令コードデータがそのまま命令プリフェッ
チバッファ251に転送される。一方、デコード結果に
よって16ビット命令であることが検出されたときは、
命令プリフェッチバッファ250から次段のバッファ2
51へのデータシフトは行われない。
In the first state, the instruction register 2
As a result of the decoding circuit 240 decoding the instruction code data set in the upper area UIR of No. 5, if it constitutes a 32-bit instruction, at that time, 3 prefetched to the instruction prefetch buffer 250 is performed.
The 2-bit instruction code data is transferred to the instruction prefetch buffer 251 as it is. On the other hand, when it is detected from the decoding result that it is a 16-bit instruction,
From the instruction prefetch buffer 250 to the next buffer 2
No data shift to 51 is performed.

【0057】前記第2の状態では、ポートPaを介する
命令レジスタ25へのデータセットの後、命令プリフェ
ッチバッファ250にプリフェッチされている32ビッ
トの命令コードデータは、そのまま命令プリフェッチバ
ッファ251にシフトされてセットされる。このシフト
セット後、命令プリフェッチバッファ250に未だ実行
されていない命令コードデータが存在しないならば、命
令プリフェッチバッファ250には、次の命令フェッチ
タイミングで命令コードデータがプリフェッチされる。
In the second state, after the data is set in the instruction register 25 via the port Pa, the 32-bit instruction code data prefetched in the instruction prefetch buffer 250 is directly shifted to the instruction prefetch buffer 251. Set. After this shift setting, if there is no unexecuted instruction code data in the instruction prefetch buffer 250, the instruction code data is prefetched in the instruction prefetch buffer 250 at the next instruction fetch timing.

【0058】このような制御により、命令フェッチタイ
ミングの後には、まだ処理されていない命令コードデー
タが命令レジスタ25にセットされる。このとき、実行
されるべき命令が、16ビットCPU命令、16ビット
DSP命令又は32ビットDSP命令の何れであって
も、その上位側16ビットは必ず第1のデコード回路2
40に供給されることになる。
By such control, the instruction code data which has not been processed yet is set in the instruction register 25 after the instruction fetch timing. At this time, regardless of whether the instruction to be executed is a 16-bit CPU instruction, a 16-bit DSP instruction, or a 32-bit DSP instruction, the upper 16 bits of the instruction are always the first decoding circuit 2
40 will be supplied.

【0059】図6で説明したコード変換回路242は、
図17ではセレクタ242Aとコード変換ロジック24
2Bによって構成される。また、第1のデコード回路2
40は、図6の説明ではそれがデコードした命令コード
が16ビット命令であるか否かによってそのレベルが制
御される制御信号245,246を生成したが、図17
の例では、それがデコードした命令コードが16ビット
命令であるのか32ビット命令(本実施例において32
ビット命令はDSP命令である)であるのかを識別する
ための制御信号248を出力する。セレクタ242A
は、制御信号248が16ビット命令を意味するとき
は、ノーオペレーションコードNOPを選択してコード
変換ロジック242Bに供給し、制御信号248が32
ビットDSP命令であることを意味するときは、命令レ
ジスタ25の下位領域LIRの命令コードをコード変換
ロジック242Bに供給する。コード変換ロジック24
2Bは、特に制限されないが、命令レジスタ25の下位
領域LIRの命令コードデータの一部例えばレジスタ選
択のためのコード情報をDSPエンジン3のデコーダ3
4に適する形態に修正して出力する。
The code conversion circuit 242 described with reference to FIG.
In FIG. 17, the selector 242A and the code conversion logic 24
2B. In addition, the first decoding circuit 2
In the description of FIG. 6, the 40 generates the control signals 245 and 246 whose levels are controlled depending on whether the instruction code decoded by the 40 is a 16-bit instruction.
In the example, whether the instruction code decoded by the instruction is a 16-bit instruction or not, a 32-bit instruction (in the present embodiment, 32
A control signal 248 for identifying whether the bit command is a DSP command) is output. Selector 242A
When the control signal 248 means a 16-bit instruction, the no-operation code NOP is selected and supplied to the code conversion logic 242B.
When it means a bit DSP instruction, the instruction code of the lower area LIR of the instruction register 25 is supplied to the code conversion logic 242B. Code conversion logic 24
2B is not particularly limited, but a part of the instruction code data in the lower region LIR of the instruction register 25, for example, code information for register selection, is used by the decoder 3 of the DSP engine 3.
It is corrected to a form suitable for 4 and output.

【0060】図17の実施例において第1のデコード回
路240は命令レジスタ25の上位領域UIRが保持す
る16ビットの命令コードデータを解読し、これによっ
て得られたCPUデコード信号243を第2のデコード
回路243に与え、また、DSPデコード信号244を
デコーダ34に与える。CPUデコード信号243は、
CPU命令及びDSP命令の何れにおいても有意とさ
れ、第2のデコード回路241に供給される。第2のデ
コード回路241は、CPUデコード信号243をデコ
ードして、CPUコア2が行うべきアドレス演算やデー
タ演算のための制御情報、及び内部メモリX−ROM
4,Y−ROM5,X−RAM,Y−RAMそして外部
メモリをアクセスしたりするためのアドレスバスやデー
タバスの選択制御情報等を出力する。前述の通り、DS
P命令に対しても、それに必要なアドレス演算やデータ
パスの選択はCPUコア2が行う。
In the embodiment shown in FIG. 17, the first decoding circuit 240 decodes the 16-bit instruction code data held in the upper area UIR of the instruction register 25, and the CPU decode signal 243 obtained by this decoding is decoded by the second decoding circuit 240. The signal is supplied to the circuit 243, and the DSP decode signal 244 is supplied to the decoder 34. The CPU decode signal 243 is
It is significant in both the CPU instruction and the DSP instruction and is supplied to the second decoding circuit 241. The second decode circuit 241 decodes the CPU decode signal 243 to generate control information for address calculation and data calculation that the CPU core 2 should perform, and an internal memory X-ROM.
4, Y-ROM 5, X-RAM, Y-RAM and selection control information of an address bus and a data bus for accessing an external memory are output. As mentioned above, DS
For the P instruction, the CPU core 2 performs the necessary address calculation and data path selection.

【0061】前記DSPデコード信号244は、前述の
通り、第1のデコード回路240に供給される命令コー
ドがDSP命令のためのコードデータである場合に有意
とされるデコード信号である。有意DSPデコード信号
244は、例えば、CPUコア2で行われるアドレス演
算に従ってアクセスされるメモリとの間でデータの受け
渡しを行うDSPエンジン3内のレジスタ等の指定情報
を含んでいる。第1のデコード回路240に供給される
命令コードがCPU命令である場合には、DSPデコー
ド信号244は無効を意味するコードにされる。
As described above, the DSP decode signal 244 is a significant decode signal when the instruction code supplied to the first decode circuit 240 is code data for a DSP instruction. The significant DSP decode signal 244 includes, for example, designation information such as a register in the DSP engine 3 that transfers data to and from a memory accessed according to an address calculation performed by the CPU core 2. When the instruction code supplied to the first decode circuit 240 is a CPU instruction, the DSP decode signal 244 is set to a code meaning invalid.

【0062】ここで、マイクロコンピュータ1の命令セ
ットに含まれる前記DSP命令のコードを更に詳述す
る。図18及び図19は夫々16ビットのDSP命令の
命令コードが示され、図20及び図21には32ビット
のDSP命令の命令コードが示される。前述のように、
DSP命令は、命令コードの最上位側の4ビットが”1
111”に割り当てられ、命令コードの最上位側の6ビ
ットが”111100”及び”111101”は16ビ
ットのDSP命令、命令コードの最上位側の6ビット
が”111110”の命令は32ビットのDSP命令と
される。
Now, the code of the DSP instruction included in the instruction set of the microcomputer 1 will be described in more detail. 18 and 19 show the instruction code of the 16-bit DSP instruction, and FIGS. 20 and 21 show the instruction code of the 32-bit DSP instruction. As aforementioned,
In the DSP instruction, the 4 most significant bits of the instruction code are "1".
The most significant 6 bits of the instruction code are “111100” and “111101” are 16-bit DSP instructions, and the most significant 6 bits of the instruction code are “111110” instructions are 32-bit DSPs. It is an order.

【0063】図18の第1欄(X Side of Data Transfe
r)に示される16ビットDSP命令の命令フォーマッ
トはXメモリ(X−ROM4,X−RAM6)とDSP
エンジン3の内蔵レジスタとの間におけるデータ転送命
令であり、第2欄(Y Side of Data Transfer)に示さ
れる命令フォーマットはYメモリ(Y−ROM5,Y−
RAM7)とDSPエンジン3の内蔵レジスタとの間に
おけるデータ転送命令である。上記命令フォーマットに
おいて、Ax,AyはCPUコア2に含まれるレジスタ
アレイ209(図3参照)に含まれるレジスタを指定
し、Ax=”0”はレジスタR4を指定し、Ax=”
1”はレジスタR5を指定し、Ay=”0”はレジスタ
R6を指定し、Ay=”1”はレジスタR7を指定す
る。Dx,Dy,DaはDSPエンジンに含まれるレジ
スタを指定し、Dx=”0”はレジスタX0、Dx=”
1”はレジスタX1、Dy=”0”はレジスタY0、D
y=”1”はレジスタY1、Da=”0”はレジスタA
0、Da=”1”はレジスタA1を夫々指定する。I
x,Iyはイミディエイト値を意味する。
Column 1 of FIG. 18 (X Side of Data Transfe
The instruction format of the 16-bit DSP instruction shown in r) is X memory (X-ROM4, X-RAM6) and DSP.
The instruction format shown in the second column (Y Side of Data Transfer) is a data transfer instruction with the internal register of the engine 3 and is a Y memory (Y-ROM 5, Y-
This is a data transfer instruction between the RAM 7) and the internal register of the DSP engine 3. In the above instruction format, Ax and Ay designate registers included in the register array 209 (see FIG. 3) included in the CPU core 2, Ax = “0” designates the register R4, and Ax = ”.
1 "designates the register R5, Ay =" 0 "designates the register R6, Ay =" 1 "designates the register R7. Dx, Dy, Da designate the registers included in the DSP engine, and Dx = “0” means register X0, Dx = ”
1 "is register X1, Dy =" 0 "is register Y0, D
y = “1” is register Y1, Da = “0” is register A
0 and Da = “1” respectively designate the register A1. I
x and Iy mean immediate values.

【0064】図19に示される16ビットDSP命令の
命令フォーマットは、マイクロコンピュータ1の外部に
接続された図示しないメモリとDSPエンジン3の内蔵
レジスタとの間におけるデータ転送命令である。Asは
CPUコア2に内蔵されたレジスタアレイ209(図3
参照)に含まれるレジスタを指定し、DsはDSPエン
ジンに内蔵されるレジスタX1,X0,Y1,Y0,A
1,A0やレジスタアレイ305(図4参照)に含まれ
るレジスタを指定する。
The instruction format of the 16-bit DSP instruction shown in FIG. 19 is a data transfer instruction between a memory (not shown) connected to the outside of the microcomputer 1 and a built-in register of the DSP engine 3. As is a register array 209 built in the CPU core 2 (see FIG.
Register), and Ds is a register X1, X0, Y1, Y0, A built in the DSP engine.
1, A0 and registers included in the register array 305 (see FIG. 4) are designated.

【0065】32ビットDSP命令のフォーマットは、
32ビットDSP命令であることを示すコード”111
110”の領域(ビット31〜ビット26)、Aフィー
ルド(ビット25〜ビット16)及びBフィールド(ビ
ット15〜ビット0)に大別される。図20はAフィー
ルドに着目した場合の当該フィールドのコードとそれに
対応されるにニーモニックを示し、図21はBフィール
ドに着目した場合の当該フィールドのコードとそれに対
応されるにニーモニックを示す。
The format of the 32-bit DSP instruction is
Code "111" indicating a 32-bit DSP instruction
It is roughly divided into a 110 "area (bit 31 to bit 26), an A field (bit 25 to bit 16), and a B field (bit 15 to bit 0). A code and its corresponding mnemonic are shown, and FIG. 21 shows the code of the field and its corresponding mnemonic when attention is paid to the B field.

【0066】図20に示されるAフィールドのコード
は、図18に示される16ビットDSP命令のビット9
〜ビット0のコードと同一であり、第20図の第1欄
(X Sideof Data Transfer)に示されるAフィールドの
コードはXメモリ(X−ROM4,X−RAM6)とD
SPエンジン3の内蔵レジスタとの間におけるデータ転
送を規定し、第2欄(Y Side of Data Transfer)に示
されるAフィールドのコードはYメモリ(Y−ROM
5,Y−RAM7)とDSPエンジン3の内蔵レジスタ
との間におけるデータ転送を規定する。当該Aフィール
ドに含まれるビットAx,Ay,Dx,Dy,Daが指
定する内容は図18と全く同じである。
The code of the A field shown in FIG. 20 is bit 9 of the 16-bit DSP instruction shown in FIG.
~ The same as the code of bit 0, and the code of the A field shown in the first column (X Side of Data Transfer) of FIG. 20 is X memory (X-ROM4, X-RAM6) and D
Data transfer to and from the internal register of the SP engine 3 is defined, and the code of the A field shown in the second column (Y Side of Data Transfer) is the Y memory (Y-ROM).
5, Y-RAM 7) and the internal registers of the DSP engine 3 are defined. The contents designated by the bits Ax, Ay, Dx, Dy, Da included in the A field are exactly the same as those in FIG.

【0067】図21に示されるBフィールドのコード
は、DSPエンジン3の内部で行われる算術演算、論理
演算、シフト演算、レジスタ間のロード/ストアなどの
処理を規定する。例えば、DSPエンジン3の内部で行
われる乗算(PMULS)、減算(PSUB)、加算
(PADD)、丸め(PRND)、シフト(PSH
L)、論理積(PAND)、排他的論理和(XOR)、
論理和(OR)、インクリメント(PINC)、ディク
リメント(PDEC)、クリア(CLR)等の演算や、
DSPエンジン3の内部で行われるロード(PLDS)
及びストア(PSTS)等を規定する。図21の第3欄
(3 Operand Operation with Condition)は、条件付き
のコードであり、その条件(if cc)としては、DC
(データコンプリート)ビット(データの処理完了を示
すビット)の論理値又は無視を選択することができる。
The code of the B field shown in FIG. 21 defines processing such as arithmetic operation, logical operation, shift operation, and load / store between registers performed inside the DSP engine 3. For example, multiplication (PMULS), subtraction (PSUB), addition (PADD), rounding (PRND), shift (PSH) performed inside the DSP engine 3.
L), logical product (PAND), exclusive OR (XOR),
Operations such as logical sum (OR), increment (PINC), decrement (PDEC), clear (CLR),
Load (PLDS) performed inside the DSP engine 3
And stores (PSTS), etc. The third column (3 Operand Operation with Condition) in FIG. 21 is a code with a condition, and the condition (if cc) is DC.
A logical value of the (data complete) bit (a bit indicating the completion of data processing) or ignoring can be selected.

【0068】実際の32ビットDSP命令は、Bフィー
ルドのコードとAフィールドのコードとが任意に組み合
わされて記述される。即ち、32ビットのDSP命令
は、マイクロコンピュータ1の内部又は外部から演算対
象とされるオペランドをフェッチし、それをDSPエン
ジン3の内部で演算する処理を規定する。上述の説明か
ら明らかなように、オペランドフェッチのためのアドレ
ス演算やデータパスの選択はCPU2によって行われ
る。32ビットDSP命令においてオペランドフェッチ
を規定するAフィールドのコードは16ビットのDSP
命令と同じである。16ビットDSP命令は、DSPエ
ンジン3内部のレジスタに対する初期設定などに利用さ
れる。
The actual 32-bit DSP instruction is described by arbitrarily combining the B field code and the A field code. That is, the 32-bit DSP instruction defines a process of fetching an operand to be operated from inside or outside the microcomputer 1 and operating it in the DSP engine 3. As is clear from the above description, the CPU 2 performs the address calculation and the data path selection for the operand fetch. In the 32-bit DSP instruction, the A field code that defines the operand fetch is a 16-bit DSP
Same as the command. The 16-bit DSP instruction is used for initialization of registers inside the DSP engine 3.

【0069】図17等に示される構成を参照しても明ら
かなように、32ビットDSP命令のAフィールドのコ
ードデータは命令レジスタ25における上位領域UIR
にセットされる。また、Aフィールドと同一のフォーマ
ットを有する16ビットDSP命令も上位領域UIRに
セットされる。したがって、その何れにおいても、CP
Uコア2は、必要なアドレス演算及びデータフェッチ
(若しくはオペランドフェッチ)に必要なデータパスの
選択を同様に行えばよい。換言すれば、32ビットDS
P命令を実行するためのデータフェッチ(若しくはオペ
ランドフェッチ)と16ビットDSP命令を実行するた
めのデータフェッチ(若しくはオペランドフェッチ)と
に必要とされるデコード回路240、241が共通化さ
れ、この点においても、マイクロコンピュータ1の論理
規模の縮小に寄与する。32ビットDSP命令のAフィ
ールドが指定するDSPエンジン3の内部レジスタの指
定情報や16ビットDSP命令が指定するDSPエンジ
ン3の内部レジスタの指定情報は、前記DSPデコード
信号244としてDSPエンジン3に与えられる。DS
Pデコード信号244を有意とするか否かは、前記第1
のデコード回路240が上位領域UIRの最上位側の4
ビットをデコードして決定する。
As is apparent from the configuration shown in FIG. 17 and the like, the code data of the A field of the 32-bit DSP instruction is the upper area UIR in the instruction register 25.
Is set to. A 16-bit DSP instruction having the same format as the A field is also set in the upper area UIR. Therefore, in any of them, CP
The U core 2 may similarly perform the necessary address calculation and the selection of the data path necessary for the data fetch (or operand fetch). In other words, 32-bit DS
Decoding circuits 240 and 241 required for data fetch (or operand fetch) for executing the P instruction and data fetch (or operand fetch) for executing the 16-bit DSP instruction are made common, and in this respect, Also contributes to the reduction of the logical scale of the microcomputer 1. The designation information of the internal register of the DSP engine 3 designated by the A field of the 32-bit DSP instruction and the designation information of the internal register of the DSP engine 3 designated by the 16-bit DSP instruction are given to the DSP engine 3 as the DSP decode signal 244. . DS
Whether or not the P decode signal 244 is significant is determined by the first
The decoding circuit 240 of 4 is located on the uppermost side of the upper area UIR.
Determine the bit by decoding it.

【0070】次に、本実施例のマイクロコンピュータに
おける演算制御の内容を図7乃至図16の命令実行タイ
ミングチャートを参照しながら説明する。本実施例のマ
イクロコンピュータ1は、IF,ID,EX,MA,W
B/DSPステージの5段パイプライン動作を行なって
いる。IFは命令フェッチステージ、IDは命令デコー
ドステージ、EXは演算実行ステージ、MAはメモリア
クセスステージ、WB/DSPはメモリから取得したデ
ータをCPUコア2のレジスタに取り込むステージまた
はDSPエンジン3がDSP命令を実行するステージで
ある。各図においてInstruction/Data Accessは内部バ
スIAB,IDBを介するメモリアクセスを意味し、ア
クセス対象は内蔵メモリ4〜7の他にマイクロコンピュ
ータ1の外部メモリも可能にされる。X,Y Mem. Access
は内部バスXAB,XDBやYAB,YDBを介するメ
モリアクセスを意味し、アクセス対象は内蔵メモリ4〜
7に限られる。Isnt.Fetchは命令レジスタ(IR)25
への命令フェッチタイミング、Fetch.Regは命令レジス
タ(IR)25、Source Data Outはソースデータ出
力、Destination Inはディスティネーションデータの入
力タイミング、Destination Registerはディスティネー
ションレジスタ、をそれぞれ意味する。PointerReg.は
ポインターレジスタ、Address Calc.はアドレス演算、D
ata Fetchはデータフェッチ、DSP Control signal Deco
rd Timingはデコーダ34によるDSP制御信号20の
デコードタイミングを意味する。
Next, the contents of arithmetic control in the microcomputer of this embodiment will be described with reference to the instruction execution timing charts of FIGS. The microcomputer 1 of the present embodiment includes IF, ID, EX, MA, W
The 5-stage pipeline operation of the B / DSP stage is performed. IF is an instruction fetch stage, ID is an instruction decode stage, EX is an operation execution stage, MA is a memory access stage, WB / DSP is a stage for fetching data acquired from a memory into a register of the CPU core 2, or DSP engine 3 is a DSP instruction. This is the stage to execute. In each figure, Instruction / Data Access means memory access via the internal buses IAB and IDB, and the access target can be the internal memory 4 to 7 as well as the external memory of the microcomputer 1. X, Y Mem. Access
Means memory access via the internal buses XAB, XDB and YAB, YDB, and the access target is the internal memory 4 to
Limited to 7. Isnt.Fetch is the instruction register (IR) 25
Fetch.Reg means instruction register (IR) 25, Source Data Out means source data output, Destination In means destination data input timing, and Destination Register means destination register. PointerReg. Is pointer register, Address Calc. Is address operation, D
ata Fetch is data fetch, DSP Control signal Deco
rd Timing means the decoding timing of the DSP control signal 20 by the decoder 34.

【0071】図7はCPUコア2内部のALU演算命令
の実行タイムチャートを示す。ここではALU演算命令
として、ADD Rm, Rn を一例とする。
FIG. 7 shows an execution time chart of the ALU operation instruction inside the CPU core 2. Here, ADD Rm, Rn is taken as an example of the ALU operation instruction.

【0072】IFステージ直前におけるクロック信号C
lock2の立ち上がりのタイミングに同期して、実行
すべき命令(ADD Rm, Rn )が格納されている
アドレスがアドレスバスIABに出力される。Instruct
ion/Data Mem. Accessでは、IFステージでメモリア
クセス動作が行われる。具体的にはクロック信号Clo
ck1の立ち上がりからクロック信号Clock2の立
ち上りの期間でアドレスバスIABで指定されたアドレ
スのデコードが行われ、IFステージのクロック信号C
lock2の立ち上がりから次のクロック信号Cloc
k1の立ち上がりの期間で命令アクセスが行われる。そ
のためIFステージのクロック信号Clock2の立ち
上がりからデータバスIDBに命令が出力される。デー
タバスIDBに出力された命令は、IDステージのクロ
ック信号Clock1の立ち上がりのタイミングに同期
して命令レジスタ(IR)25に取り込まれる。IDス
テージでは命令レジスタ(IR)25に取り込まれたデ
ータのデコードが行なわれる。EXステージのクロック
信号Clock1の立ち上がりのタイミングに同期し
て、ソースデータが格納されているレジスタがアクセス
され、CPUコア2の内部バスA1,B1にレジスタの
値が出力される。命令ADD Rm, Rnでは、Rmと
Rnに指定したレジスタがソースレジスタとされる。R
mとRnはCPUコア2の内部の任意のレジスタ(図3
では、レジスタ209内の任意のレジスタ、A0x,A
1x,Ix,A0y,A1y,Iy、RmおよびRnと
して指定可能)を指定できる。CPUコア2の内部バス
A1,B1に出力されたデータは算術論理演算器(AL
U)213で加算演算が行われ、その結果はCPUコア
2の内部バスC1に出力される。CPUコア2の内部バ
スC1に出力された演算結果は、EXステージのクロッ
ク信号Clock2の立ち上がりのタイミングに同期し
てディステネーションレジスタ(ディステネーションレ
ジスタは、ADDRm, Rn 命令でRnに指定したレ
ジスタとされる)に格納される。このように、CPUコ
ア2の内部のALU演算命令では、IF,ID,EXの
3段のパイプラインステージで命令実行動作が完了す
る。
Clock signal C immediately before the IF stage
The address in which the instruction (ADD Rm, Rn) to be executed is stored is output to the address bus IAB in synchronization with the rising edge of lock2. Instruct
In ion / Data Mem. Access, memory access operation is performed in the IF stage. Specifically, the clock signal Clo
The address specified by the address bus IAB is decoded in the period from the rising of ck1 to the rising of the clock signal Clock2, and the clock signal C of the IF stage is clocked.
Next clock signal Cloc from the rising edge of lock2
Instruction access is performed during the rising edge of k1. Therefore, an instruction is output to the data bus IDB from the rising edge of the clock signal Clock2 of the IF stage. The instruction output to the data bus IDB is taken into the instruction register (IR) 25 in synchronization with the rising timing of the clock signal Clock1 of the ID stage. At the ID stage, the data taken into the instruction register (IR) 25 is decoded. The register in which the source data is stored is accessed in synchronization with the rising timing of the clock signal Clock1 of the EX stage, and the value of the register is output to the internal buses A1 and B1 of the CPU core 2. In the instructions ADD Rm, Rn, the registers designated by Rm and Rn are source registers. R
m and Rn are arbitrary registers inside the CPU core 2 (see FIG. 3).
Then, any register in the register 209, A0x, A
1x, Ix, A0y, A1y, Iy, Rm and Rn can be specified). The data output to the internal buses A1 and B1 of the CPU core 2 is the arithmetic logic unit (AL
U) 213 performs addition operation, and the result is output to the internal bus C1 of the CPU core 2. The operation result output to the internal bus C1 of the CPU core 2 is a destination register (the destination register is designated as Rn by the ADDRm, Rn instruction) in synchronization with the rising timing of the clock signal Clock2 of the EX stage. Stored). Thus, in the ALU operation instruction inside the CPU core 2, the instruction execution operation is completed in the three pipeline stages of IF, ID, and EX.

【0073】図8はメモリからCPUコア2へのデータ
読み込み動作のタイムチャートを示す。メモリからCP
Uコア2へのデータ読み込み動作命令の一例として、M
OV.L @Rm, Rnを例にとって動作説明をする。
命令フェッチ(IF)、命令デコード(ID)までの動
作は図7と同じなのでその部分の詳細な説明は省略す
る。
FIG. 8 shows a time chart of the data reading operation from the memory to the CPU core 2. From memory to CP
As an example of a data read operation instruction to the U core 2, M
The operation will be described by taking OV.L@Rm, Rn as an example.
The operations up to instruction fetch (IF) and instruction decode (ID) are the same as those in FIG. 7, and detailed description thereof will be omitted.

【0074】EXステージのクロック信号Clock1
の立ち上がりのタイミングに同期して、アドレスポイン
タとなるレジスタのデータはCPUコア2の内部バスA
1に出力される。この例では、アドレスポインタとなる
レジスタは、Rmで指定したレジスタになる。Rmに指
定できるレジスタは、CPUコア2に含まれる任意のレ
ジスタ(図3では、Reg.に含まれる任意のレジス
タ、A0x,A1x,Ix,A0y,A1y,IyがR
mとして指定可能)である。CPUコア2の内部バスA
1に出力されたデータは、アドレスバッファ205に格
納され、EXステージのクロック信号Clock2の立
ち上がりのタイミングに同期してアドレスバスIABに
出力される。一方CPUコア2の内部バスA1に出力さ
れたデータは算術論理演算器(ALU)213で演算が
行なわれる。この場合、算術論理演算器(ALU)21
3は0加算演算を行なう。その結果はCPUコア2の内
部バスC1に出力される。CPUコア2の内部バスC1
に出力された演算結果は、EXステージのクロック信号
Clock2の立ち上がりのタイミングに同期してポイ
ンタレジスタ(この場合、Rmで指定されレジスタ)に
格納される。Instruction/Data Mem. Accessでは、MA
ステージのクロック信号Clock1の立ち上がりから
クロック信号Clock2の立ち上りの期間で、EXス
テージのクロック信号Clock2の立ち上がりのタイ
ミングに同期して、アドレスバスIABに出力したアド
レスのデコードが行なわれ、MAステージのクロック信
号Clock2の立ち上がりから次のクロック信号Cl
ock1の立ち上がりの期間でデータアクセスを行な
う。そのためMAステージのクロック信号Clock2
の立ち上がりからデータバスIDBにデータが出力され
る。データバスIDBに出力されたデータは、WB/D
SPステージのクロック信号Clock1の立ち上がり
のタイミングに同期してCPUコア2に取り込まれ、C
PUコア2の内部バスDWにデータが出力される。WB
/DSPステージのクロック信号Clock2の立ち上
がりのタイミングに同期してCPUコア2の内部バスD
W上のデータがディステネーションレジスタに格納され
て、動作を終了する。この例では、ディステネーション
レジスタはRnに指定したレジスタになる。Rnに指定
できるレジスタは、CPUコア2に含まれる任意のレジ
スタ(図3では、Reg.内の任意のレジスタ、A0
x,A1x,Ix,A0y,A1y,IyがRnとして
指定可能)である。以上のようにメモリからCPUコア
2へのデータ読み込み動作命令では、IF,ID,E
X,MA,WB/DSPの5段のパイプラインステージ
で命令実行動作が完了する。
Clock signal Clock1 of the EX stage
The data of the register that serves as the address pointer is synchronized with the rising timing of the internal bus A of the CPU core 2.
It is output to 1. In this example, the register serving as the address pointer is the register designated by Rm. Registers that can be designated as Rm are arbitrary registers included in the CPU core 2 (in FIG. 3, arbitrary registers included in Reg., A0x, A1x, Ix, A0y, A1y, and Iy are R
It can be specified as m). Internal bus A of CPU core 2
The data output to 1 is stored in the address buffer 205 and output to the address bus IAB in synchronization with the rising timing of the clock signal Clock2 of the EX stage. On the other hand, the data output to the internal bus A1 of the CPU core 2 is operated by the arithmetic logic unit (ALU) 213. In this case, the arithmetic logic unit (ALU) 21
3 performs 0 addition operation. The result is output to the internal bus C1 of the CPU core 2. Internal bus C1 of CPU core 2
The calculation result output to is stored in the pointer register (in this case, the register designated by Rm) in synchronization with the rising timing of the clock signal Clock2 of the EX stage. In Instruction / Data Mem. Access, MA
During the period from the rising of the clock signal Clock1 of the stage to the rising of the clock signal Clock2, the address output to the address bus IAB is decoded in synchronization with the rising timing of the clock signal Clock2 of the EX stage, and the clock signal of the MA stage is clocked. From the rising edge of Clock2, the next clock signal Cl
Data access is performed during the rising edge of ock1. Therefore, the clock signal Clock2 of the MA stage
Data is output to the data bus IDB from the rising edge of. The data output to the data bus IDB is WB / D
Incorporated into the CPU core 2 in synchronization with the rising timing of the clock signal Clock1 of the SP stage, C
Data is output to the internal bus DW of the PU core 2. WB
The internal bus D of the CPU core 2 is synchronized with the rising timing of the clock signal Clock2 of the DSP stage.
The data on W is stored in the destination register and the operation ends. In this example, the destination register is the register designated by Rn. Registers that can be designated as Rn are arbitrary registers included in the CPU core 2 (in FIG. 3, arbitrary registers in Reg.
x, A1x, Ix, A0y, A1y, Iy can be designated as Rn). As described above, in the data read operation instruction from the memory to the CPU core 2, IF, ID, E
The instruction execution operation is completed in the five pipeline stages of X, MA and WB / DSP.

【0075】図9はCPUコア2からメモリへのデータ
書込み動作命令のタイムチャートを示す。CPUコア2
からメモリへのデータ書込み動作命令の一例として、M
OV.L Rm, @Rnを例にとって動作を説明する。
命令フェッチ(IF)、命令デコード(ID)の動作は
図8と同じなので、その部分の詳細な説明は省略する。
FIG. 9 shows a time chart of a data write operation command from the CPU core 2 to the memory. CPU core 2
As an example of a data write operation instruction from the memory to the memory,
The operation will be described by taking OV.L Rm, @Rn as an example.
The operations of the instruction fetch (IF) and the instruction decode (ID) are the same as those in FIG. 8, and detailed description thereof will be omitted.

【0076】EXステージのクロック信号Clock1
の立ち上がりのタイミングに同期して、アドレスポイン
タとなるレジスタのデータがCPUコア2の内部バスA
1に出力される。この例では、アドレスポインタとなる
レジスタは、Rnで指定したレジスタになる。Rnに指
定できるレジスタは、CPUコア2に含まれる任意のレ
ジスタ(図3では、Reg.内の任意のレジスタ,A0
x,A1x,Ix,A0y,A1y,IyがRnとして
指定可能)である。CPUコア2の内部バスA1に出力
されたデータは、アドレスバッファ205に格納され、
EXステージのクロック信号Clock2の立ち上がり
のタイミングに同期してアドレスバスIABに出力され
る。一方CPUコア2の内部バスA1に出力されたデー
タは算術論理演算器(ALU)213で演算が行われ
る。この場合、算術論理演算器(ALU)213は0加
算演算を行なう。その演算結果はCPUコア2の内部バ
スC1に出力される。CPUコア2の内部バスC1に出
力された演算結果は、EXステージのクロック信号Cl
ock2の立ち上がりのタイミングに同期してポインタ
レジスタ(この場合、Rnで指定したレジスタ)に格納
される。命令 MOV.L Rm, @Rnの場合、EXス
テージでアドレス演算を行なうと同時に、メモリへ書き
込むべきデータをデータバスIDBに出力する準備が行
われる。EXステージのクロック信号Clock1の立
ち上がりのタイミングに同期して、メモリへ書き込むべ
きデータが格納されているレジスタよりCPUコア2の
内部バスDRへ値が出力される。この例の場合、メモリ
へ書き込むべきデータが格納されているレジスタは、R
mで指定したレジスタになる。Rmに指定できるレジス
タは、CPUコア2に含まれる任意のレジスタ(図3で
は、Reg.内の任意のレジスタ,A0x,A1x,I
x,A0y,A1y,IyがRmとして指定可能)であ
る。CPUコア2の内部バスDRへ出力された値は、M
Aステージのクロック信号Clock2の立ち上がりの
タイミングに同期してデータバスIDBに出力される。
Instruction/Data Mem. Accessでは、MAステージのク
ロック信号Clock1の立ち上がりからクロック信号
Clock2の立ち上りの期間で、EXステージのクロ
ック信号Clock2の立ち上がりのタイミングに同期
してアドレスバスIABに出力されたアドレスのデコー
ドが行なわれ、MAステージのクロック信号Clock
2の立ち上がりのタイミングに同期してデータバスID
Bに出力されたデータが書込まれて、動作を終了する。
メモリからCPUコア2へのデータ書込み動作命令で
は、CPUコア2としてはデータバスIDBにデータを
出力した時点で動作が終了するので、IF,ID,E
X,MAの4段のパイプラインステージで動作が完了す
る。
Clock signal Clock1 of the EX stage
The data of the register that serves as the address pointer is synchronized with the rising timing of the internal bus A of the CPU core 2.
It is output to 1. In this example, the register serving as the address pointer is the register designated by Rn. Registers that can be designated as Rn are arbitrary registers included in the CPU core 2 (in FIG. 3, arbitrary registers in Reg.
x, A1x, Ix, A0y, A1y, Iy can be designated as Rn). The data output to the internal bus A1 of the CPU core 2 is stored in the address buffer 205,
The signal is output to the address bus IAB in synchronization with the rising timing of the clock signal Clock2 of the EX stage. On the other hand, the data output to the internal bus A1 of the CPU core 2 is operated by the arithmetic logic unit (ALU) 213. In this case, the arithmetic logic unit (ALU) 213 performs 0 addition operation. The calculation result is output to the internal bus C1 of the CPU core 2. The operation result output to the internal bus C1 of the CPU core 2 is the clock signal Cl of the EX stage.
The data is stored in the pointer register (in this case, the register designated by Rn) in synchronization with the rising timing of ock2. In the case of the instruction MOV.L Rm, @Rn, an address operation is performed in the EX stage, and at the same time, the data to be written in the memory is prepared to be output to the data bus IDB. In synchronization with the rising timing of the clock signal Clock1 of the EX stage, a value is output to the internal bus DR of the CPU core 2 from the register that stores the data to be written in the memory. In this example, the register that stores the data to be written to the memory is R
It becomes the register specified by m. Registers that can be designated as Rm are arbitrary registers included in the CPU core 2 (in FIG. 3, arbitrary registers in Reg., A0x, A1x, I
x, A0y, A1y, Iy can be designated as Rm). The value output to the internal bus DR of the CPU core 2 is M
It is output to the data bus IDB in synchronization with the rising timing of the clock signal Clock2 of the A stage.
In the Instruction / Data Mem. Access, the address output to the address bus IAB is decoded in synchronization with the rising timing of the clock signal Clock2 of the EX stage during the rising period of the clock signal Clock1 of the MA stage to the rising edge of the clock signal Clock2. And the clock signal Clock of the MA stage is clocked.
Data bus ID in synchronization with the rising edge of 2
The data output to B is written, and the operation ends.
In the data write operation command from the memory to the CPU core 2, the operation ends as the CPU core 2 outputs the data to the data bus IDB. Therefore, IF, ID, E
The operation is completed in the four pipeline stages of X and MA.

【0077】図10はDSP命令を実行するときのタイ
ムチャートを示す。DSP命令の一例として、PADD
C Sx, Sy, Dz NOPX NOPY を例に
とって動作説明を行う。この命令は、DSPエンジン3
内のレジスタに格納されているデータの加算を行ない、
DSPエンジン3とX-ROM4やX-RAM6、及びY
-ROM5やY-RAM7との間でのデータ転送は行なわ
ないという命令である。
FIG. 10 shows a time chart when the DSP instruction is executed. As an example of the DSP instruction, PADD
The operation will be described by taking C Sx, Sy, Dz NOPX NOPY as an example. This instruction is for DSP engine 3
Add the data stored in the register inside,
DSP engine 3, X-ROM 4, X-RAM 6, and Y
-The instruction is not to transfer data between the ROM 5 and the Y-RAM 7.

【0078】命令フェッチの動作は図7と同じなのでそ
の部分の詳細な説明は省略する。IDステージでは、ク
ロック信号Clock1からクロック信号Clock2
の期間でCPUコア2で取り込んだ命令コードのデコー
ドが行なわれ、IDステージのクロック信号Clock
2のタイミングで命令コードをデコードした結果がDS
P制御信号20としてDSPエンジン3に出力される。
DSPエンジン3では、CPUコア2よりDSP制御信
号20を入力すると、MAステージまでの期間で入力し
たDSP制御信号20をデコードする。WB/DSPス
テージのクロック信号Clock1の立ち上がりのタイ
ミングに同期して、ソースデータが格納されているレジ
スタがアクセスされ、DSPエンジン3の内部バスA
2,B2にレジスタの値が出力される。この例では、ソ
ースデータが格納されているレジスタは、SxおよびS
yで指定したレジスタになる。SxおよびSyに指定で
きるレジスタは、DSPエンジン3内部の任意のレジス
タ(図4では、Reg.内の任意のレジスタがSxおよ
びSyとして指定可能)である。DSPエンジン3の内
部バスA2,B2に出力されたデータは算術論理演算器
(ALU)302で演算が行なわれ、その結果はDSP
エンジン3の内部バスC2に出力される。DSPエンジ
ン3の内部バスC2に出力された演算結果は、WB/D
SPステージのクロック信号Clock2の立ち上がり
のタイミングに同期してディステネーションレジスタに
格納される。この例では、ディステネーションレジスタ
は、Dzで指定されたレジスタになる。Dzに指定でき
るレジスタは、DSPエンジン3内部の任意のレジスタ
(図4では、Reg.内の任意のレジスタ)である。以
上のようなDSP命令では、IF,ID,EX,MA,
WB/DSPの5段のパイプラインステージで動作が完
了する。
Since the instruction fetch operation is the same as that shown in FIG. 7, a detailed description of that portion will be omitted. In the ID stage, clock signal Clock1 to clock signal Clock2
During this period, the instruction code fetched by the CPU core 2 is decoded, and the clock signal Clock of the ID stage is clocked.
The result of decoding the instruction code at the timing of 2 is DS
The P control signal 20 is output to the DSP engine 3.
When the DSP control signal 20 is input from the CPU core 2, the DSP engine 3 decodes the DSP control signal 20 input during the period up to the MA stage. The register storing the source data is accessed in synchronization with the rising timing of the clock signal Clock1 of the WB / DSP stage, and the internal bus A of the DSP engine 3 is accessed.
2, the register value is output to B2. In this example, the registers storing the source data are Sx and S
It becomes the register specified by y. Registers that can be designated as Sx and Sy are arbitrary registers inside the DSP engine 3 (in FIG. 4, arbitrary registers within Reg. Can be designated as Sx and Sy). The data output to the internal buses A2 and B2 of the DSP engine 3 is operated by the arithmetic logic unit (ALU) 302, and the result is the DSP.
It is output to the internal bus C2 of the engine 3. The calculation result output to the internal bus C2 of the DSP engine 3 is WB / D.
It is stored in the destination register in synchronization with the rising timing of the clock signal Clock2 of the SP stage. In this example, the destination register is the register designated by Dz. The register that can be designated as Dz is any register inside the DSP engine 3 (in FIG. 4, any register inside Reg.). In the above DSP instruction, IF, ID, EX, MA,
The operation is completed in the five pipeline stages of WB / DSP.

【0079】図11はX,Yメモリ4〜7からDSPエ
ンジン3へのデータ読み込み動作命令のタイムチャート
を示す。X,Yメモリ4〜7からDSPエンジン3への
データ読み込み動作命令の一例として、MOVX.W
@Ax, Dx MOVY.W @Ay, Dy を例に
とってその動作を説明する。この命令は、AxおよびA
yで指定したアドレスに格納されているデータをDxお
よびDyで指定したレジスタに転送するという命令であ
る。命令フェッチ、命令デコードの動作は図10と同じ
なのでその部分の詳細な説明は省略する。
FIG. 11 shows a time chart of a data read operation command from the X, Y memories 4 to 7 to the DSP engine 3. As an example of a data read operation command from the X, Y memories 4 to 7 to the DSP engine 3, MOVX.W
The operation will be described by taking @Ax, Dx MOVY.W @Ay, Dy as an example. The instructions are Ax and A
This is an instruction to transfer the data stored at the address designated by y to the register designated by Dx and Dy. The operation of instruction fetch and instruction decode is the same as that in FIG. 10, and thus detailed description thereof will be omitted.

【0080】X,Yメモリ4〜7からDSPエンジン3
へのデータ読み込み動作命令を実行する場合、アクセス
するメモリのアドレスはCPUコア2が生成する。その
ためEXステージにおけるクロック信号Clock1の
立ち上がりのタイミングに同期して、アクセスすべきア
ドレスが格納されているレジスタがアクセスされ、CP
Uコア2の内部バスA1〜A2にレジスタの値が出力さ
れる。この例では、アクセスすべきアドレスが格納され
ているレジスタは、Ax,Ayで指定したレジスタにな
る。Axに指定できるレジスタはCPUコア2に含まれ
るレジスタA0x,A1xであり、Ayに指定できるレ
ジスタはCPUコア2に含まれるレジスタA0y,A1
yである。CPUコア2の内部バスA1〜A2に出力さ
れたデータは、メモリアドレスバッファ(MABX,M
ABY)に格納され、EXステージのクロック信号Cl
ock2の立ち上がりのタイミングに同期してアドレス
バスXAB,YABに出力される。一方CPUコア2の
内部バスA1〜A2に出力されたデータはALU21
3,PAU212でアドレス演算が行なわれる。この場
合、ALU213およびPAU212は0加算演算を行
なう。その演算結果はCPUコア2の内部バスC1及び
C2に出力される。CPUコア2の内部バスC1及びC
2に出力された演算結果は、EXステージのクロック信
号Clock2の立ち上がりのタイミングに同期してポ
インタレジスタ(この場合、AxおよびAyで指定した
レジスタ)に格納される。X,Yメモリ4〜7では、M
Aステージのクロック信号Clock1の立ち上がりか
らクロック信号Clock2の立ち上りの期間で、EX
ステージクロック信号Clock2の立ち上がりのタイ
ミングでアドレスバスXAB,YABに出力されたアド
レスのデコードが行なわれ、MAステージのクロック信
号Clock2の立ち上がりから次のクロック信号Cl
ock1の立ち上がりの期間でデータアクセスが行なわ
れる。そのためMAステージのクロック信号Clock
2の立ち上がりからデータバスXDB,YDBにデータ
が出力される。データバスXDB,YDBに出力された
データは、WB/DSPステージのクロック信号Clo
ck1の立ち上がりのタイミングに同期してDSPエン
ジン3に取り込まれ、DSPエンジン3の内部バスD
1,D2にデータが供給される。WB/DSPステージ
のクロック信号Clock2の立ち上がりのタイミング
に同期してDSPエンジン3の内部バスD1,D2上の
データがディステネーションレジスタに格納されて、動
作を終了する。この例では、ディステネーションレジス
タはDxおよびDyに指定したレジスタになる。Dxに
指定できるレジスタは、DSPエンジン3に含まれるレ
ジスタX0,X1であり、Dyに指定できるレジスタ
は、DSPエンジン3に含まれるレジスタY0,Y1で
ある。以上のようにメモリからDSPエンジン3へのデ
ータ読み込み動作命令では、IF,ID,EX,MA,
WB/DSPの5段のパイプラインステージで動作が完
了する。斯る並列的なデータ読込み動作は、相互に独立
したバスXAB,XDBとYAB,YDBとを介してC
PUコア2がX,Yメモリ4〜7をアクセスできるよう
になっているからである。
From the X, Y memories 4 to 7 to the DSP engine 3
When executing a data read operation instruction to the CPU core 2, the memory address to be accessed is generated by the CPU core 2. Therefore, the register storing the address to be accessed is accessed in synchronization with the rising timing of the clock signal Clock1 in the EX stage, and the CP
The register value is output to the internal buses A1 and A2 of the U core 2. In this example, the register storing the address to be accessed is the register designated by Ax and Ay. Registers that can be specified as Ax are registers A0x and A1x included in the CPU core 2, and registers that can be specified as Ay are registers A0y and A1 included in the CPU core 2.
It is y. The data output to the internal buses A1 and A2 of the CPU core 2 is stored in the memory address buffer (MABX, MBX).
ABY) and the clock signal Cl of the EX stage
The data is output to the address buses XAB and YAB in synchronization with the rising timing of ock2. On the other hand, the data output to the internal buses A1 and A2 of the CPU core 2 is ALU21.
3, PAU 212 performs address calculation. In this case, ALU 213 and PAU 212 perform 0 addition operation. The calculation result is output to the internal buses C1 and C2 of the CPU core 2. Internal buses C1 and C of the CPU core 2
The calculation result output to 2 is stored in the pointer register (in this case, the register designated by Ax and Ay) in synchronization with the rising timing of the clock signal Clock2 of the EX stage. In the X and Y memories 4 to 7, M
In the period from the rising of the clock signal Clock1 of the A stage to the rising of the clock signal Clock2, EX
The addresses output to the address buses XAB and YAB are decoded at the rising timing of the stage clock signal Clock2, and the next clock signal Cl is output from the rising of the clock signal Clock2 of the MA stage.
Data access is performed during the rising edge of ock1. Therefore, the clock signal Clock of the MA stage
Data is output to the data buses XDB and YDB from the rising edge of 2. The data output to the data buses XDB and YDB is the clock signal Clo of the WB / DSP stage.
The internal bus D of the DSP engine 3 is fetched by the DSP engine 3 in synchronization with the rising edge of ck1.
Data is supplied to 1 and D2. The data on the internal buses D1 and D2 of the DSP engine 3 are stored in the destination register in synchronization with the rising timing of the clock signal Clock2 of the WB / DSP stage, and the operation ends. In this example, the destination register is the register designated by Dx and Dy. Registers that can be designated as Dx are registers X0 and X1 included in the DSP engine 3, and registers that can be designated as Dy are registers Y0 and Y1 included in the DSP engine 3. As described above, in the data read operation command from the memory to the DSP engine 3, the IF, ID, EX, MA,
The operation is completed in the five pipeline stages of WB / DSP. Such parallel data read operation is performed by the C via the buses XAB, XDB and YAB, YDB which are independent of each other.
This is because the PU core 2 can access the X and Y memories 4 to 7.

【0081】図12はDSPエンジン3からX,Yメモ
リ6,7へのデータ書込み動作のタイムチャートを示
す。DSPエンジン3からX,Yメモリ6,7へのデー
タ書込み動作命令の一例として、MOVX.W Da,
@Ax MOVY.W Da, @Ay を例にとっ
てその動作を説明をする。この命令は、Daで指定した
レジスタに格納されているデータをAxおよびAyで指
定したレジスタに格納されているアドレスに転送すると
いう命令である。
FIG. 12 shows a time chart of the data writing operation from the DSP engine 3 to the X, Y memories 6 and 7. As an example of a data write operation command from the DSP engine 3 to the X, Y memories 6 and 7, MOVX.W Da,
The operation will be described by taking @Ax MOVY.W Da, @Ay as an example. This instruction is an instruction to transfer the data stored in the register designated by Da to the address stored in the register designated by Ax and Ay.

【0082】命令フェッチ、命令デコードの動作は図1
1と同じなのでその部分の詳細な説明は省略する。DS
Pエンジン3からX,Yメモリ6,7へのデータ書込み
動作命令を実行する場合、アクセスされるべきメモリア
ドレスはCPUコア2が生成する。そのためEXステー
ジにおけるクロック信号Clock1の立ち上がりのタ
イミングに同期して、アクセスすべきアドレスが格納さ
れているレジスタがアクセスされ、CPUコア2の内部
バスA1〜A2にレジスタの値が出力される。この例で
は、アクセスすべきアドレスが格納されているレジスタ
は、Ax,Ayで指定したレジスタになる。Axに指定
できるレジスタはCPUコア2に含まれるレジスタA0
x,A1xであり、Ayに指定できるレジスタはCPU
コア2に含まれるレジスタA0y,A1yである。CP
Uコア2の内部バスA1,A2に出力されたデータは、
メモリアドレスバッファ(MABX,MABY)に格納
され、EXステージのクロック信号Clock2の立ち
上がりのタイミングに同期してアドレスバスXAB,Y
ABに出力される。
Instruction fetch and instruction decode operations are shown in FIG.
Since it is the same as 1, the detailed description of that part will be omitted. DS
When executing a data write operation command from the P engine 3 to the X, Y memories 6 and 7, the memory address to be accessed is generated by the CPU core 2. Therefore, the register storing the address to be accessed is accessed in synchronization with the rising timing of the clock signal Clock1 in the EX stage, and the value of the register is output to the internal buses A1 and A2 of the CPU core 2. In this example, the register storing the address to be accessed is the register designated by Ax and Ay. The register that can be designated as Ax is the register A0 included in the CPU core 2.
x, A1x, and registers that can be specified for Ay are CPUs
The registers A0y and A1y included in the core 2. CP
The data output to the internal buses A1 and A2 of the U core 2 are
The address buses XAB, Y are stored in the memory address buffers (MABX, MABY) and are synchronized with the rising timing of the clock signal Clock2 of the EX stage.
It is output to AB.

【0083】MAステージのクロック信号Clock1
の立ち上がりのタイミングに同期して、転送されるべき
データが格納されているDSPエンジン3の内部レジス
タがアクセスされ、DSPエンジン3の内部バスD1,
D2に当該レジスタの値が出力され、それらがメモリデ
ータバッファ(MDBX,MDBY)に格納される。こ
の例の場合、転送されるべきデータが格納されているD
SPエンジン3の内部レジスタはDaで指定されたレジ
スタになる。Daで指定できるレジスタは、DSPエン
ジン3に含まれるレジスタA0及びA1である。MAス
テージのクロック信号Clock2の立ち上がりのタイ
ミングに同期して、メモリデータバッファ(MDBX,
MDBY)に格納されたデータはデータバスXDB,Y
DBに出力される。X,Yメモリ6,7では、MAステ
ージのクロック信号Clock1の立ち上がりからクロ
ック信号Clock2の立ち上りの期間で、EXステー
ジクロック信号Clock2の立ち上がりのタイミング
でアドレスバスXAB,YABに出力されたアドレスの
デコードが行なわれ、MAステージのクロック信号Cl
ock2の立ち上がりから次のクロック信号Clock
1の立ち上がりの期間でデータアクセスが行なわれる。
そのため、データバスXDB,YDBに出力されたデー
タはMAステージのクロック信号Clock2の立ち上
がりから書込まれる。以上のようにDSPエンジン3か
らX,Yメモリ6,7へのデータ書込み動作命令では、
IF,ID,EX,MAの4段のパイプラインステージ
で動作が完了する。斯る並列的なデータ書込み動作は、
相互に独立したバスXAB,XDBとTAB,YDBと
を介してCPUコア2がX,Yメモリ4,6をアクセス
できるようになっているからである。
MA stage clock signal Clock1
The internal register of the DSP engine 3 in which the data to be transferred is stored is accessed in synchronization with the rising timing of the internal bus D1 of the DSP engine 3.
The value of the register is output to D2 and stored in the memory data buffers (MDBX, MDBY). In the case of this example, D that stores the data to be transferred
The internal register of the SP engine 3 becomes the register designated by Da. Registers that can be designated by Da are the registers A0 and A1 included in the DSP engine 3. In synchronization with the rising timing of the clock signal Clock2 of the MA stage, the memory data buffer (MDBX,
The data stored in MDBY) is the data bus XDB, Y
It is output to DB. In the X, Y memories 6 and 7, the addresses output to the address buses XAB and YAB are decoded at the rising timing of the EX stage clock signal Clock2 in the period from the rising of the clock signal Clock1 of the MA stage to the rising of the clock signal Clock2. Performed, clock signal Cl of the MA stage
Next clock signal Clock from the rising edge of ock2
Data access is performed during the rising edge of 1.
Therefore, the data output to the data buses XDB and YDB are written from the rising edge of the clock signal Clock2 of the MA stage. As described above, in the data write operation command from the DSP engine 3 to the X, Y memories 6 and 7,
The operation is completed in four pipeline stages of IF, ID, EX and MA. Such parallel data writing operation is
This is because the CPU core 2 can access the X, Y memories 4 and 6 via mutually independent buses XAB and XDB and TAB and YDB.

【0084】図13はメモリからDSPエンジン3への
データ読み込み動作のタイムチャートを示す。メモリか
らDSPエンジン3へのデータ読み込み動作命令の一例
として、MOVS.L @As, Ds を例にとってそ
の動作を説明をする。この命令は、Asで指定したアド
レスに格納されているデータをDsで指定したレジスタ
に転送するという命令である。
FIG. 13 shows a time chart of the data reading operation from the memory to the DSP engine 3. As an example of a data read operation instruction from the memory to the DSP engine 3, MOVS.L @As, Ds will be described as an example of the operation. This instruction is an instruction to transfer the data stored at the address designated by As to the register designated by Ds.

【0085】基本動作は、図11に示したX,Yメモリ
4〜7からDSPエンジン3へのデータ読み込み動作と
同じである。図11と図13の違いは、図11では対象
となるメモリがX,Yメモリ4〜7なのでXバス,Yバ
スを使用するのに対し、図13では対象となるメモリは
マイクロコンピュータ1がサポートする空間に接続され
ているメモリなので、バスIAB,IDBを使用すると
いうことである。EXステージクロック信号Clock
1の立ち上がりのタイミングに同期して、アクセスすべ
きアドレスを保有しているレジスタがアクセスされ、C
PUコア2の内部バスA1にレジスタの値が出力され
る。この例では、アクセスすべきアドレスが格納されて
いるレジスタは、Asで指定したレジスタになる。As
で指定可能なレジスタはCPUコア2に含まれるRe
g.内の任意のレジスタである。CPUコア2の内部バ
スA1に出力されたデータは、アドレスバッファ205
に格納され、EXステージのクロック信号Clock2
の立ち上がりのタイミングに同期してアドレスバスIA
Bに出力される。一方CPUコア2の内部バスA1に出
力されたデータは算術論理演算器(ALU)213でア
ドレス演算が行なわれる。この場合、算術論理演算器
(ALU)213は0加算演算を行なう。その演算結果
はCPUコア2の内部バスC1に出力される。CPUコ
ア2の内部バスC1に出力された演算結果は、EXステ
ージのクロック信号Clock2の立ち上がりのタイミ
ングに同期してポインタレジスタ(この場合、Asで指
定したレジスタ)に格納される。アクセス対象となるメ
モリでは、MAステージのクロック信号Clock1の
立ち上がりからクロック信号Clock2の立ち上りの
期間で、EXステージクロック信号Clock2の立ち
上がりのタイミングでアドレスバスIABに出力された
アドレスのデコードが行なわれ、MAステージのクロッ
ク信号Clock2の立ち上がりから次のクロック信号
Clock1の立ち上がりの期間でデータアクセスが行
なわれる。そのためMAステージのクロック信号Clo
ck2の立ち上がりからデータバスIDBにデータが出
力される。データバスIDBに出力されたデータは、W
B/DSPステージのクロック信号Clock1の立ち
上がりのタイミングに同期してDSPエンジン3に取り
込まれ、当該データがDSPエンジン3の内部バスD1
に供給される。WB/DSPステージのクロック信号C
lock2の立ち上がりのタイミングに同期してDSP
エンジン3の内部バスD1上のデータがディステネーシ
ョンレジスタに格納されて、動作を終了する。この例で
は、ディステネーションレジスタはDsに指定したレジ
スタになる。Dsに指定できるレジスタは、DSPエン
ジン3内の任意のレジスタである。以上のようにメモリ
からDSPエンジン3へのデータ読み込み動作命令で
は、IF,ID,EX,MA,WB/DSPの5段のパ
イプラインステージで動作が完了する。
The basic operation is the same as the data reading operation from the X, Y memories 4 to 7 to the DSP engine 3 shown in FIG. The difference between FIG. 11 and FIG. 13 is that the target memory is the X and Y memories 4 to 7 in FIG. 11, so the X bus and the Y bus are used, whereas in FIG. 13, the target memory is supported by the microcomputer 1. It means that the buses IAB and IDB are used because the memory is connected to the space. EX stage clock signal Clock
In synchronization with the rising edge of 1, the register holding the address to be accessed is accessed, and C
The register value is output to the internal bus A1 of the PU core 2. In this example, the register storing the address to be accessed is the register specified by As. As
Registers that can be specified by Re are included in the CPU core 2.
Any register in g. The data output to the internal bus A1 of the CPU core 2 is stored in the address buffer 205.
Stored in the EX stage clock signal Clock2
Address bus IA synchronized with the rising timing of
Output to B. On the other hand, the data output to the internal bus A1 of the CPU core 2 is subjected to address calculation by an arithmetic logic unit (ALU) 213. In this case, the arithmetic logic unit (ALU) 213 performs 0 addition operation. The calculation result is output to the internal bus C1 of the CPU core 2. The calculation result output to the internal bus C1 of the CPU core 2 is stored in the pointer register (in this case, the register designated by As) in synchronization with the rising timing of the clock signal Clock2 of the EX stage. In the memory to be accessed, the address output to the address bus IAB is decoded at the rising timing of the EX stage clock signal Clock2 in the period from the rising of the clock signal Clock1 of the MA stage to the rising of the clock signal Clock2. Data access is performed in the period from the rising of the clock signal Clock2 of the stage to the rising of the next clock signal Clock1. Therefore, the clock signal Clo of the MA stage
Data is output to the data bus IDB from the rising edge of ck2. The data output to the data bus IDB is W
The data is taken into the DSP engine 3 in synchronism with the rising timing of the clock signal Clock1 of the B / DSP stage, and the relevant data is transferred to the internal bus D1 of the DSP engine 3.
Is supplied to. Clock signal C of WB / DSP stage
DSP in synchronization with the rising timing of lock2
The data on the internal bus D1 of the engine 3 is stored in the destination register, and the operation ends. In this example, the destination register is the register designated by Ds. The register that can be designated as Ds is any register in the DSP engine 3. As described above, in the data read operation instruction from the memory to the DSP engine 3, the operation is completed in the five pipeline stages of IF, ID, EX, MA, and WB / DSP.

【0086】図14はDSPエンジン3からメモリへの
データ書込み動作のタイムチャートを示す。DSPエン
ジン3からメモリへのデータ書込み動作命令の一例とし
て、MOVS.L Ds, @Asを例にとってその
動作を説明する。この命令は、Dsで指定したレジスタ
に格納されているデータをAsで指定したアドレスに転
送するという命令である。
FIG. 14 shows a time chart of the data writing operation from the DSP engine 3 to the memory. As an example of a data write operation command from the DSP engine 3 to the memory, the operation will be described by taking MOVS.LDs, @As as an example. This instruction is an instruction to transfer the data stored in the register designated by Ds to the address designated by As.

【0087】基本動作は図12に示したDSPエンジン
3からX,Yメモリへのデータ書込み動作と同じであ
る。図12と図14の違いは、図12では対象となるメ
モリがX,YメモリであるのでバスXAB,XDB、バ
スYAB,YDBを使用するのに対し、図14では対象
となるメモリがマイクロコンピュータ1がサポートする
空間に接続されているメモリなので、バスIAB,ID
Bを使用するということである。
The basic operation is the same as the data writing operation from the DSP engine 3 to the X and Y memories shown in FIG. The difference between FIG. 12 and FIG. 14 is that since the target memory is the X and Y memories in FIG. 12, the buses XAB, XDB and the buses YAB, YDB are used, whereas in FIG. 14, the target memory is a microcomputer. Since the memory is connected to the space supported by 1, the bus IAB, ID
It means that B is used.

【0088】EXステージクロック信号Clock1の
立ち上がりのタイミングに同期して、転送先のアドレス
を保有しているレジスタがアクセスされ、CPUコア2
の内部バスA1にレジスタの値が出力される。この例で
は、アクセスすべきアドレスが格納されているレジスタ
は、Asで指定したレジスタになる。Asで指定可能な
レジスタはCPUコア2に含まれるレジスタReg.内
の任意のレジスタである。CPUコア2の内部バスA1
に出力されたデータは、アドレスバッファ205に格納
され、EXステージのクロック信号Clock2の立ち
上がりのタイミングに同期してアドレスバスIABに出
力される。一方CPUコア2の内部バスA1に出力され
たデータは算術論理演算器(ALU)213でアドレス
演算が行なわれる。この場合、算術論理演算器(AL
U)213は0加算演算を行なう。その演算結果はCP
Uコア2の内部バスC1に出力される。CPUコア2の
バスC1に出力された演算結果は、EXステージのクロ
ック信号Clock2の立ち上がりのタイミングに同期
してポインタレジスタ(この場合、Asで指定したレジ
スタ)に格納される。
In synchronization with the rising timing of the EX stage clock signal Clock1, the register holding the transfer destination address is accessed, and the CPU core 2
The value of the register is output to the internal bus A1. In this example, the register storing the address to be accessed is the register specified by As. The register that can be designated by As is an arbitrary register in the register Reg. Included in the CPU core 2. Internal bus A1 of CPU core 2
The data output to the address buffer 205 is stored in the address buffer 205 and output to the address bus IAB in synchronization with the rising timing of the clock signal Clock2 of the EX stage. On the other hand, the data output to the internal bus A1 of the CPU core 2 is subjected to address calculation by an arithmetic logic unit (ALU) 213. In this case, the arithmetic logic unit (AL
U) 213 performs 0 addition operation. The calculation result is CP
It is output to the internal bus C1 of the U core 2. The calculation result output to the bus C1 of the CPU core 2 is stored in the pointer register (in this case, the register designated by As) in synchronization with the rising timing of the clock signal Clock2 of the EX stage.

【0089】MAステージのクロック信号Clock1
の立ち上がりのタイミングに同期して、転送すべきデー
タを格納しているDSPエンジン3内部のレジスタの値
がDSPエンジン3の内部バスD1に出力され、メモリ
データバッファ(MDBI)に格納される。MAステー
ジのクロック信号Clock2の立ち上がりのタイミン
グに同期して、メモリデータバッファ(MDBI)に格
納されたデータがデータバスIDBに出力される。この
例では、転送すべきデータを格納しているDSPエンジ
ン3内部のレジスタはDsに指定したレジスタになる。
Dsに指定できるレジスタは、DSPエンジン3内の任
意のレジスタである。アクセス対象となるメモリでは、
MAステージのクロック信号Clock1の立ち上がり
からクロック信号Clock2の立ち上りの期間で、E
Xステージクロック信号Clock2の立ち上がりのタ
イミングでアドレスバスIABに出力したアドレスのデ
コードが行なわれ、MAステージのクロック信号Clo
ck2の立ち上がりから次のクロック信号Clock1
の立ち上がりの期間でデータアクセスが行なわれる。そ
のためMAステージのクロック信号Clock2の立ち
上がりタイミングで、DSPエンジン3より出力された
データがメモリに書込まれる。以上のようにDSPエン
ジン3から外部メモリへのデータ書込み動作命令では、
IF,ID,EX,MAの4段のパイプラインステージ
で動作が完了する。
MA stage clock signal Clock1
The value of the register inside the DSP engine 3 which stores the data to be transferred is output to the internal bus D1 of the DSP engine 3 and stored in the memory data buffer (MDBI) in synchronization with the rising timing of the. The data stored in the memory data buffer (MDBI) is output to the data bus IDB in synchronization with the rising timing of the clock signal Clock2 of the MA stage. In this example, the register inside the DSP engine 3 which stores the data to be transferred is the register designated as Ds.
The register that can be designated as Ds is any register in the DSP engine 3. In the memory to be accessed,
In the period from the rising of the clock signal Clock1 of the MA stage to the rising of the clock signal Clock2, E
The address output to the address bus IAB is decoded at the rising timing of the X stage clock signal Clock2, and the clock signal Clo of the MA stage is clocked.
Next clock signal Clock1 from the rising edge of ck2
Data access is performed during the rising edge of. Therefore, the data output from the DSP engine 3 is written in the memory at the rising timing of the clock signal Clock2 of the MA stage. As described above, in the data write operation command from the DSP engine 3 to the external memory,
The operation is completed in four pipeline stages of IF, ID, EX and MA.

【0090】次に、DSP演算命令の一例として、PA
DD Sx, Sy, Du PMUL Se, Sf, D
g MOVX.W @Ax, Dx MOVY.W @
Ay, Dy を例にとり、図15を用いてその動作説明
をする。この命令は、DSPエンジン3内のレジスタに
格納されているデータの加算、乗算を行ない、X-RO
M4やX-RAM6及びY-ROM5やY-RAM7から
DSPエンジン3へのデータ転送を行なうという命令で
あり、図10と図11の動作を合わせた動作である。命
令フェッチ、命令デコードの動作は図10と同じなので
その部分の詳細な説明は省略する。
Next, as an example of the DSP operation instruction, PA
DD Sx, Sy, Du PMUL Se, Sf, D
g MOVX.W @Ax, Dx MOVY.W @
Taking Ay and Dy as an example, the operation will be described with reference to FIG. This instruction adds and multiplies the data stored in the register in the DSP engine 3, and X-RO
This is an instruction to transfer data from the M4, the X-RAM 6, the Y-ROM 5, and the Y-RAM 7 to the DSP engine 3, and is an operation that combines the operations of FIG. 10 and FIG. The operation of instruction fetch and instruction decode is the same as that in FIG. 10, and thus detailed description thereof will be omitted.

【0091】X,YメモリからDSPエンジン3へのデ
ータ読み込み動作命令を実行する場合、アクセスすべき
メモリのアドレスはCPUコア2が生成する。そのため
EXステージにおけるクロック信号Clock1の立ち
上がりのタイミングに同期して、アクセスすべきアドレ
スを保有するレジスタがアクセスされ、CPUコア2の
内部バスA1,A2にレジスタの値が出力される。この
例では、アクセスすべきアドレスが格納されているレジ
スタは、Ax,Ayで指定したレジスタになる。Axに
指定できるレジスタはCPUコア2に含まれるレジスタ
A0x,A1xであり,Ayに指定できるレジスタはC
PUコア2に含まれるレジスタA0y,A1yである。
CPUコア2の内部バスA1,A2に出力されたデータ
は、メモリアドレスバッファ(MABX,MABY)に
格納され、EXステージのクロック信号Clock2の
立ち上がりのタイミングに同期してアドレスバスXA
B,YABに出力される。一方CPU内部バスA1,A
2に出力されたデータはALU213,PAU212で
アドレス演算が行なわれ(この場合、ALU213およ
びPAU212は0加算演算を行なう)、その結果はC
PUコア2の内部バスC1及びC2に出力される。CP
Uコア2の内部バスC1及びC2に出力された演算結果
は、EXステージのクロック信号Clock2の立ち上
がりのタイミングに同期してポインタレジスタ(この場
合、AxおよびAyで指定したレジスタ)に格納され
る。X,Yメモリでは、MAステージのクロック信号C
lock1の立ち上がりからクロック信号Clock2
の立ち上りの期間で、EXステージのクロック信号Cl
ock2の立ち上がりのタイミングでアドレスバスXA
B,YABに出力されたアドレスのデコードが行なわ
れ、MAステージのクロック信号Clock2の立ち上
がりから次のクロック信号Clock1の立ち上がりの
期間でデータアクセスが行なわれる。そのためMAステ
ージのクロック信号Clock2の立ち上がりからデー
タバスXDB,YDBにデータが出力される。データバ
スXDB,YDBに出力されたデータは、WB/DSP
ステージのクロック信号Clock1の立ち上がりのタ
イミングに同期してDSPエンジン3に取り込まれ、D
SPエンジン3の内部バスD1,D2にデータが出力さ
れる。WB/DSPステージのクロック信号Clock
2の立ち上がりのタイミングに同期してDSPエンジン
3の内部バスD1,D2上のデータがディステネーショ
ンレジスタ(Distination Reg.)に格納されて、動作を
終了する。この例では、ディステネーションレジスタは
DxおよびDyに指定したレジスタになる。Dxに指定
できるレジスタは、DSPエンジン3内のX0,X1、
Dyに指定できるレジスタは、DSPエンジン3内のY
0,Y1である。
When executing a data read operation instruction from the X and Y memories to the DSP engine 3, the CPU core 2 generates the address of the memory to be accessed. Therefore, the register holding the address to be accessed is accessed in synchronization with the rising timing of the clock signal Clock1 in the EX stage, and the value of the register is output to the internal buses A1 and A2 of the CPU core 2. In this example, the register storing the address to be accessed is the register designated by Ax and Ay. Registers that can be specified as Ax are registers A0x and A1x included in the CPU core 2, and registers that can be specified as Ay are C.
The registers A0y and A1y included in the PU core 2.
The data output to the internal buses A1 and A2 of the CPU core 2 are stored in the memory address buffers (MABX and MABY), and are synchronized with the rising timing of the clock signal Clock2 of the EX stage to synchronize with the address bus XA.
It is output to B and YAB. On the other hand, CPU internal buses A1 and A
The data output to 2 is subjected to address calculation by ALU 213 and PAU 212 (in this case, ALU 213 and PAU 212 perform 0 addition calculation), and the result is C.
It is output to the internal buses C1 and C2 of the PU core 2. CP
The calculation result output to the internal buses C1 and C2 of the U core 2 is stored in the pointer register (in this case, the register designated by Ax and Ay) in synchronization with the rising timing of the clock signal Clock2 of the EX stage. In the X and Y memories, the clock signal C of the MA stage
Clock signal Clock2 from the rising edge of clock1
Clock signal Cl of the EX stage during the rising edge of
Address bus XA at the rising edge of ock2
The addresses output to B and YAB are decoded, and data access is performed in the period from the rising of the clock signal Clock2 of the MA stage to the rising of the next clock signal Clock1. Therefore, data is output to the data buses XDB and YDB from the rising of the clock signal Clock2 of the MA stage. The data output to the data buses XDB and YDB is WB / DSP.
D is taken into the DSP engine 3 in synchronization with the rising timing of the clock signal Clock1 of the stage, and D
Data is output to the internal buses D1 and D2 of the SP engine 3. Clock signal Clock of WB / DSP stage
The data on the internal buses D1 and D2 of the DSP engine 3 are stored in the destination register (Distination Reg.) In synchronization with the rising edge of 2, and the operation ends. In this example, the destination register is the register designated by Dx and Dy. Registers that can be specified as Dx are X0, X1 in the DSP engine 3,
The register that can be specified as Dy is Y in the DSP engine 3.
0 and Y1.

【0092】上記データ転送に並行して、DSP演算動
作も同時に行なわれる。WB/DSPステージのクロッ
ク信号Clock1の立ち上がりのタイミングに同期し
て、ソースデータが格納されているレジスタがアクセス
され、DSPエンジン3の内部バスA1,A2、B1,
B2にレジスタの値が出力される。この例では、ソース
データが格納されているレジスタは、ADD(加算)動
作の場合はSxおよびSyで指定したレジスタになり、
MUL(乗算)動作の場合はSeおよびSfで指定したレ
ジスタになる。Sx,Sy,Se及びSfに指定できるレ
ジスタは、DSPエンジン3内部の任意のレジスタであ
る。DSPエンジン3の内部バスA1,B1に出力され
たデータはMAC304で乗算演算が行なわれ、その結
果はDSPエンジン3内部バスC1に出力される。DS
Pエンジン3の内部バスA2,B2に出力されたデータ
はALU302で加算演算が行なわれ、その結果はDS
Pエンジン3内部バスC2に出力される。DSPエンジ
ン3の内部バスC1およびC2に出力された演算結果
は、WB/DSPステージのクロック信号Clock2
の立ち上がりのタイミングに同期してディステネーショ
ンレジスタに格納される。この例のディステネーション
レジスタは、ADD動作の場合はDu,MUL動作の場
合はDgで指定したレジスタになる。DuおよびDgに指
定できるレジスタは、DSPエンジン3内部の任意のレ
ジスタである。
In parallel with the above data transfer, DSP arithmetic operation is also performed at the same time. The register storing the source data is accessed in synchronization with the rising timing of the clock signal Clock1 of the WB / DSP stage, and the internal buses A1, A2, B1, of the DSP engine 3 are accessed.
The value of the register is output to B2. In this example, the register storing the source data is the register designated by Sx and Sy in the case of ADD (addition) operation,
In the case of MUL (multiplication) operation, the register is designated by Se and Sf. The registers that can be designated as Sx, Sy, Se and Sf are arbitrary registers inside the DSP engine 3. The data output to the internal buses A1 and B1 of the DSP engine 3 is multiplied by the MAC 304, and the result is output to the internal bus C1 of the DSP engine 3. DS
The data output to the internal buses A2 and B2 of the P engine 3 are subjected to addition operation by the ALU 302, and the result is DS.
It is output to the P engine 3 internal bus C2. The operation result output to the internal buses C1 and C2 of the DSP engine 3 is the clock signal Clock2 of the WB / DSP stage.
It is stored in the destination register in synchronization with the rising timing of. The destination register in this example is the register designated by Du for ADD operation and Dg for MUL operation. The registers that can be designated as Du and Dg are arbitrary registers inside the DSP engine 3.

【0093】以上のように、DSPエンジン3内のレジ
スタに格納されているデータの加算、乗算を行ない、X
-ROM4やX-RAM6及びY-ROM5やY-RAM7
からDSPエンジン3へのデータ転送を行なう命令で
は、IF,ID,EX,MA,WB/DSPの5段のパ
イプラインステージで動作が完了する。
As described above, the data stored in the register in the DSP engine 3 is added and multiplied, and X
-ROM4 and X-RAM6 and Y-ROM5 and Y-RAM7
From the instruction to the data transfer to the DSP engine 3, the operation is completed in five pipeline stages of IF, ID, EX, MA and WB / DSP.

【0094】DSP演算命令の第2の例として、 Inst1: PADD A0, M0, A0 PMUL
A1, X0, A1 MOVX.W @R4, X1 MO
VY.W @R6, Y0 Inst2: ADD R8, R9 Inst3: ADD R10, R11 Inst4: ADD R12, R13 の4つの連続する命令を例にとり、図16を用いてその
動作説明をする。この4つの命令は、アドレスバスIA
B,XAB、及びYABを同時に使用することで、同一
クロックサイクルに異なる動作を実現する例である。I
nst1からInst4までの命令動作は、図7及び図
15と同じなのでその部分の詳細な説明は省略する。
As a second example of the DSP operation instruction, Inst1: PADD A0, M0, A0 PMUL
A1, X0, A1 MOVX.W @ R4, X1 MO
The operation of VY.W@R6, Y0 Inst2: ADD R8, R9 Inst3: ADD R10, R11 Inst4: ADD R12, R13 will be described with reference to FIG. These four instructions are the address bus IA
This is an example in which different operations are realized in the same clock cycle by using B, XAB, and YAB simultaneously. I
Since the instruction operation from nst1 to Inst4 is the same as that in FIGS. 7 and 15, detailed description thereof will be omitted.

【0095】始めにInst1のIFステージで、In
st1の命令フェッチが行われる。Inst1のIDス
テージ時に、Inst2ではIFステージになるため、
命令フェッチが行われる。
First, in the IF stage of Inst1,
The instruction fetch of st1 is performed. At the time of the ID stage of Inst1, it becomes the IF stage of Inst2.
Instruction fetch is performed.

【0096】Inst1のEXステージでは、X,Yメ
モリへのアクセスを行うためのアドレス演算を行ってい
るときに、Inst2ではIDステージのため命令デコ
ードを行い、Inst3ではIFステージのため命令フ
ェッチを行う。
In the EX stage of Inst1, while performing an address operation for accessing the X and Y memories, Inst2 performs instruction decoding for the ID stage and Inst3 performs instruction fetch for the IF stage. .

【0097】Inst1のMAステージでは、EXステ
ージで演算されたアドレスがアドレスバスXAB、およ
びYABに出力され(実際にアドレスを出力するタイミ
ングは、EXステージのクロック信号Clock2の立
ち上がりのタイミングからである)、データバスXDB
及びYDBよりデータが取り込まれる。このときIns
t2ではEXステージのためR8とR9のADD演算を
行って動作が完了され、Inst3はIDステージのた
め命令デコードを行う。そしてInst4はIFステー
ジのため、Inst4が格納されているアドレスをアド
レスバスIABへ出力する。実際にアドレスバスIAB
へ出力するタイミングは、Inst4のIFステージの
半サイクル前のクロック信号Clock2の立ち上がり
のタイミングからである。このタイミングは、Inst
1においてアドレスバスXAB,YABにアドレスを出
力するタイミング(EXステージの後半及びMAステー
ジの前半)と同じタイミングである。すなわちアドレス
バスXAB及びYABはデータ転送のために使用され、
アドレスバスIABでは命令フェッチのために使用され
る。マイクロコンピュータ1では、それぞれCPUコア
2に接続された内部アドレスバスIAB,XAB,YA
Bと内部データバスIDB,XDB,YDBがあるため
に、当該3種類の内部バスを使用して同一クロックサイ
クルで異なるメモリアクセス動作を実行することが可能
である。
In the MA stage of Inst1, the address calculated in the EX stage is output to the address buses XAB and YAB (the timing of actually outputting the address is from the rising timing of the clock signal Clock2 of the EX stage). , Data bus XDB
, And data is fetched from YDB. At this time Ins
At t2, because of the EX stage, the ADD operation of R8 and R9 is performed to complete the operation, and since Inst3 is the ID stage, instruction decoding is performed. Since Inst4 is the IF stage, the address in which Inst4 is stored is output to the address bus IAB. Address bus IAB
The output timing of the clock signal Clock2 is from the rising timing of the clock signal Clock2 half cycle before the IF stage of Inst4. This timing is Inst
The timing is the same as the timing of outputting an address to the address buses XAB and YAB in 1 (the latter half of the EX stage and the first half of the MA stage). That is, the address buses XAB and YAB are used for data transfer,
The address bus IAB is used for instruction fetch. In the microcomputer 1, internal address buses IAB, XAB, YA connected to the CPU core 2 respectively.
Since there are B and internal data buses IDB, XDB, and YDB, it is possible to execute different memory access operations in the same clock cycle using the three types of internal buses.

【0098】この後Inst1は、WB/DSPステー
ジにおいてDSP演算を行って動作を完了し、Inst
2はすでに動作完了、Inst3はEXステージのため
R10とR11のADD演算を行って動作完了し、In
st4ではIDステージのため命令デコードを行う。
After that, Inst1 completes the operation by performing DSP operation in the WB / DSP stage,
2 has already completed the operation, and Inst 3 has completed the operation by performing ADD calculation of R10 and R11 because it is the EX stage.
In st4, instruction decoding is performed because of the ID stage.

【0099】次のサイクルでは、Inst4のEXステ
ージのみが行われ、R12とR13のADD演算を行い
動作を完了する。
In the next cycle, only the EX stage of Inst4 is performed, the ADD operation of R12 and R13 is performed, and the operation is completed.

【0100】本実施例によれば以下の作用効果を得る。
内蔵メモリは、DSPエンジン3による積和演算を考慮
してYメモリ5,7とXメモリ4,6に2面化され、C
PUコア2がYメモリ5,7とXメモリ4,6を内部バ
スXAB,XDBと内部バスYAB,YDBによってそ
れぞれ並列的にアクセス可能にされている。これによ
り、内蔵メモリ4〜7から2個のデータを同時にDSP
エンジン3に転送可能にされる。さらに、内部バスXA
B,XDBと内部バスバスYAB,YDBは、外部にイ
ンタフェースされる内部バスIAB,IDBとも個別化
されているので、CPUコア2はXメモリ4,6とYメ
モリ5,7のアクセスに並行して外部メモリアクセスも
可能にされる。このように、それぞれCPUコア2に接
続された3種類のアドレスバスIAB,XAB,YAB
及びデータバスIDB,XDB,YDBがあるために、
当該3種類の内部バスを使用して同一クロックサイクル
で異なるメモリアクセス動作を実行することが可能であ
る。したがって、プログラムやデータが外部メモリに存
在する場合にも容易に対応して演算処理の高速化を実現
できる。
According to this embodiment, the following operational effects are obtained.
The built-in memory is divided into Y memories 5 and 7 and X memories 4 and 6 in consideration of sum of products calculation by the DSP engine 3, and C
The PU core 2 can access the Y memories 5 and 7 and the X memories 4 and 6 in parallel by the internal buses XAB and XDB and the internal buses YAB and YDB, respectively. This allows two data from the internal memories 4-7 to be simultaneously DSP
It is made transferable to the engine 3. Furthermore, internal bus XA
Since the B, XDB and the internal bus buses YAB, YDB are also individualized with the internal buses IAB, IDB which are interfaced to the outside, the CPU core 2 accesses the X memories 4, 6 and the Y memories 5, 7 in parallel. External memory access is also enabled. As described above, the three types of address buses IAB, XAB, and YAB, which are respectively connected to the CPU core 2, are provided.
And because there are data buses IDB, XDB, YDB,
It is possible to execute different memory access operations in the same clock cycle using the three types of internal buses. Therefore, even when a program or data exists in the external memory, it is possible to easily cope with the speedup of the arithmetic processing.

【0101】前記Xメモリ4,6とYメモリ5、7の夫
々をRAMとROMから構成することにより、マイクロ
コンピュータの使い勝手を更に向上させることができ
る。
By constructing each of the X memories 4 and 6 and the Y memories 5 and 7 from the RAM and the ROM, the usability of the microcomputer can be further improved.

【0102】上述のように、内蔵メモリはXメモリ4、
6とYメモリ5,7に2面化され、2面化された各メモ
リはROMとRAMを供え、RAMをデータメモリ、R
OMをプログラムメモリとすることにより、データメモ
リとプログラムメモリの分離も可能になり、DSPエン
ジン3に2個のデータを並列的に転送し、また、命令フ
ェッチ、データ転送、及び演算を並列パイプライン処理
にて能率的に行うことができる。
As described above, the built-in memory is the X memory 4,
6 and Y memories 5 and 7, each of which is provided with a ROM and a RAM.
By using the OM as the program memory, the data memory and the program memory can be separated, two pieces of data are transferred in parallel to the DSP engine 3, and instruction fetch, data transfer, and operation are performed in a parallel pipeline. It can be done efficiently by processing.

【0103】CPUコア2がモジュロアドレス出力部2
00を備えることにより、CPUコア2における積和演
算などの繰返し演算のためのアドレス生成を高速化する
ことができる。
CPU core 2 is modulo address output unit 2
By including 00, it is possible to speed up the address generation for the iterative calculation such as the product-sum calculation in the CPU core 2.

【0104】CPU命令は命令コードの最上位4ビット
が”0000”〜”1110”までの空間に命令が割り
当てられている。DSP命令は、命令コードの最上位4
ビットが”1111”に全て割り当てられている。さら
に命令コードの最上位6ビットが”111100”及
び”111101”の空間に割り当てられた命令は、D
SP命令でも16ビット長の命令コードになっている。
命令コードの最上位6ビットが”111110”の命令
は、32ビット長の命令コードになっている。命令コー
ドの最上位6ビットが”111111”の空間には命令
を割り当てておらず、未使用領域となっている。このよ
うに、最大32ビットの命令に対するコード割り当てに
上記のような規則を設けることにより、命令コードの最
上位側6ビットをデコードすれば、当該命令がCPU命
令であるか、16ビット長のDSP命令であるか、32
ビット長のDSP命令であるかを、小さな論理規模のデ
コーダで判定することができ、常に32ビット全部を一
度にデコードすることを要しない。
As for the CPU instruction, the instruction is assigned to the space in which the most significant 4 bits of the instruction code are "0000" to "1110". The DSP instruction is the highest 4 of the instruction code.
All bits are assigned to "1111". Further, the instruction in which the most significant 6 bits of the instruction code are assigned to the space of “111100” and “111101” is D
Even the SP instruction has a 16-bit length instruction code.
An instruction in which the most significant 6 bits of the instruction code is "111110" is an instruction code having a 32-bit length. No instruction is assigned to the space in which the most significant 6 bits of the instruction code are "111111", which is an unused area. In this way, by providing the above rules for code allocation for instructions of maximum 32 bits, if the most significant 6 bits of the instruction code are decoded, the instruction is a CPU instruction or a DSP of 16 bit length. Command or 32
Whether or not it is a DSP instruction having a bit length can be determined by a decoder having a small logic scale, and it is not always necessary to decode all 32 bits at once.

【0105】図17に基づいて説明したように、命令フ
ェッチタイミングの後には、まだ処理されていない命令
コードデータが命令レジスタ25にセットされ、このと
き、実行されるべき命令が、16ビットCPU命令、1
6ビットDSP命令又は32ビットDSP命令の何れで
あっても、その上位側16ビットを必ず第1のデコード
回路240に供給することができる。
As described with reference to FIG. 17, after the instruction fetch timing, the unprocessed instruction code data is set in the instruction register 25, and the instruction to be executed at this time is the 16-bit CPU instruction. 1
The upper 16 bits of either the 6-bit DSP instruction or the 32-bit DSP instruction can always be supplied to the first decoding circuit 240.

【0106】32ビットDSP命令のAフィールドのコ
ードは命令レジスタ25における上位領域UIRにセッ
トされ、Aフィールドと同一のフォーマットを有する1
6ビットDSP命令も上位領域UIRにセットされる。
したがって、その何れにおいても、CPUコア2は、必
要なアドレス演算及びデータフェッチに必要なデータパ
スの選択を同様に行うことができる。すなわち、32ビ
ットDSP命令を実行するためのデータフェッチと16
ビットDSP命令を実行するためのデータフェッチとの
ためにデコード回路240、241を共通化でき、この
点においても、マイクロコンピュータ1の論理規模を縮
小することができる。
The code of the A field of the 32-bit DSP instruction is set in the upper area UIR in the instruction register 25 and has the same format as the A field.
The 6-bit DSP instruction is also set in the upper area UIR.
Therefore, in any of them, the CPU core 2 can similarly perform the necessary address calculation and the data path selection required for the data fetch. That is, 16-bit data fetch for executing a 32-bit DSP instruction and 16
The decoding circuits 240 and 241 can be shared for data fetch for executing the bit DSP instruction, and in this respect also, the logic scale of the microcomputer 1 can be reduced.

【0107】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。例えばC
PU命令、16ビットDSP命令、32ビットDSP命
令の識別は命令の最上位6ビットを利用することに限定
されず、命令コードの数に応じて増減できる。また、命
令レジスタに対する下位16ビットを上位へシフトさせ
る機能は別の機能に置き換え可能である。また、CPU
コアやDSPエンジンに含まれるレジスタ本数や演算器
の種類は上記実施例に限定されず適宜変更可能である。
また、メモリの数を2個に限定せずに増加させることが
可能である。そしてメモリの数に合わせてメモリに接続
されるアドレスバス、データバスの本数を増加させるこ
とは可能である。例えば、X,Yメモリの他に新たにZ
メモリを設ける。それに合わせてCPUとZメモリの間
にアドレスバスZAB,DSPエンジンとZメモリの間
にデータバスZDBを接続する。このような構成にすれ
ば、積和演算時にX,YメモリからデータをDSPエン
ジンに取り込むだけでなく、現在実行中の命令以前に演
算終了しているデータをZバスを介してZメモリ回路に
同時に書き込むことが可能となる。1つの命令で演算デ
ータの取り込み、メモリへの書き込みが可能となるので
マイクロコンピュータ全体のスループットがさらに向上
する。本発明は、移動体通信機器における情報の圧縮伸
張処理やフィルタリング処理、サーボ制御、プリンタに
おける画像処理等に適用される機器組み込み制御用マイ
クロコンピュータとしての利用に最適である。
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the embodiments and various modifications can be made without departing from the scope of the invention. Yes. For example, C
Identification of the PU instruction, 16-bit DSP instruction, and 32-bit DSP instruction is not limited to using the most significant 6 bits of the instruction, and can be increased or decreased according to the number of instruction codes. Further, the function of shifting the lower 16 bits to the upper part of the instruction register can be replaced with another function. Also, CPU
The number of registers and the types of arithmetic units included in the core and the DSP engine are not limited to those in the above embodiment, and can be changed as appropriate.
Also, the number of memories can be increased without being limited to two. The number of address buses and data buses connected to the memories can be increased according to the number of memories. For example, in addition to the X and Y memories, a new Z
Provide memory. Accordingly, the address bus ZAB is connected between the CPU and the Z memory, and the data bus ZDB is connected between the DSP engine and the Z memory. With such a configuration, not only the data from the X and Y memories are loaded into the DSP engine at the time of multiply-accumulate operation, but also the data which has been processed before the currently executed instruction is transferred to the Z memory circuit via the Z bus. It is possible to write at the same time. Since the calculation data can be fetched and written into the memory with one instruction, the overall throughput of the microcomputer is further improved. INDUSTRIAL APPLICABILITY The present invention is most suitable for use as a device-embedded control microcomputer applied to information compression / expansion processing and filtering processing in mobile communication devices, servo control, image processing in printers, and the like.

【0108】[0108]

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

【0109】すなわち、内蔵メモリは、ディジタル信号
処理プロセッサによる積和演算を考慮して第1のメモリ
と第2のメモリに2面化され、第3のバスと第2のバス
によってそれぞれ並列的にアクセス可能にされているか
ら、セントラルプロセッシングユニットは内蔵メモリか
ら2個のデータを同時にディジタル信号処理ユニットに
転送することができる。
That is, the built-in memory is divided into a first memory and a second memory in consideration of the sum of products operation by the digital signal processor, and is parallelized by the third bus and the second bus, respectively. Being accessible, the central processing unit can simultaneously transfer two pieces of data from the internal memory to the digital signal processing unit.

【0110】さらに、第3のバスと第2のバスは、外部
にインタフェースされる第1のバスとも個別化されてい
るので、セントラルプロセッシングユニットは第2のメ
モリと第1のメモリのアクセスに並行して外部メモリア
クセスすることができる。
Further, since the third bus and the second bus are also separated from the first bus which is externally interfaced, the central processing unit is parallel to the access of the second memory and the first memory. Then, the external memory can be accessed.

【0111】このように、それぞれセントラルプロセッ
シングユニットに接続された第1乃至第3の3種類のア
ドレスバス及びデータバスがあるために、当該3種類の
内部バスを使用して同一クロックサイクルで異なるメモ
リアクセス動作を実行することができるので、プログラ
ムやデータが外部メモリに存在する場合にも容易に対応
して演算処理の高速化を実現できる。
As described above, since there are the first to third types of address buses and data buses connected to the central processing unit respectively, different memories can be used in the same clock cycle by using the three types of internal buses. Since the access operation can be executed, it is possible to easily cope with the case where the program or the data exists in the external memory and realize the high-speed operation processing.

【0112】さらに、内蔵メモリは第1のメモリと第2
のメモリに2面化され、2面化された各メモリはROM
とRAMを供え、RAMをデータメモリ、ROMをプロ
グラムメモリとすることにより、データメモリとプログ
ラムメモリの分離も可能になり、ディジタル信号処理ユ
ニットに2個のデータを並列的に転送し、また、命令フ
ェッチ、データ転送、及び演算を並列パイプライン処理
にて能率的に行うことができる。
Further, the built-in memory includes the first memory and the second memory.
Of memory, and each memory is a ROM
By providing the RAM and the RAM, and using the RAM as the data memory and the ROM as the program memory, the data memory and the program memory can be separated from each other, and two pieces of data are transferred in parallel to the digital signal processing unit. Fetch, data transfer, and operation can be efficiently performed by parallel pipeline processing.

【0113】したがって、セントラルプロセッシングユ
ニットと共にディジタル信号処理ユニットを一つのLS
Iに搭載したときにディジタル信号処理の高速化を実現
できる。
Therefore, the digital signal processing unit and the central processing unit are combined into one LS.
When mounted on I, high speed digital signal processing can be realized.

【0114】CPU命令とDSP命令が混在された命令
に対し、命令コードの一部をデコードすることによって
当該命令がCPU命令であるか、16ビット長のDSP
命令であるか、32ビット長のDSP命令であるかを識
別可能に命令コードを割り当てることにより、小さな論
理規模のデコーダで命令の種別を判定することができ、
常に32ビット全部を一度にデコードすることを要しな
い。したがって、セントラルプロセッシングユニットと
共にディジタル信号処理ユニットを一つのLSIに搭載
したとき、その物理的な規模の増大を極力抑えることが
できる。
For an instruction in which a CPU instruction and a DSP instruction are mixed, a part of the instruction code is decoded to determine whether the instruction is a CPU instruction or a 16-bit DSP.
By assigning an instruction code so that it can be identified whether it is an instruction or a 32-bit DSP instruction, the type of the instruction can be determined by a decoder of a small logical scale.
It is not always necessary to decode all 32 bits at once. Therefore, when the digital signal processing unit is mounted on one LSI together with the central processing unit, it is possible to suppress an increase in the physical scale as much as possible.

【0115】DSP命令の命令フォーマットとして、デ
ィジタル信号処理ユニットとの間でのデータ転送を当該
セントラルプロセッシングユニットに対して規定する第
1のコード領域(図18に例示される16ビットDSP
命令のビット9〜ビット0)を有する第1フォーマット
の命令と、前記第1のコード領域と同一フォーマットの
第2のコード領域(図20、図21に例示される32ビ
ットのDSP命令のAフィールド)を有すると共に、当
該第2のコード領域で規定された転送データを用いた演
算処理をディジタル信号処理ユニットに対して規定する
第3のコード領域(図20、図21に例示される32ビ
ットのDSP命令のBフィールド)を有する第2フォー
マットの命令とを採用することにより、第1及び第2フ
ォーマットの夫々の命令を実行する手段は、第1のコー
ド領域と第2のコード領域に対して共通のデコード論理
を持つデコード手段を採用でき、この点においても、マ
イクロコンピュータの論理規模を縮小することができ
る。
As the instruction format of the DSP instruction, the first code area (16-bit DSP exemplified in FIG. 18) that defines the data transfer with the digital signal processing unit to the central processing unit is executed.
An instruction of the first format having an instruction bit 9 to bit 0) and a second code area of the same format as the first code area (A field of a 32-bit DSP instruction exemplified in FIGS. 20 and 21) ), And a third code area (32-bit illustrated in FIG. 20 and FIG. 21) that specifies the arithmetic processing using the transfer data defined by the second code area to the digital signal processing unit. By adopting the second format instruction having the B field of the DSP instruction), the means for executing the respective instructions of the first and second formats is provided for the first code area and the second code area. A decoding means having a common decoding logic can be adopted, and also in this respect, the logic scale of the microcomputer can be reduced.

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

【図1】本発明の一実施例に係るマイクロコンピュータ
の全体ブロック図である。
FIG. 1 is an overall block diagram of a microcomputer according to an embodiment of the present invention.

【図2】マイクロコンピュータの一例アドレスマップで
ある。
FIG. 2 is an example address map of a microcomputer.

【図3】モジュロアドレス出力部を詳細に示したCPU
コアのブロック図である。
FIG. 3 is a CPU showing a modulo address output section in detail.
It is a block diagram of a core.

【図4】DSPエンジンの一例ブロック図である。FIG. 4 is a block diagram of an example of a DSP engine.

【図5】マイクロコンピュータの命令フォーマット及び
命令コードに関する一例説明図である。
FIG. 5 is an explanatory diagram illustrating an example of a command format and a command code of a microcomputer.

【図6】CPUコアのデコーダとDSPエンジンのデコ
ーダとの接続構成を示すブロック図である。
FIG. 6 is a block diagram showing a connection configuration of a decoder of a CPU core and a decoder of a DSP engine.

【図7】CPUコア内部でのALU演算命令の実行タイ
ムチャートである。
FIG. 7 is an execution time chart of an ALU operation instruction inside a CPU core.

【図8】メモリからCPUコアへデータを読込む命令の
実行タイムチャートである。
FIG. 8 is an execution time chart of an instruction for reading data from a memory to a CPU core.

【図9】CPUコアからメモリへデータを書込み命令の
実行タイムチャートである。
FIG. 9 is an execution time chart of an instruction to write data from the CPU core to the memory.

【図10】DSP命令を実行するときの一例タイムチャ
ートである。
FIG. 10 is an example time chart when executing a DSP instruction.

【図11】X,YメモリからDSPエンジンへデータを
読込む命令の実行タイムチャートである。
FIG. 11 is an execution time chart of an instruction for reading data from an X, Y memory to a DSP engine.

【図12】DSPエンジンからX,Yメモリへデータを
書込む命令の実行タイムチャートである。
FIG. 12 is an execution time chart of an instruction for writing data from the DSP engine to the X and Y memories.

【図13】メモリからDSPエンジンへデータを読込む
命令の実行タイムチャートである。
FIG. 13 is an execution time chart of an instruction for reading data from a memory to a DSP engine.

【図14】DSPエンジンからメモリへデータを書込む
命令の実行タイムチャートである。
FIG. 14 is an execution time chart of an instruction for writing data from the DSP engine to the memory.

【図15】DSP演算命令の一例実行タイムチャートで
ある。
FIG. 15 is an execution time chart of an example of a DSP operation instruction.

【図16】DSP演算命令を連続して実行するときの一
例タイムチャートである。
FIG. 16 is an example time chart when the DSP operation instructions are continuously executed.

【図17】図6に対応される別の実施例を示すブロック
図である。
FIG. 17 is a block diagram showing another embodiment corresponding to FIG.

【図18】マイクロコンピュータの内蔵メモリとDSP
エンジン3の内蔵レジスタとの間におけるデータ転送を
規定する16ビットDSP命令のコードを示す命令フォ
ーマット図である。
FIG. 18: Built-in memory of microcomputer and DSP
FIG. 6 is an instruction format diagram showing a code of a 16-bit DSP instruction that defines data transfer with the internal register of the engine 3.

【図19】マイクロコンピュータの外部メモリとDSP
エンジン3の内蔵レジスタとの間におけるデータ転送を
規定する16ビットDSP命令のコードを示す命令フォ
ーマット図である。
FIG. 19: External memory and DSP of microcomputer
FIG. 6 is an instruction format diagram showing a code of a 16-bit DSP instruction that defines data transfer with the internal register of the engine 3.

【図20】32ビットDSP命令のAフィールドに着目
した場合における当該フィールドのコードとそれに対応
されるにニーモニックなどを示す命令フォーマット図で
ある。
FIG. 20 is an instruction format diagram showing a code of a field of a 32-bit DSP instruction and a mnemonic corresponding to the code of the field.

【図21】32ビットDSP命令のBフィールドに着目
した場合における当該フィールドのコードとそれに対応
されるにニーモニックなどを示す命令フォーマット図で
ある。
FIG. 21 is an instruction format diagram showing a code of a field of a 32-bit DSP instruction and a mnemonic corresponding to the code of the field.

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

1 マイクロコンピュータ 2 CPUコア(セントラルプロセッシングユニット) 20 DSP制御信号 24 デコーダ 240 第1のデコード回路 241 第2のデコード回路 242 コード変換回路 243 CPUデコード信号 244 DSPデコード信号 245 コード変換制御信号 247 CPU制御信号 25 命令レジスタ 250,251 命令プリフェッチバッファ 200 モジュロアドレス出力部 206,207 メモリアドレスバッファ 212 アドレス演算器 213 算術論理演算器 214 モジュロスタートアドレスレジスタ 215 モジュロエンドアドレスレジスタ 216、226 モジュロアドレスレジスタ 3 DSPエンジン(ディジタル信号処理ユニット) 34 デコーダ 302 算術論理演算器 304 乗算器 309,310,311 メモリデータバッファ 4 X−ROM(第2のメモリ) 5 Y−ROM(第1のメモリ) 6 X−RAM(第2のメモリ) 7 Y−RAM(第1のメモリ) 12 外部メモリインタフェース 1 microcomputer 2 CPU core (Central processing unit) 20 DSP control signal 24 decoder 240 First Decoding Circuit 241 second decoding circuit 242 code conversion circuit 243 CPU decode signal 244 DSP decode signal 245 code conversion control signal 247 CPU control signal 25 instruction register 250,251 Instruction prefetch buffer 200 Modulo address output section 206,207 memory address buffer 212 Address calculator 213 Arithmetic logic operation unit 214 Modulo Start Address Register 215 Modulo End Address Register 216, 226 Modulo address register 3 DSP engine (digital signal processing unit) 34 Decoder 302 arithmetic logic unit 304 multiplier 309, 310, 311 memory data buffer 4 X-ROM (second memory) 5 Y-ROM (first memory) 6 X-RAM (second memory) 7 Y-RAM (first memory) 12 External memory interface

───────────────────────────────────────────────────── フロントページの続き (72)発明者 長谷川 博宣 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所半導体事業部内 (72)発明者 馬路 徹 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所半導体事業部内 (72)発明者 野口 孝樹 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所半導体事業部内 (72)発明者 赤尾 泰 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所半導体事業部内 (72)発明者 馬場 志朗 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所半導体事業部内 Fターム(参考) 5B013 DD03 5B033 AA14 BA01 BA03 BB03 BF00 DC08 5B062 CC06 DD10    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Hironobu Hasegawa             5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Stock             Ceremony Company Hitachi Semiconductor Division (72) Inventor Toru Maji             5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Stock             Ceremony Company Hitachi Semiconductor Division (72) Inventor Takaki Noguchi             5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Stock             Ceremony Company Hitachi Semiconductor Division (72) Inventor Yasushi Akao             5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Stock             Ceremony Company Hitachi Semiconductor Division (72) Inventor Shiro Baba             5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Stock             Ceremony Company Hitachi Semiconductor Division F-term (reference) 5B013 DD03                 5B033 AA14 BA01 BA03 BB03 BF00                       DC08                 5B062 CC06 DD10

Claims (17)

【特許請求の範囲】[Claims] 【請求項1】 CPUと、 上記CPUによりアクセス制御されるためのメモリと、 上記メモリと上記CPUとの間でデータの転送を行うた
めのデータバスと、 上記データバスに接続されるDSPとを有し、 上記CPUは、16ビット固定長のCPU命令と、上記
DSPのための16ビット又は32ビット長のDSP命
令をフェッチするための命令レジスタと、上記命令レジ
スタによりフェッチされた命令の一部のビットに基づい
て上記CPU命令か上記DSP命令かを識別し識別結果
に応じて上記CPUの動作制御を行うための第1制御信
号と上記DSPの動作制御を行うための第2制御信号と
を生成するデコーダと、を有し、 上記DSPは、上記CPUから受けた上記第2制御信号
をデコードするためのデコーダを含むことを特徴とする
マイクロコンピュータ。
1. A CPU, a memory for access control by the CPU, a data bus for transferring data between the memory and the CPU, and a DSP connected to the data bus. The CPU has a 16-bit fixed-length CPU instruction, an instruction register for fetching a 16-bit or 32-bit DSP instruction for the DSP, and a part of the instruction fetched by the instruction register. A first control signal for controlling the operation of the CPU and a second control signal for controlling the operation of the DSP according to the identification result. And a decoder for generating the decoder, wherein the DSP includes a decoder for decoding the second control signal received from the CPU. Lee Black computer.
【請求項2】 請求項1において、 上記CPU内のデコーダは、上記命令レジスタの上位6
ビットをデコードし、CPUデコード信号とDSPデコ
ード信号とを出力する第1デコード回路と、上記命令レ
ジスタの下位16ビットをコード化して得られる信号を
出力するコード変換回路を有することを特徴とするマイ
クロコンピュータ。
2. The decoder in the CPU according to claim 1, wherein the decoder in the higher order 6 of the instruction register.
A microdecoder having a first decode circuit for decoding bits and outputting a CPU decode signal and a DSP decode signal, and a code conversion circuit for outputting a signal obtained by encoding the lower 16 bits of the instruction register. Computer.
【請求項3】 請求項2において、 上記コード変換回路は、上記第1デコード回路におい
て、上記32ビット長のDSP命令を識別した時には、
上記命令レジスタの下位16ビットをコード化した信号
を出力し、それ以外の命令を識別した時には、出力が無
効であることを意味するコードを出力し、上記DSPデ
コード信号及び上記コード変換回路の出力を上記第2制
御信号とすることを特徴とするマイクロコンピュータ。
3. The code conversion circuit according to claim 2, wherein when the first decode circuit identifies the 32-bit DSP instruction,
A signal obtained by encoding the lower 16 bits of the instruction register is output, and when an instruction other than that is identified, a code indicating that the output is invalid is output, and the DSP decode signal and the output of the code conversion circuit are output. Is used as the second control signal.
【請求項4】 中央処理部と、 ディジタル信号処理部と、 上記中央処理部と上記ディジタル信号処理部に共通に接
続された内部バスとを有し、 上記中央処理部は、上記ディジタル信号処理部との間で
のデータ転送を上記中央処理部に対して規定する第1コ
ード領域を有する第1長の第1フォーマット命令と、上
記第1コード領域と同ービット長の第2コード領域を有
すると共に上記第2コード領域で規定された転送データ
を用いた演算処理を上記ディジタル信号処理装置に対し
て規定する第3コード領域を有する第1長よりも長い第
2長の第2フォーマット命令とを実行するための実行制
御手段を備えることを特徴とするマイクロコンピュー
タ。
4. A central processing unit, a digital signal processing unit, and an internal bus commonly connected to the central processing unit and the digital signal processing unit, wherein the central processing unit is the digital signal processing unit. A first format instruction of a first length having a first code area for defining data transfer between the central processing unit and a second code area having the same bit length as the first code area; Execution of a second length second format instruction longer than the first length having a third code area that defines for the digital signal processor the arithmetic processing using the transfer data defined by the second code area. A microcomputer provided with execution control means for performing the operation.
【請求項5】 請求項4において、 上記第1フォーマット命令及び上記第2フォーマット命
令のそれぞれは、第4コード領域を有し、 上記第4コード領域は、上記第1フォーマット命令及び
上記第2フォーマット命令が、上記第1フォーマットで
あるか上記第2フォーマットであるかを示すことを特徴
とするマイクロコンピュータ。
5. The method according to claim 4, wherein each of the first format instruction and the second format instruction has a fourth code area, and the fourth code area has the first format instruction and the second format. A microcomputer indicating that the instruction is in the first format or the second format.
【請求項6】 請求項5において、 上記実行制御手段は、上記第1フォーマット命令及び上
記第2フォーマット命令に共通に用いられる命令レジス
タと、上記命令レジスタによりフェッチされた命令に含
まれる上記第1及び第4コード領域、又は、上記第2及
び第4コード領域をデコードするためのデコード手段
と、デコード結果に従ってアドレス演算を行いデータ転
送制御を行うための実行回路とを含むことを特徴とする
マイクロコンピュータ。
6. The execution control unit according to claim 5, wherein the execution control unit includes an instruction register commonly used for the first format instruction and the second format instruction, and the first instruction included in the instruction fetched by the instruction register. And a fourth code area, or decoding means for decoding the second and fourth code areas, and an execution circuit for performing address calculation and data transfer control according to the decoding result. Computer.
【請求項7】 請求項6において、 上記命令レジスタは、上記第1及び第4コード領域又は
上記第2及び第4コード領域の保持に共用される上位領
域と、上記第3コード領域の保持に利用される下位領域
とを有し、 上記デコード手段は、上記第4コード領域のデコード結
果に基づいて、上記命令レジスタが上記第2フォーマッ
ト命令を保持したことを示す制御信号を出力し、上記制
御信号に基づいて、上記下位領域から上記第3コード領
域内のコードデータを上記ディジタル信号処理装置に向
けて供給する手段を含むことを特徴とするマイクロコン
ピュータ。
7. The instruction register according to claim 6, wherein the instruction register holds an upper area shared by holding the first and fourth code areas or the second and fourth code areas and a third area holding the third code area. The decoding means outputs a control signal indicating that the instruction register holds the second format instruction based on the decoding result of the fourth code area, and the control section A microcomputer comprising means for supplying code data in the third code area from the lower area to the digital signal processing device based on a signal.
【請求項8】 CPUと、 上記CPUによってアクセスされるメモリと、 上記メモリとCPUに接続されたデータバスと、 上記CPUに接続可能なDSPとを有し、 上記CPUは、上記データバスに接続され、上記データ
バスを介して上記メモリから供給される命令をフェッチ
することが可能な命令レジスタと、上記命令レジスタに
接続されたデコーダとを含み、 上記命令は、上記データバスを介して供給される上記C
PUのための第1長の第1命令と、上記DSPのための
第1長又は第1長よりも長い第2長の第2命令とを含
み、 上記デコーダは、上記命令レジスタによりフェッチされ
た命令の一部の複数ビットをデコードし、上記命令レジ
スタにフェッチされた命令が上記第1命令であるか、上
記第2命令であるかを識別し、 上記デコーダは、上記第1命令として上記命令レジスタ
によりフェッチされた命令を識別する時に、上記CPU
を制御するための第1制御信号を生成し、上記第2命令
として上記命令レジスタによりフェッチされた命令を識
別する時、上記DSPを制御するための第2制御信号を
生成し、 上記DSPは、上記第2制御信号をデコードするデコー
ド部を有することを特徴とするマイクロコンピュータ。
8. A CPU, a memory accessed by the CPU, a data bus connected to the memory and the CPU, and a DSP connectable to the CPU, wherein the CPU is connected to the data bus. And an instruction register capable of fetching an instruction supplied from the memory via the data bus, and a decoder connected to the instruction register, the instruction being supplied via the data bus. C above
A first instruction of a first length for a PU and a second instruction of a first length or a second length longer than the first length for the DSP, wherein the decoder is fetched by the instruction register Decoding a part of a plurality of bits of the instruction to identify whether the instruction fetched in the instruction register is the first instruction or the second instruction, and the decoder uses the instruction as the first instruction. When identifying the instruction fetched by the register, the CPU
A second control signal for controlling the DSP when generating a first control signal for controlling the second instruction and identifying an instruction fetched by the instruction register as the second instruction. A microcomputer having a decoding unit for decoding the second control signal.
【請求項9】 請求項8において、 上記命令レジスタは、上記第1長の上位エリアと上記第
1長の下位エリアを含む第2長を有し、 上記デコーダは、上記命令レジスタの上記上位エリアで
フェッチされた命令コードをデコードし上記第1制御信
号及びデコード信号を生成するデコード回路と、コード
変換回路とを有し、 上記コード変換回路は、上記デコーダが上記命令レジス
タによりフェッチされた命令を上記第2命令として識別
する時、上記命令レジスタの上記下位エリアでフェッチ
された命令コードを圧縮することで得られた信号を出力
し、 上記デコーダが上記命令レジスタによりフェッチされた
命令を上記第2命令以外の命令として識別する時、出力
信号が無効であることを示すコードを出力し、 上記デコード信号と上記コード変換回路の出力信号は、
上記第2制御信号として利用されることを特徴とするデ
ータ処理装置。
9. The instruction register according to claim 8, wherein the instruction register has a second length including an upper area of the first length and a lower area of the first length, and the decoder is the upper area of the instruction register. And a code conversion circuit for decoding the instruction code fetched by the first control signal and the decoded signal, and the code conversion circuit is configured so that the decoder converts an instruction fetched by the instruction register. When identifying the instruction as the second instruction, a signal obtained by compressing the instruction code fetched in the lower area of the instruction register is output, and the decoder fetches the instruction fetched by the instruction register as the second instruction. When discriminating as an instruction other than an instruction, a code indicating that the output signal is invalid is output, and the decode signal and the code conversion are performed. The output signal of the road is,
A data processing device used as the second control signal.
【請求項10】 少なくとも2つの命令タイプを有した
マイクロコンピュータのデータ処理方法であって、 上記データ処理方法は、 第1命令に関する第1命令アドレスを生成する第1ステ
ップと、 上記第1命令アドレスに関した上記第1命令をフェッチ
する第2ステップと、 上記第1命令の第1部分をデコードし、上記第1命令が
DSPタイプであるかCPUタイプであるかを判別する
第3ステップと、 上記第1命令が上記CPUタイプならば、上記CPUタ
イプ制御信号を生成する第4ステップとを含むことを特
徴とするデータ処理方法。
10. A data processing method for a microcomputer having at least two instruction types, the data processing method comprising: a first step of generating a first instruction address relating to a first instruction; and the first instruction address. The second step of fetching the first instruction relating to the above, and the third step of decoding the first part of the first instruction and determining whether the first instruction is a DSP type or a CPU type; And a fourth step of generating the CPU type control signal if the first instruction is the CPU type.
【請求項11】 請求項10において、 上記第3ステップは、上記第1命令が第1サイズである
か、第2サイズであるかを判別するステップを含み、 上記第1サイズは、上記第2サイズより大きいことを特
徴とするデータ処理方法。
11. The method according to claim 10, wherein the third step includes a step of determining whether the first instruction has a first size or a second size, and the first size is the second size. A data processing method characterized by being larger than a size.
【請求項12】 請求項11において、 上記データ処理方法は、上記第1命令が上記第1サイズ
である場合において、上記第1命令の第2部分をコード
変換するステップを、更に含むことを特徴とするデータ
処理方法。
12. The data processing method according to claim 11, further comprising a step of transcoding a second portion of the first instruction when the first instruction has the first size. Data processing method.
【請求項13】 請求項11において、 上記データ処理方法は、上記第1命令が上記第2サイズ
である場合において、上記命令レジスタ内のデータを下
位側から上位側へ移動するステップを、更に含むことを
特徴とするデータ処理方法。
13. The data processing method according to claim 11, further comprising a step of moving data in the instruction register from a lower side to an upper side when the first instruction has the second size. A data processing method characterized by the above.
【請求項14】 請求項12又は13において、 上記第1サイズは、32ビットであり、 上記第2サイズは、16ビットであることを特徴とする
データ処理方法。
14. The data processing method according to claim 12 or 13, wherein the first size is 32 bits and the second size is 16 bits.
【請求項15】 請求項14において、 上記第1命令が上記DSPタイプの命令場合において、
上記第1サイズは32ビットであり、上記第2サイズは
16ビットであることを特徴とするデータ処理方法。
15. The method according to claim 14, wherein the first instruction is the DSP type instruction,
The data processing method, wherein the first size is 32 bits and the second size is 16 bits.
【請求項16】 請求項14において、 上記データ処理方法は、上記第1命令が上記DSPタイ
プの命令である場合において、DSPエンジンの動作の
ためのDSP制御信号を生成するステップを、更に含む
ことを特徴とするデータ処理方法。
16. The data processing method according to claim 14, further comprising the step of generating a DSP control signal for operating a DSP engine when the first instruction is the DSP type instruction. A data processing method characterized by.
【請求項17】 16ビット命令か32ビット命令かを
識別するデコーダを有するマイクロコンピュータ。
17. A microcomputer having a decoder for discriminating between a 16-bit instruction and a 32-bit instruction.
JP2002259483A 1995-05-02 2002-09-05 Microcomputer Expired - Lifetime JP3765782B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002259483A JP3765782B2 (en) 1995-05-02 2002-09-05 Microcomputer

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP7-132906 1995-05-02
JP13290695 1995-05-02
JP2002259483A JP3765782B2 (en) 1995-05-02 2002-09-05 Microcomputer

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP34744195A Division JP3727395B2 (en) 1995-05-02 1995-12-14 Microcomputer

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2005357306A Division JP3841820B2 (en) 1995-05-02 2005-12-12 Microcomputer

Publications (2)

Publication Number Publication Date
JP2003131873A true JP2003131873A (en) 2003-05-09
JP3765782B2 JP3765782B2 (en) 2006-04-12

Family

ID=26467370

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002259483A Expired - Lifetime JP3765782B2 (en) 1995-05-02 2002-09-05 Microcomputer

Country Status (1)

Country Link
JP (1) JP3765782B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005128937A (en) * 2003-10-27 2005-05-19 Matsushita Electric Ind Co Ltd Processor system, instruction stream optimization device, and instruction stream optimization program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005128937A (en) * 2003-10-27 2005-05-19 Matsushita Electric Ind Co Ltd Processor system, instruction stream optimization device, and instruction stream optimization program
US7624295B2 (en) 2003-10-27 2009-11-24 Panasonic Corporation Processor system, instruction sequence optimization device, and instruction sequence optimization program
JP4549652B2 (en) * 2003-10-27 2010-09-22 パナソニック株式会社 Processor system

Also Published As

Publication number Publication date
JP3765782B2 (en) 2006-04-12

Similar Documents

Publication Publication Date Title
KR100440841B1 (en) Microcomputer
KR100266337B1 (en) Data processing circuit, semiconductor integrated circuit device, microcomputer, and electronic equipment
KR100462951B1 (en) Eight-bit microcontroller having a risc architecture
KR100465388B1 (en) Eight-bit microcontroller having a risc architecture
JPH0810428B2 (en) Data processing device
US6687808B2 (en) Data processor using indirect register addressing
EP1143333B1 (en) Microprocessor for supporting reduction of program codes in size
JP3727395B2 (en) Microcomputer
US6948049B2 (en) Data processing system and control method
JP3841820B2 (en) Microcomputer
US20030009652A1 (en) Data processing system and control method
JP3765782B2 (en) Microcomputer
JP3733137B2 (en) Microcomputer
JP3760093B2 (en) Microcomputer
JP2522048B2 (en) Microprocessor and data processing device using the same
JP2696578B2 (en) Data processing device
JP2004288203A (en) Processor core and processor using the same

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051003

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051011

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051212

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060117

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060124

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090203

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100203

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110203

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110203

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160203

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160203

Year of fee payment: 10

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160203

Year of fee payment: 10

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term