WO2006106917A1 - タイマー回路、これを用いた携帯通信端末及び電子機器 - Google Patents

タイマー回路、これを用いた携帯通信端末及び電子機器 Download PDF

Info

Publication number
WO2006106917A1
WO2006106917A1 PCT/JP2006/306832 JP2006306832W WO2006106917A1 WO 2006106917 A1 WO2006106917 A1 WO 2006106917A1 JP 2006306832 W JP2006306832 W JP 2006306832W WO 2006106917 A1 WO2006106917 A1 WO 2006106917A1
Authority
WO
WIPO (PCT)
Prior art keywords
timer
time
counter
timer expiration
memory
Prior art date
Application number
PCT/JP2006/306832
Other languages
English (en)
French (fr)
Inventor
Hideo Namiki
Original Assignee
Nec Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nec Corporation filed Critical Nec Corporation
Priority to JP2007511164A priority Critical patent/JPWO2006106917A1/ja
Priority to US11/908,468 priority patent/US7949891B2/en
Priority to CN2006800107799A priority patent/CN101151584B/zh
Priority to EP06730780A priority patent/EP1868059B1/en
Publication of WO2006106917A1 publication Critical patent/WO2006106917A1/ja

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04FTIME-INTERVAL MEASURING
    • G04F1/00Apparatus which can be set and started to measure-off predetermined or adjustably-fixed time intervals without driving mechanisms, e.g. egg timers
    • G04F1/005Apparatus which can be set and started to measure-off predetermined or adjustably-fixed time intervals without driving mechanisms, e.g. egg timers using electronic timing, e.g. counting means
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G21/00Input or output devices integrated in time-pieces
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G99/00Subject matter not provided for in other groups of this subclass
    • G04G99/006Electronic time-pieces using a microcomputer, e.g. for multi-function clocks

Definitions

  • Timer circuit Portable communication terminal using the same, and electronic device
  • the present invention relates to a timer circuit, a portable communication terminal and an electronic device using the timer circuit, and more particularly to a timer circuit mounted on an electronic device such as a portable communication terminal.
  • Software for controlling a mobile communication terminal generally performs various controls by operating a timer circuit configured by hardware. Regarding measurement using a timer circuit, it may be used for hardware control and timing adjustment of software processing, and may be used for monitoring communication with a higher-level device that is a communication partner.
  • FIG. 12 is a timing chart showing the circuit operation of the conventional example.
  • Ta, Tb, and Tc in the figure indicate the time required for time measurement (measurement) (Ta> Tb> Tc).
  • TIMER_INT is an interrupt signal that the timer circuit generates for the CPU
  • COUNTER is a count value that is counted by the CPU
  • INT is an interrupt signal that is actually generated by the CPU in response to a timing request.
  • Sarakuko, 0 to T8 indicate the count value (COUNTER) corresponding to the start of the time Ta, Tb, Tc and the end of the time.
  • a time request for time Ta having a CPU power is issued, a time request for time Tb is issued before the end of the time measurement. Then, a time request for the first time Tc is issued before the time Tb expires. After the time Tb expires, a second to fourth time Tc timing request is issued, and then the time Ta time expires.
  • the measurement operation of the timer circuit is started at the time of the timer operation in response to the time count request of the time Ta, and the timer circuit periodically generates an interrupt signal (TIMER—INT) for the CPU every reference timer (minimum time). .
  • the count value (COUNTER) is updated while counting by software processing by the CPU. From this, the CPU sequentially generates the necessary interrupt signals ( ⁇ ) sequentially while counting the times ⁇ 3 to ⁇ 8 that should be timed according to the measurement requests for the times Ta, Tb, and Tc. After generating the interrupt signal ( ⁇ ) corresponding to the timing of time ⁇ 8, the measurement operation of the timer circuit is terminated, and generation of the periodic interrupt signal (TIME R—INT) to the CPU is terminated.
  • the reference timer is set to be long, the generation period of the interrupt signal (TIMER-INT) to the CPU becomes long, so that the operating current due to the operation of the CPU can be reduced.
  • the reference timer is set longer, the required timer measurement error will increase. For example, if there is a timekeeping request to measure every minute and every 30 minutes at the same time, if the reference timer is set every minute, the timing request timing every minute and the timing request timing every 30 minutes If they match, there is no error in timing for 30 minutes. However, if the timing requirements for both timings do not match, the 30-minute timing is rounded to the standard timer that occurs every minute, resulting in an error of less than 1 minute.
  • the problem in realizing a plurality of different timings using the timer circuit as described above is as follows: In particular, when it is applied to a timer circuit in an electronic device such as a portable communication terminal that requires low power consumption, it becomes prominent and a countermeasure is desired.
  • an object of the present invention is to realize a plurality of timings with different measurement times in a timer circuit mounted on an electronic device such as a mobile communication terminal while reducing measurement errors and to reduce power consumption.
  • a timer circuit includes a counter that operates based on a reference clock, and a timer that stores a timer one expiration time corresponding to the timing request when a timing request for CPU power is received. And a comparator that compares the time corresponding to the output value of the counter with the timer expiration time stored in the storage unit and outputs an interrupt signal to the CPU when the two times match.
  • the storage unit stores a plurality of timer expiration times corresponding to a plurality of timing requests, and the timer expiration time closest to the time corresponding to the output value of the counter is a timer to be compared by the comparator It is set as the expiration time.
  • the storage unit stores a plurality of timer expiration times corresponding to a plurality of timing requests, and at least the counter among a plurality of timer expiration times stored in the first memory. And a second memory for storing the timer expiration time closest to the time corresponding to the output value of the timer, and the timer expiration time stored in the second memory is set as the timer expiration time for comparison in the comparator May be.
  • the storage unit is sorted by the sorting unit that rearranges the plurality of timer expiration times stored in the first memory in the order closest to the time corresponding to the output value of the counter, and the sorting unit. And setting means for setting the plurality of timer expiration times in the second memory.
  • the second memory has a timer that is closest to the time corresponding to the output value of the counter. Only the end time may be stored.
  • the second memory may be updated when a plurality of timer expiration times stored in the first memory are updated.
  • the first memory stores enable information for setting whether the plurality of timer expiration times are valid or invalid, and the timer expiration time corresponding when the interrupt signal is generated by the comparator.
  • the enable information is invalidated, and the second memory may store a timer expiration time when the enable information is validly set.
  • the first memory stores carry-out information indicating whether or not the counter carries out, and the timer expiration time is updated based on the carry-out information when the counter carries out. Good.
  • the comparator has a plurality of comparators connected to an output side of the counter, and the storage unit includes a plurality of memories individually connected to the plurality of comparators.
  • the storage unit includes a plurality of memories individually connected to the plurality of comparators.
  • a plurality of timer expiration times corresponding to the plurality of timing requests may be individually stored, and each timer expiration time may be individually set as a timer expiration time to be compared by the plurality of comparators.
  • a mobile communication terminal includes any one of the timer circuits described above.
  • An electronic apparatus includes any one of the timer circuits described above.
  • FIG. 1 is a block diagram showing a configuration of a timer circuit according to a first embodiment of the present invention.
  • FIG. 2 is a diagram showing a data structure stored in the time memory shown in FIG.
  • FIG. 3 is a diagram showing a configuration of data stored in a comparison register shown in FIG.
  • FIG. 4 is a flowchart showing the operation of the timer circuit according to the first embodiment of the present invention. is there.
  • FIG. 5 is a timing chart for explaining the operation of the timer circuit according to the first embodiment of the present invention.
  • FIG. 6 is a block diagram showing a configuration of a comparison register of a timer circuit according to a second embodiment of the present invention.
  • FIG. 7 is a flowchart showing the operation of the timer circuit according to the second embodiment of the present invention.
  • FIG. 8 is a timing chart for explaining the operation of the timer circuit according to the second embodiment of the present invention.
  • FIG. 9 is a block diagram showing a configuration of a timer circuit according to a third embodiment of the present invention.
  • FIG. 10 is a block diagram showing a configuration of a timer circuit according to a fourth embodiment of the present invention.
  • FIG. 11 is a diagram showing a schematic configuration when the timer circuit of the present invention is applied to a mobile communication terminal.
  • FIG. 12 is a timing chart for explaining the operation of the conventional timer circuit. Explanation of symbols
  • FIG. 1 is a block diagram showing the configuration of the first exemplary embodiment of the present invention.
  • the timer circuit of the present embodiment includes a counter 101, a comparator (CMP) 104, a time memory (first memory) 102, and a comparison register (second memory) 103. It is connected.
  • the time memory 102 and the comparison register 103 constitute the storage unit of the present invention.
  • the CPU 120 is connected to ROM and RAM (not shown). Various programs including a driving program for one timer circuit are stored in the ROM, and are read out and executed by the CPU 120 as necessary.
  • RAM is a memory that provides a work area for the CPU 120.
  • the CPU 120 is connected to the time memory 102 and the comparison register 103 via the CPU bus 108. In addition, the CPU 120 can input an interrupt signal (INT) from the comparator 104.
  • INT interrupt signal
  • the counter 101 performs a counting operation based on the input clock signal CLK and outputs the power count value to the comparator 104.
  • the counter 101 is a 30-bit counter, and outputs the 30-bit count value TIM [29: 0] to the comparator 104. Further, the counter 101 generates a carry-out signal (Co: Carry Out) when the count value returns to 0, and outputs it to the time memory 102 to notify that the carry-out has occurred.
  • the count value can be read out by the CPU 120.
  • the time memory 102 is a memory in which data including a timer expiration value for setting the time of the generation timing of the interrupt signal (INT) to the CPU 120 is set by the timing operation of the timer circuit.
  • the timer expiration value is set by adding the time required for the time measurement to the count value of the counter 101 when the time measurement request is generated.
  • the time memory 102 has a configuration shown in FIG. 2 in the present embodiment. As shown in Fig. 2, the time memory 102 stores 32-bit data T [0], T [l], and the timer expiration value (time timeout value) corresponding to the 30-bit timer expiration time by the CPU 120. ⁇ , ⁇ [ ⁇ -1], ⁇ [ ⁇ ] (hereinafter ⁇ [ ⁇ ]) are set to be updatable. Each ⁇ [ ⁇ ] is input in the order in which there is a measurement request from the CPU 120.
  • the first ⁇ [0] has a timer expiration value corresponding to the time of the first timing request
  • the second T [l] has a timer expiration value corresponding to the time of the second timing request
  • ⁇ th In ⁇ [ ⁇ ] the timer expiration value corresponding to the time of the ⁇ -th timing request is input.
  • the corresponding T [X] in the time memory 102 is updated.
  • each T [x] as shown in FIG. 2, a 30-bit (bit29 to bitO) timer expiry value, a 1-bit (bit30) carry-out bit (Co), and a 1-bit i Each enable bit (En) is set.
  • the carry-out bit indicates that the count value of the counter 101 has been carried out.
  • the carry-out bit setting value is changed from 0 to 1 so that an interrupt is generated at the next count value. Change the data.
  • the enable bit indicates whether the data of the timer expiration value corresponding to the set time is valid or invalid. This enable bit is set to be valid when the timer expiration value data is set. When the comparator 104 generates an interrupt signal to the CPU 120, it is invalid for the timer expiration value data that generated the interrupt signal. Changed to (disable).
  • the timer expiration value, enable bit, and carry-out bit of T [x] in the time memory 102 are interrupt signals from the comparator 104 to the CPU when updated by the setting from the CPU 120. Is generated, it is updated when the count value of the counter 101 carries out.
  • the CPU 120 sets the enable bit of T [x] set in the time memory 102 and sorts the data, and the sorted valid data is stored in the comparison register 103. It is set and stored as ⁇ , [0], ⁇ , [1], ⁇ , ⁇ '[ ⁇ -1], ⁇ , [ ⁇ ] (hereinafter)' [ ⁇ ]).
  • Each T, [xj is updated when there is an update by the setting from the CPU 120, when an interrupt signal is generated from the comparator 104 to the CPU 120, or when the count value of the counter 101 carries out And sorted in ascending order in the order closest to the count value.
  • the timer expiration value closest to the count value is stored in T [0]
  • the timer expiration value closest to the count value is stored in T [l]
  • the sorted timer expiration values are stored.
  • the timer expiration value stored in ⁇ [0] is the comparator.
  • 104 is output as a timer value to be compared.
  • the comparator 104 inputs the count value output from the counter 101 and the timer value of the data T ′ [0] stored in the comparison register 103, and determines whether or not both values match. judge. As a result, if both values match, an interrupt signal (INT) to the CPU 120 is generated and output to the CPU 120.
  • INT interrupt signal
  • FIG. 4 is a flowchart showing the operation of the present embodiment
  • FIG. 5 is a timing chart for explaining the operation of the present embodiment. In FIG. 5, the timing corresponding to each step in the flowchart of FIG. 4 is entered.
  • the CPU 120 sets ⁇ 8 in the comparison register 103 and ⁇ ⁇ ⁇ ⁇ 8 in the timer expiration value of [0] (step S2).
  • step S3 YES
  • enable bit of T [l] is enabled.
  • step S7 YES
  • step S8 enable bit T [2] is enabled.
  • the carry-out bit of ⁇ [ ⁇ ] is not set, but when the timer expiration value exceeds the maximum value of counter 101, 1 is determined by the carry-out signal from counter 101. Set to Thus, the timer expiration value of ⁇ [ ⁇ ] is set to be compared with the count value after the carry-out of the counter 101.
  • step Sl l YES
  • the operation for the time-measurement request for a plurality of times T3 is performed in the same manner, and the same operation is performed when the count value becomes T4 and when the count value becomes T8.
  • the count value is updated to 0, this is notified to the time memory 102 and the carry bit stored in the time memory 102 is terminated. .
  • the result of sorting using the memory is used as the timer value to be compared with the count value of the counter, and a plurality of timings are realized by one comparator.
  • the circuit scale that operates simultaneously can be suppressed.
  • the CPU since the CPU operates when an interrupt is output from the comparator, CPU processing can be reduced and unnecessary operations of the CPU can be greatly reduced. This effect can be maximized especially when low power consumption is required, such as mobile communication terminals. This is because mobile communication terminals are required to have low power consumption, avoid unnecessary CPU operations as much as possible, and often require multiple different timers for communication.
  • FIG. 6 shows the storage unit of the present invention in the timer circuit according to the embodiment of the present invention.
  • 4 is a block diagram showing a configuration of a comparison register (second memory) 103.
  • FIG. The other parts of the present embodiment have the same configuration as that of the first embodiment.
  • the comparison register 103 of the first embodiment a plurality of T ′ [X] are set, and each T and [X] is set to a set value force S of a plurality of requested timer expiration times. It is stored in the state.
  • T ′ [0] is set and only one timer expiration time is stored.
  • the data stored in ⁇ , [0] is the closest to the count value among the set values of the timer expiration value for which the enable bit of ⁇ [ ⁇ ] in the time memory 102 is valid, as described above. It is.
  • FIG. 7 is a flowchart showing the operation of the present embodiment
  • FIG. 8 is a timing chart for explaining the operation of the present embodiment. In FIG. 8, the timing corresponding to each step in the flowchart of FIG. 7 is entered.
  • the CPU 120 sets ⁇ ⁇ ⁇ ⁇ 8 in the comparison register 103 and ⁇ ⁇ ⁇ ⁇ 8 in the timer expiration value of [0] (step S22).
  • a time measurement request for time Tb is generated by the CPU 120 (step S23: YES).
  • the enable bit of T [l] is enabled.
  • the CPU 120 issues a time measurement request for the time Tc (step S27: YES).
  • T4 T2 + Tc
  • T4 T4 as T [ Set the timer expiration value of 2]
  • the third embodiment of the present invention will be described.
  • the result of sorting using the memory is used to realize it with one comparator.
  • a configuration is employed in which a plurality of comparators are used to set timer expiration values corresponding to a plurality of timing requests input to the respective comparators.
  • FIG. 9 is a block diagram showing a configuration of the third exemplary embodiment of the present invention.
  • the timer circuit of the present embodiment includes a CPU 530, a 31-bit counter 501, a plurality of comparators 521 on the output side of the 30-bit count value TIM [30: 0], 522 power is provided.
  • Comparison registers (storage units) 511 and 512 are provided on the input sides of 31-bit timer expiration values [30: 0] of the comparators 521 and 522, respectively.
  • a register 502 and an OR circuit 503 are connected in parallel.
  • each comparison register 511, 512 can output an enable bit [31] indicating that the timer expiration value is valid Z invalid to each comparator 521, 522. It has become.
  • Each of the comparators 521 and 522 compares the count value of the counter 501 with the timer expiration value of each of the comparison registers 511 and 512 when the enable bit of each of the comparison registers 511 and 512 is valid. If it does, an interrupt signal is generated, and the interrupt signal is output to the register 502 and the OR circuit 503, respectively.
  • the register 502 stores the output values of the respective comparators 521 and 522.
  • the OR circuit 503 outputs the input to the CPU 530 as one interrupt signal (INT).
  • the CPU 530 refers to the data stored in the register 502 and determines which of the comparators 521 and 522 is the interrupt signal power from the OR circuit 503, and performs interrupt processing based on this.
  • the present embodiment increases the counter bit length to 38 bits, and the bit length input to the comparator is TIM [30: 0] and TIM [37: 7]. This makes it possible to use the same counter for timer measurements with different maximum measurement times.
  • FIG. 10 is a block diagram showing a configuration of the fourth exemplary embodiment of the present invention.
  • the CPU 630 and the counter 601 have the lowest 31-bit count value TIM [30: of the output side of the 38-bit count value TIM [37: 0].
  • Multiple comparators 623 and 624 forces are provided on the output side of the upper 31-bit count value TIM [37: 7], respectively.
  • Comparison registers (storage units) 611 to 614 are provided on the input side of the 31-bit timer expiration value [30: 0] of each of the comparators 621 to 624, respectively.
  • a register 602 and an OR circuit 6003 are connected in parallel.
  • Each comparison register 611 to 614 can output to each comparator 621 to 624 an enable bit [31] indicating that the timer expiration value corresponding to each timing request is valid, as well as valid Z invalidity of the timer expiration value. It has become.
  • Each of the comparators 621 to 624 compares the count value of the counter 601 with the timer expiration value of each comparison register 611 to 614 when the enable bit of each comparison register 611 to 614 is valid. If it does, an interrupt signal is generated and the interrupt signal is output to the register 602 and the OR circuit 603, respectively.
  • the register 602 stores the output values of the respective comparators 621 to 624.
  • the OR circuit 603 outputs the input to the CPU 630 as one interrupt signal (INT).
  • the CPU 630 refers to the data stored in the register 602 to determine which of the interrupt signal power from the OR circuit 503 is the interrupt signal from the comparators 521 and 522, and performs interrupt processing based on this.
  • the timer circuit described in each of the above embodiments can be mounted on a mobile communication terminal such as a mobile phone.
  • a mobile communication terminal such as a mobile phone.
  • one or more LSIs large scale constituting at least a part of each unit (not shown) such as a radio unit, a signal processing unit, and a control unit constituting the mobile communication terminal 100
  • the timer circuit 102 configured as described above is mounted on the (integrated circuit) 101. Needless to say, the timer circuit can be applied to electronic devices other than mobile communication terminals.
  • the present invention can be applied to the use of a timer circuit mounted on an electronic device such as a mobile communication terminal, and is particularly used for a timer circuit mounted on various circuits such as an LSI for a mobile communication terminal such as a mobile phone. be able to.

Abstract

 携帯通信端末等に搭載されるタイマー回路において、計測時間の異なる複数の計時を測定誤差を低減して実現すると共に消費電力を低減する。タイマー回路は、基準クロックにより動作するカウンタ101と、CPU120からの計時要求を受けたときにその計時要求に対応するタイマー満了時刻を格納する格納部(時刻メモリ102、比較レジスタ103)と、カウンタ101の出力値に対応する時刻と、格納部に格納されたタイマー満了時刻とが一致したときにCPU120への割り込み信号を生成する比較機104とを有する。格納部は、複数の計時要求に対応する複数のタイマー満了時刻を格納し、そのうちカウンタ101の出力値に対応する時刻に最も近いタイマー満了時刻が比較機104の比較対象のタイマー満了時刻として設定される。

Description

明 細 書
タイマー回路、これを用いた携帯通信端末及び電子機器
技術分野
[0001] 本発明は、タイマー回路、これを用いた携帯通信端末及び電子機器に関し、特に 携帯通信端末等の電子機器に実装されるタイマー回路に関する。
背景技術
[0002] 携帯通信端末を制御するソフトウェアは、一般にハードウェアで構成されるタイマー 回路を動作させて、各種制御を行っている。タイマー回路を用いた測定に関しては、 ハードウェア制御やソフトウェア処理のタイミング調停のために用いる場合、及び通信 相手である上位装置との通信を監視するために用いる場合がある。
[0003] 前者の場合は、一般的に計測時間が短ぐタイマー回路により複数の異なる時間を 同時に計測する必要はあまりない。一方、後者の場合は、複数の異なるタイミングで 、異なる時間を測定する場合が多ぐタイマー回路により複数の異なる時間を同時に 計測する必要もある。複数の異なる時間を同時に計測する場合、必要数量のタイマ 一回路を全て実装することで、実現することが可能である。しかし、こうすると回路規 模が大きくなり、とくに小型化が必要である携帯通信端末では、現実的ではない。そ こで、限られた数量のタイマー回路を実装し、最小時間(例えば 1秒)をタイマー回路 で測定し、測定された最小時間毎に周期的に CPUに割り込みを発生させ、その割り 込み発生毎に CPUによるソフトウェア処理にてカウントしながら、そのカウント値を更 新していく。こうすることで、計測時間の異なる複数の計時を非同期にスタートして実 現している。
発明の開示
発明が解決しょうとする課題
[0004] し力しながら、上記の従来技術では、複数の計時を行う機能を実現することは可能 である力 CPUによるソフトウェア処理がタイマー回路で測定している最小時間毎に 発生するため、 CPU動作の発生頻度に応じて消費電流が増えてしまうことがあった。 また、最小時間毎にタイマー回路による測定のスタートと停止が行われるため、測定 誤差が発生してしまうことがあった。このことを図 12を参照して説明する。
[0005] 図 12は、従来例の回路動作を示すタイミングチャートである。図中の Ta、 Tb、 Tcは 、計時(測定)要求の時間(Ta>Tb>Tc)を示す。また、 TIMER_INTは、タイマー 回路が CPUに発生させる割り込み信号、 COUNTERは、 CPUによりカウントされる カウント値、 INTは、計時要求を受けて CPUが生成する実際に必要な割り込み信号 をそれぞれ示す。さら〖こ、 0〜T8は、時間 Ta、 Tb、 Tcの計時開始及びその計時満 了に対応するカウント値 (COUNTER)を示す。
[0006] 図 12に示す従来例の場合、 CPU力もの時間 Taの計時要求が出された後、その計 時終了前に、時間 Tbの計時要求が出される。そして、時間 Tbの計時満了前に 1回 目の時間 Tcの計時要求が出される。時間 Tbの計時満了後、さらに 2〜4回目の時間 Tcの計時要求が出され、その後で時間 Taの計時が満了する。この場合、時間 Taの 計時要求に伴うタイマー動作時にタイマー回路の測定動作をスタートし、タイマー回 路は、基準タイマー(最小時間)毎に周期的に CPUに割り込み信号 (TIMER— INT )を発生させる。そして、割り込み発生毎に CPUによるソフトウェア処理にてカウントし ながら、カウント値(COUNTER)を更新する。これ〖こより、 CPUは、時間 Ta、 Tb、 T cの計測要求により計時すべき時間 Τ3〜Τ8をカウントしながら、実際に必要な割り込 み信号 (ΙΝΤ)を順次生成する。時間 Τ8の計時に対応する割り込み信号 (ΙΝΤ)を生 成後、タイマー回路の測定動作を終了し、 CPUへの周期的な割り込み信号 (TIME R— INT)の発生を終了する。
[0007] この場合、基準タイマーを長く設定すると、 CPUへの割り込み信号 (TIMER— IN T)の発生周期が長くなるため、 CPUの動作による動作電流を低減することができる 。しかし、基準タイマーを長く設定すれば、要求されるタイマーの測定誤差が大きくな つてしまう。例えば、 1分毎の計測と 30分毎の計測を同時に行う計時要求があった場 合に、基準タイマーを 1分毎に設定すると、 1分毎の計時要求タイミングと 30分毎の 計時要求タイミングが一致していれば、 30分の計時に誤差は生じない。しかし、両計 時要求タイミングが一致していない場合は、 30分の計時は、 1分毎に発生する基準 のタイマーに丸め込まれてしまい、 1分未満の誤差が生じてしまう。
[0008] 上記のようなタイマー回路を用いて複数の異なる計時を実現する場合の問題は、と くに低消費電力を要求される携帯通信端末等の電子機器にタイマー回路に適用す る場合には、顕著となり、その対策が望まれている。
[0009] なお、従来例のタイマー回路に関する先行技術文献としては、特開平 01— 22931 1号公報、特開平 01— 288913号公報、特開平 02— 13882号公報、特開平 05— 3 33956号公報、特開平 07— 005279号公報がある力 いずれも上記のような問題を 意識したものではない。
[0010] そこで、本発明は、携帯通信端末等の電子機器に搭載されるタイマー回路におい て、計測時間の異なる複数の計時を測定誤差を低減して実現すると共に消費電力を 低減することを目的とする。
課題を解決するための手段
[0011] 上記目的を達成するため、本発明に係るタイマー回路は、基準クロックにより動作 するカウンタと、 CPU力 の計時要求を受けたときにその計時要求に対応するタイマ 一満了時刻を格納する格納部と、前記カウンタの出力値に対応する時刻と、前記格 納部に格納されたタイマー満了時刻とを比較し、両時刻が一致したときに前記 CPU への割り込み信号を出力する比較機とを有し、前記格納部は、複数の計時要求に対 応する複数のタイマー満了時刻を格納し、そのうち前記カウンタの出力値に対応する 時刻に最も近いタイマー満了時刻が前記比較機の比較対象のタイマー満了時刻と して設定されることを特徴とする。
[0012] 前記格納部は、複数の計時要求に対応する複数のタイマー満了時刻を格納する 第 1のメモリと、前記第 1のメモリに格納された複数のタイマー満了時刻のうち、少なく とも前記カウンタの出力値に対応する時刻に最も近いタイマー満了時刻を格納する 第 2のメモリとを有し、前記第 2のメモリに格納されたタイマー満了時刻が前記比較機 の比較対象のタイマー満了時刻として設定されてもよい。
[0013] 前記格納部は、前記第 1のメモリに格納された複数のタイマー満了時刻を前記カウ ンタの出力値に対応する時刻に最も近い順に並び替えるソート手段と、前記ソート手 段によりソートされた前記複数のタイマー満了時刻を前記第 2のメモリに設定する設 定手段とを有してもよい。
[0014] 前記第 2のメモリは、前記カウンタの出力値に対応する時刻に最も近いタイマ一満 了時刻のみを格納してもよい。前記第 2のメモリは、前記第 1のメモリに格納されてい る複数のタイマー満了時刻が更新されたときに更新されてもよい。
[0015] 前記第 1のメモリは、前記複数のタイマー満了時刻が有効か無効かを設定するため のィネーブル情報を格納し、前記比較機により割り込み信号が生成されたときに該当 するタイマー満了時刻のィネーブル情報が無効設定され、前記第 2のメモリは、前記 ィネーブル情報が有効設定されたタイマー満了時刻を格納してもよい。
[0016] 前記第 1のメモリは、前記カウンタのキャリーアウト有無を示すキャリーアウト情報を 格納し、前記カウンタがキャリーアウトしたときに前記キャリーアウト情報に基づいて前 記タイマー満了時刻が更新されてもよい。
[0017] 前記比較機は、前記カウンタの出力側に接続される複数の比較機を有し、前記格 納部は、前記複数の比較機に個別に接続される複数のメモリを備え、前記複数のメ モリは、前記複数の計時要求に対応する複数のタイマー満了時刻を個別に格納し、 各タイマー満了時刻が前記複数の比較機の比較対象のタイマー満了時刻として個 別に設定されてもよい。
[0018] 本発明に係る携帯通信端末は、上記いずれかに記載のタイマー回路を備えたこと を特徴とする。
[0019] 本発明に係る電子機器は、上記いずれかに記載のタイマー回路を備えたことを特 徴とする。
発明の効果
[0020] 本発明によれば、携帯通信端末等の電子機器に搭載されるタイマー回路において 、計測時間の異なる複数の計時を測定誤差を低減して実現すると共に消費電力を低 減することができる。
図面の簡単な説明
[0021] [図 1]本発明の第 1の実施の形態に係るタイマー回路の構成を示すブロック図である
[図 2]図 1に示す時刻メモリに格納されるデータ構成を示す図である。
[図 3]図 1に示す比較レジスタに格納されるデータの構成を示す図である。
[図 4]本発明の第 1の実施の形態に係るタイマー回路の動作を示すフローチャートで ある。
[図 5]本発明の第 1の実施の形態に係るタイマー回路の動作を説明するためのタイミ ングチャートである。
[図 6]本発明の第 2の実施の形態に係るタイマー回路の比較レジスタの構成を示すブ ロック図である。
[図 7]本発明の第 2の実施の形態に係るタイマー回路の動作を示すフローチャートで ある。
[図 8]本発明の第 2の実施の形態に係るタイマー回路の動作を説明するためのタイミ ングチャートである。
[図 9]本発明の第 3の実施の形態に係るタイマー回路の構成を示すブロック図である
[図 10]本発明の第 4の実施の形態に係るタイマー回路の構成を示すブロック図であ る。
[図 11]本発明のタイマー回路を携帯通信端末に適用した場合の概略構成を示す図 である。
[図 12]従来例のタイマー回路の動作を説明するためのタイミングチャートである。 符号の説明
[0022] 101 カウンタ
102 時刻メモリ
103 比較レジスタ
104 比較機(CMP)
106 割り込み(INT)
120 CPU
発明を実施するための最良の形態
[0023] 以下、添付図面を参照して、本発明に係るタイマー回路、これを用いた携帯通信端 末及び電子機器を実施するための最良の実施の形態を説明する。
[0024] [第 1の実施の形態]
図 1は、本発明の第 1の実施の形態の構成を示すブロック図である。図 1に示すよう に、本実施の形態のタイマー回路は、カウンタ 101と、比較機 (CMP) 104と、時刻メ モリ(第 1のメモリ) 102と、比較レジスタ (第 2のメモリ) 103とを備え、 CPU120に接続 されている。時刻メモリ 102及び比較レジスタ 103が本発明の格納部を構成している
[0025] CPU120には、不図示の ROM及び RAMが接続されている。 ROMには、タイマ 一回路の駆動プログラムを含む各種のプログラムが格納されていて、必要に応じて C PU120に読み出され実行される。 RAMは、 CPU120のワークエリアを提供するメモ リである。 CPU120は、 CPUバス 108を介して時刻メモリ 102及び比較レジスタ 103 に接続されている。また、 CPU120は、比較機 104からの割り込み信号 (INT)を入 力可能となっている。
[0026] カウンタ 101は、入力されるクロック信号 CLKに基づいてカウント動作行い、その力 ゥント値を比較機 104に出力する。カウンタ 101は、本実施の形態では、 30ビットの カウンタで構成され、その 30ビットのカウント値 TIM [29 : 0]を比較機 104に対して出 力する。また、カウンタ 101は、カウント値が最大値力も 0に戻る際にキャリーアウト信 号 (Co : Carry Out)を生成して時刻メモリ 102に出力し、キャリーアウトしたことを通知 する。カウント値は、 CPU120により読み出し可能となっている。
[0027] 時刻メモリ 102は、タイマー回路の計時動作により CPU120への割り込み信号 (IN T)の発生タイミングの時刻を設定するタイマー満了値を含むデータが設定されるメモ リである。タイマー満了値は、計時要求発生時のカウンタ 101のカウント値に計時要 求の時間を加算して設定される。
[0028] この時刻メモリ 102は、本実施の形態では、図 2に示す構成となっている。図 2に示 すように、時刻メモリ 102には、 CPU120により、 30ビットのタイマー満了時刻に対応 するタイマー満了値 (time timeout value)を含む 32ビットのデータ T[0]、 T[l]、 · ··、 Τ[η- 1]、 Τ[η] (以下、 Τ[χ])が更新可能に設定される。各 Τ[χ]は、 CPU120から の計測要求があった順に入力される。すなわち、最初の Τ[0]には、最初の計時要求 の時刻に対応するタイマー満了値、 2番目の T[l]には、 2番目の計時要求の時刻に 対応するタイマー満了値、 η番目の Τ[η]には、 η番目の計時要求の時刻に対応する タイマー満了値がそれぞれ入力される。そして、計時要求による計時満了により比較 機 104から CPU120への割り込み信号が生成されると、時刻メモリ 102の該当する T [X]は更新される。
[0029] 各 T[x]には、図 2に示すように、 30ビット(bit29〜bitO)のタイマー満了値のほ力 1ビット(bit30)のキャリーアウトビット(Co)と、 1ビットのィネーブルビット(En)がそれ ぞれ設定される。
[0030] キャリーアウトビットは、カウンタ 101のカウント値がキャリーアウトしたことを示すもの である。カウンタ 101から時刻メモリ 102にキャリーアウト信号が入力された場合は、キ ャリーアウトビットの設定値を 0から 1に変更して、次回のカウント値で割り込みが発生 するように時刻メモリ 102上のデータを変更する。
[0031] ィネーブルビットは、設定された時刻に対応するタイマー満了値のデータが有効が 無効を示すものである。このイネ一ブルビットは、タイマー満了値のデータ設定時は 有効となるように設定され、比較機 104が CPU120に割り込み信号を生成した場合 に、割り込み信号を発生させたタイマー満了値のデータに関して無効設定 (disable) に変更される。
[0032] 以上のように、時刻メモリ 102の T[x]のタイマー満了値、ィネーブルビット、キャリー アウトビットは、 CPU120からの設定による更新があった場合、比較機 104から CPU への割り込み信号が生成された場合、カウンタ 101のカウント値がキャリーアウトした 場合に更新される。
[0033] 比較レジスタ 103には、 CPU120により、時刻メモリ 102に設定された T[x]のうち、 ィネーブルビットが有効設定されて 、るデータがソートされ、ソートされた有効なデー タが、 Τ, [0]、 Τ, [1]、 · · ·、 Τ' [η - 1]、 Τ, [η] (以下、 Τ' [χ] )として設定及び格納さ れる。
[0034] 各 T, [xjは、 CPU120からの設定による更新があった場合、比較機 104から CPU 120への割り込み信号が生成された場合、カウンタ 101のカウント値がキャリーアウト した場合にそれぞれ更新され、カウント値に最も近い順に昇順にソートされる。これに より、 T[0]には、カウント値に最も近いタイマー満了値が格納され、 T[l]には、その 次にカウント値に近いタイマー満了値が格納され、 Τ[2]以降も同様にソートされたタ イマ一満了値が格納される。このうち、 Τ[0]に格納されたタイマー満了値が、比較機 104の比較対象のタイマー値として出力される。
[0035] 比較機 104は、カウンタ 101から出力されるカウント値と、比較レジスタ 103に格納 されているデータ T' [0]のタイマー値とを入力し、両値が一致しているか否かを判定 する。その結果、両値が一致している場合には、 CPU120への割り込み信号 (INT) を生成し、 CPU120へ出力する。
[0036] 次に、図 4及び図 5を参照して、本実施の形態の動作を説明する。
[0037] 図 4は、本実施の形態の動作を示すフローチャートであり、図 5は、本実施の形態の 動作を説明するためのタイミングチャートである。図 5には、図 4のフローチャートの各 ステップに対応するタイミングが記入されて 、る。
[0038] 図 4及び図 5に示すように、 CPU120から時間 Ta、 Tb及び Tcの計時要求があった 場合(時間 Tcについては、複数回の計時要求が発生している。 )について説明する。
[0039] まず、 CPU120により時間 Taの計時要求が発生する。すると、カウンタ 101のカウ ント値が TOであるため、 CPU120は、その TOをカウンタ 101から読み出して、 Taと加 算して T8 (T8=T0+Ta)を計算し、その T8を時刻メモリ 102の T[0]のタイマ一満 了値に設定する (ステップ Sl)。このタイマー設定時に同時に、 T[0]のィネーブルビ ットを有効設定する。
[0040] そして、時刻メモリ 102の Τ[χ]が更新されたため、 CPU120は、比較レジスタ 103 の Τ, [0]のタイマー満了値に Τ8を設定する (ステップ S2)。これにより、比較機 104 は、カウンタ 101のカウント値と、比較レジスタ 102の T, [0] =Τ8とを比較する。
[0041] 次に、カウンタ 101のカウント値が比較レジスタ 102の Τ, [0]の格納値と一致する前 に、 CPU120により時間 Tbの計時要求が発生する(ステップ S3 : YES)。このとき、力 ゥント値が T1であるので、 CPU120は、その T1をカウンタ 101から読み出して、 Tbと 加算して T3 (T3=T1 +Tb)を計算し、その T3を時刻メモリ 102の T[l]のタイマー 満了値に設定する (ステップ S4)。このタイマー設定時に同時に、 T[l]のィネーブル ビットを有効設定する。
[0042] そして、時刻メモリ 102の Τ[χ]が更新されたため、 CPU120は、ィネーブルビットが 有効設定されているデータとして、 Τ[0] =Τ8と、 T[l] =Τ3とを比較する (ステップ S 5)。その結果、 T3<T8であるので、 CPU120は、比較レジスタ 103の Τ, [χ]が Τ, [ 0] =T3、 T' [1] =Τ8となるようにソートして更新する (ステップ S6)。これにより、比 較機 104は、カウンタ 101のカウント値と、比較レジスタ 102の T, [0] =Τ3とを比較 する。
[0043] 次に、カウンタ 101のカウント値が Τ, [0]の格納値と一致する前に、 CPU120により 時間 Tcの計時要求が発生する(ステップ S7 :YES)。このとき、 CPU120は、カウント 値が T2であるので、その T2をカウンタ 101から読み出して、 Tcと加算して T4 (T4 = T2+Tc)を計算し、その Τ4を時刻メモリ 102の Τ[2]のタイマー満了値に設定する( ステップ S8)。このタイマー設定時に同時に、 T[2]のィネーブルビットを有効設定す る。
[0044] そして、時刻メモリ 102の Τ[χ]が更新されたために、 CPU120は、ィネーブルビット が有効設定されているデータとして、 Τ[0] =Τ8と、 T[l] =Τ3と、 Τ[2] =Τ4とを比 較する(ステップ S9)。その結果、 T3<T4<T8であるので、比較レジスタ 103の Τ, [ X]が Τ, [0] =Τ3、 Τ' [1] =Τ4、 Τ' [2] =Τ8となるようにソートして更新する (ステツ プ S10)。これにより、比較機 104は、カウンタ 101のカウント値と、比較レジスタ 102 の T, [0] =Τ3とを比較する。
[0045] なお、本例では、 Τ[χ]のキャリーアウトビットは、設定されていないが、タイマ一満 了値がカウンタ 101の最大値を越える場合、カウンタ 101からのキャリーアウト信号に より 1に設定される。これにより、 Τ[χ]のタイマー満了値は、カウンタ 101のキヤリーア ゥト後のカウント値と比較されるように設定される。
[0046] この状態で、カウンタ 101のカウント値が Τ3になり、 Τ, [0] =Τ3と一致すると (ステ ップ Sl l : YES)、比較機 104は、 CPU120に対して割り込み信号を発生させる (ス テツプ S12)。そして、 CPU120への割り込み信号が発生したため、時刻メモリ 102に 対して割り込み信号が通知される。これにより、 CPU120は、時刻メモリ 102内の T[x ]のうち、 Τ3に該当するタイマー満了値の設定値を格納して 、る Τ [ 1 ]のィネーブル ビットを無効設定する (ステップ S 13)。
[0047] そして、 T[l]のィネーブルビットが無効設定されたため、 CPU120は、ィネーブル ビットが有効設定されているデータとして、 Τ[0] =Τ8と、 Τ[2] =Τ4とを比較し、その 結果、 Τ4<Τ8であるので、比較レジスタ 103の Τ, [X]が、 Τ, [0] =Τ4、 Τ' [1] =Τ 8となるようにソートして更新する (ステップ S 14)。
[0048] 以後、複数回の時間 T3の計時要求に対する動作も同様に行われ、その後にカウ ント値が T4となった場合と、カウント値が T8となった場合も上記と同様に動作する。 なお、本例では説明していないが、カウント値が更新されて 0となった場合は、その旨 が時刻メモリ 102に通知され、時刻メモリ 102内に格納されていたキャリービットがタリ 了される。
[0049] 従って、本実施の形態によれば、カウンタのカウント値と比較すべきタイマー値とし て、メモリを用いてソートした結果を使用し、複数の計時を 1つの比較機で実現したた め、従来例と比べ同時に動作する回路規模を抑制することができる。
[0050] また、本実施の形態によれば、比較機からの割り込み出力時に CPUが動作するた め、 CPUの処理を低減し、 CPUの不要な動作を大きく削減することができる。この効 果は、とくに携帯通信端末のように低消費電力が要求される場合に最大限に発揮さ せることができる。これは、携帯通信端末では、低消費電力が要求され、 CPUの不要 な動作を極力避ける必要があり、また通信に関して複数の異なる長時間のタイマーを 必要とする場合が多 ヽためである。
[0051] また、本実施の形態によれば、カウンタの動作クロック毎に計時開始タイミングと終 了タイミングの設定が可能であるため、前述した従来例のような複数の計時を行う際 の測定誤差を大幅に低減することができる。
また、本実施の形態では、メモリに複数のデータを格納しているため、連続的に割り 込み信号を発生させる場合等に、時刻メモリ内のデータと入れ替える作業が不要に なるので、割り込み信号の発生遅れなどがなくなるといった効果もある。
[0052] 以上のように、本実施の形態によれば、動作する回路規模を抑制し、複数の計時を 測定誤差を低減して実現でき、 CPUの処理を抑制し、消費電力を低減することがで きる。この効果は、とくに携帯通信端末向けの LSI (大規模集積回路)に実装されるタ イマ一回路に適用した場合に最大限に発揮させることができる。
[0053] [第 2の実施の形態]
次に、本発明の第 2の実施の形態について説明する。
[0054] 図 6は、本発明の実施の形態のタイマー回路のうち、本発明の格納部を構成する 比較レジスタ (第 2のメモリ) 103の構成を示すブロック図である。本実施の形態のそ の他の部分は、第 1の実施の形態と同様の構成をとる。第 1の実施の形態の比較レジ スタ 103は、複数の T' [X]が設定され、各 T, [X]には、要求された複数のタイマ一満 了時刻の設定値力 Sソートされた状態で格納されている。これに対し、本実施の形態で は、図 6に示すように、 T' [0]のみが設定され、 1つのタイマー満了時刻のみを格納 している。 Τ, [0]に格納されるデータは、前述と同様に、時刻メモリ 102の Τ[χ]のィ ネーブルビットが有効設定されているタイマー満了値の設定値のうち、最もカウント値 に近いものである。
[0055] 図 7は、本実施の形態の動作を示すフローチャートであり、図 8は、本実施の形態の 動作を説明するためのタイミングチャートである。図 8には、図 7のフローチャートの各 ステップに対応するタイミングが記入されて 、る。
[0056] 図 7及び図 8に示すように、本実施の形態でも、時間 Ta、 Tb及び Tcの計時要求が あった場合 (Tcについては、複数回の計時要求が発生している。 )について説明する
[0057] まず、 CPU120により時間 Taの計時要求が発生する。すると、 CPU120は、カウン タ 101のカウント値が TOであるので、 CPU120は、その TOをカウンタ 101から読み出 して、 Taと加算して T8 (T8 =T0 +Ta)を計算し、その T8を時刻メモリ 102の T[0]の タイマー満了値に設定する (ステップ S21)。このタイマー設定時に同時に、 T[0]の ィネーブルビットを有効設定する。
[0058] そして、時刻メモリ 102の Τ[χ]が更新されたため、 CPU120は、比較レジスタ 103 の Τ, [0]のタイマー満了値に Τ8を設定する(ステップ S22)。これにより、比較機 104 は、カウンタ 101のカウント値と、比較レジスタ 102の T, [0] =Τ8とを比較する。
[0059] 次に、カウンタ 101のカウント値が比較レジスタ 102の Τ, [0]の格納値と一致する前 に、 CPU120により時間 Tbの計時要求が発生する(ステップ S 23 : YES)。このとき、 カウント値が T1であるので、 CPU120は、その T1をカウンタ 101から読み出して、 T bと加算して T3 (T3 =T1 +Tb)を計算し、その T3を時刻メモリ 102の T[ l]のタイマ 一満了値に設定する (ステップ S24)。このタイマー設定時に同時に、 T[ l]のイネ一 ブルビットを有効設定する。 [0060] そして、時刻メモリ 102の T[x]が更新されたため、 CPU120は、ィネーブルビットが 有効設定されているデータとして、 Τ[0] =Τ8と、 T[l] =Τ3とを比較する (ステップ S 25)。その結果、 T3<T8であるので、 CPU120は、比較レジスタ 103力 Τ, [0] =Τ 3となるように更新する (ステップ S26)。これにより、比較機 104は、カウンタ 101の力 ゥント値と、比較レジスタ 102の T, [0] =Τ3とを比較する。
[0061] 次に、カウンタ 101のカウント値が Τ, [0]の格納値と一致する前に、 CPU120により 時間 Tcの計時要求が発生する(ステップ S27 : YES)。このとき、 CPU120は、カウン ト値が T2であるので、その T2をカウンタ 101から読み出して、 Tcと加算して T4 (T4 =T2+Tc)を計算し、その T4を時刻メモリ 102の T[2]のタイマー満了値に設定す る(ステップ S28)。このタイマー設定時に同時に、 T[2]のィネーブルビットを有効設 定する。
[0062] そして、時刻メモリ 102の Τ[χ]が更新されたために、 CPU120は、ィネーブルビット が有効設定されているデータとして、 Τ[0] =Τ8と、 T[l] =Τ3と、 Τ[2] =Τ4とを比 較する(ステップ S29)。その結果、 T3<T4<T8であるので、比較レジスタ 103が、 Τ' [0] =Τ3となるように更新する (ステップ S30)。これにより、比較機 104は、カウン タ 101のカウント値と、比較レジスタ 102の T, [0] =Τ3とを比較する。
[0063] この状態で、カウンタ 101のカウント値が Τ3になり、 Τ, [0] =Τ3と一致すると (ステ ップ S31 : YES)、比較機 104は、 CPU120に対して割り込み信号を発生させる (ス テツプ S32)。そして、 CPU120への割り込み信号が発生したため、時刻メモリ 102に 対して割り込み信号が通知される。これにより、 CPU120は、時刻メモリ 102内の T[x ]のうち、 Τ3に該当するタイマー満了値の設定値を格納して 、る Τ [ 1 ]のィネーブル ビットを無効設定する (ステップ S33)。
[0064] そして、 T[l]のィネーブルビットが無効設定されたため、 CPU120は、ィネーブル ビットが有効設定されているデータとして、 Τ[0] =Τ8と、 Τ[2] =Τ4とを比較し、その 結果、 Τ4く Τ8であるので、比較レジスタ 103が、 Τ, [0] =Τ4となるように更新する( ステップ S 34)。
[0065] 以後、複数回の時間 Τ3の計時要求に対する動作も同様に行われ、その後にカウ ント値が Τ4となった場合と、カウント値が Τ8となった場合も上記と同様に動作する。 [0066] 従って、本実施の形態によれば、第 1の実施の形態の効果にカ卩え、比較レジスタに 1つのタイマー満了時刻を設定するため、比較レジスタの構成がより簡易になるという 効果が得られる。
[0067] [第 3の実施の形態]
以下、本発明の第 3の実施の形態について説明する。第 1の実施の形態では、カウ ント値と比較すべきタイマー値として、メモリを用いてソートした結果を用いて、 1つの 比較機にて実現している。これに対し、本実施の形態では、複数の比較機を用いて、 それぞれの比較機に入力される複数の計時要求に対応するタイマー満了値を設定 する構成を採用している。
[0068] 図 9は、本発明の第 3の実施の形態の構成を示すブロック図である。図 9に示すよう に、本実施の形態のタイマー回路には、 CPU530と、 31ビットのカウンタ 501のほか 、その 30ビットのカウント値 TIM[30 : 0]の出力側に複数の比較機 521、 522力設け られる。各比較機 521、 522の 31ビットのタイマー満了値 [30 : 0]の入力側には、そ れぞれ比較レジスタ (格納部) 511、 512が設けられている。各比較機 521、 522の出 力側には、レジスタ 502及び OR回路 503が並列に接続されている。
[0069] 各比較レジスタ 511、 512は、各計時要求に対応するタイマー満了値のほか、その タイマー満了値の有効 Z無効を示すイネ一ブルビット [31]を各比較機 521、 522に 出力可能となっている。各比較機 521、 522は、各比較レジスタ 511、 512のイネ一 ブルビットが有効のときに、カウンタ 501のカウント値と、各比較レジスタ 511、 512の タイマー満了値とを比較し、両値が一致している場合に割り込み信号を生成し、その 割り込み信号をレジスタ 502及び OR回路 503にそれぞれ出力する。
[0070] レジスタ 502は、その各比較機 521、 522の出力値を格納する。 OR回路 503は、 各比較機 521、 522からの割り込み信号の出力のいずれかを入力したときに、その 入力を 1つの割り込み信号(INT)として CPU530に出力する。 CPU530は、レジス タ 502の格納データを参照して、 OR回路 503からの割り込み信号力 いずれの比較 機 521、 522からの割り込み信号であるのかを判断し、これに基づき、割り込み処理 を行う。
[0071] 従って、本実施の形態においても、第 1の実施の形態と同様の動作及び効果が得 られ、 CPUの不要な割り込み処理を低減して、複数のタイマー計測を 1つのカウンタ で実現することが可能となる。
[0072] [第 4の実施の形態]
以下、本発明の第 4の実施の形態について説明する。本実施の形態は、第 3の実 施の形態に対し、カウンタのビット長を大きくして 38ビットとし、比較機に入力するビッ ト長を TIM [30 : 0]と TIM [37 : 7]と分けることで、最大測定時間の異なるタイマー計 測を同一のカウンタにより実現している。
[0073] 図 10は、本発明の第 4の実施の形態の構成を示すブロック図である。図 10に示す ように、本実施の形態は、 CPU630と、カウンタ 601のほ力、その 38ビットのカウント 値 TIM[37 : 0]の出力側のうち、下位 31ビットのカウント値 TIM[30 : 0]の出力側に 複数の比較機 621、 622力 上位 31ビットのカウント値 TIM[37 : 7]の出力側に複数 の比較機 623、 624力 それぞれ設けられている。各比較機 621〜624の 31ビットの タイマー満了値 [30: 0]の入力側には、それぞれ比較レジスタ (格納部) 611〜614 が設けられている。各比較機 621〜624の出力側には、レジスタ 602及び OR回路 6 03が並列に接続されている。
[0074] 各比較レジスタ 611〜614は、各計時要求に対応するタイマー満了値のほか、そ のタイマー満了値の有効 Z無効を示すイネ一ブルビット [31]を各比較機 621〜624 に出力可能となっている。各比較機 621〜624は、各比較レジスタ 611〜614のイネ 一ブルビットが有効のときに、カウンタ 601のカウント値と、各比較レジスタ 611〜614 のタイマー満了値とを比較し、両値が一致している場合に割り込み信号を生成し、そ の割り込み信号をレジスタ 602及び OR回路 603にそれぞれ出力する。
[0075] レジスタ 602は、その各比較機 621〜624の出力値を格納する。 OR回路 603は、 各比較機 621〜624からの割り込み信号の出力のいずれかを入力したときに、その 入力を 1つの割り込み信号(INT)として CPU630に出力する。 CPU630は、レジス タ 602の格納データを参照して、 OR回路 503からの割り込み信号力 いずれの比較 機 521、 522からの割り込み信号であるのかを判断し、これに基づき、割り込み処理 を行う。
[0076] 従って、本実施の形態によれば、第 4の実施の形態と同様の動作及び効果に加え 、カウンタのビット長を大きくし、比較機に入力するカウント値をビット長の異なる 2つの カウント値に分けているため、最大測定時間の異なるタイマーを同一のカウンタにより 実現することが可能である。
[0077] (応用例)
上記の各実施の形態で説明したタイマー回路は、携帯電話機などの携帯通信端 末に搭載することができる。この場合、例えば図 12に示すように携帯通信端末 100を 構成する無線機部、信号処理部、制御部等の各部 (非図示)の少なくとも一部を構成 する 1つ又は複数の LSI (大規模集積回路) 101に、上記構成のタイマー回路 102が 実装される。なお、上記のタイマー回路は、携帯通信端末以外の電子機器に適用で きることは言うまでもない。
[0078] 以上、本発明の各実施の形態を詳細に説明したが、本発明は、代表的に例示した 上述の各実施の形態に限定されるものではなぐ当業者であれば、特許請求の範囲 の記載内容に基づき、本発明の要旨を逸脱しない範囲内で種々の態様に変形、変 更することができる。これらの変形例や変更例も本発明の権利範囲に属するものであ る。
産業上の利用可能性
[0079] 本発明は、携帯通信端末等の電子機器に搭載されるタイマー回路の用途に適用 でき、とくに携帯電話機などの携帯通信端末向けの LSI等の各種回路に実装される タイマー回路に利用することができる。

Claims

請求の範囲
[1] 基準クロックにより動作するカウンタと、
CPUからの計時要求を受けたときにその計時要求に対応するタイマー満了時刻を 格納する格納部と、
前記カウンタの出力値に対応する時刻と、前記格納部に格納されたタイマー満了 時刻とを比較し、両時刻が一致したときに前記 CPUへの割り込み信号を出力する比 較機とを有し、
前記格納部は、複数の計時要求に対応する複数のタイマー満了時刻を格納し、そ のうち前記カウンタの出力値に対応する時刻に最も近いタイマー満了時刻が前記比 較機の比較対象のタイマー満了時刻として設定されることを特徴とするタイマー回路
[2] 前記格納部は、複数の計時要求に対応する複数のタイマー満了時刻を格納する 第 1のメモリと、前記第 1のメモリに格納された複数のタイマー満了時刻のうち、少なく とも前記カウンタの出力値に対応する時刻に最も近いタイマー満了時刻を格納する 第 2のメモリとを有し、前記第 2のメモリに格納されたタイマー満了時刻が前記比較機 の比較対象のタイマー満了時刻として設定されることを特徴とする請求項 1に記載の タイマー回路。
[3] 前記格納部は、前記第 1のメモリに格納された複数のタイマー満了時刻を前記カウ ンタの出力値に対応する時刻に最も近い順に並び替えるソート手段と、前記ソート手 段によりソートされた前記複数のタイマー満了時刻を前記第 2のメモリに設定する設 定手段とを有することを特徴とする請求項 2に記載のタイマー回路。
[4] 前記第 2のメモリは、前記カウンタの出力値に対応する時刻に最も近いタイマ一満 了時刻のみを格納することを特徴とする請求項 2に記載のタイマー回路。
[5] 前記第 2のメモリは、前記第 1のメモリに格納されている複数のタイマー満了時刻が 更新されたときに更新されることを特徴とする請求項 2に記載のタイマー回路。
[6] 前記第 1のメモリは、前記複数のタイマー満了時刻が有効か無効かを設定するため のィネーブル情報を格納し、前記比較機により割り込み信号が生成されたときに該当 するタイマー満了時刻のィネーブル情報が無効設定され、 前記第 2のメモリは、前記イネ一ブル情報が有効設定されたタイマー満了時刻を格 納することを特徴とする請求項 2に記載のタイマー回路。
[7] 前記第 1のメモリは、前記カウンタのキャリーアウト有無を示すキャリーアウト情報を 格納し、前記カウンタがキャリーアウトしたときに前記キャリーアウト情報に基づいて前 記タイマー満了時刻が更新されることを特徴とする請求項 2に記載のタイマー回路。
[8] 前記比較機は、前記カウンタの出力側に接続される複数の比較機を有し、
前記格納部は、前記複数の比較機に個別に接続される複数のメモリを備え、 前記複数のメモリは、前記複数の計時要求に対応する複数のタイマー満了時刻を 個別に格納し、各タイマー満了時刻が前記複数の比較機の比較対象のタイマ一満 了時刻として個別に設定されることを特徴とする請求項 1に記載のタイマー回路。
[9] 前記複数の比較機は、前記カウンタの所定ビット長の出力値のうち異なるビット長の 出力値を入力することを特徴とする請求項 8に記載のタイマー回路。
[10] 請求項 1乃至 9のいずれか 1項に記載のタイマー回路を備えたことを特徴とする携 帯通信端末。
[11] 請求項 1乃至 9のいずれか 1項に記載のタイマー回路を備えたことを特徴とする電 子機器。
PCT/JP2006/306832 2005-03-31 2006-03-31 タイマー回路、これを用いた携帯通信端末及び電子機器 WO2006106917A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2007511164A JPWO2006106917A1 (ja) 2005-03-31 2006-03-31 タイマー回路、これを用いた携帯通信端末及び電子機器
US11/908,468 US7949891B2 (en) 2005-03-31 2006-03-31 Timer circuit storing a plurality of time measurements with different sets of measurement time that can be realized by starting the time measurements asynchronously
CN2006800107799A CN101151584B (zh) 2005-03-31 2006-03-31 定时器电路及使用定时器电路的移动通信终端和电子设备
EP06730780A EP1868059B1 (en) 2005-03-31 2006-03-31 Timer circuit, mobile communication terminal using the same, and electronic device using the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005102805 2005-03-31
JP2005-102805 2005-03-31

Publications (1)

Publication Number Publication Date
WO2006106917A1 true WO2006106917A1 (ja) 2006-10-12

Family

ID=37073468

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/306832 WO2006106917A1 (ja) 2005-03-31 2006-03-31 タイマー回路、これを用いた携帯通信端末及び電子機器

Country Status (5)

Country Link
US (1) US7949891B2 (ja)
EP (1) EP1868059B1 (ja)
JP (1) JPWO2006106917A1 (ja)
CN (1) CN101151584B (ja)
WO (1) WO2006106917A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850458A (zh) * 2014-02-15 2015-08-19 瞿浩正 基于时间戳测量嵌入式软件模块所需mips的方法

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8261134B2 (en) * 2009-02-02 2012-09-04 Cray Inc. Error management watchdog timers in a multiprocessor computer
US8375258B1 (en) 2009-08-26 2013-02-12 Cypress Semiconductor Corporation Watchdog timer with mode dependent time out
US8803556B1 (en) * 2011-11-09 2014-08-12 Marvell Israel (M.I.S.L) Ltd. Method and apparatus for comparing signals
US9032258B2 (en) * 2012-09-14 2015-05-12 Infineon Technologies Ag Safety system challenge-and-response using modified watchdog timer
CN110297688B (zh) * 2018-03-22 2022-04-12 龙芯中科技术股份有限公司 一种硬件计数装置、方法以及处理器

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10177479A (ja) * 1996-12-18 1998-06-30 Hitachi Ltd 多重タイマの制御方法およびそれに用いる電子計算機
JP2000047880A (ja) * 1998-07-31 2000-02-18 Canon Inc オペレーティングシステム、その時間管理方法、情報処理装置および記憶媒体
JP2000222250A (ja) * 1999-01-29 2000-08-11 Nec Ic Microcomput Syst Ltd タイマ回路

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0196869A (ja) * 1987-10-09 1989-04-14 Hitachi Ltd デイスク記憶装置の回転位置検出回路
JP2560068B2 (ja) 1988-03-09 1996-12-04 株式会社日立製作所 タイマ回路
JPH01288913A (ja) 1988-05-17 1989-11-21 Nec Corp タイマ回路
JPH0213882A (ja) 1988-06-30 1990-01-18 Nec Corp 予約タイマー回路
JPH05333956A (ja) 1992-05-29 1993-12-17 Mitsubishi Electric Corp タイマ回路
EP0586768A1 (en) * 1992-09-11 1994-03-16 International Business Machines Corporation Efficient multi-users timer
JPH075279A (ja) 1993-06-15 1995-01-10 Yokogawa Electric Corp タイマー回路
US5983356A (en) * 1996-06-18 1999-11-09 National Semiconductor Corporation Power conservation method and apparatus activated by detecting shadowed interrupt signals indicative of system inactivity and excluding prefetched signals
JP3082721B2 (ja) * 1997-09-19 2000-08-28 日本電気株式会社 タイマ装置
US6002737A (en) * 1998-06-02 1999-12-14 Adaptec, Inc. Timer using a single counter to track multiple time-outs
JP3312648B2 (ja) * 1998-09-17 2002-08-12 日本電気株式会社 パルス信号発生装置及びパルス信号発生方法
US6550015B1 (en) 1999-02-10 2003-04-15 Advanced Micro Devices Inc. Scalable virtual timer architecture for efficiently implementing multiple hardware timers with minimal silicon overhead
JP2001290748A (ja) * 2000-04-04 2001-10-19 Hitachi Ltd 半導体集積回路及び光ディスクドライブ装置
JP2002182929A (ja) 2000-12-18 2002-06-28 Mitsubishi Electric Corp 半導体装置
US20030172314A1 (en) 2002-03-08 2003-09-11 Walter Greene E. Timer monitoring apparatus and method
US7689875B2 (en) * 2002-04-25 2010-03-30 Microsoft Corporation Watchdog timer using a high precision event timer
KR100462736B1 (ko) * 2003-04-30 2004-12-23 삼성전자주식회사 다수의 타임 인터럽트 신호를 발생시킬 수 있는 타이머 장치

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10177479A (ja) * 1996-12-18 1998-06-30 Hitachi Ltd 多重タイマの制御方法およびそれに用いる電子計算機
JP2000047880A (ja) * 1998-07-31 2000-02-18 Canon Inc オペレーティングシステム、その時間管理方法、情報処理装置および記憶媒体
JP2000222250A (ja) * 1999-01-29 2000-08-11 Nec Ic Microcomput Syst Ltd タイマ回路

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850458A (zh) * 2014-02-15 2015-08-19 瞿浩正 基于时间戳测量嵌入式软件模块所需mips的方法

Also Published As

Publication number Publication date
EP1868059B1 (en) 2011-08-24
CN101151584B (zh) 2010-12-08
US7949891B2 (en) 2011-05-24
EP1868059A1 (en) 2007-12-19
JPWO2006106917A1 (ja) 2008-09-11
US20090083568A1 (en) 2009-03-26
CN101151584A (zh) 2008-03-26
EP1868059A4 (en) 2010-06-30

Similar Documents

Publication Publication Date Title
CN109067394B (zh) 片上时钟校准装置及校准方法
WO2006106917A1 (ja) タイマー回路、これを用いた携帯通信端末及び電子機器
EP2772822B1 (en) Correction circuit and real-time clock circuit
TW201711389A (zh) 資料處理系統、資料處理裝置、以及操作裝置的方法
US7269082B2 (en) Chip enable control circuit, memory control circuit, and data processing system
US20090238017A1 (en) Digital dll circuit
US20040139362A1 (en) Data processing apparatus
US7290158B2 (en) Method of controlling data transfer within a semiconductor integrated circuit based on a clock sync control signal
JP2006309479A (ja) クロック補正回路及びクロック補正方法並びにマイクロコントローラ
JP4701898B2 (ja) 外部信号検出回路およびリアルタイムクロック
TW200847641A (en) Systems, modules, chips, circuits and methods with delay trim value updates on power-up
JP5414479B2 (ja) 半導体装置
JP4032947B2 (ja) クロック同期式シリアル通信装置および半導体集積回路装置
JPH08139575A (ja) パルス出力回路
US6972608B2 (en) Clock generating circuit with a frequency multiplying circuit
JP2002202829A (ja) マイクロコンピュータ
US10411717B2 (en) Device and method for multiple reference system timer
US8495599B2 (en) Apparatus and method for power saving
JP3611788B2 (ja) マイクロコンピュータのタイマ校正システム
JP2011109161A (ja) 温度補償型発振装置、温度補償方法及び温度補償プログラム
JPH10247121A (ja) マイクロコンピュータ
US20100064174A1 (en) Data processing system and debug method
JP2004264999A (ja) タイマ回路、電子機器及び当該タイマ回路のカウンタ制御方法
US8117511B2 (en) Communication device and method of correcting the same
JP2001325244A (ja) 半導体装置、マイクロコンピュータ及び電子機器

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200680010779.9

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2007511164

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11908468

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2006730780

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: RU

WWP Wipo information: published in national office

Ref document number: 2006730780

Country of ref document: EP