forked from Github_Repos/cvw
		
	Fixed copying hdl subdirectories and referencing the correct config files for modified features
This commit is contained in:
		
							parent
							
								
									33bf0b5a56
								
							
						
					
					
						commit
						878bb0d365
					
				@ -6,13 +6,14 @@ NAME := synth
 | 
			
		||||
 | 
			
		||||
# defaults
 | 
			
		||||
export DESIGN ?= wallypipelinedcore
 | 
			
		||||
export FREQ ?= 3000
 | 
			
		||||
export CONFIG ?= rv32e
 | 
			
		||||
export FREQ ?= 1000
 | 
			
		||||
export CONFIG ?= rv64gc
 | 
			
		||||
export MOD ?= orig
 | 
			
		||||
export CONFIGMOD ?= $(CONFIG)_$(MOD)
 | 
			
		||||
# title to add a note in the synth's directory name
 | 
			
		||||
TITLE = 
 | 
			
		||||
# tsmc28, sky130, and sky90 presently supported
 | 
			
		||||
export TECH ?= sky90
 | 
			
		||||
export TECH ?= tsmc28
 | 
			
		||||
# MAXCORES allows parallel compilation, which is faster but less CPU-efficient
 | 
			
		||||
# Avoid when doing sweeps of many optimization points in parallel
 | 
			
		||||
export MAXCORES ?= 1
 | 
			
		||||
@ -29,13 +30,14 @@ export SAIFPOWER ?= 0
 | 
			
		||||
configAsList := $(subst _, ,$(CONFIG))
 | 
			
		||||
BASECONFIG := $(word 1, $(configAsList))
 | 
			
		||||
OLDCONFIGDIR ?= ${WALLY}/pipelined/config
 | 
			
		||||
CONFIGDIR ?= $(OUTPUTDIR)/hdl/config
 | 
			
		||||
export CONFIGDIR ?= $(OUTPUTDIR)/hdl/config
 | 
			
		||||
CONFIGFILES	?= $(shell find $(CONFIGDIR) -name rv*_*)
 | 
			
		||||
CONFIGFILESTRIM = $(notdir $(CONFIGFILES))
 | 
			
		||||
# k = 3 6 
 | 
			
		||||
 | 
			
		||||
print:
 | 
			
		||||
	@echo $(FREQS)
 | 
			
		||||
	@echo $(BASECONFIG)
 | 
			
		||||
	@echo $(CONFIGFILESTRIM)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -108,7 +110,7 @@ mkdirecs:
 | 
			
		||||
	@mkdir -p $(OUTPUTDIR)/mapped
 | 
			
		||||
	@mkdir -p $(OUTPUTDIR)/unmapped
 | 
			
		||||
 | 
			
		||||
synth: mkdirecs configs rundc clean
 | 
			
		||||
synth: mkdirecs configs rundc #clean TODO
 | 
			
		||||
 | 
			
		||||
rundc:
 | 
			
		||||
	dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out
 | 
			
		||||
 | 
			
		||||
@ -18,19 +18,18 @@ set_host_options -max_cores $::env(MAXCORES)
 | 
			
		||||
 | 
			
		||||
# get outputDir from environment (Makefile)
 | 
			
		||||
set outputDir $::env(OUTPUTDIR)
 | 
			
		||||
set cfgName $::env(CONFIG)
 | 
			
		||||
set cfgName $::env(CONFIGMOD)
 | 
			
		||||
# Config
 | 
			
		||||
set hdl_src "../pipelined/src"
 | 
			
		||||
set cfg "${hdl_src}/../config/${cfgName}/wally-config.vh"
 | 
			
		||||
set saifpower $::env(SAIFPOWER)
 | 
			
		||||
set maxopt $::env(MAXOPT)
 | 
			
		||||
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
 | 
			
		||||
eval file copy -force $cfg {$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}/*/flop/*.sv] {$outputDir/hdl/}
 | 
			
		||||
eval file copy -force [glob ${hdl_src}/*/*/*.sv] {$outputDir/hdl/}
 | 
			
		||||
 | 
			
		||||
# Only for FMA class project; comment out when done
 | 
			
		||||
# eval file copy -force [glob ${hdl_src}/fma/fma16.v] {hdl/}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user