results: Added matplotlib scripts to generate plots of the results
This commit is contained in:
parent
863460a9f2
commit
dca9967246
37
plots/shyloc_results.py
Normal file
37
plots/shyloc_results.py
Normal file
@ -0,0 +1,37 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
text_size = 30
|
||||
stroke = 2
|
||||
marker_width = 8
|
||||
packet_sizes = (4,8,16,32,64,128)
|
||||
configs = {
|
||||
'Single Issue' : (0.4239, 0.4380, 0.4377, 0.4368, 0.4350, 0.4313),
|
||||
'Performance Optimized' : (0.4228, 0.4379, 0.4378, 0.4371, 0.4353, 0.4292),
|
||||
'Resource Utilization Optimized': (0.4239, 0.4380, 0.4385, 0.4371, 0.4353, 0.4293),
|
||||
}
|
||||
|
||||
x = np.arange(len(packet_sizes)) # the label locations
|
||||
ys = np.arange(0,3,0.125)
|
||||
width = 0.25 # the width of the bars
|
||||
multiplier = 0
|
||||
|
||||
fig, ax = plt.subplots(layout='constrained')
|
||||
|
||||
for attribute, measurement in configs.items():
|
||||
offset = width * multiplier
|
||||
rects = ax.bar(x + offset, measurement, width, label=attribute)
|
||||
##ax.bar_label(rects, padding=15+multiplier*40,fontsize=text_size)
|
||||
multiplier += 1
|
||||
|
||||
plt.plot([-0.125,5.625],[0.4419,0.4419],lw=stroke)
|
||||
# Add some text for labels, title and custom x-axis tick labels, etc.
|
||||
ax.set_ylabel('Throughput (B/C)',fontsize=text_size)
|
||||
ax.set_xlabel('Packet Size (B/P)',fontsize=text_size)
|
||||
ax.set_title('Throughput during SHyLoC compression (1904B uncompressed, 1664B compressed)',fontsize=text_size)
|
||||
ax.set_xticks(x + width, packet_sizes,fontsize=text_size)
|
||||
ax.set_yticks(ys, ys,fontsize=text_size)
|
||||
ax.legend(loc='upper left', ncols=2,fontsize=text_size)
|
||||
ax.set_ylim(0, 1)
|
||||
|
||||
plt.show()
|
||||
67
plots/synth_results.py
Normal file
67
plots/synth_results.py
Normal file
@ -0,0 +1,67 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
## Bar diagram chunked on different parameters.
|
||||
text_size = 30
|
||||
stroke = 2
|
||||
marker_width = 8
|
||||
metrics = ("LUTs", "DFFs", "Carry", "Memory Blocks")
|
||||
configs = {
|
||||
'Single Issue': (2.68, 1.61, 1.69, 3.57),
|
||||
'IO Pipelined': (3.68, 1.84, 3.02, 3.57),
|
||||
'Minimized IO Pipelined': (2.84, 1.62, 1.45, 3.57),
|
||||
}
|
||||
|
||||
x = np.arange(len(metrics)) # the label locations
|
||||
ys = np.arange(0,10,1)
|
||||
width = 0.25 # the width of the bars
|
||||
multiplier = 0
|
||||
|
||||
fig, ax = plt.subplots(layout='constrained')
|
||||
|
||||
for attribute, measurement in configs.items():
|
||||
offset = width * multiplier
|
||||
rects = ax.bar(x + offset, measurement, width, label=attribute)
|
||||
ax.bar_label(rects, padding=3,fontsize=text_size)
|
||||
#ax.bar_label(rects, padding=3)
|
||||
multiplier += 1
|
||||
|
||||
# Add some text for labels, title and custom x-axis tick labels, etc.
|
||||
ax.set_ylabel('Utilization (%)',fontsize=text_size)
|
||||
ax.set_xlabel('Metric',fontsize=text_size)
|
||||
ax.set_title('Resource Utilization of GANIMEDE versions',fontsize=text_size)
|
||||
ax.set_xticks(x + width, metrics,fontsize=text_size)
|
||||
ax.set_yticks(ys, ys,fontsize=text_size)
|
||||
ax.legend(loc='upper left', ncols=3)
|
||||
ax.set_ylim(0, 10)
|
||||
|
||||
plt.show()
|
||||
|
||||
##metrics = ("LUTs", "DFFs", "Carry", "Memory Blocks")
|
||||
##configs = {
|
||||
## 'Single Issue': (874, 496, 130, 2),
|
||||
## 'IO Pipelined': (1200, 565, 232, 2),
|
||||
## 'Minimized IO Pipelined': (926, 499, 111, 2),
|
||||
##}
|
||||
##
|
||||
##x = np.arange(len(metrics)) # the label locations
|
||||
##width = 0.25 # the width of the bars
|
||||
##multiplier = 0
|
||||
##
|
||||
##fig, ax = plt.subplots(layout='constrained')
|
||||
##
|
||||
##for attribute, measurement in configs.items():
|
||||
## offset = width * multiplier
|
||||
## rects = ax.bar(x + offset, measurement, width, label=attribute)
|
||||
## ax.bar_label(rects, padding=3)
|
||||
## multiplier += 1
|
||||
##
|
||||
### Add some text for labels, title and custom x-axis tick labels, etc.
|
||||
##ax.set_ylabel('Utilization (%)')
|
||||
##ax.set_title('configs attributes by metrics')
|
||||
##ax.set_xticks(x + width, metrics)
|
||||
##ax.legend(loc='upper left', ncols=3)
|
||||
##ax.set_ylim(0, 1500)
|
||||
##
|
||||
##plt.show()
|
||||
##
|
||||
39
plots/throughput_results.py
Normal file
39
plots/throughput_results.py
Normal file
@ -0,0 +1,39 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
## Bar diagram chunked on different parameters.
|
||||
text_size = 30
|
||||
stroke = 2
|
||||
marker_width = 8
|
||||
packet_sizes = (4,8,16,32,64,128)
|
||||
configs = {
|
||||
'Ideal Addressed' : ('o',marker_width,(0.5714, 0.8889, 1.2308, 1.5238, 1.7297, 1.8551)),
|
||||
'Ideal non-Addressed' : ('v',marker_width,(1.3333, 1.6000, 1.7778, 1.8824, 1.9394, 1.9692)),
|
||||
'Single Issue' : ('X',marker_width,(0.4414, 0.6095, 0.7529, 0.8312, 0.8889, 0.9275)),
|
||||
'Performance Optimized' : ('s',marker_width,(0.4211, 0.6957, 1.0323, 1.3333, 1.5799, 1.7527)),
|
||||
'Resource Utilization Optimized': ('^',marker_width-4,(0.4211, 0.6957, 1.0323, 1.3333, 1.5799, 1.7527)),
|
||||
}
|
||||
|
||||
|
||||
x = np.arange(len(packet_sizes)) # the label locations
|
||||
ys = np.arange(0,3,0.25)
|
||||
width = 0.25 # the width of the bars
|
||||
multiplier = 0
|
||||
|
||||
fig, ax = plt.subplots(layout='constrained')
|
||||
|
||||
for attribute, (marker, lw, measurement) in configs.items():
|
||||
ax.plot(packet_sizes, measurement, label=attribute, marker=marker, lw=stroke, mew=lw)
|
||||
|
||||
# Add some text for labels, title and custom x-axis tick labels, etc.
|
||||
ax.set_ylabel('Throughput (B/C)',fontsize=text_size)
|
||||
ax.set_xlabel('Packet Size (B/P)',fontsize=text_size)
|
||||
ax.set_title('Unhindered Throughput of simultaneous 256KiB read and 256KiB write',fontsize=text_size)
|
||||
ax.set_xscale('log')
|
||||
ax.set_xticks(packet_sizes, packet_sizes,fontsize=text_size)
|
||||
ax.set_yticks(ys, ys,fontsize=text_size)
|
||||
ax.legend(loc='upper left', ncols=2,fontsize=text_size)
|
||||
ax.set_ylim(0.2, 2.7)
|
||||
|
||||
plt.show()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user