mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
updated synth flow to prevent runs from writing over each other's configs
This commit is contained in:
parent
8b92713cbd
commit
2f28cbf909
@ -6,20 +6,21 @@ NAME := synth
|
|||||||
# defaults
|
# defaults
|
||||||
export DESIGN ?= wallypipelinedcore
|
export DESIGN ?= wallypipelinedcore
|
||||||
export FREQ ?= 3000
|
export FREQ ?= 3000
|
||||||
export CONFIG ?= rv32gc
|
export CONFIG ?= rv32e_FPUoff
|
||||||
|
TITLE = shreya
|
||||||
# sky130 and sky90 presently supported
|
# sky130 and sky90 presently supported
|
||||||
export TECH ?= tsmc28
|
export TECH ?= sky90
|
||||||
# MAXCORES allows parallel compilation, which is faster but less CPU-efficient
|
# MAXCORES allows parallel compilation, which is faster but less CPU-efficient
|
||||||
# Avoid when doing sweeps of many optimization points in parallel
|
# Avoid when doing sweeps of many optimization points in parallel
|
||||||
export MAXCORES ?= 4
|
export MAXCORES ?= 1
|
||||||
# MAXOPT turns on flattening, boundary optimization, and retiming
|
# MAXOPT turns on flattening, boundary optimization, and retiming
|
||||||
# The output netlist is hard to interpret, but significantly better PPA
|
# The output netlist is hard to interpret, but significantly better PPA
|
||||||
export MAXOPT ?= 1
|
export MAXOPT ?= 0
|
||||||
export DRIVE ?= FLOP
|
export DRIVE ?= FLOP
|
||||||
|
|
||||||
time := $(shell date +%F-%H-%M)
|
time := $(shell date +%F-%H-%M)
|
||||||
hash := $(shell git rev-parse --short HEAD)
|
hash := $(shell git rev-parse --short HEAD)
|
||||||
export OUTPUTDIR := newRuns/$(DESIGN)_$(CONFIG)_$(TECH)nm_$(FREQ)_MHz_$(time)_$(hash)
|
export OUTPUTDIR := newRuns/$(DESIGN)_$(CONFIG)_$(TECH)nm_$(FREQ)_MHz_$(time)_$(TITLE)_$(hash)
|
||||||
export SAIFPOWER ?= 0
|
export SAIFPOWER ?= 0
|
||||||
|
|
||||||
CONFIGDIR ?= ${WALLY}/pipelined/config
|
CONFIGDIR ?= ${WALLY}/pipelined/config
|
||||||
@ -50,9 +51,10 @@ rv%.log: rv%
|
|||||||
echo $<
|
echo $<
|
||||||
|
|
||||||
|
|
||||||
DIRS = rv64gc rv32e rv32gc rv64ic rv32ic
|
DIRS32 = rv32e rv32gc rv32ic
|
||||||
# DELDIRS = rv32e rv32gc rv64ic rv64gc rv32ic
|
DIRS64 = rv64ic rv64gc
|
||||||
# CONFIGSUBDIRS = _FPUoff _noMulDiv _noVirtMem _PMP0 _PMP16 _orig
|
DIRS = $(DIRS32) $(DIRS64)
|
||||||
|
|
||||||
# bpred:
|
# bpred:
|
||||||
# @$(foreach kval, $(k), rm -rf $(CONFIGDIR)/rv64gc_bpred_$(kval);)
|
# @$(foreach kval, $(k), rm -rf $(CONFIGDIR)/rv64gc_bpred_$(kval);)
|
||||||
# @$(foreach kval, $(k), cp -r $(CONFIGDIR)/rv64gc $(CONFIGDIR)/rv64gc_bpred_$(kval);)
|
# @$(foreach kval, $(k), cp -r $(CONFIGDIR)/rv64gc $(CONFIGDIR)/rv64gc_bpred_$(kval);)
|
||||||
@ -63,15 +65,17 @@ copy:
|
|||||||
@$(foreach dir, $(DIRS), cp -r $(CONFIGDIR)/$(dir) $(CONFIGDIR)/$(dir)_orig;)
|
@$(foreach dir, $(DIRS), cp -r $(CONFIGDIR)/$(dir) $(CONFIGDIR)/$(dir)_orig;)
|
||||||
@$(foreach dir, $(DIRS), sed -i 's/WAYSIZEINBYTES.*/WAYSIZEINBYTES 512/g' $(CONFIGDIR)/$(dir)_orig/wally-config.vh;)
|
@$(foreach dir, $(DIRS), sed -i 's/WAYSIZEINBYTES.*/WAYSIZEINBYTES 512/g' $(CONFIGDIR)/$(dir)_orig/wally-config.vh;)
|
||||||
@$(foreach dir, $(DIRS), sed -i 's/NUMWAYS.*/NUMWAYS 1/g' $(CONFIGDIR)/$(dir)_orig/wally-config.vh;)
|
@$(foreach dir, $(DIRS), sed -i 's/NUMWAYS.*/NUMWAYS 1/g' $(CONFIGDIR)/$(dir)_orig/wally-config.vh;)
|
||||||
@$(foreach dir, $(DIRS), sed -i "s/RAM_RANGE.*/RAM_RANGE 34\'h01FF/g" $(CONFIGDIR)/$(dir)_orig/wally-config.vh ;)
|
|
||||||
@$(foreach dir, $(DIRS), sed -i 's/BPRED_SIZE.*/BPRED_SIZE 5/g' $(CONFIGDIR)/$(dir)_orig/wally-config.vh;)
|
@$(foreach dir, $(DIRS), sed -i 's/BPRED_SIZE.*/BPRED_SIZE 5/g' $(CONFIGDIR)/$(dir)_orig/wally-config.vh;)
|
||||||
|
|
||||||
|
@$(foreach dir, $(DIRS32), sed -i "s/RAM_RANGE.*/RAM_RANGE 34\'h01FF/g" $(CONFIGDIR)/$(dir)_orig/wally-config.vh ;)
|
||||||
|
@$(foreach dir, $(DIRS64), sed -i "s/RAM_RANGE.*/RAM_RANGE 56\'h01FF/g" $(CONFIGDIR)/$(dir)_orig/wally-config.vh ;)
|
||||||
|
|
||||||
|
|
||||||
del:
|
del:
|
||||||
rm -rf $(CONFIGDIR)/*_*
|
rm -rf $(CONFIGDIR)/*_*
|
||||||
|
|
||||||
configs: $(DIRS)
|
configs: $(DIRS)
|
||||||
$(DIRS):
|
$(DIRS):
|
||||||
#turn off FPU
|
#turn off FPU
|
||||||
rm -rf $(CONFIGDIR)/$@_FPUoff
|
rm -rf $(CONFIGDIR)/$@_FPUoff
|
||||||
cp -r $(CONFIGDIR)/$@_orig $(CONFIGDIR)/$@_FPUoff
|
cp -r $(CONFIGDIR)/$@_orig $(CONFIGDIR)/$@_FPUoff
|
||||||
@ -104,10 +108,10 @@ freqs:
|
|||||||
allsynth: $(CONFIGFILESTRIM)
|
allsynth: $(CONFIGFILESTRIM)
|
||||||
|
|
||||||
$(CONFIGFILESTRIM):
|
$(CONFIGFILESTRIM):
|
||||||
make synth DESIGN=wallypipelinedcore CONFIG=$@ TECH=sky90 FREQ=1000 MAXCORES=1
|
make synth DESIGN=wallypipelinedcore CONFIG=$@ TECH=sky90 FREQ=3000 MAXCORES=1
|
||||||
|
|
||||||
|
|
||||||
synth:
|
synth: clean
|
||||||
@echo "DC Synthesis"
|
@echo "DC Synthesis"
|
||||||
@mkdir -p hdl/
|
@mkdir -p hdl/
|
||||||
@mkdir -p $(OUTPUTDIR)
|
@mkdir -p $(OUTPUTDIR)
|
||||||
@ -129,5 +133,9 @@ clean:
|
|||||||
rm -f Synopsys_stack_trace_*.txt
|
rm -f Synopsys_stack_trace_*.txt
|
||||||
rm -f crte_*.txt
|
rm -f crte_*.txt
|
||||||
|
|
||||||
|
fresh:
|
||||||
|
rm -rf WORK
|
||||||
|
rm -f hdl/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,11 +158,11 @@ def areaDelay(tech, freq, width=None, config=None, special=None):
|
|||||||
# ending freq in 42 means fpu was turned off manually
|
# ending freq in 42 means fpu was turned off manually
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# synthsintocsv()
|
synthsintocsv()
|
||||||
synthsfromcsv('Summary.csv')
|
synthsfromcsv('Summary.csv')
|
||||||
freqPlot('tsmc28', 'rv32', 'e')
|
freqPlot('tsmc28', 'rv32', 'e')
|
||||||
freqPlot('sky90', 'rv32', 'e')
|
freqPlot('sky90', 'rv32', 'e')
|
||||||
areaDelay('tsmc28', testFreq[1], width= 'rv64', config='gc')
|
areaDelay('tsmc28', testFreq[1], width= 'rv64', config='gc')
|
||||||
areaDelay('tsmc28', testFreq[1], special='')
|
|
||||||
areaDelay('sky90', testFreq[0], width='rv64', config='gc')
|
areaDelay('sky90', testFreq[0], width='rv64', config='gc')
|
||||||
areaDelay('sky90', testFreq[0], special='')
|
areaDelay('tsmc28', testFreq[1], special='FPUoff')
|
||||||
|
areaDelay('sky90', testFreq[0], special='FPUoff')
|
@ -1,7 +1,11 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
mv runs runArchive/$(date +"%Y_%m_%d_%I_%M_%p")
|
# mv runs runArchive/$(date +"%Y_%m_%d_%I_%M_%p")
|
||||||
mv newRuns runs
|
# mv newRuns runs
|
||||||
mkdir newRuns
|
# mkdir newRuns
|
||||||
|
make del
|
||||||
|
make copy
|
||||||
|
make configs
|
||||||
|
|
||||||
./wallySynth.py
|
./wallySynth.py
|
@ -3,31 +3,37 @@
|
|||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool
|
||||||
|
import time
|
||||||
|
|
||||||
def runCommand(config, tech, freq):
|
def runCommand(config, tech, freq):
|
||||||
command = "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=0 MAXCORES=1".format(config, tech, freq)
|
commands = ["make fresh", "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=0 MAXCORES=1".format(config, tech, freq)]
|
||||||
subprocess.Popen(command, shell=True)
|
for c in commands:
|
||||||
|
subprocess.Popen(c, shell=True)
|
||||||
|
time.sleep(60)
|
||||||
|
|
||||||
testFreq = [3000, 10000]
|
testFreq = [3000, 10000]
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
techs = ['sky90', 'tsmc28']
|
techs = ['sky90', 'tsmc28']
|
||||||
sweepCenter = [870, 3000]
|
sweepCenter = [870, 2940]
|
||||||
synthsToRun = []
|
synthsToRun = []
|
||||||
|
|
||||||
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
|
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
|
||||||
for i in [0, 1]:
|
pool = Pool()
|
||||||
|
|
||||||
|
for i in [0]:
|
||||||
tech = techs[i]
|
tech = techs[i]
|
||||||
sc = sweepCenter[i]
|
sc = sweepCenter[i]
|
||||||
f = testFreq[i]
|
f = testFreq[i]
|
||||||
for freq in [round(sc+sc*x/100) for x in arr]: # rv32e freq sweep
|
# for freq in [round(sc+sc*x/100) for x in arr]: # rv32e freq sweep
|
||||||
synthsToRun += [['rv32e', tech, freq]]
|
# synthsToRun += [['rv32e', tech, freq]]
|
||||||
for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64i', 'rv64ic', 'rv32e']: # configs
|
# for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64ic', 'rv32e']: # configs
|
||||||
synthsToRun += [[config, tech, f]]
|
# config = config + '_FPUoff' # while FPU under rennovation
|
||||||
for mod in ['FPUoff', 'noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations
|
# synthsToRun += [[config, tech, f]]
|
||||||
|
for mod in ['noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations
|
||||||
config = 'rv64gc_' + mod
|
config = 'rv64gc_' + mod
|
||||||
synthsToRun += [[config, tech, f]]
|
synthsToRun += [[config, tech, f]]
|
||||||
|
|
||||||
pool = Pool()
|
for x in synthsToRun:
|
||||||
pool.starmap(runCommand, synthsToRun)
|
pool.starmap(runCommand, [x])
|
Loading…
Reference in New Issue
Block a user