Skip to content

feat: add mtca evm backplane input trigger db#219

Open
Insomnia1437 wants to merge 1 commit into
epics-modules:masterfrom
Insomnia1437:bpin
Open

feat: add mtca evm backplane input trigger db#219
Insomnia1437 wants to merge 1 commit into
epics-modules:masterfrom
Insomnia1437:bpin

Conversation

@Insomnia1437
Copy link
Copy Markdown
Contributor

Add backplane input related DB for mtca EVM, now EVM can use backplane input as trigger sources for

  1. trigger events
  2. DBus
  3. Sequencer trigger

Verification sequences

generate 1 Hz test clock using EVR prescaler 0 and output to backplane 0

Hardware connection

MTCA-EVM-300 -> MTCA-EVR-300RF

backplane 0 as trigger source for EVM trigger events

# 1 Hz prescaler inside EVR
$ caget TT:MTCA-EVR-300:PS0Rate-I
TT:MTCA-EVR-300:PS0Rate-I      9.99994e-07

# use event 14 for test
$ caget TT:MTCA-EVM-300:TrigEvt0EvtCode-SP
TT:MTCA-EVM-300:TrigEvt0EvtCode-SP 14

# set EVM trigger event trigger source to backplane 0
$ caput TT:MTCA-EVM-300:TrigEvt0TrigSrc3-Sel 1
Old : TT:MTCA-EVM-300:TrigEvt0TrigSrc3-Sel Off
New : TT:MTCA-EVM-300:TrigEvt0TrigSrc3-Sel Back0

$ caget TT:MTCA-EVR-300:EvtE-SP.OUT
TT:MTCA-EVR-300:EvtE-SP.OUT    @OBJ=EVR,Code=14

$ caget TT:MTCA-EVR-300:EvtECnt-I
TT:MTCA-EVR-300:EvtECnt-I      0

# output 1 Hz clock to backplane 0
$ caput TT:MTCA-EVR-300:OutBack0SrcScale-SP 0
Old : TT:MTCA-EVR-300:OutBack0SrcScale-SP Prescaler 0
New : TT:MTCA-EVR-300:OutBack0SrcScale-SP Prescaler 0

$ caget TT:MTCA-EVR-300:OutBack0Src-RB
TT:MTCA-EVR-300:OutBack0Src-RB Prescaler 0

# event 14 received in 1 Hz
$ camonitor TT:MTCA-EVR-300:EvtECnt-I
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:21:24.516371 1
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:21:25.516392 2
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:21:26.516407 3
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:21:27.516429 4
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:21:28.516421 5
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:21:29.516471 6

backplane 0 as trigger source for EVM DBus0

# output 1 Hz clock to FP out0
$ caget TT:MTCA-EVR-300:OutFPUV0Src-RB
TT:MTCA-EVR-300:OutFPUV0Src-RB Prescaler 0

# output DBus0 to FP out1
$ caget TT:MTCA-EVR-300:OutFPUV1Src-RB
TT:MTCA-EVR-300:OutFPUV1Src-RB DBus 0

# output 1 Hz clock to Backplane out0
$ caget TT:MTCA-EVR-300:OutBack0Src-RB
TT:MTCA-EVR-300:OutBack0Src-RB Prescaler 0

# select DBus0 source to Backplane 0
$ caget TT:MTCA-EVM-300:Dbus0Src2-Sel
TT:MTCA-EVM-300:Dbus0Src2-Sel  Back0

verify FP0 and FP1 using oscilloscope
Screenshot_2026-05-25_17-29-20


backplane 0 as trigger source for EVM sequencer trigger

$ caget -# 5 TT:MTCA-EVM-300:SoftSeq0EvtCode-SP
TT:MTCA-EVM-300:SoftSeq0EvtCode-SP 5 14 127 0 0 0

$ caget -# 5 TT:MTCA-EVM-300:SoftSeq0Timestamp-SP
TT:MTCA-EVM-300:SoftSeq0Timestamp-SP 5 10 0 0 0 0

$ caget TT:MTCA-EVM-300:SoftSeq0RunMode-Sel
TT:MTCA-EVM-300:SoftSeq0RunMode-Sel Normal

# set seq0 trig src to back0
$ caput TT:MTCA-EVM-300:SoftSeq0TrigSrc3-Sel 0
Old : TT:MTCA-EVM-300:SoftSeq0TrigSrc3-Sel Back0
New : TT:MTCA-EVM-300:SoftSeq0TrigSrc3-Sel Back0

$ caput TT:MTCA-EVM-300:SoftSeq0Commit-Cmd 1
Old : TT:MTCA-EVM-300:SoftSeq0Commit-Cmd Commit
New : TT:MTCA-EVM-300:SoftSeq0Commit-Cmd Commit

$ caget TT:MTCA-EVM-300:SoftSeq0TrigSrc-RB
TT:MTCA-EVM-300:SoftSeq0TrigSrc-RB Back0

$ caput TT:MTCA-EVM-300:SoftSeq0Load-Cmd 1
Old : TT:MTCA-EVM-300:SoftSeq0Load-Cmd 1
New : TT:MTCA-EVM-300:SoftSeq0Load-Cmd 1

$ caput TT:MTCA-EVM-300:SoftSeq0Enable-Cmd 1
Old : TT:MTCA-EVM-300:SoftSeq0Enable-Cmd 1
New : TT:MTCA-EVM-300:SoftSeq0Enable-Cmd 1

$ camonitor TT:MTCA-EVR-300:EvtECnt-I
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:22:16.517316 0
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:21.532507 1
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:22.532574 2
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:23.532546 3
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:24.532568 4
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:25.532548 5
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:26.532601 6
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:27.532642 7
TT:MTCA-EVR-300:EvtECnt-I      2026-05-25 17:36:28.532635 8

Signed-off-by: DW <di.wang@kek.jp>
@jerzyjamroz
Copy link
Copy Markdown
Contributor

@Insomnia1437, thank you for adding this missing part. It is also good that you tested it with the hardware. I have not checked all the .db processing details, so I trust your validation here.

My comment is about consistency.

Currently:

  1. Trigger Events are assigned to Src3.
  2. Sequencer Trigger Source is assigned to Src3.
  3. The Distribute Bus part is mixed into Src2 together with Front2, Univ11, etc.

I think we should use Src3 consistently, and reserve it only for the Backplane inputs.

P.S.
I know that this DBus part looks like spaghetti in general, but it would be nice to make future changes cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants