cvw/synthDC/wallySynth.py

46 lines
1.4 KiB
Python
Raw Normal View History

#!/usr/bin/python3
# Madeleine Masser-Frye mmasserfrye@hmc.edu 6/22
import subprocess
from multiprocessing import Pool
import time
2022-07-08 08:02:11 +00:00
import sys
2022-07-08 08:02:11 +00:00
def runSynth(config, tech, freq):
global pool
command = "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=1 MAXCORES=1".format(config, tech, freq)
pool.map(mask, [command])
def mask(command):
subprocess.Popen(command, shell=True)
2022-06-28 02:28:13 +00:00
testFreq = [3000, 10000]
if __name__ == '__main__':
2022-07-08 08:02:11 +00:00
i = 0
techs = ['sky90', 'tsmc28']
synthsToRun = []
2022-07-08 08:02:11 +00:00
tech = techs[i]
freq = testFreq[i]
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
pool = Pool()
2022-07-08 08:02:11 +00:00
staggerPeriod = 60 #seconds
typeToRun = sys.argv[1]
if 'configs' in typeToRun:
for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64ic', 'rv32e']: # configs
config = config + '_orig' # until memory integrated
runSynth(config, tech, freq)
time.sleep(staggerPeriod)
elif 'features' in typeToRun:
for mod in ['FPUoff', 'noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations
config = 'rv64gc_' + mod
runSynth(config, tech, freq)
time.sleep(staggerPeriod)
elif 'freqs' in typeToRun:
sc = int(sys.argv[2])
config = 'rv32e'
2022-07-07 16:08:21 +00:00
for freq in [round(sc+sc*x/100) for x in arr]: # rv32e freq sweep
2022-07-08 08:02:11 +00:00
runSynth(config, tech, freq)