Merge pull request #471 from stineje/main

Fix multitude of issues with plotPPA as well as issue related to Popen issuing too many synthesis
This commit is contained in:
David Harris 2023-11-14 05:51:20 -08:00 committed by GitHub
commit b67b1f5719
3 changed files with 510 additions and 320 deletions

View File

@ -4,10 +4,10 @@ binencoder,sky130,16,1000,1.0000,136.220003,77.243,0.021773774467348
binencoder,sky130,32,1000,1.0000,372.400007,189.626,0.04371111111111111
binencoder,sky130,64,1000,1.0000,797.720015,382.205,0.07393850658857981
binencoder,sky130,128,900,1.1111,1602.300031,610.009,0.1261366969785861
adder,sky130,8,1000,1.0000,253.820005,154.438,0.10825587752870422
adder,sky130,16,1000,1.0000,722.260013,485.109,0.32460910944935417
adder,sky130,32,1000,1.0000,1440.600027,714.057,0.6580226904376014
adder,sky130,64,1000,1.0000,2781.240054,1050.0,0.9392239364188874
adder,sky130,8,1700,0.588235,253.820005,154.438,0.10825587752870422
adder,sky130,16,1300,0.7692307,722.260013,485.109,0.32460910944935417
adder,sky130,32,1100,0.90909,1440.600027,714.057,0.6580226904376014
adder,sky130,64,950,1.0526315,2781.240054,1050.0,0.9392239364188874
adder,sky130,128,900,1.1111,6186.740118,2230.0,2.1480106100795755
csa,sky130,8,1000,1.0000,266.560005,154.202,0.13650573115665163
csa,sky130,16,1000,1.0000,533.12001,308.404,0.27263530601922104
@ -19,11 +19,11 @@ shifter,sky130,16,1000,1.0000,666.400006,558.433,0.19552906110283155
shifter,sky130,32,1000,1.0000,1475.880027,768.262,0.3807431082700759
shifter,sky130,64,1000,1.0000,3914.120062,2680.0,1.144802541988198
shifter,sky130,128,900,1.1111,9192.400136,6080.0,2.9008914525432616
comparator,sky130,8,1000,1.0000,200.900004,136.6,0.05001033271337053
comparator,sky130,16,1000,1.0000,358.680007,189.253,0.06321553011448482
comparator,sky130,32,1500,0.666666,690.900013,315.709,0.10771793448084398
comparator,sky130,64,1300,0.7692307,1372.980026,508.393,0.2048577820389901
comparator,sky130,128,1100,0.909090,2744.980052,796.047,0.34396273737011823
comparator,sky130,8,1700,0.588235,200.900004,136.6,0.05001033271337053
comparator,sky130,16,1500,0.6666667,358.680007,189.253,0.06321553011448482
comparator,sky130,32,1300,0.7692307,690.900013,315.709,0.10771793448084398
comparator,sky130,64,1200,0.8333333,1372.980026,508.393,0.2048577820389901
comparator,sky130,128,1150,0.869565,2744.980052,796.047,0.34396273737011823
flop,sky130,8,1000,1.0000,133.279999,64.8145,0.193835
flop,sky130,16,1000,1.0000,266.5599975,129.629,0.38715000000000005
flop,sky130,32,1000,1.0000,533.119995,259.258,0.7723000000000001

1 Module Tech Width Target Freq Delay Area L Power (nW) D energy (nJ)
4 binencoder sky130 32 1000 1.0000 372.400007 189.626 0.04371111111111111
5 binencoder sky130 64 1000 1.0000 797.720015 382.205 0.07393850658857981
6 binencoder sky130 128 900 1.1111 1602.300031 610.009 0.1261366969785861
7 adder sky130 8 1000 1700 1.0000 0.588235 253.820005 154.438 0.10825587752870422
8 adder sky130 16 1000 1300 1.0000 0.7692307 722.260013 485.109 0.32460910944935417
9 adder sky130 32 1000 1100 1.0000 0.90909 1440.600027 714.057 0.6580226904376014
10 adder sky130 64 1000 950 1.0000 1.0526315 2781.240054 1050.0 0.9392239364188874
11 adder sky130 128 900 1.1111 6186.740118 2230.0 2.1480106100795755
12 csa sky130 8 1000 1.0000 266.560005 154.202 0.13650573115665163
13 csa sky130 16 1000 1.0000 533.12001 308.404 0.27263530601922104
19 shifter sky130 32 1000 1.0000 1475.880027 768.262 0.3807431082700759
20 shifter sky130 64 1000 1.0000 3914.120062 2680.0 1.144802541988198
21 shifter sky130 128 900 1.1111 9192.400136 6080.0 2.9008914525432616
22 comparator sky130 8 1000 1700 1.0000 0.588235 200.900004 136.6 0.05001033271337053
23 comparator sky130 16 1000 1500 1.0000 0.6666667 358.680007 189.253 0.06321553011448482
24 comparator sky130 32 1500 1300 0.666666 0.7692307 690.900013 315.709 0.10771793448084398
25 comparator sky130 64 1300 1200 0.7692307 0.8333333 1372.980026 508.393 0.2048577820389901
26 comparator sky130 128 1100 1150 0.909090 0.869565 2744.980052 796.047 0.34396273737011823
27 flop sky130 8 1000 1.0000 133.279999 64.8145 0.193835
28 flop sky130 16 1000 1.0000 266.5599975 129.629 0.38715000000000005
29 flop sky130 32 1000 1.0000 533.119995 259.258 0.7723000000000001

File diff suppressed because it is too large Load Diff

View File

@ -12,11 +12,11 @@ from ppaAnalyze import synthsfromcsv
def runCommand(module, width, tech, freq):
command = "make synth DESIGN={} WIDTH={} TECH={} DRIVE=INV FREQ={} MAXOPT=1 MAXCORES=1".format(module, width, tech, freq)
subprocess.Popen(command, shell=True)
subprocess.call(command, shell=True)
def deleteRedundant(synthsToRun):
'''removes any previous runs for the current synthesis specifications'''
synthStr = "rm -rf runs/ppa_{}_{}_rv32e_{}nm_{}_*"
synthStr = "rm -rf runs/{}_{}_rv32e_{}_{}_*"
for synth in synthsToRun:
bashCommand = synthStr.format(*synth)
outputCPL = subprocess.check_output(['bash','-c', bashCommand])
@ -46,7 +46,7 @@ def freqModuleSweep(widths, modules, tech):
return synthsToRun
def filterRedundant(synthsToRun):
bashCommand = "find . -path '*runs/ppa*rv32e*' -prune"
bashCommand = "find . -path '*runs/*' -prune"
output = subprocess.check_output(['bash','-c', bashCommand])
specReg = re.compile('[a-zA-Z0-9]+')
allSynths = output.decode("utf-8").split('\n')[:-1]
@ -84,14 +84,15 @@ if __name__ == '__main__':
synthsToRun = freqSweep(module, width, tech)
##### Run a sweep for multiple modules/widths based on best delay found in existing syntheses
modules = ['adder', 'comparator']
widths = [64, 128]
modules = ['adder']
widths = [8, 16, 32, 64, 128]
tech = 'sky130'
synthsToRun = freqModuleSweep(widths, modules, tech)
##### Only do syntheses for which a run doesn't already exist
synthsToRun = filterRedundant(synthsToRun)
synthsToRun = filterRedundant(synthsToRun)
pool = Pool(processes=25)
pool.starmap(runCommand, synthsToRun)
pool.starmap(runCommand, synthsToRun)
pool.close()
pool.join()