You are here: Hades Wiki>DaqSlowControl Web>HowTo>DescriptionOfTDC (revision 1)EditAttach
TDC is connected with FPGA thru two interfaces:
  • JTAG
  • Parallel

JTAG interface

It is used for programming status register and control register of TDC's. To enable JTAG interface it has to be enabled in FPGA register.

./rwv2 w 0 6 1

After this coresponding lines are connected as below(part of VHDL code):
"...    TDC_TMS                        <= ETRAX_DATA_BUS_C(1);
        TDC_TCK                        <= ETRAX_DATA_BUS_C(2);
        TDC_TDI                        <= ETRAX_DATA_BUS_C(3);
        ETRAX_DATA_BUS_C(0)            <= TDC_TDO; ..."<BR>
TDC's are in JTAG chain. * JTAG chain:
JTAG chain

If one of the TDC's fail then it is possible by putting some jumpers(J24,25,26) and removing resistors(R113,114,115) to exclude this TDC from the chain.

For programming setup and controls registers inside the TDC two kinds of files are needed. This files are written in STAPL language. This is special language for JTAG interface. For making life easier perl script was created. This script is creating this files automaticly. It is placed in: /home/hadaq/progtdc/make_jam.pl (or on nfs server /progtdc/make_jam.pl) In this directory there is two subdirectories:
  • outdata
  • config
In config subdirectory there is TRB_TDC_settings.conf. In this file it is possible to change windows in the tdc, enable disable channels. From the outdata folder, script which is starting whole data acquisition should take files for TDC programming. In future all parameters should be placed in TRB_TDC_settings.conf(how many additional data, what kind of trigger, watermark, destination IP ...)
Sample TRB_TDC_settings.conf:

# This is a configuration file with new settings for TRBs and TDCs.
# It provides special settings for TRBs, channels on/off and windows for TDCs.
# 'enable_channel' => index of channel (0,2,..,4:9,..) => 1/0 (on/off)
# This file is read by make_jam.pl
#
# All TDC values are in ns, granularity is 25ns
# trigger_count_offset : time from digital trigger (+250ns) to opening of
#                           window. This window has to be larger than
#                           matching_window + 50ns + pulse_length
# matching_window :      size of window
# pulse_length :         max. length of an input pulse

my %TRB_TDC_setup = (
'TRB_009' => {
        'TDC' => {
                'TDC_A' => {
                        'trigger_count_offset'   => 5500,
                        'matching_window'        => 5450,
                        'pulse_length'           => 25,
                },
                'TDC_B' => {
                        'trigger_count_offset'   => 5500,
                        'matching_window'        => 5450,
                        'pulse_length'           => 25,
                },
                'TDC_C' => {
                        'trigger_count_offset'   => 5500,
                        'matching_window'        => 5450,
                        'pulse_length'           => 25,
                },
                'TDC_D' => {
                        'trigger_count_offset'   => 5500,
                        'matching_window'        => 5450,
                        'pulse_length'           => 25,
                },
        },
},
);

return \%TRB_TDC_setup;

After changes this PERL script should be executed.
  • Windows in TDC(from hptdc manual):
    Windows in TDC

Parallel interface

This interface is used for downloading the data from the TDC.

-- MarekPalka - 28 Jun 2007

  • TDC readout(from hptdc manual):
    TDC readout

Topic attachments
I Attachment Action Size Date Who Comment
hptdc_manual_ver2.2.pdfpdf hptdc_manual_ver2.2.pdf manage 1415.5 K 28 Jun 2007 - 11:58 MarekPalka hptdc manual
jtagchain.jpgjpg jtagchain.jpg manage 25.2 K 28 Jun 2007 - 11:17 MarekPalka JTAG chain
tdcreadout.jpgjpg tdcreadout.jpg manage 75.1 K 28 Jun 2007 - 11:54 MarekPalka TDC readout
tdcwindows.jpgjpg tdcwindows.jpg manage 35.4 K 28 Jun 2007 - 11:47 MarekPalka Windows in TDC
Edit | Attach | Print version | History: r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r1 - 28 Jun 2007, MarekPalka
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Hades Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)