JP2012133752A - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP2012133752A
JP2012133752A JP2011225842A JP2011225842A JP2012133752A JP 2012133752 A JP2012133752 A JP 2012133752A JP 2011225842 A JP2011225842 A JP 2011225842A JP 2011225842 A JP2011225842 A JP 2011225842A JP 2012133752 A JP2012133752 A JP 2012133752A
Authority
JP
Japan
Prior art keywords
interrupt
measurement
timer
signal
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.)
Granted
Application number
JP2011225842A
Other languages
Japanese (ja)
Other versions
JP5310819B2 (en
Inventor
Yuki Asada
祐樹 浅田
Naoki Ito
直紀 伊藤
Kiyouichi Suzuki
亨市 鈴木
Norio Fujimori
規雄 藤守
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2011225842A priority Critical patent/JP5310819B2/en
Priority to DE102011086991A priority patent/DE102011086991A1/en
Priority to US13/305,133 priority patent/US8700956B2/en
Priority to CN201110386242.5A priority patent/CN102591758B/en
Priority to GB1120523.4A priority patent/GB2485913A/en
Publication of JP2012133752A publication Critical patent/JP2012133752A/en
Application granted granted Critical
Publication of JP5310819B2 publication Critical patent/JP5310819B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/348Circuit details, i.e. tracer hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/86Event-based monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/88Monitoring involving counting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Measurement Of Unknown Time Intervals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a microcomputer capable of measuring time required for various processing by minimizing an increase of circuit scale and without changing a description of a user program when the microcomputer comprises an on-chip debug function.SOLUTION: A debug circuit unit of a microcomputer comprises a measurement permission circuit 23 outputting measurement permission signals to a timer 28 which measures time between two events occurring during a CPU program execution period, according to prescribed conditions of a user. The measurement permission circuit 23 comprises: an interruption level setting register 21 for setting an interruption level to permit or inhibit a measurement operation of the timer 28; and a comparator 22 for determining whether a level of interruption processing executed by a CPU 2 is equal to or more than the interruption level set by the interruption level setting register 21. The measurement permission circuit 23 is configured to be able to designate a determination result by the comparator 22 as the measurement permission signal.

Description

本発明は、オンチップデバッグ機能を備えたマイクロコンピュータに関する。   The present invention relates to a microcomputer having an on-chip debugging function.

従来、マイクロコンピュータのプログラムをデバッグする際に、プログラム中の特定の処理時間を計測するには、例えば特許文献1のように、処理時間の計測を開始するアドレスと計測を終了するアドレスとを設定し、アドレス間で処理時間を計測する技術がある。しかし、マイクロコンピュータは、メインルーチンの実行中に、関数処理などのサブルーチンや様々な割込み処理も実行することがあり、サブルーチンの処理中に割込みが発生する場合もある。したがって、それらを個別に計測するためには、例えば特許文献2のように、各処理ごとに計測開始アドレスと計測終了アドレスとを設定するレジスタや、計測結果を保持するレジスタを用意する必要がある。
特開平3−118644号公報 特許第2595728号公報
Conventionally, when debugging a program of a microcomputer, in order to measure a specific processing time in the program, for example, as in Patent Document 1, an address for starting measurement of a processing time and an address for ending the measurement are set. However, there is a technique for measuring the processing time between addresses. However, the microcomputer may also execute a subroutine such as function processing and various interrupt processing during execution of the main routine, and an interrupt may occur during processing of the subroutine. Therefore, in order to measure them individually, it is necessary to prepare a register for setting a measurement start address and a measurement end address for each process and a register for holding a measurement result, as in Patent Document 2, for example. .
Japanese Patent Laid-Open No. 3-118644 Japanese Patent No. 2595728

ここで、プログラムのデバッグ用にマイクロコンピュータのエミュレータが用意される場合には、回路規模の制約は比較的小さい。しかし、近年は、マイクロコンピュータに、プログラムをデバッグするための機能が予め搭載されている所謂オンチップデバッグ機能を備えたものが用いられている。この場合、回路規模の制約が大きくなることから、冗長な構成は極力削減することが望ましい。例えば、特許文献1の技術を用いて特定の処理に要する時間を計測することを想定すると、発生しうるすべての割込み処理の開始アドレスと終了アドレスを設定するレジスタを設けるか、または、計測対象の処理以外の割込みを一時的に禁止したり、或いは、許可する割込みのレベルを一時的に高く設定するように、デバッグ対象のソフトウェア(ユーザプログラム)を変更する必要がある。   Here, when a microcomputer emulator is prepared for debugging a program, the circuit scale is relatively small. However, in recent years, a microcomputer having a so-called on-chip debugging function in which a function for debugging a program is mounted in advance has been used. In this case, since the restriction on the circuit scale becomes large, it is desirable to reduce the redundant configuration as much as possible. For example, assuming that the time required for a specific process is measured using the technique of Patent Document 1, a register for setting start addresses and end addresses of all interrupt processes that can occur is provided, It is necessary to change the software (user program) to be debugged so that interrupts other than processing are temporarily prohibited or the level of interrupts to be permitted is temporarily set high.

本発明は上記事情に鑑みてなされたものであり、その目的は、オンチップデバッグ機能を備える場合に、回路規模を極力増大させることなく、且つユーザプログラムの記述を変更させることなく、様々な処理に要する時間を計測することができるマイクロコンピュータを提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to perform various processes without increasing the circuit scale as much as possible and without changing the description of the user program when an on-chip debugging function is provided. An object of the present invention is to provide a microcomputer capable of measuring the time required for the operation.

請求項1記載のマイクロコンピュータによれば、オンチップデバッグ回路部に、ユーザによって指定された条件に応じて、CPUのプログラム実行期間に発生する2つのイベントの間を時間の計測対象とするタイマに計測許可信号を出力する計測許可信号出力手段を備える。そして、タイマは、計測許可信号がアクティブとなる期間に計測動作を実行する。これにより、ユーザが指定するイベントや計測許可信号の出力条件に応じて、1つのタイマにより様々な処理に要する時間を柔軟に計測することができる。したがって、オンチップデバッグ回路部を搭載することによる回路規模の増大を極力抑制できると共に、ユーザプログラムの記述を変更させることを回避できる。   According to the microcomputer of claim 1, the on-chip debug circuit unit is provided with a timer whose time is to be measured between two events that occur during the program execution period of the CPU according to a condition specified by the user. Measurement permission signal output means for outputting a measurement permission signal is provided. The timer performs a measurement operation during a period when the measurement permission signal is active. Thereby, according to the event which a user designates, and the output conditions of a measurement permission signal, the time which various processes require by one timer can be measured flexibly. Therefore, an increase in circuit scale due to the on-chip debug circuit portion can be suppressed as much as possible, and it is possible to avoid changing the description of the user program.

請求項2記載のマイクロコンピュータによれば、計測許可信号出力手段は、計測許可信号として、CPUが割込み処理中であることを示す割込み処理信号を指定可能とする。したがって、例えば2つのイベントの間においてCPUが割込み処理を実行している期間,若しくは割込み処理を実行していない期間の長さをタイマにより計測することができる。   According to the microcomputer of the second aspect, the measurement permission signal output means can designate an interrupt processing signal indicating that the CPU is in interrupt processing as the measurement permission signal. Therefore, for example, the length of the period during which the CPU executes the interrupt process or the period during which the interrupt process is not executed between two events can be measured by the timer.

請求項3記載のマイクロコンピュータによれば、計測許可信号出力手段は、タイマによる計測動作を許可又は禁止する割込みレベルを設定するための割込みレベル設定レジスタと、CPUが実行している割込み処理のレベルと割込みレベル設定レジスタに設定された割込みレベルとの高低関係を比較判定する判定手段とを備え、計測許可信号として、判定手段による判定結果を指定可能とする。したがって、2つのイベントが発生した間において、CPUが実行している割込み処理のレベルが、割込みレベル設定レジスタに設定されたレベルよりも高い場合,若しくは低い場合となる期間を、タイマにより計測することができる。   According to the microcomputer of claim 3, the measurement permission signal output means includes an interrupt level setting register for setting an interrupt level for permitting or prohibiting a measurement operation by the timer, and an interrupt processing level executed by the CPU. And a determination unit that compares and determines the level relationship between the interrupt level set in the interrupt level setting register and the determination result by the determination unit can be specified as a measurement permission signal. Therefore, between two events, the timer measures the period when the level of interrupt processing being executed by the CPU is higher or lower than the level set in the interrupt level setting register. Can do.

請求項4記載のマイクロコンピュータによれば、割込み保留信号出力手段は、CPUが上位レベルの割込み処理中に発生した下位レベルの割込み処理を保留していることを示す割込み保留信号を出力し、計測許可信号出力手段は、計測許可信号として割込み保留信号を指定可能とする。したがって、2つのイベントが発生した間において、CPUが割込み処理を保留している時間をタイマにより計測することができる。   According to the microcomputer of claim 4, the interrupt hold signal output means outputs an interrupt hold signal indicating that the CPU is holding the lower level interrupt processing generated during the upper level interrupt processing, and performs measurement. The permission signal output means can designate an interrupt hold signal as the measurement permission signal. Therefore, it is possible to measure the time during which the CPU holds the interrupt processing between two events by using the timer.

請求項5記載のマイクロコンピュータによれば、割込み禁止信号出力手段は、CPUに対する割込みが禁止されている期間にアクティブとなる割込み禁止信号を出力し、計測許可信号出力手段は、計測許可信号として割込み禁止信号を指定可能とする。したがって、2つのイベントが発生した間において、CPUに対する割込み処理が禁止されている時間をタイマにより計測することができる。   According to another aspect of the microcomputer of the present invention, the interrupt prohibition signal output means outputs an interrupt prohibition signal that becomes active during a period when interrupt to the CPU is prohibited, and the measurement permission signal output means interrupts as a measurement permission signal. The prohibition signal can be specified. Therefore, it is possible to measure the time during which interrupt processing for the CPU is prohibited between the occurrences of two events by the timer.

請求項6記載のマイクロコンピュータによれば、比較手段は、開始アドレス設定レジスタ及び終了アドレス設定レジスタとCPUのプログラムカウンタの値とを比較する。そして、オンチップデバッグ回路部は、比較手段による比較結果をイベントとする。したがって、例えば特定の処理を行うためのサブルーチンプログラムの開始アドレスと終了アドレスとをそれぞれ対応するレジスタに設定しておけば、タイマによりサブルーチンプログラムの実行時間を計測することができる。   According to the microcomputer of the sixth aspect, the comparing means compares the start address setting register and the end address setting register with the value of the program counter of the CPU. Then, the on-chip debug circuit unit uses the comparison result by the comparison means as an event. Therefore, for example, if the start address and end address of a subroutine program for performing a specific process are set in the corresponding registers, the execution time of the subroutine program can be measured by a timer.

請求項7記載のマイクロコンピュータによれば、オンチップデバッグ回路部は、割込み処理信号のレベルが変化するエッジをイベントとして指定可能とする。すなわち、割込み処理の開始,終了に伴って変化する割込み処理信号のエッジをイベントとすることで、タイマにより割込み処理に要する時間を計測することができる。   According to the microcomputer of the seventh aspect, the on-chip debug circuit unit can designate an edge at which the level of the interrupt processing signal changes as an event. That is, the time required for the interrupt process can be measured by the timer by using the edge of the interrupt process signal that changes as the interrupt process starts and ends as an event.

請求項8記載のマイクロコンピュータによれば、オンチップデバッグ回路部は、割込みレベルを判定する判定手段により出力される判定信号のエッジをイベントとして指定可能とする。したがって、割込みレベル設定レジスタに設定したレベルにより、計測対象とする割込み処理の処理時間を選択的に計測できる。   According to the microcomputer of the eighth aspect, the on-chip debug circuit unit can designate the edge of the determination signal output by the determination unit for determining the interrupt level as an event. Therefore, the processing time of the interrupt processing to be measured can be selectively measured according to the level set in the interrupt level setting register.

請求項9記載のマイクロコンピュータによれば、オンチップデバッグ回路部は、割込み保留信号のレベルが変化するエッジをイベントとして指定可能とする。したがって、割込み処理が保留されていた時間をタイマにより計測できる。   According to the microcomputer of the ninth aspect, the on-chip debug circuit unit can designate an edge at which the level of the interrupt pending signal changes as an event. Therefore, it is possible to measure the time during which the interrupt processing has been suspended by the timer.

請求項10記載のマイクロコンピュータによれば、オンチップデバッグ回路部は、割込み禁止信号のレベルが変化するエッジをイベントとして指定可能とする。したがって、割込み処理が禁止されていた時間をタイマにより計測できる。   According to the microcomputer of the tenth aspect, the on-chip debug circuit unit can designate an edge at which the level of the interrupt inhibition signal changes as an event. Therefore, the timer can measure the time during which the interrupt processing is prohibited.

請求項11記載のマイクロコンピュータによれば、最大値レジスタに、タイマによる計測結果の最大値を保持するようにし、最大値更新手段は、タイマによる計測動作が終了すると、その時点の計測結果と最大値レジスタに保持されている最大値とを比較して、前者の値が大きければ計測結果を最大値レジスタに書き込んで更新する。したがって、最大値レジスタにアクセスすれば、タイマによる計測結果の最大値を得ることができる。   According to the microcomputer of the eleventh aspect, the maximum value register holds the maximum value of the measurement result by the timer, and when the measurement operation by the timer is completed, the maximum value updating means The maximum value held in the value register is compared. If the former value is large, the measurement result is written in the maximum value register and updated. Therefore, if the maximum value register is accessed, the maximum value of the measurement result by the timer can be obtained.

請求項12記載のマイクロコンピュータによれば、最小値レジスタに、タイマによる計測結果の最小値を保持するようにし、最小値更新手段は、タイマによる計測動作が終了すると、その時点の計測結果と最小値レジスタに保持されている最小値とを比較して、前者の値が小さければ計測結果を最小値レジスタに書き込んで更新する。したがって、最小値レジスタにアクセスすれば、タイマによる計測結果の最小値を得ることができる。   According to the microcomputer of the twelfth aspect, the minimum value register holds the minimum value of the measurement result by the timer, and when the measurement operation by the timer is completed, the minimum value updating means The minimum value held in the value register is compared. If the former value is small, the measurement result is written in the minimum value register and updated. Therefore, if the minimum value register is accessed, the minimum value of the measurement result by the timer can be obtained.

請求項13記載のマイクロコンピュータによれば、計測回数カウンタは、タイマによる計測動作の実行回数をカウントし、累積値レジスタに、タイマによる計測動作の終了時に計測結果を累積して保持する。したがって、累積値レジスタに保持されているタイマによる計測結果の累積値を計測回数カウンタのカウント値で除すことにより、タイマによる計測結果の平均値を得ることが可能となる。   According to the microcomputer of the thirteenth aspect, the measurement number counter counts the number of executions of the measurement operation by the timer, and accumulates and holds the measurement result in the accumulated value register at the end of the measurement operation by the timer. Therefore, the average value of the measurement results by the timer can be obtained by dividing the cumulative value of the measurement results by the timer held in the cumulative value register by the count value of the measurement number counter.

請求項14記載のマイクロコンピュータによれば、CPUに対するシステムクロック信号の供給を停止することで低消費電力モードに移行可能に構成され、オンチップデバッグ回路部の機能を有効化させた状態では、低消費電力モードに移行している期間においてもオンチップデバッグ回路部にシステムクロック信号を供給する。したがって、マイクロコンピュータが低消費電力モードに移行している期間においても、オンチップデバッグ回路部により、例えば上記期間の長さを計測することが可能となる。   According to the microcomputer of the fourteenth aspect, it is configured to be able to shift to the low power consumption mode by stopping the supply of the system clock signal to the CPU, and in a state in which the function of the on-chip debug circuit unit is made effective, Even during the transition to the power consumption mode, the system clock signal is supplied to the on-chip debug circuit unit. Therefore, for example, the length of the period can be measured by the on-chip debug circuit unit even during the period in which the microcomputer shifts to the low power consumption mode.

第1実施例であり、マイクロコンピュータの構成を示す機能ブロック図Functional block diagram showing the configuration of the microcomputer according to the first embodiment 時間計測機能部及びイベント機能部の詳細構成を示す図The figure which shows the detailed structure of a time measurement function part and an event function part ユーザプログラムのデバッグを行う際に、タイマにより特定の処理時間を計測する場合の設定手順を示すフローチャートFlowchart showing the setting procedure when measuring a specific processing time with a timer when debugging a user program 4つの異なる処理時間計測パターンを示すタイミングチャートTiming chart showing four different processing time measurement patterns 第2実施例を示す図2の一部相当図Partial equivalent diagram of FIG. 2 showing the second embodiment 処理時間計測パターンを示すタイミングチャートTiming chart showing processing time measurement pattern 第3実施例を示す図2の一部相当図Partial equivalent diagram of FIG. 2 showing the third embodiment 図6相当図6 equivalent diagram 第4実施例を示す図5又は図7相当図FIG. 5 or FIG. 7 equivalent view showing the fourth embodiment 図8相当図Equivalent to FIG. 図6相当図6 equivalent diagram 割り込み間の最小時間計測パターンを示すタイミングチャートTiming chart showing the minimum time measurement pattern between interrupts 第5実施例であり、マイクロコンピュータについてクロック信号の供給経路部分のみを概略的に示す図FIG. 5 is a diagram schematically illustrating only a clock signal supply path portion of a microcomputer according to a fifth embodiment.

(第1実施例)
以下、第1実施例について図1ないし図4を参照して説明する。図1は、マイクロコンピュータの構成を示す機能ブロック図である。マイクロコンピュータ(マイコン)1は、CPU2,割込み制御回路(割込み処理信号出力手段,割込み保留信号出力手段,割込み禁止信号出力手段)3,メモリ4,周辺回路5,デバッグ回路部(オンチップデバッグ回路部)6等を備えている。CPU2〜周辺回路5は、一般的なマイクロコンピュータの構成要素であり、これらはアドレスバス7及びデータバス8を介して接続されている。
(First embodiment)
The first embodiment will be described below with reference to FIGS. FIG. 1 is a functional block diagram showing the configuration of the microcomputer. The microcomputer 1 includes a CPU 2, an interrupt control circuit (interrupt processing signal output means, interrupt hold signal output means, interrupt prohibition signal output means) 3, a memory 4, a peripheral circuit 5, a debug circuit section (on-chip debug circuit section) ) 6 etc. The CPU 2 to the peripheral circuit 5 are components of a general microcomputer, and these are connected via an address bus 7 and a data bus 8.

割込み制御回路3は、CPU2に対して出力される各種の割込み信号をモニタして、例えば以下のような信号を発生させる。
・割込みの重要度を示す割込みレベルを示す信号
・CPU2が割込み処理を行っている期間にアクティブとなる割込み処理信号
・CPU2がレベルが上位の割込み処理を行っている間にレベルが下位の割込みが
発生することで、後者の割込み処理が保留されている期間にアクティブとなる
割込み保留信号
・割込み制御レジスタ(図示せず)に書き込みが行われ、CPU2に対する割込みの
出力が禁止されている期間にアクティブとなる割込み禁止信号
The interrupt control circuit 3 monitors various interrupt signals output to the CPU 2 and generates, for example, the following signals.
-A signal indicating the interrupt level indicating the importance level of the interrupt-An interrupt processing signal that is active while the CPU 2 is performing interrupt processing-An interrupt with a lower level occurs while the CPU 2 is performing higher level interrupt processing Occurs when the latter interrupt processing is pending Interrupt pending signal • Writes to the interrupt control register (not shown), active during periods when interrupt output to CPU 2 is prohibited Interrupt disable signal

デバッグ回路部6は、例えばフラッシュROMなどの不揮発性メモリを備えて構成されるメモリ4に記憶され、CPU2によって実行されるユーザプログラムのデバッグを行う場合に使用される。デバッグ回路部6は、外部のデバッグツール9と通信を行い、当該ツール9において実行されるモニタプログラムに応じて、CPU2がユーザプログラムを実行した場合のレジスタや、ワークメモリ(メモリ4に含まれるRAM)の状態等をモニタするために動作する。   The debug circuit unit 6 is stored in a memory 4 including a non-volatile memory such as a flash ROM, and is used when debugging a user program executed by the CPU 2. The debug circuit unit 6 communicates with an external debug tool 9, and registers or work memory (RAM included in the memory 4) when the CPU 2 executes a user program according to a monitor program executed by the tool 9. It operates to monitor the state of).

デバッグ回路部6は、実行制御機能部10,内蔵ブレーク機能部11,トレース機能部12,イベント機能部13,デバッグDMA機能部14,時間計測機能部15等を備えている。実行制御機能部10は、デバッグ回路部6が実行するデバッグ機能を統括的に制御する部分であり、内蔵ブレーク機能部11は、CPU2がユーザプログラムを実行している途中でその実行を停止させるブレーク機能を実現する部分である。トレース機能部12は、CPU2によるユーザプログラムの実行状態を追跡するトレース機能を実現する。イベント機能部13は、ユーザが設定した特定のイベントをトリガとするためにモニタを行う機能であり、デバッグDMA機能部14は、例えばメモリ4のデータを転送してデバッグツール9側で読み出すために使用される。   The debug circuit unit 6 includes an execution control function unit 10, a built-in break function unit 11, a trace function unit 12, an event function unit 13, a debug DMA function unit 14, a time measurement function unit 15, and the like. The execution control function unit 10 is a part that comprehensively controls the debug function executed by the debug circuit unit 6, and the built-in break function unit 11 is a break that stops the execution of the CPU 2 while the user program is being executed. This is the part that realizes the function. The trace function unit 12 realizes a trace function for tracking the execution state of the user program by the CPU 2. The event function unit 13 is a function for monitoring in order to use a specific event set by the user as a trigger, and the debug DMA function unit 14 is for transferring data in the memory 4 and reading it on the debug tool 9 side, for example. used.

時間計測機能部15は、CPU2による各種の処理の実行時間を計測するための部分であり、その詳細構成をイベント機能部13と共に図2に示す。割込みレベル設定レジスタ21には、ユーザによりデバッグツール9を介して割込みレベルが書き込み設定され、そのレジスタ値は、比較器22(判定手段)において割込み制御回路3より与えられる割込みレベルと比較される。比較器22は、前記割込みレベル(B)が、前記レジスタ値(A)よりも大きい場合にアクティブとなる信号を、計測許可回路(計測許可信号出力手段)23を構成するセレクタ24に出力する。セレクタ24には、その他、割込み制御回路3より、上述した割込み処理信号,割込み保留信号,割込み禁止信号等が与えられている。   The time measurement function unit 15 is a part for measuring the execution time of various processes by the CPU 2, and its detailed configuration is shown in FIG. 2 together with the event function unit 13. An interrupt level is written and set in the interrupt level setting register 21 by the user via the debug tool 9, and the register value is compared with the interrupt level given from the interrupt control circuit 3 in the comparator 22 (determination means). The comparator 22 outputs a signal that becomes active when the interrupt level (B) is higher than the register value (A) to the selector 24 that constitutes the measurement permission circuit (measurement permission signal output means) 23. In addition, the above-described interrupt processing signal, interrupt hold signal, interrupt prohibition signal, and the like are given to the selector 24 from the interrupt control circuit 3.

セレクタ24における入力信号の選択は、計測許可条件選択レジスタ25に書き込まれるレジスタ値によって行われる。計測許可条件選択レジスタ25には、ユーザによりデバッグツール9を介して、比較器22の出力信号,割込み処理信号,割込み保留信号,割込み禁止信号の何れを選択するかが書き込まれる。そして、セレクタ24の出力信号は、次段のセレクタ26に与えられる。   The selection of the input signal in the selector 24 is performed by the register value written in the measurement permission condition selection register 25. In the measurement permission condition selection register 25, which one of the output signal of the comparator 22, the interrupt processing signal, the interrupt hold signal, and the interrupt prohibition signal is selected by the user via the debug tool 9 is written. The output signal of the selector 24 is given to the selector 26 at the next stage.

セレクタ26は、セレクタ24の出力信号とその負論理信号との何れかを、計測許可設定レジスタ27に書き込まれるレジスタ値に応じて選択し、タイマ28に計測許可/一時停止信号(計測許可信号)として出力する。計測許可設定レジスタ27には、計測許可条件選択レジスタ25と同様に、ユーザによりデバッグツール9を介して書き込みが行われる。タイマ28は、計測許可/一時停止信号がハイレベルの期間に計時動作を行い、同信号がローレベルの期間に計時動作を一時的に停止する。   The selector 26 selects either the output signal of the selector 24 or its negative logic signal according to the register value written in the measurement permission setting register 27, and the timer 28 sets a measurement permission / pause signal (measurement permission signal). Output as. The measurement permission setting register 27 is written by the user via the debug tool 9 as in the measurement permission condition selection register 25. The timer 28 performs a timing operation during a period when the measurement permission / pause signal is at a high level, and temporarily stops the timing operation when the signal is at a low level.

タイマ28には、2つのセレクタ29,30より、それぞれ計測開始信号,計測終了信号が与えられる。これらのセレクタ29,30には、イベント機能部13より各種信号が入力される。イベント機能部13の立上り/立下りエッジ検出部(エッジ検出手段)31には、比較器22の出力信号,並びに割込み処理信号,割込み保留信号,割込み禁止信号が入力されている。立上り/立下りエッジ検出部31は、入力される各信号の立ち上りエッジ,立下りエッジを検出すると、それぞれについて例えばワンショットパルス信号を発生し、セレクタ29,30に出力する(すなわち、計測開始信号,計測終了信号がアクティブになることが、「イベントの発生」に対応する)。
尚、図示の都合上、立上り/立下りエッジ検出部31の出力線は4本となっているが、実際には、各信号について立上りエッジと立下りエッジとを個別に検出するので、出力線は8本となる。そして、セレクタ29,30も、それぞれが立上りエッジ入力と立下りエッジ入力とを個別に選択可能となっている。
The timer 28 is given a measurement start signal and a measurement end signal from the two selectors 29 and 30, respectively. Various signals are input to the selectors 29 and 30 from the event function unit 13. The rising / falling edge detection unit (edge detection means) 31 of the event function unit 13 receives the output signal of the comparator 22, the interrupt processing signal, the interrupt hold signal, and the interrupt prohibition signal. When the rising / falling edge detection unit 31 detects the rising edge and the falling edge of each input signal, the rising / falling edge detection unit 31 generates, for example, a one-shot pulse signal for each signal and outputs it to the selectors 29 and 30 (that is, a measurement start signal). , The measurement end signal being activated corresponds to “occurrence of event”).
For convenience of illustration, the output line of the rising / falling edge detector 31 is four. However, in actuality, the rising edge and the falling edge are individually detected for each signal. Will be eight. Each of the selectors 29 and 30 can individually select a rising edge input and a falling edge input.

また、イベント機能部13は、開始アドレス設定レジスタ32,終了アドレス設定レジスタ33,比較器34及び35(比較手段)を備えている。比較器34は、開始アドレス設定レジスタ32のレジスタ値とCPU2のプログラムカウンタ(図示せず)の値とを比較し、比較器35は、終了アドレス設定レジスタ33のレジスタ値と前記プログラムカウンタの値とを比較して、何れも両者が一致すると一致信号をセレクタ29,30にそれぞれ出力する。セレクタ29,30における入力信号の選択は、それぞれ計測開始条件選択レジスタ36,計測終了条件選択レジスタ37に書き込まれるレジスタ値によって行われる。これらのレジスタ36,37には、ユーザによりデバッグツール9を介して、セレクタ29,30に入力される信号の何れを選択するかが書き込まれる。   The event function unit 13 includes a start address setting register 32, an end address setting register 33, and comparators 34 and 35 (comparison means). The comparator 34 compares the register value of the start address setting register 32 with the value of the program counter (not shown) of the CPU 2, and the comparator 35 compares the register value of the end address setting register 33 and the value of the program counter. When both of them match, a match signal is output to the selectors 29 and 30, respectively. Selection of input signals in the selectors 29 and 30 is performed by register values written in the measurement start condition selection register 36 and the measurement end condition selection register 37, respectively. In the registers 36 and 37, which of the signals to be input to the selectors 29 and 30 is selected by the user via the debug tool 9 is written.

次に、本実施例の作用について図3及び図4を参照して説明する。図3は、ユーザプログラムのデバッグを行っている際に、タイマ28により特定の処理時間を計測する場合の設定手順を示すフローチャートである。CPU2がユーザプログラムを実行している途中で(ステップP1)デバッグツール9によりブレークをかけて、モニタプログラムを実行する。そして、タイマ28と、当該タイマ28により計測されたタイマ値が転送される時間計測データレジスタ(図示せず)とをクリアすると(ステップP2)、タイマ28による計測を開始するアドレス(イベントの発生)と、計測を終了するアドレス(イベントの発生)とを、イベント機能部13の開始アドレス設定レジスタ32,終了アドレス設定レジスタ33に書き込んで設定したり、計測開始条件選択レジスタ36,計測終了条件選択レジスタ37等の設定を行う(ステップP3)。   Next, the operation of this embodiment will be described with reference to FIGS. FIG. 3 is a flowchart showing a setting procedure when a specific processing time is measured by the timer 28 during debugging of the user program. While the user program is being executed by the CPU 2 (step P1), the debug tool 9 breaks and the monitor program is executed. Then, when the timer 28 and the time measurement data register (not shown) to which the timer value measured by the timer 28 is transferred are cleared (step P2), the address at which the timer 28 starts measurement (event occurrence) And the address (event occurrence) at which the measurement is to be ended are written and set in the start address setting register 32 and the end address setting register 33 of the event function unit 13, or the measurement start condition selection register 36 and the measurement end condition selection register are set. 37 is set (step P3).

次に、割込みレベル設定レジスタ21に計測対象とする割込みレベルを設定したり、計測許可条件選択レジスタ25,計測許可選択レジスタ27等の設定を行う(ステップP4)。それから、モニタプログラムの実行を終了してユーザプログラムに復帰させると(ステップP5)、実行中に再びデバッグツール9によりブレークをかけて、モニタプログラムを実行する。そして、タイマ28のタイマ値と、後述する計測回数等を読み出す(ステップP6)。必要であればステップP2に戻り、処理時間計測のための設定を再度行う。   Next, the interrupt level to be measured is set in the interrupt level setting register 21, and the measurement permission condition selection register 25, the measurement permission selection register 27, etc. are set (step P4). Then, when the execution of the monitor program is terminated and returned to the user program (step P5), a break is again caused by the debug tool 9 during the execution, and the monitor program is executed. Then, the timer value of the timer 28 and the number of measurements described later are read (step P6). If necessary, the process returns to Step P2, and the setting for measuring the processing time is performed again.

図4(a)〜(d)は、4つの異なる処理時間計測パターンを示すタイミングチャートであり、図4(a)は、各レジスタの設定を以下のように行った場合の計測状態を示している。尚、図中の破線はタイマ28による計測が停止されている期間であり(開始イベント未発生の状態)、太線はタイマ28による計測が実行されている期間,細線はタイマ28による計測が一時停止されている期間に対応する。
・割込みレベル設定レジスタ21:割込みレベル「X(任意)」
・計測許可条件選択レジスタ25:割込み処理信号
・計測許可選択レジスタ27 :「0」(停止)
・開始アドレスレジスタ32 :0xA00000
・終了アドレスレジスタ33 :0xB00000
・計測開始条件選択レジスタ36:比較器34
・計測終了条件選択レジスタ37:比較器35
ここで、計測開始条件選択レジスタ36の値は関数処理(サブルーチン処理)の開始アドレスに対応し、計測終了条件選択レジスタ37の値は関数処理の終了アドレスに対応する。そして、関数処理の実行中に割込みが発生すると、割込み処理信号がアクティブとなる。セレクタ26は、その反転信号をタイマ28に出力するので、割込み処理信号がアクティブとなる期間はタイマ28による計時動作は停止される。その結果、タイマ28は関数処理の実行時間だけを計測する。
FIGS. 4A to 4D are timing charts showing four different processing time measurement patterns. FIG. 4A shows a measurement state when each register is set as follows. Yes. The broken line in the figure is the period during which measurement by the timer 28 is stopped (the start event has not occurred), the thick line is the period during which the measurement by the timer 28 is being executed, and the thin line is the measurement by the timer 28 being suspended Corresponds to the period that is being used.
Interrupt level setting register 21: Interrupt level “X (arbitrary)”
・ Measurement permission condition selection register 25: Interrupt processing signal ・ Measurement permission selection register 27: “0” (stop)
Start address register 32: 0xA00000
End address register 33: 0xB00000
Measurement start condition selection register 36: comparator 34
Measurement end condition selection register 37: comparator 35
Here, the value of the measurement start condition selection register 36 corresponds to the start address of the function process (subroutine process), and the value of the measurement end condition selection register 37 corresponds to the end address of the function process. When an interrupt occurs during the execution of function processing, the interrupt processing signal becomes active. Since the selector 26 outputs the inverted signal to the timer 28, the timing operation by the timer 28 is stopped during the period when the interrupt processing signal is active. As a result, the timer 28 measures only the execution time of the function process.

図4(b)は、各レジスタの設定を以下のように行った場合の計測状態を示すタイミングチャートである。
・割込みレベル設定レジスタ21:割込みレベル「1」
・計測許可条件選択レジスタ25:比較器22
・計測許可選択レジスタ27 :「1」
・開始アドレスレジスタ32 :0x000000
・終了アドレスレジスタ33 :0xFFFFFE
・計測開始条件選択レジスタ36:比較器34
・計測終了条件選択レジスタ37:比較器35
ここで、計測開始条件選択レジスタ36の値はメインルーチン処理の開始アドレスに対応し、計測終了条件選択レジスタ37の値はメインルーチン処理の終了アドレスに対応する。すると、割込みレベルが「1」よりも大きい場合にタイマ28による計時動作が許可されるので、関数処理の実行中にレベル「2」以上の割込みが発生し、その割込み処理が実行されている時間だけが計測されることになる。尚、メインルーチン処理の実行中に割込みが発生した場合にも、同様に計測が行われる。
FIG. 4B is a timing chart showing a measurement state when each register is set as follows.
Interrupt level setting register 21: Interrupt level “1”
Measurement permission condition selection register 25: comparator 22
Measurement permission selection register 27: “1”
Start address register 32: 0x000000
End address register 33: 0xFFFFFE
Measurement start condition selection register 36: comparator 34
Measurement end condition selection register 37: comparator 35
Here, the value of the measurement start condition selection register 36 corresponds to the start address of the main routine process, and the value of the measurement end condition selection register 37 corresponds to the end address of the main routine process. Then, when the interrupt level is higher than “1”, the timing operation by the timer 28 is permitted, so that an interrupt of level “2” or higher occurs during the execution of the function processing, and the time during which the interrupt processing is executed Only will be measured. Note that the same measurement is performed when an interrupt occurs during the execution of the main routine process.

図4(c)は、各レジスタの設定を以下のように行った場合の計測状態を示すタイミングチャートである。
・割込みレベル設定レジスタ21:割込みレベル「X」
・計測許可条件選択レジスタ25:割込み処理信号
・計測許可選択レジスタ27 :「1」
・開始アドレスレジスタ32 :0x000000(若しくは任意)
・終了アドレスレジスタ33 :0xFFFFFE(若しくは任意)
・計測開始条件選択レジスタ36:割込み保留信号の立上がりエッジ
・計測終了条件選択レジスタ37:割込み保留信号の立下がりエッジ
計測開始条件選択レジスタ36,計測終了条件選択レジスタ37の値は図4(b)と同じでも、或いは任意でも良い。この場合、レベル「2」の割込みが発生してその処理を行っている途中にレベル「1」の割込みが発生し、後者の処理が保留されている期間に割込み保留信号がアクティブとなる。そこで、割込み保留信号の立上がりエッジでタイマ28による計測を開始させ、割込み保留信号の立下がりエッジでタイマ28による計測を終了させる。また、割込み処理が行われている期間は、タイマ28の計測が許可される。その結果、レベル「1」の割込み処理が保留されている時間が計測されることになる。
FIG. 4C is a timing chart showing a measurement state when each register is set as follows.
Interrupt level setting register 21: Interrupt level “X”
Measurement permission condition selection register 25: Interrupt processing signal Measurement permission selection register 27: “1”
Start address register 32: 0x000000 (or any)
End address register 33: 0xFFFFFE (or any)
Measurement start condition selection register 36: rising edge of interrupt hold signal Measurement end condition selection register 37: falling edge of interrupt hold signal Measurement start condition selection register 36 and measurement end condition selection register 37 are shown in FIG. The same as or may be arbitrary. In this case, a level “1” interrupt is generated while a level “2” interrupt is generated and the processing is being performed, and the interrupt hold signal becomes active during a period in which the latter processing is held. Therefore, measurement by the timer 28 is started at the rising edge of the interrupt hold signal, and measurement by the timer 28 is ended at the falling edge of the interrupt hold signal. In addition, the timer 28 is allowed to measure during the period when the interrupt process is being performed. As a result, the time during which interrupt processing at level “1” is suspended is measured.

尚、この場合、割込み処理信号と、割込み保留信号とを入れ替えて同様に計測することも可能である。すなわち、割込み処理信号の立上がりエッジでタイマ28による計測を開始させ、割込み処理信号の立下がりエッジでタイマ28による計測を終了させるようにし、割込み保留信号がアクティブとなる期間にタイマ28の計測を許可しても良い。   In this case, the interrupt processing signal and the interrupt hold signal can be interchanged to perform the same measurement. In other words, the measurement by the timer 28 is started at the rising edge of the interrupt processing signal, the measurement by the timer 28 is ended at the falling edge of the interrupt processing signal, and the measurement of the timer 28 is permitted during the period when the interrupt pending signal is active. You may do it.

図4(d)は、各レジスタの設定を以下のように行った場合の計測状態を示すタイミングチャートである。
・割込みレベル設定レジスタ21:割込みレベル「X」
・計測許可条件選択レジスタ25:割込み禁止信号
・計測許可選択レジスタ27 :「1」
・開始アドレスレジスタ32 :0x000000
・終了アドレスレジスタ33 :0xFFFFFE
・計測開始条件選択レジスタ36:比較器34
・計測終了条件選択レジスタ37:比較器35
計測開始条件選択レジスタ36,計測終了条件選択レジスタ37の値は図4(b)と同じである。そして、関数処理の実行中にレベル「1」,「2」の割込みが発生しているが、それらの割込み処理が禁止されており、割込み禁止信号がアクティブとなる期間にタイマ28による計測が許可される。その結果、割込み処理が禁止されている時間が計測されることになる。
FIG. 4D is a timing chart showing a measurement state when each register is set as follows.
Interrupt level setting register 21: Interrupt level “X”
• Measurement enable condition selection register 25: Interrupt disable signal • Measurement enable selection register 27: “1”
Start address register 32: 0x000000
End address register 33: 0xFFFFFE
Measurement start condition selection register 36: comparator 34
Measurement end condition selection register 37: comparator 35
The values of the measurement start condition selection register 36 and the measurement end condition selection register 37 are the same as those in FIG. While level 1 and level 2 interrupts are generated during the execution of function processing, the interrupt processing is prohibited and measurement by the timer 28 is permitted during the period when the interrupt disable signal is active. Is done. As a result, the time during which interrupt processing is prohibited is measured.

この場合も図4(c)と同様に、割込み禁止信号の立上がりエッジでタイマ28による計測を開始させ、割込み禁止信号の立下がりエッジでタイマ28による計測を終了させるようにし、割込み処理信号がインアクティブとなる期間にタイマ28の計測を許可することで、同様の計測を行うことができる。   In this case, as in FIG. 4C, the measurement by the timer 28 is started at the rising edge of the interrupt prohibition signal, and the measurement by the timer 28 is ended at the falling edge of the interrupt prohibition signal. By permitting the measurement of the timer 28 during the active period, the same measurement can be performed.

以上のように本実施例によれば、マイコン1のデバッグ回路部6に、ユーザによって指定された条件に応じて、CPU2のプログラム実行期間に発生する2つのイベントの間を時間の計測対象とするタイマ28に対し、計測許可信号を出力する計測許可回路23を備える。そして、タイマ28は、計測許可信号がアクティブとなる期間に計測動作を実行する。これにより、ユーザが指定するイベントや計測許可信号の出力条件に応じて、1つのタイマ28により様々な処理に要する時間を柔軟に計測することができる。したがって、マイコン1にデバッグ回路部6を搭載することによる回路規模の増大を極力抑制できると共に、ユーザプログラムの記述を変更させることを回避できる。   As described above, according to the present embodiment, the debugging circuit unit 6 of the microcomputer 1 sets the time measurement target between two events that occur during the program execution period of the CPU 2 in accordance with the conditions specified by the user. A measurement permission circuit 23 that outputs a measurement permission signal to the timer 28 is provided. The timer 28 performs a measurement operation during a period when the measurement permission signal is active. Thereby, the time required for various processes can be flexibly measured by one timer 28 according to the event specified by the user and the output condition of the measurement permission signal. Therefore, it is possible to suppress an increase in circuit scale as much as possible by installing the debug circuit unit 6 in the microcomputer 1 and to avoid changing the description of the user program.

具体的には、計測許可回路23は、タイマ28による計測動作を許可又は禁止する割込みレベルを設定するための割込みレベル設定レジスタ21と、CPU2が実行している割込み処理のレベルと、割込みレベル設定レジスタ21に設定された割込みレベルとの高低関係を比較判定する比較器22とを備え、計測許可信号として比較器22による判定結果を指定可能に構成した。したがって、2つのイベントが発生した間において、CPU2が実行している割込み処理のレベルが割込みレベル設定レジスタ21に設定されたレベル以上である期間を、タイマ28により計測することができる。   Specifically, the measurement permission circuit 23 includes an interrupt level setting register 21 for setting an interrupt level for permitting or prohibiting the measurement operation by the timer 28, the level of interrupt processing executed by the CPU 2, and an interrupt level setting. A comparator 22 for comparing and determining the level relationship with the interrupt level set in the register 21 is provided, and a determination result by the comparator 22 can be specified as a measurement permission signal. Therefore, during the occurrence of two events, the timer 28 can measure the period during which the level of interrupt processing executed by the CPU 2 is equal to or higher than the level set in the interrupt level setting register 21.

また、比較器34,35は、開始アドレス設定レジスタ32及び終了アドレス設定レジスタ33とCPU2のプログラムカウンタの値とを比較する。そして、デバッグ回路部6は、比較器34,35による比較結果をイベントとするので、例えば特定の処理を行うための関数処理プログラムの開始アドレスと終了アドレスとをそれぞれ対応するレジスタ32,33に設定しておくことで、タイマ28により関数処理プログラムの実行時間を計測することができる。   The comparators 34 and 35 compare the start address setting register 32 and the end address setting register 33 with the value of the program counter of the CPU 2. Since the debug circuit unit 6 uses the comparison result of the comparators 34 and 35 as an event, for example, the start address and end address of the function processing program for performing a specific process are set in the corresponding registers 32 and 33, respectively. By doing so, the execution time of the function processing program can be measured by the timer 28.

したがって、CPU2が関数処理を実行している途中に割込みが発生した場合であっても、計測許可設定レジスタ27における設定に応じて、関数処理の実行時間又は割込み処理の実行時間の何れかだけを共通のタイマに28より計測することが可能になる。これにより、デバッグ回路部6の回路規模を極力増大させること無く、また、デバッグ対象のユーザプログラムに大きな変更を加えることなく、関数処理の実行時間又は割込みの実行時間を計測できる。そして、割込みのレベル(重要度)が複数段階に設定されている場合でも、そのレベルを指定することで実行時間の計測対象を変更できる。   Therefore, even when an interrupt occurs during the execution of the function processing by the CPU 2, only the execution time of the function processing or the execution time of the interrupt processing is determined according to the setting in the measurement permission setting register 27. It becomes possible to measure from 28 to a common timer. As a result, the execution time of the function processing or the execution time of the interrupt can be measured without increasing the circuit scale of the debug circuit unit 6 as much as possible and without making a significant change to the user program to be debugged. Even when the interrupt level (importance) is set in a plurality of stages, the measurement target of the execution time can be changed by designating the level.

その他、計測許可回路23は、計測許可信号として、CPU2が割込み処理中であることを示す割込み処理信号,CPU2が上位レベルの割込み処理中に発生した下位レベルの割込み処理を保留していることを示す割込み保留信号,CPU2に対する割込みが禁止されている期間にアクティブとなる割込み禁止信号を、計測許可/一時停止信号とするように指定可能となっているので、例えば2つのイベントの間においてCPUが割込み処理を実行している期間,若しくは割込み処理を実行していない期間の長さや、割込み保留,割込み禁止の期間の長さ等をタイマ28により計測することができる。   In addition, the measurement permission circuit 23 holds, as the measurement permission signal, an interrupt processing signal indicating that the CPU 2 is in interrupt processing, and that the CPU 2 is holding down the lower level interrupt processing generated during the upper level interrupt processing. The interrupt hold signal shown, and the interrupt disable signal that is active during the period when the interrupt to the CPU 2 is prohibited can be designated to be a measurement enable / pause signal. The timer 28 can measure the length of the period during which the interrupt processing is executed or the period during which the interrupt processing is not executed, the length of the interrupt suspension / interrupt disable period, and the like.

また、デバッグ回路部6は、割込み処理信号のレベルが変化するエッジ,割込みレベルを判定する比較器22により出力される比較信号(判定信号)のエッジ,割込み保留信号のレベルが変化するエッジや割込み禁止信号のレベルが変化するエッジを、セレクタ29,30によりイベントとして指定可能となっている。したがって、割込み処理が保留されていた時間や、割込み処理が禁止されていた時間等をタイマ28により計測できる。   The debug circuit unit 6 also includes an edge at which the level of the interrupt processing signal changes, an edge of the comparison signal (determination signal) output from the comparator 22 that determines the interrupt level, an edge at which the level of the interrupt pending signal changes, and an interrupt. An edge at which the level of the inhibition signal changes can be designated as an event by the selectors 29 and 30. Therefore, the timer 28 can measure the time when the interrupt processing is suspended, the time when the interrupt processing is prohibited, and the like.

(第2実施例)
図5及び図6は第2実施例であり、第1実施例と同一部分には同一符号を付して説明を省略し、以下異なる部分について説明する。図5は図2の一部相当図であり、セレクタ29の出力信号について立上りエッジを検出する立上りエッジ検出部41と、この立上りエッジ検出部41の出力信号の出力回数をカウントする計測回数カウンタ42とを備える。立上りエッジ検出部41は、セレクタ29の出力信号の立ち上がりエッジを検出する毎に、ワンショットのパルス信号を出力する。
(Second embodiment)
5 and 6 show a second embodiment. The same parts as those in the first embodiment are denoted by the same reference numerals and the description thereof will be omitted. Hereinafter, different parts will be described. FIG. 5 is a partial equivalent diagram of FIG. 2, and a rising edge detector 41 that detects a rising edge of the output signal of the selector 29, and a measurement number counter 42 that counts the number of outputs of the output signal of the rising edge detector 41. With. The rising edge detector 41 outputs a one-shot pulse signal each time a rising edge of the output signal of the selector 29 is detected.

図6は、各レジスタの設定を、第1実施例の図4(a)のケースと同様に行った場合の計測状態を示すタイミングチャートである。第2実施例の場合、関数処理の実行が開始され、CPU2のプログラムカウンタの値が開始アドレス0xA00000を示すごとに、タイマ28により計測が行われる。尚、終了アドレス0xB00000に到達しても、タイマ28の計測値はリセットされることなく、計測結果は累積されるようになっている。   FIG. 6 is a timing chart showing the measurement state when each register is set in the same manner as in the case of FIG. 4A of the first embodiment. In the case of the second embodiment, the execution of the function processing is started, and measurement is performed by the timer 28 every time the value of the program counter of the CPU 2 indicates the start address 0xA00000. Even when the end address 0xB00000 is reached, the measurement value of the timer 28 is not reset and the measurement result is accumulated.

そして、計測回数カウンタ42には、タイマ28による計測の開始が何回行われたかが格納されている。したがって、ユーザプログラムを所定の期間実行させた後にブレークをかけて、モニタプログラムによりタイマ28の計測値と計測回数カウンタ42のカウント値とを参照して前者の値を後者の値で除すことで、関数処理の平均実行時間を得ることができる。   The measurement number counter 42 stores how many times the timer 28 has started measurement. Therefore, a break is made after the user program is executed for a predetermined period, and the former value is divided by the latter value by referring to the measured value of the timer 28 and the counted value of the measured number counter 42 by the monitor program. The average execution time of function processing can be obtained.

以上のように第2実施例によれば、タイマ28による時間計測の実行回数をカウントするための計測回数カウンタ42を備え、タイマ28に、関数処理が複数回連続して実行された期間を継続して計測させるようにした。したがって、ある時点でのタイマ28の計測値を上記実行回数で除算すれば、関数処理の平均実行時間を得ることができる。   As described above, according to the second embodiment, the measurement number counter 42 for counting the number of execution times of the time measurement by the timer 28 is provided, and the timer 28 continues the period in which the function processing is continuously executed a plurality of times. To measure. Therefore, if the measured value of the timer 28 at a certain point is divided by the number of executions, the average execution time of the function processing can be obtained.

(第3実施例)
図7及び図8は第3実施例であり、第1実施例と異なる部分について説明する。図7は図2の一部相当図であり、立上りエッジ検出部43は、セレクタ26の出力信号の立上がりエッジを検出するとワンショットパルスを検出信号として出力するもので、その検出信号は、タイマ28にリセット信号として出力されている。また、タイマ28の計測データは、比較器44とセレクタ45とに与えられている。セレクタ45の出力側には、最大値保持レジスタ46が接続されており、最大値保持レジスタ46のレジスタ値も、比較器44とセレクタ45とに与えられている。すなわち、比較器44は、タイマ28の計測データ値と最大値保持レジスタ46のレジスタ値とを比較し、前者の値が後者の値よりも大である場合は、セレクタ45にタイマ28の計測データ値を選択させて、最大値保持レジスタ46に書き込ませる。
(Third embodiment)
FIGS. 7 and 8 show a third embodiment, and the differences from the first embodiment will be described. FIG. 7 is a partial equivalent diagram of FIG. 2. When the rising edge detector 43 detects the rising edge of the output signal of the selector 26, it outputs a one-shot pulse as a detection signal. Is output as a reset signal. The measurement data of the timer 28 is given to the comparator 44 and the selector 45. A maximum value holding register 46 is connected to the output side of the selector 45, and the register value of the maximum value holding register 46 is also given to the comparator 44 and the selector 45. That is, the comparator 44 compares the measured data value of the timer 28 with the register value of the maximum value holding register 46, and if the former value is larger than the latter value, the selector 45 sends the measured data of the timer 28 to the selector 45. A value is selected and written to the maximum value holding register 46.

次に、第3実施例の作用について図8を参照して説明する。図8は、各レジスタの設定を図4(b)のケースと同様にして計測を行った場合であり、割込みレベルが「2」以上の場合にタイマ28による計測動作が許可される。これは、レベル「2」以下の割込みが、新たに割込みを発生させることができない時間(不感帯)に相当する。そして、タイマ28は、レベル「2」以上の割込みが発生する毎にリセットされる。図8に示すケースでは、タイマ28による計測データの最大値「5」が最大値保持レジスタ46に保持されている。   Next, the operation of the third embodiment will be described with reference to FIG. FIG. 8 shows a case where each register setting is measured in the same manner as in the case of FIG. 4B. When the interrupt level is “2” or higher, the measurement operation by the timer 28 is permitted. This corresponds to a time (dead zone) in which an interrupt of level “2” or lower cannot newly generate an interrupt. The timer 28 is reset every time an interrupt of level “2” or higher occurs. In the case shown in FIG. 8, the maximum value “5” of the measurement data by the timer 28 is held in the maximum value holding register 46.

以上のように第3実施例によれば、セレクタ26が計測許可信号を出力するとタイマ28により計測を行わせる場合に、タイマ28が計測した実行時間のデータを最大値保持レジスタ46に保持させる。そして、計測許可信号がアクティブになる毎にタイマ28をリセットさせるようにし、比較器44は、最大値保持レジスタ46に保持されている過去のデータ値よりもタイマ28が計測した今回のデータ値が大きい場合には、当該データ値を最大値保持レジスタ46に格納して更新するようにした。したがって、所定レベルの割込みが、新たに割込みを発生させることができない不感帯に相当する時間の最大値を計測することができる。   As described above, according to the third embodiment, when the timer 26 performs measurement when the selector 26 outputs the measurement permission signal, the execution time data measured by the timer 28 is held in the maximum value holding register 46. The timer 28 is reset every time the measurement permission signal becomes active, and the comparator 44 determines that the current data value measured by the timer 28 is higher than the past data value held in the maximum value holding register 46. When the value is larger, the data value is stored in the maximum value holding register 46 and updated. Therefore, it is possible to measure the maximum value of the time corresponding to the dead zone in which a predetermined level of interrupt cannot newly generate an interrupt.

(第4実施例)
図9ないし図12は第4実施例である。第2実施例では、関数処理の平均実行時間を得るための構成を、第3実施例では、不感帯に相当する時間の最大値を計測するための構成をそれぞれ個別に示したが、第4実施例は、これらを共通の構成により実現可能にすると共に、割り込みが発生する間隔の最小時間も測定可能となる構成例を示す。図9は、図5又は図7相当図であり、セレクタ29及び30の出力端子には、それぞれ立上りエッジ検出部51及び52が配置されている。立上りエッジ検出部51の出力信号は、計測回数カウンタ53に与えられて出力回数がカウントされると共に、タイマ28にリセット信号として与えられている。また、立上りエッジ検出部52の出力信号は、最大値保持レジスタ46にセレクタ45(最大値更新手段)より出力されるデータの保持タイミング信号として与えられている。
(Fourth embodiment)
9 to 12 show a fourth embodiment. In the second embodiment, the configuration for obtaining the average execution time of the function processing is individually shown, and in the third embodiment, the configuration for measuring the maximum value of the time corresponding to the dead zone is individually shown. The example shows a configuration example in which these can be realized by a common configuration and the minimum time of an interval at which an interrupt occurs can be measured. FIG. 9 corresponds to FIG. 5 or FIG. 7, and rising edge detectors 51 and 52 are arranged at the output terminals of the selectors 29 and 30, respectively. The output signal of the rising edge detection unit 51 is given to the measurement number counter 53 to count the number of outputs, and is given to the timer 28 as a reset signal. The output signal of the rising edge detection unit 52 is given to the maximum value holding register 46 as a holding timing signal for data output from the selector 45 (maximum value updating means).

また、比較器54,セレクタ55及び最小値保持レジスタ56は、比較器44(最大値更新手段),セレクタ45及び最大値保持レジスタ46と同様の接続関係によって接続されている。そして、比較器54(最小値更新手段)は、タイマ28のタイマ値と最小値保持レジスタ56に保持されているデータ値とを比較し、値が小さい方を選択して最小値保持レジスタ56に出力させるようにセレクタ55(最小値更新手段)に選択切り替え信号を出力する。   The comparator 54, the selector 55, and the minimum value holding register 56 are connected by the same connection relationship as the comparator 44 (maximum value updating means), the selector 45, and the maximum value holding register 46. Then, the comparator 54 (minimum value updating means) compares the timer value of the timer 28 with the data value held in the minimum value holding register 56, selects the smaller value, and enters the minimum value holding register 56. A selection switching signal is output to the selector 55 (minimum value updating means) so as to be output.

更に、加算器57及び累積値保持レジスタ58が設けられており、加算器57の入力端子には、タイマ28のタイマ値と、累積値保持レジスタ58に保持されているレジスタ値とが与えられている。加算器57は、双方の入力端子に与えられているデータ値の加算結果を累積値保持レジスタ58に出力する。そして、立上りエッジ検出部52の出力信号は、最小値保持レジスタ56及び累積値保持レジスタ58にデータの保持タイミング信号として与えられている。   Further, an adder 57 and a cumulative value holding register 58 are provided, and the timer value of the timer 28 and the register value held in the cumulative value holding register 58 are given to the input terminal of the adder 57. Yes. The adder 57 outputs the addition result of the data values given to both input terminals to the accumulated value holding register 58. The output signal of the rising edge detection unit 52 is given to the minimum value holding register 56 and the cumulative value holding register 58 as a data holding timing signal.

次に、第4実施例の作用について図10ないし図12を参照して説明する。図10は、第3実施例と同様に、レベル「2」以下の割込みが、新たに割込みを発生させることができない時間である不感帯の最大時間を取得する場合のタイミングチャートである。この場合の各レジスタは、以下のように設定する。
・割込みレベル設定レジスタ21:割込みレベル「1」
・計測許可条件選択レジスタ25:比較器22
・計測許可選択レジスタ27 :「1」
・開始アドレスレジスタ32 :任意
・終了アドレスレジスタ33 :任意
・計測開始条件選択レジスタ36:比較器22の立上がりエッジ
・計測終了条件選択レジスタ37:比較器22の立下がりエッジ
Next, the operation of the fourth embodiment will be described with reference to FIGS. FIG. 10 is a timing chart when the maximum time of the dead zone, which is a time during which an interrupt of level “2” or lower cannot newly generate an interrupt, is obtained as in the third embodiment. Each register in this case is set as follows.
Interrupt level setting register 21: Interrupt level “1”
Measurement permission condition selection register 25: comparator 22
Measurement permission selection register 27: “1”
Start address register 32: Arbitrary End address register 33: Arbitrary Measurement start condition selection register 36: rising edge of comparator 22 Measurement end condition selection register 37: falling edge of comparator 22

以上のように設定することで、タイマ28はレベル「2」以上の割込みを処理する期間を計測し、比較器22の立下がりエッジが検出されると、セレクタ30及び立上りエッジ検出部52を介して最大値保持レジスタ46に保持タイミング信号が出力される。これにより、その時点でタイマ28により計測されているタイマ値と、最大値保持レジスタ46に保持されているデータ値とでより大きい方が最大値保持レジスタ46に保持される。そして、次に比較器22の立上がりエッジが検出されると、セレクタ29及び立上りエッジ検出部51を介してタイマ28にリセット信号が出力される。図10に示す例では、最大値保持レジスタ46に保持される最大値は、「0」→「3」→「5」と変化している。   By setting as described above, the timer 28 measures the period during which an interrupt of level “2” or higher is processed. When the falling edge of the comparator 22 is detected, the timer 28 passes through the selector 30 and the rising edge detection unit 52. The holding timing signal is output to the maximum value holding register 46. As a result, the larger of the timer value measured by the timer 28 at that time and the data value held in the maximum value holding register 46 is held in the maximum value holding register 46. Next, when the rising edge of the comparator 22 is detected, a reset signal is output to the timer 28 via the selector 29 and the rising edge detector 51. In the example shown in FIG. 10, the maximum value held in the maximum value holding register 46 changes from “0” → “3” → “5”.

図11は、第2実施例と同様に、関数処理時間の平均値を取得する場合のタイミングチャートである。この場合の各レジスタは、以下のように設定する。
・割込みレベル設定レジスタ21:割込みレベル「0」
・計測許可条件選択レジスタ25:比較器22
・計測許可選択レジスタ27 :「0」
・開始アドレスレジスタ32 :0xA00000
・終了アドレスレジスタ33 :0xB00000
・計測開始条件選択レジスタ36:比較器34
・計測終了条件選択レジスタ37:比較器35
FIG. 11 is a timing chart in the case of obtaining the average value of the function processing time as in the second embodiment. Each register in this case is set as follows.
Interrupt level setting register 21: Interrupt level “0”
Measurement permission condition selection register 25: comparator 22
Measurement permission selection register 27: “0”
Start address register 32: 0xA00000
End address register 33: 0xB00000
Measurement start condition selection register 36: comparator 34
Measurement end condition selection register 37: comparator 35

以上のように設定することで、関数処理の実行が開始されてCPU2のプログラムカウンタの値が開始アドレス0xA00000を示す毎に、タイマ28がリセットされてから計測が開始される。そして、終了アドレス0xB00000に到達すると、タイマ28の計測値は加算器57を介して累積値保持レジスタ58に累積的に保持される。また、計測回数カウンタ53には、タイマ28による計測の開始が何回行われたかが格納されるので、ユーザプログラムを所定の期間実行させた後にブレークをかけて、モニタプログラムにより累積値保持レジスタ58に格納されている値と計測回数カウンタ53のカウント値とを参照して前者の値を後者の値で除すことで関数処理の平均実行時間が得られる。図11に示す例では、累積値保持レジスタ58に保持される累積値は「0」→「5」→「9」と変化し、計測回数カウンタ53のカウント値は「0」→「1」→「2」と変化している。   By setting as described above, every time the execution of the function process is started and the value of the program counter of the CPU 2 indicates the start address 0xA00000, the measurement is started after the timer 28 is reset. When the end address 0xB00000 is reached, the measured value of the timer 28 is cumulatively held in the cumulative value holding register 58 via the adder 57. In addition, since the measurement number counter 53 stores how many times the measurement by the timer 28 has been started, the user program is executed for a predetermined period, and then a break is applied to the accumulated value holding register 58 by the monitor program. By referring to the stored value and the count value of the measurement number counter 53 and dividing the former value by the latter value, the average execution time of the function processing can be obtained. In the example shown in FIG. 11, the cumulative value held in the cumulative value holding register 58 changes from “0” → “5” → “9”, and the count value of the measurement number counter 53 is “0” → “1” → It has changed to “2”.

また、図12は、レベル「2」の割込み発生間隔の最小時間を取得する場合のタイミングチャートである。この場合の各レジスタは、以下のように設定する。
・割込みレベル設定レジスタ21:割込みレベル「0」
・計測許可条件選択レジスタ25:比較器22
・計測許可選択レジスタ27 :「0」
・開始アドレスレジスタ32 :0xD00000
・終了アドレスレジスタ33 :0xC00000
・計測開始条件選択レジスタ36:比較器34
・計測終了条件選択レジスタ37:比較器35
ここで、アドレス0xC00000は、レベル「2」以上の割込みを処理するサブルーチンの開始アドレスであり、アドレス0xD00000は前記サブルーチンの終了アドレスである。
FIG. 12 is a timing chart in the case where the minimum time of interrupt generation intervals of level “2” is acquired. Each register in this case is set as follows.
Interrupt level setting register 21: Interrupt level “0”
Measurement permission condition selection register 25: comparator 22
Measurement permission selection register 27: “0”
Start address register 32: 0xD00000
End address register 33: 0xC00000
Measurement start condition selection register 36: comparator 34
Measurement end condition selection register 37: comparator 35
Here, address 0xC00000 is the start address of a subroutine that processes interrupts of level “2” or higher, and address 0xD00000 is the end address of the subroutine.

以上のように設定することで、タイマ28はプログラムカウンタの値が終了アドレス0xD00000に到達するとリセットされて計測を開始し、開始アドレス0xC00000に到達すると計測を終了する。そして、その時点のタイマ値と、最小値保持レジスタ56に保持されているデータ値とでより小さい方が最小値保持レジスタ56に保持される。図12に示す例では、最小値保持レジスタ56に保持される最小値は、「F」→「7」→「5」と変化している。   By setting as described above, the timer 28 is reset when the value of the program counter reaches the end address 0xD00000, and starts measurement, and when it reaches the start address 0xC00000, the measurement ends. The smaller one of the timer value at that time and the data value held in the minimum value holding register 56 is held in the minimum value holding register 56. In the example shown in FIG. 12, the minimum value held in the minimum value holding register 56 changes from “F” → “7” → “5”.

以上のように第4実施例によれば、最大値保持レジスタ46に、タイマ28による計測結果の最大値を保持するようにし、比較器44は、タイマ28による計測動作が終了すると、その時点の計測結果と最大値保持レジスタ46に保持されている最大値とを比較して、前者の値が大きければセレクタ45を介して計測結果を最大値保持レジスタ46に書き込んで更新する。したがって、最大値保持レジスタ46にアクセスすれば、タイマ28による計測結果の最大値を得ることができる。   As described above, according to the fourth embodiment, the maximum value of the measurement result by the timer 28 is held in the maximum value holding register 46. When the measurement operation by the timer 28 ends, the comparator 44 The measurement result is compared with the maximum value held in the maximum value holding register 46, and if the former value is large, the measurement result is written into the maximum value holding register 46 via the selector 45 and updated. Therefore, if the maximum value holding register 46 is accessed, the maximum value of the measurement result by the timer 28 can be obtained.

また、最小値保持レジスタ56に、タイマ28による計測結果の最小値を保持するようにし、比較器54は、タイマ28による計測動作が終了すると、その時点の計測結果と最小値保持レジスタ56に保持されている最小値とを比較して、前者の値が小さければセレクタ55を介して計測結果を最小値保持レジスタ56に書き込んで更新する。したがって、最小値保持レジスタ56にアクセスすれば、タイマ28による計測結果の最小値を得ることができる。   Further, the minimum value holding register 56 holds the minimum value of the measurement result by the timer 28, and the comparator 54 holds the measurement result at that time and the minimum value holding register 56 when the measurement operation by the timer 28 is completed. When the former value is small, the measurement result is written into the minimum value holding register 56 via the selector 55 and updated. Therefore, if the minimum value holding register 56 is accessed, the minimum value of the measurement result by the timer 28 can be obtained.

更に、計測回数カウンタ53は、タイマ28による計測動作の実行回数をカウントし、累積値保持レジスタ58に、タイマ28による計測動作の終了時に、加算器57により計測結果を累積して保持するようにした。したがって、累積値保持レジスタ58に保持されている累積値を計測回数カウンタ58のカウント値で除すことにより、タイマ28による計測結果の平均値を得ることが可能となる。   Further, the measurement number counter 53 counts the number of executions of the measurement operation by the timer 28, and accumulates and holds the measurement result by the adder 57 in the accumulated value holding register 58 at the end of the measurement operation by the timer 28. did. Therefore, the average value of the measurement results obtained by the timer 28 can be obtained by dividing the cumulative value held in the cumulative value holding register 58 by the count value of the measurement number counter 58.

(第5実施例)
図13は第5実施例である。第5実施例は、オンチップデバッグ機能を備えているマイクロコンピュータ61が、通常の動作モードからCPU2等に対するクロック信号(CPUクロック)の供給を停止するスリープ又はスタンバイモード(低消費電力モード)に移行可能に構成されているとする。図13は、マイクロコンピュータ61について、クロック信号の供給経路部分のみを概略的に示している。発振回路62は、例えばCR発振回路や水晶発振子を用いた発振回路等で構成されており、周波数が例えばkHzオーダーの基準クロック信号を出力する。
(5th Example)
FIG. 13 shows a fifth embodiment. In the fifth embodiment, the microcomputer 61 having the on-chip debug function shifts from the normal operation mode to the sleep mode or the standby mode (low power consumption mode) in which the supply of the clock signal (CPU clock) to the CPU 2 or the like is stopped. It is assumed that it is configured to be possible. FIG. 13 schematically shows only the clock signal supply path portion of the microcomputer 61. The oscillation circuit 62 is configured by, for example, a CR oscillation circuit, an oscillation circuit using a crystal oscillator, or the like, and outputs a reference clock signal having a frequency of, for example, the order of kHz.

基準クロック信号は、例えばアナログ若しくはデジタルのPLL(Phase Locked Loop)回路である2つの逓倍/分周回路63及び64に入力されている。逓倍/分周回路63及び64は、逓倍/分周率を設定するためのレジスタ(図示せず)に設定された値に応じて、例えば周波数がMHzオーダーの逓倍クロック信号(システムクロック信号)を生成して出力する。そして、逓倍/分周回路63より出力される逓倍クロック信号はCPUクロックとして、CPU2や割り込み制御回路3,周辺回路5等(必要に応じてメモリ4にも)に供給される。一方、逓倍/分周回路64より出力される逓倍クロック信号は、デバッグ回路部6に供給される。   The reference clock signal is input to two multiplier / divider circuits 63 and 64, which are analog or digital PLL (Phase Locked Loop) circuits, for example. The multiplier / divider circuits 63 and 64 generate, for example, a multiplied clock signal (system clock signal) whose frequency is in the order of MHz in accordance with a value set in a register (not shown) for setting the multiplier / divider ratio. Generate and output. The multiplied clock signal output from the multiplier / divider circuit 63 is supplied as a CPU clock to the CPU 2, the interrupt control circuit 3, the peripheral circuit 5, etc. (also to the memory 4 as necessary). On the other hand, the multiplied clock signal output from the multiplier / divider circuit 64 is supplied to the debug circuit unit 6.

また、逓倍/分周回路63は、マイクロコンピュータ61を低消費電力モードに設定するための信号(低消費電力モード信号)がアクティブになると発振動作を停止する。低消費電力モード信号は、例えば予め定められている所定の移行周期毎にCPU2により出力され、低消費電力モードの移行期間を計時するタイマにより前記期間が計時されるとインアクティブとなる。また、低消費電力モード信号は、ANDゲート65の一方の入力端子にも与えられている。そして、デバッグ回路部6の機能を有効にするための信号(デバッグ機能有効信号)は、NOTゲート66を介して逓倍/分周回路64に停止制御信号として与えられている共に、ANDゲート65の他方の入力端子に与えられており、ANDゲート65の出力信号は発振回路62に停止制御信号として与えられている。   The multiplier / divider circuit 63 stops the oscillation operation when a signal for setting the microcomputer 61 to the low power consumption mode (low power consumption mode signal) becomes active. The low power consumption mode signal is output, for example, by the CPU 2 every predetermined transition period set in advance, and becomes inactive when the period is counted by a timer that counts the transition period of the low power consumption mode. The low power consumption mode signal is also given to one input terminal of the AND gate 65. A signal for enabling the function of the debug circuit section 6 (debug function enable signal) is given as a stop control signal to the multiplication / frequency division circuit 64 via the NOT gate 66, and the AND gate 65 The output signal of the AND gate 65 is given to the other input terminal, and is given to the oscillation circuit 62 as a stop control signal.

以上の構成により、低消費電力モード信号及びデバッグ機能有効信号それぞれの状態に応じて、発振回路62,逓倍/分周回路63及び64がそれぞれ動作を停止する条件は以下のようになる。尚、○はアクティブ,×はインアクティブを示す。
低消費電力モード信号 デバッグ機能有効信号
発振回路62 ○ ×
逓倍/分周回路63 ○ −
逓倍/分周回路64 − ×
With the above configuration, the conditions under which the oscillation circuit 62 and the multiplier / divider circuits 63 and 64 stop operating according to the states of the low power consumption mode signal and the debug function enable signal are as follows. In addition, (circle) shows active and x shows inactive.
Low power consumption mode signal Debug function enable signal
Oscillation circuit 62 ○ ×
Multiplier / divider circuit 63 ○ −
Multiplication / frequency division circuit 64-×

したがって、発振回路62は、マイクロコンピュータ61が低消費電力モードに移行しても、デバッグ機能有効信号がアクティブとなりデバッグ回路部6が動作する期間は基準クロック信号を出力するが、逓倍/分周回路63が停止するのでCPUクロックは出力されない。一方、逓倍/分周回路64は、デバッグ機能有効信号がアクティブであれば動作するので、逓倍クロック信号がデバッグ回路部6に供給される。そして、デバッグ機能有効信号がインアクティブになると逓倍/分周回路64の動作は停止する。   Therefore, the oscillation circuit 62 outputs the reference clock signal during the period when the debug function valid signal becomes active and the debug circuit unit 6 operates even when the microcomputer 61 shifts to the low power consumption mode. Since 63 stops, the CPU clock is not output. On the other hand, the multiplier / divider circuit 64 operates when the debug function enable signal is active, so that the multiplied clock signal is supplied to the debug circuit unit 6. Then, when the debug function enable signal becomes inactive, the operation of the multiplier / divider circuit 64 stops.

以上のように第5実施例によれば、マイクロコンピュータ61が、CPU2等に対する逓倍クロック信号の供給を停止することで低消費電力モードに移行可能に構成されル場合に、デバッグ回路部6の機能を有効化させた状態では、低消費電力モードに移行している期間においてもオンチップデバッグ回路部6に逓倍クロック信号を供給する。したがって、低消費電力モードに移行している期間においても、デバッグ回路部6により、例えば上記期間の長さを計測することが可能となる。また、第2,第3実施例ではそれぞれ個別の構成を採用することで実行した計測を、第5実施例では共通の構成によって実現できるので、汎用性を向上させて回路規模の増大を抑制できる。   As described above, according to the fifth embodiment, when the microcomputer 61 is configured to be able to shift to the low power consumption mode by stopping the supply of the multiplied clock signal to the CPU 2 or the like, the function of the debug circuit unit 6 In the state in which is activated, the multiplied clock signal is supplied to the on-chip debug circuit section 6 even during the period of shifting to the low power consumption mode. Therefore, even during the period of shifting to the low power consumption mode, the debug circuit unit 6 can measure the length of the period, for example. In addition, since the measurement executed by adopting the individual configurations in the second and third embodiments can be realized by the common configuration in the fifth embodiment, the versatility can be improved and the increase in circuit scale can be suppressed. .

本発明は上記し又は図面に記載した実施例にのみ限定されるものではなく、以下のような変形又は拡張が可能である。
図2に示す構成は、個別の設計に応じて、計測に必要である信号を適宜選択すれば良く、必ずしも図2と同様に構成する必要はない。
比較器22は、B<Aとなった場合にアクティブとなる信号を出力するようにしても良く、その場合は、セレクタ26における「1,0」の選択を逆にすれば良い。
第2〜第4実施例を、その他の処理の計測、例えば割込み処理時間や割込み保留時間,割込み禁止時間の計測などに適用しても良い。
第4実施例において、加算器57及び累積値保持レジスタ58をアキュムレータにより構成しても良い。
第5実施例を、その他の実施例と適宜組み合わせて実行しても良い。
The present invention is not limited to the embodiments described above or shown in the drawings, and the following modifications or expansions are possible.
The configuration shown in FIG. 2 may be appropriately selected from signals necessary for measurement according to individual design, and is not necessarily configured similarly to FIG.
The comparator 22 may output an active signal when B <A. In that case, the selection of “1, 0” in the selector 26 may be reversed.
The second to fourth embodiments may be applied to measurement of other processes, such as measurement of interrupt processing time, interrupt hold time, and interrupt prohibition time.
In the fourth embodiment, the adder 57 and the accumulated value holding register 58 may be constituted by an accumulator.
The fifth embodiment may be executed in combination with other embodiments as appropriate.

図面中、1はマイクロコンピュータ、2はCPU、3は割込み制御回路(割込み処理信号出力手段,割込み保留信号出力手段,割込み禁止信号出力手段)、6はデバッグ回路部(オンチップデバッグ回路部)、22は比較器(判定手段)、23は計測許可回路(計測許可信号出力手段)、28はタイマ、31は立上り/立下りエッジ検出部(エッジ検出手段)、32は開始アドレス設定レジスタ、33は終了アドレス設定レジスタ、34及び35は比較器(比較手段)、44は比較器(最大値更新手段)、45はセレクタ(最大値更新手段)、46は最大値保持レジスタ、53は計測回数カウンタ、54は比較器(最小値更新手段)、55はセレクタ(最小値更新手段)、56は最小値保持レジスタ、57は加算器、58は累積値保持レジスタ、61はマイクロコンピュータを示す。   In the drawings, 1 is a microcomputer, 2 is a CPU, 3 is an interrupt control circuit (interrupt processing signal output means, interrupt hold signal output means, interrupt inhibition signal output means), 6 is a debug circuit section (on-chip debug circuit section), 22 is a comparator (determination unit), 23 is a measurement permission circuit (measurement permission signal output unit), 28 is a timer, 31 is a rising / falling edge detection unit (edge detection unit), 32 is a start address setting register, and 33 is End address setting register, 34 and 35 are comparators (comparison means), 44 is a comparator (maximum value update means), 45 is a selector (maximum value update means), 46 is a maximum value holding register, 53 is a counter for the number of times of measurement, 54 is a comparator (minimum value updating means), 55 is a selector (minimum value updating means), 56 is a minimum value holding register, 57 is an adder, and 58 is a cumulative value holding register. , 61 denotes a micro-computer.

Claims (14)

デバッグ機能を有するオンチップデバッグ回路部を備えてなるマイクロコンピュータにおいて、
前記オンチップデバッグ回路部に、
ユーザによって指定され、CPUがプログラムを実行している期間に発生する2つのイベントの間を、時間の計測対象とするタイマと、
ユーザによって指定された条件に応じて、前記タイマによる計測動作を許可する計測許可信号を出力する計測許可信号出力手段とを備え、
前記タイマは、前記計測許可信号がアクティブとなる期間に計測動作を実行するように構成されていることを特徴とするマイクロコンピュータ。
In a microcomputer provided with an on-chip debug circuit unit having a debugging function,
In the on-chip debug circuit section,
A timer that is designated by the user and that measures the time between two events that occur during the period in which the CPU is executing the program;
A measurement permission signal output means for outputting a measurement permission signal for allowing a measurement operation by the timer according to a condition designated by a user,
The microcomputer is configured to perform a measurement operation during a period in which the measurement permission signal is active.
前記CPUが割込み処理中であることを示す割込み処理信号を出力する割込み処理信号出力手段を備え、
前記計測許可信号出力手段は、前記計測許可信号として、前記割込み処理信号を指定可能であることを特徴とする請求項1記載のマイクロコンピュータ。
An interrupt processing signal output means for outputting an interrupt processing signal indicating that the CPU is in interrupt processing;
The microcomputer according to claim 1, wherein the measurement permission signal output unit can designate the interrupt processing signal as the measurement permission signal.
前記計測許可信号出力手段は、前記タイマによる計測動作を許可又は禁止する割込みレベルを設定する割込みレベル設定レジスタと、
前記CPUが実行している割込み処理のレベルと、前記割込みレベル設定レジスタに設定された割込みレベルとの高低関係を比較判定し、判定信号を出力する判定手段とを備え、
前記計測許可信号として、前記判定手段による判定結果を指定可能であることを特徴とする請求項1又は2記載のマイクロコンピュータ。
The measurement permission signal output means includes an interrupt level setting register for setting an interrupt level for permitting or prohibiting the measurement operation by the timer,
A determination means for comparing and determining the level relationship between the level of interrupt processing executed by the CPU and the interrupt level set in the interrupt level setting register, and outputting a determination signal;
3. The microcomputer according to claim 1, wherein a determination result by the determination unit can be designated as the measurement permission signal.
前記CPUが、上位レベルの割込み処理中に発生した下位レベルの割込み処理を保留していることを示す割込み保留信号を出力する割込み保留信号出力手段を備え、
前記計測許可信号出力手段は、前記計測許可信号として、前記割込み保留信号を指定可能であることを特徴とする請求項1ないし3の何れかに記載のマイクロコンピュータ。
The CPU comprises an interrupt hold signal output means for outputting an interrupt hold signal indicating that a lower level interrupt process generated during an upper level interrupt process is being held,
4. The microcomputer according to claim 1, wherein the measurement permission signal output means can designate the interrupt hold signal as the measurement permission signal.
前記CPUに対する割込みが禁止されている期間にアクティブとなる割込み禁止信号を出力する割込み禁止信号出力手段を備え、
前記計測許可信号出力手段は、前記計測許可信号として、前記割込み禁止信号を指定可能であることを特徴とする請求項1ないし4の何れかに記載のマイクロコンピュータ。
An interrupt prohibition signal output means for outputting an interrupt prohibition signal which becomes active during a period in which an interrupt to the CPU is prohibited;
5. The microcomputer according to claim 1, wherein the measurement permission signal output means can designate the interrupt prohibition signal as the measurement permission signal.
計測開始アドレスが設定される開始アドレス設定レジスタと、
計測終了アドレスが設定される終了アドレス設定レジスタと、
前記開始アドレス設定レジスタ及び前記終了アドレス設定レジスタと前記CPUのプログラムカウンタの値とを比較する比較手段とを備え、
前記オンチップデバッグ回路部は、前記比較手段による比較結果を前記イベントとすることを特徴とする請求項1ないし5の何れかに記載のマイクロコンピュータ。
A start address setting register in which a measurement start address is set;
An end address setting register in which a measurement end address is set;
Comparing means for comparing the start address setting register and the end address setting register with the value of the program counter of the CPU,
6. The microcomputer according to claim 1, wherein the on-chip debug circuit unit sets the comparison result obtained by the comparison unit as the event.
前記CPUが割込み処理中であることを示す割込み処理信号を出力する割込み処理信号出力手段と、
前記割込み処理信号のレベルが変化するエッジを検出するエッジ検出手段とを備え、
前記オンチップデバッグ回路部は、前記エッジを前記イベントとして指定可能であることを特徴とする請求項1ないし6の何れかに記載のマイクロコンピュータ。
An interrupt processing signal output means for outputting an interrupt processing signal indicating that the CPU is in interrupt processing;
Edge detecting means for detecting an edge where the level of the interrupt processing signal changes,
The microcomputer according to claim 1, wherein the on-chip debug circuit unit can designate the edge as the event.
前記計測許可信号出力手段は、前記タイマによる計測動作を許可又は禁止する割込みレベルを設定する割込みレベル設定レジスタと、
前記CPUが実行している処理が、前記割込みレベル設定レジスタに設定された割込みレベル以上か、若しくは前記割込みレベル未満かを判定し、判定信号を出力する判定手段と、
前記判定信号のレベルが変化するエッジを検出するエッジ検出手段とを備え、
前記オンチップデバッグ回路部は、前記エッジを前記イベントとして指定可能であることを特徴とする請求項1ないし7の何れかに記載のマイクロコンピュータ。
The measurement permission signal output means includes an interrupt level setting register for setting an interrupt level for permitting or prohibiting the measurement operation by the timer,
A determination means for determining whether the process being executed by the CPU is equal to or higher than the interrupt level set in the interrupt level setting register or less than the interrupt level, and outputting a determination signal;
Edge detecting means for detecting an edge where the level of the determination signal changes,
The microcomputer according to claim 1, wherein the on-chip debug circuit unit can designate the edge as the event.
上位レベルの割込み処理中に発生した下位レベルの割込み処理を保留していることを示す割込み保留信号を出力する割込み保留信号出力手段と、
前記割込み保留信号のレベルが変化するエッジを検出するエッジ検出手段とを備え、
前記オンチップデバッグ回路部は、前記エッジを前記イベントとして指定可能であることを特徴とする請求項1ないし8の何れかに記載のマイクロコンピュータ。
An interrupt hold signal output means for outputting an interrupt hold signal indicating that a lower level interrupt process generated during an upper level interrupt process is held;
Edge detecting means for detecting an edge where the level of the interrupt pending signal changes,
9. The microcomputer according to claim 1, wherein the on-chip debug circuit unit can designate the edge as the event.
前記CPUに対する割込みが禁止されている期間にアクティブとなる割込み禁止信号を出力する割込み禁止信号出力手段と、
前記割込み禁止信号のレベルが変化するエッジを検出するエッジ検出手段とを備え、
前記オンチップデバッグ回路部は、前記エッジを前記イベントとして指定可能であることを特徴とする請求項1ないし9の何れかに記載のマイクロコンピュータ。
An interrupt prohibition signal output means for outputting an interrupt prohibition signal that is active during a period in which an interrupt to the CPU is prohibited;
Edge detecting means for detecting an edge where the level of the interrupt prohibition signal changes,
The microcomputer according to any one of claims 1 to 9, wherein the on-chip debug circuit unit can designate the edge as the event.
前記タイマによる計測結果の最大値を保持する最大値レジスタと、
前記タイマによる計測動作が終了すると、その時点の計測結果と前記最大値レジスタに保持されている最大値とを比較して、前者の値が大きければ前記計測結果を前記最大値レジスタに書き込んで更新する最大値更新手段とを備えたことを特徴とする請求項1ないし10の何れかに記載のマイクロコンピュータ。
A maximum value register for holding the maximum value of the measurement result by the timer;
When the measurement operation by the timer is completed, the measurement result at that time is compared with the maximum value held in the maximum value register, and if the former value is large, the measurement result is written to the maximum value register and updated. The microcomputer according to claim 1, further comprising a maximum value updating unit configured to update the microcomputer.
前記タイマによる計測結果の最小値を保持する最小値レジスタと、
前記タイマによる計測動作が終了すると、その時点の計測結果と前記最小値レジスタに保持されている最小値とを比較して、前者の値が小きければ前記計測結果を前記最小値レジスタに書き込んで更新する最小値更新手段とを備えたことを特徴とする請求項1ないし11の何れかに記載のマイクロコンピュータ。
A minimum value register for holding the minimum value of the measurement result by the timer;
When the measurement operation by the timer is completed, the measurement result at that time is compared with the minimum value held in the minimum value register, and if the former value is small, the measurement result is written in the minimum value register. 12. The microcomputer according to claim 1, further comprising a minimum value updating means for updating.
前記タイマによる計測動作の実行回数をカウントする計測回数カウンタと、
前記タイマによる計測動作の終了時に、当該タイマによる計測結果を累積して保持する累積値レジスタとを備えたことを特徴とする請求項1ないし12の何れかに記載のマイクロコンピュータ。
A measurement number counter for counting the number of executions of the measurement operation by the timer;
13. The microcomputer according to claim 1, further comprising a cumulative value register that accumulates and holds measurement results obtained by the timer at the end of the measurement operation by the timer.
システムクロック信号を生成出力するクロック信号出力回路を備え、
前記CPUに対する前記システムクロック信号の供給を停止することで低消費電力モードに移行可能であると共に、
前記オンチップデバッグ回路部の機能を有効化させた状態では、前記低消費電力モードに移行している期間においても、前記オンチップデバッグ回路部に前記システムクロック信号を供給するように構成されていることを特徴とする請求項1ないし13の何れかに記載のマイクロコンピュータ。
A clock signal output circuit for generating and outputting a system clock signal is provided.
It is possible to shift to the low power consumption mode by stopping the supply of the system clock signal to the CPU,
When the function of the on-chip debug circuit unit is enabled, the system clock signal is supplied to the on-chip debug circuit unit even during the transition to the low power consumption mode. The microcomputer according to any one of claims 1 to 13, characterized in that:
JP2011225842A 2010-11-29 2011-10-13 Microcomputer Expired - Fee Related JP5310819B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2011225842A JP5310819B2 (en) 2010-11-29 2011-10-13 Microcomputer
DE102011086991A DE102011086991A1 (en) 2010-11-29 2011-11-24 microcomputer
US13/305,133 US8700956B2 (en) 2010-11-29 2011-11-28 Microcomputer
CN201110386242.5A CN102591758B (en) 2010-11-29 2011-11-29 Microcomputer
GB1120523.4A GB2485913A (en) 2010-11-29 2011-11-29 Measuring time between two events in a data processing system

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2010265014 2010-11-29
JP2010265014 2010-11-29
JP2011225842A JP5310819B2 (en) 2010-11-29 2011-10-13 Microcomputer

Publications (2)

Publication Number Publication Date
JP2012133752A true JP2012133752A (en) 2012-07-12
JP5310819B2 JP5310819B2 (en) 2013-10-09

Family

ID=45508886

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011225842A Expired - Fee Related JP5310819B2 (en) 2010-11-29 2011-10-13 Microcomputer

Country Status (5)

Country Link
US (1) US8700956B2 (en)
JP (1) JP5310819B2 (en)
CN (1) CN102591758B (en)
DE (1) DE102011086991A1 (en)
GB (1) GB2485913A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016126684A (en) * 2015-01-08 2016-07-11 京セラドキュメントソリューションズ株式会社 Integrated circuit

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104995605B (en) 2013-08-07 2018-07-10 富士电机株式会社 Monitoring method and computer installation
US9489287B2 (en) * 2013-08-23 2016-11-08 Atmel Corporation Breaking code execution based on time consumption
JP2018045419A (en) * 2016-09-14 2018-03-22 ルネサスエレクトロニクス株式会社 Debugging system, microcomputer and method therefor

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62239247A (en) * 1986-04-10 1987-10-20 Mitsubishi Electric Corp Electronic computer
JPH0346040A (en) * 1989-07-14 1991-02-27 Hitachi Ltd Hardware monitor
JPH03118644A (en) * 1989-09-29 1991-05-21 Nippondenso Co Ltd Program execution monitor
JPH05298138A (en) * 1992-04-20 1993-11-12 Hitachi Ltd Debugging support circuit and emulator
JPH07281964A (en) * 1994-04-13 1995-10-27 Sekisui Chem Co Ltd Checking device for parallel data
JPH10228386A (en) * 1997-02-13 1998-08-25 Nec Corp Process event latency time measuring system
JPH1115704A (en) * 1997-06-19 1999-01-22 Mitsubishi Electric Corp Emulation control method and emulator
JPH1165897A (en) * 1997-08-19 1999-03-09 Nec Corp Microprocessor with debugger built-in
JP2000148536A (en) * 1998-11-13 2000-05-30 Nec Ic Microcomput Syst Ltd Method and circuit for interruption
JP2000267709A (en) * 1999-03-19 2000-09-29 Nec Eng Ltd Processing time measuring equipment and its method
JP2001519949A (en) * 1997-04-08 2001-10-23 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Microprocessor-based device incorporating a cache for capturing software performance profiling data
JP2001297012A (en) * 2000-04-11 2001-10-26 Hitachi Ltd Processor and emulator
JP2005100017A (en) * 2003-09-24 2005-04-14 Seiko Epson Corp Processor simulator, interruption delay count program and simulation method of processor
JP2006134203A (en) * 2004-11-09 2006-05-25 Hitachi Ltd Distributed control system
JP2006293427A (en) * 2005-04-05 2006-10-26 Renesas Technology Corp Software evaluation device and system

Family Cites Families (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4511961A (en) * 1982-04-16 1985-04-16 Ncr Corporation Apparatus for measuring program execution
US5103394A (en) * 1984-04-30 1992-04-07 Hewlett-Packard Company Software performance analyzer
US4845615A (en) * 1984-04-30 1989-07-04 Hewlett-Packard Company Software performance analyzer
JP2595718B2 (en) 1989-06-15 1997-04-02 横河電機株式会社 In-circuit emulator
JPH0451332A (en) 1990-06-20 1992-02-19 Oki Electric Ind Co Ltd Process/task execution time counting circuit
JPH04349543A (en) 1991-05-28 1992-12-04 Nec Corp Measuring system for program processing time
JPH09305412A (en) * 1996-05-16 1997-11-28 Mitsubishi Electric Corp Microcomputer having maximum interruption inhibition period mesuring function
US5978902A (en) 1997-04-08 1999-11-02 Advanced Micro Devices, Inc. Debug interface including operating system access of a serial/parallel debug port
US6185732B1 (en) 1997-04-08 2001-02-06 Advanced Micro Devices, Inc. Software debug port for a microprocessor
US6167536A (en) 1997-04-08 2000-12-26 Advanced Micro Devices, Inc. Trace cache for a microprocessor-based device
US6154856A (en) * 1997-04-08 2000-11-28 Advanced Micro Devices, Inc. Debug interface including state machines for timing synchronization and communication
US6142683A (en) 1997-04-08 2000-11-07 Advanced Micro Devices, Inc. Debug interface including data steering between a processor, an input/output port, and a trace logic
US6009270A (en) 1997-04-08 1999-12-28 Advanced Micro Devices, Inc. Trace synchronization in a processor
US6041406A (en) 1997-04-08 2000-03-21 Advanced Micro Devices, Inc. Parallel and serial debug port on a processor
US6314530B1 (en) 1997-04-08 2001-11-06 Advanced Micro Devices, Inc. Processor having a trace access instruction to access on-chip trace memory
US6094729A (en) 1997-04-08 2000-07-25 Advanced Micro Devices, Inc. Debug interface including a compact trace record storage
US6148381A (en) 1997-04-08 2000-11-14 Advanced Micro Devices, Inc. Single-port trace buffer architecture with overflow reduction
US6189140B1 (en) 1997-04-08 2001-02-13 Advanced Micro Devices, Inc. Debug interface including logic generating handshake signals between a processor, an input/output port, and a trace logic
JP4298224B2 (en) 2001-06-07 2009-07-15 キヤノン株式会社 Recording apparatus and control method of the apparatus
US7065332B2 (en) * 2002-08-09 2006-06-20 Matsushita Electric Industrial Co., Ltd. Remote control receiving system
US7895382B2 (en) * 2004-01-14 2011-02-22 International Business Machines Corporation Method and apparatus for qualifying collection of performance monitoring events by types of interrupt when interrupt occurs
CN100419709C (en) 2005-09-30 2008-09-17 联想(北京)有限公司 System and method for counting use time
JP2008310748A (en) 2007-06-18 2008-12-25 Honda Motor Co Ltd Task execution time recording device, task execution time recording method, and task execution recording program
JP4383494B1 (en) * 2008-09-11 2009-12-16 Necエレクトロニクス株式会社 Data processing system and debugging method

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62239247A (en) * 1986-04-10 1987-10-20 Mitsubishi Electric Corp Electronic computer
JPH0346040A (en) * 1989-07-14 1991-02-27 Hitachi Ltd Hardware monitor
JPH03118644A (en) * 1989-09-29 1991-05-21 Nippondenso Co Ltd Program execution monitor
JPH05298138A (en) * 1992-04-20 1993-11-12 Hitachi Ltd Debugging support circuit and emulator
JPH07281964A (en) * 1994-04-13 1995-10-27 Sekisui Chem Co Ltd Checking device for parallel data
JPH10228386A (en) * 1997-02-13 1998-08-25 Nec Corp Process event latency time measuring system
JP2001519949A (en) * 1997-04-08 2001-10-23 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Microprocessor-based device incorporating a cache for capturing software performance profiling data
JPH1115704A (en) * 1997-06-19 1999-01-22 Mitsubishi Electric Corp Emulation control method and emulator
JPH1165897A (en) * 1997-08-19 1999-03-09 Nec Corp Microprocessor with debugger built-in
JP2000148536A (en) * 1998-11-13 2000-05-30 Nec Ic Microcomput Syst Ltd Method and circuit for interruption
JP2000267709A (en) * 1999-03-19 2000-09-29 Nec Eng Ltd Processing time measuring equipment and its method
JP2001297012A (en) * 2000-04-11 2001-10-26 Hitachi Ltd Processor and emulator
JP2005100017A (en) * 2003-09-24 2005-04-14 Seiko Epson Corp Processor simulator, interruption delay count program and simulation method of processor
JP2006134203A (en) * 2004-11-09 2006-05-25 Hitachi Ltd Distributed control system
JP2006293427A (en) * 2005-04-05 2006-10-26 Renesas Technology Corp Software evaluation device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016126684A (en) * 2015-01-08 2016-07-11 京セラドキュメントソリューションズ株式会社 Integrated circuit

Also Published As

Publication number Publication date
JP5310819B2 (en) 2013-10-09
GB201120523D0 (en) 2012-01-11
US8700956B2 (en) 2014-04-15
CN102591758B (en) 2015-01-28
GB2485913A (en) 2012-05-30
CN102591758A (en) 2012-07-18
DE102011086991A1 (en) 2012-07-19
US20120137176A1 (en) 2012-05-31

Similar Documents

Publication Publication Date Title
US8937496B1 (en) Clock monitor
US6839654B2 (en) Debug interface for an event timer apparatus
EP2847681B1 (en) Device having configurable breakpoint based on interrupt status
US9157959B2 (en) Semiconductor device
JP5310819B2 (en) Microcomputer
EP2735970B1 (en) Dynamic library profiling method
US9495239B1 (en) User-configurable error handling
US7831818B2 (en) Exception-based timer control
US20040260913A1 (en) Firmware code profiling
US20160103704A1 (en) Data processing device and method of controlling the same
JP2012222192A (en) Semiconductor integrated circuit and malfunction prevention method
US10288496B1 (en) Ring oscillator for temperature or voltage sensing
US9600422B2 (en) Monitoring accesses to memory in a multiprocessor system
CN101403989B (en) Semiconductor integrated circuit
JP5987723B2 (en) Slave for communication
US20130047003A1 (en) Estimating Power Consumption of an Application
US10817395B2 (en) Processor with non-intrusive self-testing
JP4647276B2 (en) Semiconductor circuit device
JP2010092278A (en) Microcomputer
JP4571462B2 (en) Microcomputer
JP4634307B2 (en) Semiconductor device
US20230315544A1 (en) System for generating power profile in low power processor
JP2013105388A (en) Interruption circuit and interruption method
WO2007026405A1 (en) Information processor for measuring operating time
JP2004348568A (en) Debug system device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121225

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130312

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130419

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130604

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130617

R151 Written notification of patent or utility model registration

Ref document number: 5310819

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees