invoke firrtl jar directly in order to control heap memory usage
This commit is contained in:
parent
82169e971e
commit
daa0f3038f
6
Makefrag
6
Makefrag
@ -14,6 +14,12 @@ export CHISEL_VERSION
|
||||
SBT ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar $(base_dir)/sbt-launch.jar
|
||||
SHELL := /bin/bash
|
||||
|
||||
FIRRTL_JAR ?= $(base_dir)/firrtl/utils/bin/firrtl.jar
|
||||
FIRRTL ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -cp $(FIRRTL_JAR) firrtl.Driver
|
||||
|
||||
$(FIRRTL_JAR):
|
||||
$(MAKE) -C $(base_dir)/firrtl SBT="$(SBT)" root_dir=$(base_dir)/firrtl build-scala
|
||||
|
||||
ifeq ($(CHISEL_VERSION),2)
|
||||
CHISEL_ARGS := $(PROJECT) $(MODEL) $(CONFIG) --W0W --minimumCompatibility 3.0.0 --backend $(BACKEND) --configName $(CONFIG) --compileInitializationUnoptimized --targetDir $(generated_dir)
|
||||
else
|
||||
|
@ -7,11 +7,6 @@ firrtl_debug = $(generated_dir_debug)/$(MODEL).$(CONFIG).fir
|
||||
verilog = $(generated_dir)/$(MODEL).$(CONFIG).v
|
||||
verilog_debug = $(generated_dir_debug)/$(MODEL).$(CONFIG).v
|
||||
|
||||
FIRRTL ?= $(base_dir)/firrtl/utils/bin/firrtl
|
||||
|
||||
$(FIRRTL):
|
||||
$(MAKE) -C $(base_dir)/firrtl SBT="$(SBT)" root_dir=$(base_dir)/firrtl build-scala
|
||||
|
||||
.SECONDARY: $(firrtl) $(firrtl_debug) $(verilog) $(verilog_debug)
|
||||
|
||||
$(generated_dir)/%.$(CONFIG).fir $(generated_dir)/%.$(CONFIG).prm $(generated_dir)/%.$(CONFIG).d: $(chisel_srcs)
|
||||
@ -24,7 +19,7 @@ $(generated_dir_debug)/%.$(CONFIG).fir $(generated_dir_debug)/%.$(CONFIG).prm $(
|
||||
cd $(base_dir) && $(SBT) "run $(PROJECT) $(MODEL) $(CONFIG) --targetDir $(generated_dir_debug)"
|
||||
mv $(generated_dir_debug)/$(MODEL).fir $(generated_dir_debug)/$(MODEL).$(CONFIG).fir
|
||||
|
||||
%.v: %.fir $(FIRRTL)
|
||||
%.v: %.fir $(FIRRTL_JAR)
|
||||
mkdir -p $(dir $@)
|
||||
$(FIRRTL) $(patsubst %,-i %,$(filter %.fir,$^)) -o $@ -X verilog
|
||||
|
||||
|
@ -12,11 +12,6 @@ $(generated_dir)/$(MODEL).$(CONFIG).v $(generated_dir)/$(MODEL).$(CONFIG).d $(ge
|
||||
|
||||
else
|
||||
|
||||
FIRRTL ?= $(base_dir)/firrtl/utils/bin/firrtl
|
||||
|
||||
$(FIRRTL):
|
||||
$(MAKE) -C $(base_dir)/firrtl SBT="$(SBT)" root_dir=$(base_dir)/firrtl build-scala
|
||||
|
||||
# If I don't mark these as .SECONDARY then make will delete these internal
|
||||
# files.
|
||||
.SECONDARY: $(generated_dir)/$(MODEL).$(CONFIG).fir
|
||||
@ -26,7 +21,7 @@ $(generated_dir)/%.$(CONFIG).fir $(generated_dir)/%.$(CONFIG).d: $(chisel_srcs)
|
||||
cd $(base_dir) && $(SBT) "run $(PROJECT) $(patsubst %.$(CONFIG).fir,%,$(patsubst %.d,%.fir,$(notdir $@))) $(CONFIG) $(CHISEL_ARGS) --configDump --noInlineMem"
|
||||
mv $(generated_dir)/$(MODEL).fir $(generated_dir)/$(MODEL).$(CONFIG).fir
|
||||
|
||||
$(generated_dir)/%.v $(generated_dir)/%.prm: $(generated_dir)/%.fir $(FIRRTL)
|
||||
$(generated_dir)/%.v $(generated_dir)/%.prm: $(generated_dir)/%.fir $(FIRRTL_JAR)
|
||||
mkdir -p $(dir $@)
|
||||
$(FIRRTL) $(patsubst %,-i %,$(filter %.fir,$^)) -o $@ -X verilog
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user