2023-02-24 14:06:50 +08:00
|
|
|
# See LICENSE for license details.
|
|
|
|
|
2023-02-28 00:20:01 +08:00
|
|
|
STRATEGY ?= QUICK
|
2023-02-24 14:06:50 +08:00
|
|
|
FREQUENCY ?= 30
|
|
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Post-synthesis RTL generation
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
POST_SYNTH_RTL := $(GENERATED_DIR)/verilog.sv
|
2023-02-28 00:20:01 +08:00
|
|
|
POST_SYNTH_DESIGN_XDC := $(GENERATED_DIR)/$(BASE_FILE_NAME).post-synth.xdc
|
|
|
|
POST_SYNTH_XDC := $(firesim_base_dir)/scripts/synth_fpga.xdc
|
2023-02-24 14:06:50 +08:00
|
|
|
|
2023-02-28 00:20:01 +08:00
|
|
|
$(POST_SYNTH_DESIGN_XDC): $(simulator_xdc)
|
|
|
|
sed 's#firesim_top/top/##g' $(simulator_xdc) > $(POST_SYNTH_DESIGN_XDC)
|
2023-02-24 14:06:50 +08:00
|
|
|
|
2023-02-28 00:20:01 +08:00
|
|
|
$(POST_SYNTH_RTL): $(firesim_base_dir)/scripts/synth_fpga.tcl $(POST_SYNTH_XDC) $(POST_SYNTH_DESIGN_XDC) $(simulator_verilog)
|
2023-02-24 14:06:50 +08:00
|
|
|
cd $(GENERATED_DIR) && time vivado \
|
|
|
|
-mode batch -nojournal \
|
|
|
|
-source $(firesim_base_dir)/scripts/synth_fpga.tcl \
|
2023-02-28 00:20:01 +08:00
|
|
|
-tclargs $(STRATEGY) $(FREQUENCY) $@ $(wordlist 2,4,$^)
|
2023-02-24 14:06:50 +08:00
|
|
|
|
|
|
|
.PHONY: post-synth-rtl
|
|
|
|
post-synth-rtl: $(POST_SYNTH_RTL)
|