diff --git a/DRAMSys/traceAnalyzer/scripts/metrics.py b/DRAMSys/traceAnalyzer/scripts/metrics.py index 0d00da20..4d05186e 100644 --- a/DRAMSys/traceAnalyzer/scripts/metrics.py +++ b/DRAMSys/traceAnalyzer/scripts/metrics.py @@ -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 diff --git a/DRAMSys/traceAnalyzer/scripts/plots.py b/DRAMSys/traceAnalyzer/scripts/plots.py index f1378a88..6b564ffe 100755 --- a/DRAMSys/traceAnalyzer/scripts/plots.py +++ b/DRAMSys/traceAnalyzer/scripts/plots.py @@ -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