JPH0683614A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH0683614A
JPH0683614A JP4233386A JP23338692A JPH0683614A JP H0683614 A JPH0683614 A JP H0683614A JP 4233386 A JP4233386 A JP 4233386A JP 23338692 A JP23338692 A JP 23338692A JP H0683614 A JPH0683614 A JP H0683614A
Authority
JP
Japan
Prior art keywords
control
operand
instruction
operand control
register
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
JP4233386A
Other languages
Japanese (ja)
Inventor
Yoshiaki Shintani
佳昭 新谷
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4233386A priority Critical patent/JPH0683614A/en
Publication of JPH0683614A publication Critical patent/JPH0683614A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To provide a microcomputer which can reduce the program capacity and also shorten the program executing time. CONSTITUTION:A control register group 8 is provided with a 2-operand/3- operand control switching register 11. An instruction decoding part 9 decodes an instruction code as well as the logical value of the register 11 that is set at every task execution queues. Thus the information on the operands can be decided. Thus, the switching is facilitated between the 2-operand and 3-operand control states at every task even with the same instruction code.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、制御用レジスタ群内部
にある2オペランド制御3オペランド制御切り替えレジ
スタの出力によって、同一命令コードでありながら2オ
ペランド制御、3オペランド制御の切り替えが可能なマ
イクロコンピュータに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer capable of switching between 2-operand control and 3-operand control with the same instruction code by the output of a 2-operand control 3-operand control switching register inside a control register group. It is about.

【0002】[0002]

【従来の技術】従来の2オペランド制御のマイクロコン
ピュータのプログラムでは、n番地に命令コード、(n
+1)番地にソースアドレス、(n+2)番地にディス
ティネーションアドレスが格納されているものが多かっ
た。
2. Description of the Related Art In a conventional two-operand control microcomputer program, an instruction code (n
In many cases, the source address was stored in the (+1) address and the destination address was stored in the (n + 2) address.

【0003】例えば加算命令の場合ソースアドレスで示
される番地のデータと、ディスティネーションアドレス
で示される番地のデータが加算された後、この加算され
たデータが再びディスティネーションアドレスで示され
る番地に格納される。このためディスティネーションア
ドレスで示される番地のデータを書き換えたくない場合
には、事前にディスティネーションアドレスで示される
番地のデータを別の場所にコピーしてから加算する必要
があった。この場合のアセンブラプログラムの例を挙げ
ると、 (プログラム) MOV B C ADD A C (A,B,Cはアドレスを示
す) のようになり、アドレスBで示されるデータをアドレス
Cへコピーし、アドレスAで示されるデータとアドレス
Cで示されるデータを加算するというように2命令の実
行が必要であった。
For example, in the case of an addition instruction, after the data at the address indicated by the source address and the data at the address indicated by the destination address are added, the added data is stored again at the address indicated by the destination address. It Therefore, when it is not desired to rewrite the data of the address indicated by the destination address, it is necessary to copy the data of the address indicated by the destination address to another place in advance and then add the data. An example of an assembler program in this case is as follows: (Program) MOV B C ADD A C (A, B, and C indicate addresses), the data indicated by address B is copied to address C, and It was necessary to execute two instructions such as adding the data indicated by A and the data indicated by address C.

【0004】一方、3オペランド制御のマイクロコンピ
ュータのプログラムでは上記のようなアセンブラプログ
ラムは、 ADD A B C となり、1命令の実行で済む。
On the other hand, in a three-operand control microcomputer program, the assembler program as described above becomes ADD ABC and only one instruction needs to be executed.

【0005】しかし、ディスティネーションアドレスB
に示されるデータを加算した結果に書き換えたい場合、
すなわち、アドレスAで示されるデータとアドレスBに
示されるデータを加算し、この加算した結果を再びアド
レスBに格納したい場合には、2オペランド制御では、 ADD A B となり、命令コードと2つのアドレス指定部で済むが、
3オペランド制御では、 ADD A B B となり、命令コードと3つのアドレス指定部が必要であ
る。
However, the destination address B
If you want to rewrite the result of adding the data shown in,
That is, when the data indicated by the address A and the data indicated by the address B are added and the addition result is to be stored again at the address B, ADD A B is obtained in the two-operand control, and the instruction code and the two addresses are stored. The designated part is enough,
Three-operand control results in ADD ABBB, which requires an instruction code and three addressing sections.

【0006】従来のマイクロコンピュータでは、2オペ
ランド制御、3オペランド制御のどちらか一方の制御し
か行わなかったので、プログラム容量の増加や実行時間
の増大を招いていた。
In the conventional microcomputer, either one of the two-operand control and the three-operand control is performed, so that the program capacity and the execution time are increased.

【0007】[0007]

【発明が解決しようとする課題】このように従来のマイ
クロコンピュータでは2オペランド制御か3オペランド
制御のどちらか一方でしか制御を行わないため、アドレ
ス指定部の増加によりプログラムの容量が大きくなって
しまったり、実行命令の増加により実行時間が長くなる
という課題があった。
As described above, since the conventional microcomputer controls only one of the two-operand control and the three-operand control, the capacity of the program is increased due to the increase of the address designation section. There is a problem that the execution time becomes longer due to the increase in the number of execution instructions.

【0008】本発明は、プログラム容量を削減し、しか
も実行時間を短縮することのできるマイクロコンピュー
タを提供することを目的とする。
An object of the present invention is to provide a microcomputer capable of reducing the program capacity and the execution time.

【0009】[0009]

【課題を解決するための手段】本発明に係るマイクロコ
ンピュータは前記課題を解決するために、以下のような
構成を有している。すなわち、命令コードを解読する命
令解読部と、前記命令解読部で解読した命令を実行する
命令実行部と、制御用レジスタ群を備え、データレジス
タ、アドレスポインタ等で構成される複数のタスク実行
キューをハードウェアで切り替え、時分割マルチタスク
処理を行うマイクロコンピュータであって、前記制御用
レジスタ群内にタスク実行キューごとに2オペランド制
御か3オペランド制御かで異なる論理値が設定されるオ
ペランド制御切り替えレジスタを備えたことを特徴とす
る。
In order to solve the above problems, the microcomputer according to the present invention has the following configuration. That is, a plurality of task execution queues each including an instruction decoding unit that decodes an instruction code, an instruction execution unit that executes the instruction decoded by the instruction decoding unit, a control register group, and a data register, an address pointer, and the like. , Which is a microcomputer for performing time-division multitask processing by hardware switching, and in which a different logical value is set in the control register group for each task execution queue by two-operand control or three-operand control It is characterized by having a register.

【0010】[0010]

【作用】本発明の構成によれば、2オペランド制御か3
オペランド制御かで異なる論理値が設定される切り替え
レジスタを制御用レジスタ群内に設け、このレジスタの
出力を命令解読部により解読するようにしたことによ
り、同一命令コードでありながら2オペランド制御と3
オペランド制御を適宜切り替えることが可能となる。
According to the structure of the present invention, two-operand control or three-operand control is performed.
A switching register in which a different logical value is set depending on operand control is provided in the control register group, and the output of this register is decoded by the instruction decoding unit.
Operand control can be switched appropriately.

【0011】[0011]

【実施例】以下本発明の一実施例について図面を参照し
ながら説明する。図1は基本的なシステム構成図であ
る。このマイクロコンピュータは、時分割マルチタスク
処理をハードウェアで行うことを可能にするため、デー
タレジスタ、アドレスポインタ等から構成されるレジス
タファイルを備えたタスク実行キュー0〜7を持ち、こ
れらすべてのタスク実行キューに共通な制御用レジスタ
群8、プログラム格納領域(図示せず)等から読み込ん
だ命令コードを解読する命令解読部9、解読された命令
を実行する命令実行部10から構成されている。また、
制御用レジスタ群8内にはタスク実行キューの数に等し
いビット幅の2オペランド制御3オペランド制御切り替
えレジスタ11を備え、特定のアドレスが与えられてい
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a basic system configuration diagram. This microcomputer has task execution queues 0 to 7 provided with register files composed of data registers, address pointers, etc. in order to enable time-division multitask processing to be performed by hardware, and all of these tasks are performed. It is composed of a control register group 8 common to the execution queues, an instruction decoding unit 9 that decodes an instruction code read from a program storage area (not shown), and an instruction execution unit 10 that executes the decoded instruction. Also,
The control register group 8 is provided with a 2-operand control 3-operand control switching register 11 having a bit width equal to the number of task execution queues, and is given a specific address.

【0012】信号aは制御用レジスタ群へのアクセス信
号であり、制御用レジスタ群内のデータの読み出し、書
き込みが可能である。
A signal a is an access signal to the control register group, and data in the control register group can be read and written.

【0013】信号bは制御用レジスタ群の出力信号であ
り、2オペランド制御3オペランド制御切り替えレジス
タの出力信号を含んでいる。この切り替えレジスタの出
力は命令コードと共に命令解読部に入力される。
A signal b is an output signal of the control register group and includes an output signal of the 2-operand control 3-operand control switching register. The output of this switching register is input to the instruction decoding unit together with the instruction code.

【0014】信号cは命令解読部で解読された結果出力
される信号であり、命令実行部を制御するための信号で
ある。
The signal c is a signal output as a result of being decoded by the instruction decoding unit, and is a signal for controlling the instruction execution unit.

【0015】信号dは各タスク実行キューへのアクセス
信号である。図2は2オペランド制御3オペランド制御
切り替えレジスタを示した図である。このレジスタはb
p(ビットポジション)0〜bp7まで8個のビットポ
ジションを持ち、それぞれのビット位置は、どのタスク
実行キューに対する切り替えレジスタかを示している。
すなわちbp0に設定された論理値はタスク実行キュー
0が2オペランド制御を行うか3オペランド制御を行う
かを示している。また、この切り替えレジスタは、特定
のタスク実行キューからのみ書き込みが可能であり、全
てのタスク実行キューから読み出しが可能である。
The signal d is an access signal to each task execution queue. FIG. 2 is a diagram showing a 2-operand control 3-operand control switching register. This register is b
There are 8 bit positions from p (bit position) 0 to bp 7, and each bit position indicates to which task execution queue the switching register is directed.
That is, the logical value set in bp0 indicates whether the task execution queue 0 performs 2-operand control or 3-operand control. Further, this switching register can be written only from a specific task execution queue and can be read from all task execution queues.

【0016】図3は本発明を用いたアセンブラプログラ
ム例である(アセンブラプログラム記述方法は従来の技
術で説明したとおりである)。タスク0は、切り替えレ
ジスタの書き込みが可能なタスク実行キューであり、タ
スク1、タスク2は読み込みのみ可能なタスク実行キュ
ーである。いま切り替えレジスタの論理値が“1”にセ
ットされているとき3オペランド制御、“0”にリセッ
トされているとき2オペランド制御をそれぞれ行なうも
のとする。
FIG. 3 shows an example of an assembler program using the present invention (the assembler program description method is as described in the prior art). Task 0 is a task execution queue in which switching registers can be written, and tasks 1 and 2 are read-only task execution queues. Now, it is assumed that three-operand control is performed when the logical value of the switching register is set to "1" and two-operand control is performed when the logical value is reset to "0".

【0017】タスク0のeで示す命令はアドレスXに割
り当てられた2オペランド制御3オペランド制御切り替
えレジスタに22(16進数)を書き込む命令である。
すなわち、タスク実行キュー1と5では3オペランド制
御を行い、残りの6つのタスク実行キューでは2オペラ
ンド制御を行うことを設定するものである。
The instruction indicated by e of task 0 is an instruction for writing 22 (hexadecimal number) into the 2-operand control 3-operand control switching register assigned to the address X.
That is, the task execution queues 1 and 5 are set to perform 3-operand control, and the remaining six task execution queues are set to perform 2-operand control.

【0018】この22(16進数)が書かれた切り替え
レジスタのデータは図1の信号bを通じて命令解読部9
に送られる。そして、タスク実行キュー1が次に実行さ
れるタスク実行キューだとすると、オペランド制御レジ
スタの対応するビットポジション1の論理値“1”がプ
ログラム格納領域から取り出された命令コードと共に解
読される。
The data in the switching register in which this 22 (hexadecimal number) is written is sent to the instruction decoding unit 9 through the signal b in FIG.
Sent to. When the task execution queue 1 is the task execution queue to be executed next, the logical value "1" of the corresponding bit position 1 of the operand control register is decoded together with the instruction code fetched from the program storage area.

【0019】これによって、命令コード以降に配置され
ているアドレス指定部の数等オペランドに関する情報を
順次解読する。この動作を繰り返すことによって、これ
以降に実行される命令は3オペランド制御が行われる。
As a result, the information about the operands such as the number of addressing sections arranged after the instruction code is sequentially decoded. By repeating this operation, three-operand control is performed on the instruction executed thereafter.

【0020】次にタスク実行キューが切り替わって2に
なると、オペランド制御切り替えレジスタの対応するビ
ットポジション2の論理値“0”がプログラム格納領域
から取り出された命令コードと共に解読される。
Next, when the task execution queue is switched to 2, the logical value "0" of the corresponding bit position 2 of the operand control switching register is decoded together with the instruction code fetched from the program storage area.

【0021】これによって、命令コード以降に配置され
ているアドレス指定部の数等オペランドに関する情報を
順次解読する。この動作を繰り返すことによって、これ
以降に実行される命令は2オペランド制御が行われる。
As a result, the information about the operands such as the number of addressing parts arranged after the instruction code is sequentially decoded. By repeating this operation, two-operand control is performed on the instructions executed thereafter.

【0022】また、現在実行中のタスクや別のタスクの
オペランド制御を切り替えたい場合には、特定のオペラ
ンド制御レジスタの書き込みが可能なタスク実行キュー
を呼出し、この切り替えレジスタの内容を書き換えるこ
とで可能となる。
When it is desired to switch the operand control of the task currently being executed or another task, it is possible to call a task execution queue in which a specific operand control register can be written and rewrite the contents of this switching register. Becomes

【0023】さらに、プログラムの実行中に割り込みや
例外処理等によりプログラムの流れが中断された場合に
は、この切り替えレジスタの値はCPUの内部情報とし
て他の情報と共に特定の記憶空間に退避される。次に、
割り込みや例外処理等の処理ルーチンから復帰した時に
は、CPUの内部情報として退避された値が切り替えレ
ジスタにも書き込まれる。これによってCPUの状態は
プログラムの流れが中断される前と等しくなる。
Further, when the flow of the program is interrupted due to interruption or exception handling during the execution of the program, the value of the switching register is saved as internal information of the CPU in a specific storage space together with other information. . next,
When returning from a processing routine such as interrupt or exception processing, the value saved as internal information of the CPU is also written in the switching register. This causes the state of the CPU to be equal to before the program flow was interrupted.

【0024】以上の操作をすることによって、容易に2
オペランド制御と3オペランド制御を切り替えることが
できる。
By performing the above operation, it is possible to easily
Operand control and three-operand control can be switched.

【0025】[0025]

【発明の効果】本発明のマイクロコンピュータによれ
ば、2オペランド制御か3オペランド制御かで異なる論
理値が設定される切り替えレジスタを制御用レジスタ群
内に設け、この切り替えレジスタの出力を命令解読部に
より解読するようにしたことにより、同一命令コードで
ありながら2オペランド制御、3オペランド制御を適宜
切り替えることが可能となる。
According to the microcomputer of the present invention, a switching register in which different logical values are set depending on two-operand control or three-operand control is provided in the control register group, and the output of this switching register is used by the instruction decoding unit. By this, it becomes possible to appropriately switch the two-operand control and the three-operand control with the same instruction code.

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

【図1】本発明の一実施例のシステム構成図FIG. 1 is a system configuration diagram of an embodiment of the present invention.

【図2】本発明の一実施例における2オペランド制御3
オペランド制御切り替えレジスタ図
FIG. 2 is a two-operand control 3 in one embodiment of the present invention.
Operand control switching register diagram

【図3】本発明の一実施例のマイクロコンピュータにお
けるアセンブラプログラム例を示す図
FIG. 3 is a diagram showing an example of an assembler program in a microcomputer according to an embodiment of the present invention.

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

0〜7 タスク実行キュー 8 制御用レジスタ群 9 命令解読部 10 命令実行部 11 2オペランド制御・3オペランド制御切り替えレ
ジスタ a 制御用レジスタのアクセス信号 b 2オペランド制御3オペランド制御切り替えレジス
タの出力信号 c 命令実行部制御信号 d 各タスク実行キューのアクセス信号 e 2オペランド制御3オペランド制御切り替えレジス
タへのアクセス命令
0 to 7 task execution queue 8 control register group 9 instruction decoding unit 10 instruction execution unit 11 2 operand control / 3 operand control switching register a control register access signal b 2 operand control 3 operand control switching register output signal c instruction Execution unit control signal d Access signal for each task execution queue e Two-operand control Three-operand control switching register access instruction

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】命令コードを解読する命令解読部と、前記
命令解読部で解読した命令を実行する命令実行部と、制
御用レジスタ群を備え、データレジスタ、アドレスポイ
ンタ等で構成される複数のタスク実行キューをハードウ
ェアで切り替え、時分割マルチタスク処理を行うマイク
ロコンピュータであって、前記制御用レジスタ群内にタ
スク実行キューごとに2オペランド制御か3オペランド
制御かで異なる論理値が設定されるオペランド制御切り
替えレジスタを備えたことを特徴とするマイクロコンピ
ュータ。
1. A plurality of instruction decoding units for decoding an instruction code, an instruction executing unit for executing an instruction decoded by the instruction decoding unit, a control register group, and a plurality of data registers, address pointers and the like. A microcomputer for performing time-division multitask processing by switching the task execution queue by hardware, wherein different logical values are set in the control register group for each task execution queue depending on whether two-operand control or three-operand control is performed. A microcomputer provided with an operand control switching register.
JP4233386A 1992-09-01 1992-09-01 Microcomputer Pending JPH0683614A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4233386A JPH0683614A (en) 1992-09-01 1992-09-01 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4233386A JPH0683614A (en) 1992-09-01 1992-09-01 Microcomputer

Publications (1)

Publication Number Publication Date
JPH0683614A true JPH0683614A (en) 1994-03-25

Family

ID=16954285

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4233386A Pending JPH0683614A (en) 1992-09-01 1992-09-01 Microcomputer

Country Status (1)

Country Link
JP (1) JPH0683614A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021157448A1 (en) * 2020-02-03 2021-08-12

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021157448A1 (en) * 2020-02-03 2021-08-12
WO2021157448A1 (en) * 2020-02-03 2021-08-12 株式会社ソニー・インタラクティブエンタテインメント Data processing system, data transfer device, and context switching method

Similar Documents

Publication Publication Date Title
US5077657A (en) Emulator Assist unit which forms addresses of user instruction operands in response to emulator assist unit commands from host processor
EP0087978B1 (en) Information processing unit
KR100848603B1 (en) A data processing apparatus and method for saving return state
WO2001016715A9 (en) Branch instructions in a multithreaded parallel processing system
JP2004185637A (en) Risc microprocessor architecture implementing multiple typed resistor set
US5682531A (en) Central processing unit
JP2004520662A (en) Selective access to multiple registers with common names
US5802359A (en) Mapping processor state into a millicode addressable processor state register array
JP3605978B2 (en) Microcomputer
JPH0673105B2 (en) Instruction pipeline type microprocessor
JPH03171231A (en) Micro computer system
EP0660229A1 (en) Method and apparatus for modifying the contents of a register
JPH0683614A (en) Microcomputer
JPS63268033A (en) Data processing system
JPH056281A (en) Information processor
JPS6217773B2 (en)
JP2671161B2 (en) Register interference check method
JPH04319729A (en) Microcomputer
JP2000112754A (en) Data processor
JP2853647B2 (en) Function addition method to interpreter with debugger
JP2942449B2 (en) Data processing device
JP2883489B2 (en) Instruction processing unit
JPH08305564A (en) Microcomputer
JPH0315770B2 (en)
JP2001166918A (en) Processor system