SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Det. Search
Who's who?
Meetings
FAQ
Images
Archive
Systems
Performance
Intern. region
Vertex Tracker
Drift chamber
DIRC
Calorimeter
IFR
LST
Magnet
Electronics
Trigger
Operations
Run Coordination
Contact Experts
Shift Takers Info
Operations Manual
Electronic Logbook
Ops Hypernews
Shift Signup
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

ZPD clock reset and DCM usage

The ZPDs use Digital Clock Managers (DCMs) in the Xilinx Virtex-II FPGAs to manage the clock signals. A block diagram for how the ZPD uses these is as follows:

The input cclk and dclk each have their own DCM. The cclk becomes the on-board clock which drives most of the logic and the rest of the FPGAs. Each Finder/Fitter FPGA has its own DCM to multiply this 60 MHz clock to 120 MHz.

The dlink is clocked by the dclk before it is output. The dclk is given an empirically determined phase adjustment by the dclk DCM. We found that the magic phase changes if we alter the clock logic.

If the input cclk is lost (e.g. by unplugging the fiber or power-cycling the ROM crate), the DCMs can lose lock. This requires a reset to regain a stable phase lock. Command 0x14 (reframe) can be used to force a DCM reset.

DCM Reset Rules

  • Upon command 0x14 (reframe)
    • Reset cclk and dclk DCMs
    • When cclk DCM regains lock, reset Finder/Fitter and Decision Module DCMs
  • Command 0x14 is sent
    • When the ROM is rebooted as part of the board autodetection code
    • As part of the ZPD configuration code
  • If cclk DCM spontaneously loses lock
    • Send reset signal to cclk DCM
    • When cclk DCM regains lock, reset Finder/Fitter and Decision Module DCMs
  • If dclk DCM spontaneously loses lock
    • Send reset signal to dclk DCM
  • If Finder/Fitter or Decision Module DCMs spontaneously lose lock
    • Do nothing

The cclk and dclk DCM auto-relock are primarily for historical reasons; although they sometimes prevent bad things from happening, they don't reliably relock to the original phase and relocking one DCM without relocking the others can cause phase trouble.

When and how we reset the DCMs

  • During the board autodectection during a ROM reboot, we reset the DCMs with command 0x14.
  • During the ZPD configure, we reset the DCMs using command 0x14 followed by a UserReset (command 0x1E) to reset state machines, counters, pipelines, etc.

Things that don't work
(but sometimes do, just to confuse you...)

  • Trusting the auto-relock to fix things by resetting only the DCMs which say they lost lock
  • Reseting one DCM without resetting the others
  • Resetting the Decoder/Driver DCM and the Finder/Fitter DCMs at the same time (one drives the input of the other; sometimes a simultaneous reset works, but sometimes not...)
  • Assuming that the timing properties of the teststand are the same as IR2.