mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Update to ppaSynth and ppaAnalyze - still have to push in mod for ppaAnalyze to plot more refined plots as well as some other plots - I have a fix working - just need to push in which will do later today
This commit is contained in:
parent
825386241a
commit
30c230ba95
@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
#
|
||||||
|
# Python regression test for DC
|
||||||
# Madeleine Masser-Frye mmasserfrye@hmc.edu 5/22
|
# Madeleine Masser-Frye mmasserfrye@hmc.edu 5/22
|
||||||
|
# James Stine james.stine@okstate.edu 15 October 2023
|
||||||
|
#
|
||||||
|
|
||||||
import scipy.optimize as opt
|
import scipy.optimize as opt
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -565,6 +569,7 @@ def makeLineLegend():
|
|||||||
fullLeg += [lines.Line2D([0], [0], color='black', label='smallest', linestyle='--')]
|
fullLeg += [lines.Line2D([0], [0], color='black', label='smallest', linestyle='--')]
|
||||||
fullLeg += [lines.Line2D([0], [0], color='blue', label='tsmc28', marker='^')]
|
fullLeg += [lines.Line2D([0], [0], color='blue', label='tsmc28', marker='^')]
|
||||||
fullLeg += [lines.Line2D([0], [0], color='green', label='sky90', marker='o')]
|
fullLeg += [lines.Line2D([0], [0], color='green', label='sky90', marker='o')]
|
||||||
|
fullLeg += [lines.Line2D([0], [0], color='green', label='sky130', marker='+')]
|
||||||
fullLeg += [lines.Line2D([0], [0], color='red', label='combined', marker='_')]
|
fullLeg += [lines.Line2D([0], [0], color='red', label='combined', marker='_')]
|
||||||
fig.legend(handles=fullLeg, ncol=5, handlelength=1.4, loc='center')
|
fig.legend(handles=fullLeg, ncol=5, handlelength=1.4, loc='center')
|
||||||
saveStr = './plots/legend.png'
|
saveStr = './plots/legend.png'
|
||||||
@ -689,7 +694,7 @@ def makePlotDirectory():
|
|||||||
os.makedirs(new_directory)
|
os.makedirs(new_directory)
|
||||||
os.chdir(new_directory)
|
os.chdir(new_directory)
|
||||||
if 'freq' in folder:
|
if 'freq' in folder:
|
||||||
for tech in ['sky90', 'tsmc28']:
|
for tech in ['sky90', 'sky130', 'tsmc28']:
|
||||||
for mod in modules:
|
for mod in modules:
|
||||||
tech_directory = os.path.join(new_directory, tech)
|
tech_directory = os.path.join(new_directory, tech)
|
||||||
mod_directory = os.path.join(tech_directory, mod)
|
mod_directory = os.path.join(tech_directory, mod)
|
||||||
@ -702,15 +707,14 @@ def makePlotDirectory():
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
##############################
|
##############################
|
||||||
# set up stuff, global variables
|
# set up stuff, global variables
|
||||||
widths = [8, 16, 32, 64, 128]
|
widths = [8, 16, 32, 64, 128]
|
||||||
modules = ['priorityencoder', 'add', 'csa', 'shiftleft', 'comparator', 'flop', 'mux2', 'mux4', 'mux8', 'mult'] #, 'mux2d', 'mux4d', 'mux8d']
|
modules = ['priorityencoder', 'add', 'csa', 'shiftleft', 'comparator', 'flop', 'mux2', 'mux4', 'mux8', 'mult']
|
||||||
normAddWidth = 32 # divisor to use with N since normalizing to add_32
|
normAddWidth = 32 # divisor to use with N since normalizing to add_32
|
||||||
|
|
||||||
fitDict = {'add': ['cg', 'l', 'l'], 'mult': ['cg', 's', 's'], 'comparator': ['cg', 'l', 'l'], 'csa': ['c', 'l', 'l'], 'shiftleft': ['cg', 'l', 'ln'], 'flop': ['c', 'l', 'l'], 'priorityencoder': ['cg', 'l', 'l']}
|
fitDict = {'add': ['cg', 'l', 'l'], 'mult': ['cg', 's', 's'], 'comparator': ['cg', 'l', 'l'], 'csa': ['c', 'l', 'l'], 'shiftleft': ['cg', 'l', 'ln'], 'flop': ['c', 'l', 'l'], 'priorityencoder': ['cg', 'l', 'l']} fitDict.update(dict.fromkeys(['mux2', 'mux4', 'mux8'], ['cg', 'l', 'l']))
|
||||||
fitDict.update(dict.fromkeys(['mux2', 'mux4', 'mux8'], ['cg', 'l', 'l']))
|
|
||||||
|
|
||||||
TechSpec = namedtuple("TechSpec", "tech color shape delay area lpower denergy")
|
TechSpec = namedtuple("TechSpec", "tech color shape delay area lpower denergy")
|
||||||
techSpecs = [['sky90', 'green', 'o', 43.2e-3, 1440.600027, 714.057, 0.658022690438], ['tsmc28', 'blue', '^', 12.2e-3, 209.286002, 1060.0, .08153281695882594]]
|
techSpecs = [['sky90', 'green', 'o', 43.2e-3, 1440.600027, 714.057, 0.658022690438], ['sky130', 'red', 'o', 43.2e-3, 1440.600027, 714.057, 0.658022690438], ['tsmc28', 'blue', '^', 12.2e-3, 209.286002, 1060.0, .08153281695882594]]
|
||||||
techSpecs = [TechSpec(*t) for t in techSpecs]
|
techSpecs = [TechSpec(*t) for t in techSpecs]
|
||||||
combined = TechSpec('combined fit', 'red', '_', 0, 0, 0, 0)
|
combined = TechSpec('combined fit', 'red', '_', 0, 0, 0, 0)
|
||||||
##############################
|
##############################
|
||||||
@ -731,7 +735,8 @@ if __name__ == '__main__':
|
|||||||
for mod in modules:
|
for mod in modules:
|
||||||
for w in widths:
|
for w in widths:
|
||||||
freqPlot('sky90', mod, w)
|
freqPlot('sky90', mod, w)
|
||||||
freqPlot('tsmc28', mod, w)
|
#freqPlot('sky130', mod, w)
|
||||||
plotPPA(mod, norm=False)
|
#freqPlot('tsmc28', mod, w)
|
||||||
plotPPA(mod, aleOpt=True)
|
#plotPPA(mod, norm=False)
|
||||||
plt.close('all')
|
#plotPPA(mod, aleOpt=True)
|
||||||
|
plt.close('all')
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
# Madeleine Masser-Frye mmasserfrye@hmc.edu 6/22
|
#
|
||||||
|
# Python analysis for regression test run by ppaSynth.py
|
||||||
|
# Madeleine Masser-Frye mmasserfrye@hmc.edu 5/22
|
||||||
|
# James Stine james.stine@okstate.edu 15 October 2023
|
||||||
|
#
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool
|
||||||
@ -56,7 +59,7 @@ if __name__ == '__main__':
|
|||||||
##### Run specific syntheses
|
##### Run specific syntheses
|
||||||
widths = [8, 16, 32, 64, 128]
|
widths = [8, 16, 32, 64, 128]
|
||||||
modules = ['mult', 'add', 'shiftleft', 'flop', 'comparator', 'priorityencoder', 'add', 'csa', 'mux2', 'mux4', 'mux8']
|
modules = ['mult', 'add', 'shiftleft', 'flop', 'comparator', 'priorityencoder', 'add', 'csa', 'mux2', 'mux4', 'mux8']
|
||||||
techs = ['sky90', 'tsmc28']
|
techs = ['sky90', 'sky130', 'tsmc28', 'tsmc28psyn']
|
||||||
freqs = [5000]
|
freqs = [5000]
|
||||||
synthsToRun = allCombos(widths, modules, techs, freqs)
|
synthsToRun = allCombos(widths, modules, techs, freqs)
|
||||||
|
|
||||||
@ -70,4 +73,4 @@ if __name__ == '__main__':
|
|||||||
synthsToRun = filterRedundant(synthsToRun)
|
synthsToRun = filterRedundant(synthsToRun)
|
||||||
|
|
||||||
pool = Pool(processes=25)
|
pool = Pool(processes=25)
|
||||||
pool.starmap(print, synthsToRun)
|
pool.starmap(print, synthsToRun)
|
||||||
|
Loading…
Reference in New Issue
Block a user