Add idle time at the simulation start to the total idle time.

This commit is contained in:
Lukas Steiner
2020-11-30 16:29:44 +01:00
parent 8c19ffa2fb
commit d15ec81677

View File

@@ -117,11 +117,15 @@ def memory_idle(connection):
cursor = connection.cursor()
cursor.execute(query)
idle = cursor.fetchone()
cursor.execute(""" SELECT min(PhaseBegin) FROM Phases WHERE PhaseName = 'REQ' """)
idle_start = cursor.fetchone()
clk, unit = getClock(connection)
if (idle[0] is None):
return 0
return (idle_start[0] / clk)
else:
clk, unit = getClock(connection)
return (idle[0]/clk)
return ((idle[0] + idle_start[0]) / clk)
@metric
def memory_delayed(connection):