Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

Commit 3119cea

Browse files
author
Jerzy Jamroz
committed
feat: Optimization for the global environment access.
1 parent 44cfb2c commit 3119cea

File tree

3 files changed

+47
-23
lines changed

3 files changed

+47
-23
lines changed

cmds/test/st-evg.cmd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# .cmd
2+
require "mrfioc2" "2.2.1rc1"
3+
4+
epicsEnvSet "TOP" "$(E3_CMD_TOP)/../.."
5+
epicsEnvSet "PEVG" "MTCA5U-EVG"
6+
7+
#epicsEnvSet "EVT_PMORTEM" "66"
8+
9+
# Load environment
10+
iocshLoad "$(TOP)/iocsh/mtca.iocsh"
11+
#iocshLoad "$(TOP)/iocsh/ts.iocsh"
12+
13+
## Load record instances
14+
iocshLoad "$(TOP)/iocsh/evm.iocsh" "P=$(PEVG), OBJ=EVG, PCIID=$(MTCA_5U_PCIID7)"
15+
16+
iocInit
17+
18+
iocshLoad "$(TOP)/iocsh/evgr.iocsh" "P=$(PEVG), INTRF=, INTPPS="
19+
iocshLoad "$(TOP)/iocsh/evgasynr.iocsh" "P=$(PEVG), EVT_PMORTEM=$(EVT_PMORTEM=40), EVT_PMORTEMI=$(EVT_PMORTEMI=41), EVT_DOD=$(EVT_DOD=42), EVT_DODI=$(EVT_DODI=43)"
20+
21+
# EOF
22+
23+
24+

iocsh/evgasynr.iocsh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
# ==========
33

44
# Trigger embedded EVR U with the post-mortem upstream input event
5-
dbpf $(P)$(R=)$(U=U:)DlyGen0-Evt-Trig0-SP $(EVT_PMORTEMI)
6-
dbpf $(P)$(R=)$(U=U:)DlyGen0-Width-SP 1
7-
dbpf $(P)$(R=)$(U=U:)OutFP0-Src-Pulse-SP "Pulser 0"
5+
dbpf $(P)$(R=)$(U=":EVRU-")DlyGen0-Evt-Trig0-SP $(EVT_PMORTEMI)
6+
dbpf $(P)$(R=)$(U=":EVRU-")DlyGen0-Width-SP 1
7+
dbpf $(P)$(R=)$(U=":EVRU-")OutFP0-Src-Pulse-SP "Pulser 0"
88
# Broadcast the post-mortemevent
9-
dbpf $(P)$(R=)$(S=:)TrigEvt2-EvtCode-SP $(EVT_PMORTEM)
10-
dbpf $(P)$(R=)$(S=:)TrigEvt2-TrigSrc-Cont-Sel "Univ8"
9+
dbpf $(P)$(R=)$(S=":")TrigEvt2-EvtCode-SP $(EVT_PMORTEM)
10+
dbpf $(P)$(R=)$(S=":")TrigEvt2-TrigSrc-Cont-Sel "Univ8"
1111

1212
# Trigger embedded EVR U with the data-on-demand upstream input event
13-
dbpf $(P)$(R=)$(U=U:)DlyGen1-Evt-Trig0-SP $(EVT_DODI)
14-
dbpf $(P)$(R=)$(U=U:)DlyGen1-Width-SP 1
15-
dbpf $(P)$(R=)$(U=U:)OutFP1-Src-Pulse-SP "Pulser 1"
13+
dbpf $(P)$(R=)$(U=":EVRU-")DlyGen1-Evt-Trig0-SP $(EVT_DODI)
14+
dbpf $(P)$(R=)$(U=":EVRU-")DlyGen1-Width-SP 1
15+
dbpf $(P)$(R=)$(U=":EVRU-")OutFP1-Src-Pulse-SP "Pulser 1"
1616
# Broadcast the data-on-demand event
17-
dbpf $(P)$(R=)$(S=:)TrigEvt3-EvtCode-SP $(EVT_DOD)
18-
dbpf $(P)$(R=)$(S=:)TrigEvt3-TrigSrc-Cont-Sel "Univ9"
17+
dbpf $(P)$(R=)$(S=":")TrigEvt3-EvtCode-SP $(EVT_DOD)
18+
dbpf $(P)$(R=)$(S=":")TrigEvt3-TrigSrc-Cont-Sel "Univ9"
1919

2020
#EOF

iocsh/evgr.iocsh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
# ==========
33

44
# Set EVM as master (EVG) and run sequences
5-
dbpf $(P)$(R=)$(S=:)Enable-Sel "Ena Master"
5+
dbpf $(P)$(R=)$(S=":")Enable-Sel "Ena Master"
66
# Select the RF input
7-
$(INTRF="#")dbpf $(P)$(R=)$(S=:)EvtClk-Source-Sel "FracSyn (Int)"
8-
$(EXTRF="#")dbpf $(P)$(R=)$(S=:)EvtClk-Source-Sel "RF (Ext)"
7+
$(INTRF="#")dbpf $(P)$(R=)$(S=":")EvtClk-Source-Sel "FracSyn (Int)"
8+
$(EXTRF="#")dbpf $(P)$(R=)$(S=":")EvtClk-Source-Sel "RF (Ext)"
99
# Change to PPS once connected
10-
$(INTPPS="#")dbpf $(P)$(R=)$(S=:)1ppsInp-Sel "Sys Clk"
11-
$(EXTPPS="#")dbpf $(P)$(R=)$(S=:)1ppsInp-Sel "Front0"
12-
$(EXTPPS="#")dbpf $(P)$(R=)$(S=:)1ppsInp-MbbiDir_.TPRO "1"
13-
$(EXTPPS="#")dbpf $(P)$(R=)$(S=:)TrigEvt4-TrigSrc-Sel "Front0"
14-
$(EXTPPS="#")dbpf $(P)$(R=)$(S=:)TrigEvt4-EvtCode-SP "$(EVT_PPS=125)"
10+
$(INTPPS="#")dbpf $(P)$(R=)$(S=":")1ppsInp-Sel "Sys Clk"
11+
$(EXTPPS="#")dbpf $(P)$(R=)$(S=":")1ppsInp-Sel "Front0"
12+
$(EXTPPS="#")dbpf $(P)$(R=)$(S=":")1ppsInp-MbbiDir_.TPRO "1"
13+
$(EXTPPS="#")dbpf $(P)$(R=)$(S=":")TrigEvt4-TrigSrc-Sel "Front0"
14+
$(EXTPPS="#")dbpf $(P)$(R=)$(S=":")TrigEvt4-EvtCode-SP "$(EVT_PPS=125)"
1515
epicsThreadSleep "1"
1616

17-
dbpf $(P)$(R=)$(S=:)SyncTimestamp-Cmd "1"
17+
dbpf $(P)$(R=)$(S=":")SyncTimestamp-Cmd "1"
1818

1919
# Heartbeat 1Hz
20-
dbpf $(P)$(R=)$(S=:)Mxc7-Polarity-Sel "Orginal"
21-
dbpf $(P)$(R=)$(S=:)Mxc7-Prescaler-SP "$(MXC_1HZ=88052500)"
22-
dbpf $(P)$(R=)$(S=:)TrigEvt7-EvtCode-SP "$(EVT_HBEAT=122)"
23-
dbpf $(P)$(R=)$(S=:)TrigEvt7-TrigSrc-Sel "Mxc7"
20+
dbpf $(P)$(R=)$(S=":")Mxc7-Polarity-Sel "Orginal"
21+
dbpf $(P)$(R=)$(S=":")Mxc7-Prescaler-SP "$(MXC_1HZ=88052500)"
22+
dbpf $(P)$(R=)$(S=":")TrigEvt7-EvtCode-SP "$(EVT_HBEAT=122)"
23+
dbpf $(P)$(R=)$(S=":")TrigEvt7-TrigSrc-Sel "Mxc7"
2424

2525
#EOF

0 commit comments

Comments
 (0)