JPS6131481B2 - - Google Patents

Info

Publication number
JPS6131481B2
JPS6131481B2 JP55180386A JP18038680A JPS6131481B2 JP S6131481 B2 JPS6131481 B2 JP S6131481B2 JP 55180386 A JP55180386 A JP 55180386A JP 18038680 A JP18038680 A JP 18038680A JP S6131481 B2 JPS6131481 B2 JP S6131481B2
Authority
JP
Japan
Prior art keywords
timer
time
read
real
data
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.)
Expired
Application number
JP55180386A
Other languages
Japanese (ja)
Other versions
JPS57105014A (en
Inventor
Takahiro Ito
Hidenori Takeuchi
Koichi Ikeda
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP55180386A priority Critical patent/JPS57105014A/en
Publication of JPS57105014A publication Critical patent/JPS57105014A/en
Publication of JPS6131481B2 publication Critical patent/JPS6131481B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1497Details of time redundant execution on a single processing unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 本発明は、電子計算機のタイマ読出方式に関
し、詳しくは、時々刻々と値が更新されるタイマ
の更新時刻と読み出し時刻とが非同期である場合
に、読み出し時刻が更新時刻と重なることにより
生ずる読み出しデータの不確実性を除去するタイ
マ読出方式に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a timer reading method for an electronic computer, and more specifically, when the update time of a timer whose value is updated from time to time and the read time are asynchronous, the read time is the update time. This invention relates to a timer read method that eliminates uncertainty in read data caused by overlapping data.

電子計算機システムには、種々のタイマが存在
する。スーパバイザ(OS)はハードウエアのタ
イマを利用して各時点の時刻を検知し、ユーザ・
プログラムに対して経過時間および中央処理装置
使用時間に関するサービスを与えている。
Various types of timers exist in electronic computer systems. The supervisor (OS) uses a hardware timer to detect the time at each point in time and
Provides services to programs regarding elapsed time and central processing unit usage time.

ここでは、説明の都合上、タイマの一例とし
て、時、分、秒、ミリ秒で実時間を表示する実時
間タイマの読出方式について説明する。
Here, for convenience of explanation, a reading method of a real time timer that displays real time in hours, minutes, seconds, and milliseconds will be described as an example of a timer.

実時間タイマは、第1図に示すように、時、
分、秒を表示する6デイジツト長のタイマ上位部
である実時間タイマ11と、ミリ秒を表示する3
デイジツト長のタイマ下位部である実時間タイマ
12の2個で構成されている。
As shown in Figure 1, the real-time timer is
Real-time timer 11, which is the upper part of a 6-digit timer that displays minutes and seconds, and 3 that displays milliseconds.
It consists of two real-time timers 12, which are the lower part of the digit length timer.

4バイト同時伝送が可能なデータ・バス18は
実時間タイマ11と12の両方を同時に読み出し
て伝送することができないため、2回に分けて読
み出さなければならない。読み出された実時間
は、プロセツサ17に取り込まれた後、メモリ2
4にも伝送される。
Since the data bus 18, which can transmit 4 bytes simultaneously, cannot read and transmit both real-time timers 11 and 12 at the same time, they must be read out twice. The read real time is taken into the processor 17 and then stored in the memory 2.
4 is also transmitted.

実時間タイマ11,12からの読み出し動作
は、マイクロ・プログラムによつて行われてお
り、第2図のフロー・チヤートに示すように、先
ず実時間タイマ11からタイマ上位部の読み出し
を開始し、6デイジツト分を読み出した後、次に
実時間タイマ12からタイマ下位部の読み出しを
行い、3デイジツト分をプロセツサ17に伝送す
る。実時間タイマの上位部を読み始めてから下位
部を読み終わるまで、時間Tがかかるが、実時間
タイマ11,12の更新と読み出しは非同期に起
きるので、読み出し時間Tの期間中に実時間タイ
マ11,12が更新された場合は、読み出された
データの上位部と下位部とは相矛盾した内容にな
る可能性がある。
The read operation from the real-time timers 11 and 12 is performed by a microprogram, and as shown in the flow chart of FIG. After reading 6 digits, the lower part of the timer is read from the real-time timer 12, and 3 digits are transmitted to the processor 17. It takes time T from starting to read the upper part of the real-time timer to finishing reading the lower part, but since updating and reading of the real-time timers 11 and 12 occur asynchronously, the real-time timer 11 and 12 are updated during the reading time T. , 12 are updated, the upper and lower parts of the read data may have contradictory contents.

そこで、このような矛盾を除くため、従来、第
3図のタイム・チヤートに示すように、タイマが
更新される時点(Xで示す)の前後に実時間タイ
マ11,12の無効期間Sを設定し、この期間に
読み出されたデータは無効であることを表示して
いる。そのため、実時間タイマの更新制御回路
に、無効期間Sを表示する有効性表示ビツトを設
ける。ここで、無効期間Sは、S>Tとなるよう
に設定される。
Therefore, in order to eliminate such contradictions, conventionally, as shown in the time chart of FIG. 3, an invalid period S of the real-time timers 11 and 12 is set before and after the time point (indicated by X) when the timers are updated. However, it is displayed that the data read during this period is invalid. Therefore, the update control circuit of the real-time timer is provided with a validity display bit that indicates the invalid period S. Here, the invalid period S is set so that S>T.

第4図は、従来の実時間タイマの更新制御回路
のブロツク図である。
FIG. 4 is a block diagram of a conventional real-time timer update control circuit.

制御バス23を介して送られてきた更新パルス
は、フリツプ・フロツプ1にラツチされた後、ア
ンド・ゲート2でクロツクCLKとタイミングが
とられ、フリツプ・フロツプ4をセツトする。
The update pulse sent via control bus 23 is latched into flip-flop 1 and then timed with clock CLK by AND gate 2 to set flip-flop 4.

フリツプ・フロツプ4がセツトされると、リセ
ツト出力をオフにして有効性表示ビツト・フリツ
プ・フロツプ5をオフにすると同時に、カウンタ
6のカウント開始を指示する。
When the flip-flop 4 is set, the reset output is turned off to turn off the validity indicating bit flip-flop 5, and at the same time, the counter 6 is instructed to start counting.

8は、カウンタ6の出力から実時間タイマ1
1,12の更新時を検出する回路であり、この検
出回路8が更新時を検出すると、フリツプ・フロ
ツプ9およびアンド・ゲート10を介して実時間
タイマ11,12に更新パルスを送り、実時間を
更新させる。
8 is the real time timer 1 from the output of the counter 6.
1 and 12. When the detection circuit 8 detects the update time, it sends an update pulse to the real time timers 11 and 12 via the flip-flop 9 and the AND gate 10, and the real time update.

7は、有効性表示ビツトのリリーズ時を検出す
る回路であり、この検出回路7がリリーズ時を検
出すると、アンド・ゲート3を介してフリツプ・
フロツプ4をリセツトする。フリツプ・フロツプ
4は、リセツト出力により有効性表示ビツト・フ
リツプ・フロツプ5をオンにすると同時に、カウ
ンタ6のカウント停止を指示する。
7 is a circuit that detects when the validity display bit is released. When this detection circuit 7 detects the release time, the flip signal is output via the AND gate 3.
Reset flop 4. The flip-flop 4 turns on the validity indicating bit flip-flop 5 by means of a reset output, and at the same time instructs the counter 6 to stop counting.

従来の方式では、このように有効性表示ビツト
5、カウンタ6および更新時、リリーズ時の各検
出回路7,8等の特別な金物が必要でありさらに
タイマ更新後に読み始めた場合、データの正確性
は保証されているが、無効期間内であるために読
み出しデータが無効となるオーバーヘツドもあ
る。
The conventional method requires special hardware such as the validity display bit 5, the counter 6, and each detection circuit 7, 8 at the time of update and release. Although the read data is guaranteed to be valid, there is some overhead in which the read data becomes invalid because it is within the invalid period.

本発明の目的は、従来の欠点を除去するため特
別な金物を設ける必要がなく、かつ無効期間Sを
設定することなく、マイクロ・プログラムにより
タイマ読み出しデータの不確実性を除去すること
ができる電子計算機のタイマ読出方式を提供する
ことにある。
An object of the present invention is to eliminate the drawbacks of the conventional technology by using an electronic system that eliminates the uncertainty of timer read data using a microprogram without the need for special hardware and without setting an invalid period S. The purpose of this invention is to provide a computer timer reading method.

本発明による電子計算機のタイマ読出方式は更
新時期と読出時期とが非同期な電子計算機のタイ
マにおいて、タイマの値を読み出した後、再度そ
のタイマの値を読み出して、この値と先に読み出
した値とを比較し、一致を検出することによりタ
イマの読み出しデータの有効性を判定することを
特徴としている。
The timer read method for an electronic computer according to the present invention is to read the value of the timer in an electronic computer timer whose update time and read time are asynchronous, and then read the timer value again, and combine this value with the previously read value. The feature is that the validity of the timer read data is determined by comparing the data and detecting a match.

以下、本発明の実施例を、第5図により説明す
る。
Hereinafter, an embodiment of the present invention will be described with reference to FIG.

実時間タイマの上位部11と実時間タイマの下
位部12が読み出し用のデータ・バス18を介し
て演算部に接続され、さらにその演算部の出力が
制御装置(プロセツサ)17に接続される。
The upper part 11 of the real time timer and the lower part 12 of the real time timer are connected to an arithmetic section via a data bus 18 for reading, and the output of the arithmetic section is further connected to a control device (processor) 17.

また、第4図に示すような更新制御回路および
有効性表示ビツト・フリツプ・フロツプ5は不要
であり、クロツクCLKでタイミングをとつて直
接、更新パルスを実時間タイマ11,12に加え
ればよい。
Furthermore, the update control circuit and validity indicating bit flip-flop 5 as shown in FIG. 4 are not required, and update pulses can be applied directly to the real-time timers 11 and 12 using the clock CLK.

第5図においても、データ・バス18は4バイ
トであり、タイマ上位部1と下位部2の両方を同
時に読み出すことができないので、2段階以上に
分けて読み出す。マイクロ・プログラムにより、
先ず実時間タイマ11の内容をデータ・バス18
を介してレジスタ13にラツチし、さらに演算器
15とデータ・バス20を通してメモリ16に記
憶する。次に、同じ経路で実時間タイマ12の内
容を読み出してメモリ16に記憶する。
Also in FIG. 5, the data bus 18 is 4 bytes, and since both the upper part 1 and lower part 2 of the timer cannot be read out at the same time, they are read out in two or more stages. By micro program,
First, the contents of the real time timer 11 are transferred to the data bus 18.
The data is latched into the register 13 via the arithmetic unit 15 and the data bus 20 and stored in the memory 16. Next, the contents of the real time timer 12 are read out and stored in the memory 16 through the same route.

次に、再度、実時間タイマ11の内容をレジス
タ13にラツチすると同時に、メモリ16に記憶
しておいた実時間タイマ11の値をデータ・バス
19を介してレジスタ14にロードし、演算器1
5で比較する。レジスタ13とレジスタ14の値
が一致している場合には、両方の読取時期の間で
タイマ更新がなかつたことになり、実時間タイマ
の読み出しデータを有効とみなして、レジスタ1
3の内容を制御装置17に送出する。
Next, the contents of the real-time timer 11 are latched into the register 13 again, and at the same time, the value of the real-time timer 11 stored in the memory 16 is loaded into the register 14 via the data bus 19, and the arithmetic unit 1
Compare with 5. If the values of register 13 and register 14 match, it means that there was no timer update between both reading periods, and the read data of the real-time timer is regarded as valid, and register 1
3 is sent to the control device 17.

また、比較の結果、不一致の場合には、両方の
読取時期の間でタイマ更新があつたことになり、
読み出しデータを無効とみなして、その旨を制御
装置17に通知する。
Also, if the comparison results in a discrepancy, it means that a timer update occurred between both reading periods.
The read data is regarded as invalid and the control device 17 is notified of this fact.

このように、第5図では、読み出されたデータ
からデータの有効性を判断しているので、データ
の有効期間をあらかじめ表示するためのハードウ
エアは不要であり、マイクロプログラムのプログ
ラミングのみでタイマの読み出し時の問題を解決
できる。
In this way, in Figure 5, the validity of the data is determined from the read data, so there is no need for hardware to display the validity period of the data in advance, and the timer can be set up simply by programming the microprogram. This can solve the problem when reading data.

なお、これまでの説明では、タイマが複数回に
分割されて読み出される場合であつたが、1つの
タイマが全体として1回で読み出される場合につ
いても本発明は有効である。すなわち、タイマの
読み出しとそのタイマの更新とが丁度同時期に重
なつたときには、タイマの一部分のビツトのみが
更新された状態になる等、過渡的に正しくない値
がそのまま読み取られてしまう可能性がある。
In addition, in the explanation so far, the case has been described in which the timer is divided and read out multiple times, but the present invention is also effective in the case where one timer is read out as a whole at one time. In other words, if a timer read and a timer update occur at exactly the same time, there is a possibility that a temporarily incorrect value may be read as is, such as when only a portion of the timer's bits are updated. There is.

この場合にも、第5図に示すように、同一のタ
イマを2回読み取つて演算器15で比較し、一致
した場合だけその内容を有効とみなすことによ
り、上述のような不正値を除去することができ
る。
In this case as well, as shown in FIG. 5, the same timer is read twice and compared by the arithmetic unit 15, and only if they match, the contents are considered valid, thereby eliminating the above-mentioned invalid values. be able to.

なお、第5図において、タイマの2回の読み出
し時間間隔を、タイマの更新時間間隔よりも十分
に小さくすることが望ましい。
Note that, in FIG. 5, it is desirable that the time interval between two readings of the timer be made sufficiently smaller than the update time interval of the timer.

以上説明したように、本発明によれば、読み出
しと非同期に更新されるタイマに対し、特別な金
物を設置することなく、マイクロ・プログラムの
みにより読み出しデータの不確実性をなくすこと
ができる。
As described above, according to the present invention, uncertainty in read data can be eliminated using only a microprogram without installing special hardware for a timer that is updated asynchronously with reading.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は実時間タイマの構成および読出データ
の接続を示す図、第2図は実時間タイマの読出時
におけるマイクロプログラムのフローチヤート、
第3図はタイマの更新と有効性表示ビツトのタイ
ム・チヤート、第4図は従来における実時間タイ
マの更新制御回路のブロツク図、第5図は本発明
の実施例を示すブロツク図である。 11,12……実時間タイマ、13,14……
レジスタ、15……演算器、16……メモリ、1
7……制御装置、18,19,20……データ・
バス、23……制御バス、1,4,5,9……フ
リツプ・フロツプ、6……カウンタ、7,8……
更新時、リリーズ時検出回路。
FIG. 1 is a diagram showing the configuration of the real-time timer and the connection of read data, FIG. 2 is a flowchart of the microprogram when reading the real-time timer,
FIG. 3 is a time chart of timer updating and validity indicating bits, FIG. 4 is a block diagram of a conventional real-time timer update control circuit, and FIG. 5 is a block diagram showing an embodiment of the present invention. 11, 12... Real time timer, 13, 14...
Register, 15...Arithmetic unit, 16...Memory, 1
7...control device, 18,19,20...data/
Bus, 23... Control bus, 1, 4, 5, 9... Flip-flop, 6... Counter, 7, 8...
Detection circuit for update and release.

Claims (1)

【特許請求の範囲】[Claims] 1 更新時期と読出時期が非同期な電子計算機の
タイマにおいて、該タイマの値を読み出した後再
度該タイマの値を読み出して、読み出した値と先
に読み出した値とを比較し、比較の結果一致を検
出することにより、該タイマの読出データの有効
性を判定することを特徴とする電子計算機のタイ
マ読出方式。
1. In a computer timer whose update time and read time are asynchronous, after reading the value of the timer, read the value of the timer again, compare the read value with the value read earlier, and check if the comparison results match. 1. A timer read method for an electronic computer, characterized in that the validity of read data of the timer is determined by detecting the timer.
JP55180386A 1980-12-22 1980-12-22 Timer readout system of electronic computer Granted JPS57105014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP55180386A JPS57105014A (en) 1980-12-22 1980-12-22 Timer readout system of electronic computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP55180386A JPS57105014A (en) 1980-12-22 1980-12-22 Timer readout system of electronic computer

Publications (2)

Publication Number Publication Date
JPS57105014A JPS57105014A (en) 1982-06-30
JPS6131481B2 true JPS6131481B2 (en) 1986-07-21

Family

ID=16082317

Family Applications (1)

Application Number Title Priority Date Filing Date
JP55180386A Granted JPS57105014A (en) 1980-12-22 1980-12-22 Timer readout system of electronic computer

Country Status (1)

Country Link
JP (1) JPS57105014A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6356718U (en) * 1986-09-25 1988-04-15

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010113544A (en) * 2008-11-06 2010-05-20 Fujitsu Ten Ltd Timer value generation device and timer value generation method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6356718U (en) * 1986-09-25 1988-04-15

Also Published As

Publication number Publication date
JPS57105014A (en) 1982-06-30

Similar Documents

Publication Publication Date Title
US4566111A (en) Watchdog timer
JPS63184125A (en) Time coinciding system
JPS6131481B2 (en)
EP0409568B1 (en) Electronic timepiece
US4566062A (en) Timing control system in data processor
US4107916A (en) Electronic watch having an alarm means
SU1275472A1 (en) Device for checking parameters
SU1179336A1 (en) Control unit
JPH0619752A (en) Microcomputer
SU1513455A1 (en) Device for monitoring properness of execution of commands by microprocessor system
RU1807487C (en) Device for correcting errors in computational process
SU1005010A1 (en) Timer
SU1226455A1 (en) Microprogram control device
SU1702391A1 (en) Random number histogram former
SU1163328A1 (en) Device for checking microcomputer
JP2517943B2 (en) Timer device
JPS6111800Y2 (en)
JP2557785Y2 (en) Single chip microcomputer
SU1363226A1 (en) Device for interfacing computer with peripheral device
SU1142822A1 (en) Timer
JPH01156883A (en) Integration value reading method
SU1434419A1 (en) Information input device
JPS6239396B2 (en)
Zandell IBM 360/75 Computer Time Interface
JPS6032226B2 (en) Overflow detection method