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.
Supplies the modules VME base address.
value must match the base address as set in the
module rotary switches.
Defines the module's id. This value appears
in the id field of the data returned by the device.
-id value is 8 bits wide
and therefore can be an unsigned value between
0 and 255.
This defaults to 0.
Sets the interrupt priority level for interrupt
requests from this module. The
value can be between 0
and 7. A value of
0 disables interrupts.
The default value is 0
Provides 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. It defaults to 0
Note that while the MTDC32 produces an 8 bit vector, the
VMUSB reads a 16 bit vector. The VME standard is
ambiguous about how the top 8 bits are set. The
MTDC sets these unused bits to 1. Therefore
will produce a vector as seen by the VMUSB of
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
an interrupt will be requested if enabled.
The FIFO is 32K 32 bit words long so this value can be between 0 and 0x7fff and defaults to 1 which is suitable for single event mode.
When 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.
This defaults to 1
Determins 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.
Defaults value for this parameter is 32
on |off |limited
Enables or disables multi-event mode.
If limited is used, the
-datalen specification is used
This defaults to off
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.
By default, this is false
yes | no
If true, then the
value is taken to be the number of events rather
than the number of words.
By default this is false.
timestamp | eventcount | extended-timestamp
Determines what the value in the event correlation field of the data means.
By default, this is timestamp
Only 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). This defaults to true.
Note that in split bank mode, the module acts and supplies data like two independent modules. Thus a single VMUSB trigger may result in two packets of data from this module in trigger matching mode.
Sets 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.
This defaults to 3.9ps
Determines if the data are time differences from the gate (trigger matching mode) or full timestamps (timestamping mode).
Defaults to standard
Determines when the matching window for trigger matching
mode starts relative to the gate.
is only relevant with the
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.
These both default to 16*1024-16.
Determines the width of the trigger matching
value is in nanoseconds and can be
16383, giving a range of
-bank1winwidth is only meaningful
-joinedbanks is disabled.
These both default to 32.
The actual triggering of the module is quite flexible.
These options allow you to specify how the module is triggered.
-bank1triggersource is only
The valid values for the
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.
The default for
is Tr0, the trigger 0 input. The default
If true, only the first hit from the bank is transmitted. Otherwise all hits in the bank's trigger matching window are transmitted.
This defaults to false allowing multiple hits from both banks of the module.
rising | falling
Determines which signal edge is timed. This defaults to falling.
If this parameter is true, the ECL Trn input is terminated by the module. If not that input is unterminated.
These parameters defaul to false which allow the trigger inputs to be bussed to other ECL inputs. The input at the end of the bus must be terminated however.
If true, the ECL reset input is terminated otherwise it is unterminated. This defaults to false
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
Thuis defaults to false.
If 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.)
Defaults to false so that by default the trigger inputs are the NIM inputs.
The nim TRIG1 input can be used to supply
a clock pulse train for the timestamp.
-timingsource which must
be set properly as well.
This is false by default.
bothbanks | cbusoutput | abovethreshold
Describes 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
The default for this paramter is bothbanks.
If true, the test pulser is active. This is false by default.
Sets the pulser pattern, which determines which channels are pulsed. This is 0 by default.
When 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
This defaults to 105 which the manual says is suitable for a NIM input.
vme | external
Determines the timing source for the
timestamp clock. If vme
the 16Mhz backplane clock specified
by the VME standard is used. If
You must have configured one of
to be true in which case the associated
input is used as the source for the
This defaults to vme which is suitable for synchronizing timing across a single VME backplane when used with the madcchain which will use multicast addressing to simultaneously clear the timestamps of all participating modules.
Sets the scaledown of the timestamp clock input. This is a 16 bit value and the value 0 means division by 65536.
The default value is 1 which does not scale down the timestamp clock.
The bank0 number of channels that must be
present to define an event (note that
-joinedbanks is true
this multiplicity is over both banks).
Defaults to 0
The largest number of channels that must
present to define an event for bank0
or both banks if
Defaults to 255
If banks are not joined the low multiplicity required for an event from bank 1. Defaults to 0
If banks are not joined, the high multiplicity allowed for an event from bank1. Defaults to 255