[go: up one dir, main page]

JPS63268033A - data processing equipment - Google Patents

data processing equipment

Info

Publication number
JPS63268033A
JPS63268033A JP10192187A JP10192187A JPS63268033A JP S63268033 A JPS63268033 A JP S63268033A JP 10192187 A JP10192187 A JP 10192187A JP 10192187 A JP10192187 A JP 10192187A JP S63268033 A JPS63268033 A JP S63268033A
Authority
JP
Japan
Prior art keywords
register
instruction
bank
registers
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP10192187A
Other languages
Japanese (ja)
Other versions
JP2514963B2 (en
Inventor
Shiro Baba
馬場 志朗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP10192187A priority Critical patent/JP2514963B2/en
Publication of JPS63268033A publication Critical patent/JPS63268033A/en
Application granted granted Critical
Publication of JP2514963B2 publication Critical patent/JP2514963B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/461Saving or restoring of program or task context
    • G06F9/462Saving or restoring of program or task context with multiple register sets

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、データ処理技術さらにはプログラム制御方
式のシステムにおける命令体系に適用して特に有効な技
術に関し1例えば2以上のレジスタセットを有するマイ
クロプロセッサの命令体系に利用して有効な技術に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data processing technology and a technology that is particularly effective when applied to an instruction system in a program control system. This article relates to techniques that are effective for use in processor instruction systems.

〔従来の技術〕[Conventional technology]

従来、ザイログ社gzso系のマイクロコンピュータで
は、第7図に示すように、2つのレジスタセラ)R8A
 、R3Bを有し、いずれか一つのレジスタセットを使
ってタスク処理を行えるようにされたものがある。これ
によって、例えばレジスタセットR8Aを使って一つの
タスクが終了したとき、レジスタの内容をそのままして
おいてレジスタセットをR8AからR8Bに切り替える
ことにより、直ちに他のタスク処理に移ることができる
。また、そのタスク処理が終了した後、再び元のタスク
に戻るときには、レジスタセットR8人に切り替えるこ
とにより、レジスタセットR8A内に残っていた前のタ
スクの内容をそのまま引き継いで実行することができろ
。そのため、タスクを変更する際にレジスタの退避等を
行へ必要がなく、実行速度が速いという利点がある。
Conventionally, in Zilog's GZSO series microcomputers, as shown in FIG.
, R3B, and can perform task processing using any one register set. With this, for example, when one task using register set R8A is completed, it is possible to immediately move on to processing another task by switching the register set from R8A to R8B while leaving the contents of the register unchanged. Furthermore, when returning to the original task after the task processing is finished, by switching to register set R8, the contents of the previous task remaining in register set R8A can be inherited and executed as is. . Therefore, when changing a task, there is no need to save registers, etc., and the execution speed is high.

しかしながら、複数のレジスタセットを有するマイクロ
プロセッサにおいて、あるタスク処理から他のタスク処
理に移行する際、例えばサブルーチンコールのように引
数を引き渡して新しい処理を実行したい場合もある。と
ころが、第7図のように、レジスタセットを完全に切り
替えるようにされていると、引数の引き渡し等が困難で
あるという不都合がある。
However, in a microprocessor having a plurality of register sets, when transitioning from one task processing to another, it may be necessary to pass arguments and execute a new process, such as in a subroutine call. However, if the register set is completely switched as shown in FIG. 7, there is a problem in that it is difficult to pass arguments.

これに対し、U、 C,バークレイ校製RI 5C(R
educed In5truction Set Co
mputer :基本的な簡易命令しか持たないコンピ
ュータ)では、第8図に示すように互いにある一定の数
のレジスタがオーバラップした複数のレジスタセラ)R
8A。
On the other hand, RI 5C (R
Educed In5truction Set Co
mputer: A computer that has only basic simple instructions has multiple registers with a certain number of registers overlapping each other, as shown in Figure 8.
8A.

R8B、R8C,・・・・・・が設げられている。その
ため、サブルーチンヘジャンプする際の引数の引き渡し
等が簡単に行える。しかるに、複数のレジスタセットが
互いに常にオーバラップしていると、タスクを移行した
場合で、引数の引き渡し等を行わな(てもよい場合には
、重複した部分のレジスタが使えな(なるため、使用可
能なレジスタ数が制限されるという不都合がある。
R8B, R8C, . . . are provided. Therefore, it is easy to pass arguments when jumping to a subroutine. However, if multiple register sets always overlap with each other, when a task is migrated, the overlapping registers cannot be used (in cases where it is possible to pass arguments, etc.). This has the disadvantage that the number of usable registers is limited.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

この発明の目的は、複数のレジスタセットの切り替えの
際の柔軟性を向上させ、データ処理システムの実行速度
を向上させることができるようにすることにある。
SUMMARY OF THE INVENTION An object of the present invention is to improve the flexibility when switching between multiple register sets and to improve the execution speed of a data processing system.

この発明の前記なちびにそのほかの目的と新規な特徴疋
ついては、本明細書の記述および添附図面から明らかに
なるであろう。
Other objects and novel features of this invention will become apparent from the description of this specification and the accompanying drawings.

〔問題点を解決するだめの手段〕[Failure to solve the problem]

本願において開示される発明のうち代表的なものの概要
を説明丁れば、下記のとおりである。
A summary of typical inventions disclosed in this application is as follows.

すなわち、複数のレジスタセットを有するデータ処理シ
ステムにおいて、レジスタセットを切り替える際にレジ
スタを指定してその内容を他のレジスタセット内のレジ
スタに引き渡す命令を新たに作り、これをハードウェア
で実現できるようにするO 〔作用〕 上記した手段によれば、引数等の引き渡しを伴なってレ
ジスタセットの切替えを行うことも、引数等の引き渡し
を伴なわないレジスタセットの切替えも行えるようにな
る。その結果高速のタスク切替えやサブルーチンコール
が実現できるので、レジスタセットの切替えの際の柔軟
性を向上させ。
In other words, in a data processing system that has multiple register sets, we created a new instruction that specifies a register and transfers its contents to a register in another register set when switching register sets, and it is possible to implement this in hardware. [Operation] According to the above-described means, register sets can be switched with passing of arguments, etc., and register sets can be switched without passing of arguments, etc. As a result, high-speed task switching and subroutine calls can be achieved, improving flexibility when switching register sets.

システムの実行速度を向上させるという上記目的を達成
できる。
The above objective of improving the execution speed of the system can be achieved.

〔実施例〕〔Example〕

第1図(3)〜第1図03)には、本発明に係るレジス
タセット切替え命令のフォーマットの一例が示されてい
る。
FIG. 1(3) to FIG. 103) show an example of the format of a register set switching instruction according to the present invention.

第1図囚に示されているフォーマットは、複数のレジス
タセット(以下、レジスタバンクと称する)のうち、隣
接するレジスタバンクに切り替える命令に適したフォー
マットである。オペレージ1ンコード指定フイールドO
PIには、レジスタバンクの番号をインクリメントする
コードまたはデクリメントするコードが入る。オペレー
ションコード指定フィールドOPIに続くフィールドR
は、レジスタ内容の引き渡しがあるか否かを示すため設
げられたフィールドであり、1ビツトで構成される。こ
のフィールドRが0”にされていると、あるレジスタバ
ンク(例えばBNI )から一つ前あるいは一つ後のレ
ジスタバンクBNi−1またはB N 1−1−1に切
替わる際に、レジスタバンクBNi内の全レジスタの内
容を一切引き渡すことなくバンクの切替えが行われる。
The format shown in FIG. 1 is suitable for an instruction to switch to an adjacent register bank among a plurality of register sets (hereinafter referred to as register banks). Operation 1 code specification field O
The PI contains a code for incrementing or decrementing the register bank number. Field R following operation code specification field OPI
is a field provided to indicate whether or not register contents are transferred, and is composed of 1 bit. If this field R is set to 0'', when switching from a certain register bank (for example, BNI) to the previous or next register bank BNi-1 or BN 1-1-1, the register bank BNi Bank switching is performed without transferring the contents of all registers in the bank.

一方フイールドRに′1″が設定されていると。On the other hand, if field R is set to ``1''.

これに続くレジスタ指定フィールドRn−1istで指
定されるレジスタについては、その内容を切替、t[の
レジスタバンクBNi−1またはBNi+1内の対応す
るレジスタへの引き渡しが行われることを意味する。
This means that the contents of the register designated by the subsequent register designation field Rn-1ist are switched and delivered to the corresponding register in register bank BNi-1 or BNi+1 of t[.

なお、特に制限されないが、この実施例では、各レジス
タバンクが16本のレジスタで構成される場合を想定し
て、レジスタ指定フィールドRn−1istが16ビツ
トで構成され、かつビット対応で内容を引き渡すべきレ
ジスタを指定できろようにされている。例えば、第1図
(イ)の例では、使用中のレジスタバンク内の1番と4
番のレジスタR1とR4の内容を切替後のレジスタバン
ク内の1番と4番のレジスタに引き渡すべきことを示し
ている。
Although not particularly limited, in this embodiment, assuming that each register bank is composed of 16 registers, the register specification field Rn-1ist is composed of 16 bits, and the contents are transferred in bit correspondence. It is now possible to specify the register that should be used. For example, in the example shown in Figure 1 (a), numbers 1 and 4 in the register bank in use are
This indicates that the contents of the numbered registers R1 and R4 should be delivered to the numbered registers 1 and 4 in the register bank after switching.

この命令を使用して、レジスタバンクBNIからBN2
への切替え(インクリメント)を行う場合の作用が第3
図(2)に示されている。ただしこの場合、バンク番号
をインクリメントする命令(IBNRと表記する)が使
用される。レジスタバンクをBN2からBNl−に戻丁
には、バンク番号ヲデクリメントする命令(DBNRと
表記する)を使用し、フィールドRとレジスタ指定フィ
ールドRn−1istの設定は上記と同じにずればよい
Use this instruction to register from register bank BNI to BN2.
The effect when switching (incrementing) to
This is shown in Figure (2). However, in this case, an instruction (denoted as IBNR) for incrementing the bank number is used. To return the register bank from BN2 to BN1-, an instruction (denoted as DBNR) for decrementing the bank number may be used, and the settings of field R and register designation field Rn-1ist may be shifted in the same manner as above.

次に、第1図031に示されている命令フォーマットに
ついて説明する。このフォーマットは、使用中のレジス
タバンクをこれとは離れた(隣接しない)位置のレジス
タバンクに切替える命令(CBNRと表記する)に適し
ている。
Next, the instruction format shown in FIG. 1031 will be explained. This format is suitable for an instruction (denoted as CBNR) that switches the register bank in use to a register bank in a remote (non-adjacent) location.

このCBNR命令は、第1図(5)の命令フォーマット
のフィールドRとレジスタ指定フィールドRn−1is
tとの間に、切替え後のレジスタバンクの番号を指定す
るだめのイミーディエイトデータ指定フィールドImm
が設けられた構成にされている。
This CBNR instruction has field R and register specification field Rn-1is of the instruction format shown in FIG. 1 (5).
t, there is an immediate data specification field Imm for specifying the number of the register bank after switching.
The structure is such that

このCBNR命令によって、例えば、レジスタバンクB
N’OからBN2への切替えが実行される。
With this CBNR instruction, for example, register bank B
Switching from N'O to BN2 is performed.

しかも、その際、第3図(B)に示すように、バンク内
の任意のレジスタ例えばレジスタR1、R4を指定して
その内容を引き渡したり、全く引き渡しを伴なわないで
レジスタバンクの切替えが行える。
Moreover, at this time, as shown in FIG. 3(B), it is possible to specify any register in the bank, such as registers R1 and R4, and transfer their contents, or to switch register banks without transferring the contents at all. .

引き渡しの有無は、フィールドR内の情報によって決定
され、命令の内容はオペレーションコード指定フィール
ドOPZ内の情報によって決定されろ。
Whether or not to transfer is determined by the information in field R, and the contents of the instruction are determined by the information in operation code designation field OPZ.

特に制限されないが、この実施例ではオペレーションワ
ード長との関係で、イミーディエイトデータ指定フィー
ルド1mmが8ビツト長にされている。これによって、
最大256個のレジスタバンクまで対応することができ
る。
Although not particularly limited, in this embodiment, the immediate data designation field 1 mm has a length of 8 bits in relation to the operation word length. by this,
It can support up to 256 register banks.

ナオ、このCBNR命令によってレジスタバンクの切替
えを行う場合、切替え前のレジスタパン゛り番号をスタ
ック領域等に覚えておけば元のレジスタバンクへ戻る動
作が容易になる。従って、その場合には、第1図人に示
すフォーマットと同じフォーマントからなる命令(PB
NRと表記する)によって、元のレジスタバンクの番号
をスタック領域から持りてくることにより、上記CBN
R命令を使わずに元のレジスタバンクの復帰を行うこと
ができる。
When switching register banks using this CBNR instruction, it is easier to return to the original register bank by memorizing the register pan number before switching in a stack area or the like. Therefore, in that case, an instruction (PB
NR) by bringing the original register bank number from the stack area, the above CBN
The original register bank can be restored without using the R instruction.

次に第1図(0に示されている命令フォーマットについ
て説明する。このフォーマットは、オペレーションコー
ド指定フィールドOP3とレジスタ指定フィールドRn
−1istとから構成される。レジスタ内容の引き渡し
があるか否かを示すだめの専用フィールドRは設けられ
ていない。レジスタ内容の引き渡しの有無に関する情報
は、オペレージ目ンコード指定フィールドOP3に含ま
れている。特に限定されないが、オペレーションコード
指定フィールドOP3は8ビツトで構成される。
Next, an explanation will be given of the instruction format shown in FIG.
-1ist. No dedicated field R is provided to indicate whether or not register contents are to be transferred. Information regarding whether or not the contents of the register are to be delivered is included in the operation code specification field OP3. Although not particularly limited, the operation code designation field OP3 is composed of 8 bits.

この命令が実行されることにより、上記第3図人に示さ
れるようにレジスタセットの切替えが行なわれる。
By executing this instruction, the register set is switched as shown in FIG. 3 above.

次に第1図(D)に示される命令フォーマットについて
説明する。このフォーマットは、オペレージ冒ンコード
指定フィールドOP4とイミーディエイトデータ指定フ
ィールドImmとレジスタ指定フィールドRn−1is
tとから構成される。レジスタ内容の引き渡しがあるか
否かを示すための専用フィールドRは設けられていない
。レジスタ内容の引き渡しの有無に関する情報は、オペ
レージ曹ンコード指定フィールドOP4に含まれている
Next, the instruction format shown in FIG. 1(D) will be explained. This format consists of an operation code specification field OP4, an immediate data specification field Imm, and a register specification field Rn-1is.
It consists of t. A dedicated field R is not provided to indicate whether or not register contents are transferred. Information regarding whether or not the register contents are to be delivered is included in the operating code specification field OP4.

この命令が実行されることにより、上記第3図(0に示
されるようにレジスタセットの切替エカ行なわれる。
By executing this instruction, the register set is switched as shown in FIG. 3 (0).

次に第1図(Dに示される命令フォーマツ)Kついて説
明する。このフォーマットは、オペレージ日ンコード指
定フイーノンドOP5と引渡し有無指定フィールドRと
イミーディエイトデータ指定フィールドImmと引渡し
元レジスタ指定フィールドRn−1ist(ソース)と
引渡し先レジスタ指定フィールドRn−1ist(デス
ティエイジョン)とから構成される。引渡し先レジスタ
指定フィールドRn−1ist(テスティエイション)
は、レジスタバンク内のレジスタの数に対応して、16
のフィールドRLO〜RL15に分割されている。各フ
ィールドRLO〜RL15は、移転先のレジスタ番号を
示すために4ビツト分の領域が割当てられている。例え
ば、フィールドRL2は、引fL先しジスタバンク内の
第7番目のレジスタR7を指定している。また、フィー
ルドRL15は、引渡し先レジスタバンク内の第12番
目のレジスタRL12を指定している。第1図(E)に
示す命令に基づいてレジスタバンクが切替えられる場合
の一例を第3図(0に示す。レジスタバンクBN2内の
レジスタのうち、引き渡されるレジスタR2,R15は
引渡し元レジスタ指定フィールドRn−1ist(ソー
ス)内の情報によって指定される。切替え後のレジスタ
バンクの番号BN2はイミーディエイトデータ指定フィ
ールドImm内の情報によって指定される。第1図(E
lに示す命令フォーマットを用いることにより、任意の
レジスタバンク間で、任意のレジスタ間での引き渡しが
可能になる。
Next, FIG. 1 (instruction format shown in D) K will be explained. This format consists of an operating date code specification field OP5, a transfer/presence specification field R, an immediate data specification field Imm, a transfer source register specification field Rn-1ist (source), and a transfer destination register specification field Rn-1ist (destination). It consists of Transfer destination register specification field Rn-1ist (testation)
is 16, corresponding to the number of registers in the register bank.
It is divided into fields RLO to RL15. Each field RLO to RL15 is allocated an area of 4 bits to indicate the register number of the transfer destination. For example, field RL2 specifies the seventh register R7 in the register bank ahead of fL. Further, field RL15 specifies the 12th register RL12 in the transfer destination register bank. An example of the case where the register bank is switched based on the instruction shown in FIG. 1(E) is shown in FIG. It is specified by the information in Rn-1ist (source).The register bank number BN2 after switching is specified by the information in the immediate data specification field Imm.
By using the instruction format shown in I, it is possible to transfer between arbitrary register banks and between arbitrary registers.

次圧第4図[F]に示される命令フォーマットについて
説明する。このフォーマットは、オペレーションコード
指定フィールドOP6とイミーディエイトデータ指定フ
ィールドImmと引渡し元レジスタ指定フィールドRn
−1ist(ソース)と引渡し先レジスタ指定フィール
ドRn−1ist’(デスティネイシ舊ン)とから構成
される。引渡し先レジスタ指定フィールドRn−1is
t’(デスティネイション)は、第1図(Dに示すフォ
ーマットと異なり、2つのフィールドRLa、RLbに
分割されている。
Next, the command format shown in FIG. 4 [F] will be explained. This format consists of an operation code specification field OP6, an immediate data specification field Imm, and a transfer source register specification field Rn.
-1ist (source) and a transfer destination register specification field Rn-1ist' (destination field). Transfer destination register specification field Rn-1is
Unlike the format shown in FIG. 1(D), t' (destination) is divided into two fields RLa and RLb.

各フィールドRLa、RLbは、切替え後のレジスタバ
ンク内のレジスタ番号を指定するために4ビツトが割り
当てられている。この命令フォーマットは、引き渡され
るレジスタの数が2つ以下に限定されている場合に特に
有効である。命令フォーマットの全ビット長を短縮でき
るからである。例えば、8g1図■の引渡し先レジスタ
指定フィールドRn−1ist(デスティネイション)
は64ビツトで構成されているが、第1図nの引渡し先
レジスタ指定フィールドRn−1ist’(デスティネ
イション)はわずか8ピントで構成することができる。
Each field RLa, RLb has 4 bits assigned to specify the register number within the register bank after switching. This instruction format is particularly useful when the number of passed registers is limited to two or less. This is because the total bit length of the instruction format can be shortened. For example, the transfer destination register specification field Rn-1ist (destination) in Figure 8g1 ■
is made up of 64 bits, but the destination register designation field Rn-1ist' (destination) in FIG. 1n can be made up of only 8 bits.

なお、第1図(Flのフォーマットにおいては、引渡元
レジスタ番号と引渡光レジスタ番号との対応をとる1こ
めの情報をオペレーションコード指定フィールドOP6
内に含ませる必要がある。すなわち、引渡し元レジスタ
指定フィールドRn−1ist(ソース)によって指定
されたレジスタR2の引渡し先がフィールドRLaによ
って指定され、レジスタR15の引き渡し先がレジスタ
RLbによって指定されるように対応づけられる。第1
図[F]に示す命令に基づいてレジスタバンクが切替え
られる場合の一例は、上記第3図(C)に示される。 
In addition, in the format of FIG.
It needs to be included within. That is, the transfer destination of register R2 specified by transfer source register designation field Rn-1ist (source) is specified by field RLa, and the transfer destination of register R15 is specified by register RLb. 1st
An example of the case where register banks are switched based on the instruction shown in FIG. 3(F) is shown in FIG. 3(C) above.
.

次に、第1図(qに示される命令フォーマットについて
説明する。このフォーマットは、オペレーションコード
指定フィールドOP7とイミーディエイトデータ指定フ
ィールドImmと引渡し元レジスタ指定フィールドRn
−1ist(ソース)とにより構成される。第1図(G
)に示す命令に基づいてレジスタバンクが切替えられろ
場合の一例を第3図■)に示す。この命令フォーマット
においては、引渡し先レジスタ指定フィールドは設けら
れていない。レジスタバンクが切替えられた際、引き渡
丁べきレジスタがある場合には、新しいレジスタバンク
BN2内の最も若い番号のレジスタROから頴に指定さ
れる。このような指定順序はオペレーションコード指定
フィールドOPT内の情報によって規定される。
Next, an explanation will be given of the instruction format shown in FIG.
-1ist (source). Figure 1 (G
An example of a case where the register bank is switched based on the instruction shown in ) is shown in FIG. 3 (■). In this instruction format, no destination register specification field is provided. When the register bank is switched, if there are registers to be handed over, the registers RO with the lowest number in the new register bank BN2 are designated as registers. Such designation order is defined by information in the operation code designation field OPT.

次に、上記のようなフォーマットに構成されたレジスタ
バンク切替え命令の実行を可能にするマイクロプロセッ
サのハードウェア構成の一例を第4図を用いて説明する
Next, an example of the hardware configuration of a microprocessor that makes it possible to execute a register bank switching instruction configured in the above format will be described with reference to FIG.

この実施例のマイクロプロセッサは、マイクロプログラ
ム制御方式の制御部を備えている。すなわち、マイクロ
プロセッサを構成するLSIチップ1内には、マイクロ
プログラムが格納されたマイクロROM(リード・オン
リ・メモリ)2が設けられている。マイクロROM2は
、マイクロアドレスデコーダ5によってアクセスされ、
マイクロプログラムを構成するマイクロ命令が順次読み
出される。
The microprocessor of this embodiment includes a control section using a microprogram control system. That is, an LSI chip 1 constituting a microprocessor is provided with a micro ROM (read only memory) 2 in which a micro program is stored. The micro ROM 2 is accessed by the micro address decoder 5,
The microinstructions making up the microprogram are read out in sequence.

マイクロアドレスデコーダ5には、命令レジスタ3にフ
ェッチされたマクロ命令のオペレーションコードに基づ
いてマイクロアドレス発生回路4において発生されたア
ドレスが供給される。これをデコードすることによって
、そのマクロ命令を実行する一連のマイクロ命令群の最
初の命令が読み出され、各種テンポラリレジスタREG
I〜REGn 、データバッファDB、演算論理ユニッ
トALU等からなる実行ユニット6等に対する制御信号
が形成される。マクロ命令に対応する一連のマイクロ命
令群のうち2番目以降のマイクロ命令は直前に読み出さ
れたマイクロ命令のネクストアドレスフィールドのコー
ドがマイクロアドレスデコーダ5に供給されることによ
り、前のマイクロ命令のネクストアドレスとマイクロア
ドレス発生回路4からのアドレスとに基づいて読み出さ
れる。
The microaddress decoder 5 is supplied with an address generated by the microaddress generation circuit 4 based on the operation code of the macroinstruction fetched into the instruction register 3. By decoding this, the first instruction of a series of microinstructions that executes that macroinstruction is read, and various temporary registers REG
Control signals are generated for the execution unit 6, etc., which includes I to REGn, a data buffer DB, an arithmetic logic unit ALU, and the like. The second and subsequent microinstructions in a series of microinstructions corresponding to a macroinstruction are supplied with the code of the next address field of the microinstruction that was just read out to the microaddress decoder 5. It is read out based on the next address and the address from the microaddress generation circuit 4.

このようにして、一連のマイクロ命令が読み出されて形
成された制御信号によって実行ユニット6が制御され、
例えばADDで示される加算命令のようなマクロ命令が
実行される。
In this way, the execution unit 6 is controlled by the control signal formed by reading out the series of microinstructions,
For example, a macro instruction such as an addition instruction indicated by ADD is executed.

この実施例では、例えば16個のレジスタバンクBNO
〜BN15からなる汎用レジスタ群12およびコントロ
ールレジスタ群11を制御する機能を有するメモリアク
セス制御回路7が設けられている。上記16個のレジス
タバンクBNO〜BN15は、特に制限されないが例え
ば第2図に示すように、各々32ビツト長のレジスタ0
〜15かうなる。コントロールレジスタ11には、ステ
ータスレジスタSRやスタックポインタSP、現在使用
中のレジスタバンクの番号を保持するバンク番号レジス
タバンク等が設けられている。この実施例では、上記レ
ジスタバンクBNO−BN15からなる汎用レジスタ群
12およびコントロールレジスタ群11は、RAM(ラ
ンダム・アクセス・メモリ)によって構成されており、
内部バス10を介して実行ユニット6内のデータバッフ
ァDBに接続されている。
In this embodiment, for example, 16 register banks BNO
A memory access control circuit 7 having a function of controlling a general-purpose register group 12 and a control register group 11 consisting of BN15 is provided. The above-mentioned 16 register banks BNO to BN15 are each 32-bit long register 0, as shown in FIG. 2, although not particularly limited.
~15 growls. The control register 11 is provided with a status register SR, a stack pointer SP, a bank number register bank that holds the number of the register bank currently in use, and the like. In this embodiment, the general-purpose register group 12 and the control register group 11 consisting of the register banks BNO-BN15 are constituted by RAM (random access memory),
It is connected to a data buffer DB in the execution unit 6 via an internal bus 10.

また、上記命令レジスタ3はFIFO(ファースト・イ
ン・・7.アースドアウド)メモリからなり、外部のメ
モリに格納されたマクロ命令は、上記メモリアクセス制
御回路7がアドレスバス8をアクセスすることによって
バイト単位で読み出され、データバス9を介してFIF
Oメモリからなる命令レジスタ3に供給される。このよ
うにして、前もって複数のオペレーションコードやオペ
ランドが命令レジスタ3に取り込まれろようになってい
る。
The instruction register 3 is composed of a FIFO (first-in...7.earthed-out) memory, and the macro instructions stored in the external memory are read in byte units by the memory access control circuit 7 accessing the address bus 8. is read out via the data bus 9 to the FIF
It is supplied to an instruction register 3 consisting of O memory. In this way, a plurality of operation codes and operands can be loaded into the instruction register 3 in advance.

上記のように、この実施例のマイクロプロセッサでは、
16個のレジスタバンクBNO〜BN15のうち一つを
使りて各タスクを処理できろようになっている。
As mentioned above, the microprocessor in this example has
Each task can be processed using one of the 16 register banks BNO to BN15.

上記マイクロプロセッサの命令レジスタ3に、第1図(
至)に示すようなレジスタバンク切替え命令IBNRま
たはDBNRが入って来ると、対応するマイクロ命令が
マイクロROM2から読み出される。そして、そのマイ
クロコードによってメモリアクセス制御回路7が制御さ
れ、例えばメモリアクセス制御回路7がそれまで使用し
ていたレジスタバンクがBNiであった場合には、BN
i−i−1またはBNi−1のバンクを使用して以後の
処理を行うように切替えが行われる。そして、その際、
フィールドRのビットが@1”であればRn−1ist
で指定されたレジスタについては、その内容を他のバン
ク内の対応するレジスタ又は特別に指定されたレジスタ
に移丁処理が行われる。また。
In the instruction register 3 of the microprocessor, the information shown in Figure 1 (
When a register bank switching instruction IBNR or DBNR as shown in (to) is received, the corresponding microinstruction is read from the microROM 2. Then, the memory access control circuit 7 is controlled by the microcode, and for example, if the register bank that the memory access control circuit 7 was using until then was BNi, the BN
Switching is performed so that bank ii-1 or BNi-1 is used for subsequent processing. And at that time,
If the bit of field R is @1”, Rn-1ist
For the register designated by , the contents are transferred to a corresponding register in another bank or a specially designated register. Also.

バンク番号レジスタセット内のバンク番号の変更が行も
れろ。
Don't forget to change the bank number in the bank number register set.

一方、命令レジスタ3に第1図CB)のようなレジスタ
バンク切替え命令CBNRが入って来て対応するマイク
ロ命令が読み出されると、イば−ディエイトデータ指定
フィールドImmで指定されたレジスタバンク番号がバ
ンク番号レジスタBNRに書き込まれ、バンク番号の変
更が行われる。それとともに指定されたレジスタの引き
渡しが行われろ。これとともに、それまでバンク番号レ
ジスタBNRに入っていた使用中のバンク番号がプログ
ラムカウンタの内容等とともに外部のメモリのスタック
領域に格納される。
On the other hand, when a register bank switching instruction CBNR such as CB in FIG. The data is written to the bank number register BNR, and the bank number is changed. At the same time, the specified register will be transferred. At the same time, the bank number in use, which had been stored in the bank number register BNR up to that point, is stored in the stack area of the external memory together with the contents of the program counter and the like.

そして、レジスタバンク切替え命令PBNRがロードさ
れると、コントロールレジスタ群11内のスタックポイ
ンタで指示されるスタック領域から退避されていたもと
・のレジスタバンク番号が読み出されて、バンク番号レ
ジスタBNRにロード。
Then, when the register bank switching instruction PBNR is loaded, the original register bank number saved from the stack area indicated by the stack pointer in the control register group 11 is read out and loaded into the bank number register BNR.

されるとともに、汎用レジスタ群12内の使用中バンク
の切替えおよび必要なレジスタ内容の引き渡しが行われ
る。
At the same time, the banks in use in the general-purpose register group 12 are switched and necessary register contents are transferred.

従って、上記命令CBNRを利用すると、例えばサブル
ーチンコールの際に引数等の引き渡しを伴なってメイン
ルーチンからサブルーチンへ容易圧ジャンプして他のタ
スク処理を実行することができるとともに、PBNR命
令を利用することによりメインルーチンの元の位置へ速
やかにリターンして元の処理を続行することができる。
Therefore, by using the above instruction CBNR, it is possible to easily jump from the main routine to the subroutine by passing arguments etc. when calling a subroutine and execute other task processing, and at the same time, by using the PBNR instruction. This makes it possible to quickly return to the original position of the main routine and continue the original processing.

第5図は1本発明に係るレジスタバンク切替命令の実行
を可能にするマイクロプロセッサの他の構成例を示す。
FIG. 5 shows another example of the configuration of a microprocessor capable of executing a register bank switching instruction according to the present invention.

第4図に示されろマイクロプロセッサと異なる点は、コ
ントロールレジスタ群(1’)構成手段である。第4図
におけるコントロールレジ11群11は、RAM内に設
けられているが、第5図におけるコントロールレジスタ
群CRは、専用記憶手段としての複数のレジスタにより
て構成されている。これらのレジスタは、同種構成のテ
ンポラリ−レジスタREGI〜RE G nと同様罠、
実行ユニット6内に投げることができる。
The difference from the microprocessor shown in FIG. 4 is the control register group (1') configuration means. The control register group 11 in FIG. 4 is provided in the RAM, but the control register group CR in FIG. 5 is composed of a plurality of registers as dedicated storage means. These registers are similar to the temporary registers REGI~REGn with the same configuration.
It can be thrown into execution unit 6.

第6図は、本発明に係るレジスタバンク切替命令の実行
を可能にするマイクロプロセッサの他の構成例を示す。
FIG. 6 shows another configuration example of a microprocessor that enables execution of the register bank switching instruction according to the present invention.

第5図に示されるマイクロプロセッサと異なる点は、レ
ジスタバンクBNO〜BN15の構成手段である。第5
図におけるレジスタバンクBNO−BN15は、RAM
内に設けられているが、第6図におけるレジスタバンク
BNO〜BN15は、専用記憶手段としての複数のレジ
スタによって構成されている。これらのレジスタは、同
種構成のテンポラリ−レジスタREGI〜REGnと同
様に実行ユニット6内に設げることができる。レジスタ
バンクBNO〜BNI5を実行ユニット内に設けること
により、レジスタバンクBNO−BN15の内容を保持
するための上記データバッファDBを実行ユニット内に
設ける必要がなくなる。また、メモリアクセスコントロ
ーラ1に代って、レジスタアクセスコントローラ7′が
設けられる。
The difference from the microprocessor shown in FIG. 5 is the configuration means for register banks BNO to BN15. Fifth
Register banks BNO-BN15 in the figure are RAM
The register banks BNO to BN15 in FIG. 6 are comprised of a plurality of registers as dedicated storage means. These registers can be provided within the execution unit 6 in the same way as the temporary registers REGI-REGn having the same configuration. By providing the register banks BNO-BNI5 within the execution unit, there is no need to provide the data buffer DB within the execution unit for holding the contents of the register banks BNO-BN15. Furthermore, instead of the memory access controller 1, a register access controller 7' is provided.

なお、本発明により提案されたレジスタバンク切替え命
令は、第1図囚〜同図(G)のフォーマットに限定され
ず、例えばレジスタ指定フィールドRn−1istやイ
ミーディエイトデータ指定フィールドImmのフィール
ドの大きさは、汎用レジスタ群としてのRAMHの容量
や各レジスタバンクBNiのレジスタ本数に厄じて変更
できることはいうまでもない。
Note that the register bank switching instruction proposed by the present invention is not limited to the formats shown in FIGS. Needless to say, it is possible to change the capacity of RAMH as a general-purpose register group and the number of registers in each register bank BNi.

〔効果〕〔effect〕

本発明によれば、複数のレジスタセットを有jるマイク
ロプロセッサにおいて、レジスタセットを切替える際に
レジスタを指定してその内容を他のレジスタセット内の
レジスタに引き渡す命令を新たに作ったので、引数等の
引き渡しを伴なってレジスタセットの切替えを行うこと
も、引数等の引き渡しを伴なわないレジスタセットの切
替えも行えるようになり、これによって高速のタスク切
替えやサブルーチンコールが実現できるという作用によ
り、レジスタセットの切替えの際の柔軟性が向上され、
システムの実行速度が同上されるという効果がある。
According to the present invention, in a microprocessor having multiple register sets, a new instruction is created to specify a register and pass its contents to a register in another register set when switching register sets. It is now possible to switch register sets with passing arguments, etc., or without passing arguments, etc., and this enables high-speed task switching and subroutine calls. Improved flexibility when switching register sets,
This has the effect of increasing the execution speed of the system.

以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが、本発明は上記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもない。例えば、レジスタバンク
BNO−BN15はマイクロプロセッサ1の外部に設け
る構成であってもよい。また、以上の説明では主として
本発明者によってなされた発明をその背景となった利用
分野であるマイクロプロセッサに適用した場合について
説明したが、この発明はそれに限定されるものでなく、
計算機やミニコン等プログラム制御方式のデータ処理シ
ステム一般に利用することができる。
Although the invention made by the present inventor has been specifically explained above based on Examples, it goes without saying that the present invention is not limited to the above Examples and can be modified in various ways without departing from the gist thereof. Nor. For example, the register banks BNO-BN15 may be provided outside the microprocessor 1. Further, in the above explanation, the invention made by the present inventor was mainly applied to a microprocessor, which is the field of application that is the background of the invention, but the invention is not limited thereto.
It can be used in general program-controlled data processing systems such as computers and minicomputers.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図(3)〜同図(Gは本発明に係るレジスタセット
切替命令のフォーマットの例を示す説明図、第2図は、
第4図〜第7図におけろレジスタバンクの構成例を示す
説明図、 第3図頭〜同図の)は、本発明に係るレジスタセット切
替命令の作用を示す説明図、 第4図〜第6図は、本発明に係るレジスタセット切替命
令を実行可能にするマイクロプロセッサの構成例を示す
ブロック図、 第7図、第8図は、従来のマイクロプロセッサにおける
レジスタセット切替え方式を示す説明図である。 ALU・・・演算論理ユニット、REGI〜RE Gn
・・・テンポラリレジスタ、OP1〜OP7・・・オペ
レージ1ンコード指定フイールド、Rn−1ist・・
・レジスタ指定フィールド、Imm・・・イミーディエ
イトデータ指定フィールド、BNO〜BN15・・・ 
レジスタセット(レジスタバンク)。 第  1  図 (A) 第  1  図 (8) 第  1  図CC) 第  1  図CD) OPt       Imrn        、’(
yt−/i5t:第  2  図
Figures 1 (3) to 1 (G is an explanatory diagram showing an example of the format of the register set switching instruction according to the present invention, and Figure 2 is
Figures 4 to 7 are explanatory diagrams showing examples of register bank configurations; FIG. 6 is a block diagram showing a configuration example of a microprocessor that can execute the register set switching instruction according to the present invention. FIGS. 7 and 8 are explanatory diagrams showing a register set switching method in a conventional microprocessor. It is. ALU... Arithmetic logic unit, REGI~RE Gn
...Temporary register, OP1 to OP7...Operation 1 code specification field, Rn-1ist...
・Register specification field, Imm...immediate data specification field, BNO to BN15...
Register set (register bank). Figure 1 (A) Figure 1 (8) Figure 1 CC) Figure 1 CD) OPt Imrn,'(
yt-/i5t: Figure 2

Claims (1)

【特許請求の範囲】 1、命令に従って複数のレジスタ群の中のいずれかのレ
ジスタ群を指定して所定のデータ処理を行うデータ処理
機能を有してなり、上記命令は、1つのレジスタ群から
他のレジスタ群への切替えを指示する情報と、上記1つ
のレジスタ群内の1又は2以上のレジスタを指定する情
報とを含むことを特徴とするデータ処理システム。 2、上記命令はさらに、上記1又は2以上のレジスタの
内容を上記他のレジスタ群内のレジスタに移すことを指
示する情報を含むことを特徴とする特許請求の範囲第1
項記載のデータ処理システム。 3、上記命令はさらに、上記他のレジスタ群内の所望の
レジスタを指定する情報を含むことを特徴とする特許請
求の範囲第2項記載のデータ処理システム。 4、複数のレジスタ群を有し、プログラムに従っていず
れか一つのレジスタ群を使用して一連の処理を実行する
ようにされてなり、上記レジスタ群内のレジスタを指定
可能なレジスタ指定フィールドを有し、一つのレジスタ
群から他のレジスタ群への切替えを指示する命令が設け
られてなることを特徴とするデータ処理システム。 5、上記レジスタ指定フィールドは、上記レジスタ群内
のレジスタ数と同じビット数を有し、ビット対応でレジ
スタを指定できるようにされてなることを特徴とする特
許請求の範囲第4項記載のデータ処理システム。
[Claims] 1. It has a data processing function that specifies any register group among a plurality of register groups according to an instruction and performs predetermined data processing, and the above-mentioned instruction A data processing system comprising: information instructing switching to another register group; and information specifying one or more registers within the one register group. 2. Claim 1, wherein the instruction further includes information instructing to move the contents of the one or more registers to a register in the other register group.
Data processing system as described in Section. 3. The data processing system according to claim 2, wherein the instruction further includes information specifying a desired register within the other register group. 4. It has a plurality of register groups, is configured to execute a series of processes using any one register group according to a program, and has a register specification field that can specify a register in the register group. , a data processing system comprising an instruction for instructing switching from one register group to another register group. 5. The data according to claim 4, wherein the register specification field has the same number of bits as the number of registers in the register group, and is configured to specify registers in bit correspondence. processing system.
JP10192187A 1987-04-27 1987-04-27 Data processing device Expired - Lifetime JP2514963B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10192187A JP2514963B2 (en) 1987-04-27 1987-04-27 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10192187A JP2514963B2 (en) 1987-04-27 1987-04-27 Data processing device

Publications (2)

Publication Number Publication Date
JPS63268033A true JPS63268033A (en) 1988-11-04
JP2514963B2 JP2514963B2 (en) 1996-07-10

Family

ID=14313373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10192187A Expired - Lifetime JP2514963B2 (en) 1987-04-27 1987-04-27 Data processing device

Country Status (1)

Country Link
JP (1) JP2514963B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03286231A (en) * 1990-03-30 1991-12-17 Matsushita Electric Ind Co Ltd Real-time processor
JPH04260926A (en) * 1991-01-22 1992-09-16 Mitsubishi Electric Corp Bit retrieving circuit and data processor provided with the same
JP2014161414A (en) * 2013-02-22 2014-09-08 Sophia Co Ltd Game machine
JP2014161415A (en) * 2013-02-22 2014-09-08 Sophia Co Ltd Game machine
JP2014161423A (en) * 2013-02-22 2014-09-08 Sophia Co Ltd Game machine
JP2016135434A (en) * 2016-05-02 2016-07-28 株式会社ソフイア Game machine
JP2016135435A (en) * 2016-05-02 2016-07-28 株式会社ソフイア Game machine

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03286231A (en) * 1990-03-30 1991-12-17 Matsushita Electric Ind Co Ltd Real-time processor
JPH04260926A (en) * 1991-01-22 1992-09-16 Mitsubishi Electric Corp Bit retrieving circuit and data processor provided with the same
JP2014161414A (en) * 2013-02-22 2014-09-08 Sophia Co Ltd Game machine
JP2014161415A (en) * 2013-02-22 2014-09-08 Sophia Co Ltd Game machine
JP2014161423A (en) * 2013-02-22 2014-09-08 Sophia Co Ltd Game machine
JP2016135434A (en) * 2016-05-02 2016-07-28 株式会社ソフイア Game machine
JP2016135435A (en) * 2016-05-02 2016-07-28 株式会社ソフイア Game machine

Also Published As

Publication number Publication date
JP2514963B2 (en) 1996-07-10

Similar Documents

Publication Publication Date Title
JPH06332792A (en) Data processor, data reading control circuit thereof and data writing control circuit
JPS62197830A (en) Data processing system
JPH02130634A (en) Processor system, computer system and instruction processing method
JPS6298434A (en) data processing system
JPS6298429A (en) data processing system
JPS6313215B2 (en)
JPS6232503B2 (en)
JPS63226732A (en) Sequencer circuit
JPH10207717A (en) Microcomputer
JPS645330B2 (en)
JPS63268033A (en) data processing equipment
KR940002322B1 (en) Method of transferring register allocation
JPS5911921B2 (en) numerical control device
JPS6217773B2 (en)
JPH0377137A (en) Information processor
JP2005275703A (en) Processor, and context switching method
JPS6155130B2 (en)
JPS63293638A (en) data processing equipment
JPH0375904B2 (en)
JPH0367331A (en) microprocessor
JPS6112577B2 (en)
JPS6247745A (en) Microprogram control method
JPH02242335A (en) Electronic computer
JPS62174833A (en) data processing system
JPS63263535A (en) data processing system