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

Public Member Functions

 getAX3Slave (self)
 
 getUIDSlave (self)
 
 getSIChipSlave (self)
 
 resetI2CnPll (self)
 
 enableI2CSwitch (self)
 
 reset (self, soft, forcepllcfg)
 
- Public Member Functions inherited from timing.shells.boards.BoardShell
 soft_reset (self)
 
 readUID (self)
 
 scanI2C (self)
 
 pingI2CSlaves (self)
 
 measureClockFrequency (self)
 
 status (self)
 
 pllstatus (self, verbose=False)
 

Static Public Attributes

int kFMCRev1 = 1
 
int kFMCRev2 = 2
 
dict kUIDRevisionMap
 
dict kClockConfigMap
 
list i2cMasters
 

Additional Inherited Members

- Public Attributes inherited from timing.shells.boards.BoardShell
 i2cMasters = lIO.getNode(lI2CName)
 

Detailed Description

docstring for PC059Shell

Definition at line 18 of file fmc.py.

Member Function Documentation

◆ enableI2CSwitch()

timing.shells.fmc.FMCShell.enableI2CSwitch ( self)

Reimplemented from timing.shells.boards.BoardShell.

Definition at line 88 of file fmc.py.

88 def enableI2CSwitch(self):
89 if self.info.carrierType == kCarrierEnclustraA35:
90 super(FMCShell, self).enableI2CSwitch()

◆ getAX3Slave()

timing.shells.fmc.FMCShell.getAX3Slave ( self)

Definition at line 55 of file fmc.py.

55 def getAX3Slave(self):
56 lIO = self.device.getNode('io')
57 return lIO.getNode('uid_i2c').get_slave('AX3_Switch')

◆ getSIChipSlave()

timing.shells.fmc.FMCShell.getSIChipSlave ( self)

Definition at line 67 of file fmc.py.

67 def getSIChipSlave(self):
68 lIO = self.device.getNode('io')
69 return lIO.getNode('pll_i2c')

◆ getUIDSlave()

timing.shells.fmc.FMCShell.getUIDSlave ( self)

Definition at line 61 of file fmc.py.

61 def getUIDSlave(self):
62 lIO = self.device.getNode('io')
63 return lIO.getNode('uid_i2c').get_slave('FMC_UID_PROM')

◆ reset()

timing.shells.fmc.FMCShell.reset ( self,
soft,
forcepllcfg )
Perform a hard reset on the timing master, including

\b
- ipbus registers
- i2c buses
- pll and pll configuration

\b
Fanout mode:
0 = local master
1 = sfp

Definition at line 94 of file fmc.py.

94 def reset(self, soft, forcepllcfg):
95 '''
96 Perform a hard reset on the timing master, including
97
98 \b
99 - ipbus registers
100 - i2c buses
101 - pll and pll configuration
102
103 \b
104 Fanout mode:
105 0 = local master
106 1 = sfp
107 '''
108
109 echo('Resetting ' + click.style(self.device.id(), fg='blue'))
110
111 lDevice = self.device
112 lBoardType = self.info.boardType
113 lCarrierType = self.info.carrierType
114 lDesignType = self.info.designType
115
116 lIO = lDevice.getNode('io')
117
118 # Global soft reset
119 self.soft_reset()
120
121 if not soft:
122 time.sleep(0.1)
123
124 # PLL and I2C reset
125 self.resetI2CnPll()
126
127 # Enable I2C routing
128 self.enableI2CSwitch()
129
130 lUniqueID = self.readUID()
131 # echo("Timing Board PROM UID: "+style(hex(lUniqueID), fg="blue"))
132
133 # Ensure that the board is known to the revision DB
134 try:
135 lRevision = self.kUIDRevisionMap[lUniqueID]
136 except KeyError:
137 raise click.ClickException("No revision associated to UID "+hex(lUniqueID))
138
139 # Access the clock chip
140 lSIChip = self.getSIChipSlave()
141
142 # Ensure that the board revision has a registered clock config
143 if forcepllcfg is not None:
144 lFullClockConfigPath = forcepllcfg
145 echo("Using PLL Clock configuration file: "+style(basename(lFullClockConfigPath), fg='green') )
146
147 else:
148 try:
149 lClockConfigPath = self.kClockConfigMap[lRevision]
150 except KeyError:
151 raise ClickException("Board revision " << lRevision << " has no associated clock configuration")
152
153
154 echo("PLL Clock configuration file: "+style(lClockConfigPath, fg='green') )
155
156 # Configure the clock chip
157 lFullClockConfigPath = expandvars(join('${TIMING_SHARE}/config/etc/clock', lClockConfigPath))
158
159 lSIChip.configure(lFullClockConfigPath)
160 echo("SI354x configuration id: {}".format(style(lSIChip.read_config_id(), fg='green')))
161
162# ------------------------------------------------------------------------------
163

◆ resetI2CnPll()

timing.shells.fmc.FMCShell.resetI2CnPll ( self)

Definition at line 74 of file fmc.py.

74 def resetI2CnPll(self):
75 lIO = self.device.getNode('io')
76
77 time.sleep(0.1)
78
79 # PLL and I2C reset
80 lIO.getNode('csr.ctrl.pll_rst').write(0x1)
81 lIO.getClient().dispatch()
82
83 lIO.getNode('csr.ctrl.pll_rst').write(0x0)
84 lIO.getClient().dispatch()

Member Data Documentation

◆ i2cMasters

list timing.shells.fmc.FMCShell.i2cMasters
static
Initial value:
= [
'uid_i2c',
'sfp_i2c',
'pll_i2c'
]

Definition at line 48 of file fmc.py.

◆ kClockConfigMap

dict timing.shells.fmc.FMCShell.kClockConfigMap
static
Initial value:
= {
kFMCRev1: "SI5344/PDTS0000.txt",
kFMCRev2: "SI5344/PDTS0003.txt",
}

Definition at line 43 of file fmc.py.

◆ kFMCRev1

int timing.shells.fmc.FMCShell.kFMCRev1 = 1
static

Definition at line 20 of file fmc.py.

◆ kFMCRev2

int timing.shells.fmc.FMCShell.kFMCRev2 = 2
static

Definition at line 21 of file fmc.py.

◆ kUIDRevisionMap

dict timing.shells.fmc.FMCShell.kUIDRevisionMap
static
Initial value:
= {
0xd880395e720b: kFMCRev1,
0xd880395e501a: kFMCRev1,
0xd880395e50b8: kFMCRev1,
0xd880395e501b: kFMCRev1,
0xd880395e7201: kFMCRev1,
0xd880395e4fcc: kFMCRev1,
0xd880395e5069: kFMCRev1,
0xd880395e7206: kFMCRev1,
0xd880395e1c86: kFMCRev2,
0xd880395e2630: kFMCRev2,
0xd880395e262b: kFMCRev2,
0xd880395e2b38: kFMCRev2,
0xd880395e1a6a: kFMCRev2,
0xd880395e36ae: kFMCRev2,
0xd880395e2b2e: kFMCRev2,
0xd880395e2b33: kFMCRev2,
0xd880395e1c81: kFMCRev2,
}

Definition at line 23 of file fmc.py.


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