Skip to content

Commit f37156c

Browse files
committed
synthesis: improve error messages
YOSYS_FLAGS=-v 3 will silence error messages, such as the below. However, without this option, synthesis will give an enormous amount of output. Fortunately, the most common error messages, like unknown top module, is shown during canonicalization and not specifying -v 3 doesn't increase the logging noise noticably during the canonicalization stage. To test: 1. modify gcd.v to rename "gcd" module to "gcdxxx" 2. Run "make synth" Now it fails with a helpful error message [deleted] 4. Executing HIERARCHY pass (managing design hierarchy). ERROR: Module `gcd' not found! ERROR: TCL interpreter returned an error: Yosys command produced an error Command exited with non-zero status 1 Signed-off-by: Øyvind Harboe <[email protected]>
1 parent ad1c669 commit f37156c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flow/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ do-yosys:
540540
.PHONY: do-yosys-canonicalize
541541
do-yosys-canonicalize: yosys-dependencies
542542
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
543-
($(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys_canonicalize.log)
543+
# NOTE! YOSYS_FLAGS is omitted here because "-v 3" silences helpful error messages
544+
($(TIME_CMD) $(YOSYS_EXE) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys_canonicalize.log)
544545

545546
$(RESULTS_DIR)/1_synth.rtlil: $(YOSYS_DEPENDENCIES)
546547
$(UNSET_AND_MAKE) do-yosys-canonicalize

0 commit comments

Comments
 (0)