# US 5,703,919 A · Fail-safe method to read a timer which is based on a particular clock with another asynchronous circit

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 5,703,919 A
- Document ID: US5703919A
- Status: Granted
- Kind: A
- Application number: 08/633,671
- Filed: 1996-04-17
- Granted: 1997-12-30
- Earliest claimed: 1996-04-17
- Assignees: Advanced Micro Devices, Inc.
- Inventors: Joseph A. Bailey; Qadeer A. Qureshi
- Web page: https://patentgrep.com/patent/US5703919A

## CPC

- G04G 5/00: Setting, i.e. correcting or changing, the time-indication (radio-controlled time-pieces G04R)
- G04G: ELECTRONIC TIME-PIECES

## Abstract

A method and apparatus for reading a timer with an asynchronous circuit. A computer system is provided having a system clock and an asynchronous timer clock. The computer system includes a counter clocking from the timer clock and a latch coupled to output of the counter. First logic, synchronized to the timer clock, is coupled to control the latch responsive to a control signal from the computer system. Second logic synchronized to the system clock and coupled to the first logic is configured to provide an indication to the computer system of when the system can read the latched data and be assured of its validity. The computer system will thereby be prevented from reading the timer before it has stabilized.

## Claims

### Claim 1

A timer counter circuit for a computer system, comprising:
a counter clocked by a timer clock;
a latch coupled to receive an output from said counter; and
counter control circuitry, including;
a first circuit coupled to control said latch, responsive to a first control signal from said computer system, wherein said first circuit is coupled to be clocked from said timer clock;
a second circuit coupled to said first circuit, wherein said second circuit is coupled to be clocked from a system clock asynchronous to said timer clock; and
wherein said counter control circuitry is configured to provide an indication to said computer system that said computer system may read valid data from said latch.

### Claim 2 (depends on 1)

The timer counter circuit of claim 1, wherein said first circuit comprises a first state machine.

### Claim 3 (depends on 1)

The timer counter circuit of claim 1, wherein said second circuit comprises a second state machine.

### Claim 4 (depends on 1)

The timer counter circuit of claim 1, wherein said second circuit is configured to provide said indication to said computer system that said computer system may read valid data from said latch.

### Claim 5 (depends on 1)

The timer counter circuit of claim 1, wherein said first control signal is a signal for requesting a read of said output.

### Claim 6 (depends on 1)

The timer counter circuit of claim 1, wherein said first circuit is configured to provide a second control signal to said latch to cause said latch to latch said output from said counter.

### Claim 7 (depends on 6)

The timer counter circuit of claim 6, wherein said second control signal is synchronous to said timer clock.

### Claim 8 (depends on 1)

The timer counter circuit of claim 1, wherein said second circuit is configured to receive a third control signal from said first circuit indicating that said output has been latched.

### Claim 9 (depends on 8)

The timer control circuit of claim 8, wherein said second circuit is configured to provide a ready signal to said computer system responsive to said third control signal and synchronous to said system clock.

### Claim 10

A method of reading a timer in a computer system, comprising:
providing a first clock to a counter and first logic;
providing a second clock asynchronous to said first clock to second logic coupled to said first logic;
latching data from outputs of said counter responsive to a first signal from said first logic;
providing a second signal from said second logic indicative of the presence of valid latched counter data in said latch; and
reading said latch synchronous to said second clock.

### Claim 11 (depends on 10)

The method of claim 10, including generating said first signal responsive to an indication from said computer system that said timer is to be read.

### Claim 12 (depends on 10)

The method of claim 10, wherein said first logic includes a first state machine.

### Claim 13 (depends on 10)

The method of claim 10, wherein said second logic includes a second state machine.

### Claim 14

A timer in an electronic device comprising:
a processor configured to clock from a first clock signal;
a counter configured to clock from second clock signal asynchronous to said first clock signal;
a latch coupled to receive an output from said counter;
counter control circuitry configured to provide an indication to said processor when valid data are ready to be read from said latch, including;
first logic coupled to clock from said first clock signal; and
second logic coupled to said first logic and configured to clock from said second clock signal.

### Claim 15 (depends on 14)

The timer of claim 14, wherein said first logic is configured to provide said indication to said processor when valid data are ready to be read from said latch.

### Claim 16 (depends on 14)

The timer of claim 14, wherein said first logic includes a first state machine.

### Claim 17 (depends on 14)

The timer of claim 14, wherein said second logic includes a second state machine.

### Claim 18 (depends on 14)

The timer counter circuit of claim 14, wherein said second logic is configured to provide said indication to said computer system that said computer system may read valid data from said latch.

### Claim 19 (depends on 14)

The timer counter circuit of claim 14, wherein said first control signal is a signal for requesting a read of said output.

### Claim 20 (depends on 14)

The timer counter circuit of claim 14, wherein said first logic is configured to provide a second control signal to said latch to cause said latch to latch said output from said counter.

### Claim 21 (depends on 20)

The timer counter circuit of claim 20, wherein said second control signal is synchronous to said timer clock.

### Claim 22 (depends on 14)

The timer counter circuit of claim 14, wherein said second circuit is configured to receive a third control signal from said first circuit indicating that said output has been latched.

### Claim 23 (depends on 22)

The timer control circuit of claim 22, wherein said second circuit is configured to provide a ready signal to said computer system responsive to said third control signal and synchronous to said system clock.

### Claim 24

A timer circuit, comprising:
a counter synchronized to a first clock signal;
a latch coupled to said counter and configured to provide an output to a system synchronized to a second clock;
a first state machine coupled to said latch, synchronized to said first clock signal and coupled to receive a first control signal synchronized to said second clock signal;
a second state machine synchronized to said second clock and coupled to said first state machine, said second state machine being configured to provide a second control signal to said system indicative of when valid data may be read from said latch, and wherein said latch latches said valid data through said latch responsive to a third control signal received from said first state machine.

### Claim 25

A timer in a computer system, comprising:
a counter synchronized to a first clock;
a latch coupled to said counter having outputs readable by said computer system, said computer system being synchronized to a second clock asynchronous to said first clock; and
means for ensuring that said computer system always reads valid data from said latch.

### Claim 26 (depends on 25)

The timer of claim 25, wherein said ensuring means includes a first circuit coupled to said latch and responsive to a control signal from said computer system.

### Claim 27 (depends on 26)

The timer of claim 26, wherein said ensuring means includes a second circuit coupled to said first circuit and configured to provide an indication to said computer system of when valid data may be read from said latch.

### Claim 28 (depends on 27)

The timer of claim 27, wherein said first circuit includes a first state machine.

### Claim 29 (depends on 28)

The timer of claim 28, wherein said second circuit includes a second state machine.
