From 31530c85cb9e9619389e9fb91d07f456c289b11e Mon Sep 17 00:00:00 2001 From: Madeleine Masser-Frye <51804758+mmasserfrye@users.noreply.github.com> Date: Sun, 5 Feb 2023 00:02:50 +0000 Subject: [PATCH] Now modifying dtim and irom even when USESRAM=1 --- synthDC/Makefile | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/synthDC/Makefile b/synthDC/Makefile index 613ca49a..e9f4ac17 100755 --- a/synthDC/Makefile +++ b/synthDC/Makefile @@ -6,8 +6,8 @@ NAME := synth # defaults export DESIGN ?= wallypipelinedcore -export FREQ ?= 3000 -export CONFIG ?= rv32e +export FREQ ?= 10000 +export CONFIG ?= rv64gc export MOD ?= orig # title to add a note in the synth's directory name TITLE = @@ -20,7 +20,7 @@ export MAXCORES ?= 1 # The output netlist is hard to interpret, but significantly better PPA export MAXOPT ?= 0 export DRIVE ?= FLOP -export USESRAM ?= 0 +export USESRAM ?= 1 time := $(shell date +%F-%H-%M) hash := $(shell git rev-parse --short HEAD) @@ -55,25 +55,35 @@ $(CONFIG): cp -r $(OLDCONFIGDIR)/shared/*.vh $(CONFIGDIR) cp -r $(OLDCONFIGDIR)/$(CONFIG)/* $(CONFIGDIR) +# adjust DTIM and IROM to reasonable values depending on config +ifneq ($(filter $(CONFIG), $(DIRS32)),) + sed -i "s/DTIM_RANGE.*/DTIM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh + sed -i "s/IROM_RANGE.*/IROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh +else ifneq ($(filter $(CONFIG), $(DIRS64)),) + sed -i "s/DTIM_RANGE.*/DTIM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh + sed -i "s/IROM_RANGE.*/IROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh +else + $(info $(CONFIG) does not exist in $(DIRS32) or $(DIRS64)) + @echo "Config not in list, RAM_RANGE will be unmodified" +endif + +# if USESRAM = 1, set that in the config file, otherwise reduce sizes ifeq ($(USESRAM), 1) sed -i 's/USE_SRAM.*/USE_SRAM 1/g' $(CONFIGDIR)/wally-shared.vh else sed -i 's/WAYSIZEINBYTES.*/WAYSIZEINBYTES 512/g' $(CONFIGDIR)/wally-config.vh sed -i 's/NUMWAYS.*/NUMWAYS 1/g' $(CONFIGDIR)/wally-config.vh sed -i 's/BPRED_SIZE.*/BPRED_SIZE 5/g' $(CONFIGDIR)/wally-config.vh - - ifneq ($(filter $(CONFIG), $(DIRS32)),) - sed -i "s/DTIM_RANGE.*/DTIM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh - sed -i "s/IROM_RANGE.*/IROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh - else ifneq ($(filter $(CONFIG), $(DIRS64)),) - sed -i "s/DTIM_RANGE.*/DTIM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh - sed -i "s/IROM_RANGE.*/IROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh - else - $(info $(CONFIG) does not exist in $(DIRS32) or $(DIRS64)) - @echo "Config not in list, RAM_RANGE will be unmodified" - endif +ifneq ($(filter $(CONFIG), $(DIRS32)),) + sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh + sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh +else ifneq ($(filter $(CONFIG), $(DIRS64)),) + sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh + sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh +endif endif +# adjust config if synthesizing with any modifications ifeq ($(MOD), FPUoff) # turn off FPU sed -i 's/1 *<< *3/0 << 3/' $(CONFIGDIR)/wally-config.vh