DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
timing.shells.fanout.FanoutShell Class Reference
Inheritance diagram for timing.shells.fanout.FanoutShell:
[legend]
Collaboration diagram for timing.shells.fanout.FanoutShell:
[legend]

Public Member Functions

 scanports (self)
 
- Public Member Functions inherited from timing.shells.master.MasterShell
 __init__ (self)
 
 identify (self)
 
 initPartitions (self)
 
 synctime (self)
 
 enableEptAndWaitForReady (self, aTimeout=0.5)
 
 send_echo_and_measure_delay (self, aTimeout=0.5)
 
 pushDelay (self, aAddr, aCDel)
 
 enableEndpointSFP (self, aAddr, aEnable=1)
 

Additional Inherited Members

- Public Attributes inherited from timing.shells.master.MasterShell
str kFWMajorRequired = 'red')
 
 masterCtx = lMstCtx
 
 ioNode = lIO
 
- Static Public Attributes inherited from timing.shells.master.MasterShell
int kFWMajorRequired = 5
 

Detailed Description

Definition at line 25 of file fanout.py.

Member Function Documentation

◆ scanports()

timing.shells.fanout.FanoutShell.scanports ( self)

Definition at line 27 of file fanout.py.

27 def scanports(self):
28
29 lDevice = self.device
30 lGlobal = self.masterCtx.globalNode
31 lBoardType = self.info.boardType
32
33 if lBoardType != kBoardPC059:
34 raise RuntimeError('Mux is only available on PC059 boards')
35
36 lLocked = []
37 for mux in range(0,8):
38 secho('Scanning slot {}'.format(mux), fg='cyan')
39
40 lDevice.getNode('io.csr.ctrl.mux').write(mux)
41 lDevice.dispatch()
42 # echo('SFP input mux set to {}'.format(mux))
43
44 try:
45 self.enableEptAndWaitForReady()
46 lState = lGlobal.getNode('csr.stat.ep_stat').read()
47 lFDel = lGlobal.getNode('csr.stat.ep_fdel').read()
48 lEdge = lGlobal.getNode('csr.stat.ep_edge').read()
49 lGlobal.getClient().dispatch()
50
51 secho('Endpoint locked: state={}, fdel={}, edge={}'.format(hex(lState), hex(lFDel), hex(lEdge)), fg='blue')
52 lLocked.append(mux)
53 except RuntimeError as e:
54 secho('Slot {}: no lock - {}'.format(mux,e), fg='yellow')
55
56 echo()
57 if lLocked:
58 secho('Locked slots {}'.format(','.join( ( str(l) for l in lLocked))), fg='green')
59 else:
60 secho('No slots locked', fg='red')
61 return lLocked
62

The documentation for this class was generated from the following file: