From 41f4c634b0b1601c0485c9eb5e28b9250c60cb3e Mon Sep 17 00:00:00 2001 From: "James E. Stine" Date: Wed, 8 Nov 2023 14:00:36 -0600 Subject: [PATCH] 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 --- synthDC/ppa/ppaAnalyze.py | 25 +++++++++++++++---------- synthDC/ppa/ppaSynth.py | 11 +++++++---- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/synthDC/ppa/ppaAnalyze.py b/synthDC/ppa/ppaAnalyze.py index 03758cdf6..459a8520d 100755 --- a/synthDC/ppa/ppaAnalyze.py +++ b/synthDC/ppa/ppaAnalyze.py @@ -1,5 +1,9 @@ #!/usr/bin/python3 +# +# Python regression test for DC # Madeleine Masser-Frye mmasserfrye@hmc.edu 5/22 +# James Stine james.stine@okstate.edu 15 October 2023 +# import scipy.optimize as opt import subprocess @@ -565,6 +569,7 @@ def makeLineLegend(): 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='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='_')] fig.legend(handles=fullLeg, ncol=5, handlelength=1.4, loc='center') saveStr = './plots/legend.png' @@ -689,7 +694,7 @@ def makePlotDirectory(): os.makedirs(new_directory) os.chdir(new_directory) if 'freq' in folder: - for tech in ['sky90', 'tsmc28']: + for tech in ['sky90', 'sky130', 'tsmc28']: for mod in modules: tech_directory = os.path.join(new_directory, tech) mod_directory = os.path.join(tech_directory, mod) @@ -702,15 +707,14 @@ def makePlotDirectory(): if __name__ == '__main__': ############################## # set up stuff, global variables - widths = [8, 16, 32, 64, 128] - modules = ['priorityencoder', 'add', 'csa', 'shiftleft', 'comparator', 'flop', 'mux2', 'mux4', 'mux8', 'mult'] #, 'mux2d', 'mux4d', 'mux8d'] + widths = [8, 16, 32, 64, 128] + modules = ['priorityencoder', 'add', 'csa', 'shiftleft', 'comparator', 'flop', 'mux2', 'mux4', 'mux8', 'mult'] 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.update(dict.fromkeys(['mux2', 'mux4', 'mux8'], ['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'])) 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] combined = TechSpec('combined fit', 'red', '_', 0, 0, 0, 0) ############################## @@ -731,7 +735,8 @@ if __name__ == '__main__': for mod in modules: for w in widths: freqPlot('sky90', mod, w) - freqPlot('tsmc28', mod, w) - plotPPA(mod, norm=False) - plotPPA(mod, aleOpt=True) - plt.close('all') \ No newline at end of file + #freqPlot('sky130', mod, w) + #freqPlot('tsmc28', mod, w) + #plotPPA(mod, norm=False) + #plotPPA(mod, aleOpt=True) + plt.close('all') diff --git a/synthDC/ppa/ppaSynth.py b/synthDC/ppa/ppaSynth.py index cbfd52538..6b45e2c4c 100755 --- a/synthDC/ppa/ppaSynth.py +++ b/synthDC/ppa/ppaSynth.py @@ -1,6 +1,9 @@ #!/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 re from multiprocessing import Pool @@ -56,7 +59,7 @@ if __name__ == '__main__': ##### Run specific syntheses widths = [8, 16, 32, 64, 128] modules = ['mult', 'add', 'shiftleft', 'flop', 'comparator', 'priorityencoder', 'add', 'csa', 'mux2', 'mux4', 'mux8'] - techs = ['sky90', 'tsmc28'] + techs = ['sky90', 'sky130', 'tsmc28', 'tsmc28psyn'] freqs = [5000] synthsToRun = allCombos(widths, modules, techs, freqs) @@ -70,4 +73,4 @@ if __name__ == '__main__': synthsToRun = filterRedundant(synthsToRun) pool = Pool(processes=25) - pool.starmap(print, synthsToRun) \ No newline at end of file + pool.starmap(print, synthsToRun)