forked from Github_Repos/cvw
fixed plot naming and axes
This commit is contained in:
parent
563212ba4f
commit
6488d6c915
@ -100,8 +100,6 @@ def freqPlot(tech, width, config):
|
|||||||
areasL[ind] += [oneSynth.area]
|
areasL[ind] += [oneSynth.area]
|
||||||
|
|
||||||
f, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
|
f, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
|
||||||
for ax in (ax1, ax2):
|
|
||||||
ax.ticklabel_format(useOffset=False, style='plain')
|
|
||||||
|
|
||||||
for ind in [0,1]:
|
for ind in [0,1]:
|
||||||
areas = areasL[ind]
|
areas = areasL[ind]
|
||||||
@ -120,11 +118,13 @@ def freqPlot(tech, width, config):
|
|||||||
lines.Line2D([0], [0], color='blue', ls='', marker='o', label='slack violated')]
|
lines.Line2D([0], [0], color='blue', ls='', marker='o', label='slack violated')]
|
||||||
|
|
||||||
ax1.legend(handles=legend_elements)
|
ax1.legend(handles=legend_elements)
|
||||||
|
ytop = ax2.get_ylim()[1]
|
||||||
|
ax2.set_ylim(ymin=0, ymax=1.1*ytop)
|
||||||
ax2.set_xlabel("Target Freq (MHz)")
|
ax2.set_xlabel("Target Freq (MHz)")
|
||||||
ax1.set_ylabel('Delay (ns)')
|
ax1.set_ylabel('Delay (ns)')
|
||||||
ax2.set_ylabel('Area (sq microns)')
|
ax2.set_ylabel('Area (sq microns)')
|
||||||
ax1.set_title(tech + ' ' + width +config)
|
ax1.set_title(tech + ' ' + width +config)
|
||||||
plt.savefig('./plots/wally/' + tech + '_' + width + config + '.png')
|
plt.savefig('./plots/wally/freqSweep_' + tech + '_' + width + config + '.png')
|
||||||
# plt.show()
|
# plt.show()
|
||||||
|
|
||||||
def areaDelay(width, tech, freq, config=None, special=None):
|
def areaDelay(width, tech, freq, config=None, special=None):
|
||||||
@ -149,16 +149,24 @@ def areaDelay(width, tech, freq, config=None, special=None):
|
|||||||
plt.scatter(delays, areas)
|
plt.scatter(delays, areas)
|
||||||
plt.xlabel('Delay (ns)')
|
plt.xlabel('Delay (ns)')
|
||||||
plt.ylabel('Area (sq microns)')
|
plt.ylabel('Area (sq microns)')
|
||||||
titleStr = tech + ' ' +width
|
ytop = ax1.get_ylim()[1]
|
||||||
if config: titleStr += config
|
plt.ylim(ymin=0, ymax=1.1*ytop)
|
||||||
if special: titleStr += special
|
titleStr = tech + ' ' + width
|
||||||
|
saveStr = tech + '_' + width
|
||||||
|
if config:
|
||||||
|
titleStr += config
|
||||||
|
saveStr = saveStr + config + '_versions_'
|
||||||
|
if (special != None):
|
||||||
|
titleStr += special
|
||||||
|
saveStr = saveStr + '_origConfigs_'
|
||||||
|
saveStr += str(freq)
|
||||||
titleStr = titleStr + ' (target freq: ' + str(freq) + ')'
|
titleStr = titleStr + ' (target freq: ' + str(freq) + ')'
|
||||||
plt.title(titleStr)
|
plt.title(titleStr)
|
||||||
|
|
||||||
for i in range(len(labels)):
|
for i in range(len(labels)):
|
||||||
plt.annotate(labels[i], (delays[i], areas[i]), textcoords="offset points", xytext=(0,10), ha='center')
|
plt.annotate(labels[i], (delays[i], areas[i]), textcoords="offset points", xytext=(0,10), ha='center')
|
||||||
|
|
||||||
plt.savefig('./plots/wally/areaDelay ' + titleStr + '.png')
|
plt.savefig('./plots/wally/areaDelay_' + saveStr + '.png')
|
||||||
|
|
||||||
# ending freq in 42 means fpu was turned off manually
|
# ending freq in 42 means fpu was turned off manually
|
||||||
|
|
||||||
@ -167,5 +175,4 @@ if __name__ == '__main__':
|
|||||||
synthsfromcsv('Summary.csv')
|
synthsfromcsv('Summary.csv')
|
||||||
freqPlot('tsmc28', 'rv64', 'gc')
|
freqPlot('tsmc28', 'rv64', 'gc')
|
||||||
areaDelay('rv32', 'tsmc28', 4200, config='gc')
|
areaDelay('rv32', 'tsmc28', 4200, config='gc')
|
||||||
areaDelay('rv32', 'tsmc28', 3042, special='')
|
areaDelay('rv32', 'tsmc28', 3042, special='')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user