JPH023877A - Single-chip microcomputer - Google Patents
Single-chip microcomputerInfo
- Publication number
- JPH023877A JPH023877A JP63150560A JP15056088A JPH023877A JP H023877 A JPH023877 A JP H023877A JP 63150560 A JP63150560 A JP 63150560A JP 15056088 A JP15056088 A JP 15056088A JP H023877 A JPH023877 A JP H023877A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- data
- processor
- address
- program counter
- 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
Landscapes
- Multi Processors (AREA)
- Microcomputers (AREA)
- Advance Control (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
(イ)産業上の利用分野
本発明はシングルチップマイクロコンピュータの割込機
能の改良に関するものである。DETAILED DESCRIPTION OF THE INVENTION (a) Field of Industrial Application The present invention relates to an improvement in the interrupt function of a single-chip microcomputer.
(ロ)従来の技術
半導体製造技術の進歩により、算術論理演算ユニット、
アキュムレータ等はもとよりメモリ及び各種インターフ
ェースを1つのシリコンチップ上に形成することが可能
になっている。この種のマイクロコンピュータはシング
ルチップマイクロコンピュータと呼ばれ、当初は応用目
的指向のものが殆どであったが、今日のそれは汎用マイ
クロコンピュータ並のプロセッサ機能と、拡張性、汎用
性あるインターフェース機能とを備えている。(b) Conventional technology Advances in semiconductor manufacturing technology have enabled arithmetic and logic units,
It has become possible to form not only an accumulator, but also a memory and various interfaces on one silicon chip. This type of microcomputer is called a single-chip microcomputer, and initially it was mostly oriented toward application purposes, but today it has processor functions comparable to general-purpose microcomputers, expandability, and versatile interface functions. We are prepared.
そこで、そのような高性能、高機能のシングルチップマ
イクロコンピュータを使用するマルチプロセッサシステ
ムが検討され始めている。Therefore, multiprocessor systems using such high-performance, highly functional single-chip microcomputers are beginning to be considered.
さて、マルチプロセッサシステムではそれぞれのプロセ
ッサが独立して動作できることは少なく、相互にデータ
を交換しながら動作を続けることが多いのであるが、あ
るプロセッサのデータ生成あるいはプロセッサのデータ
要求は他のプロセッサからすればランダムに生起するた
め、プロセッサ間のデータ通信には割込機能が利用され
ている。Now, in a multiprocessor system, each processor is rarely able to operate independently, and often continues to operate while exchanging data with each other, but one processor's data generation or data request is received from another processor. Since this occurs randomly, an interrupt function is used for data communication between processors.
このため、汎用マイクロコンピュータを使用するマルチ
プロセッサシステムでは専用割込コントローラあるいは
外部割込入力による割込が採用されているが、シングル
チップマイクロコンピュータを使用するマルチプロセッ
サシステムでは、専用割込コントローラはアーキテクチ
ャの違いにより採用不能である場合が多く、また専用割
込コントローラの使用は良好なフスト/性能比が得られ
ない欠点を有している。また外部割込入力による割込は
、シングルチップマイクロコンピュータがピン数の制約
その他により多くの割込原因には対応不能であると共に
データ及びフントロールバスが大きくなる欠点を有して
いる。For this reason, multiprocessor systems using general-purpose microcomputers use dedicated interrupt controllers or interrupts via external interrupt input, but in multiprocessor systems using single-chip microcomputers, dedicated interrupt controllers are In many cases, this is not possible due to the difference in performance, and the use of a dedicated interrupt controller has the disadvantage that a good interrupt/performance ratio cannot be obtained. Furthermore, interrupts caused by external interrupt inputs have the disadvantage that single-chip microcomputers cannot handle many causes of interrupts due to limitations on the number of pins and other factors, and the data and busloads become large.
そこで、今日層も一般的であるシングルチップマイクロ
コンピュータ間のデータ通信方式を第2図を参照して説
明する。シングルチップマイクロコンピュータを使用す
る図面のマルチプロセッサシステムでは、通常シリアル
インターフェースあるいはパラレルインターフェース(
40)を介してプロセッサ間のデータ通信/割込が行わ
れており、その通信プロトコルは、
(1)マスタ/スレーブブロセヅサ(3)は入出力ポー
ト(40)を入力モードにセットし、他のプロセッサ(
1)のデータ通信を待つ。Therefore, a data communication system between single-chip microcomputers, which is common today, will be explained with reference to FIG. Multiprocessor systems of the drawings using single-chip microcomputers usually have serial or parallel interfaces (
40), and the communication protocol is as follows: (1) The master/slave processor (3) sets the input/output port (40) to input mode. , other processors (
Wait for data communication in 1).
(2〉プロセッサ(3)の入出力インターフェース(4
0)はアドレスデータを受信すると割込要求を出力する
。(2> Processor (3) input/output interface (4)
0) outputs an interrupt request upon receiving address data.
(3)プロセッサ(3)は割込処理により受信したアド
レスデータが自分を指定するものであるか否かを判定す
る。(3) The processor (3) determines whether the address data received by the interrupt process specifies itself.
(4)指定されたプロセッサ(3)は続いてデータを受
信、必要あれば割込処理分岐ルーチンの実行の後に所定
の割込処理を行う。(4) The designated processor (3) then receives the data and, if necessary, executes a predetermined interrupt process after executing the interrupt process branch routine.
というものである。That is what it is.
しかし、このデータ通信方式は特定のプロセッサ間の通
信であっても全くのプロセッサが割込処理により自分を
指定するものか否かを判定するものであり、特定のプロ
セッサ間で頻繁に割込要求が生起されるシステムあるい
は大規模なシステムでは、各プロセッサが判定のための
割込処理に追われるという欠点を有している。さらに複
数の割込原因に対応させるには割込処理分岐ルーチンを
まず実行しなければならず、処理速度の低下と割込原因
を区別するためのソフトウェアの負担が大きいという欠
点を有している。However, in this data communication method, even when communicating between specific processors, each processor determines whether or not it is designated by interrupt processing, and interrupt requests are frequently made between specific processors. In a system in which this occurs or in a large-scale system, each processor has the disadvantage of being busy with interrupt processing for determination. Furthermore, in order to deal with multiple interrupt causes, an interrupt processing branch routine must first be executed, which has the disadvantage of slowing down processing speed and placing a heavy burden on the software required to distinguish between interrupt causes. .
(ハ)発明が解決しようとする課題
本発明は、特定のプロセッサ間通信の場合には他のプロ
セッサが割込処理をする必要のない、さらにソフトウェ
アの負担なく複数の割込原因に素早く応えることが可能
な割込機能を備えるシングルチップマイクロコンピュー
タを提供することにある。(c) Problems to be Solved by the Invention The present invention eliminates the need for other processors to process interrupts in the case of specific inter-processor communication, and furthermore quickly responds to multiple interrupt causes without burdening software. An object of the present invention is to provide a single-chip microcomputer with an interrupt function capable of interrupting.
(ニ)課題を解決するための手段
上記した問題の解決のため、本発明のシングルチップマ
イクロコンピュータは第一のプログラムカウンタ(31
)と、第二のプログラムカウンタ(3o)と、割込要求
(44)を出力すると共に該割込要求に対する割込応答
に基づいて入出力ポートに受信するアドレスデータと前
記第一のプログラムカウンタ(31)のデータを選択的
に前記第二のプログラムカウンタ(30)にロードする
アドレス選択回路(42)とを備える。(d) Means for Solving the Problems In order to solve the above-mentioned problems, the single-chip microcomputer of the present invention has a first program counter (31
), a second program counter (3o), address data that outputs an interrupt request (44) and is received at the input/output port based on an interrupt response to the interrupt request, and the first program counter (3o); and an address selection circuit (42) for selectively loading the data of 31) into the second program counter (30).
(*)作用
上記した本発明の構成は、第一のプログラムカウンタ(
31)のデータがパラレルにロードされる第二のプログ
ラムカウンタ(30)により実行アドレスが定められ、
入力モードにある入出力ポート(4o)のチップセレク
トデータに基づき、あるいは直接に入力されるコントロ
ール信号によりアドレス選択回路(42)が割込要求(
44)を出力し、さらに割込応答(45)を待って第一
のプログラムカウンタ(31)のデータに替え入出力ポ
ート(40)のアドレスデータを第二のプログラムカウ
ンタ(30)にロードし、よってそのアドレスにプロセ
ッサの制御を移すよう作用するものである。(*) Effect The configuration of the present invention described above is based on the first program counter (
The execution address is determined by a second program counter (30) into which the data of 31) is loaded in parallel;
The address selection circuit (42) issues an interrupt request (
44), and then waits for an interrupt response (45) and loads the address data of the input/output port (40) into the second program counter (30) in place of the data in the first program counter (31). Therefore, it acts to transfer the control of the processor to that address.
(へ)実施例
第1図を参照し、プロセッサ間データ通信を例に本発明
の詳細な説明する。同図において、(3)は本発明のシ
ングルチップマイクロコンピュータである。なお、便宜
上これをスレーブプロセッサと称しプロセッサ(1)を
マスクプロセッサと称することとする。(F) Embodiment Referring to FIG. 1, the present invention will be described in detail by taking inter-processor data communication as an example. In the figure, (3) is a single-chip microcomputer of the present invention. For convenience, this will be referred to as a slave processor, and processor (1) will be referred to as a mask processor.
スレーブプロセッサ(3)は第一のプログラムヵウンタ
(31)のデータがパラレルにロードされる第二のプロ
グラムカウンタ(30)により実行アドレスが定められ
、本来のプログラム処理により入出力ポート(41)を
介して図示しない機器を制御し、あるいはマスクプロセ
ッサ(1)が必要とするデータdatl 、 dat2
・・・・・・を生成及び更新し、その度にデータdat
lをラム(33)の0OOOH番地にdat2を000
1H番地というように順に格納している。The execution address of the slave processor (3) is determined by the second program counter (30) into which the data of the first program counter (31) is loaded in parallel, and the input/output port (41) is controlled by the original program processing. Data datl and dat2 are used to control devices (not shown) through the mask processor (1)
...... is generated and updated, and the data dat is generated and updated each time.
l to address 0OOOH of RAM (33) and dat2 to 000
They are stored in order such as address 1H.
そして、スレーブプロセッサ(3)のロム(32)の例
えば0030H番地には“ラム(33)のooo。Then, for example, at address 0030H of the ROM (32) of the slave processor (3), "ooo of RAM (33).
H番地のデータを入出力ポート(40)に出力する”命
令が記述され、ロム(32)の0038H番地には“ラ
ム(33)の0OOIH番地のデータを入出力ポート(
40)に出力する”命令が記述きれ、以下同様に複数の
命令がロム(32)に記述されている。An instruction to "output the data at address H to the input/output port (40)" is written, and at address 0038H of the ROM (32), "to output the data at address 0OOIH of the RAM (33) to the input/output port (
40) can be written, and a plurality of instructions are similarly written in the ROM (32).
そこで、マスクプロセッサ(1)が自身のプログラム処
理の遂行のためにスレーブプロセッサ(3)の前記デー
タdat2を必要とすると、初めにチップセレクトのた
めのチップセレクトデータあるいはコントロール信号を
システムバス(2)に出力する。Therefore, when the mask processor (1) needs the data dat2 of the slave processor (3) to perform its own program processing, it first transfers the chip select data or control signal for chip selection to the system bus (2). Output to.
すると、プログラム可能なデコーダか、あるいは単にレ
ジスタの1ビツトを備えるアドレス選択回路(42)は
前記入出力ポート(40)が受信する特定のチップセレ
クトデータに基づいて、あるいはコントロール信号から
直接に割込要求(44)を生成する。上記動作はプロセ
ッサ機能と独立に行われるものであり、スレーブプロセ
ッサ(3)はこの間自身のプログラムを続行することが
可能である。また、図示しない他のプロセッサはこれ以
降も自身のプログラムを続行することが当然可能である
。An address selection circuit (42) comprising a programmable decoder or simply one bit of a register then generates an interrupt based on the particular chip select data received by said input/output port (40) or directly from a control signal. Generate a request (44). The above operation is performed independently of the processor function, and the slave processor (3) can continue its own program during this time. Further, it is naturally possible for other processors (not shown) to continue their own programs after this point.
アドレス選択回路(42)が自分を指定するチップセレ
クトデータを検出し、あるいはフントロール信号により
割込要求(44)を出力すると、スレーブプロセッサ(
3)は処理中のプログラムを中断し、所定の割込手続き
を開始する。ここで、本発明のシングルブップマイクロ
コンピュータがプログラムカウンタの退避を必要とせず
、割込手続きがより高速に行われる点は特徴的である。When the address selection circuit (42) detects chip select data that specifies itself or outputs an interrupt request (44) by the mount control signal, the slave processor (
3) interrupts the program being processed and starts a predetermined interrupt procedure. Here, the single-bump microcomputer of the present invention is distinctive in that it does not require saving the program counter and interrupt procedures can be performed faster.
こうして、割込応答(45)が得られると、これにより
割込フラグレジスタ(43)に割込応答フラグがセット
される。When an interrupt response (45) is thus obtained, an interrupt response flag is set in the interrupt flag register (43).
マスタプロセッサ(1)は前記割込応答フラグを任意の
手段により検出すると、続いて割込ベクタとなる8ビツ
トのアドレスデータ38Hを出力する。なお、チップセ
レクトのためにフントロール信号が使用可能な場合には
、コントロール信号の出力と同時に割込ベクタ38Hの
出力が可能であり、さらに処理速度の向上が図られるこ
とになる。When the master processor (1) detects the interrupt response flag by any means, it then outputs 8-bit address data 38H which becomes an interrupt vector. It should be noted that if the load control signal can be used for chip selection, the interrupt vector 38H can be output at the same time as the control signal, and the processing speed can be further improved.
割込応答(45)を得たアドレス選択回路(42)は入
出力ポート(40)の8ビツトアドレスデータからイン
デックス指定等の周知の手段により16ビツトのアドレ
スデータ0038Hを生成すると共に第一のプログラム
カウンタ(31)を第二のプログラムカウンタ(30)
から分離し、前記アドレスデータを第二のプログラムカ
ウンタ(30)にロードする。またこのとき、命令デコ
ーダ(38)により制御されるプログラムカウンタが第
一のプログラムカウンタ(31)から第二のプログラム
カウンタ(30)に変更されることは当然である。これ
によりスレーブプロセッサ(3)は制御を0038H番
地に移し、そこに記述されたラム(33)の“0OOI
H番地のデータを入出力ポート<40)に出力する°′
全命令実行が可能となる。The address selection circuit (42) that received the interrupt response (45) generates 16-bit address data 0038H from the 8-bit address data of the input/output port (40) by index designation or other known means, and also outputs the first program. counter (31) to the second program counter (30)
and loads said address data into a second program counter (30). Also, at this time, it is natural that the program counter controlled by the instruction decoder (38) is changed from the first program counter (31) to the second program counter (30). As a result, the slave processor (3) transfers control to address 0038H, and the "0OOI" of the RAM (33) written there.
Output the data at address H to the input/output port <40) °'
All instructions can be executed.
こうしてデータdat2が入出力ポートに出力されると
、マスクプロセッサ(1)はシステムバス(2)ヲ介し
てデータdat2の値を知ることができ、このデータを
必要とする自身のプログラム処理を継続することが可能
となるものである
なお上記した通信方式では、スレーブプロセッサ(3)
がデータ、例えばdat2を生成する前にそれをマスタ
プロセッサ(1)が必要とすると、マスクプロセッサ(
1)より連続的に割込ベクタ38Hが出力され、スレー
ブプロセッサ(3)のデータdat2を生成する処理を
障害することが予想きれるが、この問題は、−度データ
を出力しなかった割込ベクタには一定時間アクセスしな
い等の措置により解決される。When the data dat2 is thus output to the input/output port, the mask processor (1) can learn the value of the data dat2 via the system bus (2) and continues its own program processing that requires this data. However, in the above communication method, the slave processor (3)
If the master processor (1) needs it before it generates data, say dat2, then the mask processor (1)
1) It can be expected that the interrupt vector 38H will be output more continuously and will interfere with the process of generating data dat2 of the slave processor (3), but this problem is caused by interrupt vectors that did not output data This can be resolved by taking measures such as not accessing the site for a certain period of time.
本発明のシングルチップマイクロコンピュータを上記の
ように使用するときは、プロセッサが要求する任意のデ
ータを他のプロセッサから随時得ることが可能であり、
そのプロセッサにデータ領域を確保する必要がなく、比
較的ラム容量に制限のあるシングルチップマイクロコン
ピュータによりマルチプロセッサシステムを構築する際
に特に顕著な効果を期待することができるものである。When the single-chip microcomputer of the present invention is used as described above, any data requested by the processor can be obtained from other processors at any time.
There is no need to reserve a data area for the processor, and a particularly remarkable effect can be expected when constructing a multiprocessor system using a single-chip microcomputer with relatively limited RAM capacity.
(ト)発明の効果
本発明のシングルチップマイクロコンピュータは、他の
プロセッサからアドレスデータが送られる度にそれが自
分を指定するものであるか否かを割込処理により判定す
る必要がないため不要なプログラムの中断がなく、さら
に8ビツトバスより割込ベクタが提供されるため現実的
に無制限の割込要求に素早く応えることが可能であり、
マルチプロセッサシステムに使用するに好適である。(g) Effects of the Invention The single-chip microcomputer of the present invention does not need to use interrupt processing to determine whether address data is specified for itself each time it is sent from another processor. There is no program interruption, and since interrupt vectors are provided via an 8-bit bus, it is possible to quickly respond to an unlimited number of interrupt requests.
Suitable for use in multiprocessor systems.
第1図は本発明のシングルチップマイクロコンピュータ
を使用するマルチプロセッサシステムのブロック図、第
2図は従来のシングルチップマイクロコンピュータを使
用するマルチプロセッサシステムのブロック図である。
(1)及び(3)はシングルチップマイクロコンピュー
タ、(2)はシステムバス、(30)は第二のプログラ
ムカウンタ、り31)は第一のプログラムカウンタ、(
32)はロム、(33)はラム、(34)はアキュムレ
ータ、(35)は−時レジスタ、(36)は算術論理演
箕ユニット、(37)はフラグレジスタ、 (38)は
命令デコーダ、(39)は内部バス、(40)及び(4
1)は入出力インターフェース、(42)はアドレス選
択回路、(43)は割込フラグレジスタ、(44)は割
込要求、(45)は割込応答である。FIG. 1 is a block diagram of a multiprocessor system using a single-chip microcomputer according to the present invention, and FIG. 2 is a block diagram of a multiprocessor system using a conventional single-chip microcomputer. (1) and (3) are single-chip microcomputers, (2) is a system bus, (30) is a second program counter, 31) is a first program counter, (
32) is ROM, (33) is RAM, (34) is accumulator, (35) is - hour register, (36) is arithmetic logic unit, (37) is flag register, (38) is instruction decoder, ( 39) is an internal bus, (40) and (4
1) is an input/output interface, (42) is an address selection circuit, (43) is an interrupt flag register, (44) is an interrupt request, and (45) is an interrupt response.
Claims (1)
込要求を出力し、さらに該割込要求に対する割込応答に
基づいて入出力ポートに受信するアドレスデータと前記
第一のプログラムカウンタのデータを選択的に前記第二
のプログラムカウンタにロードするアドレス選択回路と
を備えることを特徴とするシングルチップマイクロコン
ピュータ。(1) Two program counters, a first and a second program counter, and address data that outputs an interrupt request and is received at an input/output port based on an interrupt response to the interrupt request, and the first program counter. and an address selection circuit that selectively loads data into the second program counter.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63150560A JPH023877A (en) | 1988-06-17 | 1988-06-17 | Single-chip microcomputer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63150560A JPH023877A (en) | 1988-06-17 | 1988-06-17 | Single-chip microcomputer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH023877A true JPH023877A (en) | 1990-01-09 |
Family
ID=15499548
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63150560A Pending JPH023877A (en) | 1988-06-17 | 1988-06-17 | Single-chip microcomputer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH023877A (en) |
-
1988
- 1988-06-17 JP JP63150560A patent/JPH023877A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS5841538B2 (en) | Multiprocessor system instructions | |
| JP3515985B2 (en) | Method and system for temporarily setting a dedicated pipeline in a processor device | |
| US4736319A (en) | Interrupt mechanism for multiprocessing system having a plurality of interrupt lines in both a global bus and cell buses | |
| JPH023876A (en) | Single-chip microcomputer | |
| US5561818A (en) | Microprocessor and data processing system for data transfer using a register file | |
| JPS59218569A (en) | micro computer | |
| JPS63118947A (en) | Single chip microcomputer | |
| JP2619385B2 (en) | DMA controller | |
| JPH0544696B2 (en) | ||
| JPH0218622A (en) | Numerical arithmetic processor | |
| JPH056333A (en) | Multiprocessor system | |
| JPS62152064A (en) | Single-chip microcomputer | |
| JPH02252044A (en) | Coprocessor and data transfer control method | |
| JPH0367357A (en) | Multi-cpu system | |
| JPH01263858A (en) | Multi-processor system | |
| JPH0683640A (en) | Interrupt response processing method | |
| JPS5942331B2 (en) | Prosetsusasouchinoseigiohoshiki | |
| JPH05233525A (en) | Input/otuput processor | |
| JPS61151745A (en) | Interruption processing system | |
| JPH01248264A (en) | System bus contention control method | |
| JPS6379162A (en) | Control system for transferring processor data | |
| JPH0784963A (en) | Semiconductor integrated circuit having CPU | |
| JPH03134783A (en) | Single chip microcomputer | |
| JPH0247751A (en) | Channel control system | |
| JPS63155254A (en) | Information processor |