JP2011186591A - Processor and control method therefor - Google Patents

Processor and control method therefor Download PDF

Info

Publication number
JP2011186591A
JP2011186591A JP2010048960A JP2010048960A JP2011186591A JP 2011186591 A JP2011186591 A JP 2011186591A JP 2010048960 A JP2010048960 A JP 2010048960A JP 2010048960 A JP2010048960 A JP 2010048960A JP 2011186591 A JP2011186591 A JP 2011186591A
Authority
JP
Japan
Prior art keywords
interrupt
generation
time
time difference
request source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010048960A
Other languages
Japanese (ja)
Inventor
Morikatsu Umeda
守克 梅田
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2010048960A priority Critical patent/JP2011186591A/en
Publication of JP2011186591A publication Critical patent/JP2011186591A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a processor and a control method therefor, capable of reducing power consumption. <P>SOLUTION: The processor includes an interruption period decision unit for calculating the period of an interruption request from each interruption generation circuit and deciding the periodicity thereof, a synchronization detection unit for detecting whether each interruption generation circuit is an interruption synchronization target circuit, that is, a target capable of synchronization with an interruption request source circuit generating the interruption request, a time difference detection unit for detecting a time difference of next interruption generation timing between the interruption request source circuit and the synchronization target circuit, and an interruption processing time adjustment unit for adjusting the next interruption generation timing so as to delay the interruption processing start time of the interruption request source circuit by the time difference of the next interruption generation timing when the time difference of the interruption timing is within a predetermined time. By this, interruption requests from a plurality of interruption generation circuits are adjusted. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、電源スイッチシステムに対する割り込み制御を行うプロセッサ及びその制御方法に関する。   The present invention relates to a processor that performs interrupt control for a power switch system and a control method thereof.

近年、CPUの処理速度向上、マルチプロセッサ化等により、システムとしての消費電力が増大傾向にあり、その対策として電源スイッチによるパワーマネージメントなどの省電力化技術の搭載がシステムとして、必須となっている。しかし、割り込み要求がある度に電源スイッチをオンにしてCPUを起動する必要があるので起動回数を減らす技術が必要になってきた。   In recent years, the power consumption of the system has been increasing due to the improvement of CPU processing speed and the use of multiprocessors. As a countermeasure, the installation of power-saving technology such as power management using a power switch is indispensable for the system. . However, since it is necessary to start the CPU by turning on the power switch every time there is an interrupt request, a technique for reducing the number of activations has become necessary.

特許文献1では、タイマで管理するタイマイベントに対して、イベント発生タイミング調整により同タイミングで複数のタイマイベントを処理することでCPUの起動回数を減らす省電力化技術が開示されている。   Patent Document 1 discloses a power saving technique for reducing the number of CPU activations by processing a plurality of timer events at the same timing by adjusting the event generation timing for a timer event managed by a timer.

図17は特許文献1に記載のタイマ管理装置を示すブロック図である。図17に示すように、1つの(サブ)システムのタイマキュー要素535、555、575等は各々キュー状に接続され、このキューはタイマキュー管理テーブル532、552、572等によって(サブ)システム毎に管理される。(サブ)システムは、(サブ)システム毎のタイマ管理テーブル530、550、570等によって管理され、各(サブ)システムはシステムキュー管理テーブル510によって管理される。(サブ)システムの例としては、符号分割多重(Code Division Multiple Access : CDMA)システム、ディジタル携帯電話/自動車電話(Personal Digital Cellular : PDC)システムまたはPHS(Personal Handyphone System)等がある。   FIG. 17 is a block diagram showing a timer management device described in Patent Document 1. In FIG. As shown in FIG. 17, timer queue elements 535, 555, 575, etc. of one (sub) system are connected in a queue form, and this queue is connected to each (sub) system by timer queue management tables 532, 552, 572, etc. Managed. The (sub) system is managed by timer management tables 530, 550, and 570 for each (sub) system, and each (sub) system is managed by the system queue management table 510. Examples of (sub) systems include a Code Division Multiple Access (CDMA) system, a digital mobile phone / personal digital cellular (PDC) system, or a PHS (Personal Handyphone System).

空きタイマキュー520は、タイマがカウントアップして処理が終了したタイマキュー要素、つまり使い終わったタイマキュー要素が接続されていく。空きタイマキュー要素が無くなると新規のタイマイベントは発行できないため、適宜ガーベッジコレクション等を行う。   The idle timer queue 520 is connected to timer queue elements whose processing has been completed after the timer has counted up, that is, timer queue elements that have been used up. If there is no empty timer queue element, a new timer event cannot be issued, so garbage collection is performed as appropriate.

新規なタイマキュー要素をタイマキュー540等に接続する場合、タイマキュー540等にタイマキュー要素535等がある場合は差分タイマ値を計算して新規なタイマキュー要素をタイマキューに接続する。一方、タイマキュー要素が無い場合は、タイマキュー540等の先頭にタイマ値210をそのまま設定して新規なタイマキュー要素をそのまま接続する。   When a new timer queue element is connected to the timer queue 540 or the like, and there is a timer queue element 535 or the like in the timer queue 540 or the like, a differential timer value is calculated and the new timer queue element is connected to the timer queue. On the other hand, when there is no timer queue element, the timer value 210 is set as it is at the head of the timer queue 540 or the like, and a new timer queue element is connected as it is.

次に、タイマイベントのタイムアップする回数を減らすことができるタイマ管理装置および方法について以下、図18(a)、(b)を用いて説明する。図18(a)及び(b)は実施の形態における周期タイマイベントの動作をタイムチャートで示す。図18(a)に示すように、例えば、周期起動時間が1秒毎の周期タイマイベント1と周期起動時間が2秒毎の周期タイマイベント2があるものとする。この場合、時間的位相合わせができていないと、すなわちタイマイベント1とタイマイベント2とが非同期であると、タイマイベント1がT2、T3、T5、T6およびT8の計5回発生し、タイマイベント2がT1、T4およびT7の計3回発生し、総計8回発生している。   Next, a timer management apparatus and method that can reduce the number of times the timer event times up will be described below with reference to FIGS. 18 (a) and 18 (b). FIGS. 18A and 18B are time charts showing the operation of the periodic timer event in the embodiment. As shown in FIG. 18A, for example, it is assumed that there is a periodic timer event 1 with a periodic activation time of 1 second and a periodic timer event 2 with a periodic activation time of 2 seconds. In this case, if time phase alignment is not achieved, that is, if timer event 1 and timer event 2 are asynchronous, timer event 1 occurs five times in total, T2, T3, T5, T6, and T8. 2 occurs 3 times in total, T1, T4 and T7, and 8 times in total.

一方、図18(b)に示すように2つの周期タイマイベント1およびタイマイベント2が発生する時間的位相を合わせることによって、タイミングT12、T14およびT16で2つのタイマイベント1とタイマイベント2とを同時にタイムアップさせることができる。これによって、タイマイベントの発生回数を8回から5回に減らすことができる。以下、2つのタイマイベントの時間的位相を合わせる方法について説明する。図18(b)に示されるように、周期タイマイベント2を起動させる時(Tz)は、タイマキュー上ですでに動いている他の周期タイマイベント1の時間的位相に合わせてタイマイベント2の発行時間を調整し、タイマキューに接続を行う。   On the other hand, as shown in FIG. 18B, two timer events 1 and 2 are obtained at timings T12, T14, and T16 by matching the temporal phases at which the two periodic timer events 1 and 2 occur. The time can be increased at the same time. As a result, the number of occurrences of the timer event can be reduced from 8 times to 5 times. Hereinafter, a method of matching the temporal phases of two timer events will be described. As shown in FIG. 18B, when the periodic timer event 2 is activated (Tz), the timer event 2 is synchronized with the time phase of another periodic timer event 1 that is already running on the timer queue. Adjust the issue time and connect to the timer queue.

タイマイベント2の登録を行う時(Tz)、他の周期タイマイベント1のタイムアップ時間T12とTzとの差分Δt=T12−Tzを計算して、このΔtを周期タイマイベント2の初めの(1回目の)タイマ値として設定する。すなわちタイマ値=Δt、タイマ動作種別=周期、周期起動時間=周期起動したい時間等に設定する。このように他の周期タイマイベント1の発生周期(=1)に同期するように、最初の1回だけタイマイベント2のタイマ値を本来の周期起動時間(=2)ではなくΔtに設定する。T12で一度同期がとれると、後はT14、T16とも同期がとれていくことになる。この結果ハードウェアタイマが発生するタイマ割り込みの回数を減らすことができる。したがってタイマ割り込み等によりCPUが起動されて消費される電力を減らすことができるため、携帯電話等の電池駆動型のシステムの場合には大きく省電力化を測ることができる。   When registering the timer event 2 (Tz), the difference Δt = T12−Tz between the time-up times T12 and Tz of the other periodic timer event 1 is calculated, and this Δt is set to the first (1 Set as timer value. That is, timer value = Δt, timer operation type = cycle, period activation time = period desired to be activated periodically, etc. As described above, the timer value of the timer event 2 is set to Δt instead of the original period start time (= 2) so as to synchronize with the generation period (= 1) of another periodic timer event 1 in this way. Once synchronization is achieved at T12, T14 and T16 are also synchronized thereafter. As a result, the number of timer interrupts generated by the hardware timer can be reduced. Therefore, since the power consumed when the CPU is activated by a timer interrupt or the like can be reduced, power saving can be greatly measured in the case of a battery-driven system such as a mobile phone.

例えば、周期起動時間が6の周期タイマイベントに周期起動時間が12の周期タイマイベントと72のタイマイベントが追加される場合の動作を説明する。周期起動時間が6の周期に時間的位相を合わせて、周期起動時間が12、起動時間が72のタイマイベントを発行する。両タイマイベントに対応するタイマキュー要素がタイマキューに接続される。この場合、周期起動時間の6、12、72には最大公約数6があるので、周期起動時間が12、72の2つのタイマイベントを追加しても、CPUがタイマイベントを処理するために起動される回数は増えない。最大公約数があれば、メモリ等の条件を除いて追加されるタイマイベントの数に制限はない。   For example, an operation when a periodic timer event with a periodic activation time of 12 and a timer event with a period of 72 are added to a periodic timer event with a periodic activation time of 6 will be described. A timer event with a periodical activation time of 12 and an activation time of 72 is issued in accordance with the time phase of the periodical activation time of 6. Timer queue elements corresponding to both timer events are connected to the timer queue. In this case, since there is the greatest common divisor 6 in the cyclic activation times 6, 12, and 72, even if two timer events with the cyclic activation times 12 and 72 are added, the CPU is activated to process the timer event. The number of times played is not increased. With the greatest common divisor, there is no limit to the number of timer events that can be added except for conditions such as memory.

逆に周期起動時間が72のイベントに周期起動時間が6のタイマイベントを接続する場合も同様である。周期起動時間が72のイベントに周期起動時間が6のタイマイベントを接続する場合、72と6との最大公約数は6であるので、周期起動時間が72のタイマイベントがタイムアップする時刻tから6×n時間を引いた数が0になる最大のnを与えるタイミングで、周期起動時間が6のイベントを発行してタイマキューに接続すればよい。最大のnを与えるタイミングとするのは、最も早いタイミングとするためである。   Conversely, the same applies when a timer event with a periodical activation time of 6 is connected to an event with a periodical activation time of 72. When a timer event with a periodic activation time of 6 is connected to an event with a periodic activation time of 72, the greatest common divisor between 72 and 6 is 6, so that the timer event with a periodic activation time of 72 times out It is only necessary to issue an event with a periodical activation time of 6 and connect to the timer queue at the timing of giving the maximum n that the number obtained by subtracting 6 × n hours becomes 0. The reason for giving the maximum n is to make it the earliest timing.

周期起動時間が互いに素な場合の例を示す。周期起動時間が5のタイマイベントが動作中に、周期起動時間が3のタイマイベントを発行するものとする。このとき周期起動時間が5のイベントと周期起動時間が3のイベントとは互いに素である、すなわち互いに素数で公約数かない。この場合は、周期起動時間が3と5との最小公倍数15(3×5)となる時間に2つのタイマイベントの発生が重なるように、周期起動時間が3のタイマイベントの発行タイミングを調整すればよい。   An example in the case where the cyclic start times are disjoint will be shown. Assume that a timer event with a periodical activation time of 3 is issued while a timer event with a periodical activation time of 5 is operating. At this time, an event having a periodic activation time of 5 and an event having a periodic activation time of 3 are relatively prime, that is, they are prime and not a common divisor. In this case, the timer event issuance timing is adjusted so that the occurrence of two timer events overlaps the time when the cyclic activation time is the least common multiple 15 (3 × 5) of 3 and 5. That's fine.

以上より、実施の形態によれば、周期タイマイベント間の時間的位相合わせを行うことによってハードウェアタイマのタイムアップする回数を減らすことができるため、タイマ割り込み等によりCPUが起動されて消費される電力を減らすことができる。   As described above, according to the embodiment, since the number of times the hardware timer times up can be reduced by performing time phase alignment between periodic timer events, the CPU is started and consumed by a timer interrupt or the like. Electric power can be reduced.

特開2000−259429(図5、及び図12)JP 2000-259429 (FIGS. 5 and 12)

しかしながら、システム全体の消費電力を考えた場合、従来技術では、タイマイベント以外のCPUの起動回数を減らすことができないので省電力効果が少ないという問題がある。その理由としては、予め初期設定としてタイマイベントの発生周期を設定する必要があり、タイマイベントのように仕様として周期が明確になっている割り込み処理にしか適用出来ず、タイミング調整対象が限定されてしまっているためである。   However, when considering the power consumption of the entire system, the prior art has a problem in that the power saving effect is small because the number of CPU activations other than timer events cannot be reduced. The reason for this is that it is necessary to set the timer event generation cycle as an initial setting in advance, and it can be applied only to interrupt processing whose cycle is clear as a specification, such as a timer event, and the timing adjustment target is limited. This is because it is trapped.

また、複数のイベントの割り込み処理発生タイミングを合わせる際に、割り込み発生周期の倍数、約数関係を抽出し、それらの関係が抽出できない場合は、互いの周期に最小公倍数の関係がある場合のみタイミングを合わせるため、調整対象のタイミングが限定されてしまう。   In addition, when matching the interrupt processing generation timing of multiple events, if the relationship between the multiples and divisors of the interrupt generation cycle is extracted and the relationship cannot be extracted, the timing is only when the cycle has the least common multiple relationship. Therefore, the timing for adjustment is limited.

したがって、従来技術では、割り込み発生周期に倍数、約数の関係がない場合、それぞれの割り込み発生周期の最小公倍数でしか、発生タイミングを合わせることができない。そのため、同期化対象となるIPが少なく、電源電圧を復帰する回数が多く省消費電力効果も小さい。   Therefore, in the prior art, when there is no relation between a multiple and a divisor in the interrupt generation period, the generation timing can be matched only with the least common multiple of the respective interrupt generation periods. For this reason, the number of IPs to be synchronized is small, the power supply voltage is restored many times, and the power saving effect is small.

本発明に係るプロセッサは、複数の割り込み発生回路からの割り込み要求を調整するプロセッサであって、各割り込み発生回路からの割り込み要求の周期を算出すると共にその周期性を判定する割り込み周期判定部と、各割り込み発生回路について、割り込み要求を発生した割り込み要求元回路と同期化できる対象である割り込み同期化対象回路であるか否かを検出する同期化検出部と、前記割り込み要求元回路とその同期化対象回路との間で、次回割り込み発生タイミングの時間差を検出する割り込み時間差検出部と、前記割り込みタイミング時間差が予め定められた時間以内である場合、前記割り込み要求元回路の割り込み処理開始時間を、前記次回割り込み発生タイミング時間差だけ遅らせる次回割り込み発生タイミングの調整を行う割り込み処理時間調整部とを有するものである。   A processor according to the present invention is a processor that adjusts interrupt requests from a plurality of interrupt generation circuits, calculates an interrupt request period from each interrupt generation circuit, and determines an interrupt period determination unit; For each interrupt generation circuit, a synchronization detection unit that detects whether or not the interrupt synchronization target circuit is a target that can be synchronized with the interrupt request source circuit that generated the interrupt request, and the interrupt request source circuit and its synchronization An interrupt time difference detection unit that detects a time difference of next interrupt generation timing with the target circuit, and when the interrupt timing time difference is within a predetermined time, the interrupt processing start time of the interrupt request source circuit is Adjust the next interrupt generation timing by delaying the next interrupt generation timing time difference. Those having a interrupt processing time adjuster.

本発明に係るプロセッサの制御方法は、複数の割り込み発生回路からの割り込み要求を調整するプロセッサであって、各割り込み発生回路からの割り込み要求の周期を算出すると共にその周期性を判定し、各割り込み発生回路について、割り込み要求を発生した割り込み要求元回路と同期化できる対象である割り込み同期化対象回路であるか否かを検出し、前記割り込み要求元回路とその同期化対象回路との間で、次回割り込み発生タイミングの時間差を検出し、前記割り込みタイミング時間差が予め定められた時間以内である場合、前記割り込み要求元回路の割り込み処理開始時間を、前記次回割り込み発生タイミング時間差だけ遅らせる次回割り込み発生タイミングの調整を行うものである。   The processor control method according to the present invention is a processor that adjusts interrupt requests from a plurality of interrupt generation circuits, calculates a cycle of interrupt requests from each interrupt generation circuit, determines its periodicity, For the generation circuit, it is detected whether or not it is an interrupt synchronization target circuit that is a target that can be synchronized with the interrupt request source circuit that generated the interrupt request, and between the interrupt request source circuit and the synchronization target circuit, When the time difference of the next interrupt generation timing is detected and the time difference of the interrupt timing is within a predetermined time, the interrupt processing start time of the interrupt request source circuit is delayed by the time difference of the next interrupt generation timing. Make adjustments.

本発明においては、割り込み要求の周期性を判断し、周期性のあるもののうち、所定の範囲内に割り込みが生じる割り込み発生回路を抽出し、割り込みタイミングを調節するため、従来に比して、更に消費電力を低減することができる。   In the present invention, the periodicity of the interrupt request is determined, and among the periodic ones, an interrupt generation circuit that generates an interrupt within a predetermined range is extracted, and the interrupt timing is adjusted. Power consumption can be reduced.

本発明によれば、消費電力を低減することができるプロセッサ及びその制御方法を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the processor which can reduce power consumption, and its control method can be provided.

本発明の実施の形態にかかるマルチプロセッサ及び電源スイッチ搭載回路を有する割り込み制御システムを示すブロック図である。1 is a block diagram showing an interrupt control system having a multiprocessor and a power switch mounted circuit according to an embodiment of the present invention. 本発明の実施の形態におけるCPU回路部を示す模式図である。It is a schematic diagram which shows the CPU circuit part in embodiment of this invention. 本発明の実施の形態における割り込み処理のタイミング調整の処理を示すフローチャート図である。It is a flowchart figure which shows the process of the timing adjustment of the interruption process in embodiment of this invention. 本発明の実施の形態における周期算出動作の例を示すフローチャート図である。It is a flowchart figure which shows the example of the period calculation operation | movement in embodiment of this invention. 本発明の実施の形態における処理開始タイミング補正用データ120の構成例を示す図である。It is a figure which shows the structural example of the data 120 for process start timing correction in embodiment of this invention. 本発明の実施の形態における割込み処理期間データ保存部119の構成例を示す図である。It is a figure which shows the structural example of the interruption process period data storage part 119 in embodiment of this invention. 本発明の実施の形態における周期性判定動作の例を示すフローチャート図である。It is a flowchart figure which shows the example of the periodicity determination operation | movement in embodiment of this invention. 本発明の実施の形態にかかる割り込みインターバルデータレジスタ115の構成例を示す図である。It is a figure which shows the structural example of the interrupt interval data register 115 concerning embodiment of this invention. 本発明の実施の形態における同期化対象検出動作の例を示すタイムチャート図である。It is a time chart figure which shows the example of the synchronous object detection operation | movement in embodiment of this invention. 同じく、本発明の実施の形態における同期化対象検出動作の例を示すタイムチャート図である。Similarly, it is a time chart showing an example of a synchronization target detection operation in the embodiment of the present invention. 本発明の実施の形態における割り込み発生タイミングの時間差検出動作の例を示すフローチャート図である。It is a flowchart figure which shows the example of the time difference detection operation | movement of the interruption generation timing in embodiment of this invention. 本発明の実施の形態における次回割込み発生時間差を説明する図である。It is a figure explaining the next interruption generation | occurrence | production time difference in embodiment of this invention. 同じく、本発明の実施の形態における次回割込み発生時間差を説明する図である。Similarly, it is a figure explaining the next interruption generation | occurrence | production time difference in embodiment of this invention. 同じく、本発明の実施の形態における次回割込み発生時間差を説明する図である。Similarly, it is a figure explaining the next interruption generation | occurrence | production time difference in embodiment of this invention. 本発明の実施の形態における割り込み発生タイミングの重複判定動作の例を示すフローチャート図である。It is a flowchart figure which shows the example of duplication determination operation | movement of the interruption generation timing in embodiment of this invention. 本発明の実施の形態における最大Wait時間判定動作の例を示すフローチャート図である。It is a flowchart figure which shows the example of the maximum Wait time determination operation | movement in embodiment of this invention. (a)及び(b)は本発明の割込み処理wait指示の実施例を示すタイムチャート図である。(A) And (b) is a time chart figure which shows the Example of the interruption process wait instruction | indication of this invention. (a)及び(b)は、それぞれ従来及び本発明の実施の形態における動作の例を示すタイムチャート図である。(A) And (b) is a time chart figure which shows the example of operation | movement in the conventional example and embodiment of this invention, respectively. 特許文献1に記載のタイマ管理装置を示すブロック図である。10 is a block diagram showing a timer management device described in Patent Document 1. FIG. (a)及び(b)は実施の形態における周期タイマイベントの動作をタイムチャートで示す。(A) And (b) shows the operation | movement of the periodic timer event in embodiment with a time chart.

以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。この実施の形態は、本発明を、電源スイッチシステムの割り込み制御を行う割り込み制御システムに適用したものである。   Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In this embodiment, the present invention is applied to an interrupt control system that performs interrupt control of a power switch system.

本実施の形態においては、電源スイッチシステムの割り込み制御において、CPUの電源復帰の処理時間と割り込み要求元の割り込み処理時間の時間内で割り込み発生タイミングを合わせるための同期化対象IPを選定する処理と、CPUの電源の復帰の処理時間と割り込み要求元の割り込み処理時間の時間内で割り込み発生タイミングを合わせるための割り込み発生タイミングの重複を判定する処理と、CPUの電源の復帰の処理時間と割り込み要求元の割り込み処理時間の時間内で割り込み発生タイミングを合わせるための割り込み処理開始の時間を調整する処理とを実施する。これにより、従来技術以上の省消費電力効果を得ることができる。   In the present embodiment, in the interrupt control of the power switch system, a process of selecting a synchronization target IP for matching the interrupt generation timing within the CPU power recovery processing time and the interrupt request source interrupt processing time CPU power recovery processing time and interrupt request source interrupt processing time to determine the interrupt generation timing overlap to match the interrupt generation timing, CPU power recovery processing time and interrupt request A process for adjusting the interrupt processing start time for adjusting the interrupt generation timing within the original interrupt processing time is performed. Thereby, it is possible to obtain a power saving effect that is higher than that of the prior art.

図1Aは、本実施の形態にかかるマルチプロセッサ及び電源スイッチ搭載回路を有する割り込み制御システムを示すブロック図である。図1に示すように、本実施の形態にかかる割り込み制御システム100は、複数の割り込み発生回路としてのIP(Intellectual Property)101、102、103と、マルチプロセッサシステム104と、割り込み制御装置121とを有する。   FIG. 1A is a block diagram showing an interrupt control system having a multiprocessor and a power switch mounting circuit according to the present embodiment. As shown in FIG. 1, an interrupt control system 100 according to the present embodiment includes IP (Intellectual Property) 101, 102, 103 as a plurality of interrupt generation circuits, a multiprocessor system 104, and an interrupt control device 121. Have.

マルチプロセッサシステム104は、割り込みコントローラ105、電源スイッチ回路106、107、CPU回路部108、109を有する。   The multiprocessor system 104 includes an interrupt controller 105, power switch circuits 106 and 107, and CPU circuit units 108 and 109.

マルチプロセッサシステム104内で、各CPU回路部108、109は、電源VDDに接続された電源スイッチ回路部106、107にそれぞれ接続され、各電源スイッチ回路部106、107は割り込みコントローラ105と接続される。電源スイッチ回路部106、107は各CPU回路部108、109の動作中かアイドル中かの状態によって各CPU回路部108、109、もしくは、割り込みコントローラ105によって制御される。各IP101、102、103が出力する各割り込み信号は割り込みコントローラ105に接続されるとともに、各時間差検出回路112、113、114に接続される。   In the multiprocessor system 104, the CPU circuit units 108 and 109 are connected to the power switch circuit units 106 and 107 connected to the power supply VDD, respectively, and the power switch circuit units 106 and 107 are connected to the interrupt controller 105. . The power switch circuit units 106 and 107 are controlled by the CPU circuit units 108 and 109 or the interrupt controller 105 depending on whether the CPU circuit units 108 and 109 are operating or idle. Each interrupt signal output from each IP 101, 102, 103 is connected to the interrupt controller 105 and also connected to each time difference detection circuit 112, 113, 114.

割り込みインターバル検出システム110は、各時間差検出回路112、113、114とインターバルデータレジスタ115、116、117とタイマ回路部111とを有する。各時間差検出回路112、113、114は接続されたタイマ回路部111を使用して各IP101、102、103からの割り込み要求が発生時間間隔を算出して、結果を各インターバルデータレジスタ115、116、117に出力する。各インターバルデータレジスタ115、116、117は、FIFO(First-In First-Out)構造のレジスタで構成されていて、出力はデータバスを介してCPU回路部108、109で使用される。   The interrupt interval detection system 110 includes time difference detection circuits 112, 113, 114, interval data registers 115, 116, 117, and a timer circuit unit 111. Each time difference detection circuit 112, 113, 114 uses the connected timer circuit unit 111 to calculate the time interval at which an interrupt request from each IP 101, 102, 103 occurs, and the result is sent to each interval data register 115, 116, It outputs to 117. Each of the interval data registers 115, 116, 117 is composed of a FIFO (First-In First-Out) register, and the output is used by the CPU circuit units 108, 109 via a data bus.

また、メモリ領域118は、割込み処理期間データ保存部119及び処理開始タイミングの補正用データ保存部120を有する。これらの保存部に保存されるデータは、データバスを介して各CPU回路部108、109に読み出されて処理に使用される。それぞれのIP101、102、103は、割り込みコントローラ105を介してCPU回路部108、109のいずれかに割込要求を行い、割り込み要求が受け付けられた場合、データバスを介してCPU回路部108、109のいずれかにによって制御される。   The memory area 118 includes an interrupt processing period data storage unit 119 and a processing start timing correction data storage unit 120. Data stored in these storage units is read out to the CPU circuit units 108 and 109 via the data bus and used for processing. Each of the IPs 101, 102, 103 issues an interrupt request to one of the CPU circuit units 108, 109 via the interrupt controller 105, and when an interrupt request is accepted, the CPU circuit units 108, 109 via the data bus. Controlled by either.

図1Bは、CPU回路部108、CPU回路部109を示す模式図である。図1Bに示すように、CPU回路部108、CPU回路部109は、複数のIP101、102、103からの割り込み要求を調整するプロセッサであって、各IPからの割り込み要求の周期を算出すると共にその周期性を判定する機能(割り込み周期判定部)と、各IPについて、割り込み要求を発生した割り込み要求元IPと同期化できる対象である同期化対象IPであるか否かを検出する機能(同期化検出部)と、割り込み要求元IPとその同期化対象IPとの間で、次回割り込み発生タイミングの時間差を検出する機能(割り込み時間差検出部)と、割り込みタイミング時間差が予め定められた時間以内である場合、割り込み要求元IPの割り込み処理開始時間を、次回割り込み発生タイミング時間差だけ遅らせる次回割り込み発生タイミングの調整を行う機能(割り込み処理時間調整部)とを有する。なお、これらのCPU回路部108、109が実行する割り込み制御処理は、CPU回路部108、109にコンピュータプログラムを実行させることにより実現することが可能である。この場合、コンピュータプログラムは、記録媒体に記録して提供することも可能であり、また、インターネットその他の伝送媒体を介して伝送することにより提供することも可能である。   FIG. 1B is a schematic diagram showing the CPU circuit unit 108 and the CPU circuit unit 109. As shown in FIG. 1B, the CPU circuit unit 108 and the CPU circuit unit 109 are processors that adjust interrupt requests from a plurality of IPs 101, 102, and 103, calculate the period of interrupt requests from each IP, and A function for determining periodicity (interrupt period determining unit) and a function for detecting whether each IP is a synchronization target IP that can be synchronized with the interrupt request source IP that generated the interrupt request (synchronization) Detection unit), a function for detecting a time difference of the next interrupt generation timing (interrupt time difference detection unit) between the interrupt request source IP and the synchronization target IP, and the interrupt timing time difference is within a predetermined time. If the next interrupt occurs, the interrupt processing start time of the interrupt request source IP is delayed by the next interrupt generation timing difference. Function of adjusting the timing and a (interrupt processing time adjuster). The interrupt control processing executed by the CPU circuit units 108 and 109 can be realized by causing the CPU circuit units 108 and 109 to execute computer programs. In this case, the computer program can be provided by being recorded on a recording medium, or can be provided by being transmitted via the Internet or another transmission medium.

次に、本実施の形態にかかる処理システムの動作について説明する。本実施の形態にかかる処理システムではシステム動作の初期設定として、マルチプロセッサシステム104は、電源スイッチ回路部106、107のスイッチONに要する時間、各IP101、102、103の割り込み処理に要する時間、処理開始を遅らせることが可能な最大時間(最大Wait時間)を割り込み処理期間データとして割り込み処理期間データ保存部119に予め設定する。   Next, the operation of the processing system according to this embodiment will be described. In the processing system according to the present embodiment, as an initial setting of the system operation, the multiprocessor system 104 includes a time required for turning on the power switch circuit units 106 and 107, a time required for interrupt processing of each IP 101, 102, and 103, and a process. The maximum time (maximum Wait time) during which the start can be delayed is preset in the interrupt processing period data storage unit 119 as interrupt processing period data.

本実施の形態にかかる割り込み制御システムにおいて、IP101、102、103のいずれかで割り込み要求が発生した際(以下、割り込み要求を発生したIPを割り込み要求元IPという。)、対応するIPの割り込み信号が接続された時間差検出回路112、113、114は1回前の割り込み発生からの経過時間を算出し、算出した時間を割り込み発生インターバルデータとして、それぞれの時間差検出回路112、113、114に接続されたインターバルデータレジスタ115、116、117に順次保持する。なお、本実施例では各10個のインターバルレジスタを有するものとする。   In the interrupt control system according to the present embodiment, when an interrupt request occurs in any of IPs 101, 102, and 103 (hereinafter, the IP that generated the interrupt request is referred to as an interrupt request source IP), the corresponding IP interrupt signal. Are connected to the respective time difference detection circuits 112, 113, 114 using the calculated time as the interrupt generation interval data. The interval data registers 115, 116, and 117 are sequentially held. In this embodiment, it is assumed that there are 10 interval registers each.

次に、マルチプロセッサシステム104は、割り込み要求を受け付けると、以下の手順で割り込み処理に対して処理開始タイミングの調整を行う。図2は本実施の形態における割り込み処理のタイミング調整の処理を示すフローチャート図である。図2を用いて本実施の形態における割り込み処理のタイミング調整方法について説明する。尚、各ステップの詳細については後述する。   Next, when receiving the interrupt request, the multiprocessor system 104 adjusts the processing start timing for the interrupt processing according to the following procedure. FIG. 2 is a flowchart showing timing adjustment processing for interrupt processing in the present embodiment. The interrupt processing timing adjustment method in this embodiment will be described with reference to FIG. Details of each step will be described later.

まず、割り込みコントローラ105で割り込み処理要求を受け付けたCPU回路部108、109の何れかのCPU回路部は、ステップS201で割り込みインターバル検出システム110で検出した各IPのインターバルデータレジスタ115、116、117をもとに各IP101、102、103の割り込み発生周期を算出する。   First, one of the CPU circuit units 108 and 109 that has received an interrupt processing request by the interrupt controller 105 stores the interval data registers 115, 116, and 117 of each IP detected by the interrupt interval detection system 110 in step S201. Based on the above, the interrupt generation cycle of each IP 101, 102, 103 is calculated.

次にステップS202に進み、CPU回路部108、109の何れかのCPU回路部は、算出した各IP101、102、103の割り込み発生周期に対して周期性の有無を判定する。割り込み要求元IPの割り込み発生に周期性がある場合、次のステップS203に進む。そして、割り込み要求元IPに対して割り込み発生タイミングの同期化が可能となるIP(以下、同期化対象IPという。)を割り込み要求元以外のIP101、102、103の中から検出する。   In step S202, one of the CPU circuit units 108 and 109 determines whether or not there is periodicity with respect to the calculated interrupt generation cycle of each of the IPs 101, 102, and 103. If there is periodicity in interrupt generation of the interrupt request source IP, the process proceeds to the next step S203. Then, an IP that can synchronize the interrupt generation timing with the interrupt request source IP (hereinafter referred to as a synchronization target IP) is detected from the IPs 101, 102, and 103 other than the interrupt request source.

割り込み要求元IPに対する同期化対象IPが存在した場合、次のステップS204に進み、CPU回路部108、109の何れかのCPU回路部は、ステップS203で検出した全ての同期化対象IPに対して、割り込み要求元IPとの次回割り込み発生タイミングの発生時間差の算出を行う。   If there is a synchronization target IP corresponding to the interrupt request source IP, the process proceeds to the next step S204, and any one of the CPU circuit units 108 and 109 performs the synchronization with respect to all the synchronization target IPs detected in step S203. The generation time difference of the next interrupt generation timing with the interrupt request source IP is calculated.

次のステップS205に進み、CPU回路部108、109の何れかのCPU回路部は、ステップS204で算出した次回割り込み発生タイミングの発生時間差をもとに、全ての同期化対象IPに対して、割り込み要求元IPと次回割り込み発生タイミングが重複するかの判定を行う。割り込み要求元IPと次回割り込み発生タイミングが重複しない同期化対象IPが存在した場合、次のステップS206に進み、CPU回路部108、109の何れかのCPU回路部は、ステップS204で算出した次回割り込み発生タイミングの発生時間差が、予め設定されている割り込み要求元IPの最大Wait時間以内かの判定を行う。次回割り込み発生タイミングの発生時間差が割り込み要求元IPの最大Wait時間以内であった場合、次のステップS207に進み、CPU回路部108、109の何れかのCPU回路部は、割り込み要求元IPの割り込み処理開始時間を次回割り込み発生タイミングの発生時間差分だけ遅らせて、次回割り込み発生タイミングの調整を行う。   Proceeding to the next step S205, one of the CPU circuit units 108 and 109 interrupts all the synchronization target IPs based on the time difference of the next interrupt generation timing calculated in step S204. It is determined whether the next interrupt occurrence timing overlaps with the request source IP. If there is a synchronization target IP that does not overlap the interrupt request source IP and the next interrupt generation timing, the process proceeds to the next step S206, and one of the CPU circuit units 108 and 109 determines the next interrupt calculated in step S204. It is determined whether the generation time difference between the generation timings is within a preset maximum wait time of the interrupt request source IP. If the next interrupt generation timing difference is within the maximum wait time of the interrupt request source IP, the process proceeds to the next step S207, and any one of the CPU circuit units 108 and 109 determines whether the interrupt request source IP interrupts. The next interrupt generation timing is adjusted by delaying the processing start time by the generation time difference of the next interrupt generation timing.

次に、各ステップの詳細フローについて説明する。ステップS201において、CPU回路部108、109は、周期算出は割り込み発生インターバルデータを元に算出を行う。割り込み発生インターバルデータレジスタ115,116、117は、例えば10回分の割り込み発生時間インターバルデータを保持しているものとする。なお、保持できるデータ数は搭載するレジスタの数によって可変とする。   Next, the detailed flow of each step will be described. In step S201, the CPU circuit units 108 and 109 calculate the period based on the interrupt generation interval data. Assume that the interrupt generation interval data registers 115, 116, and 117 hold, for example, 10 interrupt generation time interval data. Note that the number of data that can be held is variable depending on the number of mounted registers.

図3は本実施の形態における周期算出動作の例を示すフローチャート図である。周期の算出は図3のフローに示すように、割り込み発生周期は割り込み発生インターバルデータの平均値として算出する。   FIG. 3 is a flowchart showing an example of the cycle calculation operation in the present embodiment. As shown in the flow of FIG. 3, the cycle is calculated as the average value of the interrupt generation interval data.

各IP101、102、103毎の各インターバルデータレジスタ115、116、117の1番目のデータをI、2番目のデータをI、n番目のデータをIとした場合に、初期値として最大値MaxをIとし、総合値Totalを0とする(S20101)。2番目のデータIとMaxを比較し、Iの値がMax値より小さければTotal値にIを足す。Iの値がMax値以上であれば、Total値にMax値を足し、Max値としてIを代入する(S20102、S20103、S20104)。CPU回路部108、109は、この処理を各インターバルデータレジスタ115、116、117の保持する数の最終データであるI10まで行い、割り込み発生時間インターバルデータのTotal値を算出する(S20105)。次に、CPU回路部108、109は、算出したTotal値を各インターバルデータレジスタ115、116、117の保持するデータ数nからMax値のデータ数である1を引いた値で割って、割り込み発生周期Tを算出する(S20106)。算出した周期は処理開始タイミング補正データとして補正用データ保存部120に保持される。 Maximum first data of each interval data registers 115, 116 and 117 for each IP101,102,103 the I 1, 2-th data in the case where the I 2, n-th data and I n, as an initial value value Max and I 1, the total value total and 0 (S20101). Comparing the second data I 2 and Max, the value of I 2 is adding the I 2 to Total value smaller than the Max value. If the value of I 2 is equal to or greater than the Max value, the Max value is added to the Total value, and I 2 is substituted as the Max value (S20102, S20103, S20104). CPU circuit unit 109 performs the processing up to I 10 is the last data of the number held by each interval data registers 115, 116, 117, and calculates the Total value of the interrupt occurrence time interval data (S20105). Next, the CPU circuit units 108 and 109 divide the calculated Total value by the value obtained by subtracting 1 which is the number of data of the Max value from the number of data n held in each of the interval data registers 115, 116 and 117 to generate an interrupt. The period T is calculated (S20106). The calculated cycle is held in the correction data storage unit 120 as process start timing correction data.

図4は本実施の形態における処理開始タイミング補正用データ120の構成例を示す図である。処理開始タイミング補正データは図4のように、各IPごとの周期、周期性有無、割り込み発生までの時間、同期化対象IPの情報を保持しており、算出周期は算出周期の列に周期データとして更新される。図5は、割込み処理期間データ保存部119の構成例を示す図である。割込み処理期間データ保存部119は、割り込み処理期間と、最大wait可能時間の情報を保持している。   FIG. 4 is a diagram illustrating a configuration example of the processing start timing correction data 120 in the present embodiment. As shown in FIG. 4, the process start timing correction data holds the period for each IP, the presence / absence of periodicity, the time until the occurrence of an interrupt, and information on the synchronization target IP. As updated. FIG. 5 is a diagram illustrating a configuration example of the interrupt processing period data storage unit 119. The interrupt processing period data storage unit 119 holds information on the interrupt processing period and the maximum waitable time.

図6は本実施の形態における周期性判定動作の例を示すフローチャート図である。ステップS202の周期性判定は図6のフローに示すように、CPU回路部108、109がインターバルデータレジスタ115、116、117の値と補正用データ保存部120に保持した周期を比較して、その差分が許容誤差範囲内であることを確認することにより行う。   FIG. 6 is a flowchart showing an example of the periodicity determination operation in the present embodiment. As shown in the flow of FIG. 6, the periodicity determination in step S202 is performed by comparing the values stored in the correction data storage unit 120 with the values of the interval data registers 115, 116, and 117 by the CPU circuit units 108 and 109. This is done by confirming that the difference is within the allowable error range.

まず、CPU回路部108、109は、補正用データ保存部120から各IP101、102、103の割り込み発生周期、割り込み処理期間データ保存部119からCPU電源スイッチON処理時間を、それぞれ取得し、CPU電源スイッチON処理時間を周期性判定時の許容誤差として設定する。   First, the CPU circuit units 108 and 109 obtain the interrupt generation cycle of each of the IPs 101, 102, and 103 from the correction data storage unit 120 and the CPU power switch ON processing time from the interrupt processing period data storage unit 119, respectively. The switch ON processing time is set as an allowable error when determining periodicity.

次に、IP101のインターバルデータレジスタ115の1番目のデータをI、2番目のデータをI、n番目のデータをIとし、IP101の割り込み発生周期Tと許容誤差以上の差を有するデータIの数をNoutとし、初期値としてNoutを0とする(S20201)。インターバルデータレジスタ115の1番目のデータIと割り込み発生周期Tとの差が許容誤差以内であるかを確認し、差が許容誤差範囲より大きければ、Noutに1を追加する(S20202、S20203)。CPU回路部108、109は、この処理をインターバルデータ保持数の最終データであるI10まで行い、その途中でNoutが2以上になった場合は、対象IPの割り込み発生に周期性はないと判断し、判定処理を終了する(S20204、S20207)。Noutが2以上になることなく最終データI10の処理を終えた場合は、周期性有りと判断し、判定処理を終了する(S20205、S20206)。判定結果は処理開始タイミング補正データとして補正用データ保存部120に保持される。IP102、103も同様に判定処理を行う。 Next, the first data interval data register 115 of the IP101 to I 1, 2 th data was I 2, n-th data and I n, the data having a difference exceeding the allowable error and the interrupt generation period T of the IP101 The number of I is Nout, and Nout is set to 0 as an initial value (S20201). It is confirmed whether or not the difference between the first data I1 of the interval data register 115 and the interrupt generation period T is within the allowable error, and if the difference is larger than the allowable error range, 1 is added to Nout (S20202, S20203). . CPU circuit unit 109 performs the processing up to I 10 is the last data of the interval data holding number, if the way in Nout becomes 2 or more, determined not to periodicity in the interrupt generation of the target IP Then, the determination process ends (S20204, S20207). Nout is the After the process of final data I 10 without being 2 or more, it is determined that there is periodicity, determining processing is ended (S20205, S20206). The determination result is held in the correction data storage unit 120 as process start timing correction data. The IPs 102 and 103 perform the same determination process.

図7は、本実施の形態にかかる割り込みインターバルデータレジスタ115の構成例を示す図である。具体的に説明すると、IP101の許容誤差として図5から10μsを設定する。次に、IP101のインターバルデータレジスタ115の1番目のデータI=100μs(図7)と、割り込み発生周期100μs(図4)との差が許容誤差以内であるので、Noutを0のままとし、次のデータIの処理に移る。処理を続けて、I=250μsは、割り込み発生周期100μsとの差が許容誤差10μs以上であるので、Noutを1とする。こうして、10番目のデータまで処理を続けると、IP101については、Nout=1と求まるので、周期性あり(図4:Yes)と判断される。 FIG. 7 is a diagram illustrating a configuration example of the interrupt interval data register 115 according to the present embodiment. More specifically, 10 μs is set as the allowable error of IP101 from FIG. Next, since the difference between the first data I 1 = 100 μs (FIG. 7) of the interval data register 115 of IP 101 and the interrupt generation period 100 μs (FIG. 4) is within an allowable error, Nout is kept at 0, proceeds to process the next data I 2. Continuing the processing, I 5 = 250 μs is set so that Nout is 1 because the difference from the interrupt generation period of 100 μs is an allowable error of 10 μs or more. Thus, if the processing is continued up to the 10th data, Nout = 1 is obtained for IP101, and therefore it is determined that there is periodicity (FIG. 4: Yes).

処理開始タイミング補正データは図4のように、周期性判定結果は周期性の列に周期性有無データとして更新される。図4に示す例では、IP_103の割り込み発生周期性判定として、割り込み発生周期333μsとの差分が、図5に示す電源スイッチON処理時間10μs以上のデータが2つ以上存在するため、CPU回路部108、109により、IP_103には周期性はない(No)と判定される。   The processing start timing correction data is updated as periodicity presence / absence data in the periodicity column as shown in FIG. In the example shown in FIG. 4, as the interrupt generation periodicity determination of IP_103, there are two or more data whose difference from the interrupt generation cycle 333 μs is the power switch ON processing time 10 μs or more shown in FIG. 109, it is determined that IP_103 has no periodicity (No).

図8A、図8Bは本実施の形態における同期化対象検出動作の例を示すタイムチャート図である。図8A、図8Bのフローに、ステップS203の割り込み要求元IPに対する割り込み発生タイミングの同期化対象となりうるIPの検出方法を示す。すなわち、CPU回路部108、109は、割り込み要求元以外のIPの中から、割り込み発生周期がCPU電源スイッチON処理期間及び割り込み要求元IPの割り込み処理期間の時間内で、割り込み要求元IPの割り込み発生周期と倍数もしくは約数の関係が成立するものを抽出する。   8A and 8B are time chart diagrams illustrating an example of the synchronization target detection operation in the present embodiment. The flow of FIGS. 8A and 8B shows an IP detection method that can be a synchronization target of interrupt generation timing for the interrupt request source IP in step S203. That is, the CPU circuit units 108 and 109 interrupt the interrupt request source IP within the time between the CPU power switch ON processing period and the interrupt processing period of the interrupt request source IP among the IPs other than the interrupt request source. Extract those in which the relationship between generation cycle and multiple or divisor is established.

まず、割り込み要求元IPがIP101であった場合、CPU回路部108、109は、割り込み要求元IP101の割り込み発生周期Tの周期性有無を補正用データ保存部120から取得して判定する(S20301)。周期性がない場合は、その時点で同期化対象IPの検出を終了する。周期性がある場合は、CPU回路部108、109は、割り込み処理期間データ保存部119からIP101の割り込み処理期間、及びCPU電源スイッチON処理時間を取得する。そして、CPU回路部108、109は、割り込み要求元IPに対する割り込み重複可能期間Twの初期値として、CPUの電源スイッチON処理時間と割り込み要求元IPの割り込み処理時間を足した値を代入し、同期化対象IPの検出を始める(S20302)。IP101であれば、Twの初期値は、25μsとなる。その際、m=1として同期化対象の検出対象となる割り込みは、割り込みIDの小さい割り込みから順々に処理を始める(S20303)。なお、IP101〜IP103には、それぞれ割り込みID=1〜3が付されている。 First, when the interrupt request source IP was IP101, CPU circuit unit 109 determines to acquire the periodicity whether interrupt generation period T n of the interrupt request source IP101 from the correction data storage unit 120 (S20301 ). If there is no periodicity, the detection of the synchronization target IP is terminated at that time. If there is periodicity, the CPU circuit units 108 and 109 obtain the interrupt processing period of the IP 101 and the CPU power switch ON processing time from the interrupt processing period data storage unit 119. Then, the CPU circuit units 108 and 109 substitute the value obtained by adding the power switch ON processing time of the CPU and the interrupt processing time of the interrupt request source IP as the initial value of the interrupt overlap possibility period Tw for the interrupt request source IP, and The detection of the IP to be activated is started (S20302). In the case of IP101, the initial value of Tw is 25 μs. At that time, the interrupts to be detected as synchronization targets when m = 1 are started in order from the interrupt with the smallest interrupt ID (S20303). Note that IP101 to IP103 are assigned interrupt IDs = 1 to 3, respectively.

割り込み処理要求を受け付けたCPU回路部108又は109は割り込み要求元IPの割り込みID番号と同期化検出対象IPの割り込みID番号を比較して異なるIDであることを確認する(S20304)。異なる場合、検出した同期化対象IP(以下、同期化検出対象IPという。)の割り込み発生周期Tの周期性有無を補正用データ保存部120から取得する。この場合、同期化検出対象IPをIP102とすると、図4より周期性ありと判断される。周期性がない場合は、同期化検出対象を次の割り込みID番号のIPに移行する(S20305)。CPU回路部108、109は、周期性が有る場合は、TとTに対して約数関係の確認を行う。 The CPU circuit unit 108 or 109 that received the interrupt processing request compares the interrupt ID number of the interrupt request source IP with the interrupt ID number of the synchronization detection target IP and confirms that they are different IDs (S20304). If different, the detected synchronization target IP acquires periodicity whether interrupt generation period T m of a (hereinafter, referred to. Synchronization detection target IP) from the correction data storage unit 120. In this case, if the synchronization detection target IP is IP102, it is determined from FIG. 4 that there is periodicity. If there is no periodicity, the synchronization detection target is shifted to the IP of the next interrupt ID number (S20305). If the CPU circuit units 108 and 109 have periodicity, the CPU circuit units 108 and 109 check the divisor relationship with respect to T n and T m .

CPU回路部108、109は、TをTで割った際の余りを、Tから引いた値がT以下であった場合にTとTには約数関係が成り立つと判定し、Tより大きかった場合は約数関係が成り立たないと判定する(S20306)。約数関係が成り立った場合は、Tに同期化検出対象IPの割り込み処理時間を追加し(S20308)、割り込み要求元IPの同期化対象IPに同期化検出対象IPを追加する(S20309)。追加した同期化対象IPは補正データ保存部120として保持される。ステップS20306で、約数関係が成り立たない場合は、CPU回路部108、109は、TとTに対して倍数関係の確認を行う。TをTで割った際の余りがTw以下であった場合にTとTには倍数関係が成り立つ判定し、Tより大きかった場合は倍数関係が成り立たないと判定する(S20307)。倍数関係が成り立った場合は、割り込み要求元IPの同期化対象IPに同期化検出対象IPを追加する。追加した同期化対象IPは補正データ保存部120として保持される(S20309)。ステップS20307で、倍数関係が成り立たない場合は同期化検出対象を次の割り込みID番号のIPに移行する。これらの処理を全ての割り込みIDに対して行い、同期化対象IPの検出を行う(S20310、S20311)。 CPU circuit unit 108 and 109, determines the T n a remainder when divided by T m, the T n and T m if the value obtained by subtracting from the T m is less than or equal to T w and divisor relationship holds and, in the case it was greater than T w determined that about a few relationship is not satisfied (S20306). If divisor relationship is composed, add the interrupt processing time of the synchronization detection target IP to T w (S20308), adds a synchronization detection target IP interrupt request source IP to be synchronized IP (S20309). The added synchronization target IP is held as the correction data storage unit 120. In step S20306, if the divisor relationship does not hold, CPU circuit unit 109 performs confirmation of a multiple relationship to T n and T m. The T m is determined ploidy is established to T n and T m when the remainder when divided by T n is equal to or less than Tw, determines that does not hold ploidy if greater than T w (S20307 ). When the multiple relationship holds, the synchronization detection target IP is added to the synchronization target IP of the interrupt request source IP. The added synchronization target IP is held as the correction data storage unit 120 (S20309). In step S20307, if the multiple relationship does not hold, the synchronization detection target is shifted to the IP of the next interrupt ID number. These processes are performed for all interrupt IDs, and synchronization target IPs are detected (S20310, S20311).

図4に示す例では、IP_101の同期化対象IPとしてIP_102が検出されている。CPU回路部108、109は、図4の補正用データ保存部120から、割り込み要求元IP_101の割り込み発生に周期性があることを確認し、IP_101の割り込み発生周期100μs(Tn)を取得する。次に、CPU回路部108、109は、割り込み重複可能期間Twとして図5の割り込み処理期間データ保存部119から取得したIP_101の割り込み処理期間15μsとCPU電源スイッチON処理期間10μsを足した25μsを設定する。そして、CPU回路部108、109は、図4の補正用データ保存部120から同期化対象の検出対象IP_102の割り込み発生に周期性があることを確認し、IP_102の割り込み発生周期210μs(Tm)を取得する。すなわち、ここでは、割り込み要求元IP101の割り込み発生周期Tnは、図4より100μs、同期化対象IP(IP102)の割り込み発生周期Tmは210μsである。   In the example shown in FIG. 4, IP_102 is detected as the synchronization target IP of IP_101. The CPU circuit units 108 and 109 confirm from the correction data storage unit 120 in FIG. 4 that the interrupt generation of the interrupt request source IP_101 has periodicity, and acquire the interrupt generation cycle 100 μs (Tn) of IP_101. Next, the CPU circuit units 108 and 109 set 25 μs, which is the sum of the interrupt processing period 15 μs of IP_101 acquired from the interrupt processing period data storage unit 119 of FIG. 5 and the CPU power switch ON processing period 10 μs, as the interrupt overlap possibility period Tw. To do. Then, the CPU circuit units 108 and 109 confirm from the correction data storage unit 120 in FIG. 4 that the generation of the interrupt of the synchronization target detection target IP_102 has periodicity, and set the IP_102 interrupt generation cycle of 210 μs (Tm). get. That is, here, the interrupt generation cycle Tn of the interrupt request source IP101 is 100 μs from FIG. 4, and the interrupt generation cycle Tm of the synchronization target IP (IP102) is 210 μs.

そして、CPU回路部108、109は、取得した割り込み要求元IP_101と同期化対象の検出対象IP_2、それぞれの割り込み発生周期に対して約数関係の確認を行う。IP_101の割り込み発生周期100μsをIP_102の割り込み発生周期210μsで割った場合の余りは、100μsとなり、割り込み重複可能期間25μsより大きいので、約数関係は成立しない。次に、CPU回路部108、109は、倍数関係の確認を行う。IP_102の割り込み発生周期210μsをIP_101の割り込み発生周期100μsで割った場合の余りは、10μsとなり、割り込み重複可能期間25μs以下となるため、IP_102をIP_101の同期化対象IPとして補正用データ保存部120に追加する。   Then, the CPU circuit units 108 and 109 check the divisor relation for the acquired interrupt request source IP_101 and the detection target IP_2 to be synchronized and the respective interrupt generation cycles. The remainder of dividing the IP_101 interrupt generation period of 100 μs by the IP_102 interrupt generation period of 210 μs is 100 μs, which is greater than the interrupt overlap possible period of 25 μs. Next, the CPU circuit units 108 and 109 confirm the multiple relationship. When the interrupt generation period 210 μs of IP_102 is divided by the interrupt generation period 100 μs of IP_101, the remainder is 10 μs, and the interrupt overlap possible period is 25 μs or less. to add.

図9は割り込み発生タイミングの時間差検出動作の例を示すフローチャート図である。テップS204の割り込み発生タイミング時間差検出動作について図9のフローチャートを用いて処理を説明する。本ステップにおいては、CPU回路部108、109は、割り込み要求元IPとその同期化対象IPとの間の割り込み発生タイミング時間差Tを検出する。 FIG. 9 is a flowchart showing an example of the time difference detection operation of the interrupt generation timing. The processing of the interrupt generation timing time difference detection operation in step S204 will be described with reference to the flowchart of FIG. In this step, CPU circuit unit 109 detects the interrupt generation timing time difference T A between the interrupt request source IP and its synchronization target IP.

割り込み発生タイミングの時間差検出処理は補正データ保存部120に登録された割り込み要求元IPの同期化対象IP(以下、割り込み発生タイミング時間差検出対象という。)に対してのみ行う。その際、CPU回路部108、109は、m=1にセットしてからmをインクリメント(+1)し、IPの同期化対象IPの数を確認しながら割り込み発生タイミング時間差検出対象を、割り込みIDの小さいIPから順々に処理する。(S20401、S20409、S204010)   The time difference detection process of the interrupt generation timing is performed only for the synchronization request IP (hereinafter referred to as the interrupt generation timing time difference detection target) of the interrupt request source IP registered in the correction data storage unit 120. At that time, the CPU circuit units 108 and 109 set m = 1, then increment m (+1), and check the interrupt generation timing time difference detection target while checking the number of IP synchronization target IPs. Process in order from the smallest IP. (S20401, S20409, S204010)

まず、CPU回路部108、109は、割り込み要求元IPの割り込み発生周期T、割り込み発生タイミング時間差検出対象IPの割り込み発生周期T、割り込み発生タイミング時間差検出対象IPの次回割り込み発生時間Tm2(図4の割り込み発生までの時間)を補正用データ保存部120から取得する。次に、TがTより小さいかどうかを判断し(S20402)、TがTより小さかった場合は、TからTm2を引いた値をTで割った際の余りCをTから引いた値T−C=Tを次回割込み発生時間差とする(S20403、S20407)(図10参照)。 First, the CPU circuit units 108 and 109 generate the interrupt generation period T n of the interrupt request source IP, the interrupt generation period T m of the interrupt generation timing time difference detection target IP, and the next interrupt generation time T m2 ( 4) is acquired from the correction data storage unit 120. Next, T m is determined whether T n is less than (S20402), if T m is less than T n, the remainder C when obtained by dividing a value obtained by subtracting the T m2 from T n with T m T m was subtracted from the value T m -C = T a to the next interrupt occurrence time difference (S20403, S20407) (see FIG. 10).

そして、CPU回路部108、109は、TがT以上の場合は、Tm2がTより小さいかどうかを判断し(S20404)、Tm2がTより小さかった場合は、TとTm2を足した値からTを引いた値T+Tm2−T=Tを次回割込み発生時間差とする(S20405、S20408)(図11参照)。Tm2がT以上の場合は、Tm2からTを引いた値Tm2−T=TAを次回割込み発生時間差とする(S20406、S20408)(図12参照)。 Then, if T m is equal to or greater than T n , the CPU circuit units 108 and 109 determine whether T m2 is smaller than T n (S20404). If T m2 is smaller than T n , T m2 is determined as T m . T m2 minus T n from the value obtained by adding the value T m + T m2 -T n = T a to the next interrupt occurrence time difference (S20405, S20408) (see FIG. 11). T m2 is equal to or larger than T n, a value obtained by subtracting T n from T m2 T m2 -T n = T A to the next interrupt occurrence time difference (S20406, S20408) (see FIG. 12).

そして、CPU回路部108、109は、mの値を+1増加して(S20408)前記の処理を全ての同期化対象IPに対して行い、mの値が同期化対象IPの数と同じになるまで同期化対象IPそれぞれとの次回割り込み発生タイミング時間差検出を行う(S20407)。   Then, the CPU circuit units 108 and 109 increase the value of m by +1 (S20408) and perform the above processing for all the synchronization target IPs, and the value of m becomes the same as the number of synchronization target IPs. Until next time, the next interrupt generation timing difference detection with each synchronization target IP is detected (S20407).

図13は割り込み発生タイミングの重複判定動作の例を示すフローチャート図である。ステップS205の割り込み発生タイミングの重複判定について図13のフローチャートを用いて処理を説明する。   FIG. 13 is a flowchart showing an example of the operation for determining the overlap of interrupt generation timing. The process for determining the duplication of the interrupt generation timing in step S205 will be described with reference to the flowchart of FIG.

割込み発生タイミングの重複判定は補正データ保存部120に登録された割込み要求元IPの同期化対象IPに対してのみ行う。その際、重複判定対象は、ステップS204で検出した次回割込み要求発生時間差の小さいIPから順々に処理する。   The duplication determination of the interrupt generation timing is performed only for the synchronization target IP of the interrupt request source IP registered in the correction data storage unit 120. At that time, the overlap determination target is processed in order from the IP with the small difference in the next interrupt request occurrence time detected in step S204.

まず、CPU回路部108、109は、割込み処理期間データ保存部119からCPU電源スイッチON処理期間と割込み要求元IPの割込み処理時間を取得し、それらを足した値を割込み要求元IPに対する割込み重複可能期間Tの初期値として設定する。また、次回割込み要求発生時間差の最大値Tmaxの初期値として0を設定する。また、割込み発生タイミング重複判定対象IPをIP_mとして、ステップS204で検出した次回割込み要求発生時間差が最小のIPを設定する(S20501)。
次にステップS204で検出した割込み要求元IPとIP_mとの次回割込み要求発生時間差Tが割込み要求元IPの割込み発生周期Tより小さいかの比較を行う(S20502)。TがT以上だった場合は(S20502)、mの値が同期化対象IPの数と同じになるまで重複判定対象IPを次のIPに変更する(S20506、S20507)。次回割り込み発生時間差TがTより大きい場合、例えば図11に示すように、IP2_POS2に対し、IP1_POS2との間に、IP1_POS3が存在し、このIP1_POS3との同期化を図るべきであるため、このようなペアは、同期化対象から排除する。
First, the CPU circuit units 108 and 109 obtain the CPU power switch ON processing period and the interrupt processing time of the interrupt request source IP from the interrupt processing period data storage unit 119, and add the values to the interrupt duplication for the interrupt request source IP. It is set as an initial value of the period T w. Further, 0 is set as an initial value of the maximum value T max of the next interrupt request occurrence time difference. Further, the interrupt occurrence timing duplication determination target IP is set to IP_m, and the IP having the smallest difference in the next interrupt request occurrence time detected in step S204 is set (S20501).
Then the next interrupt request occurrence time difference T A between the detected interrupt request source IP and IP_m is to compare the interrupt request source IP interrupt generation cycle T n is less than in the step S204 (S20502). When T A is equal to or greater than T n (S20502), the duplication determination target IP is changed to the next IP until the value of m becomes equal to the number of synchronization target IPs (S20506, S20507). If the next interrupt occurrence time difference T A is larger than T n, for example, as shown in FIG. 11, with respect IP2_ POS2, between IP1_ POS2, there is IP1_ POS3, should achieve synchronization between the IP1_ POS3 Therefore, such a pair is excluded from the synchronization target.

次に、CPU回路部108、109は、TがTより小さい場合は、Tが割込み要求元IPに対する割込み重複可能期間Tより大きいかの比較を行う(S20503)。TがT以下だった場合は、割込み処理期間データ保存部119からIP_mの割込み処理時間を取得し、Tに追加して(S20505)、mの値が同期化対象IPの数と同じになるまで重複判定対象IPを次のIPに変更する(S20506、S20507)。TがTより大きい場合は、IP_mを次回発生割込みが重複しない同期化対象IPとして検出し(S20504)、mの値が同期化対象IPの数と同じになるまで重複判定対象IPを次のIPに変更する(S20506、S20507)。 Next, when T A is smaller than T n , the CPU circuit units 108 and 109 compare whether T A is longer than the interrupt duplication possible period T w for the interrupt request source IP (S20503). If T A seemed less T w, acquires the interrupt processing time IP_m interrupt processing period data storage unit 119, in addition to T w (S20505), the value of m is equal to the number of synchronization target IP The overlap determination target IP is changed to the next IP until it becomes (S20506, S20507). If T A is larger than T w, the following overlapping determination target IP to detect a synchronization target IP that next generation interrupt IP_m do not overlap (S20504), the value of m is the same as the number of synchronization target IP (S20506, S20507).

これらの処理を全ての同期化対象IPに対して行い、同期化対象IPそれぞれと次回割込み発生タイミングの重複判定を行い、次回割込み発生タイミングが重複しない同期化対象IPを検出する。   These processes are performed on all the synchronization target IPs, and the next interrupt generation timing is determined to be overlapped with each synchronization target IP, and the synchronization target IPs that are not overlapped with the next interrupt generation timing are detected.

図14は最大Wait時間判定動作の例を示すフローチャート図である。ステップ206の最大Wait時間判定について図14のフローチャートを用いて処理を説明する。CPU回路部108、109は、まず、ステップ206で検出した次回割込み発生タイミングが重複しない同期化対象IPをIP_mとして、mの初期値を1と設定する。また、次回割込み発生タイミングが重複しない同期化対象IPと割込み発生要求元IPとの次回割込み発生時間差の最大値Tmaxの初期値として0を設定する(S20601)。 FIG. 14 is a flowchart showing an example of the maximum wait time determination operation. The maximum wait time determination at step 206 will be described with reference to the flowchart of FIG. First, the CPU circuit units 108 and 109 set the initial value of m to 1 with IP_m as the synchronization target IP detected at step 206 and not overlapping the next interrupt generation timing. Further, 0 is set as the initial value of the maximum value T max of the next interrupt generation time difference between the synchronization target IP and the interrupt generation request source IP whose next interrupt generation timing does not overlap (S20601).

次に、CPU回路部108、109は、割込み要求元IPの割込み処理に対して処理を遅らせることの出来る最大許容時間Twaitを割込み処理期間データ保存部119から取得し、割込み要求元IPとIP_mとの次回割込み要求発生時間差TがTwait以下かの比較を行い(S20602)、Twaitより大きい場合は、次回割込み発生タイミングが重複しない同期化対象IPを次のIPに変更する(S20605、S20606)。Twait以下の場合は、TがTmaxより大きいかの比較を行い(S20603)、Tmax以下の場合は、次回割込み発生タイミングが重複しない同期化対象IPを次のIPに変更する(S20605、S20606)。Tmaxより大きい場合は、TmaxにTを代入する(S20604)。 Next, the CPU circuit units 108 and 109 obtain from the interrupt processing period data storage unit 119 the maximum allowable time T wait that can delay the processing with respect to the interrupt processing of the interrupt request source IP, and the interrupt request source IP and IP_m next interrupt request occurrence time difference T a and performs a comparison or T wait less (S20602), is greater than T wait changes the synchronization target IP that next interrupt generation timing does not overlap with the next IP (S20605, S20606). In the following cases T wait, T A makes a comparison of greater than T max (S20603), the following cases T max, the next interrupt generation timing to change the synchronization target IP that does not overlap the next IP (S20605 , S20606). T If max greater than substitutes T A to T max (S20604).

これらの処理を全ての次回割込み発生タイミングが重複しない同期化対象IPに対して行い、Twait以内の次回割込み発生タイミングが重複しない同期化対象IPと割込み発生要求元IPとの次回割込み発生時間差の最大値Tmaxを検出する。次に、CPU回路部108、109は、検出したTmaxが初期値0よりも大きいかの比較を行い(S20607)、大きい場合はTmaxに対する割込み発生要求元IPの割込み処理開始の時間調整を行う。0以下の場合は、Twait以内の次回割込み発生時間差が存在していないため、割込み処理開始の時間調整は行わない。 These processes are performed on all synchronization target IPs whose next interrupt generation timings do not overlap, and the next interrupt generation time difference between the synchronization target IP and the interrupt generation request source IP whose next interrupt generation timings within T wait do not overlap. The maximum value T max is detected. Next, the CPU circuit units 108 and 109 compare whether or not the detected T max is larger than the initial value 0 (S20607), and if it is larger, adjust the interrupt processing start time of the interrupt generation request source IP for T max . Do. If it is less than or equal to 0, the next interrupt generation time difference within T wait does not exist, so the time adjustment for interrupt processing start is not performed.

図15(a)及び図15(b)は本発明の割込み処理wait指示の実施例を示すタイムチャート図である。図15(a)の例では、IP_101とIP_102の次回割込み発生タイミング時間差TがIP_101の割込み処理期間とCPU電源スイッチON処理期間とを足した割込み重複可能期間Tより大きいため、次回割込み発生タイミングが重複しない同期化対象IPとの時間差の最大値としてTが検出される。 FIGS. 15A and 15B are time charts showing an embodiment of an interrupt processing wait instruction according to the present invention. In the example of FIG. 15 (a), IP_101 because larger interruption overlap period T w of the next interrupt generation timing time difference T b is plus the interrupt processing time and CPU power switch ON processing period IP_101 of IP_102, next interrupt occurs timing T b is detected as the maximum value of the time difference between the synchronization target IP which do not overlap.

次回割り込み発生時間差の最大値であるTはTwait以下なので前述したように図2のステップ207でT分だけ割り込み要求元IPの割り込み処理開始を遅らせる。 Since T b which is the maximum value of the next interrupt occurrence time difference is equal to or less than T wait, as described above, the start of interrupt processing of the interrupt request source IP is delayed by T b in step 207 of FIG.

図15(b)は、調整後の割り込み要求元IPであるIP_101と同期化対象IPであるIP_102の各割り込みタイミングを示している。図15(b)の例では、IP_101の割り込み処理開始を次回割り込み要求発生時間差の最大値であるTだけ遅らせることにより、IP_101とIP_102の次回割り込み発生タイミングを合わせている。 FIG. 15B shows the interrupt timings of the adjusted interrupt request source IP_101 and the synchronization target IP_102. In the example of FIG. 15 (b), the by delaying the interruption process starts in IP_101 T b by the maximum value of the next interrupt request occurrence time difference, are combined for the next interrupt timing of IP_101 and IP_102.

本実施の形態においては、割り込み要求発生時にかかるCPUの復帰処理と割り込み要求元の割り込み処理の実行時間を考慮し、前記の処理が実施されている時間内での割り込み発生タイミングの合わせ込みを行うので、従来技術以上の省消費電力効果を得ることができる効果がある。その理由は、従来技術では、図16(a)のIP_A、IP_Bのように割り込み発生周期に倍数、約数の関係がない場合、それぞれの割り込み発生周期の最小公倍数でしか、発生タイミングを合わせることができないためである。このため、同期化対象となるIPが少なく、省消費電力効果も小さい。   In this embodiment, considering the execution time of the CPU recovery process and the interrupt request source interrupt process when an interrupt request is generated, the interrupt generation timing is adjusted within the time when the above process is performed. Therefore, there is an effect that it is possible to obtain a power saving effect higher than that of the conventional technology. The reason for this is that, in the prior art, when there is no relation between a multiple and a divisor in the interrupt generation period as in IP_A and IP_B in FIG. 16A, the generation timing is matched only with the least common multiple of each interrupt generation period. This is because they cannot. Therefore, there are few IPs to be synchronized, and the power saving effect is also small.

図16(b)は本実施の形態における動作の例を示すタイムチャート図である。IP_A、IP_Bの割り込みタイミングとプロセッサの電源電圧を示している。本実施の形態においては、割り込みインターバル検出システム110と、割り込み処理期間データ保存部119と、処理開始タイミングの補正用データ保存部120を有することにより、割り込み要求発生時にかかるCPUの電源復帰処理と割り込み要求元の割り込み処理の実行時間を考慮し、これらの処理が実施されている時間内での割り込み発生タイミング合わせ込みを行う。その結果、図16(b)のように、図中(A)の割り込み発生タイミングを図中(B)に遅らせることにより、図中(B)、図中(C)でのIP_AとIP_Bの割り込み発生タイミングを重複させる。このように互いの周期に倍数、約数の関係がない場合でも、タイミングの合わせ込みを随時行うので同期化対象となるIPが多くなり、電源電圧を復帰する回数が少なく省消費電力効果が大きくなるためである。   FIG. 16B is a time chart showing an example of the operation in the present embodiment. The IP_A and IP_B interrupt timings and the power supply voltage of the processor are shown. In the present embodiment, the interrupt interval detection system 110, the interrupt processing period data storage unit 119, and the processing start timing correction data storage unit 120 are provided, so that the CPU power recovery processing and interrupts that occur when an interrupt request is generated. In consideration of the execution time of the interrupt process of the request source, the interrupt generation timing is adjusted within the time when these processes are performed. As a result, as shown in FIG. 16B, the interrupt generation timing of (A) in the figure is delayed to (B) in the figure, thereby interrupting IP_A and IP_B in (B) and (C) in the figure. Overlapping occurrence timing. In this way, even when there is no relationship between multiples and divisors in each other's cycle, since timing adjustment is performed at any time, the number of IPs to be synchronized increases, and the number of times to restore the power supply voltage is small and the power saving effect is large. It is to become.

本実施の形態においては、従来技術以上の省消費電力効果を得ることができる。その理由としては、割り込み要求発生時にかかるCPUの復帰処理と割り込み要求元の割り込み処理の実行時間を考慮し、前記の処理が実施されている時間内での割り込み発生タイミング合わせ込みを行うためである。   In this embodiment, it is possible to obtain a power saving effect that is higher than that of the prior art. The reason for this is to adjust the interrupt generation timing within the time during which the above processing is performed in consideration of the execution time of the CPU return processing and the interrupt processing of the interrupt request source when the interrupt request is generated. .

なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。   It should be noted that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention.

100 割り込み制御システム
101 IP
102 IP
103 IP
104 マルチプロセッサシステム
105 割り込みコントローラ
106 電源スイッチ回路
107 電源スイッチ回路
108 CPU回路部
109 CPU回路部
110 割り込みインターバル検出システム
111 タイマ回路部
112 時間差検出回路
113 時間差検出回路
114 時間差検出回路
115 インターバルデータレジスタ
116 インターバルデータレジスタ
117 インターバルデータレジスタ
118 メモリ領域
119 割込み処理期間データ保存部
120 補正用データ保存部
121 割り込み制御装置
100 Interrupt control system 101 IP
102 IP
103 IP
104 multiprocessor system 105 interrupt controller 106 power switch circuit 107 power switch circuit 108 CPU circuit section 109 CPU circuit section 110 interrupt interval detection system 111 timer circuit section 112 time difference detection circuit 113 time difference detection circuit 114 time difference detection circuit 115 interval data register 116 interval Data register 117 Interval data register 118 Memory area 119 Interrupt processing period data storage unit 120 Correction data storage unit 121 Interrupt control device

Claims (11)

複数の割り込み発生回路からの割り込み要求を調整するプロセッサであって、
各割り込み発生回路からの割り込み要求の周期を算出すると共にその周期性を判定する割り込み周期判定部と、
各割り込み発生回路について、割り込み要求を発生した割り込み要求元回路と同期化できる対象である割り込み同期化対象回路であるか否かを検出する同期化検出部と、
前記割り込み要求元回路とその同期化対象回路との間で、次回割り込み発生タイミングの時間差を検出する割り込み時間差検出部と、
前記割り込みタイミング時間差が予め定められた時間以内である場合、前記割り込み要求元回路の割り込み処理開始時間を、前記次回割り込み発生タイミング時間差だけ遅らせる次回割り込み発生タイミングの調整を行う割り込み処理時間調整部とを有する、プロセッサ。
A processor for coordinating interrupt requests from a plurality of interrupt generation circuits;
An interrupt cycle determination unit that calculates a cycle of an interrupt request from each interrupt generation circuit and determines its periodicity;
For each interrupt generation circuit, a synchronization detection unit that detects whether or not the interrupt synchronization target circuit is a target that can be synchronized with the interrupt request source circuit that generated the interrupt request,
Between the interrupt request source circuit and the synchronization target circuit, an interrupt time difference detection unit that detects a time difference of next interrupt generation timing,
An interrupt processing time adjusting unit that adjusts a next interrupt generation timing that delays an interrupt processing start time of the interrupt request source circuit by the next interrupt generation timing time difference when the interrupt timing time difference is within a predetermined time; Having a processor.
前記周期判定部は、各割り込み発生回路の割り込み発生時間を所定数保持し、それらから最大値を除いて平均を求めた値を割り込み周期とする、請求項1記載のプロセッサ。   The processor according to claim 1, wherein the cycle determination unit holds a predetermined number of interrupt generation times of the respective interrupt generation circuits, and sets an average obtained by excluding the maximum value therefrom as an interrupt cycle. 前記周期判定部は、各割り込み発生回路の割り込み発生時間間隔を所定数保持し、前記割り込み周期との差が所定数以上、許容誤差範囲外である場合に周期性なしと判断する、請求項2記載のプロセッサ。   The cycle determination unit holds a predetermined number of interrupt generation time intervals of each interrupt generation circuit, and determines that there is no periodicity when a difference from the interrupt cycle is a predetermined number or more and outside an allowable error range. The processor described. 前記許容誤差範囲は、プロセッサが有するCPUの電源復帰の処理時間である、請求項3記載のプロセッサ。   The processor according to claim 3, wherein the allowable error range is a processing time required for power recovery of the CPU of the processor. 前記同期化検出部は、割り込み発生周期がCPU電源復帰の処理時間及び割り込み要求元回路の割り込み処理期間の時間内で、割り込み要求元IPの割り込み発生周期と倍数もしくは約数の関係が成立するものを抽出する、請求項1乃至3のいずれか1項記載のプロセッサ。   The synchronization detection unit has a relationship between the interrupt generation cycle of the interrupt request source IP and a multiple or a divisor within the interrupt generation cycle within the CPU power recovery processing time and the interrupt processing period of the interrupt request source circuit. The processor according to claim 1, wherein the processor is extracted. 割り込み要求元回路の割り込み発生周期T、同期化対象となるか否かを検出する同期化対象候補回路の割り込み発生周期をT、CPU電源復帰の処理時間及び割り込み要求元回路の割り込み処理期間の期間をTとしたとき、T/Tの余りをTmから引いた余り、又はT/Tの余りをTから引いた余りが、Tより小さい場合、当該同期化対象候補回路を同期化対象回路とする、請求項1乃至5のいずれか1項記載のプロセッサ。 Interrupt generation cycle T n of the interrupt request source circuit, interrupt generation cycle of the synchronization target candidate circuit for detecting whether or not to be synchronized, T m , CPU power recovery processing time, and interrupt processing period of the interrupt request source circuit when the period was T w, T n / T remainder the remainder of m minus the Tm, or the remainder of the T m / T n is a remainder obtained by subtracting from the T n, if T w smaller than the synchronization target The processor according to claim 1, wherein the candidate circuit is a circuit to be synchronized. 前記割り込み時間差検出部は、割り込み要求元IPの割り込み発生周期をT、割り込み発生タイミング時間差の検出対象IPの割り込み発生周期をT、及び次回割り込み発生時間をTm2としたとき、T<Tならば、T−C=Tを次回割り込み発生時間差とする、請求項1乃至6のいずれか1項記載のプロセッサ。 Said interrupt time difference detection unit when the interrupt request source IP of the interrupt generation cycle T n, the interrupt generation period of the detection target IP of the interrupt timing time difference T m, and the next interrupt generation time was T m2, T m < if T n, the next interrupt occurrence time difference of T m -C = T a, the processor of any one of claims 1 to 6. 前記割り込み時間差検出部は、割り込み要求元IPの割り込み発生周期をT、割り込み発生タイミング時間差の検出対象IPの割り込み発生周期をT、及び次回割り込み発生時間をTm2としたとき、T>Tならば、Tm2<Tの場合は、T+Tm2−T=Tを次回割込み発生時間差とし、Tm2>Tの場合は、Tm2−T=TAを次回割込み発生時間差とする、請求項7記載のプロセッサ。 Said interrupt time difference detection unit when the interrupt request source IP of the interrupt generation cycle T n, the interrupt generation period of the detection target IP of the interrupt timing time difference T m, and the next interrupt generation time was T m2, T m> If T n, <in the case of T n, the T m + T m2 -T n = T a and the next interrupt occurrence time difference, T m2> T m2 in the case of T n, T m2 -T n = T a of the next The processor according to claim 7, wherein a difference in interrupt occurrence times is set. 前記割り込み処理時間調節部は、CPU電源スイッチON処理期間及び割込み要求元IPの割込み処理時間をTとしたとき、前記次回割り込み発生時間差TがTより小さく、Tより大きいものを割り込み期間が重複しない同期化対象として検出する、請求項8記載のプロセッサ。 The interrupt processing time controller, when the interrupt processing time of the CPU power switch ON processing period and interrupt request source IP was T w, the next interrupt occurrence time difference T A is less than T n, interrupts larger than T w The processor according to claim 8, wherein the processor is detected as a synchronization target whose period does not overlap. 前記割り込み処理時間調節部は、前記次回割り込み発生時間差Tが許容誤差範囲内であるもののうち、最大のものを抽出し、当該最大の前記次回割り込み発生時間差Tだけ割り込み処理を遅らせる次回割り込み発生タイミングの調整を行う、請求項1乃至9のいずれか1項記載のプロセッサ。 The interrupt processing time controller, said among those next interrupt occurrence time difference T A is within the allowable error range, it extracts the largest one, the maximum of the next interrupt only occurrence time difference T A interrupt processing delay next interrupt generation The processor according to claim 1, wherein timing adjustment is performed. 複数の割り込み発生回路からの割り込み要求を調整するプロセッサであって、
各割り込み発生回路からの割り込み要求の周期を算出すると共にその周期性を判定し、
各割り込み発生回路について、割り込み要求を発生した割り込み要求元回路と同期化できる対象である割り込み同期化対象回路であるか否かを検出し、
前記割り込み要求元回路とその同期化対象回路との間で、次回割り込み発生タイミングの時間差を検出し、
前記割り込みタイミング時間差が予め定められた時間以内である場合、前記割り込み要求元回路の割り込み処理開始時間を、前記次回割り込み発生タイミング時間差だけ遅らせる次回割り込み発生タイミングの調整を行う、プロセッサの制御方法。
A processor for coordinating interrupt requests from a plurality of interrupt generation circuits;
Calculate the interrupt request period from each interrupt generation circuit and determine its periodicity,
For each interrupt generation circuit, detect whether or not it is an interrupt synchronization target circuit that can be synchronized with the interrupt request source circuit that generated the interrupt request,
Detecting the time difference of the next interrupt generation timing between the interrupt request source circuit and the synchronization target circuit;
A method for controlling a processor, wherein when the interrupt timing time difference is within a predetermined time, the next interrupt generation timing is adjusted to delay the interrupt processing start time of the interrupt request source circuit by the next interrupt generation timing time difference.
JP2010048960A 2010-03-05 2010-03-05 Processor and control method therefor Pending JP2011186591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010048960A JP2011186591A (en) 2010-03-05 2010-03-05 Processor and control method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010048960A JP2011186591A (en) 2010-03-05 2010-03-05 Processor and control method therefor

Publications (1)

Publication Number Publication Date
JP2011186591A true JP2011186591A (en) 2011-09-22

Family

ID=44792804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010048960A Pending JP2011186591A (en) 2010-03-05 2010-03-05 Processor and control method therefor

Country Status (1)

Country Link
JP (1) JP2011186591A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102012016897A1 (en) 2011-08-29 2013-02-28 Shimano Inc. Fahrradhecknabe
US20160302255A1 (en) * 2015-04-10 2016-10-13 Kabushiki Kaisha Toshiba Sensor data collecting device
JP2019159852A (en) * 2018-03-13 2019-09-19 富士電機株式会社 Information processing apparatus
CN114647601A (en) * 2020-12-21 2022-06-21 奥的斯电梯公司 Real-time processing system synchronization in a control system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08255088A (en) * 1995-03-17 1996-10-01 Mitsubishi Electric Corp Time interval and time processing management system
JP2000259429A (en) * 1999-03-11 2000-09-22 Mitsubishi Electric Corp Device and method for managing timer
JP2006072991A (en) * 2004-08-05 2006-03-16 Matsushita Electric Ind Co Ltd Power-saving processing unit, power-saving processing method and power-saving processing program
JP2006134318A (en) * 2004-10-21 2006-05-25 General Electric Co <Ge> Event based operating system, method and apparatus for instrumentation and control systems
JP2009026035A (en) * 2007-07-19 2009-02-05 Nec Corp Interrupt processing synchronizing device, interrupt processing synchronizing method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08255088A (en) * 1995-03-17 1996-10-01 Mitsubishi Electric Corp Time interval and time processing management system
JP2000259429A (en) * 1999-03-11 2000-09-22 Mitsubishi Electric Corp Device and method for managing timer
JP2006072991A (en) * 2004-08-05 2006-03-16 Matsushita Electric Ind Co Ltd Power-saving processing unit, power-saving processing method and power-saving processing program
JP2006134318A (en) * 2004-10-21 2006-05-25 General Electric Co <Ge> Event based operating system, method and apparatus for instrumentation and control systems
JP2009026035A (en) * 2007-07-19 2009-02-05 Nec Corp Interrupt processing synchronizing device, interrupt processing synchronizing method, and program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102012016897A1 (en) 2011-08-29 2013-02-28 Shimano Inc. Fahrradhecknabe
DE102012016897B4 (en) 2011-08-29 2022-01-05 Shimano Inc. Rear bicycle hub
US20160302255A1 (en) * 2015-04-10 2016-10-13 Kabushiki Kaisha Toshiba Sensor data collecting device
US9839064B2 (en) 2015-04-10 2017-12-05 Kabushiki Kaisha Toshiba Sensor data collecting device
JP2019159852A (en) * 2018-03-13 2019-09-19 富士電機株式会社 Information processing apparatus
JP7069870B2 (en) 2018-03-13 2022-05-18 富士電機株式会社 Information processing equipment
CN114647601A (en) * 2020-12-21 2022-06-21 奥的斯电梯公司 Real-time processing system synchronization in a control system

Similar Documents

Publication Publication Date Title
US9588916B1 (en) Interrupt latency reduction
US9814106B2 (en) Backlight driver chip incorporating a phase lock loop (PLL) with programmable offset/delay and seamless operation
US8058916B2 (en) Lockstep synchronization and maintenance
US8375239B2 (en) Clock control signal generation circuit, clock selector, and data processing device
US9367286B2 (en) Crossing pipelined data between circuitry in different clock domains
US20050198544A1 (en) Method and system for fast frequency switch for a power throttle in an integrated device
US20130082747A1 (en) Variable frequency ratiometric multiphase pulse width modulation generation
JP2011186591A (en) Processor and control method therefor
TWI567526B (en) Adjusting clock frequency
JP2021047707A (en) Method for control and semiconductor integrated circuit
JP7299890B2 (en) Asynchronous buffer with pointer offset
US8281177B2 (en) Distributed control system
US10175716B2 (en) Technologies for low-power and high-accuracy timestamps
US8892923B2 (en) Data processing apparatus and method for maintaining a time count value in normal and power saving modes of operation
JP5834936B2 (en) Information processing apparatus and information processing apparatus control method
JP4862984B2 (en) Clock switching device and clock switching method
JP4605191B2 (en) Interrupt processing synchronization device, interrupt processing synchronization method, and program
JP6236996B2 (en) Information processing apparatus and information processing apparatus control method
USRE48100E1 (en) Method and system for power management
US8817937B2 (en) System and method for performing timing control
JP2011248809A (en) Redundant operation system
WO2014017472A1 (en) Clock signal generation device for generating clock signal having non-integer-multiple dividing ratio
US9746876B2 (en) Drift compensation for a real time clock circuit
JP2024016550A (en) Data processing system, processing method, and program
WO2008141873A1 (en) Method and unit for power management of a microprocessor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120816

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131031

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140304