cvw/synthDC/Makefile

87 lines
2.2 KiB
Makefile
Raw Normal View History

#
# Makefile for synthesis
# Shreya Sanghai (ssanghai@hmc.edu) 2/28/2022
# Madeleine Masser-Frye (mmasserfrye@hmc.edu) 1/27/2023
2023-08-29 15:25:31 +00:00
NAME := synth
# defaults
export DESIGN ?= wallypipelinedcore
export FREQ ?= 10000
export CONFIG ?= rv64gc
export MOD ?= orig
2022-07-08 22:39:53 +00:00
# title to add a note in the synth's directory name
2022-07-08 08:02:11 +00:00
TITLE =
# tsmc28, sky130, and sky90 presently supported
export TECH ?= sky130
# MAXCORES allows parallel compilation, which is faster but less CPU-efficient
# Avoid when doing sweeps of many optimization points in parallel
export MAXCORES ?= 1
# MAXOPT turns on flattening, boundary optimization, and retiming
# The output netlist is hard to interpret, but significantly better PPA
export MAXOPT ?= 0
2022-06-23 23:16:43 +00:00
export DRIVE ?= FLOP
export USESRAM ?= 0
export WIDTH ?= 32
time := $(shell date +%F-%H-%M)
hash := $(shell git rev-parse --short HEAD)
2023-11-17 23:10:57 +00:00
export OUTPUTDIR := runs/$(DESIGN)_$(CONFIG)_$(MOD)_$(TECH)nm_$(FREQ)_MHz_$(time)_$(TITLE)_$(hash)
export SAIFPOWER ?= 0
2023-02-02 22:14:11 +00:00
OLDCONFIGDIR ?= ${WALLY}/config
2023-02-04 10:24:01 +00:00
export CONFIGDIR ?= $(OUTPUTDIR)/config
2022-04-25 16:03:02 +00:00
default:
2022-07-08 22:39:53 +00:00
@echo " Basic synthesis procedure for Wally:"
@echo " Invoke with make synth"
@echo "Use wallySynth.py to run a concurrent sweep "
2022-02-27 09:50:10 +00:00
DIRS32 = rv32e rv32gc rv32imc rv32i
DIRS64 = rv64i rv64gc
DIRS = $(DIRS32) $(DIRS64)
configs: $(CONFIG)
$(CONFIG):
@echo $(CONFIG)
cp -r $(OLDCONFIGDIR)/shared/*.vh $(CONFIGDIR)
2024-04-28 00:06:44 +00:00
ifeq ($(MOD), orig)
cp -rf $(OLDCONFIGDIR)/deriv/$(CONFIG)/config.vh $(CONFIGDIR) | true
2024-04-28 00:06:44 +00:00
else
cp -rf $(OLDCONFIGDIR)/deriv/$(CONFIG)_$(MOD)/config.vh $(CONFIGDIR) | true
endif
ifeq ($(SAIFPOWER), 1)
2023-02-02 22:48:23 +00:00
cp -f ../sim/power.saif .
endif
mkdirecs:
@echo "DC Synthesis"
@mkdir -p $(OUTPUTDIR)
2023-02-04 10:24:01 +00:00
@mkdir -p $(OUTPUTDIR)/hdl
@mkdir -p $(OUTPUTDIR)/config
@mkdir -p $(OUTPUTDIR)/reports
@mkdir -p $(OUTPUTDIR)/mapped
@mkdir -p $(OUTPUTDIR)/unmapped
synth: mkdirecs configs rundc # clean
rundc:
ifeq ($(TECH), tsmc28psyn)
2023-02-16 14:07:17 +00:00
dc_shell-xg-t -64bit -topographical_mode -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out
else
dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out
2023-02-16 21:16:32 +00:00
endif
clean:
rm -rf $(OUTPUTDIR)/hdl
rm -rf $(OUTPUTDIR)/WORK
rm -rf $(OUTPUTDIR)/alib-52
rm -f default.svf
rm -f command.log
rm -f filenames*.log
2022-02-10 00:42:48 +00:00
rm -f power.saif
2022-06-28 02:23:29 +00:00
rm -f Synopsys_stack_trace_*.txt
2023-02-16 14:07:17 +00:00
rm -f crte_*.txt