JPH0573303A - Processor - Google Patents

Processor

Info

Publication number
JPH0573303A
JPH0573303A JP3235924A JP23592491A JPH0573303A JP H0573303 A JPH0573303 A JP H0573303A JP 3235924 A JP3235924 A JP 3235924A JP 23592491 A JP23592491 A JP 23592491A JP H0573303 A JPH0573303 A JP H0573303A
Authority
JP
Japan
Prior art keywords
bank
register
information
address
unit
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
JP3235924A
Other languages
Japanese (ja)
Inventor
Keiji Takebe
啓二 建部
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 JP3235924A priority Critical patent/JPH0573303A/en
Publication of JPH0573303A publication Critical patent/JPH0573303A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable a high speed reference of different bank information by providing a designation means designating the address space of the first storage means based on information indicating a unit bank and information indicating the position of the register in the unit bank. CONSTITUTION:The contents of registers of banks 2 to 5 of a bank RAM 1 are stored in a general register group 3. When referring to the content of the register R2 of a bank 6 for interrupt routine different from this bank, the bank number 6 is transferred from a general register Rn where the bank number 6 is set to a shift register SR 1. Simultaneously, the register number 2 of the register SR2 is supplied to one input of a computing element 4. The address of the operation result is sent to an address latch 81 of a BIU 8, and the bank RAM 1 is accessed. The register R2 of the bank 6 is selectively designated, and the reference of the contents is enabled by outputting the held content to the data latch 82.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、バンク構造のレジス
タを有するプロセッサに関し、特にバンクを切り換える
ことなく他のバンクのレジスタを参照するプロセッサに
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor having a bank structure register, and more particularly to a processor which refers to a register of another bank without switching banks.

【0002】[0002]

【従来の技術】従来のプロセッサにあっては、そのCP
U中の汎用レジスタの使用数がチップ面積の縮小化等の
観点から制限を受けている。このため、RAM等をバン
ク構造化して汎用レジスタ群を複数セット備えるように
したものがある。
2. Description of the Related Art In a conventional processor, its CP
The number of general-purpose registers used in U is limited from the viewpoint of reducing the chip area. For this reason, there is one in which a RAM or the like is formed into a bank structure so as to include a plurality of sets of general-purpose register groups.

【0003】このようなバンク構造を採用しているプロ
セッサにあっては、例えば図4に示すように、メインル
ーチン用の汎用レジスタ群101としてバンクレジスタ
102のバンク“0”が割り当てられ、割込み処理ルー
チン用の汎用レジスタ群103としてバンクレジスタ1
02のバンク“3”が割り当てられている。バンクレジ
スタ102のそれぞれのバンクは、バンク指定レジスタ
104の内容によって選択指定される。
In a processor employing such a bank structure, for example, as shown in FIG. 4, a bank "0" of a bank register 102 is assigned as a general-purpose register group 101 for a main routine, and interrupt processing is performed. Bank register 1 as general-purpose register group 103 for routine
No. 02 bank “3” is assigned. Each bank of the bank register 102 is selectively designated by the contents of the bank designation register 104.

【0004】このような汎用レジスタ群103の割り当
てにあって、バンク指定レジスタ104に“0”がセッ
トされてバンク“0”が選択指定されメインルーチンが
実行されている時に、実行されているルーチンで使用す
るバンクとは異なるバンクのレジスタを参照したい場
合、例えば、割込み処理ルーチン用のバンク“3”にお
ける汎用レジスタ群103の例えばレジスタR6に保持
された情報を参照しようとする場合には、以下に示す手
順で行なわれる。
In the allocation of the general-purpose register group 103, the routine executed when "0" is set in the bank specifying register 104, the bank "0" is selected and specified, and the main routine is executed. When it is desired to refer to a register in a bank different from the bank used in, for example, to refer to the information held in the register R6 of the general-purpose register group 103 in the bank "3" for the interrupt processing routine, The procedure is shown in.

【0005】まず、バンク指定レジスタ104に割込み
処理ルーチン用のバンク“3”を示す“3”を書込み、
バンクレジスタ102のバンクをバンク“0”からバン
ク“3”に切り換える。その後、バンク“3”のレジス
タR6に保持された情報をバンク以外の情報格納領域に
書込む。次に、バンク指定レジスタ104に“0”を書
込み、バンクレジスタ102のバンクをバンク“3”か
らバンク“0”に再度切り換えてバンクをバンク“0”
に戻す。このような状態において、バンク以外の情報格
納領域に書込まれたバンク“3”のレジスタR6に保持
されていた情報を参照する。
First, "3" indicating the bank "3" for the interrupt processing routine is written in the bank designation register 104,
The bank of the bank register 102 is switched from the bank “0” to the bank “3”. After that, the information held in the register R6 of the bank "3" is written in the information storage area other than the bank. Next, "0" is written in the bank designation register 104, the bank of the bank register 102 is switched from the bank "3" to the bank "0" again, and the bank is changed to the bank "0".
Return to. In such a state, the information held in the register R6 of the bank "3" written in the information storage area other than the bank is referred to.

【0006】このように、異なるバンクの情報を参照す
る場合には、バンクの切り換え動作を2回行なわなけれ
ばならず、そのための操作処理が複雑になるとともに、
参照するまでにかなりの時間がかかっていた。
As described above, when referring to the information of different banks, it is necessary to perform the switching operation of the banks twice, which complicates the operation processing for that purpose, and
It took me a long time to refer.

【0007】一方、他の手順としては、情報の複写とい
う手法を用いる方法がある。この方法は、バンク“3”
のレジスタR6の情報をバンク“0”のレジスタR6に
複写するというものである。しかしながら、この方法に
あっては、複写先の内容が変化しないようにするため
に、バンク“0”のレジスタR6の内容を予め退避させ
た状態において複写を行なう必要がある。このため、情
報を退避するための時間が必要となり、先の手順と同様
に、異なるバンクの情報を参照するのに時間がかかって
いた。
On the other hand, as another procedure, there is a method using a technique of copying information. This method is for bank "3"
The information of the register R6 of the above is copied to the register R6 of the bank "0". However, in this method, in order to prevent the contents of the copy destination from changing, it is necessary to copy the contents of the register R6 of the bank "0" in advance. Therefore, it takes time to save the information, and it takes time to refer to the information of different banks, as in the above procedure.

【0008】[0008]

【発明が解決しようとする課題】以上説明したように、
バンク構造を有する従来のプロセッサにあって、現在使
用中のバンクとは異なるバンクの情報を参照しようとす
る場合には、そのための処理が複雑となり、処理時間の
低下を招き、命令実行における高速化の障害となってい
た。
As described above,
In a conventional processor having a bank structure, when trying to refer to information of a bank different from the bank currently in use, the processing for that becomes complicated, the processing time is reduced, and the speed of instruction execution is increased. Had been an obstacle.

【0009】そこで、この発明は、上記に鑑みてなされ
たものであり、その目的とするところは、構成の大型化
を招くことなく、簡単な手法により異なるバンクの情報
を高速に参照することが可能となるプロセッサを提供す
ることにある。
Therefore, the present invention has been made in view of the above, and an object thereof is to refer to information of different banks at high speed by a simple method without increasing the size of the configuration. It is to provide a possible processor.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、この発明は、連続したアドレスが割付けられた複数
のレジスタからなる単位バンクがアドレス空間上に連続
して複数配置されてなる第1の格納手段と、参照しよう
とする情報を保持している前記第1の格納手段のレジス
タを、このレジスタが属する単位バンクを示す情報とこ
の単位バンク内でのレジスタの位置を示す情報とに基づ
いて、前記第1の格納手段のアドレス空間上で指定する
指定手段と、前記指定手段によって指定されたレジスタ
に保持された情報を参照する参照手段と、実行中の処理
に対応して、複数の前記単位バンク内におけるレジスタ
の情報が転送される第2の格納手段とから構成される。
In order to achieve the above object, the present invention provides a first unit bank comprising a plurality of registers to which consecutive addresses are allocated, which are arranged continuously in an address space. Based on information indicating a unit bank to which the register belongs and information indicating a position of the register in the unit bank. A plurality of designation means for designating on the address space of the first storage means, reference means for referring to the information held in the register designated by the designation means, and a plurality of processes corresponding to the processing being executed. Second storage means to which register information in the unit bank is transferred.

【0011】[0011]

【作用】上記構成において、この発明は、それぞれのバ
ンク内のレジスタに連続したアドレスを割り付け、単位
バンクを区別する情報と単位バンク内でのレジスタの位
置を示す情報とに基づいて任意のバンク内のレジスタを
アドレッシングするようにしている。
In the above structure, the present invention allocates consecutive addresses to the registers in each bank, and based on the information for distinguishing the unit bank and the information indicating the position of the register within the unit bank, I'm trying to address the register.

【0012】[0012]

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

【0013】図1はこの発明の一実施例に係るプロセッ
サのバンクRAMの構成を示す図である。
FIG. 1 is a diagram showing a configuration of a bank RAM of a processor according to an embodiment of the present invention.

【0014】図1において、バンクRAM1はメモリ空
間に256個のバンク(バンク“0”〜バンク“25
5”)が連続して配置されている。それぞれのバンク
は、16ビット長の4つのレジスタからなり、8ビット
長の8つのバイトレジスタ(R0〜R7)を備えて構成
されている。これらのバンクのそれぞれのレジスタは、
バンクRAM1のアドレス空間上に先頭アドレス“00
00”から順次連続したアドレスが割り当てられてお
り、バンク“255”のレジスタR7を示す最終アドレ
スは“07FF”となる。例えばバンク“0”のそれぞ
れのレジスタR0〜R8には、アドレス“0000”か
ら“0007”が割り当てられ、1つのバンクに割り当
てられたアドレスの数(スケーリング)は“8”とな
る。
In FIG. 1, the bank RAM1 has 256 banks (bank "0" to bank "25" in the memory space.
5 ") are arranged in succession. Each bank is composed of four 16-bit length registers and eight 8-bit length byte registers (R0 to R7). Each register in the bank
Start address "00" in the address space of bank RAM1
00 "are sequentially assigned, and the final address indicating the register R7 of the bank" 255 "is" 07FF ". For example, the address" 0000 "is assigned to each of the registers R0 to R8 of the bank" 0 ". To “0007” are assigned, and the number of addresses (scaling) assigned to one bank is “8”.

【0015】このような構成のバンクRAM1において
は、図2に示すように、メインプログラム用の汎用レジ
スタ群がバンク“2”〜バンク“5”に割り当てられ、
割込みルーチン1用の汎用レジスタ群がバンク“6”〜
バンク“9”に割り当てられ、割込みルーチン2用の汎
用レジスタ群がバンク“10”〜バンク“13”に割り
当てられており、割込みルーチン3用の汎用レジスタ群
がバンク“14”〜バンク“17”に割り当てられてい
る。
In the bank RAM 1 having such a configuration, as shown in FIG. 2, a group of general-purpose registers for the main program are assigned to banks "2" to "5".
General-purpose register group for interrupt routine 1 is bank "6"
The general-purpose register group for the interrupt routine 2 is allocated to the bank “9”, and the general-purpose register group for the interrupt routine 3 is allocated to the banks “10” to “13”. Assigned to.

【0016】このようなバンク構造において、プロセッ
サはそれぞれのバンクのレジスタを選択指定するアドレ
ッシングモードを有しており、以下に示す式によりレジ
スタを選択指定して、その内容を参照する。
In such a bank structure, the processor has an addressing mode for selecting and specifying the register of each bank, and the register is selected and specified by the following formula and the contents are referred to.

【0017】SpcR+Base×SS+disp ここで、「SpcR」はバンクRAMのアドレス空間上
での先頭のバンクのアドレスを示す値であり、先頭アド
レスとなる。したがって、「SpcR」の値はアドレス
空間上でのバンクの配置に応じた変数となり、図1に示
す配置例にあっては“0”となる。「Base」は参照
しようとするレジスタが属するバンクの番号となる。
「SS」は1つのバンクに割り当てられたアドレス数
(スケーリング)となり、1つのバンクに含まれるレジ
スタの個数に応じた値となり、図1に示した配置例にあ
っては“8”となる。「disp」はバンク内でのレジ
スタの番号を示す値となる。
SpcR + Base × SS + disp Here, “SpcR” is a value indicating the address of the first bank in the address space of the bank RAM and is the first address. Therefore, the value of "SpcR" is a variable according to the arrangement of banks in the address space, and is "0" in the arrangement example shown in FIG. “Base” is the number of the bank to which the register to be referred belongs.
“SS” is the number of addresses (scaling) assigned to one bank, and has a value according to the number of registers included in one bank, and is “8” in the arrangement example shown in FIG. “Disp” is a value indicating the number of the register in the bank.

【0018】このような算出式によってレジスタをアド
レッシングするアドレッシングモードは、例えば図3に
示すようなプロセッサの構成において実行される。
The addressing mode for addressing a register by such a calculation formula is executed in the processor configuration as shown in FIG. 3, for example.

【0019】図3において、プロセッサは、図1に示し
た構成のバンクRAM1と、このバンクRAM1と専用
の転送路2を介して接続されている汎用レジスタ群3
と、上述した算出式の演算を実行する演算器4と、この
演算器4の入力を操作保持するシフトレジスタSR1,
SR2を主要な構成要素として構成されている。
In FIG. 3, the processor includes a bank RAM1 having the configuration shown in FIG. 1 and a general-purpose register group 3 connected to the bank RAM1 via a dedicated transfer path 2.
And an arithmetic unit 4 for executing the arithmetic operation of the above-described calculation formula, and a shift register SR1, for operating and holding the input of the arithmetic unit 4.
It is configured with SR2 as a main component.

【0020】このような構成において、メインプログラ
ムが現在実行されており、汎用レジスタ群3にはバンク
RAM1のバンク“2”〜バンク“5”のレジスタの内
容が格納されている。このようなメインプログラムが実
行されている状態にあって、現在使用しているメインプ
ログラム用のバンク“2”〜バンク“5”とは異なるバ
ンク内のレジスタの内容を参照しようとする場合、例え
ば割込みルーチン1用のバンク“6”におけるレジスタ
R2の内容を参照しようとする場合には、上述したアド
レッシングモードが実行される。
In such a configuration, the main program is currently being executed, and the general-purpose register group 3 stores the contents of the registers of the banks "2" to "5" of the bank RAM1. When trying to refer to the contents of a register in a bank different from the currently used main program bank "2" to bank "5" while the main program is being executed, for example, When referring to the contents of the register R2 in the bank "6" for the interrupt routine 1, the addressing mode described above is executed.

【0021】このアドレッシングモードが実行される
と、まず、参照しようとするレジスタR2が属するバン
ク“6”のバンク番号“6”がセットされた汎用レジス
タ群3の中の汎用レジスタRnから、保持されているバ
ンク番号“6”が「Base」としてXバス5を介して
シフトレジスタSR1に転送される。これと同時に、キ
ューレジスタ(図示せず)にセットされたレジスタR2
のレジスタ番号“2”が「disp」としてYバス6及
びシフトレジスタSR2を介して演算器4の一方の入力
に与えられる。
When this addressing mode is executed, first, the general register Rn in the general register group 3 in which the bank number "6" of the bank "6" to which the register R2 to be referred belongs is set is held. The bank number “6” that is being transferred is transferred to the shift register SR1 via the X bus 5 as “Base”. At the same time, the register R2 set in the queue register (not shown)
Of the register number "2" is given to one input of the arithmetic unit 4 via the Y bus 6 and the shift register SR2 as "disp".

【0022】シフトレジスタSR1に転送されたバンク
番号“6”は、3ビット左にシフトされる。これによ
り、バンク番号“6”は8倍されて、上述した算出式の
Base×SS(6×8)が算出される。算出された値
は演算器4の他方の入力に与えられる。
The bank number "6" transferred to the shift register SR1 is shifted to the left by 3 bits. As a result, the bank number “6” is multiplied by 8 to calculate Base × SS (6 × 8) in the above calculation formula. The calculated value is given to the other input of the arithmetic unit 4.

【0023】演算器4に両入力が与えられると、一方の
入力の「disp」となるレジスタ番号“2”と他の入
力の「Base×SS」となる“48”が演算器4によ
り加算される。これにより、上述した算出式、SpcR
+Base×SS+dispの値が“50”として得ら
れる。これにより、アドレッシングモードにおけるアド
レス値が算出される。
When both inputs are given to the arithmetic unit 4, the arithmetic unit 4 adds the register number “2” which is “disp” of one input and “48” which is “Base × SS” of the other input. It As a result, the above calculation formula, SpcR
The value of + Base × SS + disp is obtained as “50”. As a result, the address value in the addressing mode is calculated.

【0024】この演算結果のアドレスは、演算器4から
Zバス7を介してバスインターフェイス(BIU)8の
アドレスラッチ81 に転送され、転送されたアドレスに
よりバンクRAM1がアクセスされる。これにより、バ
ンク“6”のレジスタR2が選択指定されて、レジスタ
R2に保持されている内容がバスインターフェイス8の
データラッチ82 に出力されて格納される。このデータ
ラッチ82 に格納された内容をYバス6に読出すことに
より、バンクRAM1におけるバンク“6”のレジスタ
R2の内容を参照することができる。
The address of this operation result is transferred from the operation unit 4 to the address latch 8 1 of the bus interface (BIU) 8 via the Z bus 7, and the bank RAM 1 is accessed by the transferred address. As a result, the register R2 of the bank "6" is selected and designated, and the content held in the register R2 is output to and stored in the data latch 8 2 of the bus interface 8. By reading the contents the stored in the data latch 82 to the Y bus 6, it is possible to see the contents of register R2 of the bank "6" in the bank RAM 1.

【0025】このように、この発明の特徴であるアドレ
ッシングモードによれば、2つないし3つの情報の転送
と、3ビットシフト動作及び1回の加算処理を実行する
ことにより、参照しようとする情報のアドレッシングが
可能となるため、従来のようにバンクを切り換えること
なく他の異なるバンク内の情報を、通常プロセッサが備
えている構成において、高速に参照することができるよ
うになる。
As described above, according to the addressing mode, which is a feature of the present invention, the information to be referred to by performing the transfer of two or three pieces of information, the 3-bit shift operation, and the addition processing once. Therefore, it is possible to refer to the information in another different bank at high speed without switching the bank as in the conventional case, in the configuration normally provided in the processor.

【0026】なお、上述した算出式において、「Spc
R」の値が“0”でない場合には、3入力の演算器を用
いることにより、1回の加算でアドレッシングが可能と
なる。
In the above calculation formula, "Spc
When the value of “R” is not “0”, the addressing can be performed by one addition by using the 3-input arithmetic unit.

【0027】[0027]

【発明の効果】以上説明したように、この発明によれ
ば、それぞれのバンク内のレジスタをアドレッシングモ
ードによりアドレッシングして選択指定するようにした
ので、通常プロセッサが備えている構成によってバンク
を切り換えることなく他の異なるバンク内のレジスタの
内容をアクセスして参照することが可能となる。したが
って、この参照処理を高速かつ簡単に行なうことができ
る。
As described above, according to the present invention, the register in each bank is addressed and selected by the addressing mode, so that the bank can be switched according to the configuration of the normal processor. However, it becomes possible to access and refer to the contents of the register in another different bank. Therefore, this reference processing can be performed quickly and easily.

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

【図1】この発明の一実施例に係るプロセッサのバンク
RAMの構成を示す図である。
FIG. 1 is a diagram showing a configuration of a bank RAM of a processor according to an embodiment of the present invention.

【図2】この発明の一実施例に係るプロセッサで実行さ
れる処理ルーチンとバンクとの対応関係を示す図であ
る。
FIG. 2 is a diagram showing a correspondence relationship between processing routines executed by a processor according to an embodiment of the present invention and banks.

【図3】この発明の一実施例に係るプロセッサの構成を
示す図である。
FIG. 3 is a diagram showing a configuration of a processor according to an embodiment of the present invention.

【図4】従来のバンク切り換え方法を示す図である。FIG. 4 is a diagram showing a conventional bank switching method.

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

1 バンクRAM 2 転送路 3 汎用レジスタ 4 演算器 5 Xバス 6 Yバス 7 Zバス 8 バスインターフェイス 81 アドレスラッチ 82 データラッチ1 bank RAM 2 transfer path 3 general purpose register 4 arithmetic unit 5 X bus 6 Y bus 7 Z bus 8 bus interface 8 1 address latch 8 2 data latch

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 連続したアドレスが割付けられた複数の
レジスタからなる単位バンクがアドレス空間上に連続し
て複数配置されてなる第1の格納手段と、 参照しようとする情報を保持している前記第1の格納手
段のレジスタを、このレジスタが属する単位バンクを示
す情報とこの単位バンク内でのレジスタの位置を示す情
報とに基づいて、前記第1の格納手段のアドレス空間上
で指定する指定手段と、 前記指定手段によって指定されたレジスタに保持された
情報を参照する参照手段と、 実行中の処理に対応して、複数の前記単位バンク内にお
けるレジスタの情報が転送される第2の格納手段とを有
することを特徴とするプロセッサ。
1. A first storage means in which a plurality of unit banks, each of which is composed of a plurality of registers to which consecutive addresses are allocated, are consecutively arranged in an address space, and the information holding information to be referred to. A designation for designating a register of the first storage means on the address space of the first storage means based on information indicating a unit bank to which the register belongs and information indicating a position of the register in the unit bank. Means, reference means for referring to the information held in the register designated by the designating means, and second storage for transferring the information of the registers in the plurality of unit banks corresponding to the processing being executed. A processor having means.
JP3235924A 1991-09-17 1991-09-17 Processor Pending JPH0573303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3235924A JPH0573303A (en) 1991-09-17 1991-09-17 Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3235924A JPH0573303A (en) 1991-09-17 1991-09-17 Processor

Publications (1)

Publication Number Publication Date
JPH0573303A true JPH0573303A (en) 1993-03-26

Family

ID=16993260

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3235924A Pending JPH0573303A (en) 1991-09-17 1991-09-17 Processor

Country Status (1)

Country Link
JP (1) JPH0573303A (en)

Similar Documents

Publication Publication Date Title
US5371864A (en) Apparatus for concurrent multiple instruction decode in variable length instruction set computer
EP0424618A2 (en) Input/output system
JPS6027964A (en) Memory access control circuit
US5179682A (en) Method and apparatus for improved current window cache with switchable address in, out, and local cache registers
JPH0573303A (en) Processor
JPH05197619A (en) Memory control circuit for multi-cpu
JPH0765180A (en) Data transfer controller
JP3594260B2 (en) Vector data processing device
JPS5962959A (en) Storage device
GB2282470A (en) Expanded memory management for multi-tasking environment.
JP2002024157A (en) Method and device for processing dma
JPH0744489A (en) Data transfer system
JPH0535472A (en) Microcomputer
JPH0833869B2 (en) Data processing device
JP2576589B2 (en) Virtual storage access control method
JPS63245743A (en) Memory access system
JPH0651751A (en) Image display device
JPH01316826A (en) Register file address circuit
JPH01134546A (en) Arithmetic processor
JPS61273648A (en) Memory address generating circuit
JPS61198351A (en) Direct memory access control circuit
JPS6373325A (en) Information processor
JPS63271567A (en) Asymmetric closely-coupled multiprocessor system
JPH04225453A (en) Data processor
JPH06348590A (en) Main storage device and memory card