Fix crash in command_utilization_plot

This commit is contained in:
2022-02-16 14:28:12 +01:00
parent 3b96d274a8
commit f8652646e7
2 changed files with 8 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ def command_bus_utilisation_in_percent(connection):
ON Phases.PhaseName = CommandLengths.Command
""")
result = cursor.fetchone()[0]
if (result is None):
result = 0
clk, _ = getClock(connection)
traceEnd = getTraceEndTime(connection)
cmdBusOccupied = result * clk

View File

@@ -488,6 +488,10 @@ def command_bus_utilisation_window(connection, tracePath, steps):
cursor.execute(query_full, (left_limit, right_limit))
result = cursor.fetchone()[0]
if (result is None):
result = 0
cmdBusOccupied = result * clk
time[i] = ((i * windowSize) - (windowSize / 2)) / 1000 # ps to ns