JPH06309169A - Information processor - Google Patents

Information processor

Info

Publication number
JPH06309169A
JPH06309169A JP5100755A JP10075593A JPH06309169A JP H06309169 A JPH06309169 A JP H06309169A JP 5100755 A JP5100755 A JP 5100755A JP 10075593 A JP10075593 A JP 10075593A JP H06309169 A JPH06309169 A JP H06309169A
Authority
JP
Japan
Prior art keywords
register
registers
register file
information
bank switching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5100755A
Other languages
Japanese (ja)
Inventor
Akira Nishimura
明 西村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP5100755A priority Critical patent/JPH06309169A/en
Publication of JPH06309169A publication Critical patent/JPH06309169A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide the information processor where the switching time of register banks is shortened. CONSTITUTION:A register file 2 where save and restore of information in registers are managed with a group as the unit, an incorporated RAM 3 to/from which information is saved/restored from/to the register file 2 through a private bus with a group as the unit, and a bank switching control circuit 1 which saves or restores only registers, which are discriminated based on information designating registers to be used before and after save or restore with a group as the unit and are used in common before and after save or restore, with a group as the unit are provided and are formed on the same chip to constitute the information processor.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はレジスタバンク機能を有
する情報処理装置のバンク切替えに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to bank switching of an information processing device having a register bank function.

【0002】[0002]

【従来の技術】レジスタバンク切替えは、割り込みやサ
ブルーチンコールの際に行い、割り込み発生前もしくは
サブルーチンコールの前のCPU内部の汎用レジスタの
内容を一時的に退避したり、退避しておいた内容を汎用
レジスタに回復したりするのに使用される。
2. Description of the Related Art Register bank switching is performed at the time of an interrupt or a subroutine call, and the contents of general-purpose registers in the CPU before the interrupt is generated or before the subroutine call are temporarily saved or the saved contents are saved. Used to restore general purpose registers.

【0003】このようなレジスタバンク機能の実現方法
の一つとして、汎用レジスタの退避先にシングルチップ
コンピュータのオンチップ内蔵RAMを使用して行う方
法がある。この時、高速なバンク切替えを行うために、
CPUと内蔵RAMをバンク切替え用の専用バスで接続
しデータ転送を行う。
As one of the methods of realizing such a register bank function, there is a method of using an on-chip built-in RAM of a single-chip computer as a save destination of a general-purpose register. At this time, in order to perform high-speed bank switching,
The CPU and built-in RAM are connected by a dedicated bus for bank switching to transfer data.

【0004】このような従来技術によるマイクロコンピ
ュータの構成図を図3に示す。
FIG. 3 shows a block diagram of such a conventional microcomputer.

【0005】図3において、マイクロコンピュータは、
CPU内部制御回路101とバンク切替え制御回路10
2とレジスタファイル(16ビット×16本,R0−R
15)103と内蔵RAM104から構成される。バン
ク切替え制御回路102には、バンクポインタレジスタ
(BP)105とオールドバンクポインタレジスタ(O
BP)106が含まれる。
In FIG. 3, the microcomputer is
CPU internal control circuit 101 and bank switching control circuit 10
2 and register file (16 bits x 16 lines, R0-R
15) 103 and built-in RAM 104. The bank switching control circuit 102 includes a bank pointer register (BP) 105 and an old bank pointer register (O
BP) 106 is included.

【0006】バンク切替え制御回路102はCPU内部
制御回路101からバンク切替信号を受けとると、レジ
スタファイル103と内蔵RAM104の間のデータ転
送の制御を開始する。バンク切替え制御回路102は内
蔵RAM104へ、リードライト信号(BRW)、イネ
ーブル信号(BEN)の制御信号及びアドレス(BAD
(7:0))を出力して内蔵RAM104を制御する。
また、バンク切替え制御回路102はレジスタファイル
103へリードライト信号(RRW)、イネーブル信号
(REN)、セレクト信号(RSEL(1:0))を出
力してレジスタファイル103の動作を制御する。さら
に、レジスタファイル103と内蔵RAM104は64
ビットのバス(BNKBUS)で接続されている。
When the bank switching control circuit 102 receives a bank switching signal from the CPU internal control circuit 101, it starts control of data transfer between the register file 103 and the internal RAM 104. The bank switching control circuit 102 sends a read / write signal (BRW), an enable signal (BEN) control signal, and an address (BAD) to the built-in RAM 104.
(7: 0)) is output to control the built-in RAM 104.
Further, the bank switching control circuit 102 outputs a read / write signal (RRW), an enable signal (REN), and a select signal (RSEL (1: 0)) to the register file 103 to control the operation of the register file 103. Further, the register file 103 and the internal RAM 104 are 64
It is connected by a bit bus (BNKBUS).

【0007】バンクポインタレジスタ(BP)105
は、バンク切替え後のレジスタファイル103の内蔵R
AM104上の写像領域の開始位置を指示する。オール
ドバンクポインタレジスタ(OBP)106はバンク切
替え前のレジスタファイル103の写像領域の開始位置
を指示する。
Bank pointer register (BP) 105
Is the internal R of the register file 103 after bank switching
The start position of the mapping area on the AM 104 is designated. The old bank pointer register (OBP) 106 indicates the start position of the mapping area of the register file 103 before the bank switching.

【0008】BP,OBPそれぞれは8×N(N=0,
1,2,.....)のバイトアドレスの値を保持し、
8バイト単位で内蔵RAM104上のアドレスを、レジ
スタファイル103の転送領域の開始位置として指定で
きる。
Each of BP and OBP is 8 × N (N = 0,
1, 2 ,. . . . . ) Holds the byte address value of
An address on the internal RAM 104 can be designated as a start position of the transfer area of the register file 103 in units of 8 bytes.

【0009】このような構成において、割り込みやサブ
ルーチンコールが発生すると、CPU内部制御回路10
1はバンク切替え制御回路102にバンク切替信号をア
クティブにして出力し、バンク切替え制御回路102は
これを受けて、図4に示すように以下に示す動作を行
い、レジスタファイル103と内蔵RAM104との間
のデータ転送の制御を行う。
In such a configuration, when an interrupt or a subroutine call occurs, the CPU internal control circuit 10
1 activates and outputs the bank switching signal to the bank switching control circuit 102, and the bank switching control circuit 102 receives this and performs the following operation as shown in FIG. Control data transfer between them.

【0010】まず、第1のクロックサイクルでバンク切
替信号がアクティブになると、バンク切替え制御回路1
02はR0〜R3の64ビット分のデータをBNKBU
Sに出力するようレジスタファイル103に指示を出
し、内蔵RAM104に対してはBNKBUS上のデー
タを内蔵RAM104のOBP〜OBP+7のアドレス
を持つ領域に書き込むよう指示を出す。これにより、R
0〜R3のレジスタが内蔵RAM104のOBP〜OB
P+7の領域にストアされる。
First, when the bank switching signal becomes active in the first clock cycle, the bank switching control circuit 1
02 is BNKBU for 64-bit data of R0 to R3
The register file 103 is instructed to output to S, and the internal RAM 104 is instructed to write the data on BNKBUS to the area of the internal RAM 104 having the address of OBP to OBP + 7. This gives R
Registers 0 to R3 are OBP to OB of the internal RAM 104
It is stored in the area of P + 7.

【0011】次に、第2のクロックサイクルで、バンク
切替え制御回路102は、まずR4〜R7の64ビット
分のデータをBNKBUSに出力するようレジスタファ
イル103に指示を出し、内蔵RAM104に対しては
BNKBUS上のデータを内蔵RAM104のOBP+
8〜OBP+15のアドレスを持つ領域に書き込むよう
指示を出す。これにより、R4〜R7のレジスタが内蔵
RAM104のOBP+8〜OBP+15の領域にスト
アされる。
Next, in the second clock cycle, the bank switching control circuit 102 first issues an instruction to the register file 103 to output 64-bit data of R4 to R7 to BNKBUS, and to the internal RAM 104. Data on BNKBUS is stored in the internal RAM 104 as OBP +
It issues an instruction to write in an area having an address of 8 to OBP + 15. As a result, the registers R4 to R7 are stored in the areas of OBP + 8 to OBP + 15 of the internal RAM 104.

【0012】次に、第3のクロックサイクルで、バンク
切替え制御回路102は、まずR8〜R11の64ビッ
ト分のデータをBNKBUSに出力するようレジスタフ
ァイル103に指示を出し、内蔵RAM104に対して
はBNKBUS上のデータを内蔵RAM104のOBP
+16〜OBP+23のアドレスを持つ領域に書き込む
よう指示を出す。これにより、R8〜R11のレジスタ
が内蔵RAM104のOBP+16〜OBP+23の領
域にストアされる。
Next, in the third clock cycle, the bank switching control circuit 102 first issues an instruction to the register file 103 to output 64-bit data of R8 to R11 to BNKBUS, and to the internal RAM 104. OBP of built-in RAM 104 for data on BNKBUS
It issues an instruction to write in an area having an address of +16 to OBP + 23. As a result, the registers R8 to R11 are stored in the areas of OBP + 16 to OBP + 23 of the internal RAM 104.

【0013】次に、第4のクロックサイクルで、バンク
切替え制御回路102は、まずR12〜R15の64ビ
ット分のデータをBNKBUSに出力するようレジスタ
ファイル102に指示を出し、内蔵RAM104に対し
てはBNKBUS上のデータを内蔵RAM104のOB
P+24〜OBP+31のアドレスを持つ領域に書き込
むよう指示を出す。これにより、R12〜R15のレジ
スタが内蔵RAM104のOBP+24〜OBP+31
の領域にストアされる。
Next, in the fourth clock cycle, the bank switching control circuit 102 first issues an instruction to the register file 102 to output 64-bit data of R12 to R15 to BNKBUS, and to the internal RAM 104. OB of the built-in RAM 104 for the data on BNKBUS
It issues an instruction to write in an area having an address of P + 24 to OBP + 31. As a result, the registers of R12 to R15 become OBP + 24 to OBP + 31 of the internal RAM 104.
Stored in the area.

【0014】次に、第5のクロックサイクルで、バンク
切替え制御回路102は、内蔵RAM104に対しては
BP〜BP+7のアドレスにある64ビットのデータを
BNKBUSに出力するように指示を出し、レジスタフ
ァイル103に対してはBNKBUS上のデータをR0
〜R3に書き込むよう指示を出す。これにより、内蔵R
AM104のBP〜BP+7領域のデータがR0〜R3
にロードされる。
Next, in the fifth clock cycle, the bank switching control circuit 102 issues an instruction to the built-in RAM 104 to output the 64-bit data at the addresses BP to BP + 7 to the BNKBUS, and then the register file. The data on BNKBUS is R0 for 103
Instruct to write to ~ R3. As a result, the built-in R
The data in the BP to BP + 7 area of AM104 is R0 to R3
Loaded in.

【0015】次に、第6のクロックサイクルで、バンク
切替え制御回路102は、内蔵RAM104に対しては
BP+8〜BP+15のアドレスにある64ビットのデ
ータをBNKBUSに出力するように指示を出し、レジ
スタファイル103に対してはBNKBUS上のデータ
をR4〜R7に書き込むよう指示を出す。これにより、
内蔵RAM104のBP+8〜BP+15領域のデータ
がR4〜R7にロードされる。
Next, in the sixth clock cycle, the bank switching control circuit 102 issues an instruction to the built-in RAM 104 to output the 64-bit data at the addresses BP + 8 to BP + 15 to the BNKBUS, and then the register file. An instruction is issued to 103 to write the data on BNKBUS to R4 to R7. This allows
The data in the BP + 8 to BP + 15 areas of the internal RAM 104 are loaded into R4 to R7.

【0016】次に、第7のクロックサイクルで、バンク
切替え制御回路102は、内蔵RAM104に対しては
BP+16〜BP+23のアドレスにある64ビットの
データをBNKBUSに出力するように指示を出し、レ
ジスタファイル103に対してはBNKBUS上のデー
タをR8〜R11に書き込むよう指示を出す。これによ
り、内蔵RAM104のBP+16〜BP+23領域の
データがR8〜R11にロードされる。
Next, in the seventh clock cycle, the bank switching control circuit 102 issues an instruction to the built-in RAM 104 to output the 64-bit data at the addresses of BP + 16 to BP + 23 to BNKBUS, and to register file. An instruction is issued to 103 to write the data on BNKBUS to R8 to R11. As a result, the data in the BP + 16 to BP + 23 areas of the internal RAM 104 are loaded into R8 to R11.

【0017】最後に、第8のクロックサイクルで、バン
ク切替え制御回路102は、内蔵RAM104に対して
はBP+24〜BP+31のアドレスにある64ビット
のデータをBNKBUSに出力するように指示を出し、
レジスタファイル103に対してはBNKBUS上のデ
ータをR12〜R15に書き込むよう指示を出す。これ
により、内蔵RAM104のBP+24〜BP+31領
域のデータがR12〜R15にロードされる。
Finally, in the eighth clock cycle, the bank switching control circuit 102 issues an instruction to the built-in RAM 104 to output the 64-bit data at the addresses BP + 24 to BP + 31 to BNKBUS,
The register file 103 is instructed to write the data on BNKBUS to R12 to R15. As a result, the data in the BP + 24 to BP + 31 areas of the internal RAM 104 are loaded into R12 to R15.

【0018】このようにして、レジスタファイル103
の全内容のストアに4サイクル、レジスタファイル10
3の全内容のロードに4サイクル、総計8サイクルでレ
ジスタバンクの切替えが行われる。この時、内蔵RAM
104上のデータとレジスタファイルのデータ転送の様
子は図4に示すようになり、レジスタファイル103の
全内容が内蔵RAM104のOBPとOBP+31まで
の領域にストアされ、内蔵RAM104のBPからBP
+31の領域のデータがレジスタファイル103にロー
ドされる。
In this way, the register file 103
4 cycles to store all contents of, register file 10
The register bank switching is performed in 4 cycles for loading all contents of 3 and a total of 8 cycles. At this time, built-in RAM
The state of data transfer in the register file 103 and the data in the register file 104 is as shown in FIG. 4, and the entire contents of the register file 103 are stored in the areas of the internal RAM 104 up to OBP and OBP + 31.
The data in the +31 area is loaded into the register file 103.

【0019】一方、特開昭63−13842号公報なら
びに特開平2−173826号公報には、タスク切り換
えやサブルーチンの呼び出し等が発生した場合に、必要
なレジスタのみを退避、回復する情報処理装置が記載さ
れている。
On the other hand, Japanese Patent Laid-Open No. 63-13842 and Japanese Patent Laid-Open No. 2-1738226 disclose an information processing apparatus that saves and restores only necessary registers when task switching or subroutine call occurs. Have been described.

【0020】しかし、これらの情報処理装置は、汎用レ
ジスタの構造がバンク構造でなく、個々のレジスタ毎に
退避、回復の制御を行なっている。このため、退避、回
復の処理効率が悪く、処理能力の低下を招いていた。さ
らに、上記情報処理装置は、汎用レジスタの情報が退
避、回復される主記憶装置が汎用レジスタやCPUと同
一チップ上に形成されておらず、汎用レジスタと主記憶
装置間での情報の入出力に専用のバスやデータバスが必
要になっていた。
However, in these information processing apparatuses, the structure of the general-purpose register is not a bank structure, and save / restore control is performed for each individual register. For this reason, the processing efficiency of evacuation and recovery is poor, resulting in a decrease in processing capacity. Further, in the above information processing device, the main storage device for saving and restoring the information of the general-purpose register is not formed on the same chip as the general-purpose register and the CPU, and the input / output of information between the general-purpose register and the main storage device is performed. It required a dedicated bus and data bus.

【0021】このため、専用バスを設ける場合には、汎
用レジスタを含むチップと主記憶装置を含むチップの別
々のチップ間にバスを設けなければならず、転送データ
のビット数が多くなると、専用バスの形成が困難になっ
ていた。一方、情報処理装置に備えられたデータバスを
使用する場合には、汎用レジスタの退避、回復が行われ
る際にデータバスが専有され、他のデータ転送ができ
ず、処理効率の低下を招いていた。
For this reason, when a dedicated bus is provided, the bus must be provided between separate chips of a chip including a general-purpose register and a chip including a main memory device. When the number of bits of transfer data increases, the dedicated bus is used. The formation of the bus was difficult. On the other hand, when the data bus provided in the information processing device is used, the data bus is monopolized when the general-purpose register is saved and restored, and other data cannot be transferred, resulting in a decrease in processing efficiency. It was

【0022】[0022]

【発明が解決しようとする課題】以上説明したように、
図3及び図4に示す従来の情報処理装置にあっては、同
一チップ上にある内蔵RAMと専用バスを介してデ−タ
転送することによりレジスタファイルのすべての内容を
退避、回復していた。このため、退避、回復のために多
くの時間が必要となり、バンク切替えを必要とする処理
の処理効率が低下するという不具合を招いていた。
As described above,
In the conventional information processing apparatus shown in FIGS. 3 and 4, all the contents of the register file are saved and restored by transferring the data through the built-in RAM and the dedicated bus on the same chip. . For this reason, a large amount of time is required for saving and restoring, which causes a problem that the processing efficiency of the processing that requires bank switching is reduced.

【0023】一方、特開昭63−138432号公報や
特開平2−173826号公報に開示された情報処理装
置にあっては、個々のレジスタ毎に退避、回復が制御さ
れていたとともに、汎用レジスタと主記憶装置が1チッ
プ化されていないため、転送効率の低下や転送バスの形
成が困難になるという不具合を招いていた。
On the other hand, in the information processing apparatus disclosed in Japanese Patent Laid-Open No. 63-138432 or Japanese Patent Laid-Open No. 2-1738226, saving / restoring is controlled for each individual register and a general-purpose register is used. Since the main memory device is not integrated into one chip, there are problems that the transfer efficiency is lowered and it is difficult to form the transfer bus.

【0024】そこで、この発明は、上記に鑑みてなされ
たものであり、その目的とするところは、レジスタファ
イルの退避、回復に要する時間を短縮して、処理能力の
向上を図った情報処理装置を提供することにある。
Therefore, the present invention has been made in view of the above, and an object of the present invention is to reduce the time required for saving and recovering a register file to improve the processing capability. To provide.

【0025】[0025]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、レジスタファイルに含まれ
るレジスタがグル−プ化されて、グル−プ単位でレジス
タの情報の退避、回復が管理されるレジスタファイル
と、レジスタファイルとの間で専用バスを介してレジス
タの情報がグル−プ単位で退避、回復される記憶装置
と、退避前又は回復前に使用しているレジスタをグル−
プ単位で指定する情報及び退避後又は回復後に使用する
レジスタをグル−プ単位で指定する情報を保持し、保持
された情報に基づいてレジスタの退避前後又は回復前後
で共通に使用されるレジスタのグル−プを判別し、共通
に使用されるレジスタのみをグル−プ単位で退避又は回
復するバンク切替え制御手段とを有し、レジスタファイ
ル、記憶装置及びバンク切替え制御手段が同一チップ上
に形成されてされて構成される。
In order to achieve the above-mentioned object, the invention according to claim 1 is such that the registers included in the register file are grouped and the information of the registers is saved in group units. A register file for which recovery is managed, a storage device in which register information is saved and recovered in group units via a dedicated bus between the register file, and the registers used before or after saving Group
Holds the information specified in units of groups and the information used in groups to specify the registers to be used after saving or restoring, and based on the held information, registers commonly used before and after saving or recovering registers It has a bank switching control means for discriminating a group and saving or recovering only commonly used registers in group units. The register file, the storage device and the bank switching control means are formed on the same chip. It is composed of

【0026】請求項2記載の発明は、請求項1記載の情
報処理装置において、退避又は回復前後で使用されるレ
ジスタのグル−プは、使用される上限又は下限のレジス
タ番号で指定され、使用されるレジスタの個数は、1サ
イクルタイムで退避、回復が可能なレジスタの個数の整
数倍で規定されて構成される。
According to a second aspect of the present invention, in the information processing apparatus according to the first aspect, the group of registers used before and after saving or restoring is specified by the upper or lower register number used. The number of registered registers is defined by an integral multiple of the number of registers that can be saved and restored in one cycle time.

【0027】[0027]

【作用】上記構成において、請求項1記載の発明は、レ
ジスタファイル及び記憶装置が形成された同一チップ上
に形成される専用バスを介して、レジスタファイルと記
憶装置との間でグル−プ単位で情報の退避、回復を行う
ようにしている。
In the above structure, the invention according to claim 1 provides a group unit between the register file and the storage device via a dedicated bus formed on the same chip in which the register file and the storage device are formed. The information is saved and restored in.

【0028】[0028]

【実施例】以下、図面を用いてこの発明の実施例を説明
する。
Embodiments of the present invention will be described below with reference to the drawings.

【0029】図1はこの発明の一実施例に係わる情報処
理装置の構成を示す図である。図1に示す実施例の情報
処理装置は、レジスタファイルがグル−プ化されて内蔵
RAMとデ−タの転送を行ってレジスタバンク切替えを
行うマイクロコンピュ−タにおいて、レジスタバンクの
切替え前後で共通に使用するレジスタに対してのみ退
避、回復を行うものであり、レジスタファイルの情報が
グル−プ単位で退避、回復される記憶装置となる内蔵R
AMとレジスタファイルとは、同一のチップ上に形成さ
れて1チップ化されている。
FIG. 1 is a diagram showing the configuration of an information processing apparatus according to an embodiment of the present invention. The information processing apparatus of the embodiment shown in FIG. 1 is commonly used before and after register bank switching in a microcomputer in which a register file is grouped to transfer data to a built-in RAM to switch register banks. The built-in R functions as a storage device that saves and restores only the registers used for backup and restore, and the information in the register file is saved and restored in group units.
The AM and the register file are formed on the same chip and integrated into one chip.

【0030】図1において、この実施例の装置はバンク
切替え制御回路1と図3に示すレジスタファイルと同様
なレジスタファイル2(16ビット×16本)と内蔵R
AM3から構成されている。バンク切替え制御回路1に
は、バンクサイズレジスタ(BS)4とバンクポインタ
レジスタ(BP)5とオールドバンクサイズレジスタ
(OBS)6とオールドバンクポインタレジスタ(OB
P)7とデータ転送回数レジスタ(CNTR)8が含ま
れる。バンク切替え制御回路1はバンク切替信号を受け
とると、レジスタファイル2と内蔵RAMの間のデータ
転送の制御を行う。バンク切替え制御回路1から内蔵R
AM3へは、リードライト信号(BRW)、イネーブル
信号(BEN)の制御信号及びアドレス(BAD(7:
0))が供給される。バンク切替え制御回路1からレジ
スタファイル2へは、リードライト信号(RRW)、イ
ネーブル信号(REN)、セレクト信号(RSEL
(1:0))が供給される。また、レジスタファイル2
と内蔵RAM3は64ビットのバス(BNKBUS)で
接続されている。
In FIG. 1, the apparatus of this embodiment has a bank switching control circuit 1, a register file 2 (16 bits × 16) similar to the register file shown in FIG. 3, and a built-in R.
It is composed of AM3. The bank switching control circuit 1 includes a bank size register (BS) 4, a bank pointer register (BP) 5, an old bank size register (OBS) 6, and an old bank pointer register (OB).
P) 7 and a data transfer count register (CNTR) 8 are included. When receiving the bank switching signal, the bank switching control circuit 1 controls the data transfer between the register file 2 and the internal RAM. Bank switching control circuit 1 to built-in R
To the AM3, a read / write signal (BRW), an enable signal (BEN) control signal, and an address (BAD (7:
0)) is supplied. A read / write signal (RRW), an enable signal (REN), and a select signal (RSEL) are sent from the bank switching control circuit 1 to the register file 2.
(1: 0)) is supplied. Also, register file 2
And the built-in RAM 3 are connected by a 64-bit bus (BNKBUS).

【0031】バンクサイズレジスタ(BS)4はバンク
切替え後に使用可能なレジスタを、オールドバンクサイ
ズレジスタ(OBS)6はバンク切替え前に使用可能な
レジスタを指定する。BS,OBSはともに2ビットの
レジスタで、表1に示すように使用可能なレジスタを定
義する。
The bank size register (BS) 4 specifies a register that can be used after bank switching, and the old bank size register (OBS) 6 specifies a register that can be used before bank switching. Both BS and OBS are 2-bit registers and define usable registers as shown in Table 1.

【0032】[0032]

【表1】 指定方法としては、サブルーチンコ−ルの場合には、ソ
フトウェアの実行による所定の命令によりそれぞれのレ
ジスタに情報がセットされる。一方、割込み処理の場合
には、割込み処理の前処理において割込みの内容が判別
されて、判別された内容に基づいて情報がそれぞれのレ
ジスタにセットされる。
[Table 1] As a designation method, in the case of a subroutine call, information is set in each register by a predetermined instruction executed by software. On the other hand, in the case of interrupt processing, the content of the interrupt is determined in the preprocessing of the interrupt processing, and the information is set in each register based on the determined content.

【0033】データ転送回数レジスタ(CNTR)8に
は、BS4とOBS6の内容に従って、レジスタファイ
ル2と内蔵RAM3間のデータ転送の回数が設定され
る。
In the data transfer number register (CNTR) 8, the number of data transfers between the register file 2 and the internal RAM 3 is set according to the contents of BS4 and OBS6.

【0034】バンクポインタレジスタ(BP)5は、バ
ンク切替え後のレジスタファイル2の内蔵RAM3上の
写像領域の開始位置を指示する。オールドバンクポイン
タレジスタ(OBP)7はバンク切替え前のレジスタフ
ァイル2の写像領域の開始位置を指示する。
The bank pointer register (BP) 5 indicates the start position of the mapping area on the internal RAM 3 of the register file 2 after bank switching. The old bank pointer register (OBP) 7 indicates the start position of the mapping area of the register file 2 before bank switching.

【0035】BP5,OBP7は8×N(N=0,1,
2.....)のバイトアドレスの値をもち、8バイト
単位で内蔵RAM3上のアドレスを、写像領域の開始位
置として指定できる。
BP5 and OBP7 are 8 × N (N = 0, 1,
2. . . . . ), The address on the internal RAM 3 can be designated as the start position of the mapping area in units of 8 bytes.

【0036】このような構成において、割り込みやサブ
ルーチンコールが発生すると、CPU内部制御回路10
1はレジスタバンク切替信号をアクティブにして出力
し、バンク切替え制御回路1はこれを受けて以下に示す
動作を行い、レジスタファイル2と内蔵RAM3との間
のデータ転送の制御を行う。
In such a configuration, when an interrupt or a subroutine call occurs, the CPU internal control circuit 10
1 activates and outputs the register bank switching signal, and the bank switching control circuit 1 receives this and performs the following operation to control the data transfer between the register file 2 and the internal RAM 3.

【0037】まず、レジスタバンク切替信号がアクティ
ブになると、バンク切替え制御回路1はBS4とOBS
6の小さい方の値から、データ転送の回数を決定し、表
2に示すようにデータ転送回数レジスタ(CNTR)8
に値をセットする。なお、BS4とOBS6が同じ値の
場合はその値がCNTR8にセットされる。そして、R
0〜R3の64ビット分のデータをBNKBUSに出力
するようレジスタファイル2に指示を出し、内蔵RAM
3に対してはBNKBUS上のデータを内蔵RAM3の
OBP〜OBP+7のアドレスを持つ領域に書き込むよ
う指示を出し、R0〜R3を内蔵RAM3のOBP〜O
BP+7の領域にストアする。そして、データ転送終了
回数レジスタ(CNTR)8の値を「1」デクリメント
する。このようにして、レジスタファイル2から内蔵R
AM3へのデータ転送をカウンタが「0」になるまで繰
り返し行い、必要なレジスタファイル2の内容だけを内
蔵RAM3にストアする。
First, when the register bank switching signal becomes active, the bank switching control circuit 1 outputs BS4 and OBS.
The number of data transfers is determined from the smaller value of 6, and the data transfer count register (CNTR) 8 is set as shown in Table 2.
Set the value to. If BS4 and OBS6 have the same value, that value is set in CNTR8. And R
Instruct the register file 2 to output 64-bit data of 0 to R3 to BNKBUS,
3 is instructed to write the data on BNKBUS to the area of the internal RAM 3 having the address of OBP to OBP + 7, and R0 to R3 are written to the internal RAM 3 of OBP to OBP.
Store in the area of BP + 7. Then, the value of the data transfer end count register (CNTR) 8 is decremented by "1". In this way, the internal R from the register file 2
Data transfer to AM3 is repeated until the counter reaches "0", and only the necessary contents of the register file 2 are stored in the internal RAM3.

【0038】[0038]

【表2】 次に、バンク切替え制御回路1はBS4とOBS6の小
さい方の値から、データ転送の回数を決定して回数レジ
スタ(CNTR)8に値をセットする。そして、内蔵R
AM3に対してBP〜BP+7の領域の64ビットのデ
ータをBNKBUSに出力するように指示し、レジスタ
ファイル2に対してはBNKBUSのデータをR0〜R
3に書き込むように指示を出し、内蔵RAM3のBP〜
BP+7の領域のデータをR0〜R3にロードする。そ
して、データ転送終了後回数レジスタ(CNTR)8の
値を「1」デクリメントする。このようにして、レジス
タファイル2から内蔵RAM3へのデータ転送をカウン
タが「0」になるまで繰り返し行い、必要なレジスタフ
ァイル2の内容だけを内蔵RAM3にロードする。
[Table 2] Next, the bank switching control circuit 1 determines the number of times of data transfer from the smaller value of BS4 and OBS6, and sets the value in the number register (CNTR) 8. And built-in R
It instructs the AM3 to output the 64-bit data in the area of BP to BP + 7 to BNKBUS, and the register file 2 outputs the data of BNKBUS to R0 to R
3 to write to BP of internal RAM3
The data in the area of BP + 7 is loaded into R0 to R3. Then, after the data transfer is completed, the value of the count register (CNTR) 8 is decremented by "1". In this way, data transfer from the register file 2 to the internal RAM 3 is repeated until the counter reaches "0", and only the necessary contents of the register file 2 are loaded into the internal RAM 3.

【0039】例えばBS=01,OBS=10の時のデ
ータ転送の様子は図2に示すようになる。この時、共通
に使用されるレジスタはR0−R7の8本のレジスタで
あり、この8本のレジスタについてだけ内蔵RAM3へ
のストア・ロードの操作が行われる。従って、この場合
はストアに2クロック、ロードに2クロックで、総計4
クロックのデータ転送時間となる。
For example, the state of data transfer when BS = 01, OBS = 10 is as shown in FIG. At this time, the registers commonly used are eight registers R0 to R7, and the store / load operation to the internal RAM 3 is performed only for these eight registers. Therefore, in this case, 2 clocks for store and 2 clocks for load, total 4
This is the clock data transfer time.

【0040】上記実施例では、共通して使用するレジス
タがR0−R3の4本のみである場合には、レジスタフ
ァイル2のストア/ロードに必要な時間は2サイクルで
ある。また、共通して使用するレジスタがR0−R7の
8本のみである場合には、レジスタファイルのストア/
ロードに必要な時間は4サイクルである。さらに、共通
して使用するレジスタがR0−R11の12本のみであ
る場合には、レジスタファイルのストア/ロードに必要
な時間は6サイクルである。また、共通して使用するレ
ジスタがR0−R15の全レジスタである場合には、レ
ジスタファイルのストア/ロードに必要な時間は8サイ
クルである。
In the above embodiment, when only four registers R0 to R3 are commonly used, the time required to store / load the register file 2 is two cycles. In addition, if only eight registers R0 to R7 are commonly used, register file store / store
The time required for loading is 4 cycles. Further, when only 12 registers R0 to R11 are commonly used, the time required to store / load the register file is 6 cycles. If the registers commonly used are all the registers R0 to R15, the time required to store / load the register file is 8 cycles.

【0041】従って、従来技術では常に8クロックかか
っていた転送時間が、共通に使用するレジスタが何本あ
るかによって0〜6クロックのクロックサイクル分短縮
される。これにより高速なレジスタバンクバンク切替が
可能になり、システム性能の高速化が可能になる。
Therefore, the transfer time, which always takes 8 clocks in the prior art, is shortened by 0 to 6 clock cycles depending on how many registers are commonly used. As a result, high-speed register bank switching can be performed, and system performance can be increased.

【0042】また、上記実施例にあっては、レジスタフ
ァイルをグル−プ化して8バイト分(4本分)のレジス
タ単位で退避、回復を行うようにしているので、退避、
回復のための管理情報がレジスタを個別に管理する場合
に比べて少なくなり、管理を容易に行うことができる。
さらに、レジスタファイル2と内蔵RAM3とを同一チ
ップ上に形成しているので、レジスタファイル2と内蔵
RAM3とを接続する専用バス(BNKBUS)は、別
チップとした場合に比べて容易に形成することができ
る。
Further, in the above embodiment, since the register file is grouped and saved and restored in units of 8 bytes (4 registers), the saving,
The management information for recovery is smaller than that when the registers are individually managed, and the management can be performed easily.
Further, since the register file 2 and the built-in RAM 3 are formed on the same chip, the dedicated bus (BNKBUS) for connecting the register file 2 and the built-in RAM 3 can be easily formed as compared with the case of using a different chip. You can

【0043】[0043]

【発明の効果】レジスタバンク切替えの前後で使用する
レジスタに関する情報を保持し、この情報からレジスタ
バンク切替え前後で共通に使用するレジスタのみを、ス
トア/ロードすることにより、転送すべきデータ量が減
少するので、データ転送に要する時間が短縮され、レジ
スタバンク切替えの時間を短縮することが可能になる。
The amount of data to be transferred is reduced by holding information about registers used before and after register bank switching and storing / loading only the register commonly used before and after register bank switching from this information. Therefore, the time required for data transfer is shortened, and the time for register bank switching can be shortened.

【0044】また、レジスタをグル−プ分けしてグル−
プ単位で情報の退避、回復を行うようにしたので、退
避、回復の管理が容易となる。さらに、装置を1チップ
化しているので、退避、回復のための情報の転送路とな
る専用バスを容易に形成することが可能となる。
The registers are grouped into groups and grouped.
Since information is backed up and recovered in units of groups, management of backup and recovery becomes easy. Furthermore, since the device is integrated into one chip, it is possible to easily form a dedicated bus that serves as a transfer path of information for saving and restoring.

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

【図1】この発明の一実施例に係わる情報処理装置の構
成を示す図である。
FIG. 1 is a diagram showing a configuration of an information processing apparatus according to an embodiment of the present invention.

【図2】図1に示す装置における情報転送の様子を示す
図である。
FIG. 2 is a diagram showing how information is transferred in the device shown in FIG.

【図3】レジスタバンク切替え機能を備えた従来の情報
処理装置の構成を示す図である。
FIG. 3 is a diagram showing a configuration of a conventional information processing device having a register bank switching function.

【図4】図3に示す装置における情報転送の様子を示す
図である。
FIG. 4 is a diagram showing how information is transferred in the device shown in FIG.

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

1,102 バンク切替え制御回路 2,103 レジスタファイル 3,104 内蔵RAM 4 バンクサイズレジスタ 5,105 バンクポインタレジスタ 6 オールドバンクサイズレジスタ 7,106 オールドバンクポインタレジスタ 8 データ転送回数レジスタ 101 CPU内部制御回路 1,102 bank switching control circuit 2,103 register file 3,104 built-in RAM 4 bank size register 5,105 bank pointer register 6 old bank size register 7,106 old bank pointer register 8 data transfer count register 101 CPU internal control circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 レジスタファイルに含まれるレジスタが
グル−プ化されて、グル−プ単位でレジスタの情報の退
避、回復が管理されるレジスタファイルと、 レジスタファイルとの間で専用バスを介してレジスタの
情報がグル−プ単位で退避、回復される記憶装置と、 退避前又は回復前に使用しているレジスタをグル−プ単
位で指定する情報及び退避後又は回復後に使用するレジ
スタをグル−プ単位で指定する情報を保持し、保持され
た情報に基づいてレジスタの退避前後又は回復前後で共
通に使用されるレジスタのグル−プを判別し、共通に使
用されるレジスタのみをグル−プ単位で退避又は回復す
るバンク切替え制御手段とを有し、 レジスタファイル、記憶装置及びバンク切替え制御手段
が同一チップ上に形成されてなることを特徴とする情報
処理装置。
1. A register file in which a register included in the register file is grouped, and saving and recovery of the register information is managed in group units, and a register file is provided via a dedicated bus. A storage device in which register information is saved and restored in group units, and information that specifies the registers used before or after restoration in group units and the registers used after or after restoration are grouped. Holds information specified in units of groups, determines the group of registers that are commonly used before and after saving or restoring the registers based on the retained information, and groups only the commonly used registers. Bank switching control means for saving or restoring in units, and the register file, the storage device, and the bank switching control means are formed on the same chip. Information processing equipment.
【請求項2】 退避又は回復前後で使用されるレジスタ
は、使用される上限又は下限のレジスタ番号で指定さ
れ、使用されるレジスタの個数は、1サイクルタイムで
退避、回復が可能なレジスタの個数の整数倍で規定され
てなることを特徴とする請求項1記載の情報処理装置。
2. The registers used before and after saving or restoring are specified by the upper or lower register numbers used, and the number of registers used is the number of registers that can be saved and restored in one cycle time. The information processing apparatus according to claim 1, wherein the information processing apparatus is defined by an integral multiple of.
JP5100755A 1993-04-27 1993-04-27 Information processor Pending JPH06309169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5100755A JPH06309169A (en) 1993-04-27 1993-04-27 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5100755A JPH06309169A (en) 1993-04-27 1993-04-27 Information processor

Publications (1)

Publication Number Publication Date
JPH06309169A true JPH06309169A (en) 1994-11-04

Family

ID=14282340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5100755A Pending JPH06309169A (en) 1993-04-27 1993-04-27 Information processor

Country Status (1)

Country Link
JP (1) JPH06309169A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7290124B2 (en) 2002-11-05 2007-10-30 Renesas Technology Corp. Data processor employing register banks with overflow protection to enhance interrupt processing and task switching
JP2014130606A (en) * 2005-10-20 2014-07-10 Qualcomm Incorporated Backing store buffer for register save engine of stacked register file
JP2015001947A (en) * 2013-06-18 2015-01-05 株式会社東芝 Information processing device and program
JP2020077373A (en) * 2014-06-13 2020-05-21 株式会社半導体エネルギー研究所 Semiconductor device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7290124B2 (en) 2002-11-05 2007-10-30 Renesas Technology Corp. Data processor employing register banks with overflow protection to enhance interrupt processing and task switching
JP2014130606A (en) * 2005-10-20 2014-07-10 Qualcomm Incorporated Backing store buffer for register save engine of stacked register file
JP2015001947A (en) * 2013-06-18 2015-01-05 株式会社東芝 Information processing device and program
JP2020077373A (en) * 2014-06-13 2020-05-21 株式会社半導体エネルギー研究所 Semiconductor device

Similar Documents

Publication Publication Date Title
EP0511674B1 (en) Single chip microcomputer
EP0333594B1 (en) Direct memory access controller
JP3676882B2 (en) Microprocessor and its peripheral devices
JP2002342262A (en) Direct memory access controller and direct memory access control method
JPH06309169A (en) Information processor
EP0560393B1 (en) Microprocessor and data processing system with register file
JPH0696007A (en) Dma transfer system
EP0787326B1 (en) System and method for processing of memory data and communication system comprising such system
JPH05165641A (en) Single chip microcomputer
JP2707256B2 (en) Micro computer
JP2004062449A (en) Microprocessor and its processing method
JPS6299827A (en) Buffer control system
JPH05233440A (en) Data transfer system equipped with buffer function
JPH0376501B2 (en)
JP2604051B2 (en) Data transfer method
JPH03198452A (en) Line control system by housing reception buffer
JPH0713765A (en) Fast data transfer device
JPH02193235A (en) Detection of bus access exception
JPH0685154B2 (en) Intermediate buffer control method
JPS60129841A (en) Interruption control circuit
JPH02133854A (en) Dma controller capable of access to transfer enable/ unable memory
JPH02277160A (en) Data processor
JPS6239779B2 (en)
JP2000035958A (en) Vector instruction processor, buffer control method, vector operation processor and information processor
JPH0227491A (en) Data processor