JP6584805B2 - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
JP6584805B2
JP6584805B2 JP2015064038A JP2015064038A JP6584805B2 JP 6584805 B2 JP6584805 B2 JP 6584805B2 JP 2015064038 A JP2015064038 A JP 2015064038A JP 2015064038 A JP2015064038 A JP 2015064038A JP 6584805 B2 JP6584805 B2 JP 6584805B2
Authority
JP
Japan
Prior art keywords
count value
clock
signal
timing signal
information processing
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.)
Active
Application number
JP2015064038A
Other languages
Japanese (ja)
Other versions
JP2016184279A (en
Inventor
紀久 曽根
紀久 曽根
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.)
Lapis Semiconductor Co Ltd
Original Assignee
Lapis Semiconductor Co Ltd
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 Lapis Semiconductor Co Ltd filed Critical Lapis Semiconductor Co Ltd
Priority to JP2015064038A priority Critical patent/JP6584805B2/en
Publication of JP2016184279A publication Critical patent/JP2016184279A/en
Application granted granted Critical
Publication of JP6584805B2 publication Critical patent/JP6584805B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)

Description

本発明は、情報処理装置に関する。   The present invention relates to an information processing apparatus.

情報処理装置には、電源が切られた状態でも時刻を刻み続ける機能であるRTC(Real Time Clock:リアルタイムクロック)が搭載されており、RTCは、RTCモジュールによって実現される(例えば、特許文献1参照)。   The information processing apparatus is equipped with an RTC (Real Time Clock) which is a function of keeping time even when the power is turned off, and the RTC is realized by an RTC module (for example, Patent Document 1). reference).

RTCモジュールは、例えば、秒を管理する秒カウンタ及び分を管理する分カウンタを有する。一例として図10に示すように、秒カウンタは、1Hz(ヘルツ)のクロックである1Hzクロックの立ち上がりで、秒を示すカウント値である秒カウント値に1を加算することにより秒カウント値を更新する。分カウンタは、秒カウンタの秒カウント値が“59”の場合、1Hzクロックの次の立ち上がりで、分を示すカウント値である分カウント値に1を加算することにより分カウント値を更新する。   The RTC module has, for example, a second counter that manages seconds and a minute counter that manages minutes. As an example, as shown in FIG. 10, the second counter updates the second count value by adding 1 to the second count value that is the count value indicating the second at the rising edge of the 1 Hz clock that is the clock of 1 Hz (Hertz). . When the second counter value of the second counter is “59”, the minute counter updates the minute count value by adding 1 to the minute count value that is the count value indicating the minute at the next rising edge of the 1 Hz clock.

時、日、週、月、及び年の各々の時刻単位も、秒及び分と同様に、時カウンタ、日カウンタ、週カウンタ、月カウンタ、及び年カウンタによって管理されている。そして、1Hzクロックの立ち上がりで、時カウント値、日カウント値、週カウント値、月カウント値、及び年カウント値が更新される。   The time unit of each of hour, day, week, month, and year is managed by an hour counter, a day counter, a week counter, a month counter, and a year counter as well as seconds and minutes. At the rise of the 1 Hz clock, the hour count value, day count value, week count value, month count value, and year count value are updated.

なお、本明細書では、説明の便宜上、秒カウンタ、分カウンタ、時カウンタ、日カウンタ、週カウンタ、月カウンタ、及び年カウンタを区別して説明する必要がない場合、「時刻カウンタ」と称する。また、本明細書では、説明の便宜上、秒カウント値、分カウント値、時カウント値、日カウント値、週カウント値、月カウント値、及び年カウント値を区別して説明する必要がない場合、「時刻カウント値」と称する。   In this specification, for convenience of explanation, when it is not necessary to distinguish between the second counter, the minute counter, the hour counter, the day counter, the week counter, the month counter, and the year counter, they are referred to as “time counter”. Further, in this specification, for convenience of explanation, when there is no need to distinguish between the second count value, the minute count value, the hour count value, the day count value, the week count value, the month count value, and the year count value, This is referred to as “time count value”.

ところで、情報処理装置は、システムクロックに従って動作するCPU(Central Processing Unit:中央処理装置)によって制御される。時刻カウンタは、CPUによってシステムクロックに従ってリードアクセス及びライトアクセスされる。すなわち、時刻カウント値は、システムクロックに従ってCPUによって読み出され、システムクロックに従ってCPUによって書き換えられることで更新される。   By the way, the information processing apparatus is controlled by a CPU (Central Processing Unit) that operates according to a system clock. The time counter is read and written by the CPU according to the system clock. In other words, the time count value is read by the CPU according to the system clock and updated by being rewritten by the CPU according to the system clock.

特開2006−222515号公報JP 2006-222515 A

しかしながら、システムクロックは、1Hzクロックの周波数よりも高い周波数(例えば、数十kHz(キロヘルツ)から数GHz(ギガヘルツ))で、かつ、1Hzクロックと非同期のクロックである。   However, the system clock is a frequency higher than the frequency of the 1 Hz clock (for example, several tens of kHz (kilohertz) to several GHz (gigahertz)) and asynchronous with the 1 Hz clock.

そのため、一例として図11に示すように、CPUによる秒カウント値の読み出しのタイミングが秒カウント値のカウントアップのタイミングと重なり、不確定な秒カウント値がCPUによって読み出されてしまう虞がある。   For this reason, as shown in FIG. 11 as an example, there is a possibility that the timing of reading the second count value by the CPU overlaps with the timing of counting up the second count value, and an uncertain second count value is read by the CPU.

また、一例として図12に示すように、CPUによる分カウント値の書き換えのタイミングが時刻カウント値のカウントアップのタイミングと重なると、分カウント値の書き換えのために1Hzクロックを途中で一旦ローレベルにする必要が生じる。そうすると、1Hzクロックが分断され、書き換えタイミングによっては、カウントアップを完遂するために必要なパルス幅を確保することができなくなる虞がある。   As an example, as shown in FIG. 12, when the timing of rewriting the minute count value by the CPU overlaps with the timing of counting up the time count value, the 1 Hz clock is temporarily set to a low level halfway for rewriting the minute count value. Need to do. Then, the 1 Hz clock is divided, and depending on the rewrite timing, there is a possibility that the pulse width necessary for completing the count-up cannot be secured.

本発明は、システムクロックの立ち上がりのみを利用して時刻の更新及び読み出しを行う場合に比べ、時刻の更新及び読み出しを高精度に行うことができる情報処理装置を提供することが目的である。   An object of the present invention is to provide an information processing apparatus capable of performing time updating and reading with higher accuracy than when performing time updating and reading using only the rise of the system clock.

上記目的を達成するために、請求項1に記載の情報処理装置は、時刻を示すカウント値であって、システムクロックに従って動作する中央処理装置によって前記システムクロックの第1エッジに同期して読み出しが行われるカウント値を保持して更新する保持更新部と、前記システムクロックの前記第1エッジとは異なる第2エッジに同期して前記カウント値がカウントアップされるように前記保持更新部を制御する制御部と、を含む。   In order to achieve the above object, the information processing apparatus according to claim 1 is a count value indicating a time, and is read out in synchronization with a first edge of the system clock by a central processing unit operating according to the system clock. A holding / updating unit that holds and updates the count value to be performed, and controls the holding / updating unit so that the count value is counted up in synchronization with a second edge different from the first edge of the system clock. And a control unit.

本発明によれば、システムクロックの立ち上がりのみを利用して時刻の更新及び読み出しを行う場合に比べ、時刻の更新及び読み出しを高精度に行うことができる、という効果が得られる。   According to the present invention, it is possible to obtain the effect that the time can be updated and read with higher accuracy than when the time is updated and read using only the rising edge of the system clock.

第1実施形態に係る情報処理装置の要部構成の一例を示すブロック図である。It is a block diagram which shows an example of the principal part structure of the information processing apparatus which concerns on 1st Embodiment. 第1実施形態に係る情報処理装置に含まれるRTCMの要部構成の一例を示す概略構成図である。It is a schematic block diagram which shows an example of a principal part structure of RTCM contained in the information processing apparatus which concerns on 1st Embodiment. 第1実施形態に係る情報処理装置において、時刻カウント値が更新され、かつ、CPUにより時刻カウント値が読み出される場合のRTCMの動作タイミングの一例を示すタイムチャートである。6 is a time chart showing an example of RTCM operation timing when the time count value is updated and the time count value is read out by a CPU in the information processing apparatus according to the first embodiment. 第1実施形態に係る情報処理装置において、時刻カウント値が更新され、かつ、CPUにより時刻カウント値が書き換えられる場合のRTCMの動作タイミングの一例を示すタイムチャートである。6 is a time chart showing an example of RTCM operation timing when the time count value is updated and the time count value is rewritten by a CPU in the information processing apparatus according to the first embodiment. 第2実施形態に係る情報処理装置の要部構成の一例を示すブロック図である。It is a block diagram which shows an example of the principal part structure of the information processing apparatus which concerns on 2nd Embodiment. 第2実施形態に係る情報処理装置に含まれるRTCMの要部構成の一例を示す概略構成図である。It is a schematic block diagram which shows an example of the principal part structure of RTCM contained in the information processing apparatus which concerns on 2nd Embodiment. 第2実施形態に係る情報処理装置において、時刻カウント値が更新される場合のRTCMの動作タイミングの一例を示すタイムチャートである。It is a time chart which shows an example of the operation timing of RTCM when the time count value is updated in the information processing apparatus according to the second embodiment. 第2実施形態に係る情報処理装置において、時刻カウント値が更新され、かつ、CPUにより時刻カウント値が読み出される場合のRTCMの動作タイミングの一例を示すタイムチャートである。9 is a time chart illustrating an example of RTCM operation timing when the time count value is updated and the time count value is read by a CPU in the information processing apparatus according to the second embodiment. 第2実施形態に係る情報処理装置において、時刻カウント値が更新され、かつ、CPUにより時刻カウント値が書き換えられる場合のRTCMの動作タイミングの一例を示すタイムチャートである。12 is a time chart illustrating an example of RTCM operation timing when the time count value is updated and the time count value is rewritten by a CPU in the information processing apparatus according to the second embodiment. 従来のRTCMによって時刻カウント値が更新される場合のRTCMの動作タイミングの一例を示すタイムチャートである。It is a time chart which shows an example of the operation timing of RTCM when a time count value is updated by the conventional RTCM. 従来のRTCMによって時刻カウント値が更新され、かつ、CPUにより時刻カウント値が読み出される場合のRTCMの動作タイミングの一例を示すタイムチャートである。It is a time chart which shows an example of the operation timing of RTCM when a time count value is updated by the conventional RTCM and a time count value is read by CPU. 従来のRTCMによって時刻カウント値が更新され、かつ、CPUにより時刻カウント値が書き換えられる場合のRTCMの動作タイミングの一例を示すタイムチャートである。It is a time chart which shows an example of the operation timing of RTCM when a time count value is updated by conventional RTCM and a time count value is rewritten by CPU.

以下、図面を参照して、本発明を実施するための形態例について詳細に説明する。   Embodiments for carrying out the present invention will be described below in detail with reference to the drawings.

[第1実施形態]
一例として図1に示すように、情報処理装置10は、CPU12、RTCM(RTCモジュール)14、システムクロック発生器18、及び1Hzクロック発生器20を含む。情報処理装置10の一例としては、マイクロコントローラが挙げられるが、これに限らず、パーソナル・コンピュータやサーバ装置であってもよい。なお、本第1実施形態において、情報処理装置10は、1チップ化された半導体装置であるが、本発明はこれに限定されるものではなく、例えば、CPU12とRTCM14とが別々にチップ化されていてもよい。
[First Embodiment]
As an example, as illustrated in FIG. 1, the information processing apparatus 10 includes a CPU 12, an RTCM (RTC module) 14, a system clock generator 18, and a 1 Hz clock generator 20. An example of the information processing apparatus 10 is a microcontroller, but is not limited thereto, and may be a personal computer or a server apparatus. In the first embodiment, the information processing apparatus 10 is a single-chip semiconductor device, but the present invention is not limited to this. For example, the CPU 12 and the RTCM 14 are separately formed into chips. It may be.

システムクロック発生器18は、システムクロックを発生させ、発生させたシステムクロックを、CPU12及びRTCM14に供給する。なお、システムクロックは、CPU12及びRTCM14に限らず、情報処理装置10に含まれる各種モジュールに供給される。また、本実施形態において、システムクロックは、数GHzのクロックとされているが、本発明はこれに限定されるものではなく、他の周波数のクロックであってもよい。   The system clock generator 18 generates a system clock and supplies the generated system clock to the CPU 12 and the RTCM 14. The system clock is supplied not only to the CPU 12 and the RTCM 14 but also to various modules included in the information processing apparatus 10. In this embodiment, the system clock is a clock of several GHz. However, the present invention is not limited to this, and may be a clock having another frequency.

1Hzクロック発生器20は、1Hzクロックを発生させ、発生させた1HzクロックをRTCM14に供給する。なお、1Hzクロックは、システムクロックと非同期のクロックである。   The 1 Hz clock generator 20 generates a 1 Hz clock and supplies the generated 1 Hz clock to the RTCM 14. The 1 Hz clock is a clock asynchronous with the system clock.

CPU12は、システムクロック発生器18から供給されるシステムクロックに従って情報処理装置10の全体を制御する。   The CPU 12 controls the entire information processing apparatus 10 according to the system clock supplied from the system clock generator 18.

RTCM14は、1Hzクロック発生器20から供給される1Hzクロックに従って計時を行う。すなわち、RTCM14は、1Hzクロック発生器20から供給される1Hzクロックに従って時刻カウント値をカウントアップする(1を加算する)ことで時刻カウント値を更新する。   The RTCM 14 measures time according to the 1 Hz clock supplied from the 1 Hz clock generator 20. That is, the RTCM 14 updates the time count value by counting up the time count value (adding 1) according to the 1 Hz clock supplied from the 1 Hz clock generator 20.

CPU12及びRTCM14は、アドレスバス、コントロールバス、及びデータバスを含むバス16に接続されている。従って、時刻カウント値は、RTCM14から、バス16に含まれる出力用のデータバスを介してCPU12によって読み出され、バス16に含まれる入力用のデータバスを介してCPU12によって書き換えられる。なお、本実施形態において、時刻カウント値の更新は、カウントアップによる更新とCPU12による書き換えによる更新とに大別される。   The CPU 12 and the RTCM 14 are connected to a bus 16 including an address bus, a control bus, and a data bus. Therefore, the time count value is read from the RTCM 14 by the CPU 12 via the output data bus included in the bus 16 and rewritten by the CPU 12 via the input data bus included in the bus 16. In the present embodiment, the update of the time count value is roughly divided into an update by counting up and an update by rewriting by the CPU 12.

RTCM14は、秒、分、時、日、週、月、及び年の各々の時刻単位毎に、BCD(Binary−coded decimal)カウンタである時刻カウンタを有する。   The RTCM 14 has a time counter which is a BCD (Binary-coded decimal) counter for each time unit of seconds, minutes, hours, days, weeks, months, and years.

また、一例として図2に示すように、時刻カウンタは、本発明に係る保持更新部の一例であるビット時刻カウンタ14Aを有する。ビット時刻カウンタ14Aは、1ビット単位で設けられており、1ビット毎に、時刻カウント値を管理する。   As an example, as illustrated in FIG. 2, the time counter includes a bit time counter 14 </ b> A that is an example of a holding update unit according to the present invention. The bit time counter 14A is provided in 1-bit units, and manages the time count value for each bit.

一例として図2に示すように、RTCM14は、制御部14Bを有する。制御部14Bは、システムクロックの立ち下がり(本発明に係る第1エッジの一例)に同期して時刻カウント値が更新されるようにビット時刻カウンタ14Aを制御する。   As an example, as shown in FIG. 2, the RTCM 14 includes a control unit 14B. The control unit 14B controls the bit time counter 14A so that the time count value is updated in synchronization with the fall of the system clock (an example of the first edge according to the present invention).

制御部14Bは、レジスタ30,32,論理和回路36,38、及び論理積回路40,42,44を有する。また、ビット時刻カウンタ14Aは、レジスタ34、論理積回路46,48,50,52、排他的論理和回路54、及びセレクタ56,58を有する。なお、レジスタ30,32,34は何れもフリップフロップである。また、論理積回路52は、本発明に係る論理回路の一例である。   The control unit 14B includes registers 30, 32, logical sum circuits 36, 38, and logical product circuits 40, 42, 44. The bit time counter 14 </ b> A includes a register 34, AND circuits 46, 48, 50, 52, an exclusive OR circuit 54, and selectors 56, 58. Note that the registers 30, 32, and 34 are all flip-flops. The AND circuit 52 is an example of a logic circuit according to the present invention.

論理和回路36には、CPU12から、バス16に含まれるコントロールバスを介して書換タイミング信号が入力される。書換タイミング信号は、秒、分、時、日、週、月、及び年の各々の時刻単位毎にCPU12によって生成され、各時刻カウンタの時刻カウント値の書き換えのタイミングを規定する。書換タイミング信号は、ローレベル及びハイレベルのうちの一方から他方へ遷移する2値信号であり、信号レベルがハイレベルの場合に時刻カウント値の書き換えが行われる。   A rewrite timing signal is input from the CPU 12 to the logical sum circuit 36 via a control bus included in the bus 16. The rewrite timing signal is generated by the CPU 12 for each time unit of seconds, minutes, hours, days, weeks, months, and years, and defines the timing of rewriting the time count value of each time counter. The rewrite timing signal is a binary signal that transitions from one of the low level and the high level to the other, and the time count value is rewritten when the signal level is high.

書換タイミング信号は、秒書換タイミング信号、分書換タイミング信号、時書換タイミング信号、週書換タイミング信号、日書換タイミング信号、月書換タイミング信号、及び年書換タイミング信号に大別される。   The rewriting timing signal is roughly classified into a second rewriting timing signal, a partial rewriting timing signal, a time rewriting timing signal, a weekly rewriting timing signal, a day rewriting timing signal, a month rewriting timing signal, and a year rewriting timing signal.

秒書換タイミング信号は、秒カウンタの秒カウント値の書き換えのタイミングを規定する2値信号である。分書換タイミング信号は、分カウンタの分カウント値の書き換えのタイミングを規定する2値信号である。時書換タイミング信号は、時カウンタの時カウント値の書き換えのタイミングを規定する2値信号である。週書換タイミング信号は、週カウンタの週カウント値の書き換えのタイミングを規定する2値信号である。月書換タイミング信号は、月カウンタの月カウント値の書き換えのタイミングを規定する2値信号である。年書換タイミング信号は、年カウンタの年カウント値の書き換えのタイミングを規定する2値信号である。   The second rewriting timing signal is a binary signal that defines the rewriting timing of the second count value of the second counter. The minute rewriting timing signal is a binary signal that defines the timing of rewriting the minute count value of the minute counter. The time rewriting timing signal is a binary signal that defines the timing of rewriting the hour count value of the hour counter. The week rewriting timing signal is a binary signal that defines the rewriting timing of the week count value of the week counter. The month rewriting timing signal is a binary signal that defines the rewriting timing of the month count value of the month counter. The year rewriting timing signal is a binary signal that defines the rewriting timing of the year count value of the year counter.

なお、以下では、秒書換タイミング信号、分書換タイミング信号、時書換タイミング信号、週書換タイミング信号、日書換タイミング信号、月書換タイミング信号、及び年書換タイミング信号を区別して説明する必要がない場合、「書換タイミング信号」と称する。   In the following, when there is no need to distinguish between the second rewriting timing signal, the minute rewriting timing signal, the hour rewriting timing signal, the weekly rewriting timing signal, the day rewriting timing signal, the month rewriting timing signal, and the year rewriting timing signal, This is referred to as “rewrite timing signal”.

論理和回路36は、CPU12から入力された書換タイミング信号の論理和を示す第1論理和信号を生成する。   The logical sum circuit 36 generates a first logical sum signal indicating the logical sum of the rewrite timing signals input from the CPU 12.

論理積回路40は、論理和回路36により生成された第1論理和信号とシステムクロックを反転させて得た反転システムクロックとの論理積を示す第1論理積信号を出力する。   The logical product circuit 40 outputs a first logical product signal indicating the logical product of the first logical sum signal generated by the logical sum circuit 36 and the inverted system clock obtained by inverting the system clock.

レジスタ30は、システムクロックに同期して1Hzクロックを取り込み、取り込んだ1Hzクロックを遅延させた信号である第1遅延信号を出力する。   The register 30 takes in the 1 Hz clock in synchronization with the system clock, and outputs a first delay signal that is a signal obtained by delaying the fetched 1 Hz clock.

レジスタ32は、レジスタ30により出力された第1遅延信号をシステムクロックに同期して取り込み、取り込んだ第1遅延信号を遅延させた信号である第2遅延信号を出力する。   The register 32 captures the first delay signal output from the register 30 in synchronization with the system clock, and outputs a second delay signal that is a signal obtained by delaying the captured first delay signal.

論理積回路42は、レジスタ30により出力された第1遅延信号とレジスタ32により出力された第2遅延信号を反転させて得た反転遅延信号との論理積を示す第2論理積信号を出力する。   The logical product circuit 42 outputs a second logical product signal indicating a logical product of the first delay signal output from the register 30 and the inverted delay signal obtained by inverting the second delay signal output from the register 32. .

論理積回路44は、論理積回路42により出力された第2論理積信号と反転システムクロックとの論理積を示す第3論理積信号を生成する。なお、第3論理積信号は、本発明に係るカウントアップタイミング信号の一例である。   The logical product circuit 44 generates a third logical product signal indicating the logical product of the second logical product signal output from the logical product circuit 42 and the inverted system clock. The third AND signal is an example of a count up timing signal according to the present invention.

論理和回路38は、論理積回路40により出力された第1論理積信号と論理積回路44により出力された第3論理積信号との論理和を示す第2論理和信号を出力する。なお、第2論理和信号は、本発明に係る更新信号の一例である。   The logical sum circuit 38 outputs a second logical sum signal indicating the logical sum of the first logical product signal output from the logical product circuit 40 and the third logical product signal output from the logical product circuit 44. The second logical sum signal is an example of an update signal according to the present invention.

レジスタ34には、1ビット分の時刻カウント値が格納されている。レジスタ34は、セレクタ58により出力された更新用の時刻カウント値(後述)を第2論理和信号に従って取り込み、現時点で保持している時刻カウント値を、取り込んだ更新用の時刻カウント値に書き換えることで時刻カウント値を更新する。時刻カウント値は、バス16に含まれる出力用のデータバスを介してCPU12によって読み出される。   The register 34 stores a time count value for 1 bit. The register 34 takes in the update time count value (described later) output from the selector 58 in accordance with the second OR signal, and rewrites the currently held time count value with the fetched update time count value. To update the time count value. The time count value is read by the CPU 12 via an output data bus included in the bus 16.

論理積回路46には、レジスタ34に格納されている時刻カウント値のカウントアップを許可する2値信号であるアップ信号及び第2論理積信号が入力される。論理回路46は、アップ信号と第2論理積信号との論理積を示す第4論理積信号を出力する。   The logical product circuit 46 receives an up signal and a second logical product signal, which are binary signals that permit the count-up of the time count value stored in the register 34. The logic circuit 46 outputs a fourth logical product signal indicating the logical product of the up signal and the second logical product signal.

論理積回路48には、レジスタ34に格納されている時刻カウント値をクリアする(時刻カウント値を“0”に戻す)ことを指示する2値信号であるクリア信号及び第2論理積信号が入力される。論理積回路48は、クリア信号と第2論理積信号との論理積を示す第5論理積信号を出力する。   The logical product circuit 48 receives a clear signal and a second logical product signal, which are binary signals for instructing to clear the time count value stored in the register 34 (return the time count value to “0”). Is done. The logical product circuit 48 outputs a fifth logical product signal indicating the logical product of the clear signal and the second logical product signal.

排他的論理和回路54は、下位桁のビット時刻カウンタ14Aから供給されるキャリとレジスタ34に格納されている時刻カウント値との排他的論理和を示す排他的論理和信号を出力する。   The exclusive OR circuit 54 outputs an exclusive OR signal indicating the exclusive OR of the carry supplied from the bit time counter 14A of the lower digit and the time count value stored in the register 34.

セレクタ54は、排他的論理和回路54により出力された排他的論理和信号とレジスタ34に格納されている時刻カウント値とを第4論理積信号に従って選択的に出力する。   The selector 54 selectively outputs the exclusive OR signal output from the exclusive OR circuit 54 and the time count value stored in the register 34 according to the fourth AND signal.

論理積回路50は、セレクタ54の出力結果と第5論理積信号を反転させて得た反転論理積信号との論理積を示す第6論理積信号を出力する。   The logical product circuit 50 outputs a sixth logical product signal indicating the logical product of the output result of the selector 54 and the inverted logical product signal obtained by inverting the fifth logical product signal.

セレクタ58は、カウントアップ用の時刻カウント値である第6論理積信号とバス16に含まれる入力用のデータバスを介して入力された書換用の時刻カウント値とを書換タイミング信号に従って選択的に更新用の時刻カウント値として出力する。   The selector 58 selectively selects a sixth AND signal, which is a time count value for counting up, and a rewrite time count value input via an input data bus included in the bus 16 in accordance with a rewrite timing signal. Output as time count value for update.

論理積回路52は、下位桁のビット時刻カウンタ14Aから供給されるキャリと、レジスタ34に格納されている時刻カウント値と、書換タイミング信号を反転させて得た反転書換タイミング信号との論理積を示す第7論理積信号を出力する。第7論理積信号の出力先は、上位桁のビット時刻カウンタ14Aである。   The logical product circuit 52 calculates the logical product of the carry supplied from the bit time counter 14A of the lower digit, the time count value stored in the register 34, and the inverted rewrite timing signal obtained by inverting the rewrite timing signal. A seventh logical product signal is output. The output destination of the seventh AND signal is the upper digit bit time counter 14A.

なお、論理積回路52では、反転書換タイミング信号を基に第7論理積信号が生成されるので、時刻カウント値の書き換えが行われている間は、信号レベルがハイレベルの第7論理積信号であるキャリが生成されず、時刻カウント値の桁上がりが行われない。   Since the AND circuit 52 generates the seventh AND signal based on the inverted rewrite timing signal, the seventh AND signal whose signal level is high while the time count value is being rewritten. No carry is generated and the time count value is not carried.

次に、時刻カウント値がCPU12によって読み出される場合のRTCM14の動作について図3を参照しながら説明する。   Next, the operation of the RTCM 14 when the time count value is read by the CPU 12 will be described with reference to FIG.

1Hzクロックは、システムクロックの立ち上がりに同期してレジスタ30に取り込まれ、レジスタ30によって第1遅延信号が生成される。また、第1遅延信号は、システムクロックの立ち上がりに同期してレジスタ32に取り込まれ、レジスタ32によって、第1遅延信号よりもシステムクロックの1サイクル分遅延した第2遅延信号が生成される。   The 1 Hz clock is taken into the register 30 in synchronization with the rising edge of the system clock, and the register 30 generates a first delay signal. The first delay signal is taken into the register 32 in synchronization with the rise of the system clock, and the register 32 generates a second delay signal that is delayed by one cycle of the system clock from the first delay signal.

論理積回路42では、第1遅延信号と第2遅延信号を反転させて得た反転遅延信号との論理積を示す第2論理積信号が生成される。論理積回路42によって生成された第2論理積信号は、システムクロックに同期して1Hzクロックの立ち上がりを検出したことを示す信号として用いられる。   The logical product circuit 42 generates a second logical product signal indicating the logical product of the first delay signal and the inverted delay signal obtained by inverting the second delay signal. The second logical product signal generated by the logical product circuit 42 is used as a signal indicating that the rising edge of the 1 Hz clock is detected in synchronization with the system clock.

論理積回路44では、第2論理積信号と反転システムクロックとの論理積(第2論理積信号の後半部分)を示す第3論理積信号が生成される。このようにして生成された第3論理積信号は、システムクロックの立ち下がりに同期して出力される1Hzクロックと同様に機能する信号である。すなわち、第3論理積信号は、時刻カウント値のカウントアップのタイミングを規定する同期信号として用いられる。   The logical product circuit 44 generates a third logical product signal indicating a logical product (second half part of the second logical product signal) of the second logical product signal and the inverted system clock. The third AND signal generated in this way is a signal that functions in the same manner as the 1 Hz clock output in synchronization with the fall of the system clock. That is, the third logical product signal is used as a synchronization signal that defines the timing of counting up the time count value.

論理積回路40では、書換タイミング信号の論理和を示す第1論理和信号と反転システムクロックとの論理積を示す第1論理積信号が生成される。このようにして生成された第1論理積信号は、システムクロックの立ち下がりに同期して出力される書換タイミング信号と同様に機能する信号である。すなわち、第1論理積信号は、CPU12による時刻カウント値の書き換えのタイミングを規定する同期信号として用いられる。   In the logical product circuit 40, a first logical product signal indicating the logical product of the first logical sum signal indicating the logical sum of the rewrite timing signals and the inverted system clock is generated. The first logical product signal generated in this way is a signal that functions in the same manner as the rewrite timing signal output in synchronization with the fall of the system clock. That is, the first AND signal is used as a synchronization signal that defines the timing of rewriting the time count value by the CPU 12.

論理和回路38では、第1論理積信号と第3論理積信号の論理和を示す第2論理和信号が生成される。よって、第2論理和信号のハイレベル期間は、第1論理積信号のハイレベル期間(図4参照)及び第3論理積信号のハイレベル期間の各々と一致する。なお、図3に示す例では、書換タイミング信号がRTCM14に供給されていないため、第1論理積信号がローレベルであり、第2論理和信号のハイレベル期間は、第3論理積信号のハイレベル期間と一致している。   The logical sum circuit 38 generates a second logical sum signal indicating the logical sum of the first logical product signal and the third logical product signal. Therefore, the high level period of the second logical sum signal coincides with each of the high level period of the first logical product signal (see FIG. 4) and the high level period of the third logical product signal. In the example shown in FIG. 3, since the rewrite timing signal is not supplied to the RTCM 14, the first AND signal is at the low level, and the high level period of the second OR signal is the high level of the third AND signal. It is consistent with the level period.

ここで、CPU12は、秒カウント値の読み出しを行う場合、読み出しのタイミングを規定する信号である秒読出タイミング信号に従って秒カウント値を読み出す。秒読出タイミング信号は、CPU12によって生成される2値信号であり、システムクロックの立ち上がり(本発明に係る第1エッジの一例)でローレベルからハイレベルに遷移する。すなわち、秒読出タイミング信号は、システムクロックの半サイクル分だけ第3論理積信号よりも先行して立ち上がる。そのため、秒読出タイミング信号が立ち上がると、秒カウント値のカウントアップに先立って、読み出し対象の秒カウント値が確定する。読み出し対象の秒カウント値が確定すると、秒読出タイミング信号のハイレベル期間にCPU12によって秒カウント値がレジスタ34から読み出される。   Here, when reading out the second count value, the CPU 12 reads out the second count value in accordance with the second reading timing signal which is a signal for defining the reading timing. The second readout timing signal is a binary signal generated by the CPU 12, and transitions from a low level to a high level at the rising edge of the system clock (an example of the first edge according to the present invention). That is, the second readout timing signal rises ahead of the third AND signal by the half cycle of the system clock. Therefore, when the second reading timing signal rises, the second count value to be read is determined prior to counting up the second count value. When the second count value to be read is determined, the second count value is read from the register 34 by the CPU 12 during the high level period of the second read timing signal.

時刻カウント値のカウントアップは、読み出し対象の秒カウント値の確定後、システムクロックの立ち下がりでローレベルからハイレベルに遷移する第3論理積信号のハイレベル期間に行われる。   The time count value is counted up in the high level period of the third AND signal that transitions from the low level to the high level at the falling edge of the system clock after the second count value to be read is determined.

よって、図3に示すように、第2論理積信号のハイレベル期間と秒読出しタイミング信号のハイレベル期間とが重なった場合であっても、読み出し対象の時刻カウント値が確定するタイミングと秒カウント値がカウントアップされるタイミングとが重ならない。従って、カウントアップ中の秒カウント値である不確定データがCPU12によって読み出されることが回避される。   Therefore, as shown in FIG. 3, even when the high level period of the second AND signal overlaps with the high level period of the second read timing signal, the timing and second count at which the time count value to be read is determined is determined. The timing when the value is counted up does not overlap. Accordingly, it is possible to prevent the CPU 12 from reading indeterminate data that is the second count value being counted up.

次に、時刻カウント値がCPU12によって書き換えられる場合のRTCM14の動作について図4を参照しながら説明する。なお、時刻カウント値がCPU12によって読み出される場合と同様の動作については説明を省略する。   Next, the operation of the RTCM 14 when the time count value is rewritten by the CPU 12 will be described with reference to FIG. The description of the same operation as when the time count value is read by the CPU 12 is omitted.

CPU12は、分カウント値の書き換えを行う場合、書き換えタイミングを規定する信号である分書換タイミング信号をRTCM14に供給し、かつ、入力用のデータバスを介してセレクタ58に書換用の分カウント値を供給する。   When rewriting the minute count value, the CPU 12 supplies a rewrite timing signal, which is a signal for defining the rewrite timing, to the RTCM 14, and supplies the rewrite minute count value to the selector 58 via the input data bus. Supply.

ここで、分書換タイミング信号は、システムクロックの立ち上がりでローレベルからハイレベルに遷移するのに対し、第3論理積信号と同期して生成される第1論理積信号は、システムクロックの立ち下がりでローレベルからハイレベルに遷移する。第1論理積信号がローレベルからハイレベルに遷移すると、分カウント値のカウントアップに優先して、CPU12による分カウント値の書き換えが第1論理積信号のハイレベル期間に行われる。   Here, the rewrite timing signal changes from a low level to a high level at the rising edge of the system clock, whereas the first AND signal generated in synchronization with the third AND signal is the falling edge of the system clock. Transition from low level to high level. When the first logical product signal transitions from the low level to the high level, the CPU 12 rewrites the minute count value during the high level period of the first logical product signal in preference to counting up the minute count value.

分カウント値以外の時刻カウント値のカウントアップは、図3に示す例と同様に、システムクロックの立ち下がりでローレベルからハイレベルに遷移する第3論理積信号のハイレベル期間に行われる。   Similar to the example shown in FIG. 3, the time count value other than the minute count value is counted up during the high level period of the third AND signal that transitions from the low level to the high level at the falling edge of the system clock.

よって、図4に示すように、第2論理積信号のハイレベル期間と分書換タイミング信号のハイレベル期間とが重なった場合であっても、分カウント値の書き換えが完遂される。また、分カウント値以外の時刻カウント値のカウントアップが分カウント値の書き換えに起因して不安定になることが回避される。   Therefore, as shown in FIG. 4, even when the high level period of the second AND signal overlaps the high level period of the rewrite timing signal, the rewriting of the minute count value is completed. Further, it is avoided that the count-up of the time count value other than the minute count value becomes unstable due to the rewriting of the minute count value.

また、分カウント値の書き換えが行われている間、秒カウンタの論理積回路52では、反転書換タイミング信号を基に第7論理積信号が生成されるので、分カウント値の書き換えが行われている間に第7論理積信号の信号レベルはハイレベルに遷移しない。よって、分カウント値の書き換えが行われている間、秒カウンタにおいて、キャリは、上位桁のビット時刻カウンタ14Aに供給されない。なお、秒カウンタに限らず、分カウンタと異なる時刻カウンタにおいても、キャリは、上位桁のビット時刻カウンタ14Aに供給されない。   While the minute count value is being rewritten, the AND circuit 52 of the second counter generates the seventh AND signal based on the inverted rewrite timing signal, so that the minute count value is rewritten. During this time, the signal level of the seventh AND signal does not transition to the high level. Therefore, while the minute count value is being rewritten, the carry is not supplied to the upper digit bit time counter 14A in the second counter. Note that the carry is not supplied to the upper digit bit time counter 14A, not only in the second counter but also in a time counter different from the minute counter.

以上説明したように、情報処理装置10では、システムクロックの立ち上がりに同期して時刻カウント値の読み出しが行われ、システムクロックの立ち下がりに同期して時刻カウント値のカウントアップ及び書き換えが行われる。従って、情報処理装置10は、システムクロックの立ち上がりのみを利用して時刻カウント値の更新及び読み出しを行う場合に比べ、時刻カウント値の更新及び読み出しを高精度に行うことができる。   As described above, in the information processing apparatus 10, the time count value is read in synchronization with the rising edge of the system clock, and the time count value is counted up and rewritten in synchronization with the falling edge of the system clock. Therefore, the information processing apparatus 10 can update and read the time count value with higher accuracy than when updating and reading the time count value by using only the rising edge of the system clock.

また、情報処理装置10では、システムクロックの立ち下がりに同期して第2論理和信号がビット時刻カウンタ14Aに供給されることで、ビット時刻カウンタ14Aにより時刻カウント値が更新される。従って、情報処理装置10は、システムクロックの立ち下がりに同期しない信号に従ってビット時刻カウンタ14Aにより時刻カウント値が更新される場合に比べ、時刻カウント値の高精度な更新を簡易な構成で実現することができる。   In the information processing apparatus 10, the time count value is updated by the bit time counter 14A by supplying the second logical sum signal to the bit time counter 14A in synchronization with the fall of the system clock. Therefore, the information processing apparatus 10 can realize a highly accurate update of the time count value with a simple configuration as compared with the case where the time count value is updated by the bit time counter 14A according to a signal that is not synchronized with the falling edge of the system clock. Can do.

また、情報処理装置10では、システムクロックの立ち下がりに同期して出力される第1論理積信号に従って時刻カウント値の書き換えが行われる。また、システムクロックの立ち下がりに同期して出力される第3論理積信号に従って時刻カウント値のカウントアップが行われる。従って、情報処理装置10は、システムクロックの立ち下がりに同期しない信号に従って時刻カウント値の書き換え及びカウントアップが行われる場合に比べ、時刻カウント値の高精度な更新を簡易な構成で実現することができる。   In the information processing apparatus 10, the time count value is rewritten according to the first logical product signal output in synchronization with the falling edge of the system clock. Further, the time count value is counted up according to the third logical product signal output in synchronization with the fall of the system clock. Therefore, the information processing apparatus 10 can realize a highly accurate update of the time count value with a simple configuration as compared with the case where the time count value is rewritten and counted up according to a signal that is not synchronized with the falling edge of the system clock. it can.

また、情報処理装置10では、分カウント値の書き換えが行われている間、秒カウンタにおいて、論理積回路52により、キャリは、上位桁のビット時刻カウンタ14Aに供給されない。従って、情報処理装置10は、分カウント値の書き換えが行われている間に秒カウンタにおいてキャリが上位桁のビット時刻カウンタ14Aに供給される場合に比べ、分カウント値の書き換えが行われている間の秒カウント値の桁上がりを回避することができる。   In the information processing apparatus 10, while the minute count value is being rewritten, the carry is not supplied to the bit time counter 14A of the upper digit by the AND circuit 52 in the second counter. Therefore, the information processing apparatus 10 rewrites the minute count value as compared with the case where the carry is supplied to the bit time counter 14A of the upper digit in the second counter while the minute count value is being rewritten. It is possible to avoid a carry of the second count value in between.

なお、上記第1実施形態では、システムクロックの立ち上がりに同期させて時刻カウント値の読み出しが行われ、システムクロックの立ち下がりに同期させて時刻カウント値の書き換え及びカウントアップが行われているが、本発明はこれに限定されるものではない。例えば、システムクロックの立ち下がりに同期させて時刻カウント値の読み出しが行われ、システムクロックの立ち上がりに同期させて時刻カウント値の書き換え及びカウントアップが行われるようにしてもよい。   In the first embodiment, the time count value is read out in synchronization with the rising edge of the system clock, and the time count value is rewritten and counted up in synchronization with the falling edge of the system clock. The present invention is not limited to this. For example, the time count value may be read in synchronization with the falling edge of the system clock, and the time count value may be rewritten and counted up in synchronization with the rising edge of the system clock.

[第2実施形態]
上記第1実施形態では、システムクロックを用いて時刻カウント値の更新及び読み出しを行う場合を例示したが、本第2実施形態では、低周波クロックを用いて時刻カウント値の更新及び読み出しを行う場合について説明する。なお、本第2実施形態では、上記第1実施形態で説明した構成要素と同一の構成要素については同一の符号を付して、その説明を省略する。
[Second Embodiment]
In the first embodiment, the case where the time count value is updated and read using the system clock is exemplified. However, in the second embodiment, the time count value is updated and read using the low frequency clock. Will be described. In the second embodiment, the same components as those described in the first embodiment are denoted by the same reference numerals, and the description thereof is omitted.

一例として図5に示すように、本第2実施形態に係る情報処理装置100は、上記第1実施形態で説明した情報処理装置10に比べ、低周波クロック発生器102を有する点、及びRTCM14に代えてRTCM104を有する点が異なる。   As an example, as illustrated in FIG. 5, the information processing apparatus 100 according to the second embodiment has a low-frequency clock generator 102 and the RTCM 14 compared to the information processing apparatus 10 described in the first embodiment. Instead, it has an RTCM 104.

低周波クロック発生器102は、システムクロックよりも低周波数のクロックである低周波クロックを発生させ、発生させた低周波クロックを、CPU12及びRTCM104に供給する。   The low frequency clock generator 102 generates a low frequency clock that is a clock having a frequency lower than the system clock, and supplies the generated low frequency clock to the CPU 12 and the RTCM 104.

低周波クロックは、システムクロック及び1Hzクロックの各々と非同期のクロックであり、低周波クロックの周波数は、32768Hz(例えば、水晶発振によって得られる周波数)とされている。なお、32768Hzの低周波クロックは、あくまでも一例であり、システムクロックよりも低周波数で、かつ、1Hzよりも高周波数のクロックであればよい。   The low frequency clock is a clock asynchronous with each of the system clock and the 1 Hz clock, and the frequency of the low frequency clock is 32768 Hz (for example, a frequency obtained by crystal oscillation). The low frequency clock of 32768 Hz is merely an example, and may be a clock having a frequency lower than the system clock and a frequency higher than 1 Hz.

CPU12は、システムクロック発生器18から供給されるシステムクロック及び低周波クロック発生器102から供給される低周波クロックのうちの指定されたクロックに従って情報処理装置10の全体を制御する。なお、低周波クロックは、例えば、情報処理装置10が非省電力モードから省電力モードに移行した際にCPU12によって用いられるクロックである。   The CPU 12 controls the entire information processing apparatus 10 according to a designated clock of the system clock supplied from the system clock generator 18 and the low frequency clock supplied from the low frequency clock generator 102. The low frequency clock is a clock used by the CPU 12 when the information processing apparatus 10 shifts from the non-power saving mode to the power saving mode, for example.

一例として図6に示すように、RTCM104は、図2に示すRTCM14に比べ、制御部104Bを有する点が異なる。   As an example, as illustrated in FIG. 6, the RTCM 104 is different from the RTCM 14 illustrated in FIG. 2 in that it includes a control unit 104B.

制御部104Bは、制御部14Bに比べ、論理和回路36及び論理積回路40を除いた点が異なる。また、制御部104Bは、制御部14Bに比べ、否定論理和回路106を有する点、論理積回路44に代えてラッチ回路108を有する点、及び論理和回路38に代えてセレクタ110を有する点が異なる。   The control unit 104B is different from the control unit 14B in that the logical sum circuit 36 and the logical product circuit 40 are excluded. Further, the control unit 104B has a negative OR circuit 106, a latch circuit 108 instead of the AND circuit 44, and a selector 110 instead of the OR circuit 38, as compared with the control unit 14B. Different.

否定論理和回路106には、CPU12から、バス16に含まれるコントロールバスを介して読出タイミング信号が入力される。読出タイミング信号は、秒、分、時、日、週、月、及び年の各々の時刻単位毎にCPU12によって生成され、各時刻カウンタの時刻カウント値の読み出しのタイミングを規定する。読出タイミング信号は、ローレベル及びハイレベルのうちの一方から他方へ遷移する2値信号であり、信号レベルがハイレベルの場合に時刻カウント値の読み出しが行われる。   A read timing signal is input from the CPU 12 to the negative logical sum circuit 106 via a control bus included in the bus 16. The read timing signal is generated by the CPU 12 for each time unit of seconds, minutes, hours, days, weeks, months, and years, and defines the read timing of the time count value of each time counter. The read timing signal is a binary signal that transitions from one of the low level and the high level to the other. When the signal level is high, the time count value is read.

読出タイミング信号は、上記第1実施形態で説明した秒読出タイミング信号、分読出タイミング信号、時読出タイミング信号、週読出タイミング信号、日読出タイミング信号、月読出タイミング信号、及び年読出タイミング信号に大別される。   The readout timing signal is largely the second readout timing signal, minute readout timing signal, hour readout timing signal, week readout timing signal, day readout timing signal, month readout timing signal, and year readout timing signal described in the first embodiment. Separated.

分読出タイミング信号は、分カウンタの分カウント値の読み出しのタイミングを規定する2値信号である。時読出タイミング信号は、時カウンタの時カウント値の読み出しのタイミングを規定する2値信号である。週読出タイミング信号は、週カウンタの週カウント値の読み出しのタイミングを規定する2値信号である。月読出タイミング信号は、月カウンタの月カウント値の読み出しのタイミングを規定する2値信号である。年読出タイミング信号は、年カウンタの年カウント値の読み出しのタイミングを規定する2値信号である。   The minute reading timing signal is a binary signal that defines the timing of reading the minute count value of the minute counter. The hour reading timing signal is a binary signal that defines the timing of reading the hour count value of the hour counter. The week read timing signal is a binary signal that defines the read timing of the week count value of the week counter. The month reading timing signal is a binary signal that defines the reading timing of the month count value of the month counter. The year reading timing signal is a binary signal that defines the reading timing of the year count value of the year counter.

なお、以下では、秒読出タイミング信号、分読出タイミング信号、時読出タイミング信号、週読出タイミング信号、日読出タイミング信号、月読出タイミング信号、及び年読出タイミング信号を区別して説明する必要がない場合、「読出タイミング信号」と称する。   In the following, when there is no need to distinguish between the second readout timing signal, the minute readout timing signal, the hour readout timing signal, the week readout timing signal, the day readout timing signal, the month readout timing signal, and the year readout timing signal, This is referred to as “read timing signal”.

否定論理和回路106は、CPU12から入力された読出タイミング信号の否定論理和を示す否定論理和信号を生成する。   The negative logical sum circuit 106 generates a negative logical sum signal indicating a negative logical sum of the read timing signals input from the CPU 12.

ラッチ回路108は、否定論理和信号に従って第2論理積信号を取り込んで、取り込んだ第2論理積信号をカウントアップクロックとしてセレクタ110に出力する。   The latch circuit 108 captures the second logical product signal in accordance with the negative logical sum signal, and outputs the captured second logical product signal to the selector 110 as a count-up clock.

セレクタ110は、書換タイミング信号に従って、反転システムクロックとカウントアップクロックとを、時刻カウント値を更新するタイミングを規定する更新タイミング信号として、選択的にビット時刻カウンタ14Aに出力する。すなわち、セレクタ110は、書換タイミング信号が入力された場合に、反転システムクロックをビット時刻カウンタ14Aに出力し、書換タイミング信号が入力されない場合に、カウントアップクロックをビット時刻カウンタ14Aに出力する。   The selector 110 selectively outputs the inverted system clock and the count-up clock to the bit time counter 14A as an update timing signal that defines the timing for updating the time count value in accordance with the rewrite timing signal. That is, the selector 110 outputs the inverted system clock to the bit time counter 14A when the rewrite timing signal is input, and outputs the count-up clock to the bit time counter 14A when the rewrite timing signal is not input.

次に、RTCM104の動作について図7〜図9を参照しながら説明する。   Next, the operation of the RTCM 104 will be described with reference to FIGS.

一例として図7に示すように、RTCM104では、上記第1実施形態で説明したRTCM14に比べ、システムクロックに代えて低周波クロックに従って第2論理積信号が生成される点が異なる。よって、論理積回路42により生成された第2論理積信号は、低周波クロックに同期して1Hzクロックの立ち上がりを検出したことを示す信号として用いられる。   As an example, as shown in FIG. 7, the RTCM 104 is different from the RTCM 14 described in the first embodiment in that a second AND signal is generated according to a low-frequency clock instead of the system clock. Therefore, the second logical product signal generated by the logical product circuit 42 is used as a signal indicating that the rising edge of the 1 Hz clock is detected in synchronization with the low frequency clock.

ここで、CPU12によって秒カウント値の読み出しが行われる場合、一例として図8に示すように、秒読出タイミング信号が否定論理和回路106に入力される。否定論理和回路106に秒読出タイミング信号が入力されると、ラッチ回路108は、CPU12により秒カウント値の読み出しが行われている間、第2論理積信号の取り込みを停止する。そして、ラッチ回路108は、CPU12による秒カウント値の読み出しが終了すると、第2論理積信号の取り込みを再開する。   Here, when the second count value is read by the CPU 12, as shown in FIG. 8 as an example, a second read timing signal is input to the negative OR circuit 106. When the second readout timing signal is input to the negative OR circuit 106, the latch circuit 108 stops taking in the second logical product signal while the second count value is being read out by the CPU 12. Then, the latch circuit 108 resumes taking in the second AND signal when the CPU 12 finishes reading the second count value.

ラッチ回路108により第2論理積信号の取り込みが再開されることで生成されたカウントアップクロックは、セレクタ110により更新タイミング信号としてビット時刻カウンタ14Aに出力される。ビット時刻カウンタ14Aでの時刻カウント値のカウントアップは、更新タイミング信号のハイレベル期間に行われる。   The count-up clock generated by restarting the capture of the second AND signal by the latch circuit 108 is output to the bit time counter 14A as an update timing signal by the selector 110. The time count value is counted up by the bit time counter 14A during the high level period of the update timing signal.

また、一例として図9に示すように、秒カウント値のカウントアップが行われている途中で秒書換タイミング信号がセレクタ110に入力されると、セレクタ110により、反転システムクロックが更新タイミング信号として出力される。これにより、更新タイミング信号は、システムクロックの半サイクル分だけローレベルとなり、ローレベル期間に秒カウント値の書き換えが行われる。   As an example, as shown in FIG. 9, when the second rewrite timing signal is input to the selector 110 while the second count value is being counted up, the selector 110 outputs the inverted system clock as the update timing signal. Is done. As a result, the update timing signal becomes low level for a half cycle of the system clock, and the second count value is rewritten during the low level period.

以上説明したように、情報処理装置100では、カウントアップクロックが低周波クロックに従って生成されることで、ビット時刻カウンタ14Aにより、低周波クロックで規定されたタイミングで時刻カウント値のカウントアップが行われる。従って、情報処理装置100は、CPU12が低周波クロックに従って動作する場合であっても、時刻カウント値のカウントアップを行うことができる。   As described above, in the information processing apparatus 100, the count-up clock is generated according to the low-frequency clock, so that the time count value is counted up by the bit time counter 14A at the timing defined by the low-frequency clock. . Therefore, the information processing apparatus 100 can count up the time count value even when the CPU 12 operates according to the low frequency clock.

また、情報処理装置100では、CPU12による時刻カウント値の読み出しが終了したことを条件に時刻カウント値がカウントアップされる。従って、情報処理装置100は、CPU12が低周波クロックに従って動作する場合であっても、カウントアップ中の秒カウント値である不確定データがCPU12によって読み出されることを回避することができる。   In the information processing apparatus 100, the time count value is counted up on condition that the reading of the time count value by the CPU 12 is completed. Therefore, even when the CPU 12 operates in accordance with the low-frequency clock, the information processing apparatus 100 can prevent the CPU 12 from reading indeterminate data that is the second count value being counted up.

また、情報処理装置100では、CPU12により時刻カウント値の書き換えが行われる場合、反転システムクロックに従って時刻カウント値の書き換えが行われる。従って、情報処理装置100は、CPU12が低周波クロックに従って動作する場合であっても、時刻カウント値の書き換えと時刻カウント値のカウントアップとを両立させることができる。   In the information processing apparatus 100, when the time count value is rewritten by the CPU 12, the time count value is rewritten according to the inverted system clock. Therefore, the information processing apparatus 100 can rewrite the time count value and count up the time count value even when the CPU 12 operates according to the low frequency clock.

なお、上記第2実施形態では、制御部104Bのみがビット時刻カウンタ14Aを制御する場合について説明したが、本発明はこれに限定されるものではなく、制御部14B及び制御部104Bを選択的に用いてビット時刻カウンタ14Aを制御してもよい。例えば、RTCM104が制御部14B及び制御部104Bの双方を備える場合には、ビット時刻カウンタ14Aを制御部14Bと制御部104Bとに切り替えて接続するスイッチ(図示省略)を設け、スイッチをCPU12によって制御すればよい。   In the second embodiment, the case where only the control unit 104B controls the bit time counter 14A has been described. However, the present invention is not limited to this, and the control unit 14B and the control unit 104B are selectively connected. It may be used to control the bit time counter 14A. For example, when the RTCM 104 includes both the control unit 14B and the control unit 104B, a switch (not shown) that switches and connects the bit time counter 14A to the control unit 14B and the control unit 104B is provided, and the switch is controlled by the CPU 12. do it.

この場合、例えば、省電力モードで、スイッチにより、制御部104Bがビット時刻カウンタ14Aに接続され、非省電力モードで、スイッチにより、制御部14Bがビット時刻カウンタ14Aに接続される。これにより、省電力モードの場合、ビット時刻カウンタ14Aは、制御部104Bによって制御され、非省電力モードの場合、ビット時刻カウンタ14Aは、制御部14Bによって制御される。   In this case, for example, in the power saving mode, the control unit 104B is connected to the bit time counter 14A by a switch, and in the non power saving mode, the control unit 14B is connected to the bit time counter 14A by a switch. Thereby, in the power saving mode, the bit time counter 14A is controlled by the control unit 104B, and in the non power saving mode, the bit time counter 14A is controlled by the control unit 14B.

10,100 情報処理装置
12 CPU
14,104 RTCM
14A ビット時刻カウンタ
14B,104B 制御部
52 論理積回路
10,100 Information processing device 12 CPU
14,104 RTCM
14A bit time counters 14B and 104B Control unit 52 AND circuit

Claims (7)

時刻を示すカウント値を保持する保持更新部と、
前記保持更新部を制御する制御部と、
を含み、
前記カウント値は、クロックに従って動作する中央処理装置からの読出タイミング信号であって、前記クロックの第1エッジに同期して出力される読出タイミング信号にしたがって前記中央処理装置によって読み出され、
前記制御部は
記中央処理装置による前記カウント値の書き換えのタイミングを規定する書換タイミング信号であって、前記クロックの前記第1エッジとは異なる第2エッジに同期して出力される書換タイミング信号と、
前記カウント値のカウントアップのタイミングを規定するカウントアップタイミング信号であって、前記第2エッジに同期して出力されるカウントアップタイミング信号と、
を前記保持更新部に供給して、前記保持更新部の前記カウント値の更新を行う情報処理装置。
A holding and updating unit that holds a count value indicating the time;
A control unit for controlling the holding update unit;
Including
The count value is a read timing signal from a central processing unit that operates according to a clock, and is read by the central processing unit according to a read timing signal that is output in synchronization with the first edge of the clock,
Wherein,
A rewrite timing signal that defines a timing of rewriting the count value of pre-Symbol central processing unit, and the rewrite timing signal output in synchronization with the different second edge and the first edge of said clock,
A count-up timing signal for defining a count-up timing of the count value, the count-up timing signal output in synchronization with the second edge;
The supplied to the holding updating unit, an information processing apparatus that performs update of the count value of the holding updater.
前記保持更新部は、前記制御部から供給された前記書換タイミング信号に従って前記カウント値を書き換えることで前記カウント値を更新し、前記制御部から供給された前記カウントアップタイミング信号に従って前記カウント値をカウントアップすることで前記カウント値を更新する請求項1に記載の情報処理装置。   The holding and updating unit updates the count value by rewriting the count value according to the rewrite timing signal supplied from the control unit, and counts the count value according to the count-up timing signal supplied from the control unit The information processing apparatus according to claim 1, wherein the count value is updated by increasing the count value. 前記保持更新部は、前記制御部から供給された前記書換タイミング信号に従って、時刻単位で前記カウント値を書き換え、前記カウント値の書き換えが終了する迄の間、書き換え対象とされたカウント値と異なる時刻単位のカウント値の桁上がりを阻止する論理回路を有する請求項1又は請求項2に記載の情報処理装置。   The holding / updating unit rewrites the count value in units of time according to the rewrite timing signal supplied from the control unit, and a time different from the count value to be rewritten until the count value is completely rewritten. The information processing apparatus according to claim 1, further comprising a logic circuit that prevents a carry of a unit count value. 前記中央処理装置は、前記クロックとして、システムクロック及び前記システムクロックよりも低周波数のクロックである低周波クロックのうちの指定されたクロックに従って動作し、
前記制御部は、前記中央処理装置が前記低周波クロックに従って動作する場合、前記カウント値のカウントアップが前記低周波クロックで規定されたタイミングで行われるように前記保持更新部を制御する請求項1から請求項3の何れか1項に記載の情報処理装置。
The central processing unit operates as a clock according to a designated clock of a system clock and a low frequency clock which is a clock having a frequency lower than the system clock,
The control unit controls the holding / updating unit so that the count value is counted up at a timing defined by the low frequency clock when the central processing unit operates in accordance with the low frequency clock. The information processing apparatus according to claim 3.
前記制御部は、前記中央処理装置によって前記カウント値の読み出しが行われる場合、前記中央処理装置による前記カウント値の読み出しが終了したことを条件に前記カウント値がカウントアップされるように前記保持更新部を制御する請求項4に記載の情報処理装置。   When the central processing unit reads out the count value, the control unit updates the holding value so that the count value is counted up on the condition that the count value is completely read out by the central processing unit. The information processing apparatus according to claim 4, which controls a unit. 前記制御部は、前記中央処理装置によって前記カウント値の書き換えが行われる場合、前記中央処理装置による前記カウント値の書き換えが前記システムクロックで規定したタイミングで行われるように前記保持更新部を制御する請求項4又は請求項5に記載の情報処理装置。   When the count value is rewritten by the central processing unit, the control unit controls the holding / updating unit so that the count value is rewritten by the central processing unit at a timing defined by the system clock. The information processing apparatus according to claim 4 or 5. 前記第1エッジは、前記クロックの立ち上がりであり、
前記第2エッジは、前記クロックの立ち下がりである請求項1から請求項6の何れか1項に記載の情報処理装置。
The first edge is a rising edge of the clock;
The information processing apparatus according to claim 1, wherein the second edge is a falling edge of the clock.
JP2015064038A 2015-03-26 2015-03-26 Information processing device Active JP6584805B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015064038A JP6584805B2 (en) 2015-03-26 2015-03-26 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015064038A JP6584805B2 (en) 2015-03-26 2015-03-26 Information processing device

Publications (2)

Publication Number Publication Date
JP2016184279A JP2016184279A (en) 2016-10-20
JP6584805B2 true JP6584805B2 (en) 2019-10-02

Family

ID=57241948

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015064038A Active JP6584805B2 (en) 2015-03-26 2015-03-26 Information processing device

Country Status (1)

Country Link
JP (1) JP6584805B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02219117A (en) * 1989-02-20 1990-08-31 Nec Corp Microprocessor control circuit
JPH0883209A (en) * 1994-09-12 1996-03-26 Fujitsu Ltd Mpu interface circuit
JP4189729B2 (en) * 2002-11-14 2008-12-03 日本電気株式会社 Asynchronous readout method of timer count value and timer
JP2006201856A (en) * 2005-01-18 2006-08-03 Renesas Technology Corp Semiconductor integrated circuit
JP2011113173A (en) * 2009-11-25 2011-06-09 Seiko Epson Corp Real-time clock device, information processor and electronic apparatus

Also Published As

Publication number Publication date
JP2016184279A (en) 2016-10-20

Similar Documents

Publication Publication Date Title
US8375239B2 (en) Clock control signal generation circuit, clock selector, and data processing device
US20190179990A1 (en) Distributed programmable delay lines in a clock tree
CN107817871B (en) Frequency offset correction accuracy for real-time clocks
JP5114218B2 (en) Frequency correction circuit and clock device using the same
JP6584805B2 (en) Information processing device
JP2611034B2 (en) Delay circuit
JP2005157883A (en) Reset circuit
JP2011113173A (en) Real-time clock device, information processor and electronic apparatus
JPS58129552A (en) Processor
JP2016514338A (en) Storage device reading apparatus and method
US7225419B2 (en) Methods for modeling latch transparency
US6757352B1 (en) Real time clock with a power saving counter for embedded systems
US7054205B2 (en) Circuit and method for determining integrated circuit propagation delay
Inoue et al. Variable-duty-cycle scheduling in double-edge-triggered flip-flop-based high-level synthesis
JP2006201856A (en) Semiconductor integrated circuit
JP2000148284A (en) Semiconductor integrated circuit device and its signal supply method
JP2006222515A (en) Semiconductor integrated circuit
TWI382301B (en) Control circuit for power-on-reset and its operating method
JP4640792B2 (en) Semiconductor logic device and electronic device including the same
JP2001257566A (en) Latch circuit with enable function
US10230374B1 (en) Methods and circuits for preventing hold violations
JP6026616B2 (en) Motor driver device having clock motor driver and related component circuit
JPH0352053A (en) Interface circuit for serial data
JP2007281642A (en) Semiconductor integrated circuit
JP2005250999A (en) Register control circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180918

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190319

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190513

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190806

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190904

R150 Certificate of patent or registration of utility model

Ref document number: 6584805

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150