Fixed copying hdl subdirectories and referencing the correct config files for modified features

This commit is contained in:
Madeleine Masser-Frye 2023-01-28 01:00:29 +00:00
parent eda3d4c667
commit c2f888d5da
2 changed files with 11 additions and 10 deletions

View File

@ -6,13 +6,14 @@ NAME := synth
# defaults # defaults
export DESIGN ?= wallypipelinedcore export DESIGN ?= wallypipelinedcore
export FREQ ?= 3000 export FREQ ?= 1000
export CONFIG ?= rv32e export CONFIG ?= rv64gc
export MOD ?= orig export MOD ?= orig
export CONFIGMOD ?= $(CONFIG)_$(MOD)
# title to add a note in the synth's directory name # title to add a note in the synth's directory name
TITLE = TITLE =
# tsmc28, sky130, and sky90 presently supported # tsmc28, sky130, and sky90 presently supported
export TECH ?= sky90 export TECH ?= tsmc28
# 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 ?= 1 export MAXCORES ?= 1
@ -29,13 +30,14 @@ export SAIFPOWER ?= 0
configAsList := $(subst _, ,$(CONFIG)) configAsList := $(subst _, ,$(CONFIG))
BASECONFIG := $(word 1, $(configAsList)) BASECONFIG := $(word 1, $(configAsList))
OLDCONFIGDIR ?= ${WALLY}/pipelined/config OLDCONFIGDIR ?= ${WALLY}/pipelined/config
CONFIGDIR ?= $(OUTPUTDIR)/hdl/config export CONFIGDIR ?= $(OUTPUTDIR)/hdl/config
CONFIGFILES ?= $(shell find $(CONFIGDIR) -name rv*_*) CONFIGFILES ?= $(shell find $(CONFIGDIR) -name rv*_*)
CONFIGFILESTRIM = $(notdir $(CONFIGFILES)) CONFIGFILESTRIM = $(notdir $(CONFIGFILES))
# k = 3 6 # k = 3 6
print: print:
@echo $(FREQS) @echo $(FREQS)
@echo $(BASECONFIG)
@echo $(CONFIGFILESTRIM) @echo $(CONFIGFILESTRIM)
@ -108,7 +110,7 @@ mkdirecs:
@mkdir -p $(OUTPUTDIR)/mapped @mkdir -p $(OUTPUTDIR)/mapped
@mkdir -p $(OUTPUTDIR)/unmapped @mkdir -p $(OUTPUTDIR)/unmapped
synth: mkdirecs configs rundc clean synth: mkdirecs configs rundc #clean TODO
rundc: rundc:
dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out

View File

@ -18,19 +18,18 @@ set_host_options -max_cores $::env(MAXCORES)
# get outputDir from environment (Makefile) # get outputDir from environment (Makefile)
set outputDir $::env(OUTPUTDIR) set outputDir $::env(OUTPUTDIR)
set cfgName $::env(CONFIG) set cfgName $::env(CONFIGMOD)
# Config # Config
set hdl_src "../pipelined/src" set hdl_src "../pipelined/src"
set cfg "${hdl_src}/../config/${cfgName}/wally-config.vh"
set saifpower $::env(SAIFPOWER) set saifpower $::env(SAIFPOWER)
set maxopt $::env(MAXOPT) set maxopt $::env(MAXOPT)
set drive $::env(DRIVE) set drive $::env(DRIVE)
set cfg $::env(CONFIGDIR)/${cfgName}/wally-config.vh
eval file copy -force ${cfg} {$outputDir/hdl/} eval file copy -force $cfg {$outputDir/hdl/}
#eval file copy -force ${cfg} $outputDir
eval file copy -force [glob ${hdl_src}/../config/shared/*.vh] {$outputDir/hdl/} eval file copy -force [glob ${hdl_src}/../config/shared/*.vh] {$outputDir/hdl/}
eval file copy -force [glob ${hdl_src}/*/*.sv] {$outputDir/hdl/} eval file copy -force [glob ${hdl_src}/*/*.sv] {$outputDir/hdl/}
eval file copy -force [glob ${hdl_src}/*/flop/*.sv] {$outputDir/hdl/} eval file copy -force [glob ${hdl_src}/*/*/*.sv] {$outputDir/hdl/}
# Only for FMA class project; comment out when done # Only for FMA class project; comment out when done
# eval file copy -force [glob ${hdl_src}/fma/fma16.v] {hdl/} # eval file copy -force [glob ${hdl_src}/fma/fma16.v] {hdl/}