diff --git a/extensions/apps/traceAnalyzer/scripts/metrics.py b/extensions/apps/traceAnalyzer/scripts/metrics.py index 0da9f045..7a0c8c7e 100644 --- a/extensions/apps/traceAnalyzer/scripts/metrics.py +++ b/extensions/apps/traceAnalyzer/scripts/metrics.py @@ -506,11 +506,13 @@ def memory_utilisation_in_Gibps_without_idle(connection): def memory_utilisation_percent_including_idle(connection): cursor = connection.cursor() cursor.execute("""SELECT SUM(DataStrobeEnd - DataStrobeBegin) FROM Phases""") - active = cursor.fetchone() + active = cursor.fetchone()[0] + if getPseudoChannelMode(connection): + active /= 2 cursor = connection.cursor() cursor.execute("""SELECT MAX(DataStrobeEnd) FROM Phases""") - total = cursor.fetchone() - return (active[0] / total[0]) * 100 + total = cursor.fetchone()[0] + return (active / total) * 100 # def refreshMissDecision(connection, calculatedMetrics): diff --git a/src/libdramsys/DRAMSys/controller/ControllerRecordable.cpp b/src/libdramsys/DRAMSys/controller/ControllerRecordable.cpp index be257434..8ff5b296 100644 --- a/src/libdramsys/DRAMSys/controller/ControllerRecordable.cpp +++ b/src/libdramsys/DRAMSys/controller/ControllerRecordable.cpp @@ -115,6 +115,11 @@ void ControllerRecordable::controllerMethod() uint64_t windowNumberOfBeatsServed = numberOfBeatsServed - lastNumberOfBeatsServed; lastNumberOfBeatsServed = numberOfBeatsServed; + + // FIX: HBM pseudo-channels + // maybe better solution in the future? + windowNumberOfBeatsServed /= memSpec.pseudoChannelsPerChannel; + sc_time windowActiveTime = activeTimeMultiplier * static_cast(windowNumberOfBeatsServed); double windowAverageBandwidth = windowActiveTime / windowSizeTime;