Numerous fixes for Python scripts

This commit is contained in:
2023-10-12 11:57:31 +02:00
parent 8224e97abe
commit d2761ce060
7 changed files with 51 additions and 106 deletions

View File

@@ -57,7 +57,7 @@ def getNumberOfTransactions(dbconnection):
def getTraceEndTime(dbconnection):
cursor = dbconnection.cursor()
cursor.execute("SELECT TraceEnd FROM GeneralInfo")
cursor.execute("SELECT MAX(PhaseEnd) FROM Phases")
result = cursor.fetchone()
return result[0]
@@ -103,7 +103,7 @@ def getPseudoChannelMode(connection):
def maximum_data_rate(connection):
memspec = MemSpec(connection)
memspec = MemSpec(connection)
try:
width = memspec.getIntValue("memarchitecturespec", "nbrOfDevices") * memspec.getIntValue("memarchitecturespec", "width")
except:
@@ -162,6 +162,6 @@ def get_total_time_in_phase(connection, phase):
def getCommandLengthForPhase(connection, phase):
cursor = connection.cursor()
cursor.execute("SELECT " + phase + " FROM CommandLengths")
cursor.execute(f"SELECT Length FROM CommandLengths WHERE Command=\"{phase}\"")
length = cursor.fetchone()
return length[0]