JP3158425B2 - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JP3158425B2
JP3158425B2 JP28038490A JP28038490A JP3158425B2 JP 3158425 B2 JP3158425 B2 JP 3158425B2 JP 28038490 A JP28038490 A JP 28038490A JP 28038490 A JP28038490 A JP 28038490A JP 3158425 B2 JP3158425 B2 JP 3158425B2
Authority
JP
Japan
Prior art keywords
counter
clock
count
register
microcomputer
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.)
Expired - Fee Related
Application number
JP28038490A
Other languages
Japanese (ja)
Other versions
JPH04153839A (en
Inventor
宏和 塚本
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP28038490A priority Critical patent/JP3158425B2/en
Publication of JPH04153839A publication Critical patent/JPH04153839A/en
Application granted granted Critical
Publication of JP3158425B2 publication Critical patent/JP3158425B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Microcomputers (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロコンピュータに関する。DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a microcomputer.

〔従来の技術〕[Conventional technology]

従来のマイクロコンピュータに内蔵されているタイマ
・カウンタの一例のブロック図を第3図に示す。第3図
に示されるように、前記タイマ・カウンタは、外部入力
Tin109に対応する制御レジスタ18、内部クロック109の
入力に対応する分周器19、カウントレジスタ20、カウン
タ21、表示レジスタ22および内蔵割込みコントローラ23
により構成される。
FIG. 3 is a block diagram showing an example of a timer / counter built in a conventional microcomputer. As shown in FIG. 3, the timer / counter has an external input
Control register 18 corresponding to Tin109, frequency divider 19 corresponding to input of internal clock 109, count register 20, counter 21, display register 22, and built-in interrupt controller 23
It consists of.

カウントレジスタ20には、カウント値または時間が設
定される。内部バス203からマイクロコンピュータの命
令、もしくは外部入力Tin109にトリガ信号を入力するこ
とによって、制御レジスタ18のスタートビットがセット
され、カウントレジスタ20の内容が、カウンタ21にダウ
ンロードされる。カウンタ21においては、内部クロック
fCLK110が、分周器19において分周されて出力されるク
ロックによってのみカウントが開始される。カウンタ21
における値が0になった時点において、外部出力TOUT11
1として信号が出力されるとともに、表示レジスタ22の
終了ビットがセットされ、内蔵割込みコントローラ23に
も信号が送られる。なお、カウントクロックの供給源と
しては、内部クロックfCLKに限られている。
In the count register 20, a count value or time is set. By inputting a microcomputer instruction from the internal bus 203 or a trigger signal to the external input Tin 109, the start bit of the control register 18 is set and the contents of the count register 20 are downloaded to the counter 21. In the counter 21, the internal clock
The counting is started only by the clock output by dividing the frequency of the fCLK 110 in the frequency divider 19. Counter 21
When the value at becomes zero, the external output T OUT 11
A signal is output as 1, the end bit of the display register 22 is set, and a signal is also sent to the built-in interrupt controller 23. Note that the supply source of the count clock is limited to the internal clock fCLK .

また、マイクロコンピュータを用いたシステムのデバ
ッグには、一般に、ICE(In Circuit Emulator)が用い
られる。本来、基板上に置かれるべきマイクロコンピュ
ータの代りに、上記ICEのポッド内に置かれるエバチッ
プから、基板をリモート操作する形態になる。エバチッ
プとは、一般に使用されているマイクロコンピュータ
に、外部からマイクロコンピュータ内部を制御する機能
が付加されたものである。CPUは、基板から離れて配置
されるため、配線の負荷容量が増加する傾向にある。従
って、高い周波数で動作するマイクロコンピュータ・シ
ステムのデバッグにICEを用いようとしても、ターゲッ
トに伝達される信号のタイミングが遅延し、ターゲット
の正常動作を望む得べくもない。高速動作のマイクロコ
ンピュータに対するICEによるデバッグ環境は、現状に
おいては、殆ど提供されていない。
For debugging a system using a microcomputer, an ICE (In Circuit Emulator) is generally used. Originally, instead of the microcomputer which should be placed on the board, the board is remotely operated from the evaluation chip placed in the pod of the ICE. The evaluation chip is obtained by adding a function of controlling the inside of the microcomputer from outside to a generally used microcomputer. Since the CPU is arranged away from the substrate, the load capacity of the wiring tends to increase. Therefore, even if the ICE is used for debugging a microcomputer system operating at a high frequency, the timing of a signal transmitted to the target is delayed, and it is impossible to expect normal operation of the target. ICE debugging environments for high-speed microcomputers are scarcely provided at present.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上述した従来のマイクロコンピュータにおいては、内
蔵されるタイマ・カウンタは、カウント・クロックの供
給源として、内部クロックfCLK110を分周器19により分
周して得られるクロックのみを使用しているため、クロ
ックのカウント間隔は常に一定である。このため、タイ
マ・カウンタ自体の機能としては、指定時間ごとの信号
の出力、および時間の測定等に限定されるという欠点が
ある。
In the above-mentioned conventional microcomputer, the built-in timer counter uses only a clock obtained by dividing the internal clock fCLK 110 by the frequency divider 19 as a supply source of the count clock. The clock counting interval is always constant. For this reason, the function of the timer / counter itself is disadvantageous in that it is limited to signal output at specified time intervals and time measurement.

〔課題を解決するための手段〕[Means for solving the problem]

本発明のマイクロコンピュータは、タイマ・カウンタ
を内蔵するマイクロコンピュータにおいて、所定の内部
クロックを分周して、第1のカウント・クロックとして
出力する分周器と、予め設定される所定の基準アドレス
値を保持するアドレスチェックレジスタと、前記基準ア
ドレス値と、現時点におけるCPUのプログラムカウンタ
における値とを比較して、両者の値が一致する時点にお
いて、所定のパルス信号を第2のカウント・クロックと
して出力するアドレスチェックユニットと、前記第1お
よび第2のカウント・クロックを入力して、その何れか
のカウント・クロックを選択して出力するクロック制御
レジスタと、を含むタイマ・カウンタを備えて構成され
る。
A microcomputer according to the present invention is a microcomputer incorporating a timer / counter, which divides a predetermined internal clock and outputs it as a first count clock, and a predetermined reference address value set in advance. And compares the reference address value with the value in the program counter of the CPU at the present time, and outputs a predetermined pulse signal as a second count clock when the values match. And a clock control register that receives the first and second count clocks and selects and outputs one of the count clocks. .

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。第1
図は、本発明の第1の実施例に含まれるタイマ・カウン
タを示すブロック図である。第1図に示されるように、
本実施例のタイマ・カウンタは、内部バス201に対応し
て、カウンタ制御レジスタ1と、分周器2と、アドレス
チェックレジスタ3と、アドレスチェックユニット4
と、クロック制御レジスタ5と、カウントレジスタ6
と、カウンタ7と、表示レジスタ8と、内蔵割込みコン
トローラ9とを備えて構成される。
Next, the present invention will be described with reference to the drawings. First
FIG. 3 is a block diagram showing a timer / counter included in the first embodiment of the present invention. As shown in FIG.
The timer / counter according to the present embodiment corresponds to the internal bus 201, and includes a counter control register 1, a frequency divider 2, an address check register 3, and an address check unit 4.
, A clock control register 5 and a count register 6
, A counter 7, a display register 8, and a built-in interrupt controller 9.

第1図において、カウントレジスタ6には、カウント
値または時間が設定される。内部バス201を介して、CPU
から送られてくる命令および外部カウントタイミング入
力Tin101により、カウンタ制御レジスタ1のスタートビ
ットがセットされると、カウントレジスタ6の内容はカ
ウンタ7にダウンロードされる。カウンタ7において
は、クロック制御レジスタ5から出力されるクロックに
よりカウントが開始される。カウンタ7におけるカウン
ト値が0になる時点において、表示レジスタ8の終了ビ
ットがセットされるとともに、内蔵割込みコントローラ
9に信号が出力され、また外部出力TOUT103に信号が出
力される。
In FIG. 1, a count value or time is set in a count register 6. CPU via internal bus 201
When the start bit of the counter control register 1 is set by the command sent from the external device and the external count timing input Tin101, the content of the count register 6 is downloaded to the counter 7. The counter 7 starts counting by the clock output from the clock control register 5. When the count value of the counter 7 becomes 0, the end bit of the display register 8 is set, a signal is output to the built-in interrupt controller 9, and a signal is output to the external output T OUT 103.

本実施例におけるタイマ・カウンタとしては、カウン
タ7に供給されるカウント・クロックは、内部クロック
fCLK102が分周器2において分周され、一定の時間間隔
でカウンタ7に供給される第1のクロックの他に、アド
レスチェックレジスタ3に書込まれている値と、CPUの
プログラムカウンタの値とが一致したことを検知するア
ドレスチェックユニット4から出力される不定時間間隔
のパルス信号の中より、クロック制御レジスタ5におい
て選択される第2のクロックが用意されており、クロッ
ク制御レジスタ5を介して、その何れか一方が選択され
て出力され、カウンタ7に入力される。
In the present embodiment, the count clock supplied to the counter 7 is an internal clock.
The frequency fCLK 102 is frequency- divided by the frequency divider 2 and, in addition to the first clock supplied to the counter 7 at fixed time intervals, the value written in the address check register 3 and the value of A second clock selected by the clock control register 5 is prepared from among pulse signals at indefinite time intervals output from the address check unit 4 for detecting that the values match with each other. One of them is selected, output, and input to the counter 7.

従って、本実施例においては、内蔵されるタイマ・カ
ウンタのカウントクロックとして、マイクロコンピュー
タの内部クロックfCLKを分周して生成されるクロックの
他に、もう一つのクロックを使用することが可能とな
る。
Therefore, in this embodiment, it is possible to use another clock as the count clock of the built-in timer / counter in addition to the clock generated by dividing the internal clock fCLK of the microcomputer. Become.

このため、プログラムカウンタの値がユーザの指定す
る値になる度に1回カウントが行われる。ユーザは、こ
のカウント値を読むことにより、指定アドレスのプログ
ラムカウンタの通過回数を知ることができる。従って、
簡単なソフトウェアを作成することにより、カバレッジ
の測定およびブレークポイントの設定等、デバッグの作
業を行うことが可能となる。この機能をICEに適用する
ことにより、従来、ICEにおいて、ハードウェア+ソフ
トウェアにより行っていたブレークポイントの設定およ
びカバレッジの測定を、ソフトウェアのみにて行うこと
が可能となり、トータル・コストの低減を図ることがで
きる。
Therefore, counting is performed once each time the value of the program counter reaches the value specified by the user. By reading this count value, the user can know the number of times the specified address has passed the program counter. Therefore,
By creating simple software, debugging operations such as measurement of coverage and setting of breakpoints can be performed. By applying this function to ICE, it is now possible to set breakpoints and measure coverage, which was previously performed by hardware and software in ICE, using only software, thereby reducing total cost. be able to.

また、高速動作のマイクロコンピュータの場合におい
ては、ターゲットとICE本体のCPUとの間の配線容量の問
題に起因して、従来、ICEによるデバッグ環境の提供に
ついては問題があり困難であるが、本発明により、マイ
クロコンピュータ内部において、デバッグ機能をサポー
トすることにより、マイクロコンピュータ内部にてブレ
ークポイントをかけたり、カバレッジの測定をすること
等のデバッグが可能となる。
In the case of a microcomputer operating at high speed, it has been difficult to provide a debugging environment using the ICE because of the problem of wiring capacity between the target and the CPU of the ICE. According to the present invention, by supporting a debugging function inside the microcomputer, it becomes possible to perform debugging such as setting a breakpoint or measuring coverage inside the microcomputer.

次に、本発明の第2の実施例について説明する。第2
図は、第2の実施例に含まれるタイマ・カウンタを示す
ブロック図である。第2図に示されるように、本実施例
のタイマ・カウンタは、内部バス202に対応して、カウ
ンタ制御レジスタ10と、分周器11と、パルスジェネレー
タ12と、クロック制御レジスタ13と、カウントレジスタ
14と、カウンタ15と、表示レジスタ16と、内蔵割込みコ
ントローラ17とを備えて構成される。
Next, a second embodiment of the present invention will be described. Second
The figure is a block diagram showing a timer / counter included in the second embodiment. As shown in FIG. 2, the timer / counter according to the present embodiment includes a counter control register 10, a frequency divider 11, a pulse generator 12, a clock control register 13, register
14, a counter 15, a display register 16, and a built-in interrupt controller 17.

カウントレジスタ14には、カウント値または時間が設
定される。内部バス202を介して、CPUから送られてくる
命令および外部カウントタイミング入力Tin104により、
カウンタ制御レジスタ10のスタートビットがセットされ
ると、カウントレジスタ14の内容はカウンタ15にダウン
ロードされる。カウンタ15においては、クロック制御レ
ジスタ13から出力されるクロックによりカウントが開始
される。カウンタ15におけるカウント値が0になる時点
において、表示レジスタ16の終了ビットがセットされる
とともに、内蔵割込みコントローラ17に信号が出力さ
れ、また外部出力TOUT108に信号が出力される。
In the count register 14, a count value or time is set. Through the command sent from the CPU and the external count timing input Tin104 via the internal bus 202,
When the start bit of the counter control register 10 is set, the contents of the count register 14 are downloaded to the counter 15. The counter 15 starts counting by a clock output from the clock control register 13. When the count value of the counter 15 becomes 0, the end bit of the display register 16 is set, a signal is output to the built-in interrupt controller 17, and a signal is output to the external output T OUT 108.

本実施例におけるタイマ・カウンタとしては、カウン
タ15に供給されるカウント・クロックは、内部クロック
fCLK105が分周器11において分周され、一定の時間間隔
でカウンタ15に供給される第1のクロックと、パルスジ
ェネレータ12において、当該マイクロコンピュータに内
蔵されるDMAまたはシリアルコントローラ等の内部周辺
機器から入力される、複数の内部入力信号Iin106ならび
に複数の外部入力信号Oin107のエッジを検出して得られ
る不定時間間隔のトリガ信号が第2のクロックとして用
意されている。
As the timer / counter in the present embodiment, the count clock supplied to the counter 15 is an internal clock.
The fCLK 105 is frequency- divided by the frequency divider 11 and supplied to the counter 15 at regular time intervals. Trigger signals at indefinite time intervals obtained by detecting edges of the plurality of internal input signals Iin106 and the plurality of external input signals Oin107 input from the device are prepared as the second clock.

これらの第1および第2のクロックは、クロック制御
レジスタ13に入力され、クロック制御レジスタ13におい
て、その何れか一方が選択されて出力され、カウンタ15
に入力される。従って、マイクロコンピュータ内部の周
辺機器の動作回数の調査および指定動作回数による割込
み等、周辺機器の制御の自由度が拡大され、外部からの
入力信号によっても同様の制御を行うことができる。
These first and second clocks are input to a clock control register 13, one of which is selected and output by the clock control register 13, and a counter 15
Is input to Therefore, the degree of freedom of control of the peripheral device such as an investigation of the number of operations of the peripheral device inside the microcomputer and an interruption due to the designated number of operations is expanded, and the same control can be performed by an external input signal.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明は、マイクロコンピュー
タに内蔵されるタイマ・カウンタにおいて、前記タイマ
・カウンタに含まれるカウンタに対するカウントクロッ
クとして、前記マイクロコンピュータの内部クロックを
分周して生成されるクロックの他に、不定時間間隔のク
ロックを設けることにより、前記タイマ・カウンタの機
能に対する制約を排除することができるという効果があ
る。
As described above, the present invention relates to a timer counter incorporated in a microcomputer, wherein a count clock generated by dividing an internal clock of the microcomputer is used as a count clock for a counter included in the timer counter. In addition, by providing clocks at indefinite time intervals, there is an effect that restrictions on the function of the timer / counter can be eliminated.

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

第1図および第2図は、それぞれ本発明の第1および第
2の実施例のブロック図、第3図は従来例のブロック図
である。 図において、1,10……カウンタ制御レジスタ、2,11,19
……分周器、3……アドレスチェックレジスタ、4……
アドレスチェックユニット、5,13……クロック制御レジ
スタ、6,14,20……カウントレジスタ、7,15,21……カウ
ンタ、8,16,22……表示レジスタ、9,17,23……内蔵割込
みコントローラ。
FIG. 1 and FIG. 2 are block diagrams of first and second embodiments of the present invention, respectively, and FIG. 3 is a block diagram of a conventional example. In the figure, 1,10... Counter control register, 2,11,19
... frequency divider, 3 ... address check register, 4 ...
Address check unit, 5,13 Clock control register, 6,14,20 Count register, 7,15,21 Counter, 8,16,22 Display register, 9,17,23 Built-in Interrupt controller.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 11/22 - 11/277 G06F 15/78 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 11/22-11/277 G06F 15/78

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】タイマ・カウンタを内蔵するマイクロコン
ピュータにおいて、 所定の内部クロックを分周して、第1のカウント・クロ
ックとして出力する分周器と、 予め設定される所定の基準アドレス値を保持するアドレ
スチェックレジスタと、 前記基準アドレス値と、現時点におけるCPUのプログラ
ムカウンタにおける値とを比較して、両者の値が一致す
る時点において、所定のパルス信号を第2のカウント・
クロックとして出力するアドレスチェックユニットと、 前記第1および第2のカウント・クロックを入力して、
その何れかのカウント・クロックを選択して出力するク
ロック制御レジスタと、 を含むタイマ・カウンタを備えることを特徴とするマイ
クロコンピュータ。
1. A microcomputer having a built-in timer / counter, a frequency divider for dividing a predetermined internal clock and outputting it as a first count clock, and holding a predetermined reference address value set in advance. An address check register to be compared with the reference address value and a value in a program counter of the CPU at the present time, and when the values match, a predetermined pulse signal is counted by a second count / counter.
An address check unit that outputs as a clock, and the first and second count clocks are input,
A clock control register for selecting and outputting any one of the count clocks, and a timer counter including:
JP28038490A 1990-10-18 1990-10-18 Microcomputer Expired - Fee Related JP3158425B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28038490A JP3158425B2 (en) 1990-10-18 1990-10-18 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28038490A JP3158425B2 (en) 1990-10-18 1990-10-18 Microcomputer

Publications (2)

Publication Number Publication Date
JPH04153839A JPH04153839A (en) 1992-05-27
JP3158425B2 true JP3158425B2 (en) 2001-04-23

Family

ID=17624273

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28038490A Expired - Fee Related JP3158425B2 (en) 1990-10-18 1990-10-18 Microcomputer

Country Status (1)

Country Link
JP (1) JP3158425B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6482372B2 (en) 2000-12-22 2002-11-19 Kinetico Incorporated Process for recovering palladium from a solution
US7765087B2 (en) 2005-04-11 2010-07-27 Panasonic Corporation System performance profiling device integrated inside a system-on-chip

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6482372B2 (en) 2000-12-22 2002-11-19 Kinetico Incorporated Process for recovering palladium from a solution
US7765087B2 (en) 2005-04-11 2010-07-27 Panasonic Corporation System performance profiling device integrated inside a system-on-chip

Also Published As

Publication number Publication date
JPH04153839A (en) 1992-05-27

Similar Documents

Publication Publication Date Title
US5345580A (en) Microprocessor device and emulator device thereof
US5715438A (en) System and method for providing time base adjustment
JPH04304531A (en) Emulation device and microcontroller using this device
US5870541A (en) Computer system capable of outputting status data without interrupting execution of program
US5631592A (en) Pulse generation/sensing arrangement for use in a microprocessor system
US5903747A (en) Microprocessor clocking control system
JP3158425B2 (en) Microcomputer
US5761482A (en) Emulation apparatus
KR100223096B1 (en) Method and apparatus for observing internal memory-mapped registers
JP3039631B2 (en) Signal line monitoring device
US5497481A (en) Microcomputer computer system having plural programmable timers and preventing memory access operations from interfering with timer start requests
JP3129397B2 (en) Emulation device for microcomputer
JPH0664483B2 (en) Pulse counter
JP2575025B2 (en) In-circuit emulator
KR100189977B1 (en) Emulator system having trace function and trace method
KR0174008B1 (en) Data communication device for self diagnosis operation
JP3100013B2 (en) Program debug device
SU1179336A1 (en) Control unit
JP3366235B2 (en) Data read control device
JPH0231247A (en) Data processor
JPH0614330B2 (en) Microprocessor device
JP2718402B2 (en) Time measurement circuit for built-in in-circuit emulator
SU934474A1 (en) Programme-interrupting device
JPH05134901A (en) Analyzer
JPS6041140A (en) Debugging device of read-only memory built in semiconductor integrated circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees