From 528ac7f7f2e51f3c806a5fd35d7d7f706c60609d Mon Sep 17 00:00:00 2001 From: Madeleine Masser-Frye <51804758+mmasserfrye@users.noreply.github.com> Date: Fri, 24 Jun 2022 06:30:57 +0000 Subject: [PATCH] wally config, freq, and path sweep synth automation --- synthDC/Makefile | 8 ++++---- synthDC/runAllSynths.sh | 6 ++++++ synthDC/wallySynth.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100755 synthDC/runAllSynths.sh create mode 100755 synthDC/wallySynth.py diff --git a/synthDC/Makefile b/synthDC/Makefile index 3de666659..53faa4522 100755 --- a/synthDC/Makefile +++ b/synthDC/Makefile @@ -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 diff --git a/synthDC/runAllSynths.sh b/synthDC/runAllSynths.sh new file mode 100755 index 000000000..1b81a6cd0 --- /dev/null +++ b/synthDC/runAllSynths.sh @@ -0,0 +1,6 @@ +#!/usr/bin/bash + +mv runs runArchive/$(date +"%Y_%m_%d_%I_%M_%p") +mv newRuns runs +mkdir newRuns +./wallySynth.py \ No newline at end of file diff --git a/synthDC/wallySynth.py b/synthDC/wallySynth.py new file mode 100755 index 000000000..bf32b6f9b --- /dev/null +++ b/synthDC/wallySynth.py @@ -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) \ No newline at end of file