2023-11-17 22:25:35 +00:00
|
|
|
#
|
|
|
|
# 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
|
2022-02-09 21:06:42 +00:00
|
|
|
# defaults
|
|
|
|
export DESIGN ?= wallypipelinedcore
|
2023-02-05 00:02:50 +00:00
|
|
|
export FREQ ?= 10000
|
|
|
|
export CONFIG ?= rv64gc
|
2023-01-26 04:58:15 +00:00
|
|
|
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
|
2023-11-13 08:39:25 +00:00
|
|
|
export TECH ?= sky130
|
2022-02-14 01:22:17 +00:00
|
|
|
# MAXCORES allows parallel compilation, which is faster but less CPU-efficient
|
|
|
|
# Avoid when doing sweeps of many optimization points in parallel
|
2022-07-07 15:52:01 +00:00
|
|
|
export MAXCORES ?= 1
|
2022-02-14 01:22:17 +00:00
|
|
|
# MAXOPT turns on flattening, boundary optimization, and retiming
|
|
|
|
# The output netlist is hard to interpret, but significantly better PPA
|
2022-07-07 15:52:01 +00:00
|
|
|
export MAXOPT ?= 0
|
2022-06-23 23:16:43 +00:00
|
|
|
export DRIVE ?= FLOP
|
2023-02-18 01:37:05 +00:00
|
|
|
export USESRAM ?= 0
|
2023-11-11 03:10:35 +00:00
|
|
|
export WIDTH ?= 32
|
2022-02-09 21:06:42 +00:00
|
|
|
|
|
|
|
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)
|
2023-11-17 22:25:35 +00:00
|
|
|
export SAIFPOWER ?= 0
|
2022-01-30 23:34:56 +00:00
|
|
|
|
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
|
|
|
|
2022-01-30 23:34:56 +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-17 17:57:02 +00:00
|
|
|
|
2022-02-27 09:50:10 +00:00
|
|
|
|
2023-01-29 19:40:08 +00:00
|
|
|
DIRS32 = rv32e rv32gc rv32imc rv32i
|
2023-01-26 04:58:15 +00:00
|
|
|
DIRS64 = rv64i rv64gc
|
2022-07-07 15:52:01 +00:00
|
|
|
DIRS = $(DIRS32) $(DIRS64)
|
|
|
|
|
2023-01-30 18:54:19 +00:00
|
|
|
configs: $(CONFIG)
|
|
|
|
$(CONFIG):
|
|
|
|
@echo $(CONFIG)
|
2023-02-04 09:50:36 +00:00
|
|
|
cp -r $(OLDCONFIGDIR)/shared/*.vh $(CONFIGDIR)
|
2024-04-28 00:06:44 +00:00
|
|
|
ifeq ($(MOD), orig)
|
2024-04-26 22:58:36 +00:00
|
|
|
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
|
2023-01-26 04:58:15 +00:00
|
|
|
|
2023-01-30 18:54:19 +00:00
|
|
|
ifeq ($(SAIFPOWER), 1)
|
2023-02-02 22:48:23 +00:00
|
|
|
cp -f ../sim/power.saif .
|
2023-01-30 18:54:19 +00:00
|
|
|
endif
|
|
|
|
|
2023-01-26 04:58:15 +00:00
|
|
|
mkdirecs:
|
2022-01-30 23:34:56 +00:00
|
|
|
@echo "DC Synthesis"
|
2022-02-09 21:06:42 +00:00
|
|
|
@mkdir -p $(OUTPUTDIR)
|
2023-02-04 10:24:01 +00:00
|
|
|
@mkdir -p $(OUTPUTDIR)/hdl
|
|
|
|
@mkdir -p $(OUTPUTDIR)/config
|
2022-02-09 21:06:42 +00:00
|
|
|
@mkdir -p $(OUTPUTDIR)/reports
|
|
|
|
@mkdir -p $(OUTPUTDIR)/mapped
|
|
|
|
@mkdir -p $(OUTPUTDIR)/unmapped
|
2023-01-26 04:58:15 +00:00
|
|
|
|
2023-10-19 17:44:03 +00:00
|
|
|
synth: mkdirecs configs rundc # clean
|
2023-01-30 18:54:19 +00:00
|
|
|
|
2023-01-26 04:58:15 +00:00
|
|
|
rundc:
|
2023-02-19 15:00:16 +00:00
|
|
|
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
|
2023-02-19 15:00:16 +00:00
|
|
|
else
|
|
|
|
dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out
|
2023-02-16 21:16:32 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2023-01-26 04:58:15 +00:00
|
|
|
clean:
|
|
|
|
rm -rf $(OUTPUTDIR)/hdl
|
2022-07-08 22:29:18 +00:00
|
|
|
rm -rf $(OUTPUTDIR)/WORK
|
2022-07-09 02:40:41 +00:00
|
|
|
rm -rf $(OUTPUTDIR)/alib-52
|
2022-01-30 23:34:56 +00:00
|
|
|
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
|
2023-11-11 03:10:35 +00:00
|
|
|
|