mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
update wally synth analysis
This commit is contained in:
parent
f458deaf00
commit
aa253748fc
@ -7,6 +7,7 @@ import subprocess
|
|||||||
from matplotlib.cbook import flatten
|
from matplotlib.cbook import flatten
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import matplotlib.lines as lines
|
import matplotlib.lines as lines
|
||||||
|
from wallySynth import testFreq
|
||||||
|
|
||||||
|
|
||||||
def synthsintocsv():
|
def synthsintocsv():
|
||||||
@ -26,7 +27,7 @@ def synthsintocsv():
|
|||||||
writer.writerow(['Width', 'Config', 'Special', 'Tech', 'Target Freq', 'Delay', 'Area'])
|
writer.writerow(['Width', 'Config', 'Special', 'Tech', 'Target Freq', 'Delay', 'Area'])
|
||||||
|
|
||||||
for oneSynth in allSynths:
|
for oneSynth in allSynths:
|
||||||
descrip = specReg.findall(oneSynth)
|
descrip = specReg.findall(oneSynth) #[30:]
|
||||||
width = descrip[2][:4]
|
width = descrip[2][:4]
|
||||||
config = descrip[2][4:]
|
config = descrip[2][4:]
|
||||||
if descrip[3][-2:] == 'nm':
|
if descrip[3][-2:] == 'nm':
|
||||||
@ -46,7 +47,7 @@ def synthsintocsv():
|
|||||||
nums = [float(m) for m in nums]
|
nums = [float(m) for m in nums]
|
||||||
metrics += nums
|
metrics += nums
|
||||||
except:
|
except:
|
||||||
print(config + tech + freq + " doesn't have reports")
|
print(width + config + tech + '_' + freq + " doesn't have reports")
|
||||||
if metrics == []:
|
if metrics == []:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@ -110,23 +111,26 @@ def freqPlot(tech, width, config):
|
|||||||
plt.savefig('./plots/wally/freqSweep_' + 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(tech, freq, width=None, config=None, special=None):
|
||||||
delays, areas, labels = ([] for i in range(3))
|
delays, areas, labels = ([] for i in range(3))
|
||||||
|
|
||||||
for oneSynth in allSynths:
|
for oneSynth in allSynths:
|
||||||
if (width == oneSynth.width) & (tech == oneSynth.tech) & (freq == oneSynth.freq):
|
if (width==None) or (width == oneSynth.width):
|
||||||
|
if (tech == oneSynth.tech) & (freq == oneSynth.freq):
|
||||||
if (special != None) & (oneSynth.special == special):
|
if (special != None) & (oneSynth.special == special):
|
||||||
delays += [oneSynth.delay]
|
delays += [oneSynth.delay]
|
||||||
areas += [oneSynth.area]
|
areas += [oneSynth.area]
|
||||||
labels += [oneSynth.config]
|
labels += [oneSynth.width + oneSynth.config]
|
||||||
elif (config != None) & (oneSynth.config == config):
|
elif (config != None) & (oneSynth.config == config):
|
||||||
delays += [oneSynth.delay]
|
delays += [oneSynth.delay]
|
||||||
areas += [oneSynth.area]
|
areas += [oneSynth.area]
|
||||||
labels += [oneSynth.special]
|
labels += [oneSynth.special]
|
||||||
else:
|
# else:
|
||||||
delays += [oneSynth.delay]
|
# delays += [oneSynth.delay]
|
||||||
areas += [oneSynth.area]
|
# areas += [oneSynth.area]
|
||||||
labels += [oneSynth.config + '_' + oneSynth.special]
|
# labels += [oneSynth.config + '_' + oneSynth.special]
|
||||||
|
if width == None:
|
||||||
|
width = ''
|
||||||
|
|
||||||
f, (ax1) = plt.subplots(1, 1)
|
f, (ax1) = plt.subplots(1, 1)
|
||||||
plt.scatter(delays, areas)
|
plt.scatter(delays, areas)
|
||||||
@ -154,8 +158,11 @@ def areaDelay(width, tech, freq, config=None, special=None):
|
|||||||
# ending freq in 42 means fpu was turned off manually
|
# ending freq in 42 means fpu was turned off manually
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
synthsintocsv()
|
# synthsintocsv()
|
||||||
synthsfromcsv('Summary.csv')
|
synthsfromcsv('Summary.csv')
|
||||||
freqPlot('tsmc28', 'rv64', 'gc')
|
freqPlot('tsmc28', 'rv32', 'e')
|
||||||
areaDelay('rv32', 'tsmc28', 4200, config='gc')
|
freqPlot('sky90', 'rv32', 'e')
|
||||||
areaDelay('rv32', 'tsmc28', 3042, special='')
|
areaDelay('tsmc28', testFreq[1], width= 'rv64', config='gc')
|
||||||
|
areaDelay('tsmc28', testFreq[1], special='')
|
||||||
|
areaDelay('sky90', testFreq[0], width='rv64', config='gc')
|
||||||
|
areaDelay('sky90', testFreq[0], special='')
|
@ -8,20 +8,22 @@ def runCommand(config, tech, freq):
|
|||||||
command = "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=0 MAXCORES=1".format(config, tech, freq)
|
command = "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=0 MAXCORES=1".format(config, tech, freq)
|
||||||
subprocess.Popen(command, shell=True)
|
subprocess.Popen(command, shell=True)
|
||||||
|
|
||||||
|
testFreq = [3000, 10000]
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
techs = ['sky90', 'tsmc28']
|
techs = ['sky90', 'tsmc28']
|
||||||
bestAchieved = [750, 3000]
|
sweepCenter = [870, 3000]
|
||||||
synthsToRun = []
|
synthsToRun = []
|
||||||
|
|
||||||
|
|
||||||
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
|
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
|
||||||
for i in [0, 1]:
|
for i in [0, 1]:
|
||||||
tech = techs[i]
|
tech = techs[i]
|
||||||
f = bestAchieved[i]
|
sc = sweepCenter[i]
|
||||||
for freq in [round(f+f*x/100) for x in arr]: # rv32e freq sweep
|
f = testFreq[i]
|
||||||
|
for freq in [round(sc+sc*x/100) for x in arr]: # rv32e freq sweep
|
||||||
synthsToRun += [['rv32e', tech, freq]]
|
synthsToRun += [['rv32e', tech, freq]]
|
||||||
for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64i', 'rv64ic']: # configs
|
for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64i', 'rv64ic', 'rv32e']: # configs
|
||||||
synthsToRun += [[config, tech, f]]
|
synthsToRun += [[config, tech, f]]
|
||||||
for mod in ['FPUoff', 'noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations
|
for mod in ['FPUoff', 'noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations
|
||||||
config = 'rv64gc_' + mod
|
config = 'rv64gc_' + mod
|
||||||
|
Loading…
Reference in New Issue
Block a user