JP2006185365A - Semiconductor device and debugging method - Google Patents
Semiconductor device and debugging method Download PDFInfo
- Publication number
- JP2006185365A JP2006185365A JP2004380888A JP2004380888A JP2006185365A JP 2006185365 A JP2006185365 A JP 2006185365A JP 2004380888 A JP2004380888 A JP 2004380888A JP 2004380888 A JP2004380888 A JP 2004380888A JP 2006185365 A JP2006185365 A JP 2006185365A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- unit
- program
- priority level
- interrupt request
- 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.)
- Withdrawn
Links
- 239000004065 semiconductor Substances 0.000 title claims abstract description 50
- 238000000034 method Methods 0.000 title claims abstract description 19
- 230000004044 response Effects 0.000 claims description 13
- 238000005259 measurement Methods 0.000 claims description 9
- 230000001934 delay Effects 0.000 claims description 5
- 238000011835 investigation Methods 0.000 claims description 2
- 230000005764 inhibitory process Effects 0.000 abstract 1
- 238000012545 processing Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 14
- 230000004913 activation Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000007423 decrease Effects 0.000 description 3
- 230000003111 delayed effect Effects 0.000 description 3
- 238000012552 review Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
この発明は半導体装置に関し、特に割込み遅延の原因を容易に調査できる手段を備えた半導体装置およびデバッグ方法に関する。 The present invention relates to a semiconductor device, and more particularly, to a semiconductor device provided with means for easily investigating the cause of an interrupt delay and a debugging method.
電子計算機の分野では、プログラムの実行とは無関係に生じる例外的な事象に対処するため、割込み要求による制御が行われる。 In the field of electronic computers, control by an interrupt request is performed in order to deal with an exceptional event that occurs regardless of program execution.
プログラムを実行する演算部は、割込み要求が入力されると、プログラムカウンタ値などを一時的に退避させて実行中のプログラムを中断し、割込みプログラムを優先的に実行する。 When an interrupt request is input, the arithmetic unit that executes the program temporarily saves the program counter value and the like, interrupts the program being executed, and executes the interrupt program with priority.
さらに、複数の例外的な事象に対処するため、それぞれ優先レベルが設定された複数の割込み要求が入力できるように構成される。 Further, in order to deal with a plurality of exceptional events, a plurality of interrupt requests each having a priority level set can be input.
たとえば、非特許文献1に開示されているように、同時に複数の割込み要求が入力された場合や先に入力された割込み要求に対応する割込みプログラムが終了しない間に次の割込み要求が入力された場合などには、優先レベルが高い方の割込みプログラムが優先的に実行される。
For example, as disclosed in
ところで、複数のプログラムが共有資源であるメモリやファイルなどを取り合う状態、いわゆるクリティカルセクションにおいては、バグが生じやすい。そこで、他のプログラムの実行を阻止する排他処理が一般的に行われる。そのため、割込みプログラムにおいても、一時的に優先レベルを最大値に設定し、他のすべての割込みプログラムの実行を禁止する割込み禁止処理が常套手段となっている。 By the way, bugs are likely to occur in a so-called critical section where a plurality of programs share a shared resource such as a memory or a file. Therefore, exclusive processing for preventing the execution of other programs is generally performed. For this reason, an interrupt prohibition process that temporarily sets the priority level to the maximum value and prohibits the execution of all other interrupt programs is also a conventional means in the interrupt program.
その結果、先に入力された割込み要求より優先レベルが高い割込み要求が後に入力されたとしても、先に入力された割込み要求に応じて実行される割込みプログラム中で割込み禁止処理が行われると、後に入力された優先レベルが高い割込み要求に応じた割込みプログラムの開始が遅延することになる。このような現象は、「割込み遅延」と称される。したがって、例外的な事象が発生してから実行完了までの時間が制約されるような割込みプログラムの場合には、割込み遅延により処理に支障をきたす。 As a result, even if an interrupt request having a higher priority level than the previously input interrupt request is input later, if interrupt disable processing is performed in the interrupt program executed in response to the interrupt request input earlier, The start of an interrupt program in response to an interrupt request having a high priority level input later is delayed. Such a phenomenon is called “interrupt delay”. Therefore, in the case of an interrupt program in which the time from the occurrence of an exceptional event to the completion of execution is restricted, the processing is hindered due to the interrupt delay.
そのため、割込み遅延の原因となる割込み禁止処理を行っているプログラムを特定し、その内容を修正するデバッグを行う必要が生じる。 Therefore, it is necessary to identify a program that performs interrupt prohibition processing that causes an interrupt delay and to perform debugging to correct the contents.
上述のような割込み遅延の原因となっているプログラムを特定する方法としては、プログラムの全ソースコードレビューによる方法およびインサーキットエミュレーションによる方法がある。 As a method for identifying the program causing the interrupt delay as described above, there are a method by reviewing the entire source code of the program and a method by in-circuit emulation.
プログラムの全ソースコードレビューは、プログラム開発者がソースコードを見直し、割込み禁止処理を行っているプログラムを特定する方法である。 The entire source code review of a program is a method in which a program developer reviews a source code and identifies a program that is executing an interrupt prohibition process.
インサーキットエミュレーションは、演算部に代えて、演算部の動作を再現する装置(インサーキットエミュレータ)を用いて、プログラムを実行させることにより割込み禁止処理を行っているプログラムを特定する方法である。 In-circuit emulation is a method of specifying a program that is performing interrupt prohibition processing by executing a program using an apparatus (in-circuit emulator) that reproduces the operation of the arithmetic unit instead of the arithmetic unit.
特許文献1には、割込み要求の入力に対して割込み処理プログラムが実行されない場合にデバッグ可能なインサーキットエミュレータが開示されている。
しかしながら、近年では、プログラムのソースコードサイズが肥大化しており、プログラム開発者などがソースコードを見直すことが困難となっている。 However, in recent years, the source code size of programs has grown, making it difficult for program developers to review the source code.
また、インサーキットエミュレータは、各演算部に応じて製作する必要があり、汎用的な半導体装置を除いては、一般的ではなかった。また、機能上の制約も多かった。そのため、必ずしも十分なデバッグを行うことができなかった。 Further, the in-circuit emulator needs to be manufactured according to each arithmetic unit, and is not general except for a general-purpose semiconductor device. There were also many functional restrictions. For this reason, sufficient debugging cannot always be performed.
そこで、この発明は、かかる問題を解決するためになされたものであり、その目的は、インサーキットエミュレータなどの特殊な調査用機器を必要とせず、かつ、容易に割込み遅延を調査できる半導体装置およびデバッグ方法を提供することである。 Therefore, the present invention has been made to solve such a problem, and the object thereof is to provide a semiconductor device that does not require special investigation equipment such as an in-circuit emulator and can easily investigate an interrupt delay. It is to provide a debugging method.
この発明は、割込み要求を受けると、実行中のプログラムを中断して割込み要求に応じた割込みプログラムを実行し、かつ、割込み要求の優先レベルまたは割込みプログラムで設定される優先レベルを出力する演算部と、外部から優先レベルの設定された割込み要求を受けると、演算部から受けた優先レベルと割込み要求の優先レベルとを比較し、演算部からの優先レベルが割込み要求の優先レベルより低い場合には、割込み要求を演算部へ出力し、演算部からの優先レベルが割込み要求の優先レベルと同一またはより高い場合には、演算部からの優先レベルが低くなるまで割込み要求の出力を遅延させる割込み制御部と、割込み制御部が割込み要求を受けると、演算部におけるプログラムの実行状態を示す情報を格納する割込み遅延調査部とを備える半導体装置である。 When receiving an interrupt request, the present invention interrupts the program being executed, executes the interrupt program according to the interrupt request, and outputs the priority level of the interrupt request or the priority level set by the interrupt program When an interrupt request with a priority level set from the outside is received, the priority level received from the calculation unit is compared with the priority level of the interrupt request.If the priority level from the calculation unit is lower than the priority level of the interrupt request, Outputs an interrupt request to the arithmetic unit, and if the priority level from the arithmetic unit is the same or higher than the priority level of the interrupt request, the interrupt that delays the output of the interrupt request until the priority level from the arithmetic unit decreases When the control unit and the interrupt control unit receive an interrupt request, an interrupt delay investigating unit that stores information indicating the execution state of the program in the arithmetic unit It is a semiconductor device comprising a.
また、この発明は、割込み要求を受けると、実行中のプログラムを中断して割込み要求に応じた割込みプログラムを実行し、かつ、割込み要求の優先レベルまたは割込みプログラムで設定される優先レベルを出力する演算部と、外部から優先レベルの設定された割込み要求を受けると、演算部から受けた優先レベルと割込み要求の優先レベルとを比較し、演算部からの優先レベルが割込み要求の優先レベルより低い場合には、割込み要求を演算部へ出力し、演算部からの優先レベルが割込み要求の優先レベルと同一またはより高い場合には、演算部からの優先レベルが低くなるまで割込み要求の出力を遅延させる割込み制御部とからなる半導体装置において実行されるプログラムの割込み遅延を回避するためのデバッグ方法であって、割込み制御部が割込み要求を受けると、演算部が実行しているプログラムを特定するためのプログラムカウンタ値を格納するステップと、割込み要求に応じて実行される割込みプログラムにおいて格納したプログラムカウンタ値を読出すステップとを含む。 In addition, when an interrupt request is received, the present invention interrupts the program being executed, executes the interrupt program according to the interrupt request, and outputs the priority level of the interrupt request or the priority level set by the interrupt program When an interrupt request with a priority level set from outside is received from the arithmetic unit, the priority level received from the arithmetic unit is compared with the priority level of the interrupt request, and the priority level from the arithmetic unit is lower than the priority level of the interrupt request In this case, an interrupt request is output to the arithmetic unit, and if the priority level from the arithmetic unit is equal to or higher than the priority level of the interrupt request, the output of the interrupt request is delayed until the priority level from the arithmetic unit decreases. A debugging method for avoiding an interrupt delay of a program executed in a semiconductor device including an interrupt control unit When the control unit receives an interrupt request, a step of storing a program counter value for specifying a program executed by the arithmetic unit and a program counter value stored in the interrupt program executed in response to the interrupt request are read out. Steps.
この発明によれば、割込み遅延調査部は、割込み制御部が割込み要求を受けると、演算部におけるプログラムの実行状態を示す情報を格納するので、割込み要求に応じた割込みプログラムが実行される直前に実行されていたプログラムの情報を取得できる。よって、その格納されたプログラムの実行状態を示す情報に基づいて、割込み遅延の原因を容易に調査でき、さらにその調査した原因に基づいてデバッグを行うことができる。 According to the present invention, when the interrupt control unit receives an interrupt request, the interrupt delay investigating unit stores information indicating the execution state of the program in the arithmetic unit, so that immediately before the interrupt program corresponding to the interrupt request is executed. Information about the program that was being executed can be acquired. Therefore, the cause of the interrupt delay can be easily investigated based on the information indicating the execution state of the stored program, and debugging can be performed based on the investigated cause.
この発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。 Embodiments of the present invention will be described in detail with reference to the drawings. Note that the same or corresponding parts in the drawings are denoted by the same reference numerals and description thereof will not be repeated.
[実施の形態1]
図1は、この発明の実施の形態1に従う半導体装置100の構成を示す概略ブロック図である。
[Embodiment 1]
FIG. 1 is a schematic block diagram showing a configuration of a
図1を参照して、この発明の実施の形態1に従う半導体装置100は、割込み制御部2と、演算部(CPU部:Central Processing Unit;以下、CPU部と称す)4と、メモリ14と、内部バス52とを備える。
Referring to FIG. 1,
割込み制御部2、CPU部4およびメモリ14は、内部バス52を介して相互に接続される。
The
割込み制御部2は、レジスタ20と、入力制御部18と、優先レベル設定レジスタ28と、優先順位判定部26と、比較器30とからなる。
The
レジスタ20は、割込み制御レジスタ(ICR:Interrupt Control Register)22と、割込みステータスレジスタ(ISR:Interrupt Status Register)24とからなる。
The
割込み制御レジスタ22は、入力制御部18へ入力される割込み要求のそれぞれについて、割込みの許可または禁止の設定値を記憶する。
The interrupt control register 22 stores a setting value for enabling or disabling interrupt for each interrupt request input to the
割込みステータスレジスタ24は、割込み要求のそれぞれの入力状態を記憶する。 The interrupt status register 24 stores the input status of each interrupt request.
入力制御部18は、割込み要求IRQ_1,IRQ_2,・・・,IRQ_nのうちいずれかが入力されると、入力された割込み要求に対応する設定値を割込み制御レジスタ22から読出す。そして、入力制御部18は、読出した設定値に基づいて、当該割込み要求が許可されているか否かを判断し、許可されていれば当該割込み要求を優先順位判定部26へ出力する。さらに、入力制御部18は、割込み要求のそれぞれの入力状態を割込みステータスレジスタ24へ格納する。
When any one of the interrupt requests IRQ_1, IRQ_2,..., IRQ_n is input, the
優先レベル設定レジスタ28は、入力制御部18に入力されるそれぞれの割込み要求に設定される優先レベルを記憶する。
The priority level setting register 28 stores the priority level set for each interrupt request input to the
優先順位判定部26は、入力制御部18から割込み要求を受けると、当該割込み要求に設定される優先レベルを優先レベル設定レジスタ28から読出す。また、優先順位判定部26は、同時に複数の割込み要求が入力されていれば、それぞれの割込み要求に設定される優先レベルを互いに比較し、優先レベルが高い割込み要求から比較器30へ順次出力する。
Upon receiving an interrupt request from the
比較器30は、優先順位判定部26から割込み要求を受けると、当該割込み要求の優先レベルと、CPU部4から受けた優先レベルとを比較する。そして、比較器30は、CPU部4から受けた優先レベルが割込み要求の優先レベルより低ければ、当該割込み要求をCPU部4へ出力する。また、比較器30は、CPU部4から受けた優先レベルが割込み要求の優先レベル以上であれば、CPU部4から受けた優先レベルが割込み要求の優先レベルより低くなるまで当該割込み要求の出力を遅延させる。
When the
CPU部4は、レジスタ32と、CPU制御部54と、IPC制御部40とからなる。
The
レジスタ32は、IPCレジスタ42と、IPC制御レジスタ44と、プログラムカウンタ(PC:Program Counter)46と、ステータスレジスタ(SR:Status Register)48と、スタックポインタ(SP:Stack Pointer)50とからなる。
The
プログラムカウンタ46は、CPU部4において実行されるプログラムの命令アドレスを記憶する。
The program counter 46 stores an instruction address of a program executed in the
ステータスレジスタ48は、CPU部4の優先レベルを記憶する。
The status register 48 stores the priority level of the
スタックポインタ50は、メモリ14内のスタック領域を指定するためのアドレス値を記憶する。
The
IPCレジスタ42は、IPC制御部40から出力されたプログラムカウンタ値を記憶する。
The IPC
IPC制御レジスタ44は、IPC制御部40に割込み要求が入力された場合に、IPC制御部40の動作が有効であるか否かの設定値を記憶する。
The
CPU制御部54は、実行されるプログラムに従い、プログラムカウンタ46の値をカウントアップする。そして、CPU制御部54は、割込み制御部2から割込み要求を受けると、スタックポインタ50に記憶されているアドレス値に基づいて、プログラムカウンタ46に記憶されている値およびステータスレジスタ48に記憶されている値をメモリ14内のスタック領域に退避させ、割込み要求に応じた割込みプログラムを実行させる。さらに、CPU制御部54は、ステータスレジスタ48の値を割込み要求の優先レベルに変更する。また、CPU制御部54は、実行されるプログラムの命令に応じて、ステータスレジスタ48の値を変更する。
The
IPC制御部40は、優先順位判定部26から比較器30へ割込み要求が出力されると同時に当該割込み要求を受け、IPC制御レジスタ44から設定値を読出し、その設定値が有効であるか否かを判断する。そして、設定値が有効である場合にのみ、IPC制御部40は、プログラムカウンタ46に記憶されているプログラムカウンタ値を読出し、その値をIPCレジスタ42へ格納する。
The
実施の形態1においては、IPC制御部40、IPCレジスタ42およびIPC制御レジスタ44が、プログラムカウンタ値格納部を構成する。
In the first embodiment, the
図2は、この発明の実施の形態1に従う半導体装置100の状態図の一例である。
FIG. 2 is an example of a state diagram of
図2を参照して、半導体装置100は、外部から割込み要求IRQ_1およびIRQ_2を受け、それぞれ割込みプログラムとして割込みハンドラ1および割込みハンドラ2を実行する。また、割込み要求の優先レベルは、1〜14の範囲で設定可能であり、割込み要求IRQ_1およびIRQ_2の優先レベルは、それぞれ「14」および「10」とする。すなわち、割込みハンドラ1は、割込みハンドラ2に比較してより優先度が高い。
Referring to FIG. 2,
図1および図2を参照して、時刻T0では、割込み要求IRQ_1およびIRQ_2のいずれも入力されておらず、CPU部4では、IDLEタスクが実行されている。また、CPU部4の優先レベルは「0」となっている。
Referring to FIGS. 1 and 2, at time T0, neither interrupt request IRQ_1 nor IRQ_2 is input, and
次に、時刻Taにおいて、外部から割込み要求IRQ_2が入力されると、他の割込み要求が入力されていないので、割込み要求IRQ_2は、入力制御部18および優先順位判定部26を通過して比較器30へ出力される。比較器30は、CPU部4から受けた優先レベル「0」と、割込み要求IRQ_2の優先レベル「10」とを比較し、優先レベルが高い割込み要求IRQ_2をCPU制御部54へ出力する。すると、CPU制御部54は、割込み要求IRQ_2を受けて、割込み処理を行い、実行中のプログラムカウンタ46に記憶されている値およびステータスレジスタ48に記憶されている値をメモリ14のスタック領域へ退避させる(ステップS1)。同時に、CPU制御部54は、割込み要求IRQ_2の優先レベルに応じて、優先レベルを「10」に変更する。そして、CPU制御部54は、IRQ_2の割込みプログラムである割込みハンドラ2を実行する(ステップS2)。
Next, when an interrupt request IRQ_2 is input from the outside at time Ta, since no other interrupt request is input, the interrupt request IRQ_2 passes through the
時刻Tbにおいて、割込みハンドラ2の処理過程でクリティカルセクションが生じると、割込み禁止命令が実行される。すると、CPU制御部54は、優先レベルを割込み要求の優先レベルの最大値を超える「15」に変更し、他のすべての割込み要求を禁止する(ステップS3)。
When a critical section occurs in the process of the interrupt
他のすべての割込み要求が禁止されている時刻Tcにおいて、外部から割込み要求IRQ_1が入力されると、優先レベル「14」に設定されている割込み要求IRQ_1は、入力制御部18および優先順位判定部26を通過して比較器30へ出力される。比較器30は、CPU部4から受けた優先レベル「15」と、割込み要求IRQ_1の優先レベル「14」とを比較し、優先レベルの低い割込み要求IRQ_1の出力を遅延させる。
When an interrupt request IRQ_1 is input from the outside at time Tc when all other interrupt requests are prohibited, the interrupt request IRQ_1 set at the priority level “14” is input to the
その後、時刻Tdにおいて、割込みハンドラ2のクリティカルセッションが終了し、割込み禁止解除命令が実行される。すると、CPU制御部54は、優先レベルを元の「10」に変更する。優先レベルの低下を受けて、比較器30は、割込み要求IRQ_1をCPU制御部54へ出力する。すると、CPU制御部54は、割込み要求IRQ_1に応じて、上述のステップS1と同様に、割込み処理を行う(ステップS5)。同時に、CPU制御部54は、割込み要求IRQ_1の優先レベルに応じて、優先レベルを「14」に変更する。そして、CPU制御部54は、IRQ_1の割込みプログラムである割込みハンドラ1を実行する(ステップS6)。
Thereafter, at time Td, the critical session of the interrupt
上述のように、先に入力された割込み要求IRQ_2に応じて実行される割込みプログラムに含まれる割込み禁止命令により、後に入力されたより優先レベルが高い割込み要求IRQ_1に対応する割込みプログラムの実行が(Te−Tc)だけ遅延することになる。 As described above, the interrupt prohibition instruction included in the interrupt program executed in response to the interrupt request IRQ_2 input earlier causes execution of the interrupt program corresponding to the interrupt request IRQ_1 having a higher priority level input later (Te -Tc).
一方、IPC制御部40は、優先順位判定部26から出力される割込み要求を受けた時点、すなわち時刻Tcにおいて、CPU部4において実行されているプログラムのプログラムカウンタ値をプログラムカウンタ46から読出し、IPCレジスタ42へ格納する。
On the other hand, the
IPCレジスタ42は、レジスタ32に含まれるので、プログラム中のレジスタ読出し命令を用いて、IPCレジスタ42に格納されているデータを読出すことができる。
Since the
よって、割込み要求IRQ_1に応じて実行される割込みハンドラ1にレジスタ読出し命令を含ませることにより、IPCレジスタ42に格納されているプログラムカウンタ値を読出すことができる。このようにして、割込みハンドラ1の割込み遅延の原因である割込みハンドラ2のプログラムカウンタ値が得られる。
Therefore, the program counter value stored in the
したがって、プログラム開発者は、得られたプログラムカウンタ値から、割込み遅延の原因となっているプログラムを特定でき、デバッグを容易に行うことができる。 Therefore, the program developer can identify the program causing the interrupt delay from the obtained program counter value, and can easily perform debugging.
図3は、この発明の実施の形態1に従う半導体装置100を用いてデバッグを行う方法を示すフローチャートである。
FIG. 3 is a flowchart showing a method for performing debugging using
図3を参照して、IPC制御部40は、優先順位判定部26から割込み要求を受けたか否かを判断する(ステップS100)。割込み要求を受けていない場合(ステップS100においてNOの場合)には、IPC制御部40は、割込み要求を受けるまで待機する(S100)。割込み要求を受けた場合(ステップS100においてYESの場合)には、IPC制御部40は、プログラムカウンタ46からプログラムカウンタ値を読出してIPCレジスタ42へ格納する(ステップS102)。
Referring to FIG. 3,
そして、当該割込み要求に応じて実行される割込みプログラムにおいて、IPCレジスタ4からプログラムカウンタ値を読出す(ステップS104)。 Then, in the interrupt program executed in response to the interrupt request, the program counter value is read from the IPC register 4 (step S104).
プログラム開発者は、読出されたプログラムカウンタ値に基づいてプログラムを特定する(S106)。そして、プログラム開発者は、その特定したプログラムに対してデバッグする(S108)。 The program developer specifies a program based on the read program counter value (S106). Then, the program developer debugs the identified program (S108).
なお、実施の形態1においては、プログラムカウンタ値格納部を構成する、IPC制御部40、IPCレジスタ42およびIPC制御レジスタ44をCPU部4の内部に配置する場合について説明したが、CPU部4とデータの授受を行うバスを介してCPU部4の外部に配置してもよい。
In the first embodiment, the case where the
実施の形態1によれば、IPC制御部は、外部から与えられた割込み要求が優先順位判定部から出力されると、当該割込み要求がCPU部に与えられるか否かにかかわらず、CPU部において実行されているプログラムのプログラムカウンタ値を格納する。そして、割込み要求に応じて実行される割込みプログラムにおいて格納された当該プログラムカウンタ値を読出すことができる。よって、割込みプログラムに割込み遅延が生じた場合には、プログラム開発者は、読出されたプログラムカウンタ値からその遅延原因となったプログラムを特定でき、デバッグを容易に行うことができる。 According to the first embodiment, when an interrupt request given from the outside is output from the priority determination unit, the IPC control unit determines whether the interrupt request is given to the CPU unit or not. Stores the program counter value of the program being executed. The program counter value stored in the interrupt program executed in response to the interrupt request can be read out. Therefore, when an interrupt delay occurs in the interrupt program, the program developer can identify the program causing the delay from the read program counter value, and can easily perform debugging.
また、実施の形態1によれば、IPC制御部は、IPC制御レジスタに記憶される設定値に基づいてプログラムカウンタ値を格納するか否かを決定するので、割込み遅延の原因となるプログラムを特定する必要がある場合にのみプログラムカウンタ値を格納させることができる。よって、通常時には、プログラムカウンタ値を格納しないように設定することで冗長な処理を回避できる。 Further, according to the first embodiment, the IPC control unit determines whether or not to store the program counter value based on the setting value stored in the IPC control register, and therefore identifies the program that causes the interrupt delay. The program counter value can be stored only when necessary. Therefore, redundant processing can be avoided by setting the program counter value not to be stored in a normal state.
[実施の形態2]
図4は、この発明の実施の形態2に従う半導体装置200の構成を示す概略ブロック図である。
[Embodiment 2]
FIG. 4 is a schematic block diagram showing a configuration of
図4を参照して、この発明の実施の形態2に従う半導体装置200は、図1に示す実施の形態1に従う半導体装置100において、CPU部4をCPU部6に代えたものである。
Referring to FIG. 4, a
CPU部6は、レジスタ34と、CPU制御部56と、比較器62と、タイマー(TMR)制御部60とからなる。
The CPU unit 6 includes a
レジスタ34は、タイマー起動優先レベルレジスタ(I_LVL)64と、タイマーカウントレジスタ(TM_CNT)66と、プログラムカウンタ46と、ステータスレジスタ48と、スタックポインタ50とからなる。
The
タイマー起動優先レベルレジスタ64は、タイマー制御部60が割込み要求を受けて時間計測を開始する条件となる優先レベルの設定値を記憶する。
The timer activation
タイマーカウントレジスタ66は、タイマー制御部からリセット値(0)または時間の計測値を受けて、その値を記憶する。
The
プログラムカウンタ46と、ステータスレジスタ48と、スタックポインタ50とについては、上述の実施の形態1と同様であるので説明は繰返さない。
Since
CPU制御部56は、上述の実施の形態1におけるCPU制御部54の機能に加え、タイマー制御部60から指令を受けて、ステータスレジスタ48の値を変更する。
In addition to the function of the
比較器62は、優先順位判定部26から割込み要求が出力されると、当該割込み要求の優先レベルと、タイマー起動優先レベルレジスタ64から読出した優先レベルとを比較する。そして、比較器62は、割込み要求の優先レベルが、タイマー起動優先レジスタの優先レベルより高い場合にのみ、当該割込み要求をタイマー制御部60へ出力する。
When an interrupt request is output from the
タイマー制御部60は、比較器62から割込み要求を受けると、タイマーカウントレジスタ66の値をリセットした後、時間の計測を開始する。そして、タイマー制御部60は、その計測した値をタイマーカウントレジスタ66へ格納する。さらに、タイマー制御部60は、計測した時間が予め定められた設定値を超えると、CPU部4の優先レベルを強制的に下げるための指令をCPU制御部56へ与える。なお、このようにCPU部4の優先レベルを強制的に下げる処理は、NMI(Non Maskable Interrupt)処理と称される。
Upon receiving an interrupt request from the
実施の形態2においては、タイマー制御部60、比較器62、タイマー起動優先レベルレジスタ64およびタイマーカウントレジスタ66が遅延時間計測部を構成する。
In the second embodiment, the
図5は、この発明の実施の形態2に従う半導体装置200の状態図の一例である。
FIG. 5 is an example of a state diagram of
図2に示す実施の形態1に従う半導体装置100と同様に、半導体装置200は、外部から割込み要求IRQ_1およびIRQ_2を受け、それぞれ割込みプログラムとして割込みハンドラ1および割込みハンドラ2を実行する。また、割込み要求に対する優先レベルは、1〜14の範囲で設定可能であり、割込み要求IRQ_1およびIRQ_2の優先レベルは、それぞれ「14」および「10」である。
Similar to
図4および図5を参照して、時刻T0から時刻Tbまでは、図2と同様であるので、説明は繰返さない。 Referring to FIGS. 4 and 5, since time T0 to time Tb are the same as those in FIG. 2, description thereof will not be repeated.
時刻Tcにおいて、外部から割込み要求IRQ_1が入力されると、最高の優先レベル「14」に設定されている割込み要求IRQ_1は、入力制御部18および優先順位判定部26を通過して比較器30および62へ出力される。
When an interrupt request IRQ_1 is input from the outside at time Tc, the interrupt request IRQ_1 set to the highest priority level “14” passes through the
比較器30は、CPU部4から受けた優先レベル「15」と、割込み要求IRQ_1の優先レベル「14」とを比較し、レベルの低い割込み要求IRQ_1の出力を遅延させる。
The
一方、比較器62は、優先順位判定部26から受けた割込み要求IRQ_1の優先レベル「14」と、タイマー起動優先レベルレジスタ64に記憶されている優先レベルとを比較する。たとえば、タイマー起動優先レベルレジスタの優先レベルを「13」とすると、比較器62は、優先レベルが高い割込み要求IRQ_1をタイマー制御部60へ出力する。すると、タイマー制御部60は、タイマーカウントレジスタ66をリセットした後、時間の計測を開始し、その計測した値をタイマーカウントレジスタ66へ格納する。
On the other hand, the
タイマーカウントレジスタ66は、レジスタ32に含まれるので、プログラムで実行されるレジスタ読出し命令により格納されているデータを読出すことができる。
Since
よって、割込み要求IRQ_1に応じて実行される割込みハンドラ1にレジスタ読出し命令を含ませることにより、IPCレジスタ42に格納されている時間計測値が読出され、割込みハンドラ1の割込み遅延時間が得られる。このようにして、プログラム開発者は、割込みハンドラ1の遅延状態を把握できる。
Therefore, by including a register read instruction in the interrupt
したがって、プログラム開発者は、割込みプログラムの実行毎に、割込み遅延が生じているか否かを知ることができ、デバッグを容易に行うことができる。 Therefore, the program developer can know whether or not an interrupt delay occurs every time the interrupt program is executed, and can easily perform debugging.
さらに、割込み遅延の時間が予め定められた設定値を超えると、タイマー制御部60がNMI処理を実行し、CPU制御部56がCPU部4の優先レベルを下げるので、割込み禁止処理により遅延させられていた割込みプログラムが実行される。
Further, when the interrupt delay time exceeds a predetermined set value, the
よって、タイマー制御部60におけるNMI処理を実行する条件となる設定値を割込み遅延の許容時間以下とすることで、割込み遅延による処理の不具合を回避できる。
Therefore, by setting the setting value, which is a condition for executing the NMI processing in the
なお、実施の形態2においては、遅延時間計測部を構成する、タイマー制御部60、比較器62、タイマー起動優先レベルレジスタ64およびタイマーカウントレジスタ66をCPU部6の内部に配置する場合について説明したが、CPU部6とデータの授受を行うバスを介してCPU部6の外部に配置してもよい。
In the second embodiment, the case where the
実施の形態2によれば、IPC制御部は、外部から与えられた割込み要求が優先順位判定部から出力されると、当該割込み要求がCPU部に与えられるか否かにかかわらず、時間の計測を開始する。そして、割込み要求に応じて実行される割込みプログラムにより計測値を読出すことができる。よって、プログラム開発者は、割込みプログラムの割込み遅延状態を把握でき、複数の割込みプログラムが実行される場合に、いずれの割込みプログラムに問題があるのかを特定できるため、デバッグを容易に行うことができる。 According to the second embodiment, when an interrupt request given from the outside is output from the priority determination unit, the IPC control unit measures time regardless of whether or not the interrupt request is given to the CPU unit. To start. Then, the measured value can be read by an interrupt program executed in response to the interrupt request. Therefore, the program developer can grasp the interrupt delay state of the interrupt program and can identify which interrupt program has a problem when a plurality of interrupt programs are executed, so that debugging can be easily performed. .
また、実施の形態2によれば、タイマー制御部は、タイマー起動優先レベルレジスタに記憶される優先レベルより高い優先レベルに設定された割込み要求が入力された場合に遅延時間を計測する。よって、特に処理完了までの時間制約が厳しく、高い優先レベルに設定された割込みプログラムに着目して、割込み遅延状態を監視できる。 Further, according to the second embodiment, the timer control unit measures the delay time when an interrupt request set to a priority level higher than the priority level stored in the timer activation priority level register is input. Therefore, the time delay until the completion of processing is particularly severe, and the interrupt delay state can be monitored by paying attention to the interrupt program set at a high priority level.
さらに、実施の形態2によれば、タイマー制御部は、割込み遅延時間が設定値を超えた場合には、NMI処理を行い割込みプログラムを強制的に実行させる。よって、割込みプログラムの割込み遅延時間を所定の値以下に抑制でき、割込み遅延による処理の不具合を回避できる。 Furthermore, according to the second embodiment, when the interrupt delay time exceeds the set value, the timer control unit performs NMI processing and forcibly executes the interrupt program. Therefore, the interrupt delay time of the interrupt program can be suppressed to a predetermined value or less, and processing problems due to the interrupt delay can be avoided.
[実施の形態3]
上述の実施の形態1においては、外部から与えられた割込み要求が優先順位判定部から出力されると、実行されているプログラムのプログラムカウンタ値を格納する場合について説明した。また、上述の実施の形態2においては、外部から与えられた割込み要求が優先順位判定部から出力されると、時間を計測する場合について説明した。
[Embodiment 3]
In the first embodiment described above, the case where the program counter value of the program being executed is stored when an interrupt request given from the outside is output from the priority determination unit has been described. Further, in the above-described second embodiment, the case where the time is measured when an interrupt request given from the outside is output from the priority determination unit has been described.
一方、実施の形態3においては、両方の機能を備える場合について説明する。 On the other hand, in Embodiment 3, the case where both functions are provided will be described.
図6は、この発明の実施の形態3に従う半導体装置300の構成を示す概略ブロック図である。
FIG. 6 is a schematic block diagram showing a configuration of
図6を参照して、この発明の実施の形態3に従う半導体装置300は、図1に示す実施の形態1に従う半導体装置100において、CPU部4をCPU部8に代えたものである。
Referring to FIG. 6,
CPU部8は、レジスタ36と、CPU制御部54と、切換部72と、タイマー制御部60と、IPC制御部40とからなる。
The
レジスタ36は、切換設定レジスタ(FSW)78と、共用レジスタ80と、プログラムカウンタ46と、ステータスレジスタ48と、スタックポインタ50とからなる。
The
切換設定レジスタ78は、切換部72がタイマー制御部60およびIPC制御部40のいずれを有効にするかを切換えるための設定値を記憶する。
The
共用レジスタ80は、タイマー制御部60およびIPC制御部40から出力されるデータを記憶する。
The shared
プログラムカウンタ46と、ステータスレジスタ48と、スタックポインタ50と、CPU制御部54とについては、上述の実施の形態1と同様であるので説明は繰返さない。
Since
切換部72は、優先順位判定部26から割込み要求を受けると、切換設定レジスタ78から設定値を読出し、その読出した設定値に応じて、タイマー制御部60またはIPC制御部40のいずれかに割込み要求を与える。
When the switching
タイマー制御部60は、切換部72から割込み要求を受けると、共用レジスタ80をリセットした後、時間の計測を開始する。そして、タイマー制御部60は、その計測したデータを共用レジスタ80へ格納する。
When the
IPC制御部40は、切換部72から割込み要求を受けると、プログラムカウンタ46に記憶されているプログラムカウンタ値を読出し、共用レジスタ80へ格納する。
When receiving an interrupt request from the switching
実施の形態3においては、IPC制御部40および共用レジスタ80が、プログラムカウンタ格納部を構成し、タイマー制御部60および共用レジスタ80が、遅延時間計測部を構成する。
In the third embodiment,
切換設定レジスタ78および共用レジスタ80はレジスタ36に含まれるので、プログラム中のレジスタ書込み命令を用いて格納されているデータを更新でき、かつ、レジスタ読出し命令を用いて格納されているデータを読出すことができる。
Since switching setting
たとえば、割込みプログラム中でレジスタ書込み命令を実行させて、切換設定レジスタ78に格納されている設定値をタイマー制御部60が有効となるように変更する。さらに、レジスタ読出し命令を実行させて、共用レジスタ80に格納されている時間計測値を読出す。このようにして、まず割込みプログラムにおける割込み遅延状態を把握する。
For example, a register write instruction is executed in the interrupt program, and the setting value stored in the
そして、割込みプログラムの割込み遅延が生じていれば、割込みプログラム中でレジスタ書込み命令を実行させて、切換設定レジスタ78に格納されている設定値をIPC制御部40が有効となるように変更する。さらに、レジスタ読出し命令を実行させて、共用レジスタ80に格納されているプログラムカウンタ値を読出す。このようにして、割込み遅延の原因であるプログラムのプログラムカウンタ値が得られる。
If an interrupt delay of the interrupt program has occurred, a register write instruction is executed in the interrupt program, and the setting value stored in the
したがって、プログラム開発者は、割込み遅延が生じているか否かを判断することができ、さらに、割込み遅延の原因となっているプログラムを特定できるため、デバッグを容易に行うことができる。 Therefore, the program developer can determine whether or not an interrupt delay has occurred, and can further identify the program causing the interrupt delay, thereby facilitating debugging.
なお、実施の形態3においては、プログラムカウンタ格納部および遅延時間計測部を構成する、IPC制御部40、タイマー制御部60、切換設定レジスタ78および共用レジスタ80をCPU部8の内部に配置する場合について説明したが、CPU部8とデータの授受を行うバスを介してCPU部8の外部に配置してもよい。
In the third embodiment, when the
実施の形態3によれば、切換設定レジスタの設定値に応じて、IPC制御部またはタイマー制御部のいずれかが有効となるので、IPC制御部およびタイマー制御部がデータを格納するための領域を共用できる。よって、CPU部のレジスタを有効に利用することができるため、レジスタ領域を抑制できる。 According to the third embodiment, since either the IPC control unit or the timer control unit is enabled according to the set value of the switching setting register, an area for storing data by the IPC control unit and the timer control unit is set. Can be shared. Therefore, the register of the CPU unit can be used effectively, and the register area can be suppressed.
[実施の形態4]
図7は、この発明の実施の形態4に従う半導体装置400の構成を示す概略ブロック図である。
[Embodiment 4]
FIG. 7 is a schematic block diagram showing the configuration of
図7を参照して、この発明の実施の形態4による半導体装置400は、図1に示す実施の形態1に従う半導体装置100において、CPU部4をCPU部10に代え、インターフェイス部84を加えたものである。
Referring to FIG. 7,
CPU部10は、レジスタ38と、CPU制御部58と、トレース部82とからなる。
The
レジスタ38は、プログラムカウンタ46と、ステータスレジスタ48と、スタックポインタ50とからなる。プログラムカウンタ46と、ステータスレジスタ48と、スタックポインタ50とについては、上述の実施の形態1と同様であるので説明は繰返さない。
The
CPU制御部58は、上述の実施の形態1におけるCPU制御部54の機能に加え、実行アドレス、実行した命令コードおよびオペランドアクセス情報などからなるトレース情報をトレース部82へ出力する。
In addition to the function of the
トレース部82は、優先順位判定部26から割込み要求を受けると、CPU制御部58を介してCPU部10のトレース情報の収集を開始する。そして、トレース部82は、収集したトレース情報を自身へ格納する。さらに、トレース部82は、その収集したトレース情報をインターフェイス部84へ出力する。
When the
インターフェイス部84は、トレース部82から受けたトレース情報を所定の形式のデータに変換し、外部の解析装置などへ出力する。
The
プログラム中で実行される読出し命令を用いて、トレース部82に格納されているトレース情報を読出すことができる。よって、プログラム開発者は、割込み遅延発生時のより詳細な情報を取得できる。
Trace information stored in the
また、トレース部82は、格納したトレース情報をインターフェイス部84を介して外部の解析装置へ出力する。よって、プログラム開発者は、割込み遅延発生時のプログラム実行状態の解析をより容易に行うことができる。
In addition, the
なお、実施の形態4においては、トレース部82をCPU部10の内部に配置する場合について説明したが、CPU部10とデータの授受を行うバスを介してCPU部10の外部に配置してもよい。
In the fourth embodiment, the case where the
実施の形態4によれば、トレース部は、外部から与えられた割込み要求が優先順位判定部から出力されると、トレース情報の収集を開始する。そのため、必要なトレース情報だけを収集できるので、トレース部が冗長なトレース情報を収集することがなく、トレース部の記憶容量を抑制でき、かつ、効率的に解析作業を行える。 According to the fourth embodiment, the trace unit starts collecting trace information when an interrupt request given from the outside is output from the priority determination unit. Therefore, since only necessary trace information can be collected, the trace unit does not collect redundant trace information, the storage capacity of the trace unit can be suppressed, and analysis work can be performed efficiently.
[実施の形態5]
図8は、この発明の実施の形態5に従う半導体装置500の構成を示す概略ブロック図である。
[Embodiment 5]
FIG. 8 is a schematic block diagram showing the configuration of
図8を参照して、この発明の実施の形態5による半導体装置500は、図7に示す実施の形態4に従う半導体装置400において、CPU部10をCPU部12に代えたものである。そして、CPU部12はCPU部10において、CPU制御部58をCPU制御部59に代え、トレース部82をバス関連情報格納部94に代えたものである。
Referring to FIG. 8,
CPU制御部59は、上述の実施の形態1におけるCPU制御部54の機能に加え、バスアクセス情報をバス関連情報格納部94へ出力する。
The
バス関連情報格納部94は、バスアクセスカウンタ92と、パフォーマンスカウンタ90とからなる。そして、バス関連情報格納部94は、優先順位判定部26から割込み要求を受けると、バスアクセスカウンタ92およびパフォーマンスカウンタ90を起動させる。さらに、バス関連情報格納部94は、バスアクセスカウンタ92およびパフォーマンスカウンタ90に格納されているデータを読出してインターフェイス部84へ出力する。
The bus related
バスアクセスカウンタ92は、CPU制御部59から受けたバスアクセス情報に基づいて、CPU部12が内部バス52に対して行ったバスアクセス回数、すなわち、リード/ライトアクセスを行った回数をカウントし、そのカウント回数を記憶する。
Based on the bus access information received from the
パフォーマンスカウンタ90は、CPU制御部59から受けたバスアクセス情報に基づいて、CPU部12が内部バス52に対して行ったバスアクセスの実行サイクル数、すなわち、リード/ライトアクセスに要したサイクル数(クロック数)をカウントし、そのカウント回数を記憶する。
Based on the bus access information received from the
また、バス関連情報格納部94は、プログラムカウンタ46に記憶されているプログラムカウンタ値を読出し、インターフェイス部84へ出力する。
Further, the bus related
実施の形態5においては、バス関連情報格納部94およびインターフェイス部84が情報出力部を構成する。
In the fifth embodiment, the bus related
また、バス関連情報格納部94は、インターフェイス部84を介して接続された記録装置にバスアクセス回数、バスアクセスの実行サイクル数およびプログラムカウンタ値を出力できる。プログラム開発者は、割込み遅延発生時のプログラム実行状態の解析をより容易に行うことができる。
In addition, the bus related
なお、実施の形態5においては、バス関連情報格納部94をCPU部12部に配置する場合について説明したが、CPU部12とデータの授受を行うバスを介してCPU部12の外部に配置してもよい。
In the fifth embodiment, the case where the bus-related
実施の形態5によれば、バス関連情報格納部は、外部から与えられた割込み要求が優先順位判定部から出力されると、バスアクセス回数およびバスアクセス実行サイクル数の収集を開始する。そのため、必要なタイミングにおけるバス関連情報を収集できるので、不用な情報を収集することがなく、効率的に解析作業を行える。さらに、プログラムカウンタ値も同時に出力されるので、より効率的に解析作業を行える。 According to the fifth embodiment, the bus related information storage unit starts collecting the number of bus accesses and the number of bus access execution cycles when an externally applied interrupt request is output from the priority order determination unit. Therefore, since the bus related information can be collected at a necessary timing, unnecessary information is not collected and analysis work can be performed efficiently. Further, since the program counter value is also output at the same time, the analysis work can be performed more efficiently.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
2 割込み制御部、4,6,8,10,12 演算部(CPU部)、14 メモリ、18 入力制御部、20,32,34,36,38 レジスタ、22 割込み制御レジスタ(ICR)、24 割込みステータスレジスタ(ISR)、26 優先順位判定部、28 優先レベル設定レジスタ、30,62 比較器、40 IPC制御部、42 IPCレジスタ、44 IPC制御レジスタ、46 プログラムカウンタ(PC)、48 ステータスレジスタ(SR)、50 スタックポインタ(SP)、52 内部バス、54,56,58,59 CPU制御部、60 タイマー(TMR)制御部、64 タイマー起動優先レベルレジスタ(I_LVL)、66 タイマーカウントレジスタ(TM_CNT)、72 切換部、78 切換設定レジスタ(FSW)、80 共用レジスタ、82 トレース部、84 インターフェイス部、90 パフォーマンスカウンタ、92 バスアクセスカウンタ、94 バス関連情報格納部、100,200,300,400,500 半導体装置、IRQ_1,IRQ_2,・・・,IRQ_n 割込み要求。 2 interrupt control unit, 4, 6, 8, 10, 12 arithmetic unit (CPU unit), 14 memory, 18 input control unit, 20, 32, 34, 36, 38 register, 22 interrupt control register (ICR), 24 interrupt Status register (ISR), 26 priority order determination unit, 28 priority level setting register, 30, 62 comparator, 40 IPC control unit, 42 IPC register, 44 IPC control register, 46 program counter (PC), 48 status register (SR) ), 50 stack pointer (SP), 52 internal bus, 54, 56, 58, 59 CPU control unit, 60 timer (TMR) control unit, 64 timer activation priority level register (I_LVL), 66 timer count register (TM_CNT), 72 switching unit, 78 switching setting register (FSW ), 80 shared register, 82 trace unit, 84 interface unit, 90 performance counter, 92 bus access counter, 94 bus related information storage unit, 100, 200, 300, 400, 500 semiconductor device, IRQ_1, IRQ_2,. IRQ_n Interrupt request.
Claims (12)
外部から優先レベルの設定された割込み要求を受けると、前記演算部から受けた前記優先レベルと前記割込み要求の優先レベルとを比較し、前記演算部からの前記優先レベルが前記割込み要求の優先レベルより低い場合には、前記割込み要求を前記演算部へ出力し、前記演算部からの前記優先レベルが前記割込み要求の優先レベルと同一またはより高い場合には、前記演算部からの前記優先レベルが低くなるまで前記割込み要求の出力を遅延させる割込み制御部と、
前記割込み制御部が前記割込み要求を受けると、前記演算部におけるプログラムの実行状態を示す情報を格納する割込み遅延調査部とを備える、半導体装置。 When receiving an interrupt request, an arithmetic unit that interrupts the program being executed, executes the interrupt program according to the interrupt request, and outputs a priority level of the interrupt request or a priority level set by the interrupt program; ,
When an interrupt request with a priority level set from outside is received, the priority level received from the arithmetic unit is compared with the priority level of the interrupt request, and the priority level from the arithmetic unit is the priority level of the interrupt request. If it is lower, the interrupt request is output to the arithmetic unit, and if the priority level from the arithmetic unit is equal to or higher than the priority level of the interrupt request, the priority level from the arithmetic unit is An interrupt controller that delays the output of the interrupt request until low;
When the interrupt control unit receives the interrupt request, the semiconductor device includes an interrupt delay examining unit that stores information indicating an execution state of a program in the arithmetic unit.
前記割込み制御部が前記割込み要求を受けた時点において、前記演算部が実行しているプログラムのプログラムカウンタ値を格納するプログラムカウンタ値格納部と、
前記割込み制御部が前記割込み要求を受けると、前記演算部において前記割込みプログラムが実行されるまでに要する時間を計測する遅延時間計測部と、
予め定められた設定値に応じて、前記プログラムカウンタ値格納部および前記遅延時間計測部のいずれか一方を有効とする切換部とをさらに含む、請求項1に記載の半導体装置。 The interrupt delay investigation unit
At the time when the interrupt control unit receives the interrupt request, a program counter value storage unit that stores a program counter value of a program executed by the arithmetic unit;
When the interrupt control unit receives the interrupt request, a delay time measuring unit that measures a time required until the interrupt program is executed in the arithmetic unit;
The semiconductor device according to claim 1, further comprising a switching unit that enables one of the program counter value storage unit and the delay time measurement unit according to a predetermined set value.
外部から優先レベルの設定された割込み要求を受けると、前記演算部から受けた前記優先レベルと前記割込み要求の優先レベルとを比較し、前記演算部からの前記優先レベルが前記割込み要求の優先レベルより低い場合には、前記割込み要求を前記演算部へ出力し、前記演算部からの前記優先レベルが前記割込み要求の優先レベルと同一またはより高い場合には、前記演算部からの前記優先レベルが低くなるまで前記割込み要求の出力を遅延させる割込み制御部とからなる半導体装置において実行されるプログラムの割込み遅延を回避するためのデバッグ方法であって、
前記割込み制御部が前記割込み要求を受けると、前記演算部が実行しているプログラムを特定するためのプログラムカウンタ値を格納するステップと、
前記割込み要求に応じて実行される割込みプログラムにおいて前記格納したプログラムカウンタ値を読出すステップとを含む、デバッグ方法。 When receiving an interrupt request, an arithmetic unit that interrupts the program being executed, executes the interrupt program according to the interrupt request, and outputs a priority level of the interrupt request or a priority level set by the interrupt program; ,
When an interrupt request with a priority level set from outside is received, the priority level received from the arithmetic unit is compared with the priority level of the interrupt request, and the priority level from the arithmetic unit is the priority level of the interrupt request. If it is lower, the interrupt request is output to the arithmetic unit, and if the priority level from the arithmetic unit is equal to or higher than the priority level of the interrupt request, the priority level from the arithmetic unit is A debugging method for avoiding an interrupt delay of a program executed in a semiconductor device including an interrupt control unit that delays the output of the interrupt request until low.
When the interrupt control unit receives the interrupt request, storing a program counter value for specifying a program executed by the arithmetic unit;
Reading the stored program counter value in an interrupt program executed in response to the interrupt request.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004380888A JP2006185365A (en) | 2004-12-28 | 2004-12-28 | Semiconductor device and debugging method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004380888A JP2006185365A (en) | 2004-12-28 | 2004-12-28 | Semiconductor device and debugging method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2006185365A true JP2006185365A (en) | 2006-07-13 |
Family
ID=36738412
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004380888A Withdrawn JP2006185365A (en) | 2004-12-28 | 2004-12-28 | Semiconductor device and debugging method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2006185365A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2463048A (en) * | 2008-08-29 | 2010-03-03 | Symbian Software Ltd | A diagnostic tool for displaying interrupt activity against a time line |
| WO2015128755A1 (en) * | 2014-02-27 | 2015-09-03 | International Business Machines Corporation | Delaying floating interruption while in tx mode |
| CN107621974A (en) * | 2016-07-13 | 2018-01-23 | 罗伯特·博世有限公司 | Interrupt request distribution device and the operation method to this |
| JP2019159852A (en) * | 2018-03-13 | 2019-09-19 | 富士電機株式会社 | Information processing apparatus |
-
2004
- 2004-12-28 JP JP2004380888A patent/JP2006185365A/en not_active Withdrawn
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2463048A (en) * | 2008-08-29 | 2010-03-03 | Symbian Software Ltd | A diagnostic tool for displaying interrupt activity against a time line |
| WO2015128755A1 (en) * | 2014-02-27 | 2015-09-03 | International Business Machines Corporation | Delaying floating interruption while in tx mode |
| CN107621974A (en) * | 2016-07-13 | 2018-01-23 | 罗伯特·博世有限公司 | Interrupt request distribution device and the operation method to this |
| CN107621974B (en) * | 2016-07-13 | 2023-11-28 | 罗伯特·博世有限公司 | Interrupt request allocation device and execution method for this |
| JP2019159852A (en) * | 2018-03-13 | 2019-09-19 | 富士電機株式会社 | Information processing apparatus |
| JP7069870B2 (en) | 2018-03-13 | 2022-05-18 | 富士電機株式会社 | Information processing equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4094724B2 (en) | Apparatus and method for identifying exceptions when debugging software | |
| US20130159977A1 (en) | Open kernel trace aggregation | |
| CN103109276B (en) | System detection method | |
| CN103430158B (en) | Use Execution Single Step to Diagnose Coding | |
| US8495344B2 (en) | Simultaneous execution resumption of multiple processor cores after core state information dump to facilitate debugging via multi-core processor simulator using the state information | |
| US7831818B2 (en) | Exception-based timer control | |
| CN101606132B (en) | Semiconductor integrated circuit, debug/trace circuit, and semiconductor integrated circuit operation observing method | |
| JP5054558B2 (en) | Multi-core LSI | |
| JP6963552B2 (en) | Replay of partially executed instruction blocks in processor-based systems that utilize the block atomic execution model | |
| JP2006185365A (en) | Semiconductor device and debugging method | |
| US20110107072A1 (en) | Method for self-diagnosing system management interrupt handler | |
| US10747647B2 (en) | Method, apparatus and system for diagnosing a processor executing a stream of instructions | |
| JP2007257441A (en) | Processor and processor control method | |
| JP2011028308A (en) | Semiconductor device and software development support device | |
| CN101311909A (en) | Method for diagnosing system abnormality | |
| US7543185B2 (en) | Debug system with event-based virtual processing agents | |
| JP2003281076A (en) | Unauthorized access detection circuit of dma controller, unauthorized access detecting method and program thereof | |
| JP2000066922A (en) | Method for preventing contention for storing all instruction trace data in secondary storage device | |
| JP2007034864A (en) | I / O device diagnostic method | |
| JP2005267349A (en) | Processing module and control method thereof | |
| JPS6111855A (en) | Function diagnosing method of data processor | |
| JP5416257B2 (en) | Multi-core LSI | |
| CN120850924A (en) | Method and device for implementing register coverage statistics based on DWT | |
| JP2013105388A (en) | Interrupt circuit and interrupt method | |
| CN115687159A (en) | Debugging method, debugging device and computer readable storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20080304 |