93 lI2CBusNode = self.device.getNode(
"io.i2c")
94 lSFPExp = I2CExpanderSlave(lI2CBusNode, lI2CBusNode.get_slave(
'SFPExpander').get_i2c_address())
97 lSFPExp.set_inversion(0, 0x00)
98 lSFPExp.set_inversion(1, 0x00)
101 lSFPExp.set_io(0, 0x00)
102 lSFPExp.set_io(1, 0xff)
105 lSFPExp.set_outputs(0, 0x00)
110 def reset(self, soft, fanout, forcepllcfg):
112 Perform a hard reset on the timing master, including
117 - pll and pll configuration
126 lDevice = self.device
127 lBoardType = self.info.boardType
128 lCarrierType = self.info.carrierType
129 lDesignType = self.info.designType
131 echo(
'Resetting ' + click.style(lDevice.id(), fg=
'blue'))
133 lIO = lDevice.getNode(
'io')
136 secho(
"Fanout mode enabled", fg=
'green')
162 raise click.ClickException(
"No revision associated to UID "+hex(lUniqueID))
165 if forcepllcfg
is not None:
166 lFullClockConfigPath = forcepllcfg
167 echo(
"Using PLL Clock configuration file: "+style(basename(lFullClockConfigPath), fg=
'green') )
170 if lDesignType == kDesignFanout
and fanout
in [0]:
171 secho(
"Overriding clock config - fanout mode", fg=
'green')
177 raise ClickException(
"Board revision " << lRevision <<
" has no associated clock configuration")
180 echo(
"PLL Clock configuration file: "+style(lClockConfigPath, fg=
'green') )
183 lFullClockConfigPath = expandvars(join(
'${TIMING_SHARE}/config/etc/clock', lClockConfigPath))
185 lSIChip.configure(lFullClockConfigPath)
186 echo(
"SI3545 configuration id: {}".format(style(lSIChip.read_config_id(), fg=
'green')))
192 if lDesignType == kDesignFanout:
193 lDevice.getNode(
'switch.csr.ctrl.master_src').write(fanout)
194 lIO.getNode(
'csr.ctrl.mux').write(0)