diff --git a/DRAMSys/analyzer/scripts/plots.py b/DRAMSys/analyzer/scripts/plots.py index 8b7621a9..d5ae6cc0 100755 --- a/DRAMSys/analyzer/scripts/plots.py +++ b/DRAMSys/analyzer/scripts/plots.py @@ -83,6 +83,15 @@ def memory_utilisation_window(connection, tracePath, steps): plt.figure() + # Write data to a file for matlab: + outputFileNameBWMatlab = 'memory_utilization_percent_' + basename + '.txt' + + f = open(outputFileNameBWMatlab, 'w') + for i in range(steps): + line = "{} {}\n".format(time[i], bandwidthPercentage[i]) + f.write(line) + + #Plot Bandwidth in Percent plt.plot(time, bandwidthPercentage) plt.xlabel('Time [ns]')