JPS6352241A - Microprocessor - Google Patents
MicroprocessorInfo
- Publication number
- JPS6352241A JPS6352241A JP61195303A JP19530386A JPS6352241A JP S6352241 A JPS6352241 A JP S6352241A JP 61195303 A JP61195303 A JP 61195303A JP 19530386 A JP19530386 A JP 19530386A JP S6352241 A JPS6352241 A JP S6352241A
- Authority
- JP
- Japan
- Prior art keywords
- register
- register groups
- overflow
- pointer
- detects
- 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
Links
- 238000001514 detection method Methods 0.000 claims description 8
- 238000000034 method Methods 0.000 abstract description 5
- 230000002457 bidirectional effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 3
- 239000004065 semiconductor Substances 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 229910021421 monocrystalline silicon Inorganic materials 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/461—Saving or restoring of program or task context
- G06F9/462—Saving or restoring of program or task context with multiple register sets
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明は、マイクロプロセッサに関し、例えば複数組
のレジスタ群を有するマイクロプロセッサに利用して有
効な技術に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microprocessor, and relates to a technique that is effective for use in, for example, a microprocessor having a plurality of register groups.
マイクロプロセッサは、サブルーチンコールやタスク切
り換え等によるコンテキストスイッチが生じると、現プ
ログラムの実行に使用している各種レジスタの内容を退
避したり、又はその逆に上記退避したレジ′スタの内容
をもとのレジスタに回復させるというデータ処理を行う
、このようなデータ処理は、スタック(メモリ)とスタ
ック・ポインタによって実行される。このようなレジス
タ群の退避/回復に関しては、例えば、CQ出版■昭和
58年9月15日発行rマイクロコンピュータの内部構
造と機械語J福永邦雄著、頁163〜頁196に述べら
れ、ている。When a context switch occurs due to a subroutine call or task switch, the microprocessor saves the contents of various registers used to execute the current program, or conversely, uses the contents of the saved registers as the base. This data processing is performed by restoring the data into the registers of the memory, which is performed using the stack (memory) and the stack pointer. The saving/recovery of such a register group is described, for example, in CQ Publishing, September 15, 1988, Microcomputer Internal Structure and Machine Language, written by Kunio Fukunaga, pp. 163-196. .
上記のコンテキストスイッチが頻繁に生じるプログラム
の実行においては、上記各種レジスタの内容の退避及び
回復に時間が費やされるため、実質的なデータ処理速度
が遅(なってしまう。When executing a program in which the above-mentioned context switches occur frequently, time is spent saving and restoring the contents of the various registers, which slows down the actual data processing speed.
この発明の目的は、コンテキストスイッチを伴うデータ
処理速度の向上を図ったマイクロプロセッサを提供する
ことにある。An object of the present invention is to provide a microprocessor that improves data processing speed with context switching.
この発明の前記ならびにそのほかの口約と新規な特徴は
、本明細書の記述および添付図面から明らかになるであ
ろう。The above and other features and novel features of the present invention will become apparent from the description and accompanying drawings.
本願において開示される発明のうち代表的なものの概要
を簡単に説明すれば、下記の通りである。A brief overview of typical inventions disclosed in this application is as follows.
すなわち、複数組のレジスタ群を設けて、この管理を1
つのレジスタ群を指定するポインタと、上記ポインタの
オーバーフローを検出する検出回路とにより行うもので
ある。In other words, multiple sets of registers are provided and this management is performed in one register group.
This is done using a pointer that specifies one register group and a detection circuit that detects overflow of the pointer.
上記した手段によれば、コンテキストスイッチが生じる
毎にレジスタ群の切り換えを行い、上記レジスタ群の数
を超えてコンテキストスイッチが生じたときに、上記検
出信号に従って所定の処理を行うことにより、コンテキ
ストスイッチやリターンに伴うデータ処理が高速に行え
る。According to the above means, the register group is switched every time a context switch occurs, and when the number of context switches exceeds the number of register groups, the context switch is performed by performing a predetermined process according to the detection signal. Data processing associated with returns and returns can be performed at high speed.
第1図には、この発明に係るマイクロプロセッサの一実
施例のブロック図が示されている。同図において点線で
囲まれたマイクロプロセッサMPU(LSI)を構成す
る各回路ブロックは、公知の半導体集積回路の製造技術
によって、特に制限されないが、単結晶シリコンのよう
な1つの半導体基板上において形成される。FIG. 1 shows a block diagram of an embodiment of a microprocessor according to the present invention. Each circuit block constituting the microprocessor MPU (LSI) surrounded by dotted lines in the figure is formed on a single semiconductor substrate such as single crystal silicon using known semiconductor integrated circuit manufacturing techniques, although not particularly limited thereto. be done.
この実施例では、高速なコンテキストスイッチを伴いデ
ータ処理を可能にするため、特に制限されないが、Aな
いしNからなる複数組のレジスタ群が設けられる。これ
らの各レジスタ群A−Nは、内蔵のRAMのエリア内に
分割されてそれぞれ構成される。上記レジスタ群Aない
しNは、それぞれ所定のプログラムの命令実行に必要な
プログラムカウンタPCAないしPAN、スタックポイ
ンタSPAないしSPN、各種レジスタREAないしR
EN及びポインタAないしNからそれぞれ構成される。In this embodiment, in order to enable data processing with high-speed context switching, a plurality of register groups consisting of A to N are provided, although not particularly limited thereto. Each of these register groups A-N is divided and configured within an area of a built-in RAM. The above register groups A to N are program counters PCA to PAN, stack pointers SPA to SPN, and various registers REA to R, respectively, which are necessary for executing instructions of a predetermined program.
They each consist of EN and pointers A to N.
これらの各レジスタ群は、内部バスB1ないしB3の3
バスによって次の各回路ユニットと結合される。Each of these register groups is connected to three internal buses B1 to B3.
It is connected to each of the following circuit units by a bus.
算術論理演算ユニフ)ALUは、上記バスB1からのデ
ータと、上記バスB1を介して供給されたデータの取り
込みを行うランチ(アキエムレータ)FFの信号を受け
て、命令語の解読により形成される制御信号に従って算
術又は論理演算動作を行う、この演算結果は、バスB2
に出力され上記各レジスタ群に取り込まれる。The arithmetic and logic unit (ALU) receives data from the bus B1 and a signal from a launch (achiemulator) FF that takes in the data supplied via the bus B1, and performs control formed by decoding a command word. Arithmetic or logical operation is performed according to the signal, and the result of this operation is transferred to bus B2.
is output to and taken into each of the above register groups.
また、外部メモリ等とのデータの授受のために、データ
バッファDBが設けられる。このデータバッファDBは
、特に制限されないが、バスB1と双方向データバッフ
ァDABとの間でデータの転送を行われる。すなわち、
外部メモリ等から読み出された外部データバス上のデー
タは、上記双方向データバッファDABによって取り込
まれる。Further, a data buffer DB is provided for exchanging data with an external memory and the like. Data is transferred between the data buffer DB and the bus B1 and the bidirectional data buffer DAB, although this is not particularly limited. That is,
Data on the external data bus read from an external memory or the like is taken in by the bidirectional data buffer DAB.
この双方向データバッファDABの信号D1は、上記デ
ータバッファDBを介して内部バスB1に送出される。The signal D1 of this bidirectional data buffer DAB is sent to the internal bus B1 via the data buffer DB.
逆に、上記のような算術演算ユニフ)ALUによる演算
により生成され、外部メモリ装置等に送出されるべき内
部バスBl上のデータは、上記データバッファDBに取
り込まれる。そして、上記双方向データバッファDAB
を介して外部バス上に送出される。一方、バスB1上の
アドレス18号は、アドレスバッファABとアドレス出
力回路ADBを介して外部バスに送出される。Conversely, data on the internal bus Bl that is generated by the arithmetic operation unit (ALU) and to be sent to an external memory device or the like is taken into the data buffer DB. And the bidirectional data buffer DAB
is sent out on the external bus via On the other hand, address No. 18 on bus B1 is sent to the external bus via address buffer AB and address output circuit ADB.
これによって、外部のメモリ装置や入出力装置に対する
アクセスが行われる。This allows access to external memory devices and input/output devices.
また、上記外部メモリ装置に格納されたプログラムの命
令語は、上記双方向データバッファDABに取り込まれ
る。この命令語は、命令レジスタIRに送出される。こ
の命令レジスタIRに取り込まれた命令語は、マイクロ
プログラムROM(以下、単にm ROMと称する)に
供給される。Further, the command words of the program stored in the external memory device are taken into the bidirectional data buffer DAB. This instruction word is sent to the instruction register IR. The instruction word taken into the instruction register IR is supplied to a microprogram ROM (hereinafter simply referred to as mROM).
このmROMは、上記命令語に応じた複数ステップから
なるマイクロ命令の読み出しが行われる。This mROM is used to read microinstructions consisting of a plurality of steps according to the instruction word.
このマイクロ命令は、一方においてデコーダDCRに供
給され、ここで上記内部バスを介してのデータの転送、
各種レジスタの動作及び算術論理演算ユニ7 )ALU
の動作に必要な各種制御信号及びタイミング信号を発生
させる。また、上記マイクロ命令は、他方において入力
側に帰還され、条件ジャンプや次のアドレス指定に用い
られる。このように、外部メモリ等から供給されるマク
ロ命令は、上記mROMに格納された複数ステップから
なるマイクロ命令により実行される。This microinstruction is fed on the one hand to the decoder DCR, which transfers the data via the internal bus,
Operation of various registers and arithmetic logic operation unit 7) ALU
generates various control signals and timing signals necessary for the operation of the Furthermore, the microinstructions mentioned above are fed back to the input side on the other hand and are used for conditional jumps and next address designation. In this way, a macroinstruction supplied from an external memory or the like is executed by a microinstruction consisting of multiple steps stored in the mROM.
また、割り込み回路INTは、その割り込みがあると、
コンデジョンレジスタCRをアクセスする。コンデジョ
ンレジスタCRは、上記レジスタ群AないしNのポイン
タに対応して、その状態に応じた命令実行を指示する。Also, when the interrupt circuit INT receives the interrupt,
Access condition register CR. The condition register CR corresponds to the pointers of the register groups A to N and instructs the execution of instructions according to their states.
上記割り込み回路INTから割り込みがあると、上記コ
ンデジョンレジスタCRは、ポインタから空き状態のレ
ジスタ群に対するアクセスを行うよう命令デコーダDC
Rに指示する。また、命令デコーダDCRはサブルーチ
ンコールに対して上記ポインタから空き状態のレジスタ
群に対するアクセスを行う。When there is an interrupt from the interrupt circuit INT, the condesion register CR causes the instruction decoder DC to access the vacant register group from the pointer.
Instruct R. Further, the instruction decoder DCR accesses a group of free registers from the above pointer in response to a subroutine call.
システムリセット後におては、レジスタ群が全て空き状
態であるので、例えばレジスタ群Aが使用して所定のプ
ログラムを実行する。各レジスタ群AないしNのうち、
レジスタ群Aのポインタは現在使用状態であり、蔑りの
レジスタ群BないしNのポインタは空き状態であること
を示している。After the system is reset, all the register groups are empty, so for example, register group A is used to execute a predetermined program. Of each register group A to N,
The pointer for register group A is currently in use, and the pointers for register groups B through N are empty.
この状態で、次々にコンテキストスイッチが生じた場合
、言い換えうならば、副プログラム呼び出しの多重化が
深まるに従ってB、C−Nの順にレジスタ群が切り換え
られて使用される。逆に、副プログラムからの復帰によ
り多重度が浅くなるに従ってN−C,B、Aのように逆
方向の切り換えが行われる。この切り換えに際して、そ
れぞれのプログラムが中断されるが、それぞれの中断時
の各データは、それぞれプログラムカウンタやレジスタ
によって保持されているからデータの退避を必要としな
い、これによって、高速なコンテキストス・インチが行
われる。In this state, when context switches occur one after another, in other words, the register groups are switched and used in the order of B, CN as the subprogram calls become more multiplexed. Conversely, as the multiplicity becomes shallower upon return from the subprogram, switching in the opposite direction is performed, such as NC, B, and A. When this switching occurs, each program is interrupted, but the data at each interruption is retained by the program counter and registers, so there is no need to save the data. will be held.
上記最終のレジスタ群Nを使用中に、コンテキストスイ
ッチが生じると、コンデジョンレジスタCRはオーバー
フローを検出する。If a context switch occurs while using the final register group N, the condesion register CR detects an overflow.
このオーバーフローが生じたときの処理としては、(1
)例えば割り込み信号を発生させて中央処理装置に制御
を渡す、(2)オーバーフローが生じたことを示すフラ
グを立てて、最初のレジスタ群Aによるプログラムの実
行を行い、前のプログラムにリターンするときにその内
容が破壊されたことをチェックできるようにする。(3
)上記レジスタ群の必要分のデータを退避させて空き状
態のレジスタ群を作り出して、その命令を続けて実行す
ると等各種の処理が可能になる。The processing when this overflow occurs is (1
) For example, when generating an interrupt signal and passing control to the central processing unit, (2) Setting a flag indicating that an overflow has occurred, executing the program using the first register group A, and returning to the previous program. It is possible to check that the contents have been destroyed. (3
) Various types of processing become possible, such as by saving the necessary data in the register group to create an empty register group, and then executing the instructions continuously.
上記の実施例から得られる作用効果は、下記の通りであ
る。すなわち、
(11複数組のレジスタ群を設けて、この管理を1つの
レジスタ群を指定するポインタと、上記ポインタのオー
バーフローを検出する検出回路とにより行うことにより
、コンテキストスイッチが生じる毎にレジスタ群の切り
換えを行い、上記レジスタ群の数を超えてコンテキスト
スイッチが生じたときに、上記検出信号に従って所定の
処理を行うことにより、演算評価、副プログラム呼び出
し復帰が効率良く行えるという効果が得られる。The effects obtained from the above examples are as follows. In other words, (11) By providing multiple sets of register groups and managing them using a pointer that specifies one register group and a detection circuit that detects overflow of the pointer, the register group is managed every time a context switch occurs. When a context switch occurs and the number of register groups exceeds the number of register groups, predetermined processing is performed in accordance with the detection signal, thereby achieving the effect that arithmetic evaluation and subprogram call return can be performed efficiently.
(2)上記レジスタ群を内蔵のRAMを用いて構成する
ことによって、多数のレジスタ群を半導体基板上に高密
廣で実装することができるという効果が得られる。(2) By configuring the register group using a built-in RAM, it is possible to mount a large number of register groups on a semiconductor substrate with high density.
(3)上記(1)により、複数組のレジスタ群のち空き
状態のレジスタ群が存在する場合、スタックやレジスタ
群のオーバーフローを毎回チェックすることなくこれら
を使用することができるという効果が得られる。(3) According to (1) above, if there is a vacant register group among a plurality of register groups, it is possible to use the register group without checking the stack or the register group for overflow every time.
以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが、本発明は上記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもだい。例えば、マイクロプロセ
ッサ内に直接メモリアクセス制御回路を内蔵して、上記
レジスタ群の退避を上記オーバーフロー検出信号に基づ
いて自動的に行うようにするものであってもよい、この
場合、全レジスタ群にデータが格納されると自動的にそ
の1つのレジスタ群のデータ退避及び回復を行うことが
できる。また、上記レジスタ群は、上記内蔵のRA P
vlを用いて構成することの他、それぞれ独立した回路
により構成するものであってもよい。さらに、上記レジ
スタ群の切り換え制j1方法は、種々の実施形態を採る
ことができるものである。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. Also. For example, a direct memory access control circuit may be built into the microprocessor to automatically save the register group based on the overflow detection signal. In this case, all register groups may be saved. Once data is stored, data can be automatically saved and restored for that one register group. In addition, the above register group is the built-in RAP
In addition to being configured using vl, they may be configured using independent circuits. Furthermore, the register group switching system j1 method described above can be implemented in various embodiments.
また、複数のレジスタ群と算術論理演算二二ソトや各バ
ッファ等との接続を行う内部バスの数や配置は、種々の
実施形態を採ることができるものである。Furthermore, the number and arrangement of internal buses that connect the plurality of register groups to the arithmetic and logic operations, each buffer, etc. can take various embodiments.
この発明は、マイクロプロセッサに広く利用できるもの
である。This invention can be widely used in microprocessors.
複数組のレジスタ群を設けて、この管理を1つのレジス
タ群を指定するポインタと、上記ポインタのオーバーフ
ローを検出する検出回路とにより行うことにより、コン
テキストスイッチが生じる毎にレジスタ群の切り換えを
行い、上記レジスタ群の数を超えてコンテキストスイッ
チが生じたときに、上記検出信号に従って所定の処理を
行うことにより、演算評価、副プログラム呼び出し復帰
が効率良く行える。By providing a plurality of register groups and performing this management using a pointer that specifies one register group and a detection circuit that detects overflow of the pointer, the register group is switched every time a context switch occurs. When a context switch occurs exceeding the number of register groups, arithmetic evaluation and subprogram call recovery can be performed efficiently by performing predetermined processing according to the detection signal.
第1図は、この発明の一実施例を示すブロック図である
。FIG. 1 is a block diagram showing one embodiment of the present invention.
Claims (1)
ログラムの実行に使用するレジスタ群を指定するポイン
タと、上記ポインタのオーバーフローを検出する検出回
路とを含むことを特徴とするマイクロプロセッサ。 2、上記複数組のレジスタ群は、内蔵のRAMにより構
成されるものであることを特徴とする特許請求の範囲第
1項記載のマイクロプロセッサ。[Scope of Claims] 1. Includes a plurality of register groups required for instruction execution, a pointer for specifying a register group used for program execution, and a detection circuit for detecting overflow of the pointer. Features a microprocessor. 2. The microprocessor according to claim 1, wherein the plurality of register groups are configured by built-in RAM.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61195303A JPS6352241A (en) | 1986-08-22 | 1986-08-22 | Microprocessor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61195303A JPS6352241A (en) | 1986-08-22 | 1986-08-22 | Microprocessor |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6352241A true JPS6352241A (en) | 1988-03-05 |
Family
ID=16338910
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61195303A Pending JPS6352241A (en) | 1986-08-22 | 1986-08-22 | Microprocessor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6352241A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0363826A (en) * | 1989-05-04 | 1991-03-19 | Texas Instr Inc <Ti> | Data processor |
JPH03209529A (en) * | 1990-01-12 | 1991-09-12 | Matsushita Electric Ind Co Ltd | Hardware operating method |
WO1994015287A2 (en) * | 1992-12-23 | 1994-07-07 | Centre Electronique Horloger S.A. | Multi-tasking low-power controller |
-
1986
- 1986-08-22 JP JP61195303A patent/JPS6352241A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0363826A (en) * | 1989-05-04 | 1991-03-19 | Texas Instr Inc <Ti> | Data processor |
JPH03209529A (en) * | 1990-01-12 | 1991-09-12 | Matsushita Electric Ind Co Ltd | Hardware operating method |
WO1994015287A2 (en) * | 1992-12-23 | 1994-07-07 | Centre Electronique Horloger S.A. | Multi-tasking low-power controller |
WO1994015287A3 (en) * | 1992-12-23 | 1994-08-18 | Centre Electron Horloger | Multi-tasking low-power controller |
US5630130A (en) * | 1992-12-23 | 1997-05-13 | Centre Electronique Horloger S.A. | Multi-tasking low-power controller having multiple program counters |
KR100313261B1 (en) * | 1992-12-23 | 2002-02-28 | 앙드래베이너,조엘브르리아드 | Low Power Multi-task Controller (Name Correction) |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4250546A (en) | Fast interrupt method | |
EP0203304B1 (en) | Data processor controller | |
US6243804B1 (en) | Single cycle transition pipeline processing using shadow registers | |
US5408643A (en) | Watchdog timer with a non-masked interrupt masked only when a watchdog timer has been cleared | |
JP3105223B2 (en) | Debug peripherals for microcomputers, microprocessors and core processor integrated circuits | |
US4200912A (en) | Processor interrupt system | |
JP2006503385A (en) | Method and apparatus for fast inter-thread interrupts in a multi-thread processor | |
JPS5841538B2 (en) | Multiprocessor system instructions | |
JP2002503845A (en) | Zero overhead computer interrupt due to task switching | |
EP0239078B1 (en) | Register saving/restoring system | |
JPH05324348A (en) | Single chip microcomputer | |
US7516311B2 (en) | Deterministic microcontroller context arrangement | |
JPS6352241A (en) | Microprocessor | |
US4409653A (en) | Method of performing a clear and wait operation with a single instruction | |
US6061787A (en) | Interrupt branch address formed by concatenation of base address and bits corresponding to highest priority interrupt asserted and enabled | |
JPS6352240A (en) | Data processor | |
US20030145175A1 (en) | Multiprocessor system having respective control programs of a plurality of processors stored contiguously in a memory | |
EP0933704B1 (en) | Data processor with protected non-maskable interrupt | |
JPH05165641A (en) | Single chip microcomputer | |
JPS60140440A (en) | Central processing unit | |
US20060168420A1 (en) | Microcontroller cache memory | |
JPS5942331B2 (en) | Prosetsusasouchinoseigiohoshiki | |
JPH01319834A (en) | Data processor | |
JPH0217541A (en) | Stack system micro-computer | |
JPS63155330A (en) | Microprogram controller |