def openConn(self, pId, pVersion, pMessage): Device.openConn(self, pId, pVersion, pMessage) for k, v in self.postConnectConfig.items(): try: self.setConfig(k, v) except NativeException, e: # ignore missing config item on older firmware if e.getRDDIErrorCode() != RDDI.RDDI_ITEMNOTSUP: raise
def discoverDevices(self): '''Find and create devices''' self.dap = CSDAP(self, 2, "DAP") cortexM3coreDevs = [3] self.cortexM3cores = [] streamID = 1 etmDevs = [6] self.ETMs = [] # ITM 0 self.ITM0 = self.createITM(4, streamID, "ITM0") streamID += 1 for i in range(0, NUM_CORES_CORTEX_M3): # Create core core = Device(self, cortexM3coreDevs[i], "Cortex-M3") self.cortexM3cores.append(core) for i in range(0, len(etmDevs)): # Create ETM etm = self.createETM(etmDevs[i], streamID, "ETMs[%d]" % i) streamID += 1 # DSTREAM self.DSTREAM = DSTREAMTraceCapture(self, "DSTREAM") # TPIU self.TPIU = self.createTPIU(5, "TPIU")
def discoverDevices(self): '''find and create devices''' dapDev = self.findDevice("ARMCS-DP") self.dap = CSDAP(self, dapDev, "DAP") cortexA53coreDev = 0 self.cortexA53cores = [] streamID = 0 for i in range(0, NUM_CORES_CORTEX_A53): # create core cortexA53coreDev = self.findDevice("Cortex-A53", cortexA53coreDev+1) dev = Device(self, cortexA53coreDev, "Cortex-A53_%d" % i) self.cortexA53cores.append(dev)
def closeConn(self): self.isConnected = False Device.closeConn(self)
def __init__(self, configuration, deviceNumber, name): Device.__init__(self, configuration, deviceNumber, name) self.postConnectConfig = {} self.isConnected = False
def discoverDevices(self): '''find and create devices''' dapDev = self.findDevice("ARMCS-DP") self.dap = CSDAP(self, dapDev, "DAP") cortexA15coreDev = 0 self.cortexA15cores = [[] for i in range(NUM_CLUSTERS)] streamID = ATB_ID_BASE # System STM stmDev = self.findDevice("CSSTM") self.systemSTM = STMImpl(self, stmDev, streamID, "STM_sys") streamID += 1 # CCN-504 STM stmDev = self.findDevice("CSSTM", stmDev + 1) self.ccnSTM = STMImpl(self, stmDev, streamID, "STM_ccn") streamID += 1 # CTI for ETB0 & ETB1 outCTIDev = self.findDevice("CSCTI") self.outCTI_0 = CSCTI(self, outCTIDev, "CTI_out_0") # CTI for ETB2 & ETB3 outCTIDev = self.findDevice("CSCTI", outCTIDev + 1) self.outCTI_1 = CSCTI(self, outCTIDev, "CTI_out_1") # CTI for System STM sysCTIDev = self.findDevice("CSCTI", outCTIDev + 1) self.systemCTI = CSCTI(self, sysCTIDev, "CTI_sys") # CTI for CCN-504 STM ccnCTIDev = self.findDevice("CSCTI", sysCTIDev + 1) self.ccnCTI = CSCTI(self, ccnCTIDev, "CTI_ccn") # ETBs (TMCs) etbDev = 0 self.ETBs = [] for c in range(NUM_CLUSTERS): etbDev = self.findDevice("CSTMC", etbDev + 1) self.ETBs.append(TMCETBTraceCapture(self, etbDev, "ETB_%d" % c)) # ETB for System STM etbDev = self.findDevice("CSTMC", etbDev + 1) self.systemETB = TMCETBTraceCapture(self, etbDev, "ETB_sys") # ETB for System CCN-504 etbDev = self.findDevice("CSTMC", etbDev + 1) self.ccnETB = TMCETBTraceCapture(self, etbDev, "ETB_ccn") funnelDev = 0 self.funnels = [] coreCTIDev = ccnCTIDev self.coreCTIs = [[] for i in range(NUM_CLUSTERS)] self.cortexA15ctiMap = {} # map cores to associated CTIs ptmDev = 1 self.PTMs = [[] for i in range(NUM_CLUSTERS)] funnelDev = 1 for c in range(NUM_CLUSTERS): for i in range(CLUSTER_SIZES[c]): # create core cortexA15coreDev = self.findDevice("Cortex-A15", cortexA15coreDev + 1) dev = Device(self, cortexA15coreDev, "Cortex-A15_%d_%d" % (c, i)) self.cortexA15cores[c].append(dev) # create CTI for this core coreCTIDev = self.findDevice("CSCTI", coreCTIDev + 1) coreCTI = CSCTI(self, coreCTIDev, "CTI_%d_%d" % (c, i)) self.coreCTIs.append(coreCTI) self.cortexA15ctiMap[dev] = coreCTI # create the PTM for this core ptmDev = self.findDevice("CSPTM", ptmDev + 1) ptm = PTMTraceSource(self, ptmDev, streamID, "PTM_%d_%d" % (c, i)) streamID += 1 # disabled by default - will enable with option ptm.setEnabled(False) self.PTMs[c].append(ptm) # Funnel funnelDev = self.findDevice("CSTFunnel", funnelDev + 1) self.funnels.append(self.createFunnel(funnelDev, "Funnel_%d" % c))