summaryrefslogtreecommitdiffstats
path: root/src/tools/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/debug')
-rwxr-xr-xsrc/tools/debug/sbe-debug.py135
-rwxr-xr-xsrc/tools/debug/simics-debug-framework.py49
2 files changed, 93 insertions, 91 deletions
diff --git a/src/tools/debug/sbe-debug.py b/src/tools/debug/sbe-debug.py
index 5d53b408..fad7fd4e 100755
--- a/src/tools/debug/sbe-debug.py
+++ b/src/tools/debug/sbe-debug.py
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016,2019
+# Contributors Listed Below - COPYRIGHT 2016,2020
# [+] International Business Machines Corp.
#
#
@@ -23,6 +23,7 @@
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
+from __future__ import print_function
import os
import subprocess
import re
@@ -63,7 +64,7 @@ def getFilePath(filename):
retPath = os.path.join(dir, filename)
if(os.path.exists(retPath)):
return os.path.abspath(retPath)
- print "ERROR: file " + filename +" not found"
+ print("ERROR: file " + filename +" not found")
return 1
def getTraceFilePath():
@@ -84,7 +85,7 @@ def fillSymTable():
if( len( words ) == 4 ):
syms[words[3]] = [words[0], words[1]]
except:
- print "Symbol file not found, limited commands avaliable"
+ print("Symbol file not found, limited commands avaliable")
def getSymbolInfo( symbol ):
symAddr = ''
@@ -99,8 +100,8 @@ def getSymbolInfo( symbol ):
else:
baseAddr = 0xfffe8000
- print "\n symAddress :", symAddr
- print "\n baseAddress :", baseAddr
+ print("\n symAddress :", symAddr)
+ print("\n baseAddress :", baseAddr)
offset = int(symAddr, base = 16) - baseAddr;
return (hex(offset), length)
@@ -133,13 +134,13 @@ def getSymbolVal(symbol, hexdump=False):
if hexdump:
invokeOsCmd( "hexdump -C "+ output_path +"DumpPIBMEM" )
else:
- print "symbol not found"
+ print("symbol not found")
def invokeOsCmd(cmd):
- print "Running command [" + cmd + "]"
+ print("Running command [" + cmd + "]")
rc = os.system( cmd )
if ( rc ):
- print "ERROR running command: %d " % ( rc )
+ print("ERROR running command: %d " % ( rc ))
return 1
'''
@@ -179,13 +180,13 @@ def forcedCollectTrace():
trace_pattern = [0, 2, 0, 0] + [ord(a) for a in image_str] + [0]
data_read = [0] * len(trace_pattern)
trace_index = 0
- #print trace_pattern
+ #print(trace_pattern)
with open(output_path+"DumpPIBMEM", "r") as f:
byte = 'x'
while byte != "":
byte = f.read(1)
data_read = data_read[1:]+[ord(byte)]
- #print [chr(a) for a in data_read]
+ #print([chr(a) for a in data_read])
if data_read == trace_pattern:
trace_index -= len(trace_pattern)-1
break
@@ -226,8 +227,8 @@ def collectStackUsage():
# Dump stack memory to binary file
invokeOsCmd( "cat "+ output_path +"DumpPIBMEM >"+ output_path + thread )
- print "==================================Stack usage==================================="
- print "Thread".ljust(40)+"Least Available[bytes]".ljust(30)+"Max usage[%]"
+ print("==================================Stack usage===================================")
+ print("Thread".ljust(40)+"Least Available[bytes]".ljust(30)+"Max usage[%]")
for thread in threads:
with open(output_path+thread, "rb") as f:
word = struct.unpack('I', f.read(4))[0]
@@ -241,7 +242,7 @@ def collectStackUsage():
break
else:
break
- print str("["+thread+"]").ljust(40) + str(leastAvailable).ljust(30) + str("%.2f" % (100 * (1 - (leastAvailable/float(int("0x"+syms[thread][1], 16))))))
+ print(str("["+thread+"]").ljust(40) + str(leastAvailable).ljust(30) + str("%.2f" % (100 * (1 - (leastAvailable/float(int("0x"+syms[thread][1], 16)))))))
def getSbeCommit():
getSymbolVal( 'SBEGlobalsSingleton.*fwCommitId' )
@@ -249,7 +250,7 @@ def getSbeCommit():
with open(output_path+"DumpPIBMEM", "rb") as f:
# Big Endian word
word = struct.unpack('>I', f.read(4))[0]
- print "SBE commit:", hex(word)
+ print("SBE commit:", hex(word))
def ppeStateFfdc():
# Keep this structure in sync with src/sbefw/core/sbeirqregistersave.H
@@ -274,25 +275,25 @@ def ppeStateFfdc():
data = f.read()
ctypes.memmove(ctypes.addressof(ppestateffdc), data, ctypes.sizeof(ppestateffdc))
- print '''
+ print('''
---------------------------------------------------------------------------------
Please verify sbe_DD2.syms is valid for this dump, before depending on the values
----------------------------------------------------------------------------------'''
+---------------------------------------------------------------------------------''')
if ppestateffdc.validbyte == 0x1 and ppestateffdc.magicbyte == 0xA5:
- print "ppestateffdc.version 0x%04X" % ppestateffdc.version
- print "ppestateffdc.magicbyte 0x%02X" % ppestateffdc.magicbyte
- print "ppestateffdc.validbyte 0x%02X" % ppestateffdc.validbyte
- print "ppestateffdc.register_SRR0 0x%08X" % ppestateffdc.register_SRR0
- print "ppestateffdc.register_SRR1 0x%08X" % ppestateffdc.register_SRR0
- print "ppestateffdc.register_ISR 0x%08X" % ppestateffdc.register_ISR
- print "ppestateffdc.register_FI2C_CONFIG_LOWER_32BITS 0x%08X" % ppestateffdc.register_FI2C_CONFIG_LOWER_32BITS
- print "ppestateffdc.register_FI2C_CONFIG_UPPER_32BITS 0x%08X" % ppestateffdc.register_FI2C_CONFIG_UPPER_32BITS
- print "ppestateffdc.register_FI2C_STAT_LOWER_32BITS 0x%08X" % ppestateffdc.register_FI2C_STAT_LOWER_32BITS
- print "ppestateffdc.register_FI2C_STAT_UPPER_32BITS 0x%08X" % ppestateffdc.register_FI2C_STAT_UPPER_32BITS
- print "ppestateffdc.register_LR 0x%08X" % ppestateffdc.register_LR
+ print("ppestateffdc.version 0x%04X" % ppestateffdc.version)
+ print("ppestateffdc.magicbyte 0x%02X" % ppestateffdc.magicbyte)
+ print("ppestateffdc.validbyte 0x%02X" % ppestateffdc.validbyte)
+ print("ppestateffdc.register_SRR0 0x%08X" % ppestateffdc.register_SRR0)
+ print("ppestateffdc.register_SRR1 0x%08X" % ppestateffdc.register_SRR0)
+ print("ppestateffdc.register_ISR 0x%08X" % ppestateffdc.register_ISR)
+ print("ppestateffdc.register_FI2C_CONFIG_LOWER_32BITS 0x%08X" % ppestateffdc.register_FI2C_CONFIG_LOWER_32BITS)
+ print("ppestateffdc.register_FI2C_CONFIG_UPPER_32BITS 0x%08X" % ppestateffdc.register_FI2C_CONFIG_UPPER_32BITS)
+ print("ppestateffdc.register_FI2C_STAT_LOWER_32BITS 0x%08X" % ppestateffdc.register_FI2C_STAT_LOWER_32BITS)
+ print("ppestateffdc.register_FI2C_STAT_UPPER_32BITS 0x%08X" % ppestateffdc.register_FI2C_STAT_UPPER_32BITS)
+ print("ppestateffdc.register_LR 0x%08X" % ppestateffdc.register_LR)
else:
- print "Register ffdc is not valid, probably SBE has not hit any internal halt condition"
- print '''---------------------------------------------------------------------------------'''
+ print("Register ffdc is not valid, probably SBE has not hit any internal halt condition")
+ print('''---------------------------------------------------------------------------------''')
def ppeState():
if(target == 'FILE'):
@@ -361,12 +362,12 @@ def ppeState():
30 : ["R30", False],
31 : ["R31", False]
}
- print "File path: ", file_path
+ print("File path: ", file_path)
fileHandle = open(file_path)
l_cnt = 0
- print '********************************************************************'
- print 'Reg'.ljust(15),'Reg Value'.ljust(20)
- print '--------------------------------------------------------------------'
+ print('********************************************************************')
+ print('Reg'.ljust(15),'Reg Value'.ljust(20))
+ print('--------------------------------------------------------------------')
while(l_cnt < os.path.getsize(file_path)):
regNum = int(binascii.hexlify(fileHandle.read(2)), 16)
str1 = ''
@@ -381,10 +382,10 @@ def ppeState():
except:
str1 = hex(regNum)
str3 = binascii.hexlify(fileHandle.read(4))
- print str(str1).ljust(15),str(str3).ljust(20)
+ print(str(str1).ljust(15),str(str3).ljust(20))
l_cnt = l_cnt + 6;
- print '********************************************************************'
+ print('********************************************************************')
fileHandle.close()
else:
invokeOsCmd(getFilePath("p9_ppe_state_wrap.exe")+" -verbose -sbe -snapshot"+
@@ -392,19 +393,19 @@ def ppeState():
def sbeLocalRegister():
if(target == 'FILE'):
- print "File path: ", file_path
+ print("File path: ", file_path)
fileHandle = open(file_path)
l_cnt = 0
- print '********************************************************************'
- print 'Reg Number Reg Value Reg String'
+ print('********************************************************************')
+ print('Reg Number Reg Value Reg String')
while(l_cnt < os.path.getsize(file_path)):
str1 = binascii.hexlify(fileHandle.read(2))
str2 = fileHandle.read(32)
str3 = binascii.hexlify(fileHandle.read(8))
- print str(str1).ljust(11),str(str3).ljust(20),str2.ljust(40)
+ print(str(str1).ljust(11),str(str3).ljust(20),str2.ljust(40))
l_cnt = l_cnt + 42;
- print '********************************************************************'
+ print('********************************************************************')
fileHandle.close()
else:
invokeOsCmd(getFilePath("p9_sbe_localreg_dump_wrap.exe")+" -verbose -halt"+
@@ -412,19 +413,19 @@ def sbeLocalRegister():
def sbeState():
if(target == 'FILE'):
- print "File path: ", file_path
+ print("File path: ", file_path)
fileHandle = open(file_path)
l_cnt = 0
- print '********************************************************************'
- print 'Reg Number Reg Value Reg String'
+ print('********************************************************************')
+ print('Reg Number Reg Value Reg String')
while(l_cnt < os.path.getsize(file_path)):
str1 = binascii.hexlify(fileHandle.read(4))
str2 = fileHandle.read(32)
str3 = binascii.hexlify(fileHandle.read(8))
- print str(str1).ljust(11),str(str3).ljust(20),str2.ljust(40)
+ print(str(str1).ljust(11),str(str3).ljust(20),str2.ljust(40))
l_cnt = l_cnt + 44;
- print '********************************************************************'
+ print('********************************************************************')
fileHandle.close()
else:
invokeOsCmd(getFilePath("p9_pibms_reg_dump_wrap.exe")+" -verbose" +\
@@ -432,17 +433,17 @@ def sbeState():
def sbeStatus():
if(target == 'FILE'):
- print "Error - not supported for FILE Target"
+ print("Error - not supported for FILE Target")
else:
cmd = ("getcfam pu 2809" +\
" -n" + str(node) + " -p" + str(proc))
- print "cmd:", cmd
+ print("cmd:", cmd)
output = os.popen(cmd).read()
output = output.split()
expected_out = 'k0:n%1d:s0:p%02d'%(node,proc)
if (expected_out not in output):
- print "Error while getting the status register"
- print ' '.join(output)
+ print("Error while getting the status register")
+ print(' '.join(output))
else:
parsevalue(bin(int(output[output.index(expected_out)+1], 16)))
@@ -456,30 +457,30 @@ def parsevalue(iValue):
tempVal = iValue[2:3]
tempVal = 'True' if tempVal == '1' else 'False'
- print "SBE Booted : %s" %(tempVal)
+ print("SBE Booted : %s" %(tempVal))
tempVal = iValue[3:4]
tempVal = 'True' if tempVal == '1' else 'False'
- print "Async FFDC : %s" %(tempVal)
+ print("Async FFDC : %s" %(tempVal))
tempVal = iValue[4:6]
- print "Reserver Bit [2:3] : %s" %(tempVal)
+ print("Reserver Bit [2:3] : %s" %(tempVal))
tempVal = iValue[6:10]
- print "SBE Previous State : %s (%s)" %(sbeStates[tempVal], tempVal)
+ print("SBE Previous State : %s (%s)" %(sbeStates[tempVal], tempVal))
tempVal = iValue[10:14]
- print "SBE Current State : %s (%s)" %(sbeStates[tempVal], tempVal)
+ print("SBE Current State : %s (%s)" %(sbeStates[tempVal], tempVal))
tempVal = iValue[14:22]
- print "Istep Major : %s" %(int(tempVal, 2))
+ print("Istep Major : %s" %(int(tempVal, 2)))
tempVal = iValue[22:28]
- print "Istep Minor : %s" %(int(tempVal, 2))
+ print("Istep Minor : %s" %(int(tempVal, 2)))
tempVal = iValue[28:34]
- print "Reserved Bit [26:31] : %s" %(tempVal)
+ print("Reserved Bit [26:31] : %s" %(tempVal))
'''
@@ -516,7 +517,7 @@ def main( argv ):
try:
opts, args = getopt.getopt(sys.argv[1:], "l:t:n:p:d:s:f:o:h", ['level=', 'target=', 'node=', 'proc=', 'ddlevel=', 'symbol=', 'file_path=', 'output_path=','help'])
except getopt.GetoptError as err:
- print str(err)
+ print(str(err))
usage()
exit(1)
@@ -534,45 +535,45 @@ def main( argv ):
if arg in LEVELS_ARRAY:
level = arg
else:
- print "level should be one of " + str(LEVELS_ARRAY)
+ print("level should be one of " + str(LEVELS_ARRAY))
exit(1)
elif opt in ('-t', '--target'):
if arg in ('AWAN', 'HW', 'FILE'):
target = arg
else:
- print "target should be one of {AWAN,HW,FILE}"
+ print("target should be one of {AWAN,HW,FILE}")
exit(1)
elif opt in ('-n', '--node'):
try:
node = int(arg)
except:
- print "node should be an integer number"
+ print("node should be an integer number")
exit(1)
elif opt in ('-p', '--proc'):
try:
proc = int(arg)
except:
- print "proc should be an integer number"
+ print("proc should be an integer number")
exit(1)
elif opt in ('-d', '--ddlevel'):
if arg in ('DD1', 'DD2', 'AXONE'):
ddsuffix = arg
else:
- print "target should be one of {DD1, DD2, AXONE}"
+ print("target should be one of {DD1, DD2, AXONE}")
exit(1)
elif opt in ('-f', '--file_path'):
try:
file_path = arg
assert os.path.exists(arg), "Did not find the file at,"+str(arg)
except:
- print "file_path should a string path"
+ print("file_path should a string path")
exit(1)
elif opt in ('-o', '--output_path'):
try:
output_path = arg+"/"
assert os.path.exists(arg)
except:
- print "output_path should a string path"
+ print("output_path should a string path")
exit(1)
elif opt in ('-s', '--symbol'):
symbol = arg
@@ -583,7 +584,7 @@ def main( argv ):
# Example output: 'CNFG FILE GLOBAL_DEBUG: 8.VI.B\n\tk0 \nUSE_SBE_FIFO = off\n/afs/awd.austin.ibm.com/projects/eng/tools/cronus/p9/exe/dev/p9sim_dev_x86_64.exe getconfig USE_SBE_FIFO \n'
regEx = re.search('USE_SBE_FIFO.*=(.*)', cmdFifoLastState)
if (regEx == None):
- print "ERROR in getting USE_SBE_FIFO config"
+ print("ERROR in getting USE_SBE_FIFO config")
return 1
cmdFifoLastState = regEx.group(1).split()[0]
# On cronus, disabe FIFO mode
@@ -596,7 +597,7 @@ def main( argv ):
fillSymTable()
if ( level == 'all' ):
- print "Parsing everything"
+ print("Parsing everything")
collectTrace()
collectAttr()
sbeStatus()
diff --git a/src/tools/debug/simics-debug-framework.py b/src/tools/debug/simics-debug-framework.py
index 359df50d..969cb32f 100755
--- a/src/tools/debug/simics-debug-framework.py
+++ b/src/tools/debug/simics-debug-framework.py
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016,2019
+# Contributors Listed Below - COPYRIGHT 2016,2020
# [+] International Business Machines Corp.
#
#
@@ -22,6 +22,7 @@
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
+from __future__ import print_function
import os
import os.path
import subprocess
@@ -44,7 +45,7 @@ if getMachineName() == "axone":
SBE_TOOLS_PATH = simenv.sbe_scripts_path
else:
SBE_TOOLS_PATH = os.environ['SBE_TOOLS_PATH']
-print "SBE_TOOLS_PATH = " + SBE_TOOLS_PATH
+print("SBE_TOOLS_PATH = " + SBE_TOOLS_PATH)
testIstepAuto = imp.load_source("testIstepAuto", SBE_TOOLS_PATH + "/testIstepAuto.py")
sbeDebug = imp.load_source("sbeDebug", SBE_TOOLS_PATH + "/sbe-debug.py")
@@ -65,7 +66,7 @@ def check_sbe_tools_path ():
cmd1 = "pipe \"echo $cec_type\" \"cat > temp1.map\""
( rc, out ) = quiet_run_command( cmd1, output_modes.regular )
if ( rc ):
- print "simics ERROR running %s: %d "%( cmd1, rc )
+ print ("simics ERROR running %s: %d "%( cmd1, rc ))
with open('temp1.map', 'r') as f:
map = f.read().strip()
if(map == "p9_fleetwood"):
@@ -85,10 +86,10 @@ def get_dd_level(procNr = 0, nodeNr = 0):
else:
cmd = "pipe \"p9Proc"+str(procNr)+".sbe.mibo_space.map\" \"cat > temp.map\""
- print "simics running %s: "%( cmd)
+ print ("simics running %s: "%( cmd))
( rc, out ) = quiet_run_command( cmd, output_modes.regular )
if ( rc ):
- print "simics ERROR running %s: %d "%( cmd, rc )
+ print ("simics ERROR running %s: %d "%( cmd, rc ))
ddlevel = 'DD1'
with open('temp.map', 'r') as f:
map = f.read()
@@ -103,7 +104,7 @@ def get_dd_level(procNr = 0, nodeNr = 0):
ddlevel = "DD1"
if map[map.index('p9Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0xff800000':
ddlevel = "DD2"
- print "running image - ["+ddlevel+"]"
+ print ("running image - ["+ddlevel+"]")
return ddlevel
def register_sbe_debug_framework_tools():
@@ -147,12 +148,12 @@ def register_sbe_debug_framework_tools():
short = "Runs the debug framework for register ffdc ",
doc = "")
- print "SBE Debug Framework: Registered tool:", "sbe-istep"
- print "SBE Debug Framework: Registered tool:", "sbe-trace"
- print "SBE Debug Framework: Registered tool:", "sbe-stack"
- print "SBE Debug Framework: Registered tool:", "sbe-ddlevel"
- print "SBE Debug Framework: Registered tool:", "sbe-attrdump"
- print "SBE Debug Framework: Registered tool:", "sbe-regffdc"
+ print("SBE Debug Framework: Registered tool:", "sbe-istep")
+ print("SBE Debug Framework: Registered tool:", "sbe-trace")
+ print("SBE Debug Framework: Registered tool:", "sbe-stack")
+ print("SBE Debug Framework: Registered tool:", "sbe-ddlevel")
+ print("SBE Debug Framework: Registered tool:", "sbe-attrdump")
+ print("SBE Debug Framework: Registered tool:", "sbe-regffdc")
def fillSymTable():
@@ -175,7 +176,7 @@ def collectStackUsage ( procNr, nodeNr=0 ):
'sbeCommandReceiver_stack',
'sbe_Kernel_NCInt_stack',
'sbeAsyncCommandProcessor_stack')
- print "==================================Stack usage==================================="
+ print("==================================Stack usage===================================")
# Dump stack memory to binary files
for thread in threads:
if g_isFleetwood:
@@ -186,12 +187,12 @@ def collectStackUsage ( procNr, nodeNr=0 ):
cmd = "pipe \"backplane0.proc" + `procNr` + ".pib_cmp.sbe_mibo.x 0x" + syms[thread][0] + " 0x"+syms[thread][1]+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> "+thread+"\""
else:
cmd = "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x 0x" + syms[thread][0] + " 0x"+syms[thread][1]+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> "+thread+"\""
- print "simics running %s: "%( cmd)
+ print ("simics running %s: "%( cmd))
( rc, out ) = quiet_run_command( cmd, output_modes.regular )
if ( rc ):
- print "simics ERROR running %s: %d "%( cmd, rc )
+ print("simics ERROR running %s: %d "%( cmd, rc ))
- print "Thread".ljust(40)+"Least Available[bytes]".ljust(30)+"Max usage[%]"
+ print("Thread".ljust(40)+"Least Available[bytes]".ljust(30)+"Max usage[%]")
for thread in threads:
with open(thread, "rb") as f:
word = struct.unpack('I', f.read(4))[0]
@@ -202,7 +203,7 @@ def collectStackUsage ( procNr, nodeNr=0 ):
word = struct.unpack('I', f.read(4))[0]
else:
break
- print str("["+thread+"]").ljust(40) + str(leastAvailable).ljust(30) + str("%.2f" % (100 * (1 - (leastAvailable/float(int("0x"+syms[thread][1], 16))))))
+ print(str("["+thread+"]").ljust(40) + str(leastAvailable).ljust(30) + str("%.2f" % (100 * (1 - (leastAvailable/float(int("0x"+syms[thread][1], 16)))))))
def collectAttr( procNr, nodeNr=0 ):
global g_isFleetwood
@@ -211,10 +212,10 @@ def collectAttr( procNr, nodeNr=0 ):
cmd= "pipe \"D"+str(node)+"Proc"+str(procNr)+".sbe.mibo_space.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\""
else:
cmd= "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\""
- print "simics running %s: "%( cmd)
+ print("simics running %s: "%( cmd))
( rc, out ) = quiet_run_command( cmd, output_modes.regular )
if ( rc ):
- print "simics ERROR running %s: %d "%( cmd, rc )
+ print("simics ERROR running %s: %d "%( cmd, rc ))
ddlevel = get_dd_level(procNr, nodeNr)
sbeDebug.ddsuffix = ddlevel
sbeDebug.target = 'FILE'
@@ -232,10 +233,10 @@ def collectRegFfdc( procNr, nodeNr=0 ):
cmd = "pipe \"backplane0.proc" + `procNr` + ".pib_cmp.sbe_mibo.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\""
else:
cmd= "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\""
- print "simics running %s: "%( cmd)
+ print ("simics running %s: "%( cmd))
( rc, out ) = quiet_run_command( cmd, output_modes.regular )
if ( rc ):
- print "simics ERROR running %s: %d "%( cmd, rc )
+ print("simics ERROR running %s: %d "%( cmd, rc ))
ddlevel = get_dd_level(procNr, nodeNr)
sbeDebug.ddsuffix = ddlevel
sbeDebug.target = 'FILE'
@@ -266,10 +267,10 @@ def collectTrace ( procNr, nodeNr=0 ):
cmd3 = "shell \"fsp-trace -s " + SBE_TOOLS_PATH + "/sbeStringFile_"+get_dd_level(procNr, nodeNr)+" sbetrace.bin >" + fileName + "\""
cmd4 = "shell \"" + "cat " + fileName + "\""
- print "simics running %s: "%( cmd1)
+ print("simics running %s: "%( cmd1))
( rc, out ) = quiet_run_command( cmd1, output_modes.regular )
if ( rc ):
- print "simics ERROR running %s: %d "%( cmd1, rc )
+ print("simics ERROR running %s: %d "%( cmd1, rc ))
run_command ( cmd2 )
run_command ( cmd3 )
@@ -287,7 +288,7 @@ def sbe_magic_instruction_callback(user_arg, cpu, inst_num):
if inst_num == 8000: #MAGIC_SIMICS_CHECK
iface = SIM_get_interface(cpu, "int_register")
iface.write(iface.get_number("r3"), 1)
- print "SBE::isSimicsRunning = true"
+ print("SBE::isSimicsRunning = true")
# Run the registration automatically whenever this script is loaded.
register_sbe_debug_framework_tools()
OpenPOWER on IntegriCloud