From 4852be8acc8e59729df0a4b5fc3deb7dddbb621e Mon Sep 17 00:00:00 2001 From: Javier Cereijo Garcia Date: Thu, 6 Dec 2018 13:53:49 +0100 Subject: [PATCH] feat: Added support for DLY universal modules. --- evrMrmApp/Db/Makefile | 1 + evrMrmApp/Db/mrmevrdlymodule.template | 78 +++++++++++++++++++++++++++ evrMrmApp/src/drvemSetup.cpp | 2 +- 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 evrMrmApp/Db/mrmevrdlymodule.template diff --git a/evrMrmApp/Db/Makefile b/evrMrmApp/Db/Makefile index 540d7420..bbadb46d 100644 --- a/evrMrmApp/Db/Makefile +++ b/evrMrmApp/Db/Makefile @@ -10,6 +10,7 @@ DB += mrmevrbase.template DB += mrmevrdc.template DB += mrmevrbufrx.db DB += sequencedemo.db +DB += mrmevrdlymodule.template DB += evr-pmc-230.db DB += evr-cpci-230.db diff --git a/evrMrmApp/Db/mrmevrdlymodule.template b/evrMrmApp/Db/mrmevrdlymodule.template new file mode 100644 index 00000000..907ee15c --- /dev/null +++ b/evrMrmApp/Db/mrmevrdlymodule.template @@ -0,0 +1,78 @@ +# Delay Module control +# +# Macros: +# P = record name prefix +# OBJ = devObj name +# SLOT = Delay module can be fitted in slot 0 or slot 1. +# Enabled = Enable or disable the module. When disabled outputs are pulled to logic low. +# Delay0 = The delay (in ns) of the first output +# Delay1 = The delay (in ns) of the second output + +record(bo, "$(P)Ena-SP") { + field( DESC, "Enable") + field( DTYP, "Obj Prop bool") + field( OUT , "@OBJ=$(OBJ):UnivDlyModule$(SLOT), PROP=Enable") + field( PINI, "YES") + field( ZNAM, "Disabled") + field( ONAM, "Enabled") + field( VAL , "1") # Default to enabled + field( FLNK, "$(P)Ena-RB") + info(autosaveFields_pass0, "VAL") +} + +record(bi, "$(P)Ena-RB") { + field( DESC, "Is module enabled") + field( DTYP, "Obj Prop bool") + field( INP , "@OBJ=$(OBJ):UnivDlyModule$(SLOT), PROP=Enable") + field( ZNAM, "Disabled") + field( ONAM, "Enabled") +} + +record(ao, "$(P)Delay0-SP") { + field( DESC, "First delay output") + field( DTYP, "Obj Prop double") + field( OUT , "@OBJ=$(OBJ):UnivDlyModule$(SLOT), PROP=Delay0") + field( EGU , "ns") + field( PINI, "YES") + field( VAL , "2.200") + field( HOPR, "12.430") + field( LOPR, "2.200") + field( PREC, 2) + field( FLNK, "$(P)Delay0-RB") + info( autosaveFields_pass0, "VAL") +} + +record(ai, "$(P)Delay0-RB") { + field( DESC, "First delay readback") + field( DTYP, "Obj Prop double") + field( INP , "@OBJ=$(OBJ):UnivDlyModule$(SLOT), PROP=Delay0") + field( HIHI, "12.431") + field( LOLO, "2.199") + field( PREC, 2) + field( EGU, "ns") +} + +record(ao, "$(P)Delay1-SP") { + field( DESC, "Second delay output") + field( DTYP, "Obj Prop double") + field( OUT , "@OBJ=$(OBJ):UnivDlyModule$(SLOT), PROP=Delay1") + field( EGU , "ns") + field( PINI, "YES") + field( VAL , "2.200") + field( HOPR, "12.430") + field( LOPR, "2.200") + field( PREC, 2) + field( FLNK, "$(P)Delay1-RB") + info( autosaveFields_pass0, "VAL") +} + +record(ai, "$(P)Delay1-RB") { + field( DESC, "Second delay readback") + field( DTYP, "Obj Prop double") + field( INP , "@OBJ=$(OBJ):UnivDlyModule$(SLOT), PROP=Delay1") + field( HIHI, "12.431") + field( LOLO, "2.199") + field( PREC, 2) + field( EGU, "ns") +} + diff --git a/evrMrmApp/src/drvemSetup.cpp b/evrMrmApp/src/drvemSetup.cpp index e02844b4..456518f9 100644 --- a/evrMrmApp/src/drvemSetup.cpp +++ b/evrMrmApp/src/drvemSetup.cpp @@ -181,7 +181,7 @@ static const EVRMRM::Config mtca_evr_300 = { 18, // FPUV outputs (16 via external IFB + 2 handled specially) 0, // RB outputs 8, // Backplane outputs - 0, // FP Delay outputs + 2, // FP Delay outputs 0, // CML/GTX outputs MRMCML::typeTG300, 2, // FP inputs