update ppaSynth.py with runCommand

This commit is contained in:
James E. Stine 2023-11-09 00:52:40 -06:00
parent a6bc69d73f
commit 5a115bc6f2

View File

@ -1,16 +1,19 @@
#!/usr/bin/python3
#
# Python analysis for regression test run by ppaSynth.py
# Python regression test for DC
# 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
from ppaAnalyze import synthsfromcsv
def runCommand(module, width, tech, freq):
command = "make synth DESIGN=ppa_{}_{} TECH={} DRIVE=INV FREQ={} MAXOPT=1 MAXCORES=1".format(module, width, tech, freq)
command = "make synth DESIGN={} WIDTH={} TECH={} DRIVE=INV FREQ={} MAXOPT=1 MAXCORES=1".format(module, width, tech, freq)
print('here we go')
subprocess.Popen(command, shell=True)
def deleteRedundant(synthsToRun):
@ -23,7 +26,7 @@ def deleteRedundant(synthsToRun):
def freqSweep(module, width, tech):
synthsToRun = []
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
allSynths = synthsfromcsv('bestSynths.csv')
allSynths = synthsfromcsv('ppa/bestSynths.csv')
for synth in allSynths:
if (synth.module == module) & (synth.tech == tech) & (synth.width == width):
f = 1000/synth.delay
@ -59,7 +62,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', 'sky130', 'tsmc28', 'tsmc28psyn']
techs = ['sky90', 'tsmc28']
freqs = [5000]
synthsToRun = allCombos(widths, modules, techs, freqs)
@ -73,4 +76,4 @@ if __name__ == '__main__':
synthsToRun = filterRedundant(synthsToRun)
pool = Pool(processes=25)
pool.starmap(print, synthsToRun)
pool.starmap(runCommand, synthsToRun)