JPH0481939A - Control system for microcomputer - Google Patents
Control system for microcomputerInfo
- Publication number
- JPH0481939A JPH0481939A JP2195927A JP19592790A JPH0481939A JP H0481939 A JPH0481939 A JP H0481939A JP 2195927 A JP2195927 A JP 2195927A JP 19592790 A JP19592790 A JP 19592790A JP H0481939 A JPH0481939 A JP H0481939A
- Authority
- JP
- Japan
- Prior art keywords
- register
- program
- microcomputer
- processing
- internal
- 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
- 238000000034 method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明はマイクロコンピュータの制御方式に関するも
のである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a control method for a microcomputer.
第3図は従来のマイクロコンピュータの構成及び割り込
みコントローラとの接続を示した図である。FIG. 3 is a diagram showing the configuration of a conventional microcomputer and its connection with an interrupt controller.
同図において1はマイクロコンピュータであり、2はマ
イクロコンピュータの内部レジスタであるアキュムレー
タ、3はインデックスレジスタ、4はプログラムカウン
タ、5はスタックポインタをそれぞれ示している。In the figure, 1 is a microcomputer, 2 is an accumulator which is an internal register of the microcomputer, 3 is an index register, 4 is a program counter, and 5 is a stack pointer.
6はマイクロコンピュータの動作を制御するコントロー
ラ、7は制御信号線、8はアドレスバス、9はデータバ
スをそれぞれ示している。10は割り込みコントローラ
で、多数の割り込みがある場合にこれらの優先順等を調
停する。Reference numeral 6 indicates a controller for controlling the operation of the microcomputer, 7 a control signal line, 8 an address bus, and 9 a data bus. Reference numeral 10 denotes an interrupt controller, which arbitrates the priority order of interrupts when there are a large number of interrupts.
第3図に示されたマイクロコンピュータ1は、例えば処
理を一時停止する為に、外部からのホールド要求によっ
て処理を一時停止する機能を備え、また各内部レジスタ
2〜5をアクセスする命令が用意されている。更に、割
り込み要求に対する処理の切り替えの為、割り込み機能
を備えている。The microcomputer 1 shown in FIG. 3 is equipped with a function to temporarily stop processing in response to an external hold request, for example, and has instructions for accessing each of the internal registers 2 to 5. ing. Furthermore, it has an interrupt function for switching processing in response to interrupt requests.
第4図は、プログラムをデバッグするときの処理の流れ
を示した図である。11はデバッグの対象となるプログ
ラム、12はマイクロコンビュー夕の内部レジスタの値
を知りたいあるいは変更したい個所、13は割り込み要
求を入力するタイミング、14は内部レジスタをアクセ
スするプログラムである。15はマイクロコンピュータ
1の処理の流れを表す。FIG. 4 is a diagram showing the flow of processing when debugging a program. 11 is a program to be debugged; 12 is a part where the value of an internal register of the microcontroller is desired to be known or changed; 13 is a timing for inputting an interrupt request; and 14 is a program that accesses an internal register. 15 represents the processing flow of the microcomputer 1.
次に動作について説明する。Next, the operation will be explained.
プログラム11をデバッグする為には、プログラム11
上の内部レジスタ2〜5の値を知りたい個所12や又は
値を変更したい個所12を実行する時点で、割り込み要
求を外部よりタイミング13で入力することにより処理
を切り替える。次に別に用意された内部レジスタをアク
セスする為のプログラム14にジャンプしてそれを実行
した後、元のプログラム上1へ再び戻り、処理を切り替
える。To debug program 11, program 11
At the point in time when executing a part 12 where the values of the internal registers 2 to 5 above are to be known or a part 12 where the values are to be changed, an interrupt request is input from the outside at timing 13 to switch the processing. Next, after jumping to a program 14 for accessing a separately prepared internal register and executing it, the program returns to the original program 1 and switches the processing.
上記のような従来のマイクロコンピュータ1では、各内
部レジスタ2〜5をアクセスするには、そのアクセスに
対応した命令を実行せねばならないので、マイクロコン
ピュータの処理を一時停止した状態で、内部レジスタ2
〜5をアクセスする・ことはできない。In the conventional microcomputer 1 as described above, in order to access each of the internal registers 2 to 5, it is necessary to execute an instruction corresponding to the access.
~5 cannot be accessed.
本発明は、プログラムのデバッグにおいて内部レジスタ
の値を知りたい場合や、値を変更したい場合でも、割り
込みによって、内部レジスタをアクセスする別に用意さ
れたプログラムを実行する必要がなく、処理を一時停止
した状態で内部レジスタの値をアクセスできるマイクロ
コンピュータを得ることを目的とする。In the present invention, when debugging a program, even if you want to know the value of an internal register or change the value, there is no need to execute a separate program that accesses the internal register by interrupt, and the process can be temporarily stopped. The purpose is to obtain a microcomputer that can access the values of internal registers in any state.
この発明においては、複数のレジスタ2〜5を有し、制
御信号線7.アドレスバス8、データバス9.により外
部と接続されたマイクロコンピュータlにおいて、アド
レスバス8から与えられたアドレスにより、レジスタ2
〜5のうちいずれかを特定するデコーダ16を設けると
ともに、処理動作を一時停止して、該レジスタに対して
制御信号線7及びデータバス9を通してアクセスするよ
うに構成した。In this invention, a plurality of registers 2 to 5 are provided, and control signal lines 7. Address bus 8, data bus 9. In the microcomputer l connected to the outside by
.
この発明では、マイクロコンピュータ1がプログラムを
処理している際中に、制御信号線7から入力した信号に
より処理動作を一時停止し、アドレスバス8上のアドレ
ス信号に基づきデコーダ16は−のレジスタを特定する
。In this invention, while the microcomputer 1 is processing a program, the processing operation is temporarily stopped by a signal input from the control signal line 7, and the decoder 16 reads the - register based on the address signal on the address bus 8. Identify.
このレジスタの内容を制御信号によりデータバス9に読
み出し、外部にて該レジスタの内容を確認し、デバッグ
等を行う。プログラムの再開は該レジスタの値から開始
する。The contents of this register are read out to the data bus 9 using a control signal, and the contents of this register are checked externally for debugging and the like. Resuming the program starts from the value of the register.
以下、この発明の一実施例を図によって説明する。 Hereinafter, one embodiment of the present invention will be described with reference to the drawings.
第1図において1はマイクロコンピュータ、2はマイク
ロコンピュータの内部レジスタであるアキュムレータ、
3はインデックスレジスタ、4はプログラムカウンタ、
5はスタックポインタを示している。6はマイクロコン
ピュータの動作を制御するコントローラ、16は処理の
一時停止中に、外部から与えられたアドレスより内部レ
ジスタを特定するデコーダを示している。7は制御信号
線、8はアドレスバス、9はデータバスを示している。In FIG. 1, 1 is a microcomputer, 2 is an accumulator which is an internal register of the microcomputer,
3 is the index register, 4 is the program counter,
5 indicates a stack pointer. Reference numeral 6 indicates a controller that controls the operation of the microcomputer, and 16 indicates a decoder that specifies an internal register from an externally given address during a temporary suspension of processing. Reference numeral 7 indicates a control signal line, 8 an address bus, and 9 a data bus.
第2図は上記のプログラムのデバッグを行うときの処理
の流れ図である。11はデバッグの対象となるプログラ
ム、12はマイクロコンピュータlの内部レジスタの値
を知りたいあるいは変更したい個所、13はプログラム
の実行処理を一時停止させるタイミング、15はマイク
ロコンピュタ1の処理の流れを表す。FIG. 2 is a flowchart of processing when debugging the above program. 11 is the program to be debugged; 12 is the part where you want to know or change the value of the internal register of the microcomputer 1; 13 is the timing to temporarily stop the execution of the program; and 15 is the flow of processing in the microcomputer 1. .
本発明に係るマイクロコンピュータ1のプログラムのデ
バッグは、以下の様に行われる。Debugging of the program of the microcomputer 1 according to the present invention is performed as follows.
マイクロコンピュータlが、プログラム上の内部レジス
タ2,3.4.5をアクセスして、その内容を知りたい
、あるいは修正したい個所12を処理する時点で、制御
信号線7を介して処理の一時停止要求の信号aを外部よ
り入力する。この要求信号aを受けてコントローラ6は
マイクロコンピュータ1の処理をタイミング13で一時
停止するとともに、デコーダ16をアクティブにする。When the microcomputer l accesses the internal registers 2, 3, 4, and 5 on the program and processes the part 12 whose contents are desired to be known or modified, the process is temporarily stopped via the control signal line 7. A request signal a is input from the outside. Upon receiving this request signal a, the controller 6 temporarily stops the processing of the microcomputer 1 at timing 13, and activates the decoder 16.
デコーダ16はアドレスバス8より入力されたデータA
DDにより、アクセスされる該当する内部レジスタを特
定し、制御信号m7より入力された制御信号aにより読
み出し、あるいは書き込みを決定する。−時停止中に必
要な内部レジスタの内容りがデータバス9を通じて、読
み出されるか、あるいは書き込まれる。この様にして内
部レジスタをアクセスした後、制御信号線7より入力し
ている処理の一時停止要求信号aを解除し、元のプログ
ラムの処理を再開する。The decoder 16 receives data A from the address bus 8.
The corresponding internal register to be accessed is specified by the DD, and reading or writing is determined by the control signal a input from the control signal m7. - The contents of the internal registers required during the time stop are read or written via the data bus 9. After accessing the internal register in this manner, the processing pause request signal a inputted from the control signal line 7 is released, and the original program processing is resumed.
第2図で明らかなように本発明に係るマイクロコンピュ
ータは、プログラムのデバッグを行う場合、割り込みに
より内部レジスタをアクセスするプログラムを実行する
必要がない。As is clear from FIG. 2, in the microcomputer according to the present invention, when debugging a program, there is no need to execute a program that accesses internal registers by interrupts.
なお上記実施例では、内部レジスタは、アキュムレータ
、インデックスレジスタ、プログラムカウンタ、スタッ
クポインタであったが、内部レジスタの構成の異なるマ
イクロコンピュータでも同様の効果が得られる。In the above embodiment, the internal registers are an accumulator, an index register, a program counter, and a stack pointer, but the same effect can be obtained even in a microcomputer with a different internal register configuration.
以上説明してきたように、本発明に係るマイクロコンピ
ュータの制御方式では、処理を一時停止し、内部レジス
タを外部と接続された信号線を通じて外部より直接アク
セスし、更にアクセスした内部レジスタの値をもって処
理を再開するようにしたので、プログラムのデバッグに
おいて、内部レジスタの値を知りたい場合や値を変更し
たい場合は、割り込みによって、内部レジスタをアクセ
スする別に用意されたプログラムを実行する必要がなく
、処理を一時停止するだけでよい。As explained above, in the microcomputer control method according to the present invention, processing is temporarily stopped, internal registers are directly accessed from the outside through signal lines connected to the outside, and processing is performed using the values of the accessed internal registers. Now, when debugging a program, if you want to know the value of an internal register or change the value, you can use an interrupt to restart the process without having to run a separate program that accesses the internal register. All you have to do is pause.
第1図は本発明の一実施例によるマイクロコンピュータ
の構成図、第2図は本発明の一実施例によるマイクロコ
ンピュータのプログラムのデバッグを行うときの処理の
流れ杢示4図、第3図は従来のマイクロコンピュータの
構成と割り込みコントローラとの接続状態を示すブロッ
ク図寺示も、第4図は従来のコンピュータのプログラム
のデバッグを行うときの処理の流れ図を示す。
■はマイクロコンピュータ、2はアキュムレータ、3は
インデックスレジスタ、4はプログラムカウンタ、5は
スタックポインタ、6はコン茜う、7は制御信号線、8
はアドレスバス、9はブタバス、10は割り込みコント
ローラ、11はデバッグの対象となるプログラム、12
はマイクロコンピュータの内部レジスタをアクセスした
し)個所、13は割り込みのタイミング、14は割り込
みにより行うプログラム、15は処理の流れ、16はデ
コーダを表す。
なお、図中、同一符号は同一、又は相当部分を示す。
代理人 弁理士 宮 園 純FIG. 1 is a block diagram of a microcomputer according to an embodiment of the present invention, FIG. 2 is a flowchart of processing when debugging a program of a microcomputer according to an embodiment of the present invention, and FIG. A block diagram showing the configuration of a conventional microcomputer and a connection state with an interrupt controller is shown in FIG. 4, and FIG. 4 shows a flowchart of processing when debugging a conventional computer program. ■ is a microcomputer, 2 is an accumulator, 3 is an index register, 4 is a program counter, 5 is a stack pointer, 6 is a controller, 7 is a control signal line, 8
is an address bus, 9 is a pig bus, 10 is an interrupt controller, 11 is a program to be debugged, 12
13 represents an interrupt timing, 14 represents a program executed by an interrupt, 15 represents a processing flow, and 16 represents a decoder. In addition, in the figures, the same reference numerals indicate the same or equivalent parts. Agent Patent Attorney Jun Miyazono
Claims (1)
ータバスにより外部と接続されたマイクロコンピュータ
の制御方式において、 前記アドレスバスから与えられたアドレスにより、前記
レジスタのうちいずれかを特定するデコーダを設けると
ともに、処理動作を一時停止して、該レジスタに対して
前記制御信号線及びデータバスを通してアクセスするこ
とを特徴とするマイクロコンピュータの制御方式。[Claims] In a control system for a microcomputer that has a plurality of registers and is connected to the outside through a control signal line, an address bus, and a data bus, any one of the registers is controlled by an address given from the address bus. 1. A control system for a microcomputer, characterized in that a decoder is provided to specify the register, the processing operation is temporarily stopped, and the register is accessed through the control signal line and the data bus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2195927A JPH0481939A (en) | 1990-07-24 | 1990-07-24 | Control system for microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2195927A JPH0481939A (en) | 1990-07-24 | 1990-07-24 | Control system for microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0481939A true JPH0481939A (en) | 1992-03-16 |
Family
ID=16349293
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2195927A Pending JPH0481939A (en) | 1990-07-24 | 1990-07-24 | Control system for microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0481939A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100461559B1 (en) * | 2002-02-20 | 2004-12-14 | 양사헌 | Turner of different level frame structure |
-
1990
- 1990-07-24 JP JP2195927A patent/JPH0481939A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100461559B1 (en) * | 2002-02-20 | 2004-12-14 | 양사헌 | Turner of different level frame structure |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0430053B2 (en) | ||
JPH0496163A (en) | Dma controller | |
JPH02156334A (en) | Information processor | |
JPS63279328A (en) | Control system for guest execution of virtual computer system | |
JPH05108548A (en) | Dma controller | |
JPH0481939A (en) | Control system for microcomputer | |
JPH05216507A (en) | Program changing method for programmable controller | |
JPH04167146A (en) | Address tracing system for information processor | |
JPH059815B2 (en) | ||
JPH06103110A (en) | Breakpoint setting system | |
JP2000148511A (en) | Interruption processor for microcomputer and its interruption processing method | |
JPH036758A (en) | Microprocessor | |
JPS63244237A (en) | Information processor | |
JPH0259829A (en) | Microcomputer | |
JPH02183342A (en) | interrupt controller | |
JPS60159958A (en) | Data transfer controlling circuit | |
JPH05250161A (en) | Microcomputer device | |
JPS6120139A (en) | Interruption control system | |
JPH0417530B2 (en) | ||
JPS6349941A (en) | Arithmetic processing unit | |
JPH0477883A (en) | Single chip microcomputer | |
JPS60105048A (en) | Microprogram control method | |
JPH01240941A (en) | Information processor | |
JPH04310140A (en) | Computer system | |
JPS63304334A (en) | Microprocessor for program evaluation |