THIS MANUAL IS INCOMPLETE but what is written here should be more accurate and up to date than the old "functional specification". Please e-mail me if you find mistakes/omissions here (Eric H).

See Also

Contents

DAQ Outputs

The AMC13 implements the S-Link Express protocol using a core provided by CMS CDAQ. This is currently a 5.0Gb/s link, received by the FedKit (see CMSFedkitManual) or by an AMC13v1 (Virtex-6 version only) running special firmware version 0xff.

The AMC13 has 3 SFP transceivers which may be used for DAQ. There are 3 possible configurations, determined by the value written to CONF.SFP.ENABLE_MASK. In addition, CONF.EVB.ENABLE_DAQLSC must be set to '1'. The AMC13Tool2 command daq may be used to accomplish this configuration.

Configuration Mask value Notes
SFP0 only 1 (top) DAQ fiber for AMC1-AMC12 readout
SFP0, 1 3 SFP0 for AMC1-AMC6, SFP1 for AMC7-AMC12
SFP0, 1, 2 7 SFP0 for AMC1-AMC4, SFP1 for AMC5-AMC8, SFP2 for AMC9-AMC12

After changing the DAQ output configuration the logic and high-speed transceivers must be reset by writing to ACTION.RESETS.DAQ (AMC13Tool2 command rd).

TTS

The TTS (Trigger Throttling System) output from the AMC13 is a four-bit code transmitted over the transmit half of the bottom SFP fiber transciever, and is normally sent to the TCDS system to control the trigger rate in response to pending buffer overflows. This system is intended to be logically compatible with the legacy system documented HERE.

The AMC13 outputs the TTS state as the four-bit code described in the link above:

0000 Disconnected Hardware Failure or broken cable
0001 Overflow Warning Imminent buffer overflow
0010 Sync Lost AMC13 is not synchronized with DAQ due to buffer overflow
0100 Busy Cannot accept triggers
1000 REady Ready to accept triggers
1100 Error Any other state that prevents functioning
1111 Disconnected Hardware failure or broken cable

Any time the AMC13 is not in run mode (such as after power up) the AMC13 sends state "0100" (busy).

Internally the AMC13 manages the TTS state using a 5 bit internal format; this is exposed in a few monitoring registers. This format should be decoded as text in the latest AMC13 software, but is documented here for completeness:

Bit 4 Disconnected
Bit 3 Error
Bit 2 Sync Lost
Bit 1 Busy
Bit 0 Overflow Warning

(A value of 0 means "ready")

The TTS state is sent over the same 5.0Gb/s link as the DAQ data. There's an input port in our link logic on the AMC side:

-- TTS port
    TTSclk            : in  std_logic;  -- clock source which clocks TTS signals
    TTS               : in  std_logic_vector (3 downto 0);

When the TTS state changes, a control word is sent across the link to transfer the information with minimum latency to the AMC13. The final TTS output state is simply a priority encoding of the 12 AMC states plus the local AM13 one.

TTC Simulator

The AMC13 has the ability to generate simulated TTC signals and distribute them to AMC cards in the crate. This allows operation of a stand-alone test setup with only an AMC13 and AMC cards in a single crate without requiring any external TTC hardware. The simulated TTC signal will include a BC0 sent once per LHC orbit. In addition, ECR (event count reset) and OCR (orbit count reset) TTC commands may be sent by writing to the ACTION.LOCAL_TRIG.SEND_ECR and ACTION.LOCAL_TRIG.SEND_OCR registers, respectively.

N.B. the OCR and ECR mentioned above will not be reflected in the AMC13 registers until after the next L1A, as the current EvN and OrN in the AMC13 are not visible; they are used only to stamp an event in in response to L1A.

Locally-generated triggers may be sent in a rather flexible way. See the next section for details.

The simulated TTC signal is transmitted on the output side of the TTC SFP optical transceiver and must be received on the input side, so a short loop-back cable must be plugged between the input and output sides of the bottom SFP.

This feature is enabled by setting CONF.DIAG.FAKE_TTC_ENABLE to 1. The local L1A generator must also be enabled (CONF.TTC.ENABLE_INTERNAL_L1A set to 1).

The TTC commands generated by the TTC simulator are as follows

BC0 1 Bunch Count Reset (sent every orbit) CMS standard?
EC0 3 Event Count Reset (send at the start of each lumisection to set the EvN to 1) Bit 1 set = CMS standard?
OC0 9 Orbit Count Reset - reset orbit count to 0 HCAL-specific ?

These are taken originally from this table maintained by HCAL:

Local L1A Generator

This feature allows the AMC13 to generate L1A and transmit them over the TTC backplane signals to AMC cards. It may be used in conjunction with the TTC Simulator described above, or with an external TTC input.

There are 4 modes of operation available:

  • Individual triggers under software control
  • Burst with count and spacing in BX or orbits specified
  • Continuous triggers equally spaced by BX or orbits
  • Random triggers from 2Hz to about 130kHz rate with CMS trigger rules respected

Various registers are used to control the local L1A generator. The easiest way to control this feature is using the method AMC13::configureLocalL1A() in the AMC13 class. Then, call AMC13::sendL1ABurst() to send a single software-triggered burst, or AMC13::startContinuousL1A() and AMC13::stopContinuousL1A() to start or stop continuous triggers.

AMC13::configureLocalL1A( bool ena, int mode, uint32_t burst, uint32_t rate, int rules) documentation:

Parameter Description
ena true to enable the L1A generator
mode 0 - periodic triggers spaced by rate orbits at BX=500
1 - periodic triggers spaced by rate bx
2 - random trigger at 2* rate Hz
burst number of triggers in a burst (1-4096)
rate sets the rate based on mode (1-65536)
rules set to 0 normally to enforce the "standard" CMS trigger rules

Brief register-level documentation follows. Register at offset 0x1c controls the local L1A generation through the following bit fields:

  • CONF.LOCAL_TRIG.RATE sets the rate or spacing (0 means spacing=1)
  • CONF.LOCAL_TRIG.NUM_TRIG sets the burst count (0 means count=1)
  • CONF.LOCAL_TRIG.TYPE is the mode (0 for orbit, 2 for BX, 3 for random)
  • CONF.LOCAL_TRIG.RULES specifies which CMS trigger rules are followed

Rule 1 is always enforced. The rules parameter to AMC13::configureLocalL1A or the CONF.LOCAL_TRIG.RULES item may be set as follows to suppress other rules:

  • 0 means enforce all rules (1-4)
  • 1 means all except rule 4
  • 2 means enforce rules 1 and 2
  • 3 means enforce only rule 1

TTC History Capture

This feature added to the T2 (Spartan) firmware starting in version 0x26 allows the capture of up to 512 TTC short-format broadcast commands in a buffer. The commands may originate in the AMC13 itself (if the TTC simulator is being used) or received externally on the TTC fiber input.

A filter feature is provided which checks incoming commands against a list of up to 16 entries, and if a match is found the command is discarded rather than being stored in the history.

Each filter item has the following 3 fields:

  bits 0-7   TTC command value to match
  bits 8-15  Mask applied before match.  '1' to ignore specified bit
  bit 16     This filter item is enabled if '1'

Several C++ functions are provided which are briefly listed below. See the nightly API documentation for details.

    void setTTCHistoryEna( bool ena);                      // enable/disable history capture
    void setTTCFilterEna( bool ena);                       // enable/disable history filter
    void setTTCHistoryFilter( int n, uint32_t filterVal);  // set individual filter item
    uint32_t getTTCHistoryFilter( int n);                  // get individual filter item
    void clearTTCHistoryFilter();                          // clear entire filter list
    void clearTTCHistory();                                // clear capture history (reset count)
    void getTTCHistory( uint32_t* buffer, int nhist);      // get TTC history list (READ DOCS)
    int getTTCHistoryCount();                              // get TTC hsitory count

External Clock / Trigger Inputs (g-2)

The following section applies only to the g-2 firmware series (Kintex 0x8000 and up). The AMC13 clock and external trigger can come from one of 3 sources (optical fiber, internal or external copper signal). The choices are enumerated in the following table.

Clock Source Trigger Source Hardware T2 0xd bit 30 T1 0x1 bit 8 T1 0x1 bit 2
Internal Internal Loop-back fiber (Note 1) 0 1 1
Fiber Internal Fiber with TTC input 0 0 1
Lemo Internal Special T3 with clock input 1 0 1
Lemo Lemo Special T3 with clock, trig inputs 1 0 0

Notes:

  1. SFP transceiver with loop-back fiber from Tx to Rx must be installed in bottom site

-- EricHazen - 20 Aug 2014

Edit | Attach | Watch | Print version | History: r43 | r14 < r13 < r12 < r11 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r12 - 11 Feb 2015 - EricHazen
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback