MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / state_PRTAD

Method state_PRTAD

libsigrokdecode4DSL/decoders/mdio/pd.py:223–250  ·  view source on GitHub ↗
(self, mdio)

Source from the content-addressed store, hash-verified

221 self.state = 'PRTAD'
222
223 def state_PRTAD(self, mdio):
224 if self.portad == -1:
225 self.portad = 0
226 if self.clause45:
227 if self.opcode == 0:
228 op = ['OP: ADDR', 'OP: A']
229 elif self.opcode == 1:
230 op = ['OP: WRITE', 'OP: W']
231 self.is_read = False
232 elif self.opcode == 2:
233 op = ['OP: READINC', 'OP: RI']
234 self.is_read = True
235 elif self.opcode == 3:
236 op = ['OP: READ', 'OP: R']
237 self.is_read = True
238 else:
239 op = ['OP: READ', 'OP: R'] if self.opcode else ['OP: WRITE', 'OP: W']
240 self.is_read = True if self.opcode else False
241
242 self.putff([2, op + ['OP', 'O']])
243 if self.op_invalid:
244 self.putff([4, ['OP %s' % self.op_invalid, 'OP', 'O']])
245 self.ss_frame_field = self.samplenum
246
247 self.portad_bits -= 1
248 self.portad |= mdio << self.portad_bits
249 if not self.portad_bits:
250 self.state = 'DEVAD'
251
252 def state_DEVAD(self, mdio):
253 if self.devad == -1:

Callers

nothing calls this directly

Calls 1

putffMethod · 0.95

Tested by

no test coverage detected