diff --git a/evrMrmApp/Db/Makefile b/evrMrmApp/Db/Makefile index 6d0f3228..9d0e8c2a 100644 --- a/evrMrmApp/Db/Makefile +++ b/evrMrmApp/Db/Makefile @@ -20,6 +20,8 @@ DB += evr-vmerf-230.db DB += evr-tg-300.db DB += evr-mtca-300.db DB += evr-pcie-300dc.db +DB += evr-mtca-300rf.db +DB += evr-mtca-300u.db ifdef BASE_3_15 DB += evr-mtca-300u.db diff --git a/evrMrmApp/Db/evr-mtca-300rf.substitutions b/evrMrmApp/Db/evr-mtca-300rf.substitutions new file mode 100644 index 00000000..270efe26 --- /dev/null +++ b/evrMrmApp/Db/evr-mtca-300rf.substitutions @@ -0,0 +1,333 @@ +# Record set for a mTCA-EVR-300rf +# +# Macros: +# P = Prefix +# EVR = Card name (same as mrmEvrSetupPCI()) +# FEVT = Event link frequency (default 124.916 MHz) +# ES = end separator (to maintain backwards compatibility set to "}") +# +# Option Macros +# * s = Separator between SubDev and Signal +# (default value set to ':') +# * dsh = dash separator +# (to maintain backwards compatibility) +# +# Record names have the general forms: +# $(P)$(ES)Signal-SD +# $(P)SubDev$(ES)Signal-SD +# +# To maintain the old naming convention $(SYS){$(D)} +# you have to format the $(P) and $(ES) as following: +# - P=$(SYS){$(D) +# - ES="}" + +file "mrmevrbase.template" +{ +{P="\$(P)\$(ES)", OBJ="$(EVR)", EVNT1HZ="\$(EVNT1HZ=125)", FEVT="\$(FEVT=124.916)"} +} + +file "databuftx.db" +{pattern +{P, OBJ, PROTO} +{"\$(P)\$(ES)", "$(EVR):BUFTX", 1} +} + +file "evrSoftEvt.template" +{ +{P="\$(P)\$(ES)", OBJ="$(EVR)"} +} + +file "databuftxCtrl.db" +{pattern +{P, OBJ} +{"\$(P)\$(ES)", "$(EVR):BUFTX"} +} + +file "mrmevrbufrx.db" +{pattern +{P, OBJ, PROTO} +{"\$(P)\$(ES)", "$(EVR):BUFRX", "0xff00"} +} + +file "mrmSoftSeq.template" +{pattern +{P, EVG, seqNum, NELM} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)0\$(ES)", $(EVR), 0, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)1\$(ES)", $(EVR), 1, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)2\$(ES)", $(EVR), 2, 2047} +} + +file "evrSoftSeq.template" +{pattern +{P, EVG, seqNum, NELM } +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)0\$(ES)", $(EVR), 0, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)1\$(ES)", $(EVR), 1, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)2\$(ES)", $(EVR), 2, 2047} +} + +file "sfp.db" +{ +{P="\$(P)\$(dsh=-)SFP\$(ES)", OBJ="$(EVR):SFP"} +} + +file "mrmevrdc.template" +{ +{P="\$(P)\$(dsh=-)DC\$(ES)", OBJ="$(EVR)"} +} + +file "evrmap.db" +{pattern +{NAME, OBJ, func, EVT} +{"\$(P)\$(ES)Evt\$(s=:)Blink0-SP", "$(EVR)", Blink, 15} +{"\$(P)\$(ES)Evt\$(s=:)Blink1-SP", "$(EVR)", Blink, 0} +{"\$(P)\$(ES)Evt\$(s=:)ResetPS-SP","$(EVR)", "Reset PS", 123} +} + +file "evrevent.db" +{pattern +{EN, OBJ, CODE, EVNT} +{"\$(P)\$(ES)1hz", "$(EVR)", 0x7d, 125} +{"\$(P)\$(ES)EvtA", "$(EVR)", 10, 10} +{"\$(P)\$(ES)EvtB", "$(EVR)", 11, 11} +{"\$(P)\$(ES)EvtC", "$(EVR)", 12, 12} +{"\$(P)\$(ES)EvtD", "$(EVR)", 13, 13} +{"\$(P)\$(ES)EvtE", "$(EVR)", 14, 14} +{"\$(P)\$(ES)EvtF", "$(EVR)", 15, 15} +{"\$(P)\$(ES)EvtG", "$(EVR)", 16, 16} +{"\$(P)\$(ES)EvtH", "$(EVR)", 17, 17} +} + +file "evrscale.db" +{pattern +{IDX, P, SN, OBJ, MAX} +{0, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{1, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{2, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{3, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{4, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{5, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{6, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{7, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +} + +file "mrmevrout.db" +{pattern +{ON, OBJ, DESC} +{"\$(P)\$(dsh=-)Out\$(s=:)Int\$(ES)" , "$(EVR):Int" , "Internal"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV0\$(ES)", "$(EVR):FrontUnivOut0" , "UNIV0"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV1\$(ES)", "$(EVR):FrontUnivOut1" , "UNIV1"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV2\$(ES)", "$(EVR):FrontUnivOut18", "UNIV2"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV3\$(ES)", "$(EVR):FrontUnivOut19", "UNIV3"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPSFP\$(ES)", "$(EVR):FrontUnivOut20", "GTX SFP"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPCML\$(ES)", "$(EVR):FrontUnivOut21", "CML"} +# default to tri-state for backplane lines +pattern +{ON, OBJ, DESC, DEFAULT} +{"\$(P)\$(dsh=-)Out\$(s=:)Back0\$(ES)" , "$(EVR):Backplane0" , "RX17 (0)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back1\$(ES)" , "$(EVR):Backplane1" , "TX17 (1)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back2\$(ES)" , "$(EVR):Backplane2" , "RX18 (2)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back3\$(ES)" , "$(EVR):Backplane3" , "TX18 (3)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back4\$(ES)" , "$(EVR):Backplane4" , "RX19 (4)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back5\$(ES)" , "$(EVR):Backplane5" , "TX19 (5)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back6\$(ES)" , "$(EVR):Backplane6" , "RX20 (6)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back7\$(ES)" , "$(EVR):Backplane7" , "TX20 (7)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)TCLKA\$(ES)" , "$(EVR):FrontUnivOut16", "TCLKA" , 61} +{"\$(P)\$(dsh=-)Out\$(s=:)TCLKB\$(ES)" , "$(EVR):FrontUnivOut17", "TCLKB" , 61} +# RTM outputs default to force-low, can be set to tri-state for input modules +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv0\$(ES)", "$(EVR):RearUniv0" , "RTM (0)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv1\$(ES)", "$(EVR):RearUniv1" , "RTM (1)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv2\$(ES)", "$(EVR):RearUniv2" , "RTM (2)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv3\$(ES)", "$(EVR):RearUniv3" , "RTM (3)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv4\$(ES)", "$(EVR):RearUniv4" , "RTM (4)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv5\$(ES)", "$(EVR):RearUniv5" , "RTM (5)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv6\$(ES)", "$(EVR):RearUniv6" , "RTM (6)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv7\$(ES)", "$(EVR):RearUniv7" , "RTM (7)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv8\$(ES)", "$(EVR):RearUniv8" , "RTM (8)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv9\$(ES)", "$(EVR):RearUniv9" , "RTM (9)" , 63} +} + +file "mrmevroutint.db" +{{ + ON="\$(P)\$(dsh=-)Out\$(s=:)Int\$(ES)", OBJ="$(EVR)" +}} + +file "evrcml.db" +{pattern +{P, ON, OBJ, NBIT, MAX} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)TCLKA\$(ES)", "$(EVR):CML0", 40, 81880} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)TCLKB\$(ES)", "$(EVR):CML1", 40, 81880} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)FPUV2\$(ES)", "$(EVR):CML2", 40, 81880} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)FPUV3\$(ES)", "$(EVR):CML3", 40, 81880} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)FPSFP\$(ES)", "$(EVR):CML4", 40, 81880} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)FPCML\$(ES)", "$(EVR):CML5", 40, 81880} +} + +# Pulse generators w/o a prescaler set NOPS=1 +file "evrpulser.db" +{pattern +{PID, P, PN, OBJ, DMAX, WMAX, PMAX, NOPS} +{0, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{1, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{2, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{3, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{4, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{5, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{6, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{7, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{8, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{9, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{10,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{11,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{12,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{13,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{14,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{15,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{16,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{17,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{18,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{19,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{20,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{21,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{22,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{23,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +# gate generators +{28,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{29,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{30,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{31,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +} + +# Default to 3 possible trigger mappings per pulser +file "evrpulsermap.db" +{pattern +{PID, NAME, OBJ, F, EVT} +{0, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{0, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{0, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{1, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{1, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{1, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{2, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{2, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{2, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{3, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{3, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{3, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{4, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{4, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{4, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{5, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{5, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{5, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{6, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{6, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{6, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{7, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{7, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{7, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{8, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{8, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{8, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{9, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{9, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{9, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{10,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{10,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{10,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{11,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{11,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{11,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{12,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{12,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{12,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{13,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{13,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{13,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{14,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{14,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{14,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{15,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{15,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{15,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{16,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{16,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{16,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{17,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{17,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{17,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{18,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{18,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{18,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{19,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{19,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{19,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{20,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{20,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{20,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{21,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{21,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{21,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{22,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{22,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{22,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{23,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{23,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{23,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +# gate generators mappings +{28,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{28,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{28,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{29,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{29,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{29,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{30,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{30,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{30,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{31,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{31,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{31,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +} + +# pulser masking controls +file "evrdcpulser.template" +{pattern +{PID, P, PN, OBJ} +{0, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{1, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{2, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{3, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{4, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{5, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{6, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{7, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{8, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{9, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{10,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{11,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{12,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{13,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{14,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{15,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{16,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{17,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{18,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{19,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{20,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{21,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{22,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{23,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +} + +file "evrin.db" +{pattern +{IN, OBJ, DESC} +{"\$(P)\$(dsh=-)In\$(s=:)0\$(ES)", "$(EVR):FPIn0", "IN0 (TTL)"} +{"\$(P)\$(dsh=-)In\$(s=:)1\$(ES)", "$(EVR):FPIn1", "IN1 (TTL)"} +} + +file "mrmevrdlymodule.template" +{pattern +{SLOT, P, OBJ} +{0, "\$(P)\$(dsh=-)Out\$(s=:)FPDly$(SLOT)\$(ES)", "$(EVR)"} +{1, "\$(P)\$(dsh=-)Out\$(s=:)FPDly$(SLOT)\$(ES)", "$(EVR)"} +} diff --git a/evrMrmApp/Db/evr-mtca-300u.substitutions b/evrMrmApp/Db/evr-mtca-300u.substitutions index 3cb6d69d..5d777d80 100644 --- a/evrMrmApp/Db/evr-mtca-300u.substitutions +++ b/evrMrmApp/Db/evr-mtca-300u.substitutions @@ -1,253 +1,325 @@ -# Record set for a universal EVR (tested with 300 family) +# Record set for a mTCA-EVR-300u # # Macros: # P = Prefix # EVR = Card name (same as mrmEvrSetupPCI()) # FEVT = Event link frequency (default 124.916 MHz) -# Naming-agnostic -# =============== -global {s=""} +# ES = end separator (to maintain backwards compatibility set to "}") +# +# Option Macros +# * s = Separator between SubDev and Signal +# (default value set to ':') +# * dsh = dash separator +# (to maintain backwards compatibility) +# +# Record names have the general forms: +# $(P)$(ES)Signal-SD +# $(P)SubDev$(ES)Signal-SD +# +# To maintain the old naming convention $(SYS){$(D)} +# you have to format the $(P) and $(ES) as following: +# - P=$(SYS){$(D) +# - ES="}" file "mrmevrbase.template" { -{P="\$(P)", OBJ="$(EVR)", EVNT1HZ="\$(EVNT1HZ=125)", FEVT="\$(FEVT=124.916)"} +{P="\$(P)\$(ES)", OBJ="$(EVR)", EVNT1HZ="\$(EVNT1HZ=125)", FEVT="\$(FEVT=124.916)"} } + file "databuftx.db" {pattern -{P, OBJ, PROTO, s} -{"\$(P)", "$(EVR):BUFTX", 1, "-"} +{P, OBJ, PROTO} +{"\$(P)\$(ES)", "$(EVR):BUFTX", 1} } file "evrSoftEvt.template" { -{P="\$(P)", OBJ="$(EVR)"} +{P="\$(P)\$(ES)", OBJ="$(EVR)"} } file "databuftxCtrl.db" {pattern {P, OBJ} -{"\$(P)", "$(EVR):BUFTX"} +{"\$(P)\$(ES)", "$(EVR):BUFTX"} } file "mrmevrbufrx.db" {pattern -{P, OBJ, PROTO, s} -{"\$(P)", "$(EVR):BUFRX", "0xff00", "-"} +{P, OBJ, PROTO} +{"\$(P)\$(ES)", "$(EVR):BUFRX", "0xff00"} } file "mrmSoftSeq.template" {pattern {P, EVG, seqNum, NELM} -{"\$(P)SoftSeq0", $(EVR), 0, 2047} -{"\$(P)SoftSeq1", $(EVR), 1, 2047} -{"\$(P)SoftSeq2", $(EVR), 2, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)0\$(ES)", $(EVR), 0, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)1\$(ES)", $(EVR), 1, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)2\$(ES)", $(EVR), 2, 2047} } file "evrSoftSeq.template" {pattern {P, EVG, seqNum, NELM } -{"\$(P)SoftSeq0", $(EVR), 0, 2047} -{"\$(P)SoftSeq1", $(EVR), 1, 2047} -{"\$(P)SoftSeq2", $(EVR), 2, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)0\$(ES)", $(EVR), 0, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)1\$(ES)", $(EVR), 1, 2047} +{"\$(P)\$(dsh=-)SoftSeq\$(s=:)2\$(ES)", $(EVR), 2, 2047} } file "sfp.db" { -{P="\$(P)SFP", OBJ="$(EVR):SFP"} +{P="\$(P)\$(dsh=-)SFP\$(ES)", OBJ="$(EVR):SFP"} } file "mrmevrdc.template" { -{P="\$(P)DC", OBJ="$(EVR)"} +{P="\$(P)\$(dsh=-)DC\$(ES)", OBJ="$(EVR)"} } file "evrmap.db" {pattern {NAME, OBJ, func, EVT} -{"\$(P)EvtBlink0-SP", "$(EVR)", Blink, 15} -{"\$(P)EvtBlink1-SP", "$(EVR)", Blink, 0} -{"\$(P)EvtResetPS-SP","$(EVR)", "Reset PS", 123} +{"\$(P)\$(ES)Evt\$(s=:)Blink0-SP", "$(EVR)", Blink, 15} +{"\$(P)\$(ES)Evt\$(s=:)Blink1-SP", "$(EVR)", Blink, 0} +{"\$(P)\$(ES)Evt\$(s=:)ResetPS-SP","$(EVR)", "Reset PS", 123} } file "evrevent.db" {pattern {EN, OBJ, CODE, EVNT} -{"\$(P)1hz", "$(EVR)", 0x7d, 125} -{"\$(P)EvtA", "$(EVR)", 10, 10} -{"\$(P)EvtB", "$(EVR)", 11, 11} -{"\$(P)EvtC", "$(EVR)", 12, 12} -{"\$(P)EvtD", "$(EVR)", 13, 13} -{"\$(P)EvtE", "$(EVR)", 14, 14} -{"\$(P)EvtF", "$(EVR)", 15, 15} -{"\$(P)EvtG", "$(EVR)", 16, 16} -{"\$(P)EvtH", "$(EVR)", 17, 17} +{"\$(P)\$(ES)1hz", "$(EVR)", 0x7d, 125} +{"\$(P)\$(ES)EvtA", "$(EVR)", 10, 10} +{"\$(P)\$(ES)EvtB", "$(EVR)", 11, 11} +{"\$(P)\$(ES)EvtC", "$(EVR)", 12, 12} +{"\$(P)\$(ES)EvtD", "$(EVR)", 13, 13} +{"\$(P)\$(ES)EvtE", "$(EVR)", 14, 14} +{"\$(P)\$(ES)EvtF", "$(EVR)", 15, 15} +{"\$(P)\$(ES)EvtG", "$(EVR)", 16, 16} +{"\$(P)\$(ES)EvtH", "$(EVR)", 17, 17} } file "evrscale.db" {pattern {IDX, P, SN, OBJ, MAX} -{0, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} -{1, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} -{2, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} -{3, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} -{4, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} -{5, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} -{6, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} -{7, "\$(P)", "\$(P)PS$(IDX)", "$(EVR):PS$(IDX)", "0xffffffff"} +{0, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{1, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{2, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{3, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{4, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{5, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{6, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} +{7, "\$(P)\$(ES)", "\$(P)\$(dsh=-)PS\$(s=:)$(IDX)\$(ES)", "$(EVR):PS$(IDX)", "0xffffffff"} } file "mrmevrout.db" {pattern {ON, OBJ, DESC} -{"\$(P)OutInt", "$(EVR):Int", "Internal"} -{"\$(P)OutFP0", "$(EVR):FrontOut0", "OUT0 (TTL)"} -{"\$(P)OutFP1", "$(EVR):FrontOut1", "OUT1 (TTL)"} -{"\$(P)OutFP2", "$(EVR):FrontOut2", "OUT2 (TTL)"} -{"\$(P)OutFP3", "$(EVR):FrontOut3", "OUT3 (TTL)"} +{"\$(P)\$(dsh=-)Out\$(s=:)Int\$(ES)" , "$(EVR):Int" , "Internal"} +{"\$(P)\$(dsh=-)Out\$(s=:)FP0\$(ES)" , "$(EVR):FrontOut0" , "OUT0 (TTL)"} +{"\$(P)\$(dsh=-)Out\$(s=:)FP1\$(ES)" , "$(EVR):FrontOut1" , "OUT1 (TTL)"} +{"\$(P)\$(dsh=-)Out\$(s=:)FP2\$(ES)" , "$(EVR):FrontOut2" , "OUT2 (TTL)"} +{"\$(P)\$(dsh=-)Out\$(s=:)FP3\$(ES)" , "$(EVR):FrontOut3" , "OUT3 (TTL)"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV0\$(ES)", "$(EVR):FrontUnivOut0", "UNIV0"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV1\$(ES)", "$(EVR):FrontUnivOut1", "UNIV1"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV2\$(ES)", "$(EVR):FrontUnivOut2", "UNIV2"} +{"\$(P)\$(dsh=-)Out\$(s=:)FPUV3\$(ES)", "$(EVR):FrontUnivOut3", "UNIV3"} # default to tri-state for backplane lines pattern {ON, OBJ, DESC, DEFAULT} -{"\$(P)OutBack0", "$(EVR):Backplane0", "RX17 (0)", 61} -{"\$(P)OutBack1", "$(EVR):Backplane1", "TX17 (1)", 61} -{"\$(P)OutBack2", "$(EVR):Backplane2", "RX18 (2)", 61} -{"\$(P)OutBack3", "$(EVR):Backplane3", "TX18 (3)", 61} -{"\$(P)OutBack4", "$(EVR):Backplane4", "RX19 (4)", 61} -{"\$(P)OutBack5", "$(EVR):Backplane5", "TX19 (5)", 61} -{"\$(P)OutBack6", "$(EVR):Backplane6", "RX20 (6)", 61} -{"\$(P)OutBack7", "$(EVR):Backplane7", "TX20 (7)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back0\$(ES)" , "$(EVR):Backplane0" , "RX17 (0)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back1\$(ES)" , "$(EVR):Backplane1" , "TX17 (1)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back2\$(ES)" , "$(EVR):Backplane2" , "RX18 (2)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back3\$(ES)" , "$(EVR):Backplane3" , "TX18 (3)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back4\$(ES)" , "$(EVR):Backplane4" , "RX19 (4)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back5\$(ES)" , "$(EVR):Backplane5" , "TX19 (5)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back6\$(ES)" , "$(EVR):Backplane6" , "RX20 (6)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)Back7\$(ES)" , "$(EVR):Backplane7" , "TX20 (7)", 61} +{"\$(P)\$(dsh=-)Out\$(s=:)TCLKA\$(ES)" , "$(EVR):FrontUnivOut16", "TCLKA" , 61} +{"\$(P)\$(dsh=-)Out\$(s=:)TCLKB\$(ES)" , "$(EVR):FrontUnivOut17", "TCLKB" , 61} +# RTM outputs default to force-low, can be set to tri-state for input modules +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv0\$(ES)", "$(EVR):RearUniv0" , "RTM (0)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv1\$(ES)", "$(EVR):RearUniv1" , "RTM (1)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv2\$(ES)", "$(EVR):RearUniv2" , "RTM (2)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv3\$(ES)", "$(EVR):RearUniv3" , "RTM (3)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv4\$(ES)", "$(EVR):RearUniv4" , "RTM (4)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv5\$(ES)", "$(EVR):RearUniv5" , "RTM (5)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv6\$(ES)", "$(EVR):RearUniv6" , "RTM (6)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv7\$(ES)", "$(EVR):RearUniv7" , "RTM (7)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv8\$(ES)", "$(EVR):RearUniv8" , "RTM (8)" , 63} +{"\$(P)\$(dsh=-)Out\$(s=:)RearUniv9\$(ES)", "$(EVR):RearUniv9" , "RTM (9)" , 63} } file "mrmevroutint.db" {{ - ON="\$(P)OutInt", OBJ="$(EVR)" + ON="\$(P)\$(dsh=-)Out\$(s=:)Int\$(ES)", OBJ="$(EVR)" }} file "evrcml.db" {pattern -{P, ON, OBJ} -{"\$(P)", "\$(P)OutFPUV0", "$(EVR):CML0"} -{"\$(P)", "\$(P)OutFPUV1", "$(EVR):CML1"} +{P, ON, OBJ, NBIT, MAX} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)TCLKA\$(ES)", "$(EVR):CML0", 40, 81880} +{"\$(P)\$(ES)", "\$(P)\$(dsh=-)Out\$(s=:)TCLKB\$(ES)", "$(EVR):CML1", 40, 81880} } # Pulse generators w/o a prescaler set NOPS=1 file "evrpulser.db" {pattern {PID, P, PN, OBJ, DMAX, WMAX, PMAX, NOPS} -{0, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} -{1, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} -{2, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} -{3, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} -{4, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{5, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{6, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{7, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{8, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{9, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{10,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{11,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{12,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{13,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{14,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{15,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} +{0, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{1, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{2, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{3, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffffffff", "0xffff", 0} +{4, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{5, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{6, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{7, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{8, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{9, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{10,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{11,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{12,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{13,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{14,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{15,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{16,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{17,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{18,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{19,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{20,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{21,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{22,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{23,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} # gate generators -{28,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{29,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{30,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} -{31,"\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff", "1", 1} +{28,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{29,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{30,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} +{31,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)", "0xffffffff", "0xffff" , "1" , 1} } # Default to 3 possible trigger mappings per pulser file "evrpulsermap.db" {pattern {PID, NAME, OBJ, F, EVT} -{0, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{0, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{0, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{1, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{1, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{1, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{2, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{2, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{2, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{3, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{3, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{3, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{4, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{4, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{4, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{5, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{5, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{5, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{6, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{6, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{6, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{7, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{7, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{7, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{8, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{8, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{8, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{9, "\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{9, "\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{9, "\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{10,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{10,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{10,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{11,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{11,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{11,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{12,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{12,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{12,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{13,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{13,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{13,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{14,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{14,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{14,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{15,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{15,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{15,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{0, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{0, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{0, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{1, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{1, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{1, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{2, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{2, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{2, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{3, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{3, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{3, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{4, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{4, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{4, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{5, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{5, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{5, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{6, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{6, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{6, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{7, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{7, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{7, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{8, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{8, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{8, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{9, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{9, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{9, "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{10,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{10,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{10,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{11,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{11,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{11,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{12,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{12,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{12,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{13,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{13,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{13,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{14,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{14,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{14,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{15,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{15,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{15,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{16,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{16,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{16,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{17,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{17,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{17,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{18,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{18,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{18,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{19,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{19,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{19,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{20,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{20,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{20,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{21,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{21,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{21,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{22,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{22,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{22,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{23,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{23,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{23,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} # gate generators mappings -{28,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{28,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{28,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{29,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{29,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{29,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{30,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{30,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{30,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} -{31,"\$(P)DlyGen$(PID)EvtTrig0-SP", "$(EVR):Pul$(PID)", Trig, 0} -{31,"\$(P)DlyGen$(PID)EvtTrig1-SP", "$(EVR):Pul$(PID)", Trig, 0} -{31,"\$(P)DlyGen$(PID)EvtTrig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{28,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{28,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{28,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{29,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{29,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{29,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{30,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{30,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{30,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} +{31,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig0-SP", "$(EVR):Pul$(PID)", Trig, 0} +{31,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig1-SP", "$(EVR):Pul$(PID)", Trig, 0} +{31,"\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)Evt\$(s=:)Trig2-SP", "$(EVR):Pul$(PID)", Trig, 0} } # pulser masking controls file "evrdcpulser.template" {pattern {PID, P, PN, OBJ} -{0, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{1, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{2, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{3, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{4, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{5, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{6, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{7, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{8, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{9, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{10, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{11, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{12, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{13, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{14, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} -{15, "\$(P)", "\$(P)DlyGen$(PID)", "$(EVR):Pul$(PID)"} +{0, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{1, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{2, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{3, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{4, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{5, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{6, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{7, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{8, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{9, "\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{10,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{11,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{12,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{13,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{14,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} +{15,"\$(P)\$(ES)", "\$(P)\$(dsh=-)DlyGen\$(s=:)$(PID)\$(ES)", "$(EVR):Pul$(PID)"} } file "evrin.db" {pattern {IN, OBJ, DESC} -{"\$(P)In0", "$(EVR):FPIn0", "IN0 (TTL)"} -{"\$(P)In1", "$(EVR):FPIn1", "IN1 (TTL)"} +{"\$(P)\$(dsh=-)In\$(s=:)0\$(ES)", "$(EVR):FPIn0", "IN0 (TTL)"} +{"\$(P)\$(dsh=-)In\$(s=:)1\$(ES)", "$(EVR):FPIn1", "IN1 (TTL)"} +} + +file "mrmevrdlymodule.template" +{pattern +{SLOT, P, OBJ} +{0, "\$(P)\$(dsh=-)Out\$(s=:)FPDly$(SLOT)\$(ES)", "$(EVR)"} +{1, "\$(P)\$(dsh=-)Out\$(s=:)FPDly$(SLOT)\$(ES)", "$(EVR)"} } + + diff --git a/evrMrmApp/Db/mrmevrout.db b/evrMrmApp/Db/mrmevrout.db index 0f0530ac..7ad7dcea 100644 --- a/evrMrmApp/Db/mrmevrout.db +++ b/evrMrmApp/Db/mrmevrout.db @@ -190,31 +190,60 @@ record(mbbo, "$(ON)Src$(s=:)Scale-SP") { field( ZRST, "Prescaler 0") field( ONST, "Prescaler 1") field( TWST, "Prescaler 2") - field( THST, "Flip-flop 0") - field( FRST, "Flip-flop 1") - field( FVST, "Flip-flop 2") - field( SXST, "Flip-flop 3") - field( SVST, "Flip-flop 4") - field( EIST, "Flip-flop 5") - field( NIST, "Flip-flop 6") - field( TEST, "Flip-flop 7") - field( ELST, "Tri-state") - field( TVST, "Force High") - field( TTST, "Force Low") + field( THST, "Prescaler 3") + field( FRST, "Prescaler 4") + field( FVST, "Prescaler 5") + field( SXST, "Prescaler 6") + field( SVST, "Prescaler 7") field( ZRVL, "40") field( ONVL, "41") field( TWVL, "42") - field( THVL, "48") - field( FRVL, "49") - field( FVVL, "50") - field( SXVL, "51") - field( SVVL, "52") - field( EIVL, "53") - field( NIVL, "54") - field( TEVL, "55") - field( ELVL, "61") - field( TVVL, "62") - field( TTVL, "63") + field( THVL, "43") + field( FRVL, "44") + field( FVVL, "45") + field( SXVL, "46") + field( SVVL, "47") + field( EISV, "INVALID") + field( NISV, "INVALID") + field( TESV, "INVALID") + field( ELSV, "INVALID") + field( TVSV, "INVALID") + field( TTSV, "INVALID") + field( FTSV, "INVALID") + field( FFSV, "INVALID") + field( UNSV, "INVALID") + field( IVOA, "Don't drive outputs") + info(autosaveFields_pass0, "VAL") +} + +record(mbbo, "$(ON)Src$(s=:)Gate-SP") { + field( DTYP, "Raw Soft Channel") + field( OUT , "$(ON)Src-SP PP") + field( ZRST, "Flip-flop 0") + field( ONST, "Flip-flop 1") + field( TWST, "Flip-flop 2") + field( THST, "Flip-flop 3") + field( FRST, "Flip-flop 4") + field( FVST, "Flip-flop 5") + field( SXST, "Flip-flop 6") + field( SVST, "Flip-flop 7") + field( EIST, "Tri-state") + field( NIST, "Force High") + field( TEST, "Force Low") + field( ZRVL, "48") + field( ONVL, "49") + field( TWVL, "50") + field( THVL, "51") + field( FRVL, "52") + field( FVVL, "53") + field( SXVL, "54") + field( SVVL, "55") + field( EIVL, "61") + field( NIVL, "62") + field( TEVL, "63") + field( ELSV, "INVALID") + field( TVSV, "INVALID") + field( TTSV, "INVALID") field( FTSV, "INVALID") field( FFSV, "INVALID") field( UNSV, "INVALID") @@ -288,28 +317,41 @@ record(stringin, "$(ON)Src-RB") info(lutD , " 13 = Pulser 13") info(lutE , " 14 = Pulser 14") info(lutF , " 15 = Pulser 15") - info(lutG , " 32 = DBus 0") - info(lutH , " 33 = DBus 1") - info(lutI , " 34 = DBus 2") - info(lutJ , " 35 = DBus 3") - info(lutK , " 36 = DBus 4") - info(lutL , " 37 = DBus 5") - info(lutM , " 38 = DBus 6") - info(lutN , " 39 = DBus 7") - info(lutO , " 40 = Prescaler 0") - info(lutP , " 41 = Prescaler 1") - info(lutQ , " 42 = Prescaler 2") - info(lutR , " 48 = Flip-flop 0") - info(lutS , " 49 = Flip-flop 1") - info(lutT , " 50 = Flip-flop 2") - info(lutU , " 51 = Flip-flop 3") - info(lutV , " 52 = Flip-flop 4") - info(lutW , " 53 = Flip-flop 5") - info(lutX , " 54 = Flip-flop 6") - info(lutY , " 55 = Flip-flop 7") - info(lutZ , " 61 = Tri-state") - info(lutAA, " 62 = Force high") - info(lutAB, " 63 = Force low") + info(lutG , " 16 = Pulser 16") + info(lutH , " 17 = Pulser 17") + info(lutI , " 18 = Pulser 18") + info(lutJ , " 19 = Pulser 19") + info(lutK , " 20 = Pulser 20") + info(lutL , " 21 = Pulser 21") + info(lutM , " 22 = Pulser 22") + info(lutN , " 23 = Pulser 23") + info(lutO , " 32 = DBus 0") + info(lutP , " 33 = DBus 1") + info(lutQ , " 34 = DBus 2") + info(lutR , " 35 = DBus 3") + info(lutS , " 36 = DBus 4") + info(lutT , " 37 = DBus 5") + info(lutU , " 38 = DBus 6") + info(lutV , " 39 = DBus 7") + info(lutW , " 40 = Prescaler 0") + info(lutX , " 41 = Prescaler 1") + info(lutY , " 42 = Prescaler 2") + info(lutZ , " 43 = Prescaler 3") + info(lutAA, " 44 = Prescaler 4") + info(lutAB, " 45 = Prescaler 5") + info(lutAC, " 46 = Prescaler 6") + info(lutAD, " 47 = Prescaler 7") + info(lutAE, " 48 = Flip-flop 0") + info(lutAF, " 49 = Flip-flop 1") + info(lutAG, " 50 = Flip-flop 2") + info(lutAH, " 51 = Flip-flop 3") + info(lutAI, " 52 = Flip-flop 4") + info(lutAJ, " 53 = Flip-flop 5") + info(lutAK, " 54 = Flip-flop 6") + info(lutAL, " 55 = Flip-flop 7") + info(lutAM, " 61 = Tri-state") + info(lutAN, " 62 = Force high") + info(lutAO, " 63 = Force low") } record(stringin, "$(ON)Src2-RB") @@ -332,20 +374,41 @@ record(stringin, "$(ON)Src2-RB") info(lutD , " 13 = Pulser 13") info(lutE , " 14 = Pulser 14") info(lutF , " 15 = Pulser 15") - info(lutG , " 32 = DBus 0") - info(lutH , " 33 = DBus 1") - info(lutI , " 34 = DBus 2") - info(lutJ , " 35 = DBus 3") - info(lutK , " 36 = DBus 4") - info(lutL , " 37 = DBus 5") - info(lutM , " 38 = DBus 6") - info(lutN , " 39 = DBus 7") - info(lutO , " 40 = Prescaler 0") - info(lutP , " 41 = Prescaler 1") - info(lutQ , " 42 = Prescaler 2") - info(lutR , " 61 = Tri-state") - info(lutS , " 62 = Force high") - info(lutT , " 63 = Force low") + info(lutG , " 16 = Pulser 16") + info(lutH , " 17 = Pulser 17") + info(lutI , " 18 = Pulser 18") + info(lutJ , " 19 = Pulser 19") + info(lutK , " 20 = Pulser 20") + info(lutL , " 21 = Pulser 21") + info(lutM , " 22 = Pulser 22") + info(lutN , " 23 = Pulser 23") + info(lutO , " 32 = DBus 0") + info(lutP , " 33 = DBus 1") + info(lutQ , " 34 = DBus 2") + info(lutR , " 35 = DBus 3") + info(lutS , " 36 = DBus 4") + info(lutT , " 37 = DBus 5") + info(lutU , " 38 = DBus 6") + info(lutV , " 39 = DBus 7") + info(lutW , " 40 = Prescaler 0") + info(lutX , " 41 = Prescaler 1") + info(lutY , " 42 = Prescaler 2") + info(lutZ , " 43 = Prescaler 3") + info(lutAA, " 44 = Prescaler 4") + info(lutAB, " 45 = Prescaler 5") + info(lutAC, " 46 = Prescaler 6") + info(lutAD, " 47 = Prescaler 7") + info(lutAE, " 48 = Flip-flop 0") + info(lutAF, " 49 = Flip-flop 1") + info(lutAG, " 50 = Flip-flop 2") + info(lutAH, " 51 = Flip-flop 3") + info(lutAI, " 52 = Flip-flop 4") + info(lutAJ, " 53 = Flip-flop 5") + info(lutAK, " 54 = Flip-flop 6") + info(lutAL, " 55 = Flip-flop 7") + info(lutAM, " 61 = Tri-state") + info(lutAN, " 62 = Force high") + info(lutAO, " 63 = Force low") } # Select which is displayed diff --git a/evrMrmApp/src/drvem.cpp b/evrMrmApp/src/drvem.cpp index 9bbce899..045ef92b 100644 --- a/evrMrmApp/src/drvem.cpp +++ b/evrMrmApp/src/drvem.cpp @@ -286,10 +286,35 @@ try{ } else if(formfactor==formFactor_mTCA) { + // map TCLKA/B as UNIV16/17 + for (unsigned int i = 16; i <= 17; ++i) { + outputs[std::make_pair(OutputFPUniv, i)] + = new MRMOutput(SB() << n << ":FrontUnivOut" << i, this, OutputFPUniv, i); + } + + // CMLs for TCLKA/B shortcmls.resize(2); - shortcmls[0]=new MRMCML(n+":CML0", 0,*this,MRMCML::typeCML,form); - shortcmls[1]=new MRMCML(n+":CML1", 1,*this,MRMCML::typeCML,form); + shortcmls[0] = new MRMCML(n+":CML0", 0,*this,MRMCML::typeCML,form); + shortcmls[1] = new MRMCML(n+":CML1", 1,*this,MRMCML::typeCML,form); + + // additional setup specific to mTCA-EVR-300RF + if(model().compare("mTCA-EVR-300RF") == 0) { + // map FPUV2/3 as UNIV18/19 and FPSFP/FPCML as UNIV20/21 + for (unsigned int i = 18; i <= 21; ++i) { + outputs[std::make_pair(OutputFPUniv, i)] + = new MRMOutput(SB() << n << ":FrontUnivOut" << i, this, OutputFPUniv, i); + } + // append CML2 to CML5 to existing CMLs + shortcmls.resize(6); + // Univ2 and Univ3 + shortcmls[2] = new MRMCML(n+":CML2", 2,*this, MRMCML::typeCML,form); + shortcmls[3] = new MRMCML(n+":CML3", 3,*this, MRMCML::typeCML,form); + // SFP + shortcmls[4] = new MRMCML(n+":CML4", 4,*this, MRMCML::typeTG300,form); + // CML + shortcmls[5] = new MRMCML(n+":CML5", 5,*this, MRMCML::typeCML,form); + } } else if(conf->nCML && ver>=MRFVersion(0,4)){ shortcmls.resize(conf->nCML); for(size_t i=0; inCML; i++){ diff --git a/evrMrmApp/src/drvemCML.cpp b/evrMrmApp/src/drvemCML.cpp index 647b276e..d1f1ebff 100644 --- a/evrMrmApp/src/drvemCML.cpp +++ b/evrMrmApp/src/drvemCML.cpp @@ -1,6 +1,7 @@ /*************************************************************************\ * Copyright (c) 2010 Brookhaven Science Associates, as Operator of * Brookhaven National Laboratory. +* Copyright (c) 2022 Cosylab d.d. * mrfioc2 is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -390,7 +391,7 @@ MRMCML::setPattern(pattern p, const unsigned char *buf, epicsUInt32 blen) // If we are given a length that is not a multiple of CML word size // then truncate. if(blen%mult){ - printf("Given length is not a multiple of %u (CML word size). Truncating...\n", mult); + printf("Given length %u is not a multiple of %u (CML word size). Truncating...\n", blen, mult); blen-=blen%mult; } diff --git a/evrMrmApp/src/drvemIocsh.cpp b/evrMrmApp/src/drvemIocsh.cpp index 41cc0206..094d2d85 100644 --- a/evrMrmApp/src/drvemIocsh.cpp +++ b/evrMrmApp/src/drvemIocsh.cpp @@ -2,6 +2,7 @@ * Copyright (c) 2010 Brookhaven Science Associates, as Operator of * Brookhaven National Laboratory. * Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland +* Copyright (c) 2022 Cosylab d.d. * mrfioc2 is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -56,13 +57,14 @@ static const iocshArg mrmEvrSetupPCIArg0 = { "name",iocshArgString}; static const iocshArg mrmEvrSetupPCIArg1 = { "PCI id or slot=#",iocshArgString}; -static const iocshArg * const mrmEvrSetupPCIArgs[2] = -{&mrmEvrSetupPCIArg0,&mrmEvrSetupPCIArg1}; +static const iocshArg mrmEvrSetupPCIArg2 = { "[uTCA model: no param (default) or 'UNIV' or 'IFP' or 'RF]",iocshArgString}; +static const iocshArg * const mrmEvrSetupPCIArgs[3] = +{&mrmEvrSetupPCIArg0,&mrmEvrSetupPCIArg1,&mrmEvrSetupPCIArg2}; static const iocshFuncDef mrmEvrSetupPCIFuncDef = - {"mrmEvrSetupPCI",2,mrmEvrSetupPCIArgs}; + {"mrmEvrSetupPCI",3,mrmEvrSetupPCIArgs}; static void mrmEvrSetupPCICallFunc(const iocshArgBuf *args) { - mrmEvrSetupPCI(args[0].sval,args[1].sval); + mrmEvrSetupPCI(args[0].sval,args[1].sval,args[2].sval); } static const iocshArg mrmEvrSetupVMEArg0 = { "name",iocshArgString}; diff --git a/evrMrmApp/src/drvemIocsh.h b/evrMrmApp/src/drvemIocsh.h index c547d893..00a4a73b 100644 --- a/evrMrmApp/src/drvemIocsh.h +++ b/evrMrmApp/src/drvemIocsh.h @@ -1,6 +1,7 @@ /*************************************************************************\ * Copyright (c) 2010 Brookhaven Science Associates, as Operator of * Brookhaven National Laboratory. +* Copyright (c) 2022 Cosylab d.d. * mrfioc2 is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -34,7 +35,7 @@ epicsShareExtern int evrmrmVerb; void epicsShareFunc -mrmEvrSetupPCI(const char* id, const char* pcispec); +mrmEvrSetupPCI(const char* id, const char* pcispec, const char* mtca_evr_model); void epicsShareFunc mrmEvrSetupVME(const char* id,int slot,int base,int level, int vector); diff --git a/evrMrmApp/src/drvemOutput.cpp b/evrMrmApp/src/drvemOutput.cpp index 49677987..54cd7966 100644 --- a/evrMrmApp/src/drvemOutput.cpp +++ b/evrMrmApp/src/drvemOutput.cpp @@ -1,6 +1,7 @@ /*************************************************************************\ * Copyright (c) 2013 Brookhaven Science Associates, as Operator of * Brookhaven National Laboratory. +* Copyright (c) 2022 Cosylab d.d. * mrfioc2 is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -50,9 +51,8 @@ void MRMOutput::setSource(epicsUInt32 v) { if( ! ( (v<=63 && v>=61) || - (v<=55 && v>=48) || - (v<=42 && v>=32) || - (v<=15) ) + (v<=55 && v>=32) || + (v<=23) ) ) throw std::out_of_range("Mapping code is out of range"); @@ -67,9 +67,8 @@ void MRMOutput::setSource2(epicsUInt32 v) { if( ! ( (v<=63 && v>=61) || - (v<=55 && v>=48) || - (v<=42 && v>=32) || - (v<=15) ) + (v<=55 && v>=32) || + (v<=23) ) ) throw std::out_of_range("Mapping code is out of range"); diff --git a/evrMrmApp/src/drvemSetup.cpp b/evrMrmApp/src/drvemSetup.cpp index 17d39a26..9ffa716d 100755 --- a/evrMrmApp/src/drvemSetup.cpp +++ b/evrMrmApp/src/drvemSetup.cpp @@ -2,6 +2,7 @@ * Copyright (c) 2010 Brookhaven Science Associates, as Operator of * Brookhaven National Laboratory. * Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland +* Copyright (c) 2022 Cosylab d.d. * mrfioc2 is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -173,12 +174,50 @@ static const EVRMRM::Config cpci_evr_300 = { 2, // FP inputs }; +static const EVRMRM::Config mtca_evr_300rf = { + "mTCA-EVR-300RF", + 24, // pulse generators + 8, // prescalers + 0, // FP outputs + 2, // FPUV outputs (only FPUV0/1, mapped to FrontUnivOut0/1, FPUV2/3 mapped in the code to FrontUnivOut18/19) + 10, // RB outputs (RTM) + 8, // Backplane outputs + 2, // FP Delay outputs + 4, // CML/GTX outputs - one univ. I/O slot (2 outputs), 1x SFP, 1x CML + MRMCML::typeTG300, + /** + * 0 <= N <= 1 : FPInMap + * 2 <= N <= 15 : UnivInMap + * 16 <= N <= 25 : BPInMap + */ + 26, // FP, Univ, BP inputs +}; + +static const EVRMRM::Config mtca_evr_300u = { // with UNIV slots on FP + "mTCA-EVR-300U", + 24, // pulse generators + 8, // prescalers + 4, // FP outputs + 4, // FPUV outputs + 16, // RB outputs (RTM) + 8, // Backplane outputs + 2, // FP Delay outputs + 0, // CML/GTX outputs + MRMCML::typeTG300, + /** + * 0 <= N <= 3 : FPInMap + * 4 <= N <= 23 : UnivInMap + * 24 <= N <= 31 : BPInMap + */ + 32, // FP, Univ, BP inputs +}; +// Default MTCA EVR static const EVRMRM::Config mtca_evr_300 = { "mTCA-EVR-300", - 16, // pulse generators + 24, // pulse generators 8, // prescalers 4, // FP outputs - 18, // Univ outputs (16 via external IFB + 2 handled specially) + 16, // Univ outputs 10, // RB outputs (10 EVRTM) 8, // Backplane outputs 2, // FP Delay outputs @@ -192,6 +231,25 @@ static const EVRMRM::Config mtca_evr_300 = { */ 58, // FP, Univ, BP, TB inputs }; +// Obsolte model +static const EVRMRM::Config mtca_evr_300ifb = { + "mTCA-EVR-300IFB", + 16, // pulse generators + 8, // prescalers + 4, // FP outputs + 0, // FPUV outputs + 16, // RB outputs (via external IFB) + 8, // Backplane outputs + 2, // FP Delay outputs + 0, // CML/GTX outputs + MRMCML::typeTG300, + /** + * 0 <= N <= 3 : FPInMap + * 4 <= N <= 23 : UnivInMap + * 24 <= N <= 31 : BPInMap + */ + 32, // FP, Univ, BP inputs +}; static const EVRMRM::Config pcie_evr_300 = { "PCIe-EVR-300DC", @@ -438,7 +496,7 @@ static bool checkUIOVersion(int,int,int*) {return false;} #endif void -mrmEvrSetupPCI(const char* id,const char* pcispec) +mrmEvrSetupPCI(const char* id,const char* pcispec, const char* mtca_evr_model) { try { bus_configuration bus; @@ -479,8 +537,26 @@ try { case PCI_DEVICE_ID_MRF_PXIEVR_230: conf = &cpci_evr_230; break; case PCI_DEVICE_ID_MRF_EVRTG_300: conf = &cpci_evrtg_300; break; case PCI_DEVICE_ID_MRF_CPCIEVR300: conf = &cpci_evr_300; break; - case PCI_DEVICE_ID_MRF_EVRMTCA300: conf = &mtca_evr_300; break; - // ambiguity + case PCI_DEVICE_ID_MRF_EVRMTCA300: + if (mtca_evr_model == NULL) + { + // if no EVR type is provided, we assume mtca_evr_300 generic as this was the default beforehand + mtca_evr_model = "default"; + conf = &mtca_evr_300; + } else if (strcmp(mtca_evr_model, "UNIV") == 0) { + printf("Config for EVR FP UNIV model (mTCA-EVR-300U).\n"); + conf = &mtca_evr_300u; + } else if (strcmp(mtca_evr_model, "IFB") == 0) { + printf("Config for EVR FP IFB model (mTCA-EVR-300IFB - obsolete).\n"); + conf = &mtca_evr_300ifb; + } else if (strcmp(mtca_evr_model, "RF") == 0) { + printf("Config for EVR FP RF model (mTCA-EVR-300RF).\n"); + conf = &mtca_evr_300rf; + } else { + printf("Error: mtca_evr_model arg (%s), needs no param (default) or 'UNIV' or 'RF' or 'IFB'.\n", mtca_evr_model); + return; + } + break; case PCI_DEVICE_ID_MRF_EVRTG_300E: // aka PCI_SUBDEVICE_ID_PCIE_EVR_300 switch (cur->id.device) { case PCI_DEVICE_ID_EC_30: conf = &cpci_evrtg_300; break;