Add options for command-line arguments for Chisel and FIRRTL compilers (#921)
* make: Break FIRRTL command into multiple lines * make: Use long form of FIRRTL command-line args * make: Add ability to set Chisel/FIRRTL options
This commit is contained in:
27
common.mk
27
common.mk
@@ -18,7 +18,9 @@ HELP_COMPILATION_VARIABLES += \
|
||||
" EXTRA_SIM_LDFLAGS = additional LDFLAGS for building simulators" \
|
||||
" EXTRA_SIM_SOURCES = additional simulation sources needed for simulator" \
|
||||
" EXTRA_SIM_REQS = additional make requirements to build the simulator" \
|
||||
" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best with sbtn or sbt script)"
|
||||
" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best with sbtn or sbt script)" \
|
||||
" EXTRA_CHISEL_OPTIONS = additional options to pass to the Chisel compiler" \
|
||||
" EXTRA_FIRRTL_OPTIONS = additional options to pass to the FIRRTL compiler"
|
||||
|
||||
EXTRA_GENERATOR_REQS ?= $(BOOTROM_TARGETS)
|
||||
EXTRA_SIM_CXXFLAGS ?=
|
||||
@@ -107,7 +109,8 @@ generator_temp: $(SCALA_SOURCES) $(sim_files) $(EXTRA_GENERATOR_REQS)
|
||||
--target-dir $(build_dir) \
|
||||
--name $(long_name) \
|
||||
--top-module $(MODEL_PACKAGE).$(MODEL) \
|
||||
--legacy-configs $(CONFIG_PACKAGE):$(CONFIG))
|
||||
--legacy-configs $(CONFIG_PACKAGE):$(CONFIG) \
|
||||
$(EXTRA_CHISEL_OPTIONS))
|
||||
|
||||
.PHONY: firrtl
|
||||
firrtl: $(FIRRTL_FILE)
|
||||
@@ -128,7 +131,25 @@ $(TOP_TARGETS) $(HARNESS_TARGETS): firrtl_temp
|
||||
@echo "" > /dev/null
|
||||
|
||||
firrtl_temp: $(FIRRTL_FILE) $(ANNO_FILE) $(VLOG_SOURCES)
|
||||
$(call run_scala_main,tapeout,barstools.tapeout.transforms.GenerateTopAndHarness,-o $(TOP_FILE) -tho $(HARNESS_FILE) -i $(FIRRTL_FILE) --syn-top $(TOP) --harness-top $(VLOG_MODEL) -faf $(ANNO_FILE) -tsaof $(TOP_ANNO) -tdf $(sim_top_blackboxes) -tsf $(TOP_FIR) -thaof $(HARNESS_ANNO) -hdf $(sim_harness_blackboxes) -thf $(HARNESS_FIR) $(REPL_SEQ_MEM) $(HARNESS_CONF_FLAGS) -td $(build_dir) -ll $(FIRRTL_LOGLEVEL)) && touch $(sim_top_blackboxes) $(sim_harness_blackboxes)
|
||||
$(call run_scala_main,tapeout,barstools.tapeout.transforms.GenerateTopAndHarness,\
|
||||
--output-file $(TOP_FILE) \
|
||||
--harness-o $(HARNESS_FILE) \
|
||||
--input-file $(FIRRTL_FILE) \
|
||||
--syn-top $(TOP) \
|
||||
--harness-top $(VLOG_MODEL) \
|
||||
--annotation-file $(ANNO_FILE) \
|
||||
--top-anno-out $(TOP_ANNO) \
|
||||
--top-dotf-out $(sim_top_blackboxes) \
|
||||
--top-fir $(TOP_FIR) \
|
||||
--harness-anno-out $(HARNESS_ANNO) \
|
||||
--harness-dotf-out $(sim_harness_blackboxes) \
|
||||
--harness-fir $(HARNESS_FIR) \
|
||||
$(REPL_SEQ_MEM) \
|
||||
$(HARNESS_CONF_FLAGS) \
|
||||
--target-dir $(build_dir) \
|
||||
--log-level $(FIRRTL_LOGLEVEL) \
|
||||
$(EXTRA_FIRRTL_OPTIONS))
|
||||
touch $(sim_top_blackboxes) $(sim_harness_blackboxes)
|
||||
# DOC include end: FirrtlCompiler
|
||||
|
||||
# This file is for simulation only. VLSI flows should replace this file with one containing hard SRAMs
|
||||
|
||||
Reference in New Issue
Block a user