Skip to content

Commit 2c476fd

Browse files
author
173666635@qq.com
committed
banking
1 parent 84f4829 commit 2c476fd

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed
12.5 KB
Binary file not shown.

experiments/spatial-sweep/spatial_plot.py

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,31 @@ def spatial_report(filepath):
8383
fig,ax1 = plt.subplots()
8484
loop_k = np.arange(16)+1
8585
maker = ['v','D','o']
86-
for i, r in enumerate(plot_res.keys()):
87-
y = plot_res[r][1:]
88-
ax1.plot(loop_k, y, maker[i], ls='-', ms=8, color = cl[i],linewidth=3 )
89-
size = 6
90-
plt.xticks(fontsize = 16)
91-
plt.yticks(fontsize = 16)
92-
ax1.set_ylabel('Normalized Resource Usages',fontsize= 18)
93-
ax1.set_xlabel('Unrolling Factor',fontsize = 18)
94-
PERF_RESOURCES_NAME = ['DSP used', 'BRAM used','LUT used']
95-
ax1.legend(PERF_RESOURCES_NAME,prop={'size': 16})
86+
#for i, r in enumerate(plot_res.keys()):
87+
# y = plot_res[r][1:]
88+
# ax1.plot(loop_k, y, maker[i], ls='-', ms=8, color = cl[i],linewidth=3 )
89+
#size = 6
90+
#plt.xticks(fontsize = 16)
91+
#plt.yticks(fontsize = 16)
92+
#ax1.set_ylabel('Normalized Resource Usages',fontsize= 18)
93+
#ax1.set_xlabel('Unrolling Factor',fontsize = 18)
94+
#PERF_RESOURCES_NAME = ['DSP used', 'BRAM used','LUT used']
95+
#ax1.legend(PERF_RESOURCES_NAME,prop={'size': 16})
9696

97-
#marker = {'input_matrix_a':'s','input_matrix_b':'+'}
98-
#leg2 = ['input matrix a','input matrix b']
97+
marker = {'input_matrix_a':'s','input_matrix_b':'+'}
98+
leg1 = ['input matrix a','input matrix b']
9999
#ax2 = ax1.twinx()
100-
#for i, sram in enumerate(marker):
101-
# df = pd.read_csv(sram+'.csv')
102-
# bank = [ eval(re.sub("\s+", ",", n.strip()))[0] for n in df[' N']]
103-
# ax2.plot(loop_k,bank, marker[sram], color=cl[i+1])
104-
#ax2.legend(leg2,loc=4)
105-
#ax2.set_ylabel('Banking Decisions')
106-
107-
plt.savefig('paper-normalized.pdf', bbox_inches='tight')
100+
ms = [8,12]
101+
for i, sram in enumerate(marker):
102+
df = pd.read_csv(sram+'.csv')
103+
bank = [ eval(re.sub("\s+", ",", n.strip()))[0] for n in df[' N']]
104+
ax1.plot(loop_k,bank, marker[sram], color=cl[i], ms = ms[i], mew=3)
105+
ax1.legend(leg1,loc=4)
106+
ax1.set_ylabel('Banking Decisions', fontsize = 18)
107+
ax1.set_xlabel('Unrolling Factor',fontsize = 18)
108+
plt.xticks(fontsize = 16)
109+
plt.yticks(fontsize = 16)
110+
#PERF_RESOURCES_NAME = ['DSP used', 'BRAM used','LUT used']
111+
#ax1.legend(PERF_RESOURCES_NAME,prop={'size': 16})
112+
plt.savefig('paper-banking.pdf', bbox_inches='tight')
108113
plt.show()

0 commit comments

Comments
 (0)