Some fixes for synthesis scripts after parameterization

This commit is contained in:
David Harris 2023-08-24 04:54:09 -07:00
parent 2738423441
commit e02f9cc2c8
2 changed files with 20 additions and 18 deletions

View File

@ -55,11 +55,11 @@ $(CONFIG):
# 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)/config.vh
sed -i "s/IROM_RANGE.*/IROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/config.vh
sed -i "s/DTIM_RANGE.*/DTIM_RANGE = 34\'h01FF;/g" $(CONFIGDIR)/config.vh
sed -i "s/IROM_RANGE.*/IROM_RANGE = 34\'h01FF;/g" $(CONFIGDIR)/config.vh
else ifneq ($(filter $(CONFIG), $(DIRS64)),)
sed -i "s/DTIM_RANGE.*/DTIM_RANGE 56\'h01FF/g" $(CONFIGDIR)/config.vh
sed -i "s/IROM_RANGE.*/IROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/config.vh
sed -i "s/DTIM_RANGE.*/DTIM_RANGE = 56\'h01FF;/g" $(CONFIGDIR)/config.vh
sed -i "s/IROM_RANGE.*/IROM_RANGE = 56\'h01FF;/g" $(CONFIGDIR)/config.vh
else
$(info $(CONFIG) does not exist in $(DIRS32) or $(DIRS64))
@echo "Config not in list, RAM_RANGE will be unmodified"
@ -67,18 +67,18 @@ 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)/config.vh
sed -i 's/USE_SRAM.*/USE_SRAM = 1;/g' $(CONFIGDIR)/config.vh
else
sed -i 's/WAYSIZEINBYTES.*/WAYSIZEINBYTES 512/g' $(CONFIGDIR)/config.vh
sed -i 's/NUMWAYS.*/NUMWAYS 1/g' $(CONFIGDIR)/config.vh
sed -i 's/BPRED_SIZE.*/BPRED_SIZE 5/g' $(CONFIGDIR)/config.vh
sed -i 's/BTB_SIZE.*/BTB_SIZE 5/g' $(CONFIGDIR)/config.vh
sed -i 's/WAYSIZEINBYTES.*/WAYSIZEINBYTES = 512;/g' $(CONFIGDIR)/config.vh
sed -i 's/NUMWAYS.*/NUMWAYS = 1;/g' $(CONFIGDIR)/config.vh
sed -i 's/BPRED_SIZE.*/BPRED_SIZE = 5;/g' $(CONFIGDIR)/config.vh
sed -i 's/BTB_SIZE.*/BTB_SIZE = 5;/g' $(CONFIGDIR)/config.vh
ifneq ($(filter $(CONFIG), $(DIRS32)),)
sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/config.vh
sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE 34\'h01FF/g" $(CONFIGDIR)/config.vh
sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE = 34\'h01FF;/g" $(CONFIGDIR)/config.vh
sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE = 34\'h01FF;/g" $(CONFIGDIR)/config.vh
else ifneq ($(filter $(CONFIG), $(DIRS64)),)
sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/config.vh
sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE 56\'h01FF/g" $(CONFIGDIR)/config.vh
sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE = 56\'h01FF;/g" $(CONFIGDIR)/config.vh
sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE = 56\'h01FF;/g" $(CONFIGDIR)/config.vh
endif
endif
@ -94,10 +94,10 @@ endif
ifneq ($(MOD), orig)
# PMP 0
sed -i 's/PMP_ENTRIES \(64\|16\|0\)/PMP_ENTRIES 0/' $(CONFIGDIR)/config.vh
sed -i 's/PMP_ENTRIES \(64\|16\|0\)/PMP_ENTRIES = 0;/' $(CONFIGDIR)/config.vh
ifneq ($(MOD), PMP0)
# no priv
sed -i 's/ZICSR_SUPPORTED *1/ZICSR_SUPPORTED 0/' $(CONFIGDIR)/config.vh
sed -i 's/ZICSR_SUPPORTED *1/ZICSR_SUPPORTED = 0;/' $(CONFIGDIR)/config.vh
ifneq ($(MOD), noPriv)
# turn off FPU
sed -i 's/1 *<< *3/0 << 3/' $(CONFIGDIR)/config.vh
@ -128,7 +128,7 @@ mkdirecs:
@mkdir -p $(OUTPUTDIR)/mapped
@mkdir -p $(OUTPUTDIR)/unmapped
synth: mkdirecs configs rundc clean
synth: mkdirecs configs rundc # clean
rundc:
ifeq ($(TECH), tsmc28psyn)

View File

@ -25,7 +25,9 @@ set maxopt $::env(MAXOPT)
set drive $::env(DRIVE)
eval file copy -force [glob ${cfg}/*.vh] {$outputDir/hdl/}
eval file copy -force [glob ${hdl_src}/*.sv] {$outputDir/hdl/}
eval file copy -force [glob ${cfg}/*.vh] {$outputDir/hdl/}
eval file copy -force [glob ${hdl_src}/cvw.sv] {$outputDir/hdl/}
eval file copy -force [glob ${hdl_src}/../fpga/src/wallypipelinedsocwrapper.sv] {$outputDir/hdl/}
eval file copy -force [glob ${hdl_src}/*/*.sv] {$outputDir/hdl/}
eval file copy -force [glob ${hdl_src}/*/*/*.sv] {$outputDir/hdl/}
@ -74,7 +76,7 @@ if { [shell_is_in_topographical_mode] } {
#set alib_library_analysis_path ./$outputDir
define_design_lib WORK -path ./$outputDir/WORK
analyze -f sverilog -lib WORK $my_verilog_files
elaborate $my_toplevel -lib WORK
elaborate $my_toplevel -parameter P -lib WORK
# Set the current_design
current_design $my_toplevel