JP2008243220A - Information processing communication device - Google Patents

Information processing communication device Download PDF

Info

Publication number
JP2008243220A
JP2008243220A JP2008116874A JP2008116874A JP2008243220A JP 2008243220 A JP2008243220 A JP 2008243220A JP 2008116874 A JP2008116874 A JP 2008116874A JP 2008116874 A JP2008116874 A JP 2008116874A JP 2008243220 A JP2008243220 A JP 2008243220A
Authority
JP
Japan
Prior art keywords
timer
time
monitoring unit
period
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
Application number
JP2008116874A
Other languages
Japanese (ja)
Inventor
Satoshi Mitsusaka
智 三坂
Shinjiro Yamada
真二郎 山田
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 Technology Corp
Original Assignee
Renesas Technology 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 Technology Corp filed Critical Renesas Technology Corp
Priority to JP2008116874A priority Critical patent/JP2008243220A/en
Publication of JP2008243220A publication Critical patent/JP2008243220A/en
Withdrawn 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 an information processor capable of attaining a low electric power consumption, without worsening a response speed in an interruption request. <P>SOLUTION: The information processor for assigning a time up to prescribed event execution to call a system has the first timer circuit 9a set to the first period, the second timer circuit 9b set to the second period shorter than the first period, a time-out monitoring part 71 capable of storing a generation time when the system is called, and a first period monitoring part 72 capable of storing a time up to the interruption request of the first timer circuit 9a when the system is called. The time-out monitoring part stores a time provided by subtracting the time stored in the first period monitoring part from the time stored in the time-out monitoring part by the interruption request of the first timer circuit, and subtracts the time of the second period from the time stored in the time-out monitoring part by the interruption request of the second timer circuit, when the time stored in the time-out monitoring part is shorter than the first period. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

情報処理通信装置及びオペレーティングシステムに関するものである。   The present invention relates to an information processing communication device and an operating system.

図16は特開平11−355198号公報に示された従来の無線通信装置を示す構成図である。   FIG. 16 is a block diagram showing a conventional wireless communication apparatus disclosed in Japanese Patent Laid-Open No. 11-355198.

本願の図16には、中央処理装置CPU(以下、プロセッサという)(1)、フレーム同期回路SYN(以下、同期回路という)(2)、受信回路RCV(3)、レジスタ(制御手段)REG(4)、切替回路SWC(5)、高速のクロックCKを発振し出力する高速発振回路OSC(6)、無線通信装置の時計機能として使用されているタイマ機能を持つリアルタイムクロックRTC(以下、RTCという)(7)、入出力回路I/O(以下、I/Oという)(8)、タイマTIM(9)、割込回路INTC(10)、アドレス、データ、制御データを送受信するバス(11)が記載されている。   In FIG. 16 of the present application, a central processing unit CPU (hereinafter referred to as a processor) (1), a frame synchronization circuit SYN (hereinafter referred to as a synchronization circuit) (2), a reception circuit RCV (3), a register (control means) REG ( 4) a switching circuit SWC (5), a high-speed oscillation circuit OSC (6) that oscillates and outputs a high-speed clock CK, and a real-time clock RTC (hereinafter referred to as RTC) having a timer function used as a clock function of a wireless communication device. ) (7), input / output circuit I / O (hereinafter referred to as I / O) (8), timer TIM (9), interrupt circuit INTC (10), bus for transmitting and receiving address, data and control data (11) Is described.

切替回路SWC(5)は、プロセッサCPU(1)よりレジスタREG(4)内に書き込まれ格納された制御データに基いて、高速発振回路OSC(6)から出力されたクロックCK1か、あるいはRTC(7)から出力されたクロックCK2のいずれかを選択し、プロセッサCPU(1)、同期回路SYN(2)、及びレジスタREG(4)へ選択されたクロックを供給する。   The switching circuit SWC (5) is based on the control data written and stored in the register REG (4) by the processor CPU (1), or the clock CK1 output from the high-speed oscillation circuit OSC (6) or RTC ( 7) Select one of the clocks CK2 output from 7), and supply the selected clock to the processor CPU (1), the synchronization circuit SYN (2), and the register REG (4).

タイマTIM(9)は、常時、RTC(7)から出力されていたクロックCK2に基いて動作し、ページングチャンネル受信後の間欠時(スリープモード)に、RTC(7)から出力されたクロックCK2を供給する時間を、プロセッサCPU(1)より設定される。さらに、タイマTIM(9)はタイムアウトすると割込回路INTC(10)へ割込み制御信号を出力し、割込回路INTC(10)を割込み状態に設定する。   The timer TIM (9) always operates based on the clock CK2 output from the RTC (7), and receives the clock CK2 output from the RTC (7) during the intermittent period after receiving the paging channel (sleep mode). The supply time is set by the processor CPU (1). Further, when the timer TIM (9) times out, it outputs an interrupt control signal to the interrupt circuit INTC (10), and sets the interrupt circuit INTC (10) to the interrupt state.

割込回路INTC(10)がタイマTIM(9)から出力された割込み制御信号を入力した時、また使用者がキーを操作し、I/O(8)を経由して入力されたキー割込みなどの割込み要求を割込回路INTC(10)が受信した時に、プロセッサCPU(1)へ割込み要求の発生を通知する、即ち、割込回路INTC(10)からのプロセッサCPU(1)へ割り込み要求が出力される。   When the interrupt circuit INTC (10) inputs the interrupt control signal output from the timer TIM (9), or when the user operates the key and the key interrupt is input via the I / O (8) When the interrupt circuit INTC (10) receives the interrupt request, the processor CPU (1) is notified of the occurrence of the interrupt request, that is, the interrupt request from the interrupt circuit INTC (10) is sent to the processor CPU (1). Is output.

プロセッサCPU(1)によりタイマ値がタイマTIM(9)へ設定された後、プロセッサCPU(1)は、制御データをレジスタREG(4)へ書き込む。これにより、切替回路SWC(5)は、レジスタREG(4)内に格納された制御データに基いて、高速発振回路OSC(6)から出力されるクロックCK1をRTC(7)から出力されるクロックCK2へ切り替え、クロックCK2をプロセッサCPU(1)、同期回路SYN(2)、レジスタREG(4)等へ出力する。このように、プロセッサCPU(1)、同期回路SYN(2)、レジスタREG(4)等はクロックCK2に基いて動作する。さらに、レジスタREG(4)内に書き込まれた制御データに基いて、高速発振回路OSC(6)の動作が停止される。   After the timer value is set to the timer TIM (9) by the processor CPU (1), the processor CPU (1) writes the control data to the register REG (4). As a result, the switching circuit SWC (5) causes the clock CK1 output from the high-speed oscillation circuit OSC (6) to be output from the RTC (7) based on the control data stored in the register REG (4). Switching to CK2, the clock CK2 is output to the processor CPU (1), the synchronization circuit SYN (2), the register REG (4) and the like. As described above, the processor CPU (1), the synchronization circuit SYN (2), the register REG (4), and the like operate based on the clock CK2. Further, the operation of the high-speed oscillation circuit OSC (6) is stopped based on the control data written in the register REG (4).

プロセッサCPU(1)は、割込回路INTC(10)から出力された割込み要求を入力した場合、その割込み要求がどの回路から出力された割込み要求であるかを判定する。そして、その割込み要求がタイマTIM(9)以外の回路から出力された割込み要求であるならば、クロックCK1に基いて処理を行い、次の割込み要求の到着を待つ。   When the interrupt request output from the interrupt circuit INTC (10) is input, the processor CPU (1) determines from which circuit the interrupt request is output. If the interrupt request is an interrupt request output from a circuit other than the timer TIM (9), processing is performed based on the clock CK1, and the arrival of the next interrupt request is awaited.

受信した割込み要求がタイマTIM(9)から出力された割込み要求である場合、プロセッサCPU(1)はレジスタREG(4)内へ制御データを書き込む。切替回路SWC(5)は、レジスタREG(4)内に書き込まれた制御データに基いて、RTC(7)から出力されたクロックCK2を、高速発振回路OSC(6)から出力されているクロックCK1へ切替える。そして切替えられたクロックCK1をプロセッサCPU(1)、同期回路SYN(2)、レジスタREG(4)等へ供給する。   When the received interrupt request is an interrupt request output from the timer TIM (9), the processor CPU (1) writes control data in the register REG (4). Based on the control data written in the register REG (4), the switching circuit SWC (5) uses the clock CK2 output from the RTC (7) and the clock CK1 output from the high-speed oscillation circuit OSC (6). Switch to. The switched clock CK1 is supplied to the processor CPU (1), the synchronization circuit SYN (2), the register REG (4), and the like.

特開平11−355198号公報Japanese Patent Laid-Open No. 11-355198

本願発明者等は、本願に先立って、上記の従来技術について検討した。また、無線通信装置には電子メール、ブラウザ、動画音声音響録画再生等を搭載する情報処理装置も存在するため、本願発明者等は、特許文献1に示される無線通信装置を情報処理通信装置に適用した場合も同様に検討した。なお、従来の無線通信装置を情報処理通信装置に適用した場合には、図16の無線通信装置にメモリMEM(21)を搭載し、そのメモリMEM(21)内はオペレーティングシステムOS(以下OSと略す)(22)を装備する必要がある。そして、OS(22)はタイマTIM(9)から任意の周期毎に割込み要求を発生させることによって、情報処理通信装置の時間監視及び管理を行うことになる。   Prior to the present application, the inventors of the present application examined the above-described conventional technology. In addition, since there are information processing apparatuses equipped with e-mail, browser, video / audio / acoustic recording / playback, and the like, the inventors of the present application use the wireless communication apparatus disclosed in Patent Document 1 as an information processing communication apparatus. The same applies to the case of application. When the conventional wireless communication apparatus is applied to an information processing communication apparatus, a memory MEM (21) is mounted on the wireless communication apparatus of FIG. 16, and the memory MEM (21) has an operating system OS (hereinafter referred to as OS). (Omitted) (22) must be equipped. Then, the OS (22) performs time monitoring and management of the information processing communication device by generating an interrupt request for every arbitrary period from the timer TIM (9).

ここで、図16の無線通信装置及び従来の無線通信装置を適用した情報処理通信装置に搭載のタイマTIM(9)の周期割込み要求には2つの課題が残されていることがわかった。   Here, it has been found that two problems remain in the periodic interrupt request of the timer TIM (9) mounted on the information processing communication apparatus to which the wireless communication apparatus of FIG. 16 and the conventional wireless communication apparatus are applied.

第一の課題は、省電力モード中にも関わらず、タイマTIM(9)の周期割込み要求の周期に従って省電力モードが解除され、プロセッサCPU(1)にクロックCK1及びクロックCK2が供給され、電流を消費してしまう事象である。以下、この事象を図18に基づいて説明する。   The first problem is that the power saving mode is canceled according to the period of the periodic interrupt request of the timer TIM (9) and the clocks CK1 and CK2 are supplied to the processor CPU (1) in spite of being in the power saving mode. It is an event that consumes. Hereinafter, this phenomenon will be described with reference to FIG.

図17は、プロセッサCPU(1)の各動作モード時の消費電流(41)を示している。ここで、42はタイマ割込み要求モードを、43は省電力モードを示している。OS(22)がマルチタスク機能を有する場合、最低優先度タスクの無限ループ中に省電力モード(43)を施す処理を設定する。そしてクロックCK1がプロセッサCPU(1)に供給されている、つまり情報処理の為に利用出来る場面において暫く使わない、またはデッドラインまでの余裕時間があるという、アイドル状態が存在することを想定する。なお、タイマ割込みが発生してから次のタイマ割込みが発生するまでの時間におけるタイマ割込み要求モード42の時間をタイマ割込みDutyという。   FIG. 17 shows the current consumption (41) in each operation mode of the processor CPU (1). Here, 42 indicates a timer interrupt request mode, and 43 indicates a power saving mode. When the OS (22) has a multitasking function, a process for applying the power saving mode (43) during an infinite loop of the lowest priority task is set. It is assumed that there is an idle state in which the clock CK1 is supplied to the processor CPU (1), that is, it is not used for a while in a scene that can be used for information processing, or there is a margin time until the deadline. The time in the timer interrupt request mode 42 from the time when a timer interrupt occurs until the next timer interrupt occurs is referred to as a timer interrupt duty.

ここで電流の無駄な消費を防止する為、アイドル状態に前記最低優先度タスクを起動させると、タイマTIM(9)からのタイマ割込み要求モード(42)によって、省電力モード(43)が解除され、プロセッサCPU(1)にクロックCK1が供給され、CPUが動作を開始し、本来、電流を削減したい場面で消費電流(41)の増加が発生する。前記事象はタイマ周期(44)を長くすることでタイマ(9)の割込み要求回数を削減し、省電力モード(43)の時間を長くし、消費電流(41)を抑えることは可能である。   Here, in order to prevent wasteful consumption of current, when the lowest priority task is started in the idle state, the power saving mode (43) is canceled by the timer interrupt request mode (42) from the timer TIM (9). The clock CK1 is supplied to the processor CPU (1), the CPU starts operating, and the current consumption (41) increases in the scene where it is originally desired to reduce the current. In the event, it is possible to reduce the number of interrupt requests of the timer (9) by lengthening the timer period (44), lengthen the time of the power saving mode (43), and suppress the current consumption (41). .

しかしOS(22)はタイマTIM(9)による周期割込み要求の度に内部でシステムクロック(24)でカウントしながら、時間監視及び管理を行っている。従って、タイマTIM(9)のタイマ周期(44)を長くすると、タイマ周期(44)よりも短い時間内に待ち状態のタスクをタイムアウトで解放させるには時間精度が悪くなることがわかった。すなわち、消費電流(41)を抑えようとすると時間精度が悪くなり、逆に時間精度を良くしようとすると消費電流(41)が多くなってしまうことがわかった。   However, the OS (22) performs time monitoring and management while counting with the system clock (24) internally at every periodic interrupt request by the timer TIM (9). Therefore, it was found that if the timer period (44) of the timer TIM (9) is lengthened, the time accuracy is deteriorated in order to release the waiting task by time-out within a time shorter than the timer period (44). In other words, it has been found that if the current consumption (41) is suppressed, the time accuracy deteriorates, and conversely, if the time accuracy is improved, the current consumption (41) increases.

第二の課題は、常時タイマTIM(9)からタイマ周期(44)毎に割込みが発生するので、その他のI/O回路(8)からの割込み要求の発生とかち合うという事象である。   The second problem is an event in which an interrupt is always generated from the timer TIM (9) every timer cycle (44), and is therefore interrupted by the generation of an interrupt request from the other I / O circuit (8).

特に時間管理を優先、つまりタイマTIM(9)の割込み要求レベルを高くすると、割込回路INTC(10)の方で先ずタイマTIM(9)の周期割込み要求を受けつけて、その周期割込み要求の処理を終了した直後にI/O(8)からの割込み要求を受け付け、I/Oに関する処理を行う。従って割込み応答が鈍くなってしまうことがわかった。   In particular, when priority is given to time management, that is, when the interrupt request level of the timer TIM (9) is increased, the interrupt circuit INTC (10) first receives the periodic interrupt request of the timer TIM (9) and processes the periodic interrupt request. Immediately after ending the process, an interrupt request from I / O (8) is accepted and processing related to I / O is performed. Therefore, it was found that the interrupt response becomes dull.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

すなわち、所定のイベント実行までの発生時間を指定してシステムコールをする情報処理装置であって、第1周期に設定される第1タイマ回路と、前記第1周期より短い第2周期に設定される第2タイマ回路と、前記システムコールがあった際に、前記発生時間を格納することが可能な前記タイムアウト監視部と、前記システムコールがあった際に、次の前記第1タイマ回路の割り込み要求までの時間を格納することが可能な第1周期監視部とを有し、前記タイムアウト監視部は、前記第1タイマの割り込み要求により前記タイムアウト監視部に格納された時間から前記第1周期監視部に格納された時間を減算した時間を格納し、前記タイムアウト監視部に格納された時間が前記第1周期より短い場合に、前記第2タイマ回路の割り込み要求により前記タイムアウト監視部に格納された時間から前記第2周期の時間を減算する構成とする。   That is, an information processing apparatus that makes a system call by designating an occurrence time until execution of a predetermined event, and is set to a first timer circuit set to a first cycle and a second cycle shorter than the first cycle. The second timer circuit, the timeout monitoring unit capable of storing the occurrence time when the system call is made, and the next timer timer interrupt when the system call is made A first cycle monitoring unit capable of storing a time until a request, wherein the timeout monitoring unit monitors the first cycle from the time stored in the timeout monitoring unit by an interrupt request of the first timer When the time stored in the timeout monitoring unit is shorter than the first period, the interrupt request of the second timer circuit is received. Further, the time of the second period is subtracted from the time stored in the timeout monitoring unit.

更に望ましくは、前記第2タイマ回路は、前記タイムアウト監視部に格納された時間が前記第1周期より長い場合は、割り込み要求が不可とされ、前記タイムアウト監視部に格納された時間が前記第1周期より短いと判断された場合に、割り込み要求が許可とされるように構成するとよい。   More preferably, when the time stored in the timeout monitoring unit is longer than the first period, the second timer circuit disables an interrupt request, and the time stored in the timeout monitoring unit is the first time. It may be configured such that an interrupt request is permitted when it is determined that the period is shorter than the cycle.

更に望ましくは、前記第1周期監視部は、前記第1周期の周期時間を入力することが可能とされるように構成するとよい。   More preferably, the first cycle monitoring unit may be configured to be able to input a cycle time of the first cycle.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記のとおりである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、 本願発明を実施することにより、情報処理装置の低消費電力化や割り込みの応答速度を向上させること達成することが出来る。   That is, by implementing the present invention, it is possible to achieve a reduction in power consumption of the information processing apparatus and an improvement in the response speed of interrupts.

まず、図1及び図2を用いて本願発明の思想を説明する。図1は、本願発明を実現するための基本的な構成の一実施例であり、プロセッサCPU(1)、複数のタイマTIM(9)、OS(22)を搭載したメモリMEM(21)、I/O(8)、バス(11)が示されている。また、プロセッサCPU(1)、複数のタイマTIM(9)、I/O(8)、バス(11)で構成した1ブロックをプロセッサCPU(1)と見なし、そのプロセッサCPU(1)とメモリMEM(21)をバス(11)で接続した回路と見なすことも可能である。   First, the idea of the present invention will be described with reference to FIGS. FIG. 1 shows an embodiment of a basic configuration for realizing the present invention. A memory MEM (21), I, and a processor CPU (1), a plurality of timers TIM (9), and an OS (22) are mounted. / O (8), bus (11) are shown. Further, one block composed of the processor CPU (1), a plurality of timers TIM (9), I / O (8), and the bus (11) is regarded as the processor CPU (1), and the processor CPU (1) and the memory MEM It is also possible to regard (21) as a circuit connected by the bus (11).

複数のタイマTIM(9)は、第1タイマTIM1(9a)、第2タイマTIM2(9b)を含んでいる。また、第1タイマTIM1(9a)は、状態レジスタSREG1(81a)、制御レジスタCREG1(82a)、カウンタCNT1(83a)、周期設定レジスタCYCREG1(84a)を含んでいる。第2タイマTIM2(9b)も第1タイマTIM1(9a)と同じ構成である。またクロックCK(85)は発振回路からのクロック信号である。タイマTIM(9)にRTC(7)から常時、クロックCK2が入力されているが、用途によってはRTC(7)に限らず、高速発振回路OSC(6)から出力されるクロックCK1を入力しても構わない。   The plurality of timers TIM (9) includes a first timer TIM1 (9a) and a second timer TIM2 (9b). The first timer TIM1 (9a) includes a status register SREG1 (81a), a control register CREG1 (82a), a counter CNT1 (83a), and a cycle setting register CYCREG1 (84a). The second timer TIM2 (9b) has the same configuration as the first timer TIM1 (9a). The clock CK (85) is a clock signal from the oscillation circuit. The clock CK2 is always input from the RTC (7) to the timer TIM (9). However, depending on the application, the clock CK1 output from the high-speed oscillation circuit OSC (6) is input without being limited to the RTC (7). It doesn't matter.

状態レジスタSREG1,2(81)は、各タイマに対して、カウンタTIM1,2(83)のアンダーフローの発生判別、タイマ割込みの許可、禁止の状態判別等、タイマの内部状態を知らせるための情報を有する。   The status registers SREG 1 and 2 (81) inform each timer of the internal state of the timer, such as determining whether an underflow has occurred in the counters TIM 1 and 2 (83), enabling or disabling timer interrupts, etc. Have

制御レジスタCREG(82)は、各タイマに対して、カウンタCNT(83)のアンダーフロー時のタイマ割込み許可禁止を設定、タイマ駆動に要するクロックCK(85)の分周比の設定、タイマがカウントする周期等を可能にするための情報を有する。なお、状態レジスタSREG、制御レジスタCREGは、外部から設定可能とされる。   The control register CREG (82) sets the timer interrupt permission prohibition when the counter CNT (83) underflows for each timer, sets the frequency division ratio of the clock CK (85) required for the timer drive, and the timer counts It has information for enabling the period to perform. Note that the status register SREG and the control register CREG can be set from the outside.

カウンタCNT(83)は各タイマに、制御レジスタ(82)で設定したクロックCK(85)に対する分周比に同期して、初期時の設定値をカウントダウン(減算)する機能を有する。カウンタ(83)はカウントダウンする方式、カウントアップする方式のどちらでも構わない。カウントアップ方式ならば、値をカウントアップ(加算)する機能を有する。   The counter CNT (83) has a function in which each timer counts down (subtracts) the initial set value in synchronization with the frequency division ratio with respect to the clock CK (85) set by the control register (82). The counter (83) may be either a count down system or a count up system. The count-up method has a function of counting up (adding) values.

周期設定レジスタ(84)は、各タイマに対して、初期時またはアンダーフロー時に割込み発生させる周期の長さを設定するための情報を有する。なお、カウンタ(83)がカウントアップ方式ならば、アンダーフロー時ではなくオーバーフロー時となる。   The period setting register (84) has information for setting the length of the period for generating an interrupt at the initial time or underflow for each timer. If the counter (83) is a count-up system, it is not an underflow but an overflow.

また図1にOS(22)の機能の一部としてOS時間管理部(91)を記載した。OS時間管理部(91)は、タスク情報制御テーブル(以下、TCBという)管理部(92)、タイムアウト要求発行処理部(93)、第1タイマー割込み処理部(94)、第2タイマー割込み処理部(95)、第一周期監視部(72)、システムクロック(24)等で構成する。TCB管理部(92)にはタイムアウト監視部(71)を含む。   FIG. 1 shows the OS time management unit (91) as a part of the function of the OS (22). The OS time management unit (91) includes a task information control table (hereinafter referred to as TCB) management unit (92), a timeout request issue processing unit (93), a first timer interrupt processing unit (94), and a second timer interrupt processing unit. (95), a first cycle monitoring unit (72), a system clock (24), and the like. The TCB management unit (92) includes a timeout monitoring unit (71).

図2は本願発明の概念を説明する図であり、以下図2を用いて本願発明を説明する。図2には、カウンタ軸(61)、時間軸(62)、カウンタ値(63)、周期設定値(64)、割込み発生(65)、タイムアウト要求発行時刻(66)、タイムアウト時刻(67)、タイムアウト要求時間(68)、タイムアウト監視部(71)、第一周期監視部(72)、時間監視レート格納部(73)が示されている。   FIG. 2 is a diagram for explaining the concept of the present invention. Hereinafter, the present invention will be described with reference to FIG. 2 includes a counter axis (61), a time axis (62), a counter value (63), a cycle set value (64), an interrupt generation (65), a timeout request issue time (66), a timeout time (67), A timeout request time (68), a timeout monitoring unit (71), a first cycle monitoring unit (72), and a time monitoring rate storage unit (73) are shown.

第1タイマTIM1(9a)に対し、第1タイマ周期(44a)、カウンタ値(63a)、周期設定値(64a)、割込み発生(65a)、第2タイマTIM2(9b)に対し、第2タイマ周期(44b)、カウンタ値(63b)、周期設定値(64b)、割込み発生(65b)を表している。   For the first timer TIM1 (9a), the first timer period (44a), counter value (63a), period set value (64a), interrupt generation (65a), second timer TIM2 (9b) for the second timer The period (44b), counter value (63b), period setting value (64b), and interrupt generation (65b) are shown.

なお、タイムアウト監視部(71)、第一周期監視部(72)、時間監視レート格納部(73)は、特に制限されないがメモリ(21)内に設けている。また、タイムアウト監視部や第一周期監視部等に格納される値は、第1タイマや第2タイマにおけるカウンタの値に対応する値となる。これらの値は、第1タイマや第2タイマに入力されるクロックの周期に前記カウンタの値をかけた時間と等価なものである。従って、タイムアウト監視部や第一周期監視部等は、それぞれに対応する時間を格納しているということもできる。   The timeout monitoring unit (71), the first cycle monitoring unit (72), and the time monitoring rate storage unit (73) are provided in the memory (21), although not particularly limited. The values stored in the timeout monitoring unit, the first cycle monitoring unit, and the like are values corresponding to the counter values in the first timer and the second timer. These values are equivalent to the time obtained by multiplying the period of the clock input to the first timer or the second timer by the value of the counter. Accordingly, it can be said that the time-out monitoring unit, the first cycle monitoring unit, and the like store the time corresponding to each.

先ず初期化時にOS(22)で、第1タイマ周期(44a)が第2タイマ周期(44b)の整数倍にするようにタイマTIM(9)を設定し、時間監視レート格納部(73)に第1タイマ周期(44a)を第2タイマ周期(44b)で割った値を格納する。更に第2タイマTIM2(44b)のみ、割込み発生(65b)を禁止とするように第2タイマTIM2(9b)の状態レジスタSREG2(81b)を設定する。次に、OS(22)でタイムアウト要求が発行されたタイムアウト要求発行時刻(66)に、タイムアウト要求時間(68)をタイムアウト監視部(71)に格納する。   First, at initialization, the OS (22) sets the timer TIM (9) so that the first timer period (44a) is an integral multiple of the second timer period (44b), and stores it in the time monitoring rate storage unit (73). A value obtained by dividing the first timer period (44a) by the second timer period (44b) is stored. Furthermore, the status register SREG2 (81b) of the second timer TIM2 (9b) is set so that only the second timer TIM2 (44b) prohibits the generation of an interrupt (65b). Next, the timeout request time (68) is stored in the timeout monitoring unit (71) at the timeout request issuance time (66) when the timeout request is issued by the OS (22).

第1タイマTIM1(9a)からタイマ割込みが発生する毎に、タイムアウト監視部(71)に格納された値から第1タイマ周期(44a)を引き、その減算値を再びタイムアウト監視部(71)に格納する。   Each time a timer interrupt occurs from the first timer TIM1 (9a), the first timer period (44a) is subtracted from the value stored in the timeout monitoring unit (71), and the subtraction value is again sent to the timeout monitoring unit (71). Store.

タイムアウト監視部(71)に格納されている値が第1タイマ周期(44a)よりも小さくなった時点で、第2タイマTIM2(9b)からのタイマ割込みを許可し、第一周期監視部(72)に第1タイマ周期(44a)を設定する。   When the value stored in the timeout monitoring unit (71) becomes smaller than the first timer period (44a), the timer interruption from the second timer TIM2 (9b) is permitted, and the first period monitoring unit (72 ) Is set to the first timer period (44a).

第2タイマTIM2(9b)からタイマ割込みが発生する毎に、タイムアウト監視部(71)と第一周期監視部(72)に格納されているそれぞれの値から第2タイマ周期(44b)を引き、それぞれの減算値を再びタイムアウト監視部(71)と第一周期監視部(72)に格納する。   Each time a timer interrupt is generated from the second timer TIM2 (9b), the second timer period (44b) is subtracted from the respective values stored in the timeout monitoring part (71) and the first period monitoring part (72), The respective subtraction values are stored again in the timeout monitoring unit (71) and the first cycle monitoring unit (72).

タイムアウト監視部(71)に格納の値が0以下となった時点がタイムアウト時刻となり、タイムアウト要求を満たす事が可能になる。   The time when the value stored in the time-out monitoring unit (71) becomes 0 or less is the time-out time, and the time-out request can be satisfied.

上記のように周期の長い第1タイマ周期(44a)と周期の短い第2タイマ周期(44b)を設け、第1タイマ周期(44a)で大まかに時間監視すると共に割込み発生(65)を抑制し、第2タイマ周期(44b)で細かい時間監視を行うことで、時間管理精度を維持しながら、省電力モード中のプロセッセ(1)に対するタイマ割込みを起因とする電流の消費を抑えることが可能となる。言い換えれば、第1イベント終了時から第2イベント発生時までの所定時間を計測する場合に、始めは周期の長い第1周期でカウントし、第2イベント発生時までの残り時間が第1周期の間隔より短くなった場合に、第2周期でカウントするように構成することで本願発明を達成できる。   As described above, the first timer period (44a) having a long period and the second timer period (44b) having a short period are provided, and the time is roughly monitored in the first timer period (44a) and the occurrence of an interrupt (65) is suppressed. By performing fine time monitoring in the second timer cycle (44b), it is possible to suppress current consumption due to timer interruption for the processor (1) in the power saving mode while maintaining time management accuracy. Become. In other words, when measuring a predetermined time from the end of the first event to the occurrence of the second event, the count is started at the first cycle with a long period, and the remaining time until the second event occurs is the first period. The present invention can be achieved by configuring to count in the second period when it becomes shorter than the interval.

例えば、タイマ割込み要求の第1周期を10[msec]、第2周期を1[msec]とし、従来のタイマ割込み要求周期(44)を1[msec]周期、そして割込み要求時の消費電流値(46)を150[mA]、低消費電力モード時の消費電流値を35[mA]と仮定すると、TMUの割り込みDutyが1%ならば消費電流の改善率は約2%、5%ならば消費電流の改善率は約12%、10%ならば消費電流の改善率は約18%、15%ならば消費電流の改善率は約25%という見積が可能であり、携帯電話や携帯端末に搭載の電池の持ち時間延長や、プロセッサから発する熱の抑制に効果がある。   For example, the first cycle of the timer interrupt request is 10 [msec], the second cycle is 1 [msec], the conventional timer interrupt request cycle (44) is 1 [msec] cycle, and the current consumption value at the time of the interrupt request ( Assuming that 46) is 150 [mA] and the current consumption value in the low power consumption mode is 35 [mA], if the TMU interrupt duty is 1%, the current consumption improvement rate will be about 2% and 5%. If the current improvement rate is about 12% or 10%, the current consumption improvement rate is about 18%, and if it is 15%, the current consumption improvement rate can be estimated to be about 25%. This is effective in extending the battery life and suppressing heat generated by the processor.

また、上記と同じく、タイマ割込み発生を少なくすることでOS(22)の処理の占有率が下がり、他の(割込み)処理に費やすことが可能となる。   Also, as described above, by reducing the occurrence of timer interrupts, the occupancy rate of the OS (22) processing is reduced, and it can be spent on other (interrupt) processing.

次に、図3から図12を用いて、本願発明の処理手順を詳しく説明する。図3は、TCB管理部(92)を表している。TCB管理部(92)は例えば、処理ポインタ(101)、挿入ポインタ(102)、臨時格納部(103)、レディキューヘッダ(104)、ウェイトキューヘッダ(105)、タイマキューヘッダ(106)、順方向ポインタ(107)、逆方向ポインタ(108)、単数ないし複数のTCB(109)で構成する。TCB(109)はOS(22)が生成、動作しているタスクの数だけ、存在する。例えば、本実施例では、タスクが3つ(TCB109a,109b,109c)存在している。タイマキューヘッダ(106)は、順方向ポインタ(107)、逆方向ポインタ(108)、第一周期監視部(72)で構成する。ここで説明を簡単にするために、最初にタイムアウトするTCBを109aとし、次にタイムアウトするTCBを109bとする。また、TCB109cは、新規に生成されるタスクとする。   Next, the processing procedure of the present invention will be described in detail with reference to FIGS. FIG. 3 shows the TCB management unit (92). The TCB management unit (92) includes, for example, a processing pointer (101), an insertion pointer (102), a temporary storage unit (103), a ready queue header (104), a wait queue header (105), a timer queue header (106), in order It consists of a direction pointer (107), a backward pointer (108), and one or more TCBs (109). There are as many TCBs (109) as the number of tasks generated and operated by the OS (22). For example, in this embodiment, there are three tasks (TCBs 109a, 109b, and 109c). The timer queue header (106) includes a forward pointer (107), a backward pointer (108), and a first cycle monitoring unit (72). In order to simplify the description here, the first time-out TCB is 109a, and the next time-out TCB is 109b. The TCB 109c is a newly generated task.

TCB(109a,b,c)は、用途別の複数の順方向ポインタ(107)と逆方向ポインタ(108)、タイムアウト監視部(71)等で構成する。タイマキューヘッダ(106)の順方向ポインタ(107)は、待ち状態のタスクが解除されるのに要するタイムアウトが最も早いTCB(109a)の順方向ポインタ(107a)のメモリ番地を指す。TCB(109a)の順方向ポインタは、次にタイムアウトするタスクのTCB(109b)の順方向ポインタ(107b)のメモリ番地を指す。そして指されたTCB(109b)の逆方向ポインタ(108b)は、一つ前のタイムアウトに待ち状態を解除されるタスクのTCB(109a)の逆方向ポインタ(108a)のメモリ番地を指す。従って、タイマキューヘッダ(106)の順方向ポインタ(107)は、最も早くタイムアウトするタスクのTCB(109a)を指し、反対に逆方向ポインタ(108)は最も遅くタイムアウトするタスクのTCB(109c)を指すことになる。即ちTCB管理部(72)はタイマキューヘッダ(106)を起点(番兵)に各TCB(109)の双方向リストを形成している。   The TCB (109a, b, c) is composed of a plurality of forward pointers (107) and backward pointers (108) according to applications, a timeout monitoring unit (71), and the like. The forward pointer (107) of the timer queue header (106) indicates the memory address of the forward pointer (107a) of the TCB (109a) that has the earliest time-out required for releasing the waiting task. The forward pointer of the TCB (109a) indicates the memory address of the forward pointer (107b) of the TCB (109b) of the task that will time out next. The backward pointer (108b) of the pointed TCB (109b) points to the memory address of the backward pointer (108a) of the TCB (109a) of the task that is released from the wait state by the previous timeout. Therefore, the forward pointer (107) of the timer queue header (106) points to the TCB (109a) of the task that times out earliest, and conversely, the backward pointer (108) points to the TCB (109c) of the task that times out latest. Will point. That is, the TCB management unit (72) forms a bidirectional list of each TCB (109) starting from the timer queue header (106) (sentinel).

タイムアウト監視部(71)には、一つ前に双方向リストに繋がれていたタスクのTCB(109)がタイムアウトした後にタイムアウトするまでのTCB(109)の残り時間が格納される。つまり、タイムアウト監視部(71b)に格納される残り時間は、TCB(109a)が待ちを解除された直後からのタイムアウトまでの残り時間を指し、タイムアウト監視部(71c)に格納される残り時間は、TCB(109b)が待ちを解除された直後からのタイムアウトまでの残り時間を指す。因みにTCB(109)は、レディキューヘッダ(104)を先頭にしてタスク優先度順に双方向リストを形成され、ウェイトキューヘッダ(105)を先頭にして先着順に双方向リストを形成される。   The time-out monitoring unit (71) stores the remaining time of the TCB (109) until the time-out after the TCB (109) of the task previously linked to the bidirectional list times out. That is, the remaining time stored in the timeout monitoring unit (71b) indicates the remaining time until the timeout immediately after the TCB (109a) is released from waiting, and the remaining time stored in the timeout monitoring unit (71c) is , TCB (109b) indicates the remaining time from the time immediately after the wait is released to the time-out. Incidentally, the TCB (109) forms a bidirectional list in order of task priority with the ready queue header (104) at the head, and forms a bidirectional list with the wait queue header (105) in the order of arrival.

処理ポインタ(101)は、現時点で処理中のTCB(109)のメモリ番地を指す。OS時間管理部(91)は初期化時に予め、処理ポインタ(101)をタイマキューヘッダ(106)と同じメモリ番地を指すように設定する。ここでは、説明上、図3のように既にタイマキューヘッダ(106)はTCB(109a)を指していることにする。挿入ポインタ(102)は新規TCB(109c)のメモリ番地を指す。時間監視レート格納部(73)には、第1タイマ周期(44a)の値を第2タイマ周期(44b)の値で割った値を格納する。   The processing pointer (101) indicates the memory address of the TCB (109) currently being processed. The OS time management unit (91) sets in advance the processing pointer (101) to point to the same memory address as the timer queue header (106) at the time of initialization. Here, for the sake of explanation, it is assumed that the timer queue header (106) already points to the TCB (109a) as shown in FIG. The insertion pointer (102) points to the memory address of the new TCB (109c). The time monitoring rate storage unit (73) stores a value obtained by dividing the value of the first timer period (44a) by the value of the second timer period (44b).

図4から図8は、タイムアウト要求発行処理部(93)のフローチャートを説明する図であり、図4は、タイムアウト要求発行処理部(93)の処理の全体を示すものである。タイムアウト要求発行処理部(93)は、OS(22)に装備のタイムアウトを要求するシステムコールの発行時に、そのシステムコールの中で処理される。まず、本発明では、第2タイマTIM2(9b)の状態レジスタSREG2(81b)を参照し、第2タイマTIM2(9b)からの割込み発生状態が許可か禁止かを判別する(判別処理124)。即ち、ここでは第2タイマTIM2(9b)に従ってカウントしているか否かを判断している。もし禁止(第1タイマTIM1(9a)に従ってカウントしている)であれば処理(201)へ、許可(第2タイマTIM2(9b)に従ってカウントしている)であれば処理(202)へ進む。   FIGS. 4 to 8 are flowcharts for explaining the flowchart of the timeout request issue processor (93). FIG. 4 shows the entire process of the timeout request issue processor (93). The time-out request issuance processing unit (93) is processed in the system call when the system call for requesting the time-out of the equipment to the OS (22) is issued. First, in the present invention, the status register SREG2 (81b) of the second timer TIM2 (9b) is referenced to determine whether the interrupt generation status from the second timer TIM2 (9b) is enabled or disabled (discriminating process 124). That is, it is determined here whether or not the counting is performed according to the second timer TIM2 (9b). If it is prohibited (counting according to the first timer TIM1 (9a)), the process proceeds to the process (201). If permitted (counting according to the second timer TIM2 (9b)), the process proceeds to the process (202).

図5は、処理(201)、即ち第2タイマTIM(9b)からの割り込み発生状態が禁止の場合に実行される処理のフローチャートを説明する図である。判別処理(124)において第2タイマTIM2(9b)からの割り込みが禁止されていると判別した場合は、現時点から次回第1タイマTIM(9b)が割り込むまでの残り時間を求めて第1周期監視部(72)に設定する。具体的には、第2タイマTIM2(9b)からの割込み発生を許可するように制御レジスタCREG2(82b)を設定し、次に、第1タイマTIM1(9a)のカウンタCNT1(83a)の値に1加算した値を、第2タイマTIM2(9b)の周期設定レジスタCYCREG2(84b)で設定のタイマ周期(44b)の値に1加算した値で割り算した値を第1周期監視部(72)に格納する(処理203)。   FIG. 5 is a flowchart for explaining the process (201), that is, the process executed when the interrupt generation state from the second timer TIM (9b) is prohibited. If it is determined in the determination process (124) that the interrupt from the second timer TIM2 (9b) is prohibited, the remaining time from the current time until the next first timer TIM (9b) interrupts is obtained to monitor the first period. Part (72). Specifically, the control register CREG2 (82b) is set so as to allow the interrupt generation from the second timer TIM2 (9b), and then the value of the counter CNT1 (83a) of the first timer TIM1 (9a) is set. The value obtained by dividing 1 by the value obtained by adding 1 to the value of the timer period (44b) set in the period setting register CYCREG2 (84b) of the second timer TIM2 (9b) is sent to the first period monitoring unit (72). Store (process 203).

次に、TCB管理部(92)のタイマキューヘッダ(106)がTCB(109)のメモリ番地をさしているかどうか、つまりタイムアウトを待っているタスク(以下、待ちタスクと言う)があるかどうかを判別する(判別処理125)。もし、TCB(109)のメモリ番地を指していれば(待ちタスクがあれば)処理(204)へ、指してなければ(待ちタスクがなければ)処理(205)へ進む。   Next, it is determined whether the timer queue header (106) of the TCB management unit (92) points to the memory address of the TCB (109), that is, whether there is a task waiting for a timeout (hereinafter referred to as a waiting task). (Determination processing 125). If it points to the memory address of the TCB (109) (if there is a waiting task), the processing proceeds to processing (204), and if not (if there is no waiting task), the processing proceeds to processing (205).

図6はタイムアウト待ちタスクが存在する場合に新たにタイムアウト設定を行うための処理(204)のフローチャートを説明する図である。判別処理(125)において、待ちタスクがあると判別された場合は、最も早くタイムアウトするタスクのタイムアウトまでの残り時間を求めるために、先ず第1周期監視部(72)及び時間監視レート格納部(73)を参照し、時間監視レート格納部(73)に格納の値から第1周期監視部(72)に格納の値を引いた減算値を求める。そして処理ポインタ(101)で指されているTCB(109)のタイムアウト監視部(71)に格納された値からその前記減算値を引き、その減算値を前記タイムアウト監視部(71)に格納する(処理206)。   FIG. 6 is a flowchart for explaining a process (204) for newly setting a timeout when there is a timeout waiting task. In the determination process (125), when it is determined that there is a waiting task, first the first period monitoring unit (72) and the time monitoring rate storage unit ( 73), a subtraction value obtained by subtracting the value stored in the first period monitoring unit (72) from the value stored in the time monitoring rate storage unit (73) is obtained. Then, the subtraction value is subtracted from the value stored in the timeout monitoring unit (71) of the TCB (109) pointed to by the processing pointer (101), and the subtraction value is stored in the timeout monitoring unit (71) ( Process 206).

次に、新たにタイムアウトを設定されるタスクと既にタイムアウトが設定されているタスクとのタイムアウトまでの残り時間を比較するために、新規にタイムアウトを要求したTCB(109c)のタイムアウト監視部(71c)と、処理ポインタ(101)で指されたTCB(109)のタイムアウト監視部(71)に格納された値の大小を判別する(判別処理126)。新規にタイムアウトを要求したTCB(109c)のタイムアウト監視部(71c)にはタイムアウト要求時間(68)が既に格納されている。もしタイムアウト監視部(71c)の方が大きいならば処理(207)へ、小さければ処理(208)へ進む。TCB(109c)はこの時点ではTCB管理部(92)の双方向リストには挿入されてはいない。   Next, in order to compare the remaining time until the timeout between the task for which the timeout is newly set and the task for which the timeout has already been set, the timeout monitoring unit (71c) of the TCB (109c) newly requesting the timeout And the magnitude of the value stored in the timeout monitoring unit (71) of the TCB (109) pointed to by the processing pointer (101) is discriminated (discriminating process 126). The timeout request time (68) is already stored in the timeout monitoring unit (71c) of the TCB (109c) that newly requested the timeout. If the timeout monitoring unit (71c) is larger, the process proceeds to the process (207), and if smaller, the process proceeds to the process (208). At this time, the TCB (109c) is not inserted in the bidirectional list of the TCB management unit (92).

判別処理(126)において新規のTCB(109c)のタイムアウト監視部(71c)に格納された値が処理ポインタ(101)で指されたTCB(109)のタイムアウト監視部(71)に格納された値より大きい場合は、新たにタイムアウト設定されるタスクのタイムアウトの残り時間を一時的に更新するために、TCB(109c)のタイムアウト監視部(71c)に格納の値から、処理ポインタ(101)で指されたTCB(109)のタイムアウト監視部(71)に格納された値を引いた減算値をTCB(109c)のタイムアウト監視部(71)に格納し、処理ポインタ(101)を、現在処理ポインタ(101)で指しているTCB(109)の順方向ポインタ(107)で指されたTCB(109)のメモリ番地に設定する(処理207)。   The value stored in the timeout monitoring unit (71c) of the new TCB (109c) in the discrimination process (126) is stored in the timeout monitoring unit (71) of the TCB (109) pointed to by the processing pointer (101). If it is larger, in order to temporarily update the remaining time-out time of the task newly set as time-out, the processing pointer (101) points to the value stored in the time-out monitoring unit (71c) of the TCB (109c). The subtraction value obtained by subtracting the value stored in the timeout monitoring unit (71) of the TCB (109) is stored in the timeout monitoring unit (71) of the TCB (109c), and the processing pointer (101) is set to the current processing pointer ( 101) is set to the memory address of the TCB (109) pointed to by the forward pointer (107) of the TCB (109) pointed to by (101) (process 207).

次に、既にタイムアウトが設定されているタスクのタイムアウト残り時間を全て調査したかを判別するために処理ポインタ(101)がタイマキューヘッダ(106)のメモリ番地をさしているか、つまりタイマキューに接続のTCB(109)に対し、処理207を施したかどうかを判別する(判別処理127)。もし、タイマキューヘッダ(106)のメモリ番地を指しているなら処理(208)へ進み、指していなければ判別処理(126)に戻る。   Next, in order to determine whether or not all the remaining timeout times of tasks for which timeouts have already been set have been investigated, whether the processing pointer (101) points to the memory address of the timer queue header (106), that is, connected to the timer queue It is determined whether or not the process 207 has been performed on the TCB (109) (determination process 127). If it indicates the memory address of the timer queue header (106), the process proceeds to the process (208), and if not, the process returns to the discrimination process (126).

判別処理(127)において、処理ポインタ(101)がタイマキューヘッダ(106)のメモリ番地を指していると判別された場合は、新たにタイムアウト設定されたタスクをタイマキューに挿入するために、処理ポインタ(101)が指しているTCB(109)のメモリ番地をTCB(109c)のメモリ番地に置換し、その設定の前に設定されていたTCB(109)のメモリ番地をTCB(109c)の順方向ポインタ(107c)で指すように設定する(処理208)。つまり、TCB(109c)をTCB管理部(92)の双方向リストに挿入したことになる。逆方向ポインタについても挿入するように設定を換える。   In the determination process (127), when it is determined that the process pointer (101) points to the memory address of the timer queue header (106), the process is performed in order to insert the newly timed-out task into the timer queue. The memory address of the TCB (109) pointed to by the pointer (101) is replaced with the memory address of the TCB (109c), and the memory address of the TCB (109) set before the setting is changed in the order of the TCB (109c). The direction pointer (107c) is set to point (process 208). That is, the TCB (109c) is inserted into the bidirectional list of the TCB management unit (92). The setting is changed so that the backward pointer is also inserted.

次に、新たにタイマキューに挿入されたタスクの次に早くタイムアウトするタスクのタイムアウトまでの残り時間を更新するために、挿入ポインタ(102)で指されたTCB(109c)の順方向ポインタ(107c)でさされたTCB(109)メモリ番地に処理ポインタ(101)を設定し、処理ポインタ(101)で設定以前に指されたTCB(109)のタイムアウト監視部(71)の値から挿入ポインタ(102)で指されたTCB(109c)のタイムアウト監視部(71c)に格納の値を引いた減算値を処理ポインタ(101)で指されたTCB(109)のタイムアウト監視部(71)に格納する(処理209)。このようにして、新規のTCB(109c)が処理ルーチンの中に挿入される。   Next, the forward pointer (107c) of the TCB (109c) pointed to by the insertion pointer (102) is updated in order to update the remaining time until the timeout of the task timed out next to the task newly inserted into the timer queue. The processing pointer (101) is set at the TCB (109) memory address pointed by (), and the insertion pointer (71) is determined from the value of the timeout monitoring unit (71) of the TCB (109) pointed to before the setting by the processing pointer (101). 102), the subtraction value obtained by subtracting the value stored in the timeout monitoring unit (71c) of the TCB (109c) pointed to by 102) is stored in the timeout monitoring unit (71) of the TCB (109) pointed to by the processing pointer (101). (Process 209). In this way, a new TCB (109c) is inserted into the processing routine.

図7は、新たにタイムアウト設定された時間が最短でタイムアウトする場合の処理(205)のフローチャートを説明する図である。まず、新たにタイムアウトを設定したタスク以外にタイムアウト待ちのタスクが存在するか判別するために、挿入ポインタ(102)が指しているTCB(109)の逆方向ポインタ(108)がタイマキューヘッダ(106)を指しているかを判断する(判別処理128)。もし、挿入ポインタ(102)が指しているTCB(109)の逆方向ポインタ(108)がタイマキューヘッダ(106)を指していたら判別処理(129)へ、指していなければ処理(205)を終了する。   FIG. 7 is a diagram illustrating a flowchart of the process (205) in the case where the newly set timeout is timed out in the shortest time. First, in order to determine whether there is a task waiting for timeout other than the task for which timeout has been newly set, the backward pointer (108) of the TCB (109) pointed to by the insertion pointer (102) is set to the timer queue header (106). ) (Determination process 128). If the backward pointer (108) of the TCB (109) pointed to by the insertion pointer (102) points to the timer queue header (106), the process proceeds to the discrimination process (129). If not, the process (205) is terminated. To do.

判別処理(128)において、挿入ポインタ(102)が指しているTCB(109)の逆方向ポインタ(108)がタイマキューヘッダ(106)を指していると判断された場合は、新たにタイムアウトを設定したタスクの残り時間と第1周期監視部の値の大小を判別するために、挿入ポインタ(102)が指しているTCB(109)のタイムアウト監視部(71)の値が第1周期監視部(72)の値以上か否かを判断する(判別処理129)。ここで、挿入ポインタ(102)が指しているTCB(109)のタイムアウト監視部(71)の値が第1周期監視部(72)の値以上ならば処理(210)に進み、それ以外ならば処理(205)を終了する。処理(210)は第1タイマTIM1(9a)の割込みを禁止に設定するために、第2タイマTIM2(9b)の制御レジスタCREG2(82b)で、第2タイマTIM2(9b)からの割込み発生を禁止に設定する。   In the determination process (128), when it is determined that the backward pointer (108) of the TCB (109) pointed to by the insertion pointer (102) points to the timer queue header (106), a new timeout is set. In order to determine the remaining time of the task and the value of the first cycle monitoring unit, the value of the timeout monitoring unit (71) of the TCB (109) pointed to by the insertion pointer (102) is set to the first cycle monitoring unit ( 72) is determined (determination process 129). Here, if the value of the timeout monitoring unit (71) of the TCB (109) pointed to by the insertion pointer (102) is equal to or larger than the value of the first cycle monitoring unit (72), the process proceeds to the processing (210). The process (205) is terminated. The process (210) generates an interrupt from the second timer TIM2 (9b) in the control register CREG2 (82b) of the second timer TIM2 (9b) in order to set the interrupt of the first timer TIM1 (9a) to be prohibited. Set to prohibited.

図8は処理(202)のフローチャートを説明する図である。処理(202)は、第2タイマTIM2(9b)の状態レジスタSREG2(81b)を参照し、第2タイマTIM2(9b)からの割込み発生状態が許可の場合に移行する処理である(図4参照)。この処理(202)は、前述の図5、12で説明した処理と同様な処理を行うため説明は省略する。   FIG. 8 is a diagram for explaining a flowchart of the process (202). The process (202) refers to the status register SREG2 (81b) of the second timer TIM2 (9b), and shifts to the process when the interrupt generation status from the second timer TIM2 (9b) is enabled (see FIG. 4). ). Since this process (202) is the same as the process described with reference to FIGS.

図9は第1タイマー割込み処理部のフローチャートを説明する図である。第1タイマー割込み処理部(94)は、第1タイマ割込み発生(65a)した時に、下記の処理を行いプロセッサ(1)を起動させる。まず、第1周期監視部(72)に第1タイマのタイマ周期を設定するために、第1タイマTIM1(9a)、第2タイマTIM2(9b)共、制御レジスタSREG(82)でカウンタCNT(83)がアンダーフローしないように設定し、第1周期監視部(72)の値を臨時格納部(103)に格納し、時間監視レート格納部(73)に格納した値を第1周期監視部(72)に格納する(処理221)。   FIG. 9 is a diagram illustrating a flowchart of the first timer interrupt processing unit. When the first timer interrupt processing unit (94) generates the first timer interrupt (65a), the first timer interrupt processing unit (94) performs the following processing to activate the processor (1). First, in order to set the timer cycle of the first timer in the first cycle monitoring unit (72), both the first timer TIM1 (9a) and the second timer TIM2 (9b) are counter CNT ( 83) is set so as not to underflow, the value of the first cycle monitoring unit (72) is stored in the temporary storage unit (103), and the value stored in the time monitoring rate storage unit (73) is stored in the first cycle monitoring unit. (72) (process 221).

次に、タイムアウト待ちタスクが存在するかどうかを判別するためにTCB管理部(92)のタイマキューヘッダ(106)がTCB(109)のメモリ番地をさしているかどうか、つまり待ちタスクがあるかどうかを判別する(判別処理125)。   Next, in order to determine whether there is a task waiting for timeout, it is determined whether the timer queue header (106) of the TCB manager (92) points to the memory address of the TCB (109), that is, whether there is a task waiting. Discrimination is performed (discrimination processing 125).

判別処理(125)において、タイマキューヘッダが(106)がTCBのメモリ番地を指していると判断される場合は、最も早くタイムアウトするタスクのタイムアウトまでの残り時間を更新するために、処理ポインタ(101)をタイマキューヘッダ(106)の順方向ポインタ(107)が指すTCB(109)のメモリ番地に設定し、処理ポインタ(101)が指しているTCB(109)のタイムアウト監視部(71)に格納の値から臨時格納部(103)に格納した値を引いた減算値を処理ポインタ(101)が指しているTCB(109)のタイムアウト監視部(71)に代入する処理(222)。   In the determination process (125), when it is determined that the timer queue header (106) points to the memory address of the TCB, in order to update the remaining time until the timeout of the task that times out earliest, the processing pointer ( 101) is set to the memory address of the TCB (109) pointed to by the forward pointer (107) of the timer queue header (106), and the time-out monitoring unit (71) of the TCB (109) pointed to by the processing pointer (101) is set. A process (222) of subtracting a value obtained by subtracting the value stored in the temporary storage unit (103) from the stored value into the timeout monitoring unit (71) of the TCB (109) pointed to by the process pointer (101).

次に最も早くタイムアウトするタスクのタイムアウト処理(223)を行う。処理(223)は、図10を用いて説明する。まず、タイムアウト要求発行処理用処理ポインタからタイマ割込み用処理ポインタに切り替えるために、処理ポインタ(101b)を処理ポインタ(101a)が指しているTCB(109)のメモリ番地と同じメモリ番地を指すように設定する(処理225)。次に、タイムアウト時刻かどうかを判別するために、処理ポインタ(101a)が指しているTCB(109)のタイムアウト監視部(71)の値が0以下かを判断する(判別処理142)。もし処理ポインタ(101a)が指しているTCB(109)のタイムアウト監視部(71)の値が0以下ならば、処理(226)に進み、それ以外の場合は処理(227)に進む。   Next, the timeout processing (223) of the task that times out earliest is performed. The process (223) will be described with reference to FIG. First, in order to switch from the processing pointer for timeout request issuance processing to the processing pointer for timer interrupt, the processing pointer (101b) should be pointed to the same memory address as the memory address of TCB (109) pointed to by the processing pointer (101a). Setting is made (process 225). Next, in order to determine whether it is the time-out time, it is determined whether the value of the time-out monitoring unit (71) of the TCB (109) pointed to by the processing pointer (101a) is 0 or less (determination process 142). If the value of the timeout monitoring unit (71) of the TCB (109) pointed to by the process pointer (101a) is 0 or less, the process proceeds to the process (226). Otherwise, the process proceeds to the process (227).

判別処理(142)において、タイムアウト監視部(71)の値が0以下と判断された場合は、タイマキューからTCBを解除しタイムアウトさせるために、処理ポインタ(101a)が指しているTCB(109)をTCB管理部(92)の双方向リストから削除し、TCB管理部(92)の双方向リストの後処理を行う(処理226)。   In the discrimination process (142), when the value of the timeout monitoring unit (71) is determined to be 0 or less, the TCB (109) pointed to by the process pointer (101a) is used to release the TCB from the timer queue and time out. Is deleted from the bidirectional list of the TCB management unit (92), and post-processing of the bidirectional list of the TCB management unit (92) is performed (processing 226).

その後、次にタイムアウトするTCBに移行させる処理ポインタ(101b)で指されたTCB(109)の順方向ポインタ(108)が指すTCB(109)のメモリ番地を処理ポインタ(101a)が指すように設定し、タイムアウト処理をする(処理227)。   Thereafter, the processing pointer (101a) points to the memory address of the TCB (109) pointed to by the forward pointer (108) of the TCB (109) pointed to by the processing pointer (101b) to be shifted to the next time-out TCB. Then, timeout processing is performed (processing 227).

処理(227)が終了後(図9における処理223が終了後)、待ちタスクのタイムアウト状態を全て調査したかどうかを判別するために、処理ポインタ(101b)がタイマキューヘッダ(107)のメモリ番地を指しているかどうかを判別する(判別処理141)。もし指していれば処理(224)へ進み、指していなければ処理(223)に戻る。   After the process (227) is completed (after the process 223 in FIG. 9 is completed), the process pointer (101b) is set to the memory address of the timer queue header (107) in order to determine whether or not all the waiting task timeout states have been investigated. Is determined (determination process 141). If so, the process proceeds to the process (224), and if not, the process returns to the process (223).

図11は処理(224)のフローチャートを説明する図である。まず、待ちタスクが存在するかどうかを判別するためにタイマキューヘッダ(106)の順方向ポインタ(107)が、タイマキューヘッダ(106)のメモリ番地を指しているかを判別する(判別処理143)。もし指していれば処理(228)へ進み、指していなければ判別処理(144)に進む。   FIG. 11 is a diagram for explaining the flowchart of the process (224). First, in order to determine whether there is a waiting task, it is determined whether the forward pointer (107) of the timer queue header (106) points to the memory address of the timer queue header (106) (determination process 143). . If so, the process proceeds to processing (228), and if not, the process proceeds to discrimination processing (144).

判別処理(143)において、順方向ポインタ(107)がタイマキューヘッダのメモリ番地を指していないと判断さした場合は、最も早くタイムアウトするタスクのタイムアウトまでの残り時間が第1周期監視部よりも大きいかどうかを判別するために、タイマキューヘッダ(106)の順方向ポインタ(83)が指すTCB(82)のタイムアウト監視部(71)に格納された値が、第1周期監視部(72)の値以上かどうかを判別する(判別処理144)。も第1周期監視部(72)の値以上であれば処理(228)へ進み、それ以外ならば処理(224)を終了する。   In the determination process (143), when it is determined that the forward pointer (107) does not point to the memory address of the timer queue header, the remaining time until the timeout of the task that times out earliest is longer than the first cycle monitoring unit In order to determine whether the value is larger, the value stored in the timeout monitoring unit (71) of the TCB (82) pointed to by the forward pointer (83) of the timer queue header (106) is the first cycle monitoring unit (72). It is determined whether or not the value is greater than or equal to (determination process 144). If the value is equal to or greater than the value of the first cycle monitoring unit (72), the process proceeds to the process (228). Otherwise, the process (224) is terminated.

判別処理(143)において、順方向ポインタ(107)がタイマキューヘッダのメモリ番地を指していると判別された場合、又は、判別処理(144)において、タイムアウト監視部(71)に格納された値が第1周期監視部(72)の値以上と判別された場合、制御レジスタ(82b)で第2タイマ(9b)からの割込み発生を禁止に設定し(処理228)、処理(224)を終了する。   When it is determined in the determination process (143) that the forward pointer (107) points to the memory address of the timer queue header, or the value stored in the timeout monitoring unit (71) in the determination process (144) Is determined to be greater than or equal to the value of the first period monitoring unit (72), the control register (82b) sets the interrupt generation from the second timer (9b) to be prohibited (processing 228) and ends the processing (224). To do.

図12は第2タイマー割込み処理部のフローチャートを説明する図である。第2タイマー割込み処理部(95)は、第2タイマ割込み発生(65b)した時にプロセッサ(1)を起動させる。まず、第1周期監視部を更新するために、第2タイマ(9b)の制御レジスタ(82b)で、カウンタ(83b)がアンダーフローしないように設定し、第1周期監視部(72)に格納の値から第2タイマ周期(44b)を引いて、その減算値を第1周期監視部(75)に代入する(処理241)。   FIG. 12 is a diagram illustrating a flowchart of the second timer interrupt processing unit. The second timer interrupt processing unit (95) activates the processor (1) when the second timer interrupt occurs (65b). First, in order to update the first cycle monitoring unit, the counter (83b) is set not to underflow in the control register (82b) of the second timer (9b) and stored in the first cycle monitoring unit (72). The second timer period (44b) is subtracted from this value, and the subtraction value is substituted into the first period monitoring unit (75) (process 241).

次に、最も早くタイムアウトするタスクの残り時間を更新するために、タイマキューヘッダ(106)の順方向ポインタ(107)で指されたTCB(109)のメモリ番地を処理ポインタ(101a)に代入する。そして処理ポインタ(101a)が指しているTCB(109)のタイムアウト監視部(71)に格納の値から第2タイマ周期(44b)を引いた値を処理ポインタ(101a)が指しているTCB(109)のタイムアウト監視部(71)に代入する(処理242)。   Next, in order to update the remaining time of the task that times out earliest, the memory address of TCB (109) pointed to by the forward pointer (107) of the timer queue header (106) is substituted into the processing pointer (101a). . The value obtained by subtracting the second timer period (44b) from the value stored in the timeout monitoring unit (71) of the TCB (109) pointed to by the processing pointer (101a) is the TCB (109) pointed to by the processing pointer (101a). ) In the time-out monitoring unit (71) (step 242).

次に判別処理(125)、処理(223)、処理(224)、及び判別処理(141)を行う。これらは図9において説明したので省略する。   Next, discrimination processing (125), processing (223), processing (224), and discrimination processing (141) are performed. Since these have been described with reference to FIG.

以上のような処理フローにより、本願発明を実施することができ、情報処理相装置の低消費電力化、応答速度の向上を図ることができる。   With the processing flow as described above, the present invention can be implemented, and the power consumption and response speed of the information processing phase device can be reduced.

なお、本発明の実施形態はタイマ(9)がカウントダウン方式を採用していることを仮定し説明してきたが、カウントアップ方式のタイマ(9)についても動作原理は同じなので、適用することが出来る。   Although the embodiment of the present invention has been described on the assumption that the timer (9) adopts the countdown method, the operation principle is the same for the timer (9) of the countup method, so that it can be applied. .

図13は、本発明を施した情報処理装置、特に情報携帯端末に適用した場合の一実施例を説明する図である。本願発明は、タイマTIM(9)を2つ(2チャンネル)を有する情報処理装置ならば、ハードウェアを変更することなく、OSの機能、即ちソフトウェアを変更することで容易に実現することが出来る。但し、ソフトウェア(OS)で処理している機能を適宜ハードウェアで実現することにより高速に処理することができる。更に、図14のように、タイマ、省電力モードをCPUに搭載してもよい。この場合、情報処理装置を小さくすることが出来る。   FIG. 13 is a diagram for explaining an embodiment when the present invention is applied to an information processing apparatus to which the present invention is applied, particularly an information portable terminal. The present invention can be easily realized by changing the function of the OS, that is, the software without changing the hardware, if the information processing device has two timers TIM (9) (two channels). . However, it is possible to perform processing at high speed by appropriately realizing functions processed by software (OS) with hardware. Furthermore, as shown in FIG. 14, a timer and a power saving mode may be mounted on the CPU. In this case, the information processing apparatus can be made small.

図15は本発明を施した情報処理装置の第2の実施例を説明する図である。携帯電話に代表される通信装置では、通信とマルチメディア処理を同時に処理することとなりプロセッサの負荷が重い。そこで、通信処理用途のベースバンドプロセッサ(1b)とマルチメディア処理用途のアプリケーションプロセッサ(1a)を情報処理装置に搭載している。ここで、ベースバンドプロセッサ(1b)とアプリケーションプロセッサ(1a)の両者に本願発明を適用することができる。しかし、ベースバンドプロセッサ(1b)は、アプリケーションプロセッサ(1a)と比較してその消費電力は小さい。従って、図15では、本願発明をアプリケーションプロセッサ(1a)のみに適用しており、ベースバンドプロセッサ(1b)には適用していない。このような構成とすることにより、ベースバンドプロセッサ(1b)に関するメモリMEM(21b)に容量を小さくすることができ、情報処理装置を小さく構成することが出来る。   FIG. 15 is a diagram for explaining a second embodiment of the information processing apparatus according to the present invention. In a communication device represented by a mobile phone, communication and multimedia processing are performed simultaneously, and the load on the processor is heavy. Therefore, a baseband processor (1b) for communication processing and an application processor (1a) for multimedia processing are installed in the information processing apparatus. Here, the present invention can be applied to both the baseband processor (1b) and the application processor (1a). However, the power consumption of the baseband processor (1b) is smaller than that of the application processor (1a). Accordingly, in FIG. 15, the present invention is applied only to the application processor (1a) and not to the baseband processor (1b). With such a configuration, the capacity of the memory MEM (21b) related to the baseband processor (1b) can be reduced, and the information processing apparatus can be configured smaller.

以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.

例えば、   For example,

本発明の代表例を説明する図である。It is a figure explaining the typical example of this invention. 発明が解決しようとする課題を説明する図である。It is a figure explaining the problem which invention is going to solve. 本発明の動作を説明する図である。It is a figure explaining operation | movement of this invention. タイムアウト要求発行処理部フローチャートを説明する図である。It is a figure explaining the timeout request issue processing part flowchart. 処理(201)のフローチャートを説明する図である。It is a figure explaining the flowchart of a process (201). 処理(204)のフローチャートを説明する図である。It is a figure explaining the flowchart of a process (204). 処理(205)のフローチャートを説明する図である。It is a figure explaining the flowchart of a process (205). 処理(202)のフローチャートを説明する図である。It is a figure explaining the flowchart of a process (202). 第1タイマー割込み処理部のフローチャートを説明する図である。It is a figure explaining the flowchart of a 1st timer interruption process part. 処理(223)のフローチャートを説明する図である。It is a figure explaining the flowchart of a process (223). 処理(224)のフローチャートを説明する図である。It is a figure explaining the flowchart of a process (224). 第2タイマー割込み処理部のフローチャートを説明する図である。It is a figure explaining the flowchart of a 2nd timer interruption process part. 本発明を施した情報処理装置を説明する図である。It is a figure explaining the information processing apparatus which gave this invention. タイマ、省電力モード内臓CPU搭載情報処理装置の説明図である。It is explanatory drawing of a timer and a power-saving mode built-in CPU information processing apparatus. 本発明を施したプロセッサ搭載の情報処理装置を説明する図である。It is a figure explaining the information processor with a processor to which the present invention is applied. 従来の無線通信装置を説明する図である。It is a figure explaining the conventional radio | wireless communication apparatus. 従来例の課題を説明する図である。It is a figure explaining the subject of a prior art example.

符号の説明Explanation of symbols

1 ・・・プロセッサ
2・・・同期回路
3・・・受信回路
4・・・レジスタ
5・・・切替回路
6・・・高速発振回路
7・・・RTC
8・・・I/O
9・・・タイマ
10・・・割込回路
11・・・バス
21・・・メモリ
22・・・OS
23・・・省電力モード回路
24・・・システムクロック
41・・・消費電流
42・・・タイマ割込み要求モード
43 ・・・省電力モード
44・・・タイマ周期
45・・・0[A]
46・・・タイマ割込み発生時消費電流値
47・・・省電力モード時消費電流値
61・・・カウンタ軸
62・・・時間軸
63・・・カウンタ値
64・・・周期設定値
65・・・割込み発生
66・・・タイムアウト要求発行時刻
67・・・タイムアウト時刻
68・・・タイムアウト要求時間
71・・・タイムアウト監視部
72・・・第1周期監視部
73・・・時間監視レート格納部
81・・・状態レジスタ
82・・・制御レジスタ
83・・・カウンタ
84・・・周期設定レジスタ
85・・・クロックCK
91・・・OS時間管理部
92・・・TCB管理部
93・・・タイムアウト要求発行処理部
94・・・第1タイマー割込み処理部
95・・・第2タイマー割込み処理部
101・・・処理ポインタ
102・・・挿入ポインタ
103・・・臨時格納部
104・・・レディキューヘッダ
105・・・ウェイトキューヘッダ
106・・・タイマキューヘッダ
107・・・順方向ポインタ
108・・・逆方向ポインタ
109・・・TCB
121・・・開始点
122・・・終了点
123・・・合流点
124、125、126,127、128,129、141、142、143,144・・・判別処理
201、202、203、204、205、206、207、208、209、210、221,222,223、241、242・・・処理
DESCRIPTION OF SYMBOLS 1 ... Processor 2 ... Synchronous circuit 3 ... Receiving circuit 4 ... Register 5 ... Switching circuit 6 ... High-speed oscillation circuit 7 ... RTC
8 ... I / O
9 ... Timer 10 ... Interrupt circuit 11 ... Bus 21 ... Memory 22 ... OS
23 ... Power saving mode circuit 24 ... System clock 41 ... Current consumption 42 ... Timer interrupt request mode 43 ... Power saving mode 44 ... Timer cycle 45 ... 0 [A]
46 ... Current consumption value when timer interrupt occurs 47 ... Current consumption value during power saving mode 61 ... Counter axis 62 ... Time axis 63 ... Counter value 64 ... Cycle setting value 65 ... Interrupt generation 66 ... Time-out request issue time 67 ... Time-out time 68 ... Time-out request time 71 ... Time-out monitoring unit 72 ... First period monitoring unit 73 ... Time monitoring rate storage unit 81 ... Status register 82 ... Control register 83 ... Counter 84 ... Cycle setting register 85 ... Clock CK
91 ... OS time management unit 92 ... TCB management unit 93 ... Timeout request issue processing unit 94 ... First timer interrupt processing unit 95 ... Second timer interrupt processing unit 101 ... Processing pointer DESCRIPTION OF SYMBOLS 102 ... Insertion pointer 103 ... Temporary storage part 104 ... Ready cue header 105 ... Wait cue header 106 ... Timer cue header 107 ... Forward pointer 108 ... Reverse pointer 109 ..TCB
121 ... start point 122 ... end point 123 ... confluence 124, 125, 126, 127, 128, 129, 141, 142, 143, 144 ... discrimination processing 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 221, 222, 223, 241, 242, ... processing

Claims (3)

所定のイベント実行までの発生時間を指定してシステムコールをする情報処理装置であって、
第1周期に設定される第1タイマ回路と、
前記第1周期より短い第2周期に設定される第2タイマ回路と、
前記システムコールがあった際に、前記発生時間を格納することが可能な前記タイムアウト監視部と、
前記システムコールがあった際に、次の前記第1タイマ回路の割り込み要求までの時間を格納することが可能な第1周期監視部と、
前記第2タイマ回路からの割り込み発生が許可か禁止かを設定するためのレジスタとを有し、
前記タイムアウト監視部は、前記タイムアウト監視部に格納された時間が前記第1周期より長い場合は、前記第2タイマからの割り込み要求を禁止し、前記タイムアウト監視部に格納された時間が前記第1周期より短い場合は、前記第2タイマからの割り込み要求を許可するように前記レジスタを設定し、
前記タイムアウト監視部は、前記第1タイマ回路又は前記第2タイマ回路から割り込み要求を受けた場合に、前記レジスタの値を参照することで、前記第1タイマ回路からの割り込み要求か前記第2タイマ回路からの割り込み要求かを判別し、
前記タイムアウト監視部は、前記第1タイマ回路の割り込み要求と判別された場合に、前記タイムアウト監視部に格納された時間から前記第1周期監視部に格納された時間を減算した時間を格納し、前記第2タイマ回路の割り込み要求と判別された場合に前記タイムアウト監視部に格納された時間から前記第2周期の時間を減算し、
前記タイムアウト監視部に格納された時間が0以下となった時点で、前記イベントを実行することを特徴とする情報処理装置。
An information processing apparatus that makes a system call by designating an occurrence time until execution of a predetermined event,
A first timer circuit set in the first period;
A second timer circuit set to a second period shorter than the first period;
The time-out monitoring unit capable of storing the occurrence time when the system call is made;
A first period monitoring unit capable of storing a time until an interrupt request of the first timer circuit when the system call is made;
A register for setting whether the interrupt generation from the second timer circuit is permitted or prohibited,
The time-out monitoring unit prohibits an interrupt request from the second timer when the time stored in the time-out monitoring unit is longer than the first period, and the time stored in the time-out monitoring unit is the first time If it is shorter than the period, set the register to allow the interrupt request from the second timer,
When the timeout monitoring unit receives an interrupt request from the first timer circuit or the second timer circuit, the timeout monitoring unit refers to the value of the register to determine whether the interrupt request from the first timer circuit or the second timer Determine whether it is an interrupt request from the circuit,
The time-out monitoring unit stores a time obtained by subtracting the time stored in the first period monitoring unit from the time stored in the time-out monitoring unit when it is determined as an interrupt request of the first timer circuit, Subtracting the time of the second period from the time stored in the timeout monitoring unit when it is determined as an interrupt request of the second timer circuit;
The information processing apparatus, wherein the event is executed when the time stored in the timeout monitoring unit becomes 0 or less.
システムコールから所定イベント実行時までの所定時間を計測する情報処理装置であって、
第1周期の時間間隔でカウントするための第1タイマと、
前記第1周期より短い第2周期の時間間隔でカウントするための第2タイマと、
前記所定時間を計測するためのタイムアウト監視部と、
前記第2タイマからの割り込み発生が許可か禁止かを設定するためのレジスタとを具備し、
前記タイムアウト監視部は、前記タイムアウト監視部に格納された時間が前記第1周期より長い場合は、前記第2タイマからの割り込み要求を禁止し、前記タイムアウト監視部に格納された時間が前記第1周期より短い場合は、前記第2タイマからの割り込み要求を許可するように前記レジスタを設定し、
前記タイムアウト監視部は、前記第1タイマ又は前記第2タイマから割り込み要求を受けた場合に、前記レジスタの値を参照することで、前記第1タイマからの割り込み要求か前記第2タイマからの割り込み要求かを判別し、
前記情報処理装置は、前記所定時間を計測する場合に、前記第1タイマからの割り込み要求と判断された場合に前記第1タイマでカウントし、前記第2タイマからの割り込み要求と判断された場合に前記第2タイマによりカウントし、
前記所定時間は、前記第1タイマの割り込み要求と判断された場合に前記タイムアウト監視部に格納された時間を減少させ、前記第2タイマの割り込み要求と判断された場合に前記第2タイマの割り込み要求を受けて前記タイムアウト監視部に格納された時間を減少させることにより計測され、
前記タイムアウト監視部に格納された時間が0以下となった時点で、前記イベントを実行することを特徴とする情報処理装置。
An information processing apparatus that measures a predetermined time from a system call to execution of a predetermined event,
A first timer for counting at a time interval of the first period;
A second timer for counting at a time interval of a second period shorter than the first period;
A time-out monitoring unit for measuring the predetermined time;
A register for setting whether the interrupt generation from the second timer is permitted or prohibited,
The time-out monitoring unit prohibits an interrupt request from the second timer when the time stored in the time-out monitoring unit is longer than the first period, and the time stored in the time-out monitoring unit is the first time If it is shorter than the period, set the register to allow the interrupt request from the second timer,
The time-out monitoring unit refers to an interrupt request from the first timer or an interrupt from the second timer by referring to the value of the register when an interrupt request is received from the first timer or the second timer. Determine if it is a request,
When the information processing apparatus measures the predetermined time, when it is determined that the interrupt request is from the first timer, the information processing apparatus counts by the first timer, and when it is determined that the interrupt request is from the second timer Counting by the second timer,
The predetermined time decreases the time stored in the timeout monitoring unit when it is determined as an interrupt request of the first timer, and the interrupt of the second timer when it is determined as an interrupt request of the second timer. Measured by reducing the time stored in the timeout monitor upon receipt of the request,
The information processing apparatus, wherein the event is executed when the time stored in the timeout monitoring unit becomes 0 or less.
システムコールから所定時間後に所定イベントを実行する情報処理装置であって、
中央処理装置と、
前記中央処理装置に接続されるメモリと、
第1周期のパルスに従って割り込み要求をする第1タイマと、
前記第1周期より短い第2周期のパルスに従って割り込み要求をする第2タイマと、
前記システムコール時に前記所定時間を格納するためのタイムアウト監視部と、
前記第2タイマからの割り込み発生が許可か禁止かを設定するためのレジスタとを具備し、
前記タイムアウト監視部は、前記タイムアウト監視部に格納された時間が前記第1周期より長い場合は、前記第2タイマからの割り込み要求を禁止し、前記タイムアウト監視部に格納された時間が前記第1周期より短い場合は、前記第2タイマからの割り込み要求を許可するように前記レジスタを設定し、
前記タイムアウト監視部は、前記第1タイマ又は前記第2タイマから割り込み要求を受けた場合に、前記レジスタの値を参照することで、前記第1タイマからの割り込み要求か前記第2タイマからの割り込み要求かを判別し、
前記中央処理装置は、前記第1タイマの割り込み要求と判断された場合に前記タイムアウト監視部に格納された時間を変化させ、前記第2タイマの割り込み要求と判断された場合に前記第2タイマの割り込み要求により前記タイムアウト監視部に格納された時間を変化させ、
前記タイムアウト監視部に格納された時間が0以下となった時点で、前記イベントを実行することを特徴とする情報処理装置。
An information processing apparatus that executes a predetermined event after a predetermined time from a system call,
A central processing unit;
A memory connected to the central processing unit;
A first timer for making an interrupt request according to a pulse of the first period;
A second timer that makes an interrupt request according to a pulse of a second period shorter than the first period;
A timeout monitoring unit for storing the predetermined time at the time of the system call;
A register for setting whether the interrupt generation from the second timer is permitted or prohibited,
The time-out monitoring unit prohibits an interrupt request from the second timer when the time stored in the time-out monitoring unit is longer than the first period, and the time stored in the time-out monitoring unit is the first time If it is shorter than the period, set the register to allow the interrupt request from the second timer,
The time-out monitoring unit refers to an interrupt request from the first timer or an interrupt from the second timer by referring to the value of the register when an interrupt request is received from the first timer or the second timer. Determine if it is a request,
The central processing unit changes the time stored in the time-out monitoring unit when it is determined as an interrupt request for the first timer, and when the interrupt request for the second timer is determined as the interrupt request for the second timer. Change the time stored in the timeout monitoring unit by an interrupt request,
The information processing apparatus, wherein the event is executed when the time stored in the timeout monitoring unit becomes 0 or less.
JP2008116874A 2008-04-28 2008-04-28 Information processing communication device Withdrawn JP2008243220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008116874A JP2008243220A (en) 2008-04-28 2008-04-28 Information processing communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008116874A JP2008243220A (en) 2008-04-28 2008-04-28 Information processing communication device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2002313617A Division JP4147087B2 (en) 2002-10-29 2002-10-29 Information processing communication device

Publications (1)

Publication Number Publication Date
JP2008243220A true JP2008243220A (en) 2008-10-09

Family

ID=39914396

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008116874A Withdrawn JP2008243220A (en) 2008-04-28 2008-04-28 Information processing communication device

Country Status (1)

Country Link
JP (1) JP2008243220A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012203518A (en) * 2011-03-24 2012-10-22 Toshiba Corp Operation switching device and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012203518A (en) * 2011-03-24 2012-10-22 Toshiba Corp Operation switching device and program

Similar Documents

Publication Publication Date Title
KR101503627B1 (en) Minimizing resource latency between processor application states in a portable computing device by scheduling resource set transitions
US9823946B2 (en) Processor and program execution method capable of efficient program execution
US20080307248A1 (en) Cpu Clock Control Device, Cpu Clock Control Method, Cpu Clock Control Program, Recording Medium, and Transmission Medium
JP5824162B2 (en) Conserving power through workload estimation for portable computing devices using scheduled resource set migration
KR101551321B1 (en) Method and system for scheduling requests in a portable computing device
JP4490298B2 (en) Processor power control apparatus and processor power control method
JP2004355599A (en) Frequency control device, information processor, and program
JP2006072991A (en) Power-saving processing unit, power-saving processing method and power-saving processing program
JP2002099433A (en) System of computing processing, control method system for task control, method therefor and record medium
US10564708B2 (en) Opportunistic waking of an application processor
EP3268842A1 (en) METHODS AND SYSTEMS FOR COORDINATION OF OPERATING STATES AMONGST MULTIPLE SOCs WITHIN A COMPUTING DEVICE
KR20150112660A (en) System on chip, method thereof, and device including the same
US8458508B2 (en) Information processing device which specifies a waiting time until execution of a given event and makes a system call
JP2008243220A (en) Information processing communication device
JP2006072698A (en) Power-saving-adapted device

Legal Events

Date Code Title Description
A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20081029