The MTDC32 is a multi hit time digitizer from Mesytec. It has two fundamentally different modes of operation; trigger matching and timestamping
In trigger matching mode you establish a time window relative to gate inputs. Hits which occur during that time window are accepted and the hit time relative to the gate is returned for each hit. By placing the time window correcty it is possible to use this mode to simulate a common start or common stop TDC. The module can run as two separate 16 channel logical modules or as a single 32 channel module.
In timestamping mode, all hits are digitized and their times relative to the most recent time clear are returned. In timestamping mode, the gate inputs are simply another pair of inputs making the module a 34 channel module when used for timestamping.
The module is very flexible and setup can be complex so it is important that you understand the MTDC32 manual when reading this documentation.
The mtdc command is a typical VM-USB device support command. It provides a create sub-command for generating module instances, a config sub-command for configuring module instances and a cget subcommand for introspecting the configuration of a module instance.
-base base-address
Supplies the modules VME base address.
The base-address
value must match the base address as set in the
module rotary switches.
-id module-id
Defines the module's id. This value appears
in the id field of the data returned by the device.
The -id value is 8 bits wide
and therefore can be an unsigned value between
0 and 255.
-ipl priority-level
Sets the interrupt priority level for interrupt
requests from this module. The -ipl
value can be between 0
and 7. A value of
0 disables interrupts.
-vector status-idProvides the VME status id put on the bus when the module generates an interrupt. The MTDC issues an 8 bit status id. Therefore this value can be between 0 and 255
-irqthreshold word-count
Determines the minimum number of 32 bit words the
module must have buffered before it interrupts.
When an event has been buffered, if the number of
words in the module FIFO is larger than the
-irqthreshold value,
an interrupt will be requested if enabled.
The FIFO is 32K 32 bit words long so this value can be between 0 and 0x7fff
-maxtransfers word-countWhen the module is in multi-event mode 3, this sets a soft limit on the number of 32 bit words that can be transferred from the module before it issues a BERR. The limit is soft in that complete events are always transferred.
-datalen length-specDetermins how the event is padded for alignment. while the values 8, 16, 32 and 64 are all legal, in pratice since the events are multiples of 32 bit words, only the latter two values are meaningful. If the value 64 is chosen then if necessary 32 bit words containing 0xffff are added to the event data to pad it out to the next 64 bit boundary.
-multievent on |off |limited
Enables or disables multi-event mode.
If limited is used, the
-datalen specification is used
as well.
-skipberr on | off|If true then at the end of the read rather than asserting BUSERR return data with the top two bits set to 10 indicating an end of buffer.
-countevents yes | no
If true, then the -maxtransfers
value is taken to be the number of events rather
than the number of words.
-marktype timestamp | eventcount | extended-timestampDetermines what the value in the event correlation field of the data means.
-joinedbanks yes |noOnly relevant in trigger matching mode when this determines if the gates are ored in to both banks (yes or if they affect individual banks of 16 channels (no).
-resolution resolution-valueSets the TDC resolution. This is only relevant in trigger matching modes as the timestamping mode resolution is always 3.9ps. Allowed values are 500ps 250ps 125ps 62.5ps 31.3ps 15.6ps 7.8ps and 3.9ps.
-format standard |fulltimeDetermines if the data are time differences from the gate (trigger matching mode) or full timestamps (timestamping mode).
-bank0winstart ns, -bank1winstart ns
Determines when the matching window for trigger matching
mode starts relative to the gate. -bank1winstart
is only relevant with the -joinedbanks is
false. This value is a number between 0
and 32767 where the vaslue
16384 means the window starts with the
gate, larger values delay the start and smaller
values start the
matching window prior to the gate.
-bank0winwidth width, -bank1winwidth width
Determines the width of the trigger matching
window. The width
value is in nanoseconds and can be
0 through
16383, giving a range of
16 microseconds.
-bank1winwidth is only meaningful
if the
-joinedbanks is disabled.
-bank0triggersource trigger-spec, -bank1triggersource trigger-spec
The actual triggering of the module is quite flexible.
These options allow you to specify how the module is triggered.
-bank1triggersource is only
meaningful if -joinedbanks is
off.
The valid values for the trigger-spec
are:
The bank is triggered on the Gate 0 input.
The bank is triggered on the Gate 1 input.
The specified channel is the trigger for the bank.
A hit in any channel of Bank 0 is the trigger for the bank.
A hit in any channel of Bank 1 is a trigger for the bank.
-bank0firsthit boolean, -bank1firsthit booleanIf true, only the first hit from the bank is transmitted. Otherwise all hits in the bank's trigger matching window are transmitted.
-edge rising | fallingDetermines which signal edge is timed.
-tr0terminated boolean, -tr1terminated booleanIf this parameter is true, the ECL Trn input is terminated by the module. If not that input is unterminated.
-resetterminated booleanIf true, the ECL reset input is terminated otherwise it is unterminated.
-ecltrig1isoscillator boolean
If true then the ECL trig1 input is treated
as an oscillator that is suitable for
incrementing the timestamp. Note that you must also set the
-timingsource option properly as
well to actually ulse this input as the
timestamp clock.
-trigfromecl booleanIf true, the trigger comes from the ECL inputs, otherwise it comes from the NIM inputs. This is an exclusive setting (see register 0x6068 documentation e.g.)
-nimtrig1isoscillator boolean
The nim TRIG1 input can be used to supply
a clock pulse train for the timestamp.
See -timingsource which must
be set properly as well.
-busy bothbanks | cbusoutput | abovethresholdDescribes the function of the busy output:
The busy is set when FIFO is full or acquisition is halted (the module cannot accept a busy).
The busy output is used to run a CBUS control bus.
The busy output indicates the
FIFO is occupied above the
-irqthreshold
value.
-pulseron booleanIf true, the test pulser is active
-pulserpattern bitmaskSets the pulser pattern, which determines which channels are pulsed.
-bank0threshold level, -bank1threshold levelWhen the modue is jumpered for unipolar inputs, this value determines the threshold used to determine when a signal has happened on the inputs to bankn. If you are doing this read the manual carefully
-timingsource vme | external
Determines the timing source for the
timestamp clock. If vme
the 16Mhz backplane clock specified
by the VME standard is used. If
external,
You must have configured one of
-ecltrig1isoscillator
or -nimtrig1isoscillator
to be true in which case the associated
input is used as the source for the
timestamp clock.
-tsdivisor divisorSets the scaledown of the timestamp clock input. This is a 16 bit value and the value 0 means division by 65536.
-multlow0 0-255
The bank0 number of channels that must be
present to define an event (note that
if -joinedbanks is true
this multiplicity is over both banks).
-multhi0 0-255
The largest number of channels that must
be
present to define an event for bank0
or both banks if -joinedbanks
is true.
-multlow1 0-255If banks are not joined the low multiplicity required for an event from bank 1.
-multhi1 0-255If banks are not joined, the high multiplicity allowed for an event from bank1.