wally config, freq, and path sweep synth automation

This commit is contained in:
Madeleine Masser-Frye 2022-06-24 06:30:57 +00:00
parent 2f90292e10
commit 528ac7f7f2
3 changed files with 41 additions and 4 deletions

View file

@ -5,10 +5,10 @@ NAME := synth
# defaults
export DESIGN ?= wallypipelinedcore
export FREQ ?= 500
export CONFIG ?= rv32e
export FREQ ?= 4000
export CONFIG ?= rv64gc
# sky130 and sky90 presently supported
export TECH ?= sky130
export TECH ?= tsmc28
# MAXCORES allows parallel compilation, which is faster but less CPU-efficient
# Avoid when doing sweeps of many optimization points in parallel
export MAXCORES ?= 4
@ -19,7 +19,7 @@ export DRIVE ?= FLOP
time := $(shell date +%F-%H-%M)
hash := $(shell git rev-parse --short HEAD)
export OUTPUTDIR := runs/$(DESIGN)_$(CONFIG)_$(TECH)nm_$(FREQ)_MHz_$(time)_$(hash)
export OUTPUTDIR := newRuns/$(DESIGN)_$(CONFIG)_$(TECH)nm_$(FREQ)_MHz_$(time)_$(hash)
export SAIFPOWER ?= 0
CONFIGDIR ?= ${WALLY}/pipelined/config

6
synthDC/runAllSynths.sh Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/bash
mv runs runArchive/$(date +"%Y_%m_%d_%I_%M_%p")
mv newRuns runs
mkdir newRuns
./wallySynth.py

31
synthDC/wallySynth.py Executable file
View file

@ -0,0 +1,31 @@
#!/usr/bin/python3
# Madeleine Masser-Frye mmasserfrye@hmc.edu 6/22
import subprocess
from multiprocessing import Pool
def runCommand(config, tech, freq):
command = "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=0 MAXCORES=1".format(config, tech, freq)
subprocess.Popen(command, shell=True)
if __name__ == '__main__':
techs = ['sky90', 'tsmc28']
bestAchieved = [750, 3000]
synthsToRun = []
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
for i in [0, 1]:
tech = techs[i]
f = bestAchieved[i]
for freq in [round(f+f*x/100) for x in arr]: # rv32e freq sweep
synthsToRun += [['rv32e', tech, freq]]
for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64i', 'rv64ic']: # configs
synthsToRun += [[config, tech, f]]
for mod in ['FPUoff', 'noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations
config = 'rv64gc_' + mod
synthsToRun += [[config, tech, f]]
pool = Pool()
pool.starmap(runCommand, synthsToRun)