Skip to content

Commit 6ec980e

Browse files
authored
Merge pull request #1255 from Pinata-Consulting/makefile-post-synthesis-report-metrics
makefile: run report_metric post synthesis
2 parents 73dd218 + 0f605ee commit 6ec980e

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

flow/Makefile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,19 @@ $(WRAPPED_LIBS):
378378
# ___) || | | |\ | | | | _ | |___ ___) | | ___) |
379379
# |____/ |_| |_| \_| |_| |_| |_|_____|____/___|____/
380380
#
381+
.PHONY: synth
381382
synth: versions.txt \
382383
$(RESULTS_DIR)/1_synth.v \
383384
$(RESULTS_DIR)/1_synth.sdc
385+
386+
.PHONY: synth-report
387+
synth-report: synth
388+
$(UNSET_AND_MAKE) do-synth-report
389+
390+
.PHONY: do-synth-report
391+
do-synth-report:
392+
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/synth_metrics.tcl) 2>&1 | tee -a $(LOG_DIR)/1_1_yosys.log
393+
384394
# ==============================================================================
385395

386396

@@ -396,18 +406,16 @@ ifeq ($(SYNTH_HIERARCHICAL), 1)
396406
$(RESULTS_DIR)/1_1_yosys.v: $(SYNTH_STOP_MODULE_SCRIPT)
397407
endif
398408

399-
$(RESULTS_DIR)/1_1_yosys.v: $(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DONT_USE_SC_LIB) $(DFF_LIB_FILE) $(VERILOG_FILES) $(CACHED_NETLIST) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE)
409+
$(RESULTS_DIR)/1_1_yosys.v $(RESULTS_DIR)/1_synth.sdc &: $(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DONT_USE_SC_LIB) $(DFF_LIB_FILE) $(VERILOG_FILES) $(CACHED_NETLIST) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE)
400410
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
401411
($(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(LOG_DIR)/1_1_yosys.log
412+
cp $(SDC_FILE) $(RESULTS_DIR)/1_synth.sdc
402413

403414
$(RESULTS_DIR)/1_synth.v: $(RESULTS_DIR)/1_1_yosys.v
404415
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
405416
cp $< $@
406417

407-
$(RESULTS_DIR)/1_synth.sdc: $(SDC_FILE)
408-
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
409-
cp $< $@
410-
418+
.PHONY: clean_synth
411419
clean_synth:
412420
rm -f $(RESULTS_DIR)/1_*.v $(RESULTS_DIR)/1_synth.sdc
413421
rm -f $(REPORTS_DIR)/synth_*
@@ -707,7 +715,7 @@ finish: $(LOG_DIR)/6_report.log \
707715
$(GDS_FINAL_FILE)
708716
$(UNSET_AND_MAKE) elapsed
709717

710-
.PHONY:
718+
.PHONY: elapsed
711719
elapsed:
712720
-@$(UTILS_DIR)/genElapsedTime.py -d "$(LOG_DIR)"
713721

flow/scripts/synth_metrics.tcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
utl::set_metrics_stage "synth__{}"
2+
source $::env(SCRIPTS_DIR)/load.tcl
3+
load_design 1_1_yosys.v 1_synth.sdc "Post synthesis"
4+
5+
source $::env(SCRIPTS_DIR)/report_metrics.tcl
6+
report_metrics "Post synthesis" false false

0 commit comments

Comments
 (0)