Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3206960B2 - Extended central processing unit - Google Patents
[go: Go Back, main page]

JP3206960B2 - Extended central processing unit - Google Patents

Extended central processing unit

Info

Publication number
JP3206960B2
JP3206960B2 JP12354592A JP12354592A JP3206960B2 JP 3206960 B2 JP3206960 B2 JP 3206960B2 JP 12354592 A JP12354592 A JP 12354592A JP 12354592 A JP12354592 A JP 12354592A JP 3206960 B2 JP3206960 B2 JP 3206960B2
Authority
JP
Japan
Prior art keywords
register
data
processing unit
central processing
register set
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.)
Expired - Fee Related
Application number
JP12354592A
Other languages
Japanese (ja)
Other versions
JPH05265753A (en
Inventor
慎一 山浦
和彦 原
圭一 吉岡
隆 安井
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP12354592A priority Critical patent/JP3206960B2/en
Publication of JPH05265753A publication Critical patent/JPH05265753A/en
Application granted granted Critical
Publication of JP3206960B2 publication Critical patent/JP3206960B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、中央演算処理装置であ
って、基本中央演算処理装置が備わる集積回路装置内に
レジスタファイル用メモリを有する拡張中央演算処理装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a central processing unit, and more particularly to an extended central processing unit having a register file memory in an integrated circuit device provided with a basic central processing unit.

【0002】[0002]

【従来の技術】一般に中央演算処理装置(以下CPUと
称する)で、複数のソフトウェア処理(以下プログラムと
称する)が実行される場合、図14に示すように、CP
U内に備わり各プログラム単位における演算データ、ア
ドレスのポインタ等のデータを格納する汎用レジスタ1
aのデータ内容は、各プログラム毎に異なる。従って、
これら複数のプログラムを時分割して1つのCPU1を
用いて処理する際に、あるプログラムから別のプログラ
ムへとプログラムを切り換える場合には、まずCPU内
汎用レジスタ1aに現在格納されているデータをCPU
1とは別のチップに設けられる、例えばRAM(読出書
込可能メモリ)2内の所定領域へ格納(以下、このよう
な動作を退避と称する)し、続いて、次のプログラムに
必要な汎用レジスタ状態に設定するため、必要データが
記憶される上記RAM2の他の領域から必要なデータを
汎用レジスタ1aへ格納(以下、このような動作を復帰
と称する)する。通常は、上記退避、復帰動作はCPU
1が備えている命令を用いて、ソフトウェア的にRAM
2とCPU1との間で行なわれる。
2. Description of the Related Art Generally, when a plurality of software processes (hereinafter, referred to as programs) are executed by a central processing unit (hereinafter, referred to as CPU), as shown in FIG.
A general-purpose register 1 provided in the U for storing data such as operation data and address pointers in each program unit
The data content of a differs for each program. Therefore,
When a plurality of programs are time-divisionally processed and processed using one CPU 1, when a program is switched from one program to another, first, the data currently stored in the general-purpose register 1a in the CPU is transferred to the CPU.
For example, the data is stored in a predetermined area of a RAM (read / write memory) 2 provided on a chip different from the chip 1 (hereinafter, such an operation is referred to as save), and then general-purpose data necessary for the next program is stored. In order to set the register state, necessary data is stored in the general-purpose register 1a from another area of the RAM 2 in which necessary data is stored (hereinafter, such an operation is referred to as return). Normally, the above evacuation and return operations are performed by the CPU.
RAM by software using the instructions provided in
2 and the CPU 1.

【0003】例えばプログラムAからプログラムBに移
行する場合、RAM2内の領域であってプログラムAに
対応するデータを格納する領域2aに、CPU1のプロ
グラムAにおいて汎用レジスタ1aに格納されるデータ
を、CPU1に設けられるデータ入出力バスを用いて退
避し、続いてRAM2内の領域2bに格納されているプ
ログラムBのレジスタ状態を汎用レジスタ1aに復帰す
る。この際、CPU1のアーキテクチャ上で、退避、復
帰の対象となる汎用レジスタ1aの構成数が多いと退
避、復帰に要する時間(以下、レジスタ切換時間と称す
る)が増大し、CPUのプログラム処理速度が低下す
る。このレジスタ切換時間を短縮する手法として、レジ
スタ・ファイル方式が知られている。レジスタ・ファイ
ル方式とは、CPU自体には汎用レジスタを備えておら
ず、CPUが備わる同一のIC(集積回路)上にRAM
(以下、レジスタ・ファイル用RAMと称する)を配置し
て、該レジスタファイル用RAM上にCPUの汎用レジ
スタのセット(以下、レジスタセットと呼ぶ)を、1つ
以上複数を割り当てることで、CPUが備わるICとは
別個のICにて外付けされたメモリ(以下外部RAMと
記す)にアクセスする場合に比べて高速にアクセスでき
る同一IC上のレジスタ・ファイル用RAMにアクセス
することより、レジスタ切換時間を低減させる手法であ
る。尚、レジスタ・ファイル方式には、以下に示す2つ
の手法がある。
For example, when shifting from the program A to the program B, the data stored in the general-purpose register 1a in the program A of the CPU 1 is stored in the area 2a in the RAM 2 where the data corresponding to the program A is stored. Of the program B stored in the area 2b of the RAM 2 to the general-purpose register 1a. At this time, if the number of general-purpose registers 1a to be saved and restored is large in the architecture of the CPU 1, the time required for saving and restoring (hereinafter, referred to as register switching time) increases, and the program processing speed of the CPU 1 is reduced. descend. As a technique for reducing the register switching time, a register file method is known. The register file method means that the CPU itself does not have a general-purpose register, and the RAM is mounted on the same IC (integrated circuit) provided with the CPU.
(Hereinafter referred to as a register file RAM), and one or more sets of general-purpose registers (hereinafter referred to as register sets) of the CPU are allocated on the register file RAM. The register switching time can be increased by accessing the register file RAM on the same IC which can be accessed at a higher speed than when accessing an external memory (hereinafter referred to as external RAM) by an IC separate from the provided IC. This is a technique for reducing Incidentally, there are the following two methods in the register file system.

【0004】一の方式である方式1は、図15に示すよ
うに、CPU3内部に現在のプログラムで使用している
レジスタセットの先頭位置を示すポインタとなるアドレ
スポインタデータを格納するカレント・バンク・ナンバ
ー・レジスタ(以下CBNRと記す)4を備え、このCB
NR4の格納値をベースとして、プログラム中の命令で
指定されたレジスタ・ナンバーをオフセットとして加算
し、加算結果データをアドレスとして出力し、当該アド
レスが示すレジスタ・ファイル用RAM5のデータを汎
用レジスタ・データに相当するとして、アクセスする手
法である。ここでCPU3はデータ・アクセスに際し、
図16に示すように外部RAM、レジスタ・ファイル用
RAM5に共通のデータ・バス、アドレス・バスを使用
する。この手法は、CBNR4の内容を書き換えるだけ
で、複数のプログラムに対するレジスタセットの切り換
えが、可能となるため、プログラムの切り換えは高速と
なる。しかし、レジスタファイル用RAM5へのアクセ
スの度に、レジスタファイル用RAM5に対するアドレ
ス出力、およびデータのリード・ライトが必要となり、
1命令当たりの処理速度は低下する欠点がある。例えば
レジスタファイル用RAM5内のR0レジスタの格納デ
ータとR1レジスタの格納データとを加算し、上記R0
レジスタに格納する加算命令を実行するためには、表1
に示すように、6マシンサイクル必要である。尚、マシ
ンサイクルとは、CPU内動作における各ステージをい
う。
As shown in FIG. 15, a method 1 is a current bank which stores address pointer data as a pointer indicating a head position of a register set used in a current program in a CPU 3 as shown in FIG. A number register (hereinafter referred to as CBNR) 4 is provided.
On the basis of the stored value of NR4, a register number specified by an instruction in a program is added as an offset, the addition result data is output as an address, and the data of the register file RAM 5 indicated by the address is used as general-purpose register data. It is a method of accessing as equivalent to. Here, the CPU 3 performs data access,
As shown in FIG. 16, a data bus and an address bus common to the external RAM and the register file RAM 5 are used. In this method, the register set can be switched for a plurality of programs only by rewriting the contents of CBNR4, so that the program can be switched at high speed. However, each time the access to the register file RAM 5 is performed, it is necessary to output an address to the register file RAM 5 and read / write data.
There is a disadvantage that the processing speed per instruction is reduced. For example, the data stored in the R0 register and the data stored in the R1 register in the register file RAM 5 are added, and
In order to execute the addition instruction stored in the register, the table 1
As shown in the figure, six machine cycles are required. The machine cycle refers to each stage in the operation in the CPU.

【0005】[0005]

【表1】 [Table 1]

【0006】他方の方式である方式2では、図17に示
すように、方式1と同様、CPU3内部にCBNR4を
備えるが、方式1の場合と異なり、CPU3はレジスタ
ファイル用RAM5、外部RAM等に対して、それぞれ
独立したアクセス用のアドレス、データ・バス等を備え
る。これにより、演算結果の格納等のマシンサイクルを
並列処理、いわゆるパイプライン処理を行うことが可能
となり、表2に示すように上記加算命令は5マシンサイ
クルで実行可能となる。
As shown in FIG. 17, in the other system 2, a CBNR 4 is provided in the CPU 3 as in the system 1 as shown in FIG. 17, but unlike in the system 1, the CPU 3 stores the CBNR 4 in the register file RAM 5, the external RAM and the like. On the other hand, it has an independent access address, data bus and the like. As a result, it is possible to perform parallel processing, that is, so-called pipeline processing, of machine cycles such as storage of operation results. As shown in Table 2, the above-described addition instruction can be executed in five machine cycles.

【0007】[0007]

【表2】 [Table 2]

【0008】さらに、レジスタファイル用RAM5の形
態として、2つのアドレスを同時にアクセス可能なデュ
アル・ポート・RAMを採用することで、表2に示すマ
シンサイクルの2、3に相当する2つのリード・サイク
ルを並列に処理でき、又、トリプル・ポートRAMを採
用すれば、表2に示すマシンサイクル5のライト・サイ
クルも並列処理が可能となり、結果として1マシンサイ
クルで命令を実行することが可能となり、上記方式1に
比べて命令の高速実行が実現される。
Further, by adopting a dual-port RAM capable of simultaneously accessing two addresses as the form of the register file RAM 5, two read cycles corresponding to the machine cycles 2 and 3 shown in Table 2 can be achieved. Can be processed in parallel, and if a triple port RAM is employed, the write cycle of machine cycle 5 shown in Table 2 can be performed in parallel, and as a result, the instruction can be executed in one machine cycle. High-speed execution of instructions is realized as compared with the above method 1.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、上記方
式2の手法では、上記外部RAM等とレジスタファイル
用RAMとにおいてバスを独立して備える必要があり、
バス本数がデュアル・ポートRAMを採用した場合で2
倍、トリプル・ポートRAMを採用した場合には3倍と
なるようにバス本数の増大を招き、加えてデュアル・ポ
ートやトリプル・ポートのRAMは、通常のシングル・
ポートのRAMに比べて回路も複数かつ大きくなるた
め、ハードウェアが増大するという欠点を有する。本発
明は上述したような問題点を解決するためになされたも
ので、レジスタ切換時間が速いレジスタ・ファイル構成
であり、かつハードウェアの増大を抑え、かつ処理速度
を向上させた拡張CPUを提供することを目的とする。
However, in the method of the above method 2, it is necessary to provide a bus in the external RAM and the like and the register file RAM independently.
2 buses when dual port RAM is used
When a triple port RAM is used, the number of buses is increased to triple the number of buses. In addition, a dual-port or triple-port RAM requires a normal single-port RAM.
Since the number of circuits is larger and larger than that of the RAM of the port, there is a disadvantage that hardware is increased. SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and provides an extended CPU which has a register file configuration with a fast register switching time, suppresses an increase in hardware, and improves processing speed. The purpose is to do.

【0010】[0010]

【課題を解決するための手段とその作用】本発明は、少
なくとも一つのレジスタで構成される、基本CPU内レ
ジスタセットを備えた基本CPUと、上記基本CPUが
備わる集積回路装置内に備わり、上記基本CPU内レジ
スタセットの格納データ量と同じデータ量のレジスタセ
ットを複数備えた拡張レジスタセットを有するレジスタ
ファイル用メモリと、を備えたことを特徴とする。
According to the present invention, there is provided a basic CPU having a register set in the basic CPU, the basic CPU including at least one register, and an integrated circuit device having the basic CPU. A register file memory having an extended register set provided with a plurality of register sets having the same data amount as the stored data amount of the basic CPU register set.

【0011】このように構成することで、本拡張CPU
は、従来の汎用レジスタ方式のCPUと、レジスタファ
イル方式のCPUとの特徴を合わせ持つ。
With this configuration, the present extended CPU
Has the features of a conventional general-purpose register CPU and a register file CPU.

【0012】さらに本発明は、少なくとも一つのレジス
タで構成される、基本CPU内レジスタセットを備えた
基本CPUと、上記基本CPUが備わる集積回路装置内
に備わり、上記基本CPU内レジスタセットの格納デー
タ量と同じデータ量のレジスタセットを複数備えた拡張
レジスタセットを有するレジスタファイル用メモリと、
上記基本CPU内レジスタセットにデータを格納すると
きには上記レジスタファイル用メモリの上記拡張レジス
タセットにも当該データを書き込み、データを読み出す
ときには上記基本CPU内レジスタセットの格納データ
を読み出し、プログラムの変化により、上記拡張レジス
タセットを構成するレジスタセットを変更する場合には
上記基本CPU内レジスタセットから上記レジスタファ
イル用メモリの上記拡張レジスタセットへデータの退避
を行うことなく上記レジスタファイル用メモリの上記拡
張レジスタセットから上記基本CPU内レジスタセット
へデータの復帰のみを行うように動作制御を行う、上記
基本CPU内の制御手段と、を備えたことを特徴とす
る。
Further, the present invention provides a basic CPU including a register set in a basic CPU, the basic CPU including a register set in the basic CPU, and data stored in the register set in the basic CPU provided in an integrated circuit device including the basic CPU. A register file memory having an extended register set provided with a plurality of register sets having the same data amount,
When storing data in the basic CPU register set, the data is also written in the extension register set of the register file memory, and when reading data, the stored data of the basic CPU register set is read. When changing the register set constituting the extension register set, the extension register set in the register file memory can be stored without saving data from the register set in the basic CPU to the extension register set in the register file memory. And control means in the basic CPU for performing operation control so that only data is restored to the register set in the basic CPU.

【0013】このように構成することで、基本CPU内
に組み込まれたマイクロプログラム及び制御手段によ
り、基本CPU内レジスタセット及びレジスタファイル
用メモリはともに同一データを格納することになる。よ
って、基本CPU内レジスタセット内のすべての格納デ
ータの変更を要するいわゆるバンクの変更を要すると
き、基本CPU内レジスタセットの格納データを退避す
る必要がなく、新たな格納データをレジスタファイル用
メモリから基本CPU内レジスタセットへ復帰する動作
のみを行えばよい。このように基本CPU内レジスタセ
ット及びレジスタファイル用メモリは、拡張CPUにお
けるプログラム処理時間を短縮するように作用する。
With this configuration, both the register set and the register file memory in the basic CPU store the same data by the microprogram and the control means incorporated in the basic CPU. Therefore, when it is necessary to change all the stored data in the register set in the basic CPU, that is, when the bank needs to be changed, there is no need to save the stored data in the register set in the basic CPU, and new stored data is transferred from the register file memory. Only the operation of returning to the basic CPU register set needs to be performed. As described above, the register set in the basic CPU and the register file memory operate to shorten the program processing time in the extended CPU.

【0014】又、上記基本CPUに備わり、上記レジス
タファイル用メモリの拡張レジスタセットを構成する一
つのレジスタセットから上記基本CPU内レジスタセッ
トへデータの復帰を行う場合に使用され、上記拡張レジ
スタセットにおいてデータを読み出すレジスタセットの
先頭アドレスを示すアドレスポインタデータを格納する
アドレスデータ格納レジスタと、上記基本CPUと上記
レジスタファイル用メモリとを接続する内部接続専用バ
スと、上記基本CPUが備わる集積回路装置の外部に設
けられる構成素子と上記基本CPUとを接続する外部接
続専用バスと、を備え、上記制御手段は、上記拡張レジ
スタセットを構成するレジスタセットを変更するときに
は上記アドレスデータ格納レジスタのアドレスポインタ
データを書き換え、書き換えられたアドレスポインタデ
ータに基づき指定される上記レジスタファイル用メモリ
上のレジスタセットから上記基本中央演算処理装置内レ
ジスタセットへデータの復帰動作のみを行うようにする
こともできる。
Further, it is used when the data is restored from one register set constituting the extension register set of the register file memory to the register set in the basic CPU provided in the basic CPU. An address data storage register for storing address pointer data indicating a head address of a register set for reading data; an internal connection dedicated bus for connecting the basic CPU to the register file memory; and an integrated circuit device provided with the basic CPU. An external connection-dedicated bus for connecting the basic CPU to the component elements provided externally, wherein the control means changes address pointer data of the address data storage register when changing a register set constituting the extension register set. Rewrite May be from the register set on the rewritten memory for the register file address pointer is data based on the specified to perform only the return operation of the data to the basic central processing unit in the register set.

【0015】このように構成したときには、基本CPU
内に構成されるマイクロプログラム及び制御手段によ
り、基本CPU内レジスタセット内のレジスタにデータ
を格納するときには、例えばRAMにて構成されるレジ
スタファイル用メモリにも当該データが書き込まれる。
又、プログラムの進行により基本CPU内レジスタセッ
トの格納データを変更するいわゆるバンクを変更する場
合には、アドレスデータ格納レジスタに格納されるアド
レスポインタデータを変更し、当該データにて指定され
る上記レジスタファイル用メモリの領域より記憶データ
を読み出し、上記基本CPU内レジスタセットへ格納す
る。このように、基本CPU内レジスタセットへデータ
を格納する際には上記レジスタファイル用メモリにも同
一データが書き込まれているので、基本CPU内レジス
タセットの格納データを変更する場合、基本CPU内レ
ジスタセットの格納データを退避させる必要はなくデー
タの復帰のみで済む。よって、本拡張CPUは退避時間
を省略でき処理速度の向上に作用する。
With this configuration, the basic CPU
When data is stored in the registers in the register set within the basic CPU by the microprogram and the control means configured therein, the data is also written to a register file memory configured by, for example, a RAM.
When changing the so-called bank for changing the storage data of the register set in the basic CPU with the progress of the program, the address pointer data stored in the address data storage register is changed, and the register specified by the data is changed. The stored data is read from the area of the file memory and stored in the register set in the basic CPU. As described above, when storing data in the register set in the basic CPU, the same data is also written in the register file memory. There is no need to save the data stored in the set, and only the data needs to be restored. Therefore, the extended CPU can save the evacuation time, thereby improving the processing speed.

【0016】さらに、内部接続専用バス及び外部接続専
用バスは、基本CPUと上記レジスタファイル用メモリ
との情報交換及び上記基本CPUと外部構成素子との情
報交換を独立して行うことを可能とし、演算実行に際し
基本CPUが他の構成素子とアクセス中であることで演
算が中断することがないように作用し、処理速度の向上
に作用する。
Further, the dedicated bus for internal connection and the dedicated bus for external connection make it possible to independently exchange information between the basic CPU and the register file memory and exchange information between the basic CPU and external components. In executing the operation, the operation is prevented from being interrupted by the fact that the basic CPU is accessing the other constituent elements, thereby improving the processing speed.

【0017】さらに、上述したように基本CPUと上記
レジスタファイル用メモリとのアクセスは、データの書
き込み及び読み出しであり、これらは同時に行われるこ
とがないので、上記レジスタファイル用メモリはシング
ルポートタイプのもので十分である。よって、シングル
ポートメモリで構成可能であることは、バス本数の増加
を防ぎ、又、デュアルポートあるいはトリプルポートの
メモリを使用したときのように複雑な回路構成となるこ
ともなく、ハードウエアの増大を防ぐように作用する。
Further, as described above, the access between the basic CPU and the register file memory is data writing and reading, and these are not performed simultaneously. Therefore, the register file memory is a single port type memory. Things are enough. Therefore, being configurable with a single-port memory prevents an increase in the number of buses, and does not require a complicated circuit configuration as in the case of using a dual-port or triple-port memory. Acts to prevent.

【0018】さらに、本発明は、レジスタファイル用メ
モリとアクセス可能なローカルレジスタ領域と上記レジ
スタファイル用メモリとアクセス不能のグローバルレジ
スタ領域とを有するグローバル・ローカルレジスタセッ
トを備えた基本CPUと、上記基本CPUが備わる集積
回路装置内に備わり、上記ローカルレジスタセットの格
納データ量と同じデータ量のレジスタセットを複数備え
た拡張レジスタセットを有するレジスタファイル用メモ
リと、上記基本CPUに備わり、上記レジスタファイル
用メモリの拡張レジスタセットを構成する一つのレジス
タセットから上記ローカルレジスタセットへデータの復
帰を行う場合に使用され、上記拡張レジスタセットにお
いてデータを読み出すレジスタセットの先頭アドレスを
示すアドレスポインタデータを格納するアドレスデータ
格納レジスタと、上記基本CPUと上記レジスタファイ
ル用メモリとを接続する内部接続専用バスと、上記基本
CPUが備わる集積回路装置の外部に設けられる構成素
子と上記基本CPUとを接続する外部接続専用バスと、
上記グローバルレジスタ領域の格納データを使用し演算
を実行するとき上記グローバルレジスタ領域に対してデ
ータの読み書きを行い、上記ローカルレジスタ領域の格
納データを使用し演算を実行するときであって上記ロー
カルレジスタ領域に対してデータの書き込みを行うとき
には当該データを上記レジスタファイル用メモリのレジ
スタセットにも書き込み、データを読み出すときには上
記ローカルレジスタ領域の格納データを読み出し、一
方、上記拡張レジスタセットを構成するレジスタセット
を変更するときには上記アドレスデータ格納レジスタの
アドレスポインタデータを書き換え書き換えられたアド
レスポインタデータに基づき指定される上記レジスタフ
ァイル用メモリ上のレジスタセットから上記ローカルレ
ジスタ領域へデータの復帰動作のみを行うよう動作制御
を行う、上記基本CPU内の制御手段と、を備えたこと
を特徴とする。
Further, the present invention provides a basic CPU having a global / local register set having a register file memory and an accessible local register area, the register file memory and an inaccessible global register area, A register file memory provided in an integrated circuit device provided with a CPU and having an extended register set provided with a plurality of register sets having the same data amount as the stored data amount of the local register set; An address pointer indicating the start address of a register set from which data is read from the extended register set, which is used when data is restored from one register set constituting the extended register set of the memory to the local register set. An address data storage register for storing data, an internal connection dedicated bus for connecting the basic CPU and the register file memory, a component provided outside the integrated circuit device provided with the basic CPU, and the basic CPU. An external connection dedicated bus to be connected,
When performing an operation using the data stored in the global register area, reading and writing data to and from the global register area, and performing an operation using the data stored in the local register area, When writing data to the register file, the data is also written to the register set of the register file memory, and when reading data, the data stored in the local register area is read. When changing, the address pointer data of the address data storage register is rewritten. Data is transferred from the register set on the register file memory specified based on the rewritten address pointer data to the local register area. Performs operation control to perform the return operation only, characterized by comprising a control unit in the basic CPU.

【0019】基本CPU内の制御手段の制御により、基
本CPU内レジスタセットを構成する一つもしくは複数
のローカルレジスタ領域にデータを格納するときには、
例えばRAMにて構成されるレジスタファイル用メモリ
にも当該データが書き込まれる。又、プログラムの進行
により基本CPU内レジスタセットのすべての格納デー
タを変更する、いわゆるバンクを変更する場合には、ア
ドレスデータ格納レジスタに格納されるデータを変更
し、当該データにて指定されるレジスタファイル用メモ
リ上のレジスタセットより記憶データを読み出し、ロー
カルレジスタ領域へ格納する。このように、ローカルレ
ジスタ領域へデータを格納する際には上記レジスタファ
イル用メモリにも同一データが書き込まれているので、
ローカルレジスタ領域の格納データを変更する場合、ロ
ーカルレジスタ領域の格納データを退避させる必要はな
くデータの復帰のみで済む。よって、本拡張CPUは退
避時間を省略でき処理速度の向上に作用する。
Under the control of the control means in the basic CPU, when data is stored in one or a plurality of local register areas constituting a register set in the basic CPU,
For example, the data is also written in a register file memory constituted by a RAM. When changing all the stored data of the register set in the basic CPU according to the progress of the program, that is, when changing the so-called bank, the data stored in the address data storage register is changed and the register specified by the data is changed. The stored data is read from the register set on the file memory and stored in the local register area. As described above, when storing data in the local register area, the same data is also written in the register file memory.
When changing the data stored in the local register area, it is not necessary to save the data stored in the local register area, but only to restore the data. Therefore, the extended CPU can save the evacuation time, thereby improving the processing speed.

【0020】さらに、内部接続専用バス及び外部接続専
用バスは、基本CPUと上記レジスタファイル用メモリ
との情報交換及び上記基本CPUと外部構成素子との情
報交換を独立して行うことを可能とし、演算実行に際し
基本CPUが他の構成素子とアクセス中であることで演
算が中断することがないように作用し、処理速度の向上
に作用する。
Further, the dedicated bus for internal connection and the dedicated bus for external connection make it possible to independently exchange information between the basic CPU and the register file memory and exchange information between the basic CPU and external components. When executing the operation, the operation is prevented from being interrupted by the fact that the basic CPU is accessing the other constituent elements, thereby improving the processing speed.

【0021】さらに、上述したように基本CPUと上記
レジスタファイル用メモリとのアクセスは、データの書
き込み及び読み出しであり、これらは同時に行われるこ
とがないので、上記レジスタファイル用メモリはシング
ルポートタイプのもので十分である。よって、シングル
ポートメモリで構成可能であることは、バス本数の増加
を防ぎ、又、デュアルポートあるいはトリプルポートの
メモリを使用したときのように複雑な回路構成となるこ
ともなく、ハードウエアの増大を防ぐように作用する。
Further, as described above, the access between the basic CPU and the register file memory is data writing and reading, and these are not performed simultaneously. Therefore, the register file memory is a single port type memory. Things are enough. Therefore, being configurable with a single-port memory prevents an increase in the number of buses, and does not require a complicated circuit configuration as in the case of using a dual-port or triple-port memory. Acts to prevent.

【0022】又、上記の構成ではレジスタセットとして
ローカルレジスタ領域及びグローバルレジスタ領域の二
種類を設けたが、レジスタセットは一種類としレジスタ
ファイル用メモリをRAM及びROMにて構成し、以下
のように構成しても良い。本発明は、基本CPU内レジ
スタセットを備えた基本CPUと、上記基本CPUが備
わる集積回路装置内に備わり、上記基本CPU内レジス
タセットとデータの読み書きが可能な第1メモリと、各
実行プログラムにおける共通データを格納し上記基本C
PU内レジスタセットに対して読み出し動作専用の第2
メモリとを備え、上記基本CPU内レジスタセットの格
納データ量と同じデータ量を有するレジスタセットを複
数備えた拡張レジスタセットを有するレジスタファイル
用メモリと、上記基本CPUと上記レジスタファイル用
メモリとを接続する内部接続専用バスと、上記基本CP
Uが備わる集積回路装置の外部に設けられる構成素子と
上記基本CPUとを接続する外部接続専用バスと、上記
基本CPU内レジスタセットにデータを格納するときに
は当該データを上記第1メモリにも書き込み、一方上記
レジスタファイル用メモリを構成するレジスタセットを
変更する場合には上記基本CPU内レジスタセットから
上記レジスタファイル用メモリの上記第1メモリへデー
タの退避を行うことなく上記レジスタファイル用メモリ
の上記第1及び第2メモリから上記基本CPU内レジス
タセットへデータの復帰のみを行うように動作制御を行
う、上記基本CPU内の制御手段と、を備えたことを特
徴とする。
In the above configuration, two types of register sets, a local register area and a global register area, are provided. However, one type of register set is used, and a register file memory is constituted by a RAM and a ROM. You may comprise. The present invention provides a basic CPU having a register set in the basic CPU, a first memory provided in the integrated circuit device having the basic CPU and capable of reading and writing the register set in the basic CPU and data, Store the common data and use the basic C
Second register dedicated to read operation for register set in PU
A register file memory having an extended register set having a plurality of register sets having the same data amount as the stored data amount of the basic CPU register set; and connecting the basic CPU and the register file memory. Internal connection dedicated bus and the basic CP
A dedicated bus for connecting the component elements provided outside the integrated circuit device provided with U and the basic CPU, and when storing data in the register set in the basic CPU, the data is also written in the first memory; On the other hand, when changing the register set that constitutes the register file memory, the data in the register file memory is not saved to the first memory of the register file memory from the register set in the basic CPU. And control means in the basic CPU for performing operation control so as to only restore data from the first and second memories to the register set in the basic CPU.

【0023】このように構成することで、基本CPU内
レジスタセットのすべての格納データを変更する、バン
クを変更する場合、上述した、基本CPU内レジスタセ
ットを区分した場合と同様に、基本CPU内レジスタセ
ットの格納データを退避することなくレジスタファイル
用メモリの記憶データの復帰動作のみを行えばよく、処
理速度の向上に作用する。
With this configuration, when all the stored data of the register set in the basic CPU are changed or the bank is changed, similar to the case where the register set in the basic CPU is divided as described above, Only the operation of restoring the data stored in the register file memory needs to be performed without saving the data stored in the register set, thereby improving the processing speed.

【0024】さらに本発明は、一もしくは複数のレジス
タを有するレジスタセットを2組有する集合レジスタセ
ットを備えた、基本CPUと、上記基本CPUが備わる
集積回路装置内に備わり、上記集合レジスタセットの格
納データ量と同じデータ量のレジスタセットを複数備え
た拡張レジスタセットを有するレジスタファイル用メモ
リと、上記集合レジスタセットの2組のレジスタセット
と上記拡張レジスタセットとをそれぞれ別個に接続する
専用バスと、上記集合レジスタセットの各レジスタセッ
トへの格納データと同一データを上記拡張レジスタセッ
トにも書き込み上記集合レジスタセットの各レジスタセ
ットのすべての格納データを書き換えるときには上記拡
張レジスタセットより上記各専用バスを介して上記各レ
ジスタセットへそれぞれデータを転送するように、上記
専用バスに備わり上記専用バスにおけるデータ伝送のオ
ンオフ動作を行うスイッチと、上記基本CPU内の動作
制御を行う制御手段と、当該基本CPUが備わる集積回
路装置の外部に設けられる他の素子と上記基本CPUと
を接続する外部専用バスと、を備えたことを特徴とす
る。
Further, the present invention provides a basic CPU provided with an aggregate register set having two register sets each having one or a plurality of registers, and an integrated circuit device provided with the basic CPU, and stores the aggregate register set. A register file memory having an extended register set having a plurality of register sets having the same data amount, a dedicated bus for separately connecting the two register sets of the set register set and the extended register set, When the same data as the data stored in each of the register sets of the collective register set is also written in the extension register set, and when all the stored data in each of the register sets of the collective register set are rewritten, the data is transmitted from the extension register set via the dedicated bus. To the register set above A switch provided on the dedicated bus for performing on / off operation of data transmission on the dedicated bus, a control unit for controlling operation in the basic CPU, and an integrated circuit device provided with the basic CPU so as to transfer data. An external dedicated bus for connecting another element provided outside and the basic CPU is provided.

【0025】このように構成することで制御手段は、集
合レジスタセットを構成する2組のレジスタセットにデ
ータを格納するときには専用バスに備わるスイッチをオ
ン状態とし、上記2組のレジスタセットへデータを格納
するとともに、当該レジスタセットが格納するデータと
同一データを例えばRAMにて構成されるレジスタファ
イル用メモリの拡張レジスタセットにも書き込む。又、
プログラムの進行により上記レジスタセットの格納デー
タのすべてを変更する、いわゆるバンクを変更する場合
には、上記制御手段は上記スイッチをオフ状態とし、上
記レジスタファイル用メモリの拡張レジスタセットより
それぞれの記憶データを上記2組のレジスタセットへそ
れぞれ専用バスを介して転送する。このように、レジス
タセットへデータを格納する際には上記レジスタファイ
ル用メモリにも同一データが書き込まれているので、レ
ジスタセットの格納データを変更する場合、レジスタセ
ットの格納データを退避させる必要はなくデータの復帰
のみで済む。又、上記レジスタセットとレジスタファイ
ル用メモリの各拡張レジスタセットとはそれぞれの専用
バスにて接続されているので上記レジスタファイル用メ
モリから集合レジスタセットを構成する2組の各レジス
タセットへのデータの転送は一度に行うことができる。
よって、本拡張CPUは退避時間を省略でき処理速度の
向上に作用する。
With this configuration, when storing data in the two register sets constituting the collective register set, the control unit turns on a switch provided on the dedicated bus, and transfers the data to the two register sets. At the same time as storing, the same data as the data stored in the register set is also written to an extended register set of a register file memory constituted by a RAM, for example. or,
When changing all the data stored in the register set as the program proceeds, that is, when changing the so-called bank, the control means turns off the switch and sets the respective stored data from the extended register set of the register file memory. To the two register sets via dedicated buses. As described above, when data is stored in the register set, the same data is also written in the register file memory. Therefore, when changing the data stored in the register set, it is not necessary to save the data stored in the register set. And only the data needs to be restored. Further, since the register set and the extension register sets of the register file memory are connected by respective dedicated buses, data of the data from the register file memory to the two register sets forming the collective register set is transferred from the register file memory. The transfer can be done at once.
Therefore, the extended CPU can save the evacuation time, thereby improving the processing speed.

【0026】さらに、内部接続専用バス及び外部接続専
用バスは、基本CPUと上記レジスタファイル用メモリ
との情報交換及び上記基本CPUと外部構成素子との情
報交換を独立して行うことを可能とし、演算実行に際し
基本CPUが他の構成素子とアクセス中であることで演
算が中断することがないように作用し、処理速度の向上
に作用する。
Further, the internal connection dedicated bus and the external connection dedicated bus enable information exchange between the basic CPU and the register file memory and information exchange between the basic CPU and the external components to be independently performed. In executing the operation, the operation is prevented from being interrupted due to the fact that the basic CPU is accessing the other constituent elements, thereby improving the processing speed.

【0027】さらに、上述したように基本CPUと上記
レジスタファイル用メモリとのアクセスは、データの書
き込み及び読み出しであり、これらは同時に行われるこ
とがないので、上記レジスタファイル用メモリはシング
ルポートタイプのもので十分である。よって、シングル
ポートのメモリで構成可能であることは、バス本数の増
加を防ぎ、又、デュアルポートあるいはトリプルポート
のメモリを使用したときのように複雑な回路構成となる
こともなく、ハードウエアの増大を防ぐように作用す
る。
Further, as described above, the access between the basic CPU and the register file memory is data writing and reading, and these are not performed at the same time. Therefore, the register file memory is a single port type memory. Things are enough. Therefore, being able to be configured with a single-port memory prevents an increase in the number of buses, and does not have a complicated circuit configuration unlike the case of using a dual-port or triple-port memory. Acts to prevent growth.

【0028】[0028]

【実施例】【Example】

第1の実施例;本発明の拡張CPUの一実施例における
構成を図1に示す。基本的な構成としては、上述した図
17に示すCPUを含むICと同様であり、同じ構成部
分については同じ符号を付している。同一のIC内に基
本CPU7とレジスタファイル用RAM5を有し、基本
CPU7とレジスタファイル用RAM5、及び基本CP
U7と外部RAM等はそれぞれ独立した専用バス8及び
9にて接続される。又、基本CPU7は、任意の本数の
レジスタの集合体である基本CPU内の汎用レジスタセ
ット(以下、単にレジスタセットと記す。)10を内部
に1組設けており、上記レジスタファイル用RAM5は
レジスタセット10のデータを記憶する。尚、レジスタ
ファイル用RAM5には、従来どおり、上記レジスタセ
ットが複数割り当てられており、以下の説明ではレジス
タファイル用RAM5に割り当てられたレジスタセット
を総称して拡張レジスタセットと呼ぶ。又、レジスタセ
ット10内には、現在実行中のプログラムで使用されて
いるデータ群のレジスタファイル用RAM5における拡
張レジスタセットの先頭アドレスを示すアドレスポイン
タデータRpを格納するCBNR4が含まれる。尚、本
実施例においてレジスタセット10は、16本のレジス
タ,R0レジスタないしR15レジスタから構成されて
いる。又、レジスタセット10は、トリプル・ポートの
レジスタで構成され、任意の2つのレジスタに対してリ
ード動作を行うと同時に1つのレジスタに対してライト
動作を同時に実行可能である。又、基本CPU7とレジ
スタファイル用RAM5とが備わる、集積回路を以下、
拡張CPU6と呼ぶ。
First Embodiment FIG. 1 shows the configuration of an extended CPU according to an embodiment of the present invention. The basic configuration is the same as that of the IC including the CPU shown in FIG. 17 described above, and the same components are denoted by the same reference numerals. The same IC has a basic CPU 7 and a register file RAM 5, a basic CPU 7, a register file RAM 5, and a basic CP.
U7 and the external RAM are connected by independent dedicated buses 8 and 9, respectively. The basic CPU 7 has one set of a general-purpose register set (hereinafter, simply referred to as a register set) 10 in the basic CPU, which is an aggregate of an arbitrary number of registers. The data of the set 10 is stored. Note that a plurality of the register sets are assigned to the register file RAM 5 as in the past, and in the following description, the register sets assigned to the register file RAM 5 are collectively called an extended register set. Further, the register set 10 includes a CBNR 4 for storing address pointer data Rp indicating the head address of the extension register set in the register file RAM 5 of the data group used by the program currently being executed. In this embodiment, the register set 10 includes 16 registers, R0 register to R15 register. The register set 10 is composed of triple-port registers, and can perform a read operation on any two registers and a write operation on one register simultaneously. An integrated circuit including the basic CPU 7 and the register file RAM 5 is hereinafter referred to as an integrated circuit.
Called the extended CPU 6.

【0029】又、基本CPU7の処理において、レジス
タセット10に格納されているデータのリード動作は基
本CPU7内部で行なわれ、命令実行によるレジスタセ
ット10へのデータのライト動作は、レジスタセット1
0の各レジスタ及び当該レジスタに対応するレジスタフ
ァイル用RAM5の任意のアドレスの両方についてライ
ト動作を行なう。尚、上述したリード及びライト動作
は、基本CPU7内に備わるマイクロプログラム及び制
御部にて実行される。従って、レジスタセット10が格
納するデータは、レジスタファイル用RAM5における
レジスタセット10の各レジスタに対応するアドレス上
のデータとの一貫性を常に保持している。又、レジスタ
ファイル用RAM5は、後述する理由によりシングル・
ポートのRAMで十分機能を果たすことができるので、
シングルポートのRAMを採用している。
In the processing of the basic CPU 7, the operation of reading data stored in the register set 10 is performed inside the basic CPU 7, and the operation of writing data to the register set 10 by executing an instruction is performed in the register set 1.
The write operation is performed for both the register 0 and an arbitrary address in the register file RAM 5 corresponding to the register. The above-described read and write operations are executed by a microprogram and a control unit provided in the basic CPU 7. Therefore, the data stored in the register set 10 always keeps consistency with the data on the address corresponding to each register of the register set 10 in the register file RAM 5. The RAM 5 for the register file is a single RAM for the reason described later.
Since the port RAM can perform enough functions,
A single-port RAM is used.

【0030】このように構成される本拡張CPUのパイ
プライン動作について以下に説明する。例えばR5レジ
スタの格納データにR7の格納データを加算し、加算結
果データをR5レジスタに格納する命令を例に、当該命
令を命令1ないし4として4回繰り返し実行した場合の
マシンサイクルを図2に示す。図2において、横軸方向
における各区間が1マシンサイクルを示しており、例え
ば命令1の場合、1マシンサイクル目では命令のフェッ
チ及びそのデコードが行われる。2マシンサイクル目で
は、基本CPU7内のレジスタセット10がトリプルポ
ートにて構成されているので、上記R5レジスタ及びR
7レジスタの格納データのリード動作及び読み出した上
記データの加算動作が同じマシンサイクルにて実行さ
れ、3マシンサイクル目にてその加算結果データが上記
R5レジスタ及びレジスタファイル用RAM5内のR5
レジスタに対応するアドレスに格納される。このように
命令1は3マシンサイクルにて実行される。
The pipeline operation of the extended CPU configured as described above will be described below. For example, FIG. 2 shows a machine cycle in a case where the stored data of R7 is added to the stored data of the R5 register and the added result data is stored in the R5 register as an example. Show. In FIG. 2, each section in the horizontal axis direction indicates one machine cycle. For example, in the case of the instruction 1, instruction fetch and decode are performed in the first machine cycle. In the second machine cycle, since the register set 10 in the basic CPU 7 is composed of a triple port, the R5 register and R
The read operation of the data stored in the register 7 and the addition operation of the read data are executed in the same machine cycle, and the addition result data is stored in the R5 register and the R5 in the register file RAM 5 in the third machine cycle.
It is stored at the address corresponding to the register. Thus, instruction 1 is executed in three machine cycles.

【0031】命令2ないし命令4についても同様に3マ
シンサイクルにて命令が実行されるが、命令1について
1マシンサイクル目の動作が終了した時点で、基本CP
U7の命令読込部分は動作が終了し次の命令のフェッチ
が可能であり、よって2マシンサイクル目では命令2に
おける命令のフェッチ、デコード動作を実行する。この
ように、2マシンサイクル目では、命令1の演算動作
と、命令2の命令フェッチ、デコード動作とを同時に実
行することができる。
Instructions 2 to 4 are similarly executed in three machine cycles, but when the operation of the first machine cycle for instruction 1 is completed, the basic CP is executed.
The operation of the instruction reading portion of U7 ends, and the next instruction can be fetched. Therefore, in the second machine cycle, the instruction fetch and decode operations of the instruction 2 are executed. As described above, in the second machine cycle, the arithmetic operation of the instruction 1 and the instruction fetch and decode operations of the instruction 2 can be performed simultaneously.

【0032】又、同様に、命令1について2マシンサイ
クル目の動作が終了した時点で、基本CPU7の演算部
分は動作が終了し次の命令における演算動作が可能であ
り、よって3マシンサイクル目では命令2における演算
動作を実行する。さらに、外部RAM等と接続する専用
バス9、及び基本CPU7とレジスタファイル用RAM
5とを接続する専用バス8を設けたこと、及び基本CP
U7内のレジスタセット10をトリプルポート・タイプ
を採用したことより、3マシンサイクル目では、命令1
の演算結果データのレジスタファイル用RAM5への書
き込み、命令2における演算動作、命令3における外部
からの命令のフェッチ、デコード動作を同時に実行する
ことができ、みかけ上、1命令が1マシンサイクルにて
実行されることになる。
Similarly, when the operation of the second machine cycle for the instruction 1 is completed, the operation of the basic CPU 7 is completed and the operation of the next instruction can be performed. The arithmetic operation in the instruction 2 is executed. Furthermore, a dedicated bus 9 connected to an external RAM or the like, a basic CPU 7 and a RAM for register files
5 and a special bus 8 for connecting
In the third machine cycle, the instruction 1
Of the operation result data into the register file RAM 5, the operation operation of the instruction 2, the fetch of the instruction from the outside in the instruction 3, and the decoding operation can be simultaneously executed. Apparently, one instruction can be executed in one machine cycle. Will be executed.

【0033】又、レジスタ・ファイル用RAM5へのア
クセスは演算結果データの格納のみであり、即ち、1マ
シンサイクルで上記RAM5の所定アドレスへ書き込む
だけなので、従来のようなデュアル、トリプルポート等
の回路が大きいRAMを要せず、シングル・ポートRA
Mで充分である。よって、バスの増加や、複雑な回路を
備える必要がないことより、ハードウエアが増加するこ
ともなく、かつ上述のようにパイプライン処理を高速に
実行することができる。
The access to the register file RAM 5 is only for storing the operation result data, that is, only writing to the predetermined address of the RAM 5 in one machine cycle. Does not require large RAM, single port RA
M is sufficient. Therefore, since there is no need to increase the number of buses or to provide a complicated circuit, it is possible to execute the pipeline processing at high speed as described above without increasing the hardware.

【0034】次に、レジスタセット10に格納されるデ
ータを書き換える場合について図3を参照し説明する。
尚、図3には図1に示す基本CPU7及びレジスタファ
イル用RAM5の関連部分のみを示している。尚、レジ
スタセット10に格納されるデータを書き換えること
は、以下に説明するようにレジスタファイル用RAM5
の拡張レジスタセットの格納データを切り換えることに
なるので、上述した「レジスタセット10に格納される
データを書き換える」と同様の表現として、レジスタフ
ァイルを切り換える、と表現する場合もある。又、レジ
スタセット10のすべてのレジスタのデータを書き換え
ることを、バンクを切り換える、と表現する場合もある
(以下の各実施例においても同じ)。尚、バンクとは、
レジスタファイル用RAM5内の複数のレジスタセット
の各々を称し、又、レジスタセット番号に対応するもの
としてバンク番号が設定される。レジスタファイルを切
り換えるには、CBNR4に格納されているデータを書
き換えることで行われる。上述したように、レジスタセ
ット10の各レジスタにデータが格納される場合には、
同時にレジスタファイル用RAM5の対応する拡張レジ
スタセットにも同一のデータを書き込んでいることよ
り、レジスタファイルを切り換える場合、従来のように
CPU内の汎用レジスタの格納データを退避させる必要
がなく、レジスタファイル用RAM5の拡張レジスタセ
ットからレジスタセット10へのデータの復帰のみを行
えば良い。よって、レジスタ切換時間は上記復帰のみの
時間を要することになる。したがって、従来に比べレジ
スタ切換時間を短くでき、演算処理速度を高速可するこ
とができる。
Next, a case where data stored in the register set 10 is rewritten will be described with reference to FIG.
FIG. 3 shows only relevant parts of the basic CPU 7 and the register file RAM 5 shown in FIG. Rewriting the data stored in the register set 10 is performed by the register file RAM 5 as described below.
Since the data stored in the extended register set is switched, the expression "switching the register file" may be used as the same expression as "rewriting the data stored in the register set 10". In addition, rewriting data of all the registers of the register set 10 may be expressed as switching banks (the same applies to the following embodiments). In addition, a bank is
Each of a plurality of register sets in the register file RAM 5 is referred to, and a bank number is set as one corresponding to the register set number. Switching of the register file is performed by rewriting data stored in CBNR4. As described above, when data is stored in each register of the register set 10,
At the same time, the same data is also written in the corresponding extension register set of the register file RAM 5, so that when switching the register file, there is no need to save the data stored in the general-purpose registers in the CPU as in the conventional case. Only the restoration of data from the extension register set of the RAM 5 to the register set 10 needs to be performed. Therefore, the register switching time requires a time for only the above-mentioned return. Therefore, the register switching time can be shortened and the arithmetic processing speed can be increased as compared with the related art.

【0035】レジスタファイルの切り換えについて具体
的に説明すると、レジスタファイル方式を採用する従来
のCPUにおいて、CPU内の汎用レジスタとして例え
ば32ビット長のレジスタを16本備え、外部アクセス
用のデータバス容量が16ビットで、2マシンサイクル
が1バスサイクルの従来のCPUでは、レジスタにおけ
る退避、復帰に要する切り換えには、 16[レジスタ本数]×(32[ビット長レジスタ]÷16
[ビット・バス幅])×2[マシンサイクル]×2[退避、復
帰]=128[マシンサイクル] が必要となる。尚、上記式で、[]内の記載は、単位あ
るいは注釈を示している(以下の式においても同じ)。
The switching of the register file will be described specifically. In a conventional CPU employing the register file system, for example, 16 32-bit registers are provided as general-purpose registers in the CPU, and the data bus capacity for external access is small. In a conventional CPU of 16 bits and two machine cycles of one bus cycle, the switching required for saving and restoring in a register is performed by 16 [number of registers] × (32 [bit length register] ÷ 16
[Bit / bus width]) × 2 [machine cycle] × 2 [save / restore] = 128 [machine cycle]. In the above formula, the description in [] indicates a unit or a comment (the same applies to the following formula).

【0036】本発明の拡張CPU6において、基本CP
U7内のレジスタセット10の構成は上記CPUと同一
で全16本とし、基本CPU7とレジスタファイル用R
AM5間のアクセス用バスを32ビットとし、1マシン
サイクルでレジスタファイル用RAM5をアクセス可能
とすると、レジスタの切り換えは、 16[レジスタの本数]×(32[ビット長レジスタ]÷3
2[ビット・バス幅])×1[マシンサイクル]×1[復帰の
み]=16[マシンサイクル] となり、従来の8倍高速となる。
In the extended CPU 6 of the present invention, the basic CP
The configuration of the register set 10 in U7 is the same as that of the above-mentioned CPU, that is, all 16 registers, and the basic CPU 7 and the register file R
If the access bus between the AMs 5 is 32 bits and the register file RAM 5 can be accessed in one machine cycle, the register switching is 16 [number of registers] × (32 [bit length register] レ ジ ス タ 3
2 [bit bus width]) × 1 [machine cycle] × 1 [return only] = 16 [machine cycle], which is eight times faster than the conventional one.

【0037】以上説明したように本実施例における拡張
CPUでは、基本CPU7内に備わるレジスタセット1
0をトリプルポートで構成し、基本CPU7とレジスタ
ファイル用RAM5とを専用バス8にて接続したこと
で、演算処理時間、いわゆるマシンサイクルを短縮で
き、さらに、レジスタファイルの切換時には基本CPU
7内レジスタセット10へデータの復帰動作のみを行え
ば良く、さらにCPU動作時間を短縮することができ
る。又、上述したように外部RAM等のアクセス用の外
部バスとレジスタファイル用RAMアクセス用バスを独
立、分離しているため、処理の並列化で高速のデータ転
送が可能となる。さらに、上述したように、レジスタセ
ットの復帰動作中は、基本CPU7の外部RAM等との
アクセス用バス9は、未使用であるので、次命令のフェ
ッチ等の動作が可能となり、CPUの処理の高速化を図
ることができる。
As described above, in the extended CPU of this embodiment, the register set 1 provided in the basic CPU 7 is used.
0 is constituted by a triple port, and the basic CPU 7 and the register file RAM 5 are connected by the dedicated bus 8, so that the processing time, so-called machine cycle, can be reduced.
Only the operation of restoring data to the register set 10 in 7 need be performed, and the CPU operation time can be further reduced. Further, as described above, the external bus for accessing the external RAM and the like and the RAM access bus for the register file are independent and separated, so that high-speed data transfer is possible by parallel processing. Further, as described above, during the operation of restoring the register set, the access bus 9 for accessing the external RAM or the like of the basic CPU 7 is not used. Higher speed can be achieved.

【0038】以上説明したように、本実施例の拡張CP
Uでは、従来の汎用レジスタ方式のCPUと同様に基本
CPU内にレジスタセットとしてレジスタを備え、かつ
当該CPUと同一チップ上にレジスタファイル用メモリ
をも備えているので、汎用レジスタ方式あるいはレジス
タファイル方式の両方式のCPUとして使用することが
でき汎用性を向上させることができる。
As described above, the extended CP of this embodiment
U has a register as a register set in the basic CPU as well as a conventional general-purpose register type CPU, and also has a register file memory on the same chip as the CPU. Can be used as both types of CPU, and the versatility can be improved.

【0039】第2の実施例;本発明の拡張CPUの第2
の実施例における構成を図4に示す。基本的な構成とし
ては、上述した図17に示すCPUを含むICと同様で
あり、同じ構成部分については同じ符号を付している。
又、レジスタファイル用RAM5の構成は、以下に説明
する各実施例においても上述した第1の実施例にて説明
した構成と同一であり、同一の符号を付している。拡張
CPU106内に基本CPU107とレジスタファイル
用RAM5を有し、基本CPU107とレジスタファイ
ル用RAM5、及び基本CPU107と外部RAM等は
それぞれ独立した専用バス108及び109にて接続さ
れる。又、基本CPU107は、任意の本数のレジスタ
の集合体であるグローバル・ローカルレジスタセット
(以下、この第2実施例において単にレジスタセットと
記す。)110を内部に1組設けており、又、レジスタ
セット110内には現在実行中のプログラムで使用され
ている、後述するローカル・レジスタセット110bの
先頭アドレスを示すアドレスポインタデータを格納する
CBNR4が含まれる。
Second Embodiment: Second Embodiment of Extended CPU of the Present Invention
FIG. 4 shows a configuration in the embodiment of FIG. The basic configuration is the same as that of the IC including the CPU shown in FIG. 17 described above, and the same components are denoted by the same reference numerals.
The configuration of the register file RAM 5 is the same as that of the first embodiment described above in each of the embodiments described below, and the same reference numerals are given. The extended CPU 106 has a basic CPU 107 and a register file RAM 5, and the basic CPU 107 and the register file RAM 5, and the basic CPU 107 and an external RAM are connected by independent dedicated buses 108 and 109, respectively. The basic CPU 107 has one set of a global / local register set (hereinafter, simply referred to as a register set in the second embodiment) 110 which is an aggregate of an arbitrary number of registers. The set 110 includes a CBNR 4 for storing address pointer data indicating the start address of a local register set 110b, which will be described later, which is used in the currently executing program.

【0040】基本CPU107内のレジスタセット11
0は、1つあるいは複数のグローバル・レジスタから構
成されるグローバルレジスタセット110aと、1つあ
るいは複数のローカルレジスタから構成されるローカル
レジスタセット110bとの2つに分類される。例えば
図示するように、レジスタセット110を構成するR0
レジスタないしRmレジスタにてグローバルレジスタセ
ット110aを構成し、(Rm+1)ないしRnレジス
タにてローカルレジスタセット110bを構成する。各
グローバルレジスタには、複数のプログラム処理におい
て共通に使用される演算データ、ポインタ等のデータが
格納され、各ローカルレジスタには、複数のプログラム
処理において各プログラム毎に使用されるデータ、ポイ
ンタ等のデータが格納される。尚、レジスタセット11
0は、トリプル・ポートのレジスタで構成され、任意の
2つのレジスタに対してリード動作を行うと同時に1つ
のレジスタに対してライト動作を同時に実行可能であ
る。
Register set 11 in basic CPU 107
0 is classified into two, a global register set 110a composed of one or a plurality of global registers and a local register set 110b composed of one or a plurality of local registers. For example, as shown in FIG.
The global register set 110a is composed of registers or Rm registers, and the local register set 110b is composed of (Rm + 1) to Rn registers. Each global register stores data such as operation data and pointers commonly used in a plurality of program processes, and each local register stores data such as data and pointers used for each program in a plurality of program processes. Data is stored. Note that register set 11
Numeral 0 is a triple-port register that can simultaneously perform a read operation on any two registers and a write operation on one register at the same time.

【0041】また、基本CPU107の演算処理におい
て、レジスタセット110に格納されているデータ、即
ちグローバルレジスタセット110a及びローカルレジ
スタセット110bの格納データのリード動作は基本C
PU107内部で行なわれ、命令実行によるレジスタセ
ット110へのデータのライト動作は、グローバルレジ
スタセット110aについては基本CPU107内のグ
ローバルレジスタセット110aに対してのみ行ない、
ライト動作がローカルレジスタセット110bに対して
実行される場合は、基本CPU107内のローカルレジ
スタセット110bとローカルレジスタセット110b
に対応するレジスタファイル用RAM5の任意のアドレ
ス上の拡張レジスタセットの両方についてライト動作を
行なう。尚、上述したリード及びライト動作は、基本C
PU107内に備わり、通常の命令処理を制御するマイ
クロプログラム及び制御部によって制御される。従っ
て、ローカルレジスタセット110bのデータは、レジ
スタファイル用RAM5におけるローカルレジスタセッ
ト110bに相当するアドレス上の拡張レジスタセット
の格納データと一貫性を常に保持している。
In the arithmetic processing of the basic CPU 107, the data stored in the register set 110, that is, the read operation of the data stored in the global register set 110a and the local register set 110b is read by the basic C.
The write operation of data to the register set 110 by the instruction execution is performed inside the PU 107, and the global register set 110a is performed only for the global register set 110a in the basic CPU 107.
When the write operation is performed on the local register set 110b, the local register set 110b in the basic CPU 107 and the local register set 110b
The write operation is performed for both of the extension register sets at an arbitrary address in the register file RAM 5 corresponding to the above. Note that the above read and write operations are performed in the basic C
It is provided in the PU 107 and is controlled by a microprogram and a control unit that control ordinary instruction processing. Therefore, the data of the local register set 110b always keeps consistency with the stored data of the extension register set on the address corresponding to the local register set 110b in the register file RAM 5.

【0042】このようにレジスタセット110を2つに
区分した理由は、各プログラムに共通するデータについ
て、レジスタファイル用RAM5への書込み及びレジス
タファイル用RAM5からの読出しは、動作が重複し不
要に動作時間を浪費することになるので、本実施例では
レジスタセット110を半分に分割し、レジスタファイ
ル用RAM5とアクセスするのは、各実行プログラムに
おいて異なるデータを格納するローカルレジスタセット
110bのみとし、レジスタ切換時間の短縮を図るため
である。又、レジスタファイル用RAM5は、後述する
理由によりシングル・ポートのRAMで十分機能を果た
すことができるので、シングルポートのRAMを採用し
ている。
The reason why the register set 110 is divided into two as described above is that, for data common to each program, writing to the register file RAM 5 and reading from the register file RAM 5 are duplicated and unnecessary. In this embodiment, the register set 110 is divided into halves, and access to the register file RAM 5 is made only by the local register set 110b that stores different data in each execution program. This is to reduce the time. The register file RAM 5 is a single-port RAM because a single-port RAM can sufficiently function for the reason described later.

【0043】このように構成される本拡張CPUのパイ
プライン動作について以下に説明する。例えばローカル
レジスタであるR5レジスタの格納データにローカルレ
ジスタであるR7の格納データを加算し、加算結果デー
タをローカルレジスタであるR5レジスタに格納する命
令を例に、当該命令を命令1ないし4として4回繰り返
し実行した場合のマシンサイクルを図2に示す。
The pipeline operation of the extended CPU configured as described above will be described below. For example, an instruction to add the data stored in the local register R7 to the data stored in the local register R5 register and store the addition result data in the local register R5 register will be referred to as instructions 1 to 4. FIG. 2 shows a machine cycle when the process is repeatedly executed.

【0044】図2において、横軸方向における各区間が
1マシンサイクルを示しており、例えば命令1の場合、
1マシンサイクル目では命令のフェッチ及びそのデコー
ドが行われる。2マシンサイクル目では、基本CPU1
07内のレジスタセット110がトリプルポートにて構
成されているので、上記R5レジスタ及びR7レジスタ
の格納データのリード動作及び読み出した上記データの
加算動作が同じマシンサイクルにて実行され、3マシン
サイクル目にてその加算結果データが上記R5レジスタ
及びレジスタファイル用RAM5内のR5レジスタに対
応するアドレスに格納される。このように命令1は3マ
シンサイクルにて実行される。
In FIG. 2, each section in the horizontal axis direction represents one machine cycle.
In the first machine cycle, instruction fetch and decode are performed. In the second machine cycle, the basic CPU 1
Since the register set 110 in the register 07 is composed of triple ports, the read operation of the data stored in the R5 register and the R7 register and the addition operation of the read data are executed in the same machine cycle, and the third machine cycle is executed. The result of addition is stored at the address corresponding to the R5 register and the R5 register in the register file RAM 5. Thus, instruction 1 is executed in three machine cycles.

【0045】命令2ないし命令4についても同様に3マ
シンサイクルにて命令が実行されるが、命令1について
1マシンサイクル目の動作が終了した時点で、基本CP
U107の命令読込部分は動作が終了し次の命令のフェ
ッチが可能であり、よって2マシンサイクル目では命令
2における命令のフェッチ、デコード動作を実行する。
このように、2マシンサイクル目では、命令1の演算動
作と、命令2の命令フェッチ、デコード動作とを同時に
実行することができる。
Instructions 2 to 4 are similarly executed in three machine cycles, but when the operation of the first machine cycle for instruction 1 is completed, the basic CP is executed.
The operation of the instruction reading portion of U107 is completed, and the next instruction can be fetched. Therefore, in the second machine cycle, the instruction fetch and decode operations of the instruction 2 are executed.
As described above, in the second machine cycle, the arithmetic operation of the instruction 1 and the instruction fetch and decode operations of the instruction 2 can be performed simultaneously.

【0046】又、同様に、命令1について2マシンサイ
クル目の動作が終了した時点で、基本CPU107の演
算部分は動作が終了し次の命令における演算動作が可能
であり、よって3マシンサイクル目では命令2における
演算動作を実行する。さらに、外部RAM等と接続する
専用バス109、及び基本CPU107とレジスタファ
イル用RAM5とを接続する専用バス108を設けたこ
と、及び基本CPU107内のレジスタセット110を
トリプルポート・タイプを採用したことより、3マシン
サイクル目では、命令1の演算結果データのレジスタフ
ァイル用RAM5への書き込み、命令2における演算動
作、命令3における外部からの命令のフェッチ、デコー
ド動作を同時に実行することができ、みかけ上、1命令
が1マシンサイクルにて実行されることになる。
Similarly, when the operation in the second machine cycle for the instruction 1 is completed, the operation of the basic CPU 107 is completed, and the operation for the next instruction is possible. Therefore, in the third machine cycle, The arithmetic operation in the instruction 2 is executed. Furthermore, a dedicated bus 109 for connecting an external RAM and the like and a dedicated bus 108 for connecting the basic CPU 107 and the register file RAM 5 are provided, and the register set 110 in the basic CPU 107 is a triple port type. In the third machine cycle, the operation result data of the instruction 1 can be written into the register file RAM 5, the operation operation of the instruction 2, the fetch of an external instruction in the instruction 3, and the decoding operation can be simultaneously executed. , One instruction is executed in one machine cycle.

【0047】又、レジスタファイル用RAM5へのアク
セスは演算結果データの格納のみであり、即ち、1マシ
ンサイクルで上記RAM5の所定アドレスへ書き込むだ
けなので、従来のようなデュアル、トリプルポート等の
回路が大きいRAMを要せず、シングル・ポートRAM
で充分である。よって、バスの増加や、複雑な回路を備
える必要がないことより、ハードウエアが増加すること
もなく、かつ上述のようにパイプライン処理を高速に実
行することができる。
The access to the register file RAM 5 is only for storing the operation result data, that is, only writing to a predetermined address of the RAM 5 in one machine cycle. Single port RAM without large RAM
Is enough. Therefore, since there is no need to increase the number of buses or to provide a complicated circuit, it is possible to execute the pipeline processing at high speed as described above without increasing the hardware.

【0048】次の演算例として、グローバルレジスタセ
ット110aに含まれるR0レジスタの格納データにロ
ーカルレジスタセット110bに含まれるR7レジスタ
の格納データを加算し、加算結果データをグローバルレ
ジスタセット110aのR0レジスタに格納する場合を
考える。この場合のマシンサイクルを図5に示す。本例
の場合も上述した例と同様に各命令が3マシンサイクル
にて実行されるが、上述した例と異なる点は加算結果デ
ータはグローバルレジスタに格納されることより、基本
CPU107がレジスタファイル用RAM5へアクセス
することはない。レジスタセット110としてトリプル
ポートタイプを採用しているので、本拡張CPUは、3
マシンサイクル目において、命令1におけるR0レジス
タへの演算結果データの格納と、命令2における演算動
作と、命令3における命令のフェッチ、デコードとが同
時に行え、例えば3マシンサイクル目にて命令1ないし
命令3が同時に実行可能であり、見掛け上、1命令が1
マシンサイクルにて実行される。
As an example of the next operation, the data stored in the R0 register included in the global register set 110a is added to the data stored in the R7 register included in the local register set 110b, and the addition result data is stored in the R0 register of the global register set 110a. Consider the case of storing. FIG. 5 shows a machine cycle in this case. In this example, each instruction is executed in three machine cycles in the same manner as in the above-described example. However, the difference from the above-described example is that the addition result data is stored in the global register. There is no access to RAM5. Since a triple port type is adopted as the register set 110, this extended CPU
In the machine cycle, the storage of the operation result data in the R0 register in the instruction 1, the operation in the instruction 2, and the fetch and decode of the instruction in the instruction 3 can be performed simultaneously. For example, in the third machine cycle, the instructions 1 to 3 can be executed simultaneously, and apparently one instruction is one
It is executed in a machine cycle.

【0049】次に、レジスタファイルを切り換える場合
について図6を参照し説明する。尚、図6には図4に示
す基本CPU107及びレジスタファイル用RAM5の
関連部分のみを示している。レジスタファイルを切り換
えるには、CBNR4に格納されているデータを書き換
えることで行われる。上述したように、ローカルレジス
タセット110bの各レジスタにデータが格納される場
合には、同時にレジスタファイル用RAM5の拡張レジ
スタセットにも同一のデータを書き込んでいることよ
り、レジスタファイルを切り換える場合、従来のように
CPU内の汎用レジスタの格納データを退避させる必要
がなく、レジスタファイル用RAM5の拡張レジスタセ
ットからローカルレジスタセット110bへのデータの
復帰のみを行えば良い。よって、レジスタ切換時間は上
記復帰のみの時間を要することになる。したがって、従
来に比べレジスタ切換時間を短くでき、演算処理速度を
高速化することができる。尚、グローバルレジスタセッ
ト110aに格納されるデータについては、上述したよ
うに基本CPU107内で読み書きされるので、レジス
タファイルの切り換え動作には関係しない。
Next, switching of the register file will be described with reference to FIG. FIG. 6 shows only the relevant parts of the basic CPU 107 and the register file RAM 5 shown in FIG. Switching of the register file is performed by rewriting data stored in CBNR4. As described above, when data is stored in each register of the local register set 110b, the same data is also written to the extension register set of the register file RAM 5 at the same time. As described above, there is no need to save the data stored in the general-purpose registers in the CPU, and only the data needs to be restored from the extension register set of the register file RAM 5 to the local register set 110b. Therefore, the register switching time requires a time for only the above-mentioned return. Therefore, the register switching time can be reduced as compared with the conventional case, and the calculation processing speed can be increased. The data stored in the global register set 110a is read and written in the basic CPU 107 as described above, and thus has no relation to the switching operation of the register file.

【0050】レジスタファイルの切り換えについて具体
的に説明すると、レジスタファイル方式を採用する従来
のCPUにおいて、CPU内の汎用レジスタとして例え
ば32ビット長のレジスタを16本備え、外部アクセス
用のデータバス容量が16ビットで、2マシンサイクル
が1バスサイクルの従来のCPUでは、レジスタにおけ
る退避、復帰に要する切り換えには、 16[レジスタ本数]×(32[ビット長レジスタ]÷16
[ビット・バス幅])×2[マシンサイクル]×2[退避、復
帰]=128[マシンサイクル] が必要となる。尚、上記式で、[]内の記載は、単位あ
るいは注釈を示している(以下の式においても同じ)。
The switching of the register file will be specifically described. A conventional CPU employing the register file system has, for example, 16 32-bit registers as general-purpose registers in the CPU, and has a data bus capacity for external access. In a conventional CPU of 16 bits and two machine cycles of one bus cycle, the switching required for saving and restoring in the register is performed by 16 [number of registers] × (32 [bit length register] ÷ 16
[Bit / bus width]) × 2 [machine cycle] × 2 [save / restore] = 128 [machine cycle]. In the above formula, the description in [] indicates a unit or a comment (the same applies to the following formula).

【0051】本実施例における基本CPU107におい
て、基本CPU107内のレジスタセット110の構成
は上記CPUと同一で全16本とし、その内グローバル
レジスタ8本、ローカルレジスタ8本とし、基本CPU
107とレジスタファイル用RAM5間のアクセス用バ
スを32ビットとし、1マシンサイクルでレジスタファ
イル用RAM5をアクセス可能とすると、レジスタセッ
ト110の切り換えは、 8[ローカルレジスタの本数]×(32[ビット長レジス
タ]÷32[ビット・バス幅])×1[マシンサイクル]×1
[復帰のみ]=8[マシンサイクル] となり、従来の16倍高速となる。
In the basic CPU 107 of this embodiment, the configuration of the register set 110 in the basic CPU 107 is the same as that of the above-mentioned CPU, that is, all 16 registers, of which eight global registers and eight local registers are provided.
If the access bus between the register 107 and the register file RAM 5 is 32 bits and the register file RAM 5 can be accessed in one machine cycle, the register set 110 is switched by 8 [number of local registers] × (32 [bit length] Register] $ 32 [bit bus width]) x 1 [machine cycle] x 1
[Return only] = 8 [machine cycle], which is 16 times faster than in the past.

【0052】以上説明したように本実施例における拡張
CPUでは、基本CPU107内に備わるレジスタセッ
ト110をトリプルポートで構成し、基本CPU107
とレジスタファイル用RAM5とを専用バス108にて
接続したことで、演算処理時間、いわゆるマシンサイク
ルを短縮でき、さらに、レジスタファイルの切換時には
基本CPU107内レジスタセット110へデータの復
帰動作のみを行えば良く、さらにCPU動作時間を短縮
することができる。さらに、本実施例では、レジスタセ
ット110を半分に分割し、レジスタファイル用RAM
5とアクセスするのはローカルレジスタ110bのみと
したので、さらにレジスタ切換時間の短縮を図ってい
る。又、上述したように外部RAM等のアクセス用の外
部バスとレジスタファイル用RAMアクセス用バスを独
立、分離しているため、処理の並列化で高速のデータ転
送が可能となる。さらに、上述したように、ローカルレ
ジスタの復帰動作中は、基本CPU107の外部RAM
等とのアクセス用バス109は、未使用であるので、次
命令のフェッチ等の動作が可能となり、CPUの処理の
高速化を図ることができる。
As described above, in the extended CPU according to the present embodiment, the register set 110 provided in the basic CPU 107 is constituted by a triple port.
And the RAM 5 for the register file are connected by the dedicated bus 108, so that the operation processing time, that is, the so-called machine cycle, can be shortened. In addition, the CPU operation time can be further reduced. Further, in the present embodiment, the register set 110 is divided into halves,
5 is accessed only by the local register 110b, so that the register switching time is further reduced. Further, as described above, the external bus for accessing the external RAM and the like and the RAM access bus for the register file are independent and separated, so that high-speed data transfer is possible by parallel processing. Further, as described above, during the return operation of the local register, the external RAM of the basic CPU 107
Since the access bus 109 is not used, operations such as fetching the next instruction can be performed, and the processing speed of the CPU can be increased.

【0053】第3の実施例;本実施例におけるCPUの
構成を図7に示す。尚、図4と同じ構成部分については
同じ符号を付し、その説明を省略する。本実施例では、
基本CPU112内に設けられる基本CPU内レジスタ
セット(以下、この第3実施例において単にレジスタセ
ットと記す。)111は、上記第2の実施例のようにグ
ローバル及びローカルの2つの領域には区分されておら
ず、又、レジスタセット111にはCBNR4を設けて
いる。又、基本CPU112とバス108を介して接続
されるレジスタファイル用メモリ115は、RAMにて
構成されるレジスタファイル用RAM115aと、RO
M(読出専用メモリ)にて構成されるレジスタファイル
用ROM115bとから構成される。
Third Embodiment FIG. 7 shows the configuration of the CPU in this embodiment. The same components as those in FIG. 4 are denoted by the same reference numerals, and description thereof will be omitted. In this embodiment,
The register set 111 in the basic CPU provided in the basic CPU 112 (hereinafter, simply referred to as a register set in the third embodiment) 111 is divided into two areas, global and local, as in the second embodiment. CBNR4 is provided in the register set 111. A register file memory 115 connected to the basic CPU 112 via the bus 108 includes a register file RAM 115a composed of a RAM,
And a register file ROM 115b composed of M (read only memory).

【0054】レジスタファイル用メモリ115のアドレ
スのマッピングとしては、図8に示すように、1組のレ
ジスタセット111に対して、1本もしくは複数本のレ
ジスタをROMとRAMの連続したアドレス領域に割り
付ける。即ち、図8に示すように、CBNR4が格納す
る値Rpに対してレジスタファイル用メモリ115のア
ドレス(Rp+0)ないし(Rp+m)をレジスタファイ
ル用ROM115bに、アドレス(Rp+m+1)ないし
(Rp+n)までをレジスタファイル用RAM115aに
割り付ける。尚、レジスタファイル用RAM115a,
レジスタファイル用ROM115bは、上述したレジス
タファイル用RAM5における各レジスタセットに相当
するものである。又、レジスタファイル用RAM115
a,レジスタファイル用ROM115b,複数設けるよ
うにしてもよい。
As for the mapping of the addresses in the register file memory 115, as shown in FIG. 8, one or a plurality of registers are allocated to a continuous address area of the ROM and the RAM for one set of registers 111. . That is, as shown in FIG. 8, the addresses (Rp + 0) to (Rp + m) of the register file memory 115 are stored in the register file ROM 115b and the addresses (Rp + m + 1) to (Rp + n) are stored in the register file memory 115 for the value Rp stored in the CBNR4. Assigned to the file RAM 115a. The register file RAM 115a,
The register file ROM 115b corresponds to each register set in the register file RAM 5 described above. Also, RAM 115 for register file
a, a plurality of register file ROMs 115b may be provided.

【0055】又、上述した第2の実施例と同様に、基本
CPU112内のレジスタセット111はトリプル・ポ
ートのレジスタで構成され、任意の2つのレジスタのリ
ード動作を1つのレジスタのライト動作の実行が同時に
可能であり、又、レジスタファイル用ROM115bお
よびレジスタファイル用RAM115aは、上記第2の
実施例にて説明した理由と同じ理由によりシングル・ポ
ートのものを採用する。
As in the second embodiment described above, the register set 111 in the basic CPU 112 is composed of triple-port registers, and a read operation of any two registers is performed by executing a write operation of one register. The register file ROM 115b and the register file RAM 115a are of a single port type for the same reason as described in the second embodiment.

【0056】又、基本CPU112の処理において、レ
ジスタファイル用RAM115aに対応する(Rm+
1)ないしRnレジスタのリードの動作は基本CPU1
12内部で行なわれ、一方、命令実行による上記(Rm
+1)ないしRnレジスタについてデータライト動作
は、上記(Rm+1)ないしRnレジスタと、(Rm+
1)ないしRnレジスタに対応するレジスタファイル用
RAM115a内の任意のアドレスの両方について、ラ
イト動作を行なう。従って、(Rm+1)ないしRnレ
ジスタに格納されるデータは、レジスタファイル用RA
M115a内の対応するアドレス上のデータと一貫性を
常に保持している。
Further, in the processing of the basic CPU 112, (Rm +
1) through Rn register read operation is performed by the basic CPU 1
12 while the above (Rm
+1) to Rn registers, the data write operation is performed using the above (Rm + 1) to Rn registers and (Rm +
The write operation is performed for both 1) to an arbitrary address in the register file RAM 115a corresponding to the Rn register. Therefore, the data stored in the (Rm + 1) to Rn registers is the RA for the register file.
It always maintains consistency with the data on the corresponding address in M115a.

【0057】レジスタファイル用ROM115bに対応
するR0ないしRmレジスタのリード動作は基本CPU
112内部で行なわれ、命令実行によるR0ないしRm
レジスタのデータライト動作は上記R0ないしRmレジ
スタのみに対してライト動作を行なう。よって、R0な
いしRmレジスタに格納されるデータは、レジスタファ
イル用ROM115b内の対応するアドレス上のデータ
とライト動作の発生時には異なる可能性がある。
The read operation of the R0 to Rm registers corresponding to the register file ROM 115b is performed by the basic CPU.
R0 to Rm by instruction execution
In the data write operation of the register, the write operation is performed only on the R0 to Rm registers. Therefore, the data stored in the R0 to Rm registers may be different from the data on the corresponding address in the register file ROM 115b when a write operation occurs.

【0058】このように構成される本実施例の拡張CP
Uのパイプライン動作について以下に説明する。例とし
て、レジスタファイル用RAM115a内のアドレスに
相当するR7レジスタの格納データに、レジスタファイ
ル用ROM115b内のアドレスに相当するR0レジス
タの格納データを加算し、加算結果データをR7レジス
タに格納する命令を考える。当該命令を命令1ないし4
とし、これらの命令を4回繰り返した場合のマシンサイ
クルを図9に示す。動作説明は、上記第2の実施例にお
いて図2を参照した場合と同様であり略説するが、本実
施例の拡張CPUにおいても、上述したように基本CP
U112とレジスタファイル用メモリ115とを専用バ
ス108にて接続し、基本CPU112と外部RAM等
とはバス109にて接続し、基本CPU内のレジスタセ
ット111はトリプルポートタイプを採用していること
より、上記第2の実施例の場合と同様に、各命令は3マ
シンサイクルにて実行され、例えば命令1について、3
マシンサイクル目において加算結果データはR7レジス
タ及びレジスタファイル用RAM115a内の対応する
アドレス部分の両方に書き込まれる。よって、本実施例
の拡張CPUにおいても、図9の例えば3マシンサイク
ル目に示すように、見掛け上1命令が1マシンサイクル
にて実行される。
The extended CP of this embodiment configured as described above
The pipeline operation of U will be described below. As an example, a command to add the data stored in the R0 register corresponding to the address in the register file ROM 115b to the data stored in the R7 register corresponding to the address in the register file RAM 115a, and store the addition result data in the R7 register. Think. Instructions 1 to 4
FIG. 9 shows a machine cycle when these instructions are repeated four times. The description of the operation is the same as that of FIG. 2 in the above-described second embodiment, and will be briefly described. However, the extended CPU of this embodiment also has the basic CP as described above.
The U112 and the register file memory 115 are connected by the dedicated bus 108, the basic CPU 112 and the external RAM are connected by the bus 109, and the register set 111 in the basic CPU adopts a triple port type. As in the second embodiment, each instruction is executed in three machine cycles.
In the machine cycle, the addition result data is written to both the R7 register and the corresponding address portion in the register file RAM 115a. Therefore, in the extended CPU of this embodiment, one instruction is apparently executed in one machine cycle as shown in, for example, the third machine cycle in FIG.

【0059】第2の実施例の場合と同様に、レジスタフ
ァイル用RAM115aはシングルポートのもので十分
であり、又、レジスタファイル用RAM115aに対し
て、常に基本CPU112のレジスタの状態と同じデー
タが記憶されており、バンク切換時にはレジスタセット
111の格納データの退避の必要がなく、復帰のみで済
むことより、レジスタ切換時間は上記復帰のレジスタ切
換時間のみとなり高速動作可能となる。又、本実施例に
よる拡張CPUでは、各プログラム処理で使用される定
数データは、レジスタファイル用ROM115b中に保
持されており、レジスタファイル切換時において、CB
NR4の格納データRpを変更するだけで上記ROM1
15bから上記定数データを読み出すことができ、レジ
スタ切換時において復帰の処理のみを行えば良い。特
に、レジスタファイル用ROM115bに対応するCP
U内のR0ないしRmレジスタに格納されるデータにつ
いては、レジスタ切換時においてもレジスタファイル用
ROM115bへ退避されないので、各プログラム処理
で退避の必要のないデータをここに格納するように設定
すれば無駄なデータ退避を省略できる。
As in the case of the second embodiment, a single port RAM is sufficient for the register file RAM 115a, and the same data as the register state of the basic CPU 112 is always stored in the register file RAM 115a. Since it is not necessary to save the data stored in the register set 111 at the time of bank switching and only the restoration is required, the register switching time is only the register switching time for the above-mentioned restoration, and high-speed operation is possible. In the extended CPU according to the present embodiment, constant data used in each program processing is held in the register file ROM 115b.
By simply changing the storage data Rp of NR4, the ROM 1
The constant data can be read out from the register 15b, and only the restoration process needs to be performed at the time of register switching. In particular, the CP corresponding to the register file ROM 115b
Since the data stored in the R0 to Rm registers in U is not saved in the register file ROM 115b even when the registers are switched, it is useless to set data that does not need to be saved in each program processing. Data saving can be omitted.

【0060】又、上記第2の実施例にて説明したような
グローバルレジスタ110aに上記定数データを格納す
る場合に比べ、本実施例ではR0ないしRmレジスタの
格納データがプログラムの実行に伴い変化した場合であ
っても、上記レジスタファイル用ROM115bよりデ
ータを復帰することで当初の格納データに容易に再設定
することができ、プログラム作成上上記定数データの変
化を考慮する必要がなくなり、プログラム作成における
自由度が向上するという利点を有する。
In the present embodiment, the data stored in the R0 to Rm registers has changed in accordance with the execution of the program, as compared with the case where the constant data is stored in the global register 110a as described in the second embodiment. Even in this case, by restoring the data from the register file ROM 115b, it is possible to easily reset the data to the original stored data, and it is not necessary to consider the change of the constant data in the program creation. This has the advantage that the degree of freedom is improved.

【0061】尚、第2の実施例にて説明した例と同じ例
において、本実施例の拡張CPUにおける動作速度をマ
シンサイクル数で示すと、第2の実施例ではレジスタフ
ァイル用メモリより復帰するレジスタ数はローカルレジ
スタ分の8本であったが、本実施例の拡張CPUではレ
ジスタファイル用ROM及びレジスタファイル用RAM
のそれぞれよりデータを復帰させるので、復帰させるレ
ジスタ数は16本になる。よって本実施例の拡張CPU
の動作に関するマシンサイクル数は、第2の実施例に比
べ8マシンサイクル増え、計16マシンサイクルとなる
が、従来のCPUによる128マシンサイクルに比べれ
ば本実施例の拡張CPUは格段に高速処理可能である。
In the same example as described in the second embodiment, if the operation speed of the extended CPU of this embodiment is represented by the number of machine cycles, the second embodiment returns from the register file memory. Although the number of registers is eight for the local registers, the extended CPU of this embodiment uses a register file ROM and a register file RAM.
, The number of registers to be restored is 16. Therefore, the extended CPU of this embodiment
The number of machine cycles related to the operation of (1) is increased by 8 machine cycles as compared with the second embodiment, resulting in a total of 16 machine cycles. It is.

【0062】第4の実施例;本実施例は、図10に示す
ように、上記第3の実施例の構成部分の一部を変化させ
たものであり、図7に示す構成部分と同じ構成部分につ
いては同じ符号を付し、その説明を省略する。本実施例
における拡張CPU116では、現在実行中のプログラ
ムで使用されているレジスタファイル用RAM115a
のレジスタセットの先頭アドレスを示すアドレスポイン
タデータRpを格納するCBNR4の他に、レジスタフ
ァイル用ROM115bのレジスタセットの先頭アドレ
スを示すアドレスポインタデータRp’を格納するCB
NR113を設けている。尚、CBNR4及び113
は、上記各実施例の場合と同様に、レジスタセット11
4内に含めることができる。
Fourth Embodiment As shown in FIG. 10, this embodiment is a modification of the third embodiment in which a part of the components is changed, and has the same configuration as the configuration shown in FIG. The same reference numerals are given to the portions, and the description thereof will be omitted. In the extended CPU 116 according to the present embodiment, the register file RAM 115a used in the program currently being executed.
CBNR4, which stores the address pointer data Rp 'indicating the start address of the register set of the register file ROM 115b, in addition to the CBNR4 storing the address pointer data Rp indicating the start address of the register set of FIG.
NR113 is provided. Note that CBNR4 and 113
The register set 11 is the same as in the above embodiments.
4 can be included.

【0063】レジスタファイル用メモリ115のアドレ
スのマッピングとしては、図11に示すように、CBN
R113の格納データRp'を基準とする(Rp'+0)な
いし(Rp'+m)のアドレス領域をレジスタファイル用
ROM115bとし、この領域に基本CPU112内の
R0ないしRmレジスタを割り付け、CBNR4の格納
データRpを基準とする(Rp+0)ないし(Rp+(n−
m))のアドレス領域をレジスタファイル用RAM115
aとし、この領域に基本CPU112内の(Rm+1)
ないしRnレジスタを割り付ける。又、その他の構成は
上記第3の実施例と同一であるので、説明を省略する。
As the mapping of the address of the register file memory 115, as shown in FIG.
The address area of (Rp '+ 0) to (Rp' + m) based on the data Rp 'stored in R113 is defined as the register file ROM 115b, and the R0 to Rm registers in the basic CPU 112 are assigned to this area, and the stored data Rp' (Rp + 0) to (Rp + (n-
m)) to the register file RAM 115
and (Rm + 1) in the basic CPU 112 in this area.
Or assign the Rn register. The other configuration is the same as that of the third embodiment, and the description is omitted.

【0064】このように構成される本実施例の拡張CP
Uにおける動作は基本的に上記第3の実施例の拡張CP
Uと同様であり、レジスタファイルメモリの切換時間の
高速化や、各プログラムに共通するデータをレジスタフ
ァイル用ROM115bに書き込むことによる無駄なデ
ータの退避の省略による動作時間の高速化の効果を奏す
ることについても同様であるので、その説明を省略す
る。
The extended CP of this embodiment configured as described above
The operation at U is basically the same as that of the extended CP of the third embodiment.
Same as U, and has the effect of shortening the switching time of the register file memory and shortening the operation time by omitting useless saving of data by writing data common to each program to the register file ROM 115b. Is the same, and the description is omitted.

【0065】特に本実施例の拡張CPUでは、さらに以
下のような効果を奏する。即ち、第3の実施例の拡張C
PUでは、レジスタファイル用メモリのアドレスを指定
するCBNR4が基本CPU112には一つしが備わっ
ていないため、レジスタファイル用メモリには常にレジ
スタファイル用ROMとレジスタファイル用RAMとが
対となって、これらが一組あるいは複数組設けられる。
よって、例えば複数のプログラムにおいてレジスタファ
イル用ROM115bの記憶データが同じである場合で
も上記ROM115bが複数設けられる。一方、本実施
例の拡張CPU116では、レジスタファイル用RAM
115aのアドレスを指定するポインタデータを格納す
るCBNR4と、レジスタファイル用ROM115bの
アドレスを指定するポインタデータを格納するCBNR
113とを設けているので、上記のような場合、各プロ
グラムに共通する共通データは一つのレジスタファイル
用ROM115bに記憶しておき、プログラムが変化し
共通データが必要な場合にはCBNR113のポインタ
データにより上記ROM115bのアドレスを指定する
ことで上記共通データを基本CPU112内のレジスタ
セットに復帰することができる。
In particular, the extended CPU of this embodiment has the following effects. That is, the extension C of the third embodiment
In the PU, since the basic CPU 112 does not have one CBNR 4 for specifying the address of the register file memory, the register file memory always includes a pair of the register file ROM and the register file RAM. One or a plurality of these are provided.
Therefore, for example, even when a plurality of programs have the same data stored in the register file ROM 115b, a plurality of ROMs 115b are provided. On the other hand, in the extended CPU 116 of the present embodiment, the register file RAM
CBNR4 for storing pointer data specifying the address of the address 115a, and CBNR for storing pointer data specifying the address of the ROM 115b for the register file.
113, the common data common to each program is stored in one register file ROM 115b in the above case, and when the program changes and the common data is required, the pointer data of the CBNR 113 is stored. By specifying the address of the ROM 115b, the common data can be returned to the register set in the basic CPU 112.

【0066】このように、レジスタファイル用メモリ1
15において、上記レジスタファイル用ROM115b
に要するメモリ容量を小さくすることができるという効
果を奏するとともに、上記レジスタファイル用RAM1
15a及びレジスタファイル用ROM115bのマッピ
ングの自由度を向上させることができる。
As described above, the register file memory 1
15, the register file ROM 115b
And a memory capacity required for the register file RAM 1 can be reduced.
15a and the register file ROM 115b can be more freely mapped.

【0067】以上説明したように、各実施例における拡
張CPUは、従来の汎用レジスタ方式のCPUと同様に
CPU内にレジスタセットとしてレジスタを備え、かつ
当該CPUと同一チップ上にレジスタファイル用メモリ
をも備えているので、汎用レジスタ方式あるいはレジス
タファイル方式の両方式のCPUとして使用することが
でき汎用性を向上させることができる。
As described above, the extended CPU in each embodiment has a register as a register set in the CPU similarly to the conventional general-purpose register type CPU, and has a register file memory on the same chip as the CPU. Also, it can be used as a general-purpose register type or register file type CPU, and the versatility can be improved.

【0068】第5の実施例;第5の実施例における構成
の一例を図12に示す。基本的な構成としては、上述し
た図17に示すCPUを含むICと同様であり、同じ構
成部分については同じ符号を付している。本実施例の拡
張CPUでは、拡張CPU206内に基本CPU207
とレジスタファイル用RAM5とを有し、基本CPU2
07とレジスタファイル用RAM5、及び基本CPU2
07と外部RAM等はそれぞれ独立した専用バスにて接
続される。即ち、基本CPU207とレジスタファイル
用RAM5とはコントロールバス211、アドレスバス
212及びデータバス213a,213bにて接続さ
れ、拡張CPU206とは別個に設けられる外部構成部
分(不図示)と基本CPU207とはコントロールバス
221、アドレスバス222、データバス223にて接
続される。
Fifth Embodiment FIG. 12 shows an example of the configuration of the fifth embodiment. The basic configuration is the same as that of the IC including the CPU shown in FIG. 17 described above, and the same components are denoted by the same reference numerals. In the extended CPU of this embodiment, the basic CPU 207 is included in the extended CPU 206.
And a RAM 5 for a register file.
07, register file RAM 5, and basic CPU 2
07 and an external RAM are connected by independent dedicated buses. That is, the basic CPU 207 and the register file RAM 5 are connected by a control bus 211, an address bus 212, and data buses 213a and 213b, and an external component (not shown) provided separately from the extension CPU 206 and the basic CPU 207 They are connected by a bus 221, an address bus 222, and a data bus 223.

【0069】又、基本CPU207内には、例えば16
本のレジスタから構成される一組の集合レジスタセット
241、上記CBNR4、演算を実行する実行ユニット
242、基本CPU207内の構成部分の動作を制御す
る制御部243が設けられる。尚、集合レジスタセット
241は、それぞれ8本のレジスタにて2つのレジスタ
セット241a及び241bに分けられる。レジスタフ
ァイル用RAM5に接続されるデータバス213aは、
実行ユニット242及びレジスタセット241aに直接
接続され、一方データバス213bはレジスタセット2
41bに直接接続されるほか、制御部243が送出する
制御信号にてオン、オフ動作を行うスイッチ245を介
してレジスタセット241a及びデータバス213aに
接続される。
In the basic CPU 207, for example, 16
There are provided a set register set 241 composed of book registers, the CBNR 4, an execution unit 242 for executing an operation, and a control unit 243 for controlling operations of components in the basic CPU 207. The collective register set 241 is divided into two register sets 241a and 241b by eight registers. The data bus 213a connected to the register file RAM 5 is
The execution unit 242 and the register set 241a are directly connected, while the data bus 213b is connected to the register set 2
In addition to being directly connected to 41b, it is also connected to the register set 241a and the data bus 213a via a switch 245 that performs an on / off operation by a control signal sent from the control unit 243.

【0070】スイッチ245は、実行ユニット242か
らレジスタセット241a及び241bにデータが格納
される場合には、制御部243が送出する制御信号によ
りオン状態となる。よって、実行ユニット242は、デ
ータバス213aを介してレジスタセット241a及び
レジスタファイル用RAM5と接続状態となり、又、デ
ータバス213a,213b、スイッチ245を介して
レジスタファイル用RAM5と接続状態となる。一方、
基本CPU207が実行中のプログラムの進行により集
合レジスタセット241の格納データを書き換える必要
が生じた場合、スイッチ245は制御部243が送出す
る制御信号によりオフ状態となり、レジスタファイル用
RAM5はレジスタセット241a及び241bと接続
状態となる。
When data is stored in the register sets 241a and 241b from the execution unit 242, the switch 245 is turned on by a control signal sent from the control unit 243. Therefore, the execution unit 242 is connected to the register set 241a and the register file RAM 5 via the data bus 213a, and is connected to the register file RAM 5 via the data buses 213a and 213b and the switch 245. on the other hand,
When it is necessary to rewrite the data stored in the collective register set 241 due to the progress of the program being executed by the basic CPU 207, the switch 245 is turned off by a control signal sent from the control unit 243, and the register file RAM 5 stores the register set 241a and the register set 241a. 241b.

【0071】又、実行ユニット242とレジスタセット
241a、241bとは、それぞれバス246及び24
7にて接続され、又、制御部243はCBNR4、集合
レジスタセット241及び実行ユニット242に対して
それぞれ制御信号を送出する。又、レジスタファイル用
RAM5は、後述する理由によりシングルポートのRA
Mで十分機能を果たすことができるので、シングルポー
トのRAMを採用している。又、上述した各バス213
a,213b,246,247、レジスタセット241
a,241bのバス幅はそれぞれ32ビットとする。
The execution unit 242 and the register sets 241a and 241b are connected to buses 246 and 24, respectively.
7, and the control unit 243 sends control signals to the CBNR 4, the set register set 241, and the execution unit 242, respectively. The register file RAM 5 stores a single-port RA for the reason described later.
Since M can perform a sufficient function, a single-port RAM is employed. Also, each of the buses 213 described above
a, 213b, 246, 247, register set 241
The bus widths of a and 241b are each 32 bits.

【0072】このように構成される拡張CPUの動作を
以下に説明する。又、基本CPU207の処理におい
て、集合レジスタセット241に格納されているデータ
のリード動作は基本CPU207内部においてバス24
6,247を介して行なわれ、命令実行による集合レジ
スタセット241へのデータのライト動作は、制御部2
43が送出する制御信号にてスイッチ245をオン状態
とすることで、データバス213aを介してレジスタセ
ット241a、スイッチ245を介してレジスタセット
241bに対してそれぞれ行われるとともに、データバ
ス213a及び213bを介してレジスタファイル用R
AM5内においてレジスタセット241a,241bに
それぞれ相当するアドレス部分の拡張レジスタセットに
対してそれぞれ行われる。従って、集合レジスタセット
241の格納データは、レジスタファイル用RAM5に
おける集合レジスタセット241の相当するアドレス上
の拡張レジスタセットのデータとの一貫性を常に保持し
ている。尚、上述したリード及びライト動作は、基本C
PU207内の制御部243が送出する制御信号によっ
て制御される。
The operation of the thus-configured extended CPU will be described below. In the processing of the basic CPU 207, the operation of reading data stored in the set register set 241 is performed within the bus
6, 247, and the data write operation to the collective register set 241 by executing the instruction is performed by the control unit 2
By turning on the switch 245 by the control signal transmitted by the switch 43, the register set 241a is set via the data bus 213a, the register set 241b is set via the switch 245, and the data buses 213a and 213b are set. R for register file via
The processing is performed on the extension register set of the address portion corresponding to each of the register sets 241a and 241b in the AM5. Therefore, the data stored in the collective register set 241 always keeps consistency with the data of the extension register set on the corresponding address of the collective register set 241 in the register file RAM 5. Note that the above read and write operations are performed in the basic C
It is controlled by a control signal sent from the control unit 243 in the PU 207.

【0073】次に、集合レジスタセット241の格納デ
ータを切り換える場合について説明する。集合レジスタ
セット241の格納データを切り換えるには、CBNR
4に格納されているデータを書き換えることで行われ
る。上述したように、集合レジスタセット241の各レ
ジスタセットにデータが格納される場合には、同時にレ
ジスタファイル用RAM5の拡張レジスタセットにも同
一のデータを書き込んでいることより、集合レジスタセ
ット241の格納データを切り換える場合、従来のよう
にCPU内の汎用レジスタの格納データを退避させる必
要がなく、レジスタファイル用RAM5の拡張レジスタ
セットから集合レジスタセット241へのデータの復帰
のみを行えば良い。
Next, a case where the data stored in the set register set 241 is switched will be described. To switch the data stored in the set register set 241, CBNR
4 is rewritten. As described above, when data is stored in each register set of the collective register set 241, the same data is also written in the extension register set of the register file RAM 5 at the same time, so that the storage of the collective register set 241 is performed. When switching data, it is not necessary to save the data stored in the general-purpose registers in the CPU as in the related art, and only the data needs to be restored from the extended register set of the register file RAM 5 to the set register set 241.

【0074】上記復帰を行う場合には、制御部243が
送出する制御信号によりスイッチ245をオフ状態とす
ることでデータバス213a及び213bは独立した状
態となり、レジスタファイル用RAM5より読み出され
たデータは、データバス213aを介してレジスタセッ
ト241aに、データバス213bを介してレジスタセ
ット241bにそれぞれ転送される。即ち、上述したよ
にデータバス213a,213bはそれぞれ32ビット
幅にて構成しているので、64ビット分のデータがレジ
スタファイル用RAM5から集合レジスタセット241
へ一度に送出され、本実施例ではレジスタセット241
a及び241bを構成するレジスタ数は8本であるの
で、8サイクルで上記転送が終了する。
When the above-mentioned return is performed, the switch 245 is turned off by a control signal sent from the control unit 243, so that the data buses 213a and 213b become independent, and the data read from the register file RAM 5 Is transferred to the register set 241a via the data bus 213a and to the register set 241b via the data bus 213b. That is, since the data buses 213a and 213b are each configured with a 32-bit width as described above, 64-bit data is transferred from the register file RAM 5 to the collective register set 241.
To the register set 241 in this embodiment.
Since the number of registers constituting a and 241b is eight, the transfer is completed in eight cycles.

【0075】データバス213a及び213bのクロッ
クレートが外部構成部分へ接続されるデータバス223
のクロックレートの2倍で、上記データバス223のビ
ット幅が16ビットであるとした場合、集合レジスタセ
ット241を構成する計16本の32ビットレジスタへ
格納されるデータをデータバス223を介して上記外部
構成部分、例えばRAM等から転送ときのサイクル数
は、以下の式に示すように64サイクルとなる。 16(レジスタ数)×32(レジスタのビット幅)÷1
6(バス幅)×2(クロックレート)=61サイクル 尚、()内の記載は数字の注釈を示す。尚、実際には、
集合レジスタセット241の格納データの上記外部RA
Mへの退避時間も要することから、上記外部RAMとの
アクセスによるレジスタ格納データの切り換えには、1
28(=64×2)サイクルを要する。
The clock rates of the data buses 213a and 213b are adjusted by the data bus 223 connected to the external components.
Assuming that the data bus 223 has a bit width of 16 bits at twice the clock rate of the data bus 223, data stored in a total of 16 32-bit registers constituting the collective register set 241 is transferred via the data bus 223. The number of cycles at the time of transfer from the external component, for example, a RAM or the like, is 64 as shown in the following equation. 16 (number of registers) × 32 (bit width of register) ÷ 1
6 (bus width) × 2 (clock rate) = 61 cycles Note that the description in parentheses indicates a numerical annotation. In addition, actually,
The external RA of the data stored in the set register set 241
Since the save time to the M is also required, switching of the data stored in the register by accessing the external RAM requires one step.
It requires 28 (= 64 × 2) cycles.

【0076】一方、本実施例による拡張CPU206で
は以下の式に示すように上記サイクル数は8サイクルと
なる。 16(レジスタ数)×32(レジスタのビット幅)÷6
4(バス幅)=8サイクル 尚、()内の記載は数字の注釈を示す。このように本拡
張CPU206によれば従来のCPUに比べ16倍高速
に集合レジスタセットの格納データの切り換えを行うこ
とができ、演算処理速度を高速化することができる。
On the other hand, in the extended CPU 206 according to the present embodiment, the number of cycles is eight as shown in the following equation. 16 (number of registers) × 32 (bit width of register) ÷ 6
4 (bus width) = 8 cycles Note that the description in parentheses indicates a numerical annotation. As described above, according to the extended CPU 206, the stored data of the collective register set can be switched 16 times faster than the conventional CPU, and the arithmetic processing speed can be increased.

【0077】次に、拡張CPU206のパイプライン動
作について以下に説明する。尚、集合レジスタセット2
41は、トリプルポート・タイプにて構成されていると
する。集合レジスタセット241を構成するR0ないし
R15レジスタ内の例えばR0レジスタの格納データに
同R1レジスタの格納データを加算し、加算結果データ
を上記R5レジスタに格納する命令を例に、当該命令を
命令1ないし4として4回繰り返し実行した場合のマシ
ンサイクルを図13に示す。
Next, the pipeline operation of the extended CPU 206 will be described below. In addition, set register set 2
41 is configured as a triple port type. For example, an instruction to add the data stored in the R1 register to the data stored in the R0 register in the R0 to R15 registers included in the set register set 241, and store the addition result data in the R5 register is referred to as an instruction 1. FIG. 13 shows a machine cycle when the process is repeatedly executed four times from No. 4 to No. 4.

【0078】図13において、横軸方向における各区間
が1マシンサイクルを示しており、例えば命令1の場
合、1マシンサイクル目では命令のフェッチ及びそのデ
コードが行われる。2マシンサイクル目では、基本CP
U207内の集合レジスタセット241がトリプルポー
トにて構成されているので、上記R0レジスタ及びR1
レジスタの格納データのリード動作及び読み出した上記
データの加算動作が同じマシンサイクルにて実行され、
3マシンサイクル目にてその加算結果データが上記R0
レジスタ及びレジスタファイル用RAM5内のR0レジ
スタに対応するアドレスに格納される。このように命令
1は3マシンサイクルにて実行される。
In FIG. 13, each section in the horizontal axis direction indicates one machine cycle. For example, in the case of instruction 1, instruction fetch and decode are performed in the first machine cycle. In the second machine cycle, the basic CP
Since the set register set 241 in the U207 is configured by a triple port, the R0 register and the R1
The read operation of the data stored in the register and the addition operation of the read data are executed in the same machine cycle,
At the third machine cycle, the addition result data is R0
It is stored at an address corresponding to the R0 register in the register and register file RAM 5. Thus, instruction 1 is executed in three machine cycles.

【0079】命令2ないし命令4についても同様に3マ
シンサイクルにて命令が実行されるが、命令1について
1マシンサイクル目の動作が終了した時点で、基本CP
U207の命令読込部分は動作が終了し次の命令のフェ
ッチが可能であり、よって2マシンサイクル目では命令
2における命令のフェッチ、デコード動作を実行する。
このように、2マシンサイクル目では、命令1の演算動
作と、命令2の命令フェッチ、デコード動作とを同時に
実行することができる。
Instructions 2 to 4 are similarly executed in three machine cycles. When the operation of the first machine cycle for instruction 1 is completed, the basic CP is executed.
The operation of the instruction reading portion of U207 ends, and the next instruction can be fetched. Therefore, in the second machine cycle, the instruction fetch and decode operations of the instruction 2 are executed.
As described above, in the second machine cycle, the arithmetic operation of the instruction 1 and the instruction fetch and decode operations of the instruction 2 can be performed simultaneously.

【0080】又、同様に、命令1について2マシンサイ
クル目の動作が終了した時点で、基本CPU207の演
算部分は動作が終了し次の命令における演算動作が可能
であり、よって3マシンサイクル目では命令2における
演算動作を実行する。さらに、外部RAM等と接続する
専用バス221,222,223、及び基本CPU20
7とレジスタファイル用RAM5とを接続する専用バス
211,212,213a,213bを設けたこと、及
び基本CPU207内の集合レジスタセット241をト
リプルポート・タイプを採用したことより、3マシンサ
イクル目では、命令1の演算結果データのレジスタファ
イル用RAM5への書き込み、命令2における演算動
作、命令3における外部からの命令のフェッチ、デコー
ド動作を同時に実行することができ、みかけ上、1命令
が1マシンサイクルにて実行されることになる。
Similarly, when the operation of the second machine cycle for instruction 1 is completed, the operation of the basic CPU 207 is completed, and the operation of the next instruction is possible, so that in the third machine cycle, The arithmetic operation in the instruction 2 is executed. Further, dedicated buses 221, 222, 223 for connecting to an external RAM or the like, and a basic CPU 20.
7 and the register file RAM 5, dedicated buses 211, 212, 213 a, and 213 b are provided, and the set register set 241 in the basic CPU 207 adopts a triple port type. The operation result data of the instruction 1 can be simultaneously written into the register file RAM 5, the operation operation of the instruction 2, the fetch and decode operation of the instruction from the outside in the instruction 3 can be simultaneously executed, and apparently one instruction is one machine cycle. Will be executed.

【0081】又、レジスタファイル用RAM5へのアク
セスは演算結果データの格納のみであり、即ち、1マシ
ンサイクルで上記RAM5の所定アドレスへ書き込むだ
けなので、従来のようなデュアル、トリプルポート等の
回路が大きいRAMを要せず、シングルポートRAMで
充分である。よって、バスの増加や、複雑な回路を備え
る必要がないことより、ハードウエアが増加することも
なく、かつ上述のようにパイプライン処理を高速に実行
することができる。
Access to the register file RAM 5 is only for storing the operation result data, that is, only writing to a predetermined address of the RAM 5 in one machine cycle. A large RAM is not required, and a single port RAM is sufficient. Therefore, since there is no need to increase the number of buses or to provide a complicated circuit, it is possible to execute the pipeline processing at high speed as described above without increasing the hardware.

【0082】以上説明したように本実施例における拡張
CPU206では、集合レジスタセット241を二つに
区分し、それぞれのレジスタセット241a,241b
とレジスタファイル用RAM5とを専用バス213a,
213bにて接続したこと、レジスタファイルの切換時
には基本CPU207内の集合レジスタセット241へ
データの復帰動作のみを行えば良いことより、CPU動
作時間を短縮することができる。又、上述したように外
部RAM等のアクセス用の外部バスとレジスタファイル
用RAMアクセス用バスを独立、分離しているため、処
理の並列化で高速のデータ転送が可能となる。さらに、
上述したように、レジスタの復帰動作中は、基本CPU
207の外部RAM等とのアクセス用バス221,22
2,223は、未使用であるので、次命令のフェッチ等
の動作が可能となり、CPUの処理の高速化を図ること
ができる。
As described above, in the extended CPU 206 in this embodiment, the set register set 241 is divided into two sets, and the respective register sets 241a and 241b
And the register file RAM 5 are connected to a dedicated bus 213a,
213b, the CPU operation time can be shortened because only the operation of restoring data to the set register set 241 in the basic CPU 207 should be performed when the register file is switched. Further, as described above, the external bus for accessing the external RAM and the like and the RAM access bus for the register file are independent and separated, so that high-speed data transfer is possible by parallel processing. further,
As described above, during the register return operation, the basic CPU
207, access buses 221 and 22 for access to an external RAM, etc.
2 and 223 are unused, so that operations such as fetching the next instruction can be performed, and the processing speed of the CPU can be increased.

【0083】上述した各実施例に示されるような、基本
CPU内にレジスタセットを設け、さらに当該基本CP
Uと同一IC上にレジスタファイル用RAMを設け、さ
らに上記基本CPUとレジスタファイル用RAMとを専
用バスにて接続した拡張CPUにおいては、基本CPU
とレジスタファイル用RAMとは専用バスにて接続され
ることより上記拡張CPU内にレジスタファイル用RA
Mを設けるか否かは自由に選択可能となる。
A register set is provided in the basic CPU as shown in each of the above-described embodiments, and the basic CP
In the extended CPU in which a register file RAM is provided on the same IC as U, and the basic CPU and the register file RAM are connected by a dedicated bus, the basic CPU
And the RAM for register file are connected by a dedicated bus, so that the RA for register file is stored in the extended CPU.
Whether or not to provide M can be freely selected.

【0084】即ち、従来レジスタファイル方式を採用す
るCPUと、レジスタファイル方式を採用しないCPU
とは根本的に動作が異なるため、それぞれのタイプのC
PUを目的別に使い分けていたが、本発明の拡張CPU
ではどちらの方式も選択することができ、上述したよう
に頻繁なプロセス切り換えを行うプログラムを実行する
ため、その切り換えを高速に行う必要があるCPUを選
択する場合には、同一のIC上にレジスタファイル用R
AMを設け、一方、演算処理速度よりもハードウエア規
模を小さくしたい場合にはレジスタファイル用RAMを
設けなければ良い。
That is, a CPU employing the conventional register file system and a CPU employing no register file system
Operation is fundamentally different from
PUs were used for different purposes.
In this case, either method can be selected. As described above, since a program for performing frequent process switching is executed, when selecting a CPU that needs to perform the switching at high speed, registering on the same IC R for file
When the AM is provided and the hardware scale is to be made smaller than the arithmetic processing speed, the RAM for the register file need not be provided.

【0085】拡張CPU内にレジスタファイル用RAM
を設けていない場合の拡張CPUの動作は、従来の汎用
レジスタ方式におけるCPUと同じであり、レジスタセ
ットの格納データの切り換えは上記拡張CPUの外部に
設けられる外部RAMとのアクセスによって行われる。
RAM for register file in extended CPU
When the CPU is not provided, the operation of the extended CPU is the same as that of the conventional general-purpose register system CPU, and the switching of the data stored in the register set is performed by accessing an external RAM provided outside the extended CPU.

【0086】このように本実施例における拡張CPUに
よれば、レジスタファイル用RAMを上記拡張CPU内
に設けるか否かの選択のみで、使用方法に応じた適切な
CPUを得ることができる。よって半導体メーカにとっ
ては、特定用途向けのICに使用するCPUをその特定
IC用にその都度最初から設計する必要がなくなり、上
記の拡張CPUは特定用途向けのICに使用するCPU
として非常に適している。又、従来ユーザは所望する仕
様に近似する仕様を有するCPUを既存のCPUから選
択し使用していたが、本発明の拡張CPUによれば、ユ
ーザはレジスタファイルの使用の有無だけでなく、レジ
スタファイル用メモリのメモリサイズ構成も自由に選択
でき、所望する仕様のCPUを得ることができる利点も
ある。
As described above, according to the extended CPU of this embodiment, an appropriate CPU according to the method of use can be obtained only by selecting whether or not the register file RAM is provided in the extended CPU. Therefore, it is not necessary for the semiconductor maker to design a CPU used for an IC for a specific application from the beginning for each specific IC, and the above-mentioned extended CPU is a CPU used for an IC for a specific application.
Very suitable as. Conventionally, the user has selected and used a CPU having a specification similar to the desired specification from the existing CPUs. However, according to the extended CPU of the present invention, the user can determine not only whether or not the register file is used but also the register file. There is also an advantage that the memory size configuration of the file memory can be freely selected and a CPU having desired specifications can be obtained.

【0087】尚、上述のように拡張CPU内にはレジス
タファイル用RAMを設けないようにしてもよいが、上
記レジスタファイル用RAMを上記拡張CPU内に設
け、図12に示すコントロールバス211、アドレスバ
ス212、データバス213a、データバス213bの
それぞれにCPUとレジスタファイル用RAMとの接
続、遮断を行うスイッチを設け、当該スイッチのオンオ
フ動作を制御部243が送出する制御信号にて行うよう
にして、従来の汎用レジスタ方式のCPUとレジスタフ
ァイル方式のCPUとを使い分けるようにしても良い。
As described above, the register file RAM may not be provided in the extended CPU. However, the register file RAM is provided in the extended CPU, and the control bus 211 shown in FIG. Each of the bus 212, the data bus 213a, and the data bus 213b is provided with a switch for connecting and disconnecting the CPU and the register file RAM, and the on / off operation of the switch is performed by a control signal transmitted from the control unit 243. Alternatively, a conventional general-purpose register type CPU and a register file type CPU may be selectively used.

【0088】尚、上述した各実施例において、レジスタ
セットは1組であることを前提としているが、これに限
るものではなく複数組設けることももちろん可能であ
る。
In each of the above embodiments, it is assumed that the number of register sets is one. However, the number of register sets is not limited to this, and a plurality of sets may be provided.

【0089】[0089]

【発明の効果】以上詳述したように本発明の拡張CPU
によれば、基本CPU内レジスタセットに格納されるデ
ータと常に同一のデータを複写によりレジスタファイル
用メモリに保持することより、基本CPU内レジスタセ
ットのデータ切換時には基本CPU内レジスタセットの
格納データを退避する必要がなく、復帰動作のみを行え
ば良く、基本CPU内レジスタセットのデータ切り換え
を高速に行うことができる。又、本発明の拡張CPUに
よれば、基本CPU内レジスタセットをデュアル・ポー
トないしは、トリプル・ポートとし、レジスタファイル
用メモリをシングル・ポートとすることで、従来のデュ
アルポートあるいはトリプルポートのレジスタ・ファイ
ル用メモリに対して、CPUの処理速度を低下すること
なく、ハードウェアを低減することができる。
As described in detail above, the extended CPU of the present invention
According to the method, the same data as the data stored in the register set in the basic CPU is always held in the register file memory by copying. There is no need to save, and only the return operation needs to be performed, and data switching of the register set in the basic CPU can be performed at high speed. According to the extended CPU of the present invention, the register set in the basic CPU is a dual port or triple port, and the register file memory is a single port, so that the conventional dual port or triple port register / register is used. The hardware for the file memory can be reduced without reducing the processing speed of the CPU.

【0090】さらに、本発明の拡張CPUによれば、基
本CPU内にグローバルローカルレジスタセットを備
え、その内のローカルレジスタセットに格納されるデー
タと常に同一のデータを複写によりレジスタファイル用
メモリに保持することより、ローカルレジスタセットの
データ切換時にはローカルレジスタセットの格納データ
を退避する必要がなく、復帰動作のみを行えば良く、レ
ジスタセットのデータの切り換えを高速に行うことがで
きる。
Further, according to the extended CPU of the present invention, the global local register set is provided in the basic CPU, and the same data as the data stored in the local register set is always retained in the register file memory by copying. By doing so, it is not necessary to save the data stored in the local register set at the time of data switching of the local register set, it is only necessary to perform a return operation, and the data of the register set can be switched at high speed.

【0091】又、本発明の拡張CPUでは、基本CPU
内の全レジスタの格納データの退避、復帰を行うのでは
なく、ローカルレジスタセットへのデータの復帰だけで
レジスタセットの切り換えができることより、よりレジ
スタセットの切り換えを高速に行うことができる。
In the extended CPU of the present invention, the basic CPU
The register set can be switched only by restoring the data to the local register set, instead of saving and restoring the data stored in all the registers within the register, so that the register set can be switched more quickly.

【0092】又、本発明の拡張CPUによれば、基本C
PU内のローカルレジスタセット及びグローバルレジス
タセットをデュアル・ポートないしは、トリプル・ポー
トとし、レジスタファイル用メモリをシングル・ポート
とすることで、従来のデュアルポートあるいはトリプル
ポートのレジスタ・ファイル用メモリに対して、CPU
の処理速度を低下することなく、ハードウェアを低減す
ることができる。
According to the extended CPU of the present invention, the basic C
By setting the local register set and global register set in the PU as dual ports or triple ports and the register file memory as a single port, the conventional dual port or triple port register file memory can be used. , CPU
Hardware can be reduced without lowering the processing speed of.

【0093】又、本発明の拡張CPUによれば、レジス
タファイル用メモリに第1メモリ及び第2メモリを備え
ることで例えば各プログラム処理で共通して使用される
定数データを上記第2メモリに記憶しておくことで、基
本CPU内レジスタセットの格納データを書き換えると
きにあっても上記定数データを退避する必要がないので
無駄なデータ退避を省略することができ、基本CPU内
レジスタセットの格納データの切り換えを高速に行うこ
とができる。さらに、基本CPU内レジスタセットを構
成するそれぞれのレジスタと上記レジスタファイル用メ
モリにおけるメモリ領域とを専用バスにて接続したこと
より、上記復帰動作は上記各レジスタに対して同時に行
え、より上記切換動作を高速に行うことができる。
According to the extended CPU of the present invention, since the register file memory includes the first memory and the second memory, for example, constant data commonly used in each program processing is stored in the second memory. By doing so, it is not necessary to save the constant data even when rewriting the data stored in the register set in the basic CPU, so that unnecessary data saving can be omitted, and the data stored in the register set in the basic CPU can be omitted. Can be switched at high speed. Further, since the respective registers constituting the register set in the basic CPU and the memory area in the register file memory are connected by a dedicated bus, the return operation can be performed on each of the registers at the same time. Can be performed at high speed.

【0094】さらに本発明の拡張CPUによれば、基本
CPU内に2組のレジスタセットを有する集合レジスタ
セットを備え、かつ基本CPUとレジスタファイル用メ
モリとを外部アクセスに対し倍サイズのレジスタファイ
ル用メモリアクセス用の専用バスにて接続したことよ
り、復帰の際のデータ転送速度が2倍となり、さらに拡
張CPU内にレジスタファイル用メモリを設けるか否か
を選択することが可能であり、特定用途のICに使用さ
れるCPUの設計を容易に行うことができる。
Further, according to the extended CPU of the present invention, the basic CPU is provided with a collective register set having two register sets, and the basic CPU and the register file memory are used for double-size register files for external access. By connecting via a dedicated bus for memory access, the data transfer speed at the time of recovery is doubled, and it is possible to select whether or not to provide a memory for register files in the extended CPU. Of the CPU used for the IC can be easily designed.

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

【図1】 本発明の拡張CPUにおける一実施例の構成
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of one embodiment of an extended CPU of the present invention.

【図2】 図1に示す拡張CPUの動作を説明するため
の図である。
FIG. 2 is a diagram for explaining an operation of the extended CPU shown in FIG.

【図3】 図1に示す拡張CPUの動作を説明するため
の図である。
FIG. 3 is a diagram for explaining an operation of the extended CPU shown in FIG. 1;

【図4】 本発明の拡張CPUにおける第2の実施例の
構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a second embodiment in the extended CPU of the present invention.

【図5】 図4に示す拡張CPUの動作を説明するため
の図である。
FIG. 5 is a diagram for explaining the operation of the extended CPU shown in FIG.

【図6】 図4に示す拡張CPUの動作を説明するため
の図である。
FIG. 6 is a diagram for explaining an operation of the extended CPU shown in FIG. 4;

【図7】 本発明の拡張CPUにおける第3の実施例の
構成を示すブロック図である。
FIG. 7 is a block diagram showing a configuration of a third embodiment in the extended CPU of the present invention.

【図8】 図7に示す拡張CPUの動作を説明するため
の図である。
FIG. 8 is a diagram for explaining the operation of the extended CPU shown in FIG. 7;

【図9】 図7に示す拡張CPUの動作を説明するため
の図である。
FIG. 9 is a diagram for explaining an operation of the extended CPU shown in FIG. 7;

【図10】 本発明の拡張CPUにおける第4の実施例
の構成を示すブロック図である。
FIG. 10 is a block diagram showing a configuration of a fourth embodiment in the extended CPU of the present invention.

【図11】 図10に示す拡張CPUの動作を説明する
ための図である。
11 is a diagram for explaining the operation of the extended CPU shown in FIG.

【図12】 本発明の拡張CPUにおける第5の実施例
の構成を示すブロック図である。
FIG. 12 is a block diagram showing a configuration of a fifth embodiment in the extended CPU of the present invention.

【図13】 図12に示す拡張CPUの動作を説明する
ための図である。
FIG. 13 is a diagram for explaining the operation of the extended CPU shown in FIG.

【図14】 (a)、(b)は、それぞれ従来の汎用レ
ジスタ方式のCPUにおける動作を説明するための図で
ある。
FIGS. 14A and 14B are diagrams for explaining operations in a conventional general-purpose register type CPU.

【図15】 従来のレジスタファイル方式のCPUにお
ける動作を説明するための図である。
FIG. 15 is a diagram for explaining an operation in a conventional register file type CPU.

【図16】 従来のレジスタファイル方式のCPUにお
ける構成の一例を示すブロック図である。
FIG. 16 is a block diagram showing an example of a configuration of a conventional register file type CPU.

【図17】 従来のレジスタファイル方式のCPUにお
ける構成の他の例を示すブロック図である。
FIG. 17 is a block diagram showing another example of the configuration of a conventional register file type CPU.

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

4…CBNR、 5…レジスタファイル用RAM、 7
…基本CPU、8、9…バス、 10…レジスタセッ
ト、 107…基本CPU、108、109…バス、
110a…グローバルレジスタ、110b…ローカルレ
ジスタ、 113…CBNR、115a…レジスタファ
イル用RAM、115b…レジスタファイル用ROM、
206…拡張CPU、207…基本CPU、 211…
コントロールバス、 212…アドレスバス、213a
…データバス、 213b…データバス、221…コン
トロールバス、 222…アドレスバス、223…デー
タバス、 241…レジスタセット、 242…実行ユ
ニット、243…制御部、 245…スイッチ、 24
6,247…バス。
4 CBNR, 5 RAM for register file, 7
... Basic CPU, 8, 9 ... Bus, 10 ... Register set, 107 ... Basic CPU, 108,109 ... Bus,
110a: Global register, 110b: Local register, 113: CBNR, 115a: RAM for register file, 115b: ROM for register file,
206 ... Extended CPU, 207 ... Basic CPU, 211 ...
Control bus, 212 ... address bus, 213a
... data bus, 213b ... data bus, 221 ... control bus, 222 ... address bus, 223 ... data bus, 241 ... register set, 242 ... execution unit, 243 ... control unit, 245 ... switch, 24
6,247 ... Bus.

フロントページの続き (31)優先権主張番号 特願平4−10080 (32)優先日 平成4年1月23日(1992.1.23) (33)優先権主張国 日本(JP) (72)発明者 安井 隆 東京都大田区中馬込1丁目3番6号 株 式会社リコー内 (56)参考文献 特開 昭58−225443(JP,A) 特開 昭57−212551(JP,A) 特開 昭61−75444(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 9/30 - 9/42 G06F 9/46 G06F 12/00 Continued on the front page (31) Priority claim number Japanese Patent Application No. 4-10080 (32) Priority date January 23, 1992 (199.2.1.23) (33) Priority claim country Japan (JP) (72) Inventor Takashi Yasui Ricoh Co., Ltd. 1-3-6 Nakamagome, Ota-ku, Tokyo (56) References JP-A-58-225443 (JP, A) JP-A-57-212551 (JP, A) 61-75444 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 9/30-9/42 G06F 9/46 G06F 12/00

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 各実行プログラムにおいて異なるデータ
を格納しレジスタファイル用メモリとアクセス可能なロ
ーカルレジスタ領域、及び各実行プログラムに共通する
データを格納し上記レジスタファイル用メモリとアクセ
ス不能のグローバルレジスタ領域を有するグローバル・
ローカルレジスタセットを備えた基本中央演算処理装置
と、 上記基本中央演算処理装置が備わる集積回路装置内に備
わり、上記ローカルレジスタ領域の格納データ量と同じ
データ量のレジスタセットを複数備えた拡張レジスタセ
ットを有し、シングルポート・タイプのRAMにてなる
レジスタファイル用メモリと、 上記基本中央演算処理装置に備わり、上記レジスタファ
イル用メモリの拡張レジスタセットを構成する一つのレ
ジスタセットから上記ローカルレジスタ領域へデータの
復帰を行う場合に使用され、上記拡張レジスタセットに
おいてデータを読み出すレジスタセットの先頭アドレス
を示すアドレスポインタデータを格納するアドレスデー
タ格納レジスタと、 上記基本中央演算処理装置と上記レジスタファイル用メ
モリとを接続し、上記グローバル・ローカルレジスタセ
ットのビット長と同じビット数を有する内部接続専用バ
スと、 上記基本中央演算処理装置が備わる集積回路装置の外部
に設けられる構成素子と上記基本中央演算処理装置とを
接続し、上記グローバル・ローカルレジスタセットのビ
ット長の半分のビット数を有する外部接続専用バスと、 上記グローバルレジスタ領域の格納データを使用し演算
を実行するとき上記グローバルレジスタ領域に対してデ
ータの読み書きを行い、上記ローカルレジスタ領域の格
納データを使用し演算を実行するときであって上記ロー
カルレジスタ領域に対してデータの書き込みを行うとき
には当該データを上記レジスタファイル用メモリのレジ
スタセットにも書き込み、データを読み出すときには上
記ローカルレジスタ領域の格納データを読み出し、一
方、上記拡張レジスタセットを構成するレジスタセット
を変更するときには上記アドレスデータ格納レジスタの
アドレスポインタデータを書き換え書き換えられたアド
レスポインタデータに基づき指定される上記レジスタフ
ァイル用メモリ上のレジスタセットから上記ローカルレ
ジスタ領域へデータの復帰動作のみを行うよう動作制御
を行う、上記基本中央演算処理装置内の制御手段と、 を備えたことを特徴とする拡張中央演算処理装置。
1. Different data in each execution program
Stored by the memory and accessible local register area for register files, and common to each execution program
Stores data global with global register area of the register file memory and inaccessible
A basic central processing unit having a local register set; and an extended register set provided in the integrated circuit device having the basic central processing unit and having a plurality of register sets having the same data amount as the amount of data stored in the local register area. A register file memory comprising a single-port type RAM; and a register set provided in the basic central processing unit and constituting an extended register set of the register file memory from the register set to the local register area . An address data storage register for storing address pointer data indicating a head address of a register set from which data is read in the extension register set; and the basic central processing unit and the register file memory. the connect The global local register cell
A dedicated bus for internal connection having the same number of bits as the bit length of the unit, a component provided outside the integrated circuit device provided with the basic central processing unit, and the basic central processing unit connected to the global central processing unit; Local register set
A dedicated bus for external connection having a bit number of half of the bit length, and when executing an operation using data stored in the global register area, data is read from or written to the global register area and stored in the local register area. When performing an operation using data and writing data to the local register area, the data is also written to the register set of the register file memory. When reading data, the local register area is stored. When the data is read out and the register set constituting the extension register set is changed, the address pointer data of the address data storage register is rewritten and specified on the basis of the rewritten address pointer data in the register file memory. An extended central processing unit, comprising: a control unit in the basic central processing unit that performs operation control so as to perform only an operation of restoring data from a register set to the local register area.
【請求項2】 上記基本中央演算処理装置内の上記グロ
ーバル・ローカルレジスタセットはデュアルポート・タ
イプもしくはトリプルポート・タイプにて構成される、
請求項1記載の拡張中央演算処理装置。
2. The globle in the basic central processing unit.
Global local register set consists of dual port type or triple port type.
The extended central processing unit according to claim 1.
【請求項3】 基本中央演算処理装置内レジスタセット
を備えた基本中央演算処理装置と、 上記基本中央演算処理装置が備わる集積回路装置内に備
わり、上記レジスタセットとデータの読み書きが可能で
あり各実行プログラムにおいて異なるデータを格納する
第1メモリと各実行プログラムにおける共通データを格
納し上記レジスタセットに対して読み出し動作専用の第
2メモリとを備え、上記基本中央演算処理装置内レジス
タセットの格納データ量と同じデータ量を有するレジス
タセットを複数備えた、拡張レジスタセットを有するレ
ジスタファイル用メモリと、 上記基本中央演算処理装置と上記レジスタファイル用メ
モリとを接続し、上記基本中央演算処理装置内レジスタ
セットのビット長と同じビット数を有する内部接続専用
バスと、 上記基本中央演算処理装置が備わる集積回路装置の外部
に設けられる構成素子と上記基本中央演算処理装置とを
接続し、上記基本中央演算処理装置内レジスタセットの
ビット長の半分のビット数を有する外部接続専用バス
と、 上記基本中央演算処理装置内レジスタセットにデータを
格納するときには当該データを上記第1メモリにも書き
込み、一方上記レジスタファイル用メモリを構成するレ
ジスタセットを変更する場合には上記基本中央演算処理
装置内レジスタセットから上記レジスタファイル用メモ
リの上記第1メモリへデータの退避を行うことなく上記
レジスタファイル用メモリの上記第1及び第2メモリか
ら上記基本中央演算処理装置内レジスタセットへデータ
の復帰のみを行うように動作制御を行う、上記基本中央
演算処理装置内の制御手段と、 を備えたことを特徴とする拡張中央演算処理装置。
The basic central processing unit 3. A with a basic central processing unit in the register set, equipped with the basic central processing unit facilities integrated circuit device, it is possible to read and write the register set and data each A first memory for storing different data in the execution program; and a second memory for storing common data in each execution program and dedicated to reading the register set, and dedicated to the read operation, wherein the register in the basic central processing unit is provided. the register set having the same data amount as the amount of stored data sets comprises a plurality, a memory for Relais <br/> register file having a extended register set, and a memory for the basic central processing unit and said register file Connect the above registers in the basic central processing unit
A bus dedicated for internal connection having the same number of bits as the bit length of the set, a component provided outside the integrated circuit device provided with the basic central processing unit, and the basic central processing unit connected to the basic central processing unit, Of the register set in the processor
When storing data in the register set in the basic central processing unit and the external connection dedicated bus having a bit number of half the bit length , the data is also written in the first memory, and the register file memory is formed. When changing the register set, the data is not saved from the register set in the basic central processing unit to the first memory of the register file memory, but the data is not transferred from the first and second memories of the register file memory. An extended central processing unit, comprising: a control unit in the basic central processing unit that performs an operation control so that only data is restored to the register set in the basic central processing unit.
【請求項4】 上記第1メモリからデータを読み出す領
域の先頭アドレスを示すアドレスポインタデータを格納
する第1のアドレスデータ格納レジスタと、 上記第2メモリからデータを読み出す領域の先頭アドレ
スを示すアドレスポインタデータを格納する第2のアド
レスデータ格納レジスタと、 を備え、上記制御手段は上記レジスタファイル用メモリ
を構成するレジスタセットを変更する場合には上記基本
中央演算処理装置内レジスタセットから上記レジスタフ
ァイル用メモリの上記第1メモリへデータの退避を行う
ことなく、上記第1及び第2のアドレスデータ格納レジ
スタに格納されているアドレスポインタデータにより指
定される上記レジスタファイル用メモリの上記第1及び
第2メモリから上記基本中央演算処理装置内レジスタセ
ットへデータの復帰のみを行う、請求項3記載の拡張中
央演算処理装置。
4. A first address data storage register for storing an address pointer data indicating a head address of an area from which data is read from the first memory, and an address pointer indicating a head address of an area for reading data from the second memory. A second address data storage register for storing data, wherein the control means changes the register set in the basic central processing unit from the register set in the basic central processing unit when changing the register set constituting the register file memory. The first and second memory of the register file memory specified by the address pointer data stored in the first and second address data storage registers without saving the data to the first memory of the memory. From the memory, the register set in the basic central processing unit Performing only return data to the bets, expanded central processing unit according to claim 3, wherein.
【請求項5】 上記基本中央演算処理装置内レジスタセ
ットはデュアルポート・タイプもしくはトリプルポート
・タイプにて構成される、請求項3又は4記載の拡張中
央演算処理装置。
5. The extended central processing unit according to claim 3, wherein said register set in said basic central processing unit is of a dual port type or a triple port type.
【請求項6】 一もしくは複数のレジスタを有するレジ
スタセットを2組有する集合レジスタセットを備えた、
基本中央演算処理装置と、 上記基本中央演算処理装置が備わる集積回路装置内に備
わり、上記集合レジスタセットの格納データ量と同じデ
ータ量のレジスタセットを複数備えた拡張レジスタセッ
トを有し、シングルポート・タイプのRAMにてなるレ
ジスタファイル用メモリと、 上記集合レジスタセットの2組のレジスタセットと上記
拡張レジスタセットとをそれぞれ別個に接続し、上記集
合レジスタセットのビット長と同じビット数を有する2
組の専用バスと、 上記集合レジスタセットの各レジスタセットへの格納デ
ータと同一データを上記拡張レジスタセットにも書き込
み上記集合レジスタセットの各レジスタセットのすべて
の格納データを書き換えるときには上記拡張レジスタセ
ットより上記各専用バスを介して上記各レジスタセット
へそれぞれデータを転送するように、上記専用バスに備
わり上記専用バスにおけるデータ伝送のオンオフ動作を
行うスイッチと、 上記基本中央演算処理装置内の動作制御を行い、かつ上
記スイッチのオンオフ動作を制御して上記2組の専用バ
スを介して上記拡張レジスタセットから上記2組のレジ
スタセットへデータ転送を行なわせる制御手段と、 当該基本中央演算処理装置が備わる集積回路装置の外部
に設けられる他の素子と上記基本中央演算処理装置とを
接続し、上記集合レジスタセットのビット長の半分のビ
ット数を有する外部専用バスと、 を備えたことを特徴とする拡張中央演算処理装置。
6. A set register set having two register sets each having one or a plurality of registers,
A central port processing unit, and an extended register set provided in the integrated circuit device provided with the basic central processing unit and having a plurality of register sets having the same data amount as the storage data amount of the set register set, and a single port・ The register file memory composed of a type RAM, the two register sets of the set register set, and the extension register set are separately connected to each other ,
2 having the same number of bits as the bit length of the
When writing the same data as the data stored in each of the register sets of the set register set to the extended register set, and rewriting all the stored data of each of the register sets of the set register set, the extended register set is used. A switch provided on the dedicated bus to perform an on / off operation of data transmission on the dedicated bus so as to transfer data to each of the register sets via the dedicated bus, and an operation control in the basic central processing unit. Do and on
By controlling the on / off operation of the switches,
From the extension register set via the
Connects the control means to perform the data transfer to the static set and the basic central processing unit facilities integrated circuits other element and the base central processing unit provided outside the apparatus, the bit length of the set register set Half of the bi
And an external dedicated bus having a number of units.
【請求項7】 上記基本中央演算処理装置内に備わり上
記制御手段に接続され、上記レジスタファイル用メモリ
からデータを読み出す先頭アドレスを示すアドレスポイ
ンタデータを格納するアドレスデータ格納レジスタを備
えた、請求項6記載の拡張中央演算処理装置。
7. An address data storage register provided in the basic central processing unit, connected to the control means, and storing address pointer data indicating a head address for reading data from the register file memory. 7. The extended central processing unit according to 6.
【請求項8】 上記集合レジスタセットはデュアルポー
ト・タイプもしくはトリプルポート・タイプにて構成さ
れる、請求項6又は7記載の拡張中央演算処理装置。
8. The extended central processing unit according to claim 6, wherein said set register set is constituted by a dual port type or a triple port type.
JP12354592A 1991-05-17 1992-05-15 Extended central processing unit Expired - Fee Related JP3206960B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12354592A JP3206960B2 (en) 1991-05-17 1992-05-15 Extended central processing unit

Applications Claiming Priority (9)

Application Number Priority Date Filing Date Title
JP11304791 1991-05-17
JP11304591 1991-05-17
JP11304691 1991-05-17
JP3-113046 1992-01-23
JP3-113047 1992-01-23
JP4-10080 1992-01-23
JP3-113045 1992-01-23
JP1008092 1992-01-23
JP12354592A JP3206960B2 (en) 1991-05-17 1992-05-15 Extended central processing unit

Publications (2)

Publication Number Publication Date
JPH05265753A JPH05265753A (en) 1993-10-15
JP3206960B2 true JP3206960B2 (en) 2001-09-10

Family

ID=27519138

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12354592A Expired - Fee Related JP3206960B2 (en) 1991-05-17 1992-05-15 Extended central processing unit

Country Status (1)

Country Link
JP (1) JP3206960B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2787444A2 (en) 2013-04-01 2014-10-08 Nec Corporation Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004157636A (en) 2002-11-05 2004-06-03 Renesas Technology Corp Data processing apparatus
US9430243B2 (en) * 2012-04-30 2016-08-30 Apple Inc. Optimizing register initialization operations

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2787444A2 (en) 2013-04-01 2014-10-08 Nec Corporation Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method
US9690603B2 (en) 2013-04-01 2017-06-27 Nec Corporation Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method

Also Published As

Publication number Publication date
JPH05265753A (en) 1993-10-15

Similar Documents

Publication Publication Date Title
KR960001273B1 (en) Single chip microcomputer
EP0192202B1 (en) Memory system including simplified high-speed data cache
EP0218523B1 (en) programmable access memory
JP4226085B2 (en) Microprocessor and multiprocessor system
JPH03219345A (en) Multiport cache memory control device
EP1269323A2 (en) Multi-tiered memory bank having different data buffer sizes with a programmable bank select
US5696957A (en) Integrated circuit comprising a central processing unit for executing a plurality of programs
JP2523814B2 (en) Moveout system
JP3206960B2 (en) Extended central processing unit
JP3705811B2 (en) Microcontroller with reconfigurable program status word
JP3088303B2 (en) Cache memory bank controller
US6298355B1 (en) Computer system
JPS6319058A (en) Memory device
JPWO2004031963A1 (en) Semiconductor data processor
JP3077807B2 (en) Microcomputer system
JP3197045B2 (en) Extended central processing unit
JPH05165641A (en) Single chip microcomputer
JP4034032B2 (en) Microcomputer with built-in cache
WO2025220131A1 (en) Soft processor
JPH02187881A (en) Semiconductor integrated circuit
JPH04195563A (en) Controller for memory system
JPH033047A (en) Memory with arithmetic function
JPH06175926A (en) Data processor
JPS6336346A (en) Bank switching circuit
JPH0261749A (en) Data transfer device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070706

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20080706

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090706

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090706

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100706

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110706

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees