JP6584805B2 - Information processing device - Google Patents
Information processing device Download PDFInfo
- 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
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.
しかしながら、システムクロックは、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
本発明によれば、システムクロックの立ち上がりのみを利用して時刻の更新及び読み出しを行う場合に比べ、時刻の更新及び読み出しを高精度に行うことができる、という効果が得られる。 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.
以下、図面を参照して、本発明を実施するための形態例について詳細に説明する。 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
システムクロック発生器18は、システムクロックを発生させ、発生させたシステムクロックを、CPU12及びRTCM14に供給する。なお、システムクロックは、CPU12及びRTCM14に限らず、情報処理装置10に含まれる各種モジュールに供給される。また、本実施形態において、システムクロックは、数GHzのクロックとされているが、本発明はこれに限定されるものではなく、他の周波数のクロックであってもよい。
The
1Hzクロック発生器20は、1Hzクロックを発生させ、発生させた1HzクロックをRTCM14に供給する。なお、1Hzクロックは、システムクロックと非同期のクロックである。
The 1
CPU12は、システムクロック発生器18から供給されるシステムクロックに従って情報処理装置10の全体を制御する。
The
RTCM14は、1Hzクロック発生器20から供給される1Hzクロックに従って計時を行う。すなわち、RTCM14は、1Hzクロック発生器20から供給される1Hzクロックに従って時刻カウント値をカウントアップする(1を加算する)ことで時刻カウント値を更新する。
The
CPU12及びRTCM14は、アドレスバス、コントロールバス、及びデータバスを含むバス16に接続されている。従って、時刻カウント値は、RTCM14から、バス16に含まれる出力用のデータバスを介してCPU12によって読み出され、バス16に含まれる入力用のデータバスを介してCPU12によって書き換えられる。なお、本実施形態において、時刻カウント値の更新は、カウントアップによる更新とCPU12による書き換えによる更新とに大別される。
The
RTCM14は、秒、分、時、日、週、月、及び年の各々の時刻単位毎に、BCD(Binary−coded decimal)カウンタである時刻カウンタを有する。
The
また、一例として図2に示すように、時刻カウンタは、本発明に係る保持更新部の一例であるビット時刻カウンタ14Aを有する。ビット時刻カウンタ14Aは、1ビット単位で設けられており、1ビット毎に、時刻カウント値を管理する。
As an example, as illustrated in FIG. 2, the time counter includes a
一例として図2に示すように、RTCM14は、制御部14Bを有する。制御部14Bは、システムクロックの立ち下がり(本発明に係る第1エッジの一例)に同期して時刻カウント値が更新されるようにビット時刻カウンタ14Aを制御する。
As an example, as shown in FIG. 2, the
制御部14Bは、レジスタ30,32,論理和回路36,38、及び論理積回路40,42,44を有する。また、ビット時刻カウンタ14Aは、レジスタ34、論理積回路46,48,50,52、排他的論理和回路54、及びセレクタ56,58を有する。なお、レジスタ30,32,34は何れもフリップフロップである。また、論理積回路52は、本発明に係る論理回路の一例である。
The
論理和回路36には、CPU12から、バス16に含まれるコントロールバスを介して書換タイミング信号が入力される。書換タイミング信号は、秒、分、時、日、週、月、及び年の各々の時刻単位毎にCPU12によって生成され、各時刻カウンタの時刻カウント値の書き換えのタイミングを規定する。書換タイミング信号は、ローレベル及びハイレベルのうちの一方から他方へ遷移する2値信号であり、信号レベルがハイレベルの場合に時刻カウント値の書き換えが行われる。
A rewrite timing signal is input from the
書換タイミング信号は、秒書換タイミング信号、分書換タイミング信号、時書換タイミング信号、週書換タイミング信号、日書換タイミング信号、月書換タイミング信号、及び年書換タイミング信号に大別される。 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
論理積回路40は、論理和回路36により生成された第1論理和信号とシステムクロックを反転させて得た反転システムクロックとの論理積を示す第1論理積信号を出力する。
The
レジスタ30は、システムクロックに同期して1Hzクロックを取り込み、取り込んだ1Hzクロックを遅延させた信号である第1遅延信号を出力する。
The
レジスタ32は、レジスタ30により出力された第1遅延信号をシステムクロックに同期して取り込み、取り込んだ第1遅延信号を遅延させた信号である第2遅延信号を出力する。
The
論理積回路42は、レジスタ30により出力された第1遅延信号とレジスタ32により出力された第2遅延信号を反転させて得た反転遅延信号との論理積を示す第2論理積信号を出力する。
The
論理積回路44は、論理積回路42により出力された第2論理積信号と反転システムクロックとの論理積を示す第3論理積信号を生成する。なお、第3論理積信号は、本発明に係るカウントアップタイミング信号の一例である。
The
論理和回路38は、論理積回路40により出力された第1論理積信号と論理積回路44により出力された第3論理積信号との論理和を示す第2論理和信号を出力する。なお、第2論理和信号は、本発明に係る更新信号の一例である。
The
レジスタ34には、1ビット分の時刻カウント値が格納されている。レジスタ34は、セレクタ58により出力された更新用の時刻カウント値(後述)を第2論理和信号に従って取り込み、現時点で保持している時刻カウント値を、取り込んだ更新用の時刻カウント値に書き換えることで時刻カウント値を更新する。時刻カウント値は、バス16に含まれる出力用のデータバスを介してCPU12によって読み出される。
The
論理積回路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
論理積回路48には、レジスタ34に格納されている時刻カウント値をクリアする(時刻カウント値を“0”に戻す)ことを指示する2値信号であるクリア信号及び第2論理積信号が入力される。論理積回路48は、クリア信号と第2論理積信号との論理積を示す第5論理積信号を出力する。
The
排他的論理和回路54は、下位桁のビット時刻カウンタ14Aから供給されるキャリとレジスタ34に格納されている時刻カウント値との排他的論理和を示す排他的論理和信号を出力する。
The exclusive OR
セレクタ54は、排他的論理和回路54により出力された排他的論理和信号とレジスタ34に格納されている時刻カウント値とを第4論理積信号に従って選択的に出力する。
The
論理積回路50は、セレクタ54の出力結果と第5論理積信号を反転させて得た反転論理積信号との論理積を示す第6論理積信号を出力する。
The
セレクタ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
論理積回路52は、下位桁のビット時刻カウンタ14Aから供給されるキャリと、レジスタ34に格納されている時刻カウント値と、書換タイミング信号を反転させて得た反転書換タイミング信号との論理積を示す第7論理積信号を出力する。第7論理積信号の出力先は、上位桁のビット時刻カウンタ14Aである。
The
なお、論理積回路52では、反転書換タイミング信号を基に第7論理積信号が生成されるので、時刻カウント値の書き換えが行われている間は、信号レベルがハイレベルの第7論理積信号であるキャリが生成されず、時刻カウント値の桁上がりが行われない。
Since the AND
次に、時刻カウント値がCPU12によって読み出される場合のRTCM14の動作について図3を参照しながら説明する。
Next, the operation of the
1Hzクロックは、システムクロックの立ち上がりに同期してレジスタ30に取り込まれ、レジスタ30によって第1遅延信号が生成される。また、第1遅延信号は、システムクロックの立ち上がりに同期してレジスタ32に取り込まれ、レジスタ32によって、第1遅延信号よりもシステムクロックの1サイクル分遅延した第2遅延信号が生成される。
The 1 Hz clock is taken into the
論理積回路42では、第1遅延信号と第2遅延信号を反転させて得た反転遅延信号との論理積を示す第2論理積信号が生成される。論理積回路42によって生成された第2論理積信号は、システムクロックに同期して1Hzクロックの立ち上がりを検出したことを示す信号として用いられる。
The
論理積回路44では、第2論理積信号と反転システムクロックとの論理積(第2論理積信号の後半部分)を示す第3論理積信号が生成される。このようにして生成された第3論理積信号は、システムクロックの立ち下がりに同期して出力される1Hzクロックと同様に機能する信号である。すなわち、第3論理積信号は、時刻カウント値のカウントアップのタイミングを規定する同期信号として用いられる。
The
論理積回路40では、書換タイミング信号の論理和を示す第1論理和信号と反転システムクロックとの論理積を示す第1論理積信号が生成される。このようにして生成された第1論理積信号は、システムクロックの立ち下がりに同期して出力される書換タイミング信号と同様に機能する信号である。すなわち、第1論理積信号は、CPU12による時刻カウント値の書き換えのタイミングを規定する同期信号として用いられる。
In the
論理和回路38では、第1論理積信号と第3論理積信号の論理和を示す第2論理和信号が生成される。よって、第2論理和信号のハイレベル期間は、第1論理積信号のハイレベル期間(図4参照)及び第3論理積信号のハイレベル期間の各々と一致する。なお、図3に示す例では、書換タイミング信号がRTCM14に供給されていないため、第1論理積信号がローレベルであり、第2論理和信号のハイレベル期間は、第3論理積信号のハイレベル期間と一致している。
The
ここで、CPU12は、秒カウント値の読み出しを行う場合、読み出しのタイミングを規定する信号である秒読出タイミング信号に従って秒カウント値を読み出す。秒読出タイミング信号は、CPU12によって生成される2値信号であり、システムクロックの立ち上がり(本発明に係る第1エッジの一例)でローレベルからハイレベルに遷移する。すなわち、秒読出タイミング信号は、システムクロックの半サイクル分だけ第3論理積信号よりも先行して立ち上がる。そのため、秒読出タイミング信号が立ち上がると、秒カウント値のカウントアップに先立って、読み出し対象の秒カウント値が確定する。読み出し対象の秒カウント値が確定すると、秒読出タイミング信号のハイレベル期間にCPU12によって秒カウント値がレジスタ34から読み出される。
Here, when reading out the second count value, the
時刻カウント値のカウントアップは、読み出し対象の秒カウント値の確定後、システムクロックの立ち下がりでローレベルからハイレベルに遷移する第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
次に、時刻カウント値がCPU12によって書き換えられる場合のRTCM14の動作について図4を参照しながら説明する。なお、時刻カウント値がCPU12によって読み出される場合と同様の動作については説明を省略する。
Next, the operation of the
CPU12は、分カウント値の書き換えを行う場合、書き換えタイミングを規定する信号である分書換タイミング信号をRTCM14に供給し、かつ、入力用のデータバスを介してセレクタ58に書換用の分カウント値を供給する。
When rewriting the minute count value, the
ここで、分書換タイミング信号は、システムクロックの立ち上がりでローレベルからハイレベルに遷移するのに対し、第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
分カウント値以外の時刻カウント値のカウントアップは、図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
以上説明したように、情報処理装置10では、システムクロックの立ち上がりに同期して時刻カウント値の読み出しが行われ、システムクロックの立ち下がりに同期して時刻カウント値のカウントアップ及び書き換えが行われる。従って、情報処理装置10は、システムクロックの立ち上がりのみを利用して時刻カウント値の更新及び読み出しを行う場合に比べ、時刻カウント値の更新及び読み出しを高精度に行うことができる。
As described above, in the
また、情報処理装置10では、システムクロックの立ち下がりに同期して第2論理和信号がビット時刻カウンタ14Aに供給されることで、ビット時刻カウンタ14Aにより時刻カウント値が更新される。従って、情報処理装置10は、システムクロックの立ち下がりに同期しない信号に従ってビット時刻カウンタ14Aにより時刻カウント値が更新される場合に比べ、時刻カウント値の高精度な更新を簡易な構成で実現することができる。
In the
また、情報処理装置10では、システムクロックの立ち下がりに同期して出力される第1論理積信号に従って時刻カウント値の書き換えが行われる。また、システムクロックの立ち下がりに同期して出力される第3論理積信号に従って時刻カウント値のカウントアップが行われる。従って、情報処理装置10は、システムクロックの立ち下がりに同期しない信号に従って時刻カウント値の書き換え及びカウントアップが行われる場合に比べ、時刻カウント値の高精度な更新を簡易な構成で実現することができる。
In the
また、情報処理装置10では、分カウント値の書き換えが行われている間、秒カウンタにおいて、論理積回路52により、キャリは、上位桁のビット時刻カウンタ14Aに供給されない。従って、情報処理装置10は、分カウント値の書き換えが行われている間に秒カウンタにおいてキャリが上位桁のビット時刻カウンタ14Aに供給される場合に比べ、分カウント値の書き換えが行われている間の秒カウント値の桁上がりを回避することができる。
In the
なお、上記第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
低周波クロック発生器102は、システムクロックよりも低周波数のクロックである低周波クロックを発生させ、発生させた低周波クロックを、CPU12及びRTCM104に供給する。
The low
低周波クロックは、システムクロック及び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
一例として図6に示すように、RTCM104は、図2に示すRTCM14に比べ、制御部104Bを有する点が異なる。
As an example, as illustrated in FIG. 6, the
制御部104Bは、制御部14Bに比べ、論理和回路36及び論理積回路40を除いた点が異なる。また、制御部104Bは、制御部14Bに比べ、否定論理和回路106を有する点、論理積回路44に代えてラッチ回路108を有する点、及び論理和回路38に代えてセレクタ110を有する点が異なる。
The
否定論理和回路106には、CPU12から、バス16に含まれるコントロールバスを介して読出タイミング信号が入力される。読出タイミング信号は、秒、分、時、日、週、月、及び年の各々の時刻単位毎にCPU12によって生成され、各時刻カウンタの時刻カウント値の読み出しのタイミングを規定する。読出タイミング信号は、ローレベル及びハイレベルのうちの一方から他方へ遷移する2値信号であり、信号レベルがハイレベルの場合に時刻カウント値の読み出しが行われる。
A read timing signal is input from the
読出タイミング信号は、上記第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
ラッチ回路108は、否定論理和信号に従って第2論理積信号を取り込んで、取り込んだ第2論理積信号をカウントアップクロックとしてセレクタ110に出力する。
The
セレクタ110は、書換タイミング信号に従って、反転システムクロックとカウントアップクロックとを、時刻カウント値を更新するタイミングを規定する更新タイミング信号として、選択的にビット時刻カウンタ14Aに出力する。すなわち、セレクタ110は、書換タイミング信号が入力された場合に、反転システムクロックをビット時刻カウンタ14Aに出力し、書換タイミング信号が入力されない場合に、カウントアップクロックをビット時刻カウンタ14Aに出力する。
The
次に、RTCM104の動作について図7〜図9を参照しながら説明する。
Next, the operation of the
一例として図7に示すように、RTCM104では、上記第1実施形態で説明したRTCM14に比べ、システムクロックに代えて低周波クロックに従って第2論理積信号が生成される点が異なる。よって、論理積回路42により生成された第2論理積信号は、低周波クロックに同期して1Hzクロックの立ち上がりを検出したことを示す信号として用いられる。
As an example, as shown in FIG. 7, the
ここで、CPU12によって秒カウント値の読み出しが行われる場合、一例として図8に示すように、秒読出タイミング信号が否定論理和回路106に入力される。否定論理和回路106に秒読出タイミング信号が入力されると、ラッチ回路108は、CPU12により秒カウント値の読み出しが行われている間、第2論理積信号の取り込みを停止する。そして、ラッチ回路108は、CPU12による秒カウント値の読み出しが終了すると、第2論理積信号の取り込みを再開する。
Here, when the second count value is read by the
ラッチ回路108により第2論理積信号の取り込みが再開されることで生成されたカウントアップクロックは、セレクタ110により更新タイミング信号としてビット時刻カウンタ14Aに出力される。ビット時刻カウンタ14Aでの時刻カウント値のカウントアップは、更新タイミング信号のハイレベル期間に行われる。
The count-up clock generated by restarting the capture of the second AND signal by the
また、一例として図9に示すように、秒カウント値のカウントアップが行われている途中で秒書換タイミング信号がセレクタ110に入力されると、セレクタ110により、反転システムクロックが更新タイミング信号として出力される。これにより、更新タイミング信号は、システムクロックの半サイクル分だけローレベルとなり、ローレベル期間に秒カウント値の書き換えが行われる。
As an example, as shown in FIG. 9, when the second rewrite timing signal is input to the
以上説明したように、情報処理装置100では、カウントアップクロックが低周波クロックに従って生成されることで、ビット時刻カウンタ14Aにより、低周波クロックで規定されたタイミングで時刻カウント値のカウントアップが行われる。従って、情報処理装置100は、CPU12が低周波クロックに従って動作する場合であっても、時刻カウント値のカウントアップを行うことができる。
As described above, in the
また、情報処理装置100では、CPU12による時刻カウント値の読み出しが終了したことを条件に時刻カウント値がカウントアップされる。従って、情報処理装置100は、CPU12が低周波クロックに従って動作する場合であっても、カウントアップ中の秒カウント値である不確定データがCPU12によって読み出されることを回避することができる。
In the
また、情報処理装置100では、CPU12により時刻カウント値の書き換えが行われる場合、反転システムクロックに従って時刻カウント値の書き換えが行われる。従って、情報処理装置100は、CPU12が低周波クロックに従って動作する場合であっても、時刻カウント値の書き換えと時刻カウント値のカウントアップとを両立させることができる。
In the
なお、上記第2実施形態では、制御部104Bのみがビット時刻カウンタ14Aを制御する場合について説明したが、本発明はこれに限定されるものではなく、制御部14B及び制御部104Bを選択的に用いてビット時刻カウンタ14Aを制御してもよい。例えば、RTCM104が制御部14B及び制御部104Bの双方を備える場合には、ビット時刻カウンタ14Aを制御部14Bと制御部104Bとに切り替えて接続するスイッチ(図示省略)を設け、スイッチをCPU12によって制御すればよい。
In the second embodiment, the case where only the
この場合、例えば、省電力モードで、スイッチにより、制御部104Bがビット時刻カウンタ14Aに接続され、非省電力モードで、スイッチにより、制御部14Bがビット時刻カウンタ14Aに接続される。これにより、省電力モードの場合、ビット時刻カウンタ14Aは、制御部104Bによって制御され、非省電力モードの場合、ビット時刻カウンタ14Aは、制御部14Bによって制御される。
In this case, for example, in the power saving mode, the
10,100 情報処理装置
12 CPU
14,104 RTCM
14A ビット時刻カウンタ
14B,104B 制御部
52 論理積回路
10,100
14,104 RTCM
14A bit time counters 14B and
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から請求項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.
前記第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.
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)
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 |
-
2015
- 2015-03-26 JP JP2015064038A patent/JP6584805B2/en active Active
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 |