19.07.2012 Views

Preliminary Ttcbi

Preliminary Ttcbi

Preliminary Ttcbi

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CERN<br />

CH-1211 Geneva 23<br />

Switzerland<br />

the<br />

Large<br />

Hadron<br />

Collider<br />

project<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

CERN Div./Group or Supplier/Contractor Document No.<br />

SL/BI<br />

EDMS Document No.<br />

-<br />

<strong>Preliminary</strong><br />

ENGINEERING SPECIFICATIONS<br />

TTCbi<br />

Date: 2001-11-08<br />

A TIMING, TRIGGER AND CONTROL INTERFACE<br />

FOR THE BEAM SYNCHRONOUS TIMING SYSTEM.<br />

Abstract<br />

Beam Synchronous Timing (BST) is required for beam instrumentation in the LHC accelerator chain.<br />

The Timing, Trigger and Control (TTC) system, designed for LHC detectors, provides a way of distributing the<br />

40MHz bunch clock and Orbit turn clock from the Prevessin Control Room (PCR) to the LHC experiment areas<br />

and to beam instrumentation around the ring and in the transfer lines. In addition we can profit from the TTC's<br />

ability to transmit data by inserting a BST message which can be broadcasted to all instrumentation crates<br />

throughout the TTC distribution network. The TTC interface for beam instrumentation (TTCbi) acts as an<br />

interface between the TTC distribution network and its receiving end users. The TTCbi is designed to recover<br />

the 2 distributed clocks, decode and store all BST messages and make them available to the front-end<br />

electronics controllers. The TTCbi is a PCI Mezzanine Card (PMC). This document is intended to provide a<br />

functional and physical description of the TTCbi for the end user.<br />

Prepared by :<br />

Jean-Jaques SAVIOZ<br />

[SL/CERN]<br />

Jean.Jaques.Savioz@cern.ch<br />

Checked by :<br />

Rhodri Jones [SL/CERN]<br />

Jean-Jacques Gras [SL/CERN]


History of Changes<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Rev. No. Date Pages Description of Changes<br />

0.0 10/12/2001 17 Creation<br />

Page 2 of 18


Table of Contents<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 3 of 18<br />

1. INTRODUCTION.............................................................................. 4<br />

2. TTC SYSTEM OVERVIEW .................................................................. 4<br />

2.1 TTC FRAME FORMAT..................................................................... 4<br />

3. BST SYSTEM OVERVIEW .................................................................. 6<br />

3.1 BST MESSAGE CONTENTS ............................................................ 7<br />

4. TTCBI OVERVIEW ........................................................................... 7<br />

5. FUNCTIONAL DESCRIPTION ............................................................. 8<br />

5.1 ARCHITECHTURE ......................................................................... 8<br />

5.2 OVERALL FEATURES....................................................................10<br />

6. EXTERNAL SIGNALS .......................................................................10<br />

7. BOARD CONFIGURATION ................................................................12<br />

8. MEMORY MAP ................................................................................12<br />

8.1 REGISTERS................................................................................12<br />

9. CONTROL SOFTWARE.....................................................................16<br />

10. REFERENCES.................................................................................17<br />

11. PICTURES .....................................................................................18


1. INTRODUCTION<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 4 of 18<br />

Beam Synchronous Timing (BST) is required for beam instrumentation in the LHC [1]. The Timing,<br />

Trigger and Control (TTC) system [2], designed for LHC detectors, provides a way of distributing the 40MHz<br />

bunch clock and Orbit turn clock from the Prevessin Control Room (PCR) to the LHC experiment areas and<br />

to beam instrumentation around the ring and in the transfer lines [3]. In addition we can profit from the TTC's<br />

ability to transmit data by inserting a BST message which can be broadcasted to all instrumentation crates<br />

throughout the TTC distribution network. The TTC interface for beam instrumentation (TTCbi) acts as an<br />

interface between the TTC distribution network and its receiving end users. The TTCbi is designed to recover<br />

the 2 distributed clocks, decode and store all BST messages and make them available to the front-end<br />

electronics controllers. The TTCbi is a PCI Mezzanine Card (PMC) [4] to be plugged onto a motherboard.<br />

This document document is intended to provide a functional description of the TTCbi for the end user.<br />

2. TTC SYSTEM OVERVIEW<br />

The Timing, Trigger and Control (TTC) system for LHC detectors has been specified and a complete<br />

description of the system and its functionality can be found in reference [2]. However, a brief overview of the<br />

TTC system features that are relevant for the understanding and utilisation of the TTCbi is given here.<br />

The TTC system provides the distribution of all signals necessary to synchronise the detectors: clock, trigger,<br />

and arbitrary control data, which are all distributed on a single optical fibre. The distribution is synchronous to<br />

the LHC bunch structure. Figure 2 illustrates the basic architecture of the TTC system. At the top of the TTC<br />

tree structure, two communication channels are Time Division Multiplexed (TDM), BiPhase Mark (BPM)<br />

encoded and transmitted over a passive optical fibre distribution network using a single laser source. One of<br />

the TDM channels (channel A) is exclusively dedicated to broadcast a global trigger. In our case, this feature<br />

is used to send the orbit turn clock by setting this bit high every time the beam completes a revolution of the<br />

machine. Channel B is used to broadcast data to all or specific system destinations. Data in channel B can<br />

be of two types: broadcast commands or individually addressed commands/data. Broadcast commands will<br />

be used to distribute the BST messages to all TTC destinations in the system. The TTC system is also used<br />

to distribute the LHC 40.08 MHz bunch-crossing reference clock signal. This signal is not explicitly<br />

transmitted over the network and has to be recovered from the incoming frame at each TTC system<br />

destination.<br />

The CERN Microelectronics Group has developed a TTC receiver ASIC (TTCrx) [5] which delivers the TTC<br />

signals to the front-end controllers. The TTCrx can deliver the full range of decoded and deskewed signals,<br />

including all received synchronous commands. The commands/data are implemented in the system to<br />

transmit user-defined data and commands over the network. These commands have two distinct modes of<br />

operation. In the first mode, they are aimed at the TTCrx themselves and their user-defined content can be<br />

used to control the receiver chip’s operation. In the second mode, the data is intended for the external<br />

electronics. In this case, both the data and sub-address contents of the received commands are externally<br />

available.<br />

2.1 TTC frame format<br />

Both the broadcast and the individually addressed commands are transmitted over the TTC network<br />

using a frame format that has been specified in reference [2] and which is schematically represented in<br />

Figure 3. The frame structure contains several fields to control the transmission, and includes a field in which<br />

several redundant bits are inserted for error detection and correction. The coding scheme used is a standard<br />

Hamming code with the capability of double error detection and single bit error correction. The error<br />

correction coding covers the 8-bit data word in the case of a short frame and the 32-bit data in the case of a<br />

long frame. A broadcast of a long frame can be performed by setting the TTCrx address equal to zero. The<br />

address space selection bit (E) instructs the addressed TTC receiver either to execute an internal operation<br />

or to make the received command/data externally available. Using this scheme it is possible to address up to<br />

256 internal and external sub-addresses.<br />

Each frame is identified by a header bit (FMT) that indicates its type. Start (logical “0”) and stop (logical “1”)<br />

bits are always included at the beginning and end of the frame transmission to facilitate correct<br />

synchronisation.


Global Trigger<br />

LHC Clock<br />

General TTC frame:<br />

1<br />

0<br />

ENCODER<br />

MULTIPLEXER<br />

MODULATOR/LASER<br />

1:32 TREE COUPLER<br />

REPEATER<br />

TTCrx<br />

Figure 2 : TTC distribution network<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Global single-mode fibres links<br />

Local multi-mode fibres links<br />

Broadcast Commands<br />

Addressed Commands<br />

- 40.08MHz clock<br />

- Global trigger<br />

- Bunch counter reset<br />

- Bunch crossing number<br />

- Event counter reset<br />

- Event number<br />

- Broadcast commands<br />

- Subaddress<br />

- Addressed commands<br />

IDLE START FMT COMMANDS/DATA CHCK STOP<br />

Short format Broadcast Commands/Data:<br />

0 0 8b CMD/DATA 5b CHCK 1<br />

Long format Broadcast or Individually-Addressed Commands/Data:<br />

0 1 14b TTCrx ADDR E 8b SUBADDR 8b DATA 7b CHCK 1<br />

Figure 3 : TTC Data Transmission frame<br />

Page 5 of 18


ORBIT<br />

TURN CLOCK<br />

CPU<br />

IRQ<br />

RESPONSE<br />

MESSAGE<br />

ASSEMBLER<br />

PROCESS<br />

WRITE<br />

TO FIFO<br />

FIFO OUT<br />

TRIGGER<br />

FIFO<br />

3. BST SYSTEM OVERVIEW<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 6 of 18<br />

The beam synchronous timing system for LHC beam instrumentation serves to synchronise<br />

acquisitions in areas that are very distant geographically, and is also used to convey signals,<br />

parameters and commands simultaneously to all instruments around the machine. All necessary<br />

real-time information is regrouped and transmitted in a so-called BST message.<br />

The complete BST system consists of: a BST Master, used to broadcast the synchronisation<br />

signals and the BST messages; the TTC system, used to encode and transmit the signals; a<br />

receiver interface, the TTCbi, installed in each beam instrumentation controller and which is the<br />

subject of this specification.<br />

A real-time process called the BST message assembler collects all the data and commands to be<br />

transmitted via the TTC system on a given turn. These data and commands are then assembled<br />

into a message of a predefined number of bytes. At each orbit turn clock period, the BST Master<br />

transmits the message for the current turn over channel B of the TTC system.<br />

The BST Master is based on a standard VME crate, including a fast processor, several network<br />

interfaces and a specific TTC module known as the TTCvi [6]. This module acts as the interface<br />

between the BST message assembler and the TTC system, and delivers the necessary A and B<br />

channel signals to the TTC encoder and transmitter. The BST message is alternately stored in one<br />

of the two FIFOs present on the TTCvi, and sent out with a possible phase adjustment on each<br />

Orbit Turn Clock. Figure 4 illustrates the basic architecture and transmission sequence of the BST<br />

Master<br />

In total, three operational BST systems are required, one for each of the LHC rings and another for<br />

the SPS ring and its transfer lines. Separate systems are needed since the revolution frequencies<br />

(and hence the bunch clock and turn clock) of all three are or can be different.<br />

Universal time<br />

Orbit Turn Clock<br />

Machine<br />

Events<br />

Beam<br />

Parameters<br />

Real-time<br />

commands<br />

Hardware<br />

triggers<br />

Phase adjustment<br />

BST<br />

MESSAGE<br />

ASSEMBLER<br />

TTCVI<br />

FIFOs<br />

FIFO 1 FIFO 2<br />

CH A<br />

CH B<br />

Period = 88.9 µs (LHC) ; 23.1 µs (SPS)<br />

Figure 4 : Basic architecture and transmission sequence of BST Master.<br />

TO<br />

TTC Encoder<br />

FIFO 2 FIFO 1 FIFO 2<br />

FIFO 1


3.1 BST Message CONTENTS<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 7 of 18<br />

The size of the BST message is limited by several physical parameters such as the serial<br />

output bandwidth and the duration of message assembly process. A message of 32 Long format<br />

Commands/Data can cover all beam instrumentation needs. The 8-bit sub-address allows 256<br />

identified bytes of data to be sent. Table 1 defines the contents of each byte and its update<br />

frequency. This table is subject to change according to LHC operation or end users requirements.<br />

Bytes Description Data format Updated every<br />

0 Machine Mode Enumerated type: No beam, filling, ramping, physic,… On change<br />

1 Beam Type Enumerated type: Ion, Proton,… On change<br />

2 Beam Energy<br />

3 Beam Energy<br />

2 bytes in GEV On change<br />

4 Mean Current per Bunch<br />

5 Mean Current per Bunch<br />

2 Bytes * 10E11 ppp<br />

6 Number of injected Bunches<br />

7 Number of injected Bunches<br />

2 Bytes integer On change<br />

8 Next Batch to Inject 0 for no beam or 1 .. 12 On change<br />

9 GPS Absolute Time<br />

10 GPS Absolute Time<br />

11 GPS Absolute Time<br />

12 GPS Absolute Time<br />

13 GPS Absolute Time<br />

14 GPS Absolute Time<br />

15 GPS Absolute Time<br />

16 GPS Absolute Time<br />

64 bits UTC format On change<br />

17 Last Machine Timing Event<br />

18 Last Machine Timing Event<br />

2 Bytes : Machine Timing Event number On reception<br />

19 BI Predefined received Events<br />

20 BI Predefined received Events<br />

2 bytes : corresponding to 16 predefined events table On reception<br />

21 Main Trigger Byte 8 X 1 bit dedicated Trigger: warning injection, start post-mortem, … 1 Turn<br />

22 BI devices dedicated Bytes 10 Bytes device dedicated commands or triggers : 1 Turn<br />

23 BI devices dedicated Bytes<br />

24 BI devices dedicated Bytes<br />

25 BI devices dedicated Bytes<br />

26 BI devices dedicated Bytes<br />

27 BI devices dedicated Bytes<br />

28 BI devices dedicated Bytes<br />

29 BI devices dedicated Bytes<br />

30 BI devices dedicated Bytes<br />

31 BI devices dedicated Bytes<br />

Closed orbit capture, Single Turn trajectory measurement,….<br />

Bytes 0 to 20 (the data in blue) come from the new slow timing interface (TGR module) [7] where a<br />

time granularity of 1ms is adequate. Bytes 21 to 31(the data in green), where a time granularity of 1<br />

turn is required, come either from an external trigger (e.g. an injection warning) or a demand from<br />

an operator application process (e.g. a closed orbit acquisition). There is also a possibility of<br />

inserting a time stamp to allow the clear identification of measurements.<br />

4. TTCbi OVERVIEW<br />

The TTCbi is another key component of the BST system, and is the subject of this<br />

specification. It has the task of interfacing the TTC system with the beam instrumentation, and is<br />

found at the end of the TTC distribution network. A PMC format has been chosen for the TTCbi,<br />

allowing it to be plugged into different types of motherboard. Most beam instrumentation<br />

applications will be based on a standard VME bus, and the TTCbi will therefore reside on a<br />

dedicated PMC connector on the CPU itself, giving a direct connection of hardware signals to and<br />

from the VME P2 user I/O connector. The TTCbi is built around the TTC receiver ASIC (TTCrx) [5]<br />

and the basic features of the card depend on this chip. In addition to delivering the timing signals,


PROM<br />

Optical<br />

Input<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 8 of 18<br />

the TTCrx is used to handle the delivery of BST messages to the local CPU. The received<br />

messages are stored in a dual ported memory which is accessible, together with all control<br />

registers, from the CPU via a commercial PCI interface. All the control logic is put in an FPGA with<br />

the possibility of being reprogrammed. As it is not foreseen to install beam instrumentation<br />

controllers in irradiated areas, the TTCbi is not made with radiation-hard materials.<br />

5. FUNCTIONAL DESCRIPTION<br />

5.1 ARCHITECHTURE<br />

Figure 5 shows the architecture of the TTCbi. The core function of the board is enclosed in the<br />

TTCrx circuit. A complete description of the chip and its functionality can be found in reference [5].<br />

TTCrx<br />

Deskewed<br />

CLOCK<br />

L1A trigger<br />

OUT<br />

EVENT<br />

COUNT<br />

Differential<br />

input<br />

SUB ADDR<br />

DATA<br />

I2C<br />

STATUS<br />

JTAG<br />

Coarse Delay<br />

Local<br />

Message<br />

Generator<br />

IRQ MASK<br />

Dual<br />

Ported<br />

Memory<br />

I2C Bus<br />

Interface<br />

PROM<br />

FPGA<br />

Figure 5 : TTCvi Bloc Diagram<br />

Outputs<br />

selection<br />

CONTROL<br />

LOGIC<br />

PCI<br />

Bus<br />

Interface<br />

OUTPUT:<br />

Bunch Clock<br />

Turn Clock<br />

Hardware<br />

Bytes<br />

Front Panel<br />

Leds<br />

&<br />

Diagnostic<br />

PCI<br />

BUS<br />

The incoming optical frame is converted into a differential signal by a photodiode with integrated<br />

pre-amplifier. The TTCrx recovers the 40MHz LHC reference clock with minimum jitter, and can<br />

deskew it in steps of 104ps. The recovery circuit extracts the data stream and demultiplexes the<br />

two channels. Channel A is identified as a Level 1 Trigger and an Event Counter is incremented<br />

each time it occurs. The data in channel B is fed into a serial to parallel converter, which decodes<br />

and sends out the two supported data formats (broadcast or individually addressed message). A<br />

hamming error detection/correction circuit can detect double bit errors, and correct single bit errors.<br />

An I2C interface is used to allow read/write accesses to all internal registers, the status of which<br />

can be read directly from the PCI bus interface. An optional PROM can be use to load pre-defined<br />

register values after a reset.


LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 9 of 18<br />

A key card component is the PCI 9050 high performance bus interface described in reference [8].<br />

The 9050 is configured as a direct data transfer to a 32 bit non-multiplexed local bus, and can<br />

generate a PCI interrupt from a user interrupt request. The local bus is used to access two chips:<br />

1) The PCF8584 I2C bus controller, which serves as an interface between the parallel local bus<br />

and the serial I2C bus for bi-directional connection with the internal registers of the TTCrx. The<br />

control of the I2C bus specific sequences, protocol and timing can be found in reference [9].<br />

2) The XILINX FPGA, where all logic functions are implemented. On reboot, the FPGA<br />

configuration is downloaded from a Flash PROM, which is itself in-situ programmable using a<br />

Boundary-Scan (JTAG port) [10]. All signals from the TTCRx, local bus, output connections, front<br />

panel LEDs and diagnostics are routed to the FPGA I/O ports. The FPGA's configuration is<br />

designed using VHDL code [11], giving the maximum of flexibility for satisfying future requirements.<br />

The TTCbi is currently designed with the following FPGA functionality:<br />

• All received data bytes from the TTCrx are written in the corresponding sub-address of<br />

a dual-ported RAM. The 24-bit turn clock event counter delivered by the TTCrx is<br />

recorded at the beginning of each turn clock period in order to be read by the local<br />

controller together with the RAM contents.<br />

• The TTCrx chip has only a 0 to 375ns coarse delay range. This is insufficient to<br />

compensate for the time of flight of particles to different locations around the<br />

accelerators. Hence a local turn clock delay has been added to allow a 25 ns step<br />

delay of up to 88.9µs for the LHC and up to 23.1µs for the SPS, corresponding to one<br />

revolution period respectively in each machine.<br />

• Four programmable Two Data Bytes, called "hardware", selected among the received<br />

message can be sent directly to the hardware connector together with the two main<br />

clocks (bunch and turn clocks), synchronous with the rising edge of the Local Delayed<br />

Turn Clock. Two 8-bit registers are used to define the two sub-addresses of the data<br />

bytes to be sent.<br />

• 8-bit mask registers are used to control interrupt generation to the local controller. Two<br />

of these masks are used to identify the two possible sub-addresses at which the data<br />

which will generate the interrupt is to be found. Each of these sub-addresses then has<br />

its own specific data mask to generate the interrupt. An interrupt will be generated if at<br />

least one of the bits of the mask is present in the data byte of a received command<br />

corresponding to the appropriate sub-address. When an interrupt is generated, the<br />

overwriting of dual port memory is stopped after storing the current message, and is<br />

only restarted after the message has been read.<br />

• Three 16-bit counters are used to record single-bit, double-bit and transmission errors<br />

detected by the TTCrx. In case of double-bit or transmission detection, the<br />

corresponding command is rejected.<br />

• In the absence of the optical signal, an internal Message Generator can locally<br />

simulate a sequence of up to 32 preloaded commands with the associated timing<br />

signals. The sequence can be generated either once (Single-shot mode) or on every<br />

simulated local turn clock (Repetitive mode).<br />

• A global control / status register, detailed in section 5.5, allows the remote control of<br />

the board.<br />

• The front panel, detailed in section 5.6, regroups three main signals and 8 indicator<br />

LEDs, to give an overview of the board status.<br />

• For test and debugging purposes, the 40 MHz clock and 16 control signals detailed in<br />

section 5.3 are routed to a test connector where a logic state analyser such as the<br />

HP16500 series can be attached.


5.2 OVERALL FEATURES<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 10 of 18<br />

• PMC slave card conforming to the IEEE P1386.1 standard.<br />

• Provides Beam Synchronous Timing for both the LHC and SPS accelerators.<br />

• Supplies the 40.08 MHz Bunch Clock, which remains synchronous with the bunch structure.<br />

• Supplies the Local Turn Clock, corresponding to the orbit frequency. Locked either at 1/924 of<br />

the bunch frequency for SPS or 1/3564 of the bunch frequency for LHC.<br />

• Local delays provide Local Clocks with the appropriate phase relative to the beam structure,<br />

taking into account the difference between particle time-of-flight and signal propagation.<br />

• The overall jitter of the received clocks anywhere around the rings is less than 1ns rms.<br />

• A BST message consists of 32 BST commands within the 88.9 µs of an LHC period or up to 8<br />

BST commands within the 23.1 µs of an SPS period.<br />

• A BST command contains 2 bytes: a sub address or identifier, and its associated data byte.<br />

• Two predefined Data Bytes among the 32 sub-addresses can be routed to a hardware<br />

connector.<br />

• All the received commands are stored in a dual-ported RAM accessible by the local controller.<br />

• According to the PCI local bus specification, the TTCbi uses 256 bytes of configuration space.<br />

• All control registers and dual-ported RAM are mapped into the PCI memory or I/O spaces.<br />

• A PCI interrupt request can be generated on reception of a specific message or on error.<br />

• A local clock signal generator and up to 32 byte BST command message generator allows the<br />

TTCbi module to run in stand-alone mode for test purposes.<br />

• Optical Input, main timing signal outputs and indicator leds are available on the front panel.<br />

• All output signals are available on the 64 pin PMC I/O to be routed to the 64 pin I/O of the VME<br />

P2.<br />

• A PMC Connector supplies the following standard power supply from the VME motherboard:+<br />

5 V Max 1A ; + 3.3 V Max 1A ; + 12V and - 12v (not used ).<br />

6. EXTERNAL SIGNALS<br />

Front Panel: The only required connection is TTC IN, all other signals and LEDs are for test purposes.<br />

Item: Description:<br />

TTC IN TTC Optical signal input : ST-PC connector on HFBR-2316T Receiver.<br />

Optical input power : operating range -22 dBm .... -18 dBm.<br />

CH B Serial Channel B, buffered output from TTCrx : Lemo 00 connector ; TTL level / 1 MΩ .<br />

LED is ON when CH B =1.<br />

LTC Local delayed Turn Clock, buffered output: Lemo 00 connector; 25ns. pulse / 2V / 50Ω<br />

From TTCrx L1 trigger in external mode or local generator in internal mode.<br />

LED is ON when LTC is present.<br />

40M Local 40 MHz Clock, buffered output: Lemo 00 connector ; square pulse / 2V. / 50 Ω .<br />

From TTCrx CKD1 in external mode or local generator in internal mode.<br />

LED is ON when 40M is present.<br />

ACCESS LED is ON when any registers are accessed from the PCI bus.<br />

MESS IN LED is ON when a message is received from TTCrx or local generator.<br />

INTERNAL LED is ON when internal mode is set in the global control register.<br />

TTC RDY LED is ON when TTCrx ready status = 1.<br />

RESET LED is ON when a local reset from PLX is present.


LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Hardware connector: Signals are connected to the 32 pin PMC J4 to be routed to the VME P2.<br />

J4 Pin: P2 Pin: Signal description:<br />

33 C17 Local 40 MHz Clock buffered output : square pulse LVDS +<br />

34 A17 " " LVDS -<br />

35 C18 Local 40 MHz Clock, buffered output : square pulse TTL<br />

36 A18 GND<br />

37 C19 Local delayed Turn Clock, buffered output: 25 ns pulse LVDS +<br />

38 A19 " " LVDS -<br />

39 C20 Local delayed Turn Clock, buffered output: 25 ns pulse TTL<br />

40 A20 GND<br />

41 C21 Spare<br />

42 A21 Spare<br />

43 C22 Spare<br />

44 A22 Spare<br />

45 C23 Hardware Byte 0 bit 0, output TTL . Valide on 40 MHz rising edge.<br />

46 A23 " bit 1, " "<br />

47 C24 " bit 2, " "<br />

48 A24 " bit 3, " "<br />

49 C25 " bit 4, " "<br />

50 A25 " bit 5, " "<br />

51 C26 " bit 6, " "<br />

52 A26 " bit 7, " "<br />

53 C27 Hardware Byte 0 strobe, output TTL . Valide on 40 MHz rising edge.<br />

54 A27 GND<br />

55 C28 Hardware Byte 1 bit 0, output TTL . Valide on 40 MHz rising edge.<br />

56 A28 " bit 1, " "<br />

57 C29 " bit 2, " "<br />

58 A29 " bit 3, " "<br />

59 C30 " bit 4, " "<br />

60 A30 " bit 5, " "<br />

61 C31 " bit 6, " "<br />

62 A31 " bit 7, " "<br />

63 C32 Hardware Byte 1 strobe, output TTL MHz Valide on 40 rising edge.<br />

64 A32 GND<br />

Page 11 of 18<br />

Test header J1: To be used for test and debugging purposes. Will fit the HP1600 Logic State<br />

Analyser, for which a number of acquisition setups already exist. The 16 signals and the clock are<br />

routed from the XILINX chip output port and can be selected from amongst all internal signals<br />

according to the user request (see example below).<br />

Pin POD Signal Description<br />

3 CLK CK40M : Clock correspondiing to the signal send to hardware connector<br />

4 D15 L_CS0 : Local chip select 0 from PCI9050: Active L<br />

5 D14 Data_OUT(0) : LSB of local data bus output<br />

6 D13 Turn_Count_Reg(0) : LSB of local turn counter register<br />

7 D12 T_BCNT(0) : LSB of Bunch count number from TTCrx<br />

8 D11 T_EVCNTR : Event counter reset from TTCrx ; Active H<br />

9 D10 T_EVCNTL : Event counter strobe LSB from TTCrx ; Active H<br />

10 D9 T_EVCNTH : Event counter strobe MSB from TTCrx ; Active H<br />

11 D8 L_WRITE : Local Write from PCI9050 ; Active L<br />

12 D7 L_READ: Local Read from PCI9050 ; Active L<br />

13 D6 Mess_Out_En : Enable hardware mess out active H<br />

14 D5 M_DStr : Message Data strobe into dual ported RAM; Active H<br />

15 D4 M_Data(0) : LSB of Message data writted into dual ported RAM


LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

16 D3 M_SAddr(0) : LSB of Message subadress writted into dual ported RAM<br />

17 D2 L_DoutStr : Data strobe from local message generator; Active H<br />

18 D1 L_Mess_Data(0): LSB of local message<br />

19 D0 LTC: Turn Clock correspondiing to the signal send to hardware connector<br />

20 GND<br />

JTAG header J2: To be used for downloading the FPGA configuration using a JTAG [11] port.<br />

Strap settings:<br />

Pin1 : GND Pin4 : TCK<br />

Pin2 : TDI Pin5 : TDO<br />

Pin3 : TMS Pin6 : VCC<br />

7. BOARD CONFIGURATION<br />

Page 12 of 18<br />

• ST2 : TTCrx configuration mode.<br />

PROM = Configuration downloaded from XC1736 PROM on power-on or TTC reset.<br />

NO PROM = Default configuration or downloaded from I2C bus or TTC commands.<br />

• ST3 : To perform a direct access to XCV50 JTAG[10] port. Used only for debugging.<br />

ON = bypass XC18V01 PROM in JTAG [10] chain.(For test only)<br />

OFF = Setting for normal use.<br />

• ST4 : PCI 9050 interface access control.<br />

ON = Enable PCI bus access ( Normal mode)<br />

OFF = Disable PCI bus access ( For test only)<br />

• ST5, ST6, ST7: XCV50 configuration mode M1, M0, M2 (see XILINX specifications.)<br />

ON OFF OFF = Configuration downloaded from JTAG[10] port J2.(For test only)<br />

ON ON ON = Configuration downloaded from XC18V01 flash PROM. (Default)<br />

The configuration is first downloaded into the PROM using the JTAG[10] port, then transferred to<br />

the XCV50 on next power-on, or by setting the reprogram bit of global control register.<br />

• ST8 : 3.3V power supply source according to the PCI specification [12].<br />

P3V3 = from PMC connector (if provided by mother board.)<br />

P3V3A = from on-board TPS767D325 regulator.<br />

8. MEMORY MAP<br />

All PCI accesses are 16 or 32 bits, using the 33MHz PCI clock with 128 Mbytes/sec block transfer<br />

capability. The PCI interface is constructed using a low price PCI 9050 target interface from PLX. [8]. As<br />

for all PCI devices, the TTCbi has 256 bytes of configuration space. System software may, on reboot,<br />

scan the configuration space to determine the device identification and parameters. One of the most<br />

important parameters is the base address, which maps the device into the PCI address space.<br />

The TTCbi uses 4 blocks of address space defined in the configuration register as follow:<br />

Block 0 : PLX Local Configuration registers mapped into 128 bytes of memory address space.<br />

Block 1 : PLX Local Configuration registers mapped into 128 bytes of I/O address space.<br />

Block 2 : FPGA internal registers and memories mapped into 1K bytes of memory address space.<br />

Block 3 : I2C interface registers mapped into 8 bytes of I/O address space.<br />

8.1 REGISTERS<br />

On power ON, the PCI 9050 registers are initialised using a serial EEPROM type National<br />

NM93CS46 and can be accessed in block 0 or 1.


EEPROM<br />

Byte<br />

Initial<br />

VALUE<br />

Destination<br />

Registre Description<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

00 01 90 50 PCI 02h Device ID. 9050<br />

02 03 10 B5 00h Vendor ID. 10B5<br />

04 05 06 80 0Ah Class Code.<br />

06 07 00 00 08h Class code revision (is not loadable)<br />

08 09 90 50 2Eh Subsystem ID. 9050<br />

0A 0B 10 B5 2Ch Subsystem Vendor ID. 10B5<br />

0C 0D 00 00 3Eh Maximum Latency and Minimum Grant (not loadable)<br />

0E 0F 01 01 3Ch Interrupt Pin (Interrupt Line is not loadable)=01xx<br />

10 11 0F FF LOCAL 02h MSW of Range for PCI to Local Address Space 0<br />

12 13 FC 00 00h LSW = 1k Bytes Mem SPACE FOR FPGA<br />

14 15 0F FF 06h MSW of Range for PCI to Local Address Space 1<br />

16 17 FF F9 04h LSW = 8 Bytes IN I/O SPACE FOR I2C<br />

18 19 00 00 0Ah MSW of Range for PCI to Local Address Space 2<br />

1A 1B 00 00 08h LSW NOT USED<br />

1C 1D 00 00 0Eh MSW Range for PCI to Local Address Space 3<br />

1E 1F 00 00 0Ch LSW NOT USED<br />

20 21 00 00 12h MSWRange for PCI to Local Expansion ROM (64 KB).<br />

22 23 00 00 10h LSW NOT USED<br />

24 25 00 00 16h MSW Local B.A.(Remap) for PCI to Local Add Space 0<br />

26 27 00 01 14h LSW LOCAL Base Addr = 0 ; + 1 = direct slave<br />

28 29 00 00 1Ah MSW Local B.A.(Remap) for PCI to Local Add Space 1<br />

2A 2B 04 01 18h LSW LOCAL Base Addr = 400h ; + 1 = direct slave<br />

2C 2D 00 00 1Eh MSW Local B.A.(Remap) for PCI to Local Add Space 2<br />

2E 2F 00 00 1Ch LSW NOT USED<br />

30 31 00 00 22h MSW Local B.a.(Remap) for PCI to Local Add Space 3<br />

32 33 00 00 20h LSW NOT USED<br />

34 35 00 00 26h MSW of Local B.A.(Remap) for PCI to Local Exp. ROM.<br />

36 37 00 00 24h LSW NOT USED<br />

38 39 54 91 2Ah MSW of Bus Region Descriptors for Local Add Space 0<br />

3A 3B 28 80 28h LSW32 b;No Burst;No wait<br />

3C 3D FC 27 2Eh MSW of Bus Region Descriptors for Local Add Space 1<br />

3E 3F 7B 80 2Ch LSW :08 b;NoBurst;+wait=10,1,3,10,0;+delay=1,1,1<br />

40 41 00 00 32h MSW of Bus Region Descriptors for Local Add Space 2<br />

42 43 00 00 30h LSW NOT USED<br />

44 45 00 00 36h MSW Bus Region Descriptors for Local Add Space 3<br />

46 47 00 00 34h LSW NOT USED<br />

48 49 00 00 3Ah MSW Bus Region Descriptors for Expansion Space<br />

4A 4B 00 00 38h LSW NOT USED<br />

4C 4D 00 00 3Eh MSW of Chip Select (CS 0) Base and Range Register.<br />

4E 4F 02 01 3Ch LSW : Enable 1 KB at addr 0 for XILINX pga.<br />

50 51 00 00 42h MSW of Chip Select (CS1 ) Base and Range Register.<br />

52 53 04 09 40h LSW : Enable 8 By at addr 400h for I2C interface.<br />

54 55 00 00 46h MSW of Chip Select (CS2 ) Base and Range Register.<br />

56 57 00 00 44h LSW NOT USED<br />

58 59 00 00 4Ah MSW of Chip Select (CS3 )Base and Range Register.<br />

5A 5B 00 00 48h LSW NOT USED<br />

5C 5D 00 00 4Eh MSW of Interrupt Control/Status Register.<br />

Page 13 of 18


LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

5E 5F 00 41 4Ch LSW Enable IRQ1 active low<br />

60 61 00 20 52h MSW EEPROM Control Register:ready delay =32 clks<br />

62 63 0C 00 50h LSW User 0,2,3= Out active low; User 1 =In<br />

64 .. XX XX NOT USED<br />

Page 14 of 18<br />

After initialisation, the PCI interface allows access to the non-multiplexed 32-bit local bus. Burst or<br />

continuous single cycle in Big Endian (no swapping) is used.<br />

The PCI Interrupt A can be requested using Local Interrupt 1 and 2 from XILINX FPGA.<br />

Direct slave access of 1 Kbytes in the Local Address Space 0 allows access to all registers and<br />

dual-ported RAM of Xilinx FPGA.<br />

Item R W Add Size Byte 3 Byte 2 Byte 1 Byte 0 Comments<br />

Control W 0 Byte xxxxxxx xxxxxxx xxxxxxx Control See details below<br />

Control & Status R 0 Word xxxxxxx xxxxxxx Status Control "<br />

Coarse Delay R/W 4 Word xxxxxxx xxxxxxx bit 11 …. 0 25 ns step delay<br />

Hardware Bytes Select R/W 8 Word xxxxxxx xxxxxxx Byte 1 Byte 0 0…255 ; 0…255<br />

Hardware Bytes Output R C Word xxxxxxx xxxxxxx Byte 1 Byte 0 read back outputs<br />

IRQ Bytes Addr Select R/W 10 Word xxxxxxx xxxxxxx Byte 1 Byte 0 0…255 ; 0…255<br />

IRQ Bytes Addr Mask R/W 14 Word xxxxxxx xxxxxxx Byte 1 Byte 0 00…FF ; 00...FF<br />

Single TTC Error count R/W 20 Word xxxxxxx xxxxxxx 16 bit counter Reset on write<br />

Double TTC Error count R/W 24 Word xxxxxxx xxxxxxx 16 bit counter Reset on write<br />

Ready TTC Error count R/W 28 Word xxxxxxx xxxxxxx 16 bit counter Reset on write<br />

Turn Clock Count R/W 30 LWord xxxxxxx 24 bit counter Reset on write<br />

Local Message : R/W 80 Word xxxxxxx xxxxxxx Sub Add Data Cmd 0<br />

= 32 Commands R/W 84 Word xxxxxxx xxxxxxx Sub Add Data Cmd 1<br />

R/W 88 Word xxxxxxx xxxxxxx Sub Add Data Cmd 2<br />

.. …. …. xxxxxxx xxxxxxx …. … …<br />

R/W FC Word xxxxxxx xxxxxxx Sub Add Data Cmd 31<br />

DP Ram Mess Input R 100 Lword Cmd 3 Cmd 2 Cmd 1 Cmd 0 CmdData @ SubAdd<br />

= 256 Commands R 101 Lword Cmd 7 Cmd 6 Cmd 5 Cmd 4 “<br />

R 102 Lword Cmd 11 Cmd 10 Cmd 9 Cmd 8 “<br />

… … … ….. …. …. …. “<br />

R 1FC Lword Cmd255 Cmd254 Cmd253 Cmd252 “<br />

Control Register: bit 0 Internal mode = 1 ; External mode = 0 ( Default); 1 = local 40MHz on<br />

bit 1 Sub mode : Single shot = 1; Repetitive = 0 ( Default)<br />

bit 2 DP Ram Write Control : Enable = 1;<br />

bit 3 Hardware Bytes Output Control : Enable = 1<br />

bit 4 IRQ from Masks control : Enable = 1<br />

bit 5 IRQ from Masks control : Clear Request = 1<br />

bit 6 SPS = 1; LHC = 0 ( For diff. Bunch count )<br />

bit 7 Spare<br />

Status Register: bit 0 TTC Input Ready = 1 ; 0 = No Input signal<br />

bit 1 1 = Local 40MHz present<br />

bit 2 1 = Local Turn Clock present<br />

bit 3 1 = TTC Serial B input signal present<br />

bit 4 1 = TTC Frame error<br />

bit 5 1 = Message record<br />

bit 6 1 = IRQ set from Masks<br />

bit 7 Spare


LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 15 of 18<br />

Direct slave access in the Local Address Space 1 of 8 bytes allows accessing all the PCF8584 I2C<br />

bus controller registers. The PCF8584 [9] has 5 internal registers but occupied only two byte locations.<br />

Register selection between the control/status register S1 and the other registers depending on bits loaded in<br />

ESO, ES1 and ES2 of register S1.<br />

Item R/W ADD h Access Byte 0 Comments<br />

Data Reg R/W 00 Byte Data Register Depends on ES2, ES1, ES0<br />

Control Reg S1 W 04 Byte Control See details below<br />

Status Reg S1 R 04 Byte Status "<br />

Control Register S1 : bit 0 Automatic Acknowledgement = 0 in master mode<br />

bit 1 Stop transmission = 1<br />

bit 2 Start transmission = 1<br />

bit 3 Enable Interrupt = 0 ( No irq )<br />

bit 4 ES2<br />

bit 5 ES1<br />

bit 6 ES0<br />

bit 7 Reset all status registers = 1<br />

Status Register S1 : bit 0 BB = 1 : Bus Busy ( in use)<br />

bit 1 LAB = 1 : Loss Arbitration<br />

bit 2 AAS = 1: Addressed As Slave<br />

bit 3 LRB = 1 : Last Received Bit<br />

bit 4 BER = 1: Bus error detected<br />

bit 5 STS = 1 : stop receive detected<br />

bit 6 X = Not used<br />

bit 7 PIN = 0 when transmission is completed<br />

The default Interface Mode Control (8080 type) is used (separate Write & Read without dtack),<br />

along with master transmitter / receiver mode without interrupts.<br />

On reset all registers are set by default to the required values:<br />

Register S0’ = 0 : PCF8584 Own I2C address = 0;<br />

Register S2 = 0 : Serial Clock frequency = 90 KHz ; System clock frequency = 3 MHz.<br />

The I2C bus is used to read or write the TTCrx user accessible registers listed below. According to<br />

the I2C bus specification [13], the TTCrx device on the bus is addressed by a 7bit wide address.<br />

The TTCrx chip occupies two consecutive positions in the I2C address space. The I2C address is<br />

derived from the device base address register in the following way:<br />

I2C access register : Resulting I2C address :<br />

TTCrx Register Address pointer Device Base Address * 2<br />

TTCrx Register Data Device Base Adress *2 + 1<br />

On power on, all registers are initialised to a default value before ten specific registers are loaded<br />

with the contents of the optional XC1736 EPROM as defined below.


LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 16 of 18<br />

register<br />

Content<br />

Value<br />

From Prom<br />

Address TTCrx Register name [5] after reset prom: add: Comments:<br />

0Fine Delay 1 0 12 0 Default for test<br />

1Fine Delay 2 0 0 1 not used<br />

2Coarse Delay 0 0 2 not used<br />

Enable : CKD1, SerialB,<br />

3Control 10010011 72 3 L1Accept, EventCount<br />

8Single error count 0<br />

9Single error count 0<br />

10Double error count 0<br />

11SEU error count 0<br />

16 ID 0 0 4 Default TTC Address =0<br />

Set master modeTCC add =<br />

17MasterModeA, ID 0 0 5 0<br />

MasterModeB, I2C_ID<br />

Set master mode I2C Add =<br />

18<br />

0 1 6 1<br />

19Config 1 10 2 7 Default value<br />

20Config 2 10000100 84 8 Default value<br />

21Config 3 10100111 A7 9 Default value<br />

22Status 11100000<br />

24Bunch Counter Bits 0<br />

25 “ 0<br />

26Event Counter Bits 0<br />

27 “ 0<br />

28 “ 0<br />

9. CONTROL SOFTWARE<br />

In order to use the TTCbi board in the LHC BI Front Ends, a dedicated driver, the<br />

corresponding library as well as a local and remote test programs will be developed by<br />

the SL-BI software section.<br />

The resulting interface will allow the user to:<br />

– configure its TTCbi (mainly select the bytes redirected to P2 and CPU<br />

interrupts).<br />

– read asynchronously the generic information available like the beam intensity,<br />

energy, the GPS time or the internal error registers…<br />

– subscribe to interruptions generated by the TTCbi card.<br />

This software will be made available for every operational platforms (CPU and Real<br />

Time OS) used by SL-BI. Today, this is limited to PowerPC CPUs running LynxOS3.1.<br />

A first version of this software limited to the functionalities available in the SPS BST<br />

Master will be available around the 2002 start-up. It will be documented in a dedicated<br />

technical specification and available during Q2 2002 in the SL-BI software section<br />

EDMS repository for LHC software<br />

[http://edmsoraweb.cern.ch:8001/cedar/navigation.tree?cookie=872506&p_top_id=1<br />

598559859&p_top_type=P].


10. REFERENCES<br />

[1] LHC Timing Requirements<br />

Gary BEETHAM SL/CO et al.<br />

http://lhc-proj-timwg.web.cern.ch/lhc-proj-timwg<br />

[2] Timing, Trigger and Control (TTC) Systems for LHC Detectors<br />

Bruce TAYLOR EP/CMD<br />

http://ttc.web.cern.ch/TTC/intro.html<br />

[3] LHC Machine Timing Distribution for the Experiments<br />

B.G. Taylor EP/CMD<br />

http://ttc.web.cern.ch/TTC/intro.html<br />

[4] PMC specification IEEE standard P1386.1<br />

http://pcisig.com<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 17 of 18<br />

[5] TTCrx Reference Manual: A Timing,Trigger and Control Receiver ASIC for LHC Detectors<br />

J.Christiansen EP/MIC et al.<br />

[6] TTC-VMEbus Interface (TTCvi) EP 680-1128-050-C<br />

P.Farthout, P.Gallno EP/ATE<br />

[7] THE LHC Machine TIMING SYSTEM FUNCTIONAL SPECIFICATION<br />

Gary BEETHAM SL/CO et al.<br />

[8] PLX PCI 9050-1 Data Book; Version 1.02; December 1999 :<br />

http://www.plxtech.com<br />

[9] PCF8584 I2C-bus controller; Product specification ;<br />

http://www.semiconductors.philips.com<br />

[10] JTAG / Boundary scan IEEE 1149.1 standard.<br />

[11] Very high speed integrated circuit Hardware Description Language. IEEE 1164 standard.<br />

[12] PCI Local Bus Specification Revision 2.2 December 18, 1998.<br />

[13] The I2C BUS SPECIFICATION Version 2.0 December 1998


11. PICTURES<br />

Component side:<br />

Wiring side:<br />

LHC Project Document No.<br />

LHC-BI-ES-XXXX.XX rev 0.0 Draft<br />

Page 18 of 18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!