JPH0528092A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH0528092A
JPH0528092A JP3180750A JP18075091A JPH0528092A JP H0528092 A JPH0528092 A JP H0528092A JP 3180750 A JP3180750 A JP 3180750A JP 18075091 A JP18075091 A JP 18075091A JP H0528092 A JPH0528092 A JP H0528092A
Authority
JP
Japan
Prior art keywords
general
data
purpose register
register file
register files
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
JP3180750A
Other languages
Japanese (ja)
Inventor
Seiichi Abe
誠一 阿部
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 JP3180750A priority Critical patent/JPH0528092A/en
Publication of JPH0528092A publication Critical patent/JPH0528092A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To provide a microprocessor where the chip size of a CPU core is small and quick context switching is possible independently of the number of nestings by providing the processor with a DMA controller for general register file and plural general register files. CONSTITUTION:A DMA transfer function for each of plural register files 2 and 3 is provided, and register files 2 and 3 are switched at the time of the occurrence of context switching. Or data is shifted to restore data or temporarily save data, and the processing of context switching is completed, and thereafter, next restored data or temporarily saved data is transferred between a memory 5 and register files 2 and 3 by DMA transfer. Thus, quick context switching is possible, and quickly switching is possible and the chip size of the CPU code is reduced in register files 2 and 3 where the number of nestings is 2 or 3.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は組込みコントローラ用マ
イクロプロセッサの汎用レジスタファイルの構成及び制
御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a general-purpose register file structure and control method for a microprocessor for an embedded controller.

【0002】[0002]

【従来の技術】従来のマイクロプロセッサは、複数の汎
用レジスタファイルを設け、コンテキストスイッチが発
生すると汎用レジスタを切替える方法によりコンテキス
トスイッチの高速化を図っていた。
2. Description of the Related Art A conventional microprocessor has a plurality of general-purpose register files, and when the context switch occurs, the general-purpose register is switched to speed up the context switch.

【0003】尚、マイクロプロセッサの汎用レジスタフ
ァイル構成方法の公知例として特開昭62−5467、
特開昭62−154166が挙げられる。
As a publicly known example of a method of constructing a general-purpose register file for a microprocessor, Japanese Patent Laid-Open No. 62-5467 is disclosed.
JP-A-62-154166 can be mentioned.

【0004】[0004]

【発明が解決しようとする課題】複数レジスタファイル
を設けてコンテキストスイッチを行なう場合に設けたレ
ジスタファイルより多いネスティングが発生するとレジ
スタファイルの退避又は復帰に多くの処理時間を必要と
し割込み処理の多いコントローラの場合に性能が落ちる
問題があった。
When a plurality of register files are provided and context switching is performed, if more nesting occurs than the register files provided, it takes a lot of processing time to save or restore the register files and a controller with a lot of interrupt processing. In the case of, there was a problem that the performance fell.

【0005】また、レジスタファイルを多くするとレジ
スタファイルをアクセスするスピードが遅くなり、ハー
ド量が多くなるため組込みコントローラ用プロセッサの
CPUコアチップサイズが大きくなり、プロセッサのマ
シンサイクルが遅い問題があった。
Further, if the number of register files is increased, the speed of accessing the register file becomes slower and the amount of hardware increases, so that the CPU core chip size of the processor for the embedded controller becomes large and the machine cycle of the processor is slow.

【0006】本発明の目的は、CPUコアのチップサイ
ズが小さく、ネスティング数に関係なく高速なコンテキ
ストスイッチが可能なマイクロプロセッサを提供するこ
とにある。
An object of the present invention is to provide a microprocessor having a small CPU core chip size and capable of high-speed context switching regardless of the number of nesting.

【0007】[0007]

【課題を解決するための手段】複数のレジスタファイル
の各レジスタファイルに対するDMA転送機能を設け、
コンテキストスイッチが発生した時にレジスタファイル
を切替える又はデータをシフトすることによりデータの
復帰又は一時的なデータ退避を行ないコンテキストスイ
ッチの処理を完了し、その後、DMA転送により次の復
帰データの転送又は一時的に退避したデータの転送をメ
モリとレジスタファイル間で行なう。
A DMA transfer function for each register file of a plurality of register files is provided.
When a context switch occurs, the register file is switched or the data is shifted to restore or temporarily save the data to complete the context switch process, and then the DMA transfer is performed to transfer or temporarily restore the next restored data. Transfer the data saved in the memory between the memory and the register file.

【0008】[0008]

【作用】レジスタファイルの切替え又はデータのシフト
によりデータの退避又は復帰が行なわれるため1サイク
ルでコンテキストスイッチのデータ処理が完了し高速な
コンテキストスイッチができる。
Since the data is saved or restored by switching the register file or shifting the data, the data processing of the context switch is completed in one cycle, and high-speed context switching can be performed.

【0009】また、その後、次のコンテキストスイッチ
までにDMA転送によりデータをメモリ上へ退避又はメ
モリ上からレジスタファイルへ復帰するのでネスティン
グ数が多くても2〜3個程度のレジスタファイルで前記
高速なコンテキストスイッチが可能なためCPUコアの
チップサイズを小さくでき、さらにレジスタファイルの
規模が小さいため高速アクセスが可能となるためプロセ
ッサのマシンサイクルを速くすることができる。
Further, thereafter, by the DMA transfer until the next context switch, the data is saved in the memory or restored from the memory to the register file. Therefore, even if the nesting number is at most 2-3 register files, the high speed operation can be achieved. Since context switching is possible, the chip size of the CPU core can be made small, and since the scale of the register file is small, high-speed access is possible, so that the machine cycle of the processor can be made fast.

【0010】[0010]

【実施例】本発明の一実施例を図1に示す。図1に示す
ように、演算器1、レジスタファイル2、レジスタファ
イル3、レジスタファイル切替え及びDMA制御回路
4、及びRAM5で構成され、演算器1とレジスタファ
イル2、3をソース1バス11、ソース2バス12、及
びディストネーションバス13で接続し、レジスタファ
イル2、3とRAM5をメモリバス14で接続する。一
般のレジスタ間演算を行なう場合、オペランドデータ2
1と汎用レジスタ指定データ22よりレジスタ切替及び
DMA制御回路4からソース1バス11、ソース2バス
12、ディストネーションバス13にレジスタファイル
のアドレスを出力しレジスタファイルをアクセスする。
これにより、レジスタファイル切替及びDMA制御回路
4が演算器が使用するレジスタファイルを指定する。仮
にレジスタファイル2が演算器1に使用されている場合
にコンテキストスイッチが発生すると汎用レジスタ指定
データが変更され、次の演算でアクセスされるレジスタ
ファイルはレジスタファイル3へ切替わる。この切替え
が完了するとレジスタファイル2のDMA転送が起動さ
れ、プロセッサの処理を遅らせないようにプロセッサが
メモリバス14を未使用時にレジスタファイル2とRA
M5間のDMA転送をレジスタファイル切替及びDMA
制御回路4が行なう。尚、レジスタ切替え時に切替えレ
ジスタのDMA転送が行なわれている場合はレジスタ切
替処理と同一方向のDMA転送がある場合は、DMA転
送が終わるまでウェイトし、逆方向のDMA転送は不要
な為キャンセルする。これら動作のフローを図3に示
す。
FIG. 1 shows an embodiment of the present invention. As shown in FIG. 1, it is composed of an arithmetic unit 1, a register file 2, a register file 3, a register file switching and DMA control circuit 4, and a RAM 5. The arithmetic unit 1, the register files 2 and 3 are source 1 bus 11, source 2 bus 12 and destination bus 13, and register files 2 and 3 and RAM 5 are connected by memory bus 14. Operand data 2 when performing general register-to-register operation
1 and the register switching data from the general purpose register designation data 22 are output from the DMA control circuit 4 to the source 1 bus 11, the source 2 bus 12, and the destination bus 13 to access the register file.
Thereby, the register file switching and DMA control circuit 4 specifies the register file used by the arithmetic unit. If a context switch occurs when the register file 2 is used in the arithmetic unit 1, the general-purpose register designation data is changed, and the register file accessed in the next operation is switched to the register file 3. When this switching is completed, the DMA transfer of the register file 2 is started, and the register file 2 and RA are used when the processor is not using the memory bus 14 so as not to delay the processing of the processor.
Register file switching and DMA transfer between M5
The control circuit 4 performs this. If DMA transfer of the switching register is being performed at the time of register switching, if there is a DMA transfer in the same direction as the register switching process, wait until the DMA transfer is completed, and cancel the DMA transfer in the reverse direction because it is unnecessary. . The flow of these operations is shown in FIG.

【0011】また、レジスタファイルは図2に示すよう
にデータをシフトするためのバス15、16を設け、切
替時にシフトする構成があり、図1に示す構成は、ロー
カルレジスタのコンテキストスイッチの切替えに使用さ
れ、図2の構成は、グローバルレジスタのスタックポイ
ンタへの退避に使用される。
The register file is provided with buses 15 and 16 for shifting data as shown in FIG. 2 and has a configuration for shifting at the time of switching. The configuration shown in FIG. 1 is for switching context switches of local registers. 2 is used to save the global register to the stack pointer.

【0012】さらに、2個以上のレジスタファイルがあ
る場合、次のコンテキストスイッチまでDMA転送が完
了しなくても、切替えるレジスタファイルがあるため、
切替えが可能であり、レジスタファイルを全て使用する
まで1サイクルで切替えるので有効である。
Further, when there are two or more register files, there is a register file to be switched even if the DMA transfer is not completed until the next context switch.
Switching is possible, and it is effective because switching is performed in one cycle until the entire register file is used.

【0013】[0013]

【発明の効果】本発明によれば、レジスタファイルの数
が少なくても、多くのネスティングに対して高速なコン
テキストスイッチが可能であり、CPUコアチップサイ
ズを小さくする効果がある。
According to the present invention, even if the number of register files is small, high-speed context switching can be performed for many nesting, and the CPU core chip size can be reduced.

【0014】また、レジスタファイルの規模が小さいた
めレジスタファイルのアクセスが高速にできマシンサイ
クルを上げることができる効果がある。
Further, since the size of the register file is small, the register file can be accessed at high speed and the machine cycle can be increased.

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

【図1】本発明の演算部ブロック図である。FIG. 1 is a block diagram of a calculation unit of the present invention.

【図2】本発明のレジスタファイルの構成図である。FIG. 2 is a configuration diagram of a register file of the present invention.

【図3】本発明の動作フロー図である。FIG. 3 is an operation flow chart of the present invention.

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

1…演算器、 2…レジスタファイル、 3…レジスタファイル、 4…レジスタファイル切替及びDMA制御回路、 5…RAM、 11…ソース1バス、 12…ソース2バス、 13…ディストネーションバス、 14…メモリバス、 15…シフト用バス、 16…シフト用バス、 21…オペランドデータ、 22…汎用レジスタ指定データ。 1 ... arithmetic unit, 2 ... register file, 3 ... register file, 4 ... Register file switching and DMA control circuit, 5 ... RAM, 11 ... Source 1 bus, 12 ... Source 2 bus, 13 ... destination bus 14 ... Memory bus, 15 ... shift bus, 16 ... shift bus, 21 ... Operand data, 22 ... General-purpose register designation data.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】汎用レジスタファイル用DMAコントロー
ラと複数の汎用レジスタファイルをプロセッサに設け、
プロセッサの処理を切替える時点では使用する該複数の
汎用レジスタファイルを切替えてデータの退避又は復帰
を行ない、切替え後の処理中に該汎用レジスタファイル
用DMAコントローラで複数の汎用レジスタファイルの
データをメモリ上へ退避又は復帰することを特徴とする
マイクロプロセッサ。
1. A processor is provided with a general-purpose register file DMA controller and a plurality of general-purpose register files.
At the time of switching the processing of the processor, the plurality of general purpose register files to be used are switched to save or restore the data, and the data of the plurality of general purpose register files are stored in the memory by the general purpose register file DMA controller during the processing after the switching. A microprocessor characterized by being saved in or restored from.
【請求項2】汎用レジスタファイル用DMAコントロー
ラと複数の汎用レジスタファイルを設け、該複数の汎用
レジスタファイルを汎用レジスタファイル間でデータの
シフトが出来るように構成し、プロセッサの処理を切替
える時点では汎用レジスタファイルのデータをシフトし
データの退避又は復帰を行ない、切替え後の処理中に該
汎用レジスタファイル用DMAコントローラで複数の汎
用レジスタファイルのデータをメモリ上へ退避又は復帰
することを特徴とするマイクロプロセッサ。
2. A general-purpose register file DMA controller and a plurality of general-purpose register files are provided, the plurality of general-purpose register files are configured so that data can be shifted between the general-purpose register files, and at the time of switching the processing of the processor, the general-purpose register files are general-purpose. A micro characterized in that data in a register file is shifted to save or restore the data, and data in a plurality of general-purpose register files is saved or restored in a memory by the DMA controller for general-purpose register file during processing after switching. Processor.
【請求項3】請求項1または2のマイクロプロセッサに
おいて、該複数の汎用レジスタファイルの各レジスタフ
ァイルにデータ退避用DMA転送完了フラグとデータ復
帰用DMA転送フラグを設け、データ退避時に切替え対
象の汎用レジスタファイルのデータ退避完了フラグをチ
ェックし、データ復帰時に切替え対象の汎用レジスタフ
ァイルのデータ復帰DMA転送完了フラグをチェック
し、DMA転送が完了し各フラグがセットされるまでプ
ロセッサを停止することを特徴とするマイクロプロセッ
サ。
3. The microprocessor according to claim 1, wherein each of the register files of the plurality of general purpose register files is provided with a data save DMA transfer completion flag and a data restore DMA transfer flag, and is a general purpose switch target when saving data. The data saving completion flag of the register file is checked, the data restoration DMA transfer completion flag of the general purpose register file to be switched is checked at the time of data restoration, and the processor is stopped until the DMA transfer is completed and each flag is set. And a microprocessor.
【請求項4】汎用レジスタファイル用DMAコントロー
ラにおいて、プロセッサのバス使用権より優先順位を低
くしたことを特徴とするDMAコントローラ。
4. A DMA controller for a general-purpose register file, wherein the bus controller has a lower priority than the bus use right.
【請求項5】汎用レジスタファイル用DMAコントロー
ラにおいて、プロセッサのメモリバスと異なるデータ転
送バスを設けてDMA転送することを特徴とするDMA
コントローラ。
5. A DMA controller for a general-purpose register file, wherein a data transfer bus different from a memory bus of a processor is provided to perform DMA transfer.
controller.
JP3180750A 1991-07-22 1991-07-22 Microprocessor Pending JPH0528092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3180750A JPH0528092A (en) 1991-07-22 1991-07-22 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3180750A JPH0528092A (en) 1991-07-22 1991-07-22 Microprocessor

Publications (1)

Publication Number Publication Date
JPH0528092A true JPH0528092A (en) 1993-02-05

Family

ID=16088665

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3180750A Pending JPH0528092A (en) 1991-07-22 1991-07-22 Microprocessor

Country Status (1)

Country Link
JP (1) JPH0528092A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100770034B1 (en) * 2006-03-02 2007-10-26 삼성전자주식회사 Method and system for providing context switch using multiple register file
US7590774B2 (en) 2005-12-01 2009-09-15 Kabushiki Kaisha Toshiba Method and system for efficient context swapping

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7590774B2 (en) 2005-12-01 2009-09-15 Kabushiki Kaisha Toshiba Method and system for efficient context swapping
KR100770034B1 (en) * 2006-03-02 2007-10-26 삼성전자주식회사 Method and system for providing context switch using multiple register file
US8327122B2 (en) 2006-03-02 2012-12-04 Samsung Electronics Co., Ltd. Method and system for providing context switch using multiple register file

Similar Documents

Publication Publication Date Title
JPH02306337A (en) Normalization system for floating point data
JPH0594546A (en) Digital processor
JPS6142308B2 (en)
JPH0528092A (en) Microprocessor
KR100188374B1 (en) Central processing unit and an arithmetic operation processing unit
JP2503984B2 (en) Information processing device
JPH04104350A (en) Micro processor
JPS60126736A (en) Data processor
JPS62262146A (en) Processor
JP2007087244A (en) Co-processor and computer system
JPS63268032A (en) Loop control circuit
JP2006515446A (en) Data processing system with Cartesian controller that cross-references related applications
JPH07325805A (en) Vector processor
JPS6352240A (en) Data processor
JPH01309174A (en) Vector processor
JP3723311B2 (en) Parallel processor
JPS60247742A (en) Pipeline arithmetic controller
JPH06161708A (en) Floating point arithmetic unit
JPH0689349A (en) Microprocessor
JPH02173828A (en) Interruption process system
JPH06110705A (en) Program controller
JPS6269350A (en) Microprocessor
JPH05120014A (en) Microcomputer
JPH058645U (en) Interrupt control device of microprocessor
JPH0683612A (en) Data processor