mtdc create name ?option value...?
mtdc config name option value?..?
mtdc cget name ?option?
The mtdc configuration commands supports creating and configuring modules for the Mesytec MTDC32 - a 32 channel TDC that can be used either as an absolute timing modules or as a trigger matching timing module. Be sure to read and understand the MTDC-32 manual when reading the configuration option descriptions.
Note that MTDC32 modules can be used in madcchain modules as well as individually, directly in a stack.
Unlike the CAEN V1x90 modules, the gate inputs are timed relative to a hidden set of TDC channels. This means that no reference channel is required to recover high precision timing relative to the gate in trigger matching mode.
Note in the list of options below, default value refers to the value the parameter will have if not explictily configured.
-base vme-addressThis shoud be the full 32 bit base address of the module set in its address selection rotary switches.
-id identifier
This value will be placed in the id field of the data
returned from this module. Note that it must be in the
range 0-255. The -id value shoulid be
unique amongst all modules. If not explicitly configured,
this defaults to 0 -- which is not recommended.
-ipl priorityIf the module is used to initiate interrupt triggered lists, this configures the VME interrupt priority leve that will be used. A value of 0, the default if not configured, disables interrupts. The legal values are 1-7, reflecting the IRQ levels that are supported by the VME bus. At FRIB, normally, interrupts are not used.
-vector status-id
If -ipl is not 0, this will be the 8 bit value of the
status id the module will put on the VME bus when it receives an
IACK for an interrupt it is initiating. The status id is more commonly
called an interrupt vector. By default this is 0 if not configured.
-irqthreshold wordsIf interrupts are enabled, they will be triggered when the number of 32 bit words buffered by the exceeds words. The default value is 1 which will trigger an interreupt on the first event.
-maxtransfers eventsIn limited multi-event mode, indicates the number of events that will be transferred before the module terminates the transfer with a BERR (if the requested transfer size from the host would result in more data). This defaults to 1 as in FRIB normally only one event is read at a time. Note that a value of 0 means that the module does not limit transfers.
-datalen 8 | 16 | 32 | 64 Specifies the data width of transfers. Note that if 64 bits is chosen, The data may be padded out to the next 64 bit boundary. The padding will consist of a 'fill dummy' word as descsribed in the MTDC32 manual FIFO data format section.
-multievent off | on | limited
Sets the module multievent mod , which defaults to off
which only allows the module to save the data from one event at a time.
In on the module buffers data from multiple triggers and
does not use -maxtransfers to limit the data transferred from it,
in limited Multiple events are buffered but the data
transferred is limited by -maxtransfers.
-skipberr enabled | disabled If disabled (the default), when the module has no more data, it raises the VME BERR signal which will terminate block transfers. If enabled (not recommended) the module will transfer fill dummy values while it has no data.
-countevents on | offWhen off, the internal counter that describes the amount of data that can be read counts 32 bit woreds (this is the default), if on, that counter counts events. Note that at some time in the future, that counter might be used to guide the size of the block transfers used to read the module so it is recommended to leave this off.
-marktype eventcount | timestamp | extended-timestamp
This defaults to timestamp. This option determines what will be put in
event trailers. eventcount will store an event sequence number,
timestamp will store the 16 low order bits of a timestamp while
extended-timestamp will produce two trailer words which will, betweeen them
provide a 46 bit timestamp. Note this timestamp has to do with the timestamp
maintained by the -tstamp and related parameters not the
timing maintained by the module in timestamp mode.
-joinedbanks yes | no
Determines if the module is used as a single 32 channel module (the default value yes) or a pair
of 16 channel modules. When -joinedbanks is no
the module acts as if it were two separate TDC modules with Trig0 gating the first 16 channels
and TRig1 gating the second set of 16 channels.
-resolution 500ps|250ps|125ps|62.5ps|31.3ps|15.6ps|7.8ps|3.9psSelects the TDC resolution. This defaults to 3.9ps.
-format standard | fulltimeDetermines the format of time data from the module. In standard, the default value, times are reported as differences from the gate. In fulltime mode they are timestamps and th emodule does not operate in trigger matching mode.
-bank0winstart ns
Determines where the matching window starts in ns relative to the gate. Values of
16384 (roughly the default) have the window starting when the gate pulses.
Lower values allow for a window that starts prior to the gate and higher values,
a window that starts delayed relative to the gate.
If -joinedbanks is yes this defines the start of
the matching window for both banks. If it is no See
-bank1start below.
-bank1winstart ns
This is used when -joinedbanks is no
to define the start of the trigger matching window for channels 16-31
-bank0winwidth -bank1winwidt ns
Defines the matching window width in ns (1-16385). If the module is in joined bank
mode, only the -bank0winwidth matters. IF not that is the
window width for bank 0 (channels 0-15) and -bank1winwidth
is the window width for bank 1 (channels 16-31). Default value as 32ns.
-bank0triggersource -bank1triggersource Tr0 | Tr1 | Chn | Bank0 | Bank1
Determines the trigger source. In Joined bank mode, -bank0triggersource determines the
trigger for all channels, in split mode, only for channels 0-15 with -bank1triggersource
determining the trigger for channels 16-31. The trigger can be either of the trigger inputs,
Any single channel (e.g. chan5), the or of channels 0-15 or the or of channels
16-31. The defaults are Tr0 for -bank0triggersource or
Tr1 for -bank1triggersource
-bank0firsthit -bank1firsthit enabled | disabled
IF enabled, only the first hit is transmitted for each bank if in split mode or
-bank0firsthit controlling both banks. The default is
disabled for both options.
-tr0terimenated -tr1terminated on | offIf on, the associated trigger input on the ECL control bus is terminated. The default is off if the trigger lines are bussed, the appropriate trigger input terminations must be done on the last module in the bus.
-resetterminated on | offIf on, the ECL control bus timestamp reset input is terminated. This defaults to off as it is anticipated you will want a bussed clock reset to get all modules synchronized. In a bused ECL bus, only the last module on the bus should/must be terminated.
-ecltrig1isoscillator enabled | disabled
If enabled, the TR1 ECL Input is used to increment the timestamp when -timingsource
is external. By default, this is disabled
-trigfromecl true | falseWhen true, the trigger inputs are taken from the ECL bus. If false, the default, the TR0 and TR1 inputs are taken from the NIM inputs.
-nimtrig1isoscillator enabled | disabled
When enabled, the NIM TR1 input is used to increment the timestamp if the
-timingsource configuration option is external.
By default, this is disabled
-busy bothbanks | cbsoutput | bufferfull | abovethresholdPrograms the meaning of the BUSY output. The default, bothbanks means the outpt is asserted when both banks are busy. cbusoutput allows the output to control Mesytec CBUS devices. While we do have some support for some of those devices via this output; we recommend, instead, using the mesycontrol software and an MRCC USB to CBUS module. The firmware in the controllable module often changes faster than our ability to continue to fully controll them. Mesytec's mesycontrol software adapts without a gap.
-bank0threshold -bank1threshold valueSets the discriminator level for the associated bank. For NIM signals, the default values of 105 are suitable. The value can be between 0 and 255. See the section Initialising the MTDC for basic timing measurement int the MTDC-32 manual for a discussion of this value.
-timingsource vme | external
Sets the source of the clock that increments the timestamp. The default,
vme increments the timestamp on the 16MHz VME backplane clock.
This is a convenient mechanism to provide all modules with a common clock timing.
If one of the external inputs should be used (see -ecltrig1isoscillator
and -nimtrig1isoscillator), this should be set to externale.
None of this matters if -marktype is eventcount.
-tsdivisor divisorSets the timestamp clock scaledown. This defaults to 1 which does not scale down the clock source. A value of 0 is a scale down of 65536. Legal values are 0-65535.
-multlow0 -multlow1 multiplicity
In joined bank mode, -multlow0 sets the minimum number of hits
to save a triggered event. In split bank mode, it sents the minimum number of hits
required in bank 0 to result in a bank0 event while -multlow1
does the same for bank 1. Valid ranges are 0-255. The default value of
0 does not require a hit to make an event.
-multhi0 -multhi1 multiplicity
Same as -multlow0 and -multlow1 but sets the
maximum number of hits that make an event. The value range is 0-255, and the
default values are 255 (which presumably does not limit the number of hits hits).