How the Timing Bus works

Design Goals / General information

The goal of the timing bus is to provide cards put into the ground station with timing information and synchronize the ground stations. In the first implementation GPS is used for timing distribution.

Components of the timing bus

The timing bus contains three informations that are transmitted seperately.

  1. PPS … when a new second starts
  2. SLOWCLOCK … what the next second is and how long the last second lasted
  3. FASTCLOCK … how far the current second has gone.

I guess you'll need some kind of explanation on this:

SLOWCLOCK - What the next second is

This sends a 72 bit long package containing

  1. the number of clock ticks in the second before the current as an unsigned 32-bit integer.
  2. the timestamp for the next second as a 40-bit integer

Both numbers are being sent LSB.

Tweak: If some module does not need the fasttime information becuase the developer feels that a 1 second resolution is good enough, it can recieve this packet into a 40-bit register.

The timestamp of the next second will be sent as a unix timestamp (the number of seconds since UTC 1970/01/01 00:00:00 without leap seconds and not accounting for daylight savings time). This second will be valid after the PPS signal is activated.

The number of clock ticks in the second before the current second is being sent to compensate for clock drift on the oscillator.

FASTCLOCK - how far the current second has gone

Every module needing fast timing needs to count the number of oscillator ticks. Every module needing accurate timing information needs to count the ticks in a local register. When the PPS Pin is activated the module can reset this register and begin counting again.

When a module needs to measure the exact time (eg triggered by a measurement event), it should latch the current slowtime and fasttime information into a Parallel-in-serial-out Register to have that data available for further processing.

Within a Ground-station the speed of the oscilator should be known and can assumed to be constant but clock drifts.

PPS - a new second begins

When the PPS is activated (Active Low), the previously sent slowtime becomes valid. The local counters for the fastclock should be resetted.

Measuring the Time with the Timing bus

This describes how it would be for a Fast-Timing Module, for a module needing only the slow time information, ignore everything about the fast time and read the Tweak from the SLOWCLK section.

Prerequisites:

  • There is a +1 Counter with 32 bits that counts up on every clock tick of the FASTCLK.
  • The SLOWCLK Information is being put into a Register
  • When PPS comes, the counter is being reseted and restarts from 0. The SLOWCLK Information from the Bus is latched into a register CURTIME.

When the event comes in, the following is happening:

  1. Latch CURTIME + the current Value of the Counter into a Parallel-in-Serial-Out Register (makes 72+32 bit).
  2. Process the event
  3. Get the Information from the PISO
  4. Send all information to the target over the

What you get is a 40-bit timestamp of the current time and the number of clock ticks within the current second. With a known FASTCLK frequency you can easily calculate the fraction of a second and thus complete the timestamp to SECOND and FRACTION OF SECOND values.

The maximum resoltution is dependent on the oscilator speed. Eg: 10Mhz FASTCLOCK makes 100ns resolution.

project/hgg/hardwaredoc/how_the_timing_bus_works.txt · Zuletzt geändert: 2012/10/03 18:53 von 109.192.98.64