Skip to content

Commit 3395328

Browse files
authored
Merge pull request #2142 from The-OpenROAD-Project-staging/synth-names-and-canonicalize
Synth names and canonicalize
2 parents ab65969 + 56b5a09 commit 3395328

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3322
-3320
lines changed

docs/tutorials/FlowTutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ constraints. We will use default configuration variables for this tutorial.
160160
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------|
161161
| `PLATFORM` | Specifies Process design kit. |
162162
| `DESIGN_NAME` | The name of the top-level module of the design |
163-
| `VERILOG_FILES` | The path to the design Verilog files |
163+
| `VERILOG_FILES` | The path to the design Verilog files or JSON files providing a description of modules (check `yosys -h write_json` for more details). |
164164
| `SDC_FILE` | The path to design `.sdc` file |
165165
| `CORE_UTILIZATION` | The core utilization percentage. |
166166
| `PLACE_DENSITY` | The desired placement density of cells. It reflects how spread the cells would be on the core area. 1 = closely dense. 0 = widely spread |

docs/user/FlowVariables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ file for each design located in the OpenROAD-flow-scripts directory of
222222
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
223223
| `PLATFORM` | Specifies process design kit or technology node to be used. |
224224
| `DESIGN_NAME` | The name of the top-level module of the design. |
225-
| `VERILOG_FILES` | The path to the design Verilog files. |
225+
| `VERILOG_FILES` | The path to the design Verilog files or JSON files providing a description of modules (check `yosys -h write_json` for more details). |
226226
| `SDC_FILE` | The path to design constraint (SDC) file. |
227227

228228

flow/Makefile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ export SYNTH_MEMORY_MAX_BITS ?= 4096
485485

486486
$(SYNTH_STOP_MODULE_SCRIPT):
487487
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
488-
($(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(HIER_REPORT_SCRIPT)) 2>&1 | tee $(LOG_DIR)/1_1_yosys_hier_report.log
488+
(export VERILOG_FILES=$(RESULTS_DIR)/1_synth.rtlil; \
489+
$(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(HIER_REPORT_SCRIPT)) 2>&1 | tee $(LOG_DIR)/1_1_yosys_hier_report.log
489490

490491
ifeq ($(SYNTH_HIERARCHICAL), 1)
491492
do-yosys: $(SYNTH_STOP_MODULE_SCRIPT)
@@ -501,11 +502,20 @@ $(SDC_FILE_CLOCK_PERIOD): $(SDC_FILE)
501502
yosys-dependencies: $(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DONT_USE_SC_LIB) $(DFF_LIB_FILE) $(VERILOG_FILES) $(CACHED_NETLIST) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE)
502503

503504
.PHONY: do-yosys
504-
do-yosys: yosys-dependencies
505+
do-yosys:
505506
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
506-
($(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(LOG_DIR)/1_1_yosys.log
507+
(export VERILOG_FILES=$(RESULTS_DIR)/1_synth.rtlil; \
508+
$(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee -a $(LOG_DIR)/1_1_yosys.log
507509

508-
$(RESULTS_DIR)/1_1_yosys.v: $(SDC_FILE_CLOCK_PERIOD)
510+
.PHONY: do-yosys-canonicalize
511+
do-yosys-canonicalize: yosys-dependencies
512+
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
513+
($(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(LOG_DIR)/1_1_yosys.log
514+
515+
$(RESULTS_DIR)/1_synth.rtlil: $(RESULTS_DIR)/1_1_yosys.v $(SDC_FILE_CLOCK_PERIOD)
516+
$(UNSET_AND_MAKE) do-yosys-canonicalize
517+
518+
$(RESULTS_DIR)/1_1_yosys.v: $(RESULTS_DIR)/1_synth.rtlil $(SDC_FILE_CLOCK_PERIOD)
509519
$(UNSET_AND_MAKE) do-yosys
510520

511521
$(RESULTS_DIR)/1_synth.sdc: $(SDC_FILE)
@@ -522,7 +532,7 @@ $(RESULTS_DIR)/1_synth.v: $(RESULTS_DIR)/1_1_yosys.v
522532

523533
.PHONY: clean_synth
524534
clean_synth:
525-
rm -f $(RESULTS_DIR)/1_*.v $(RESULTS_DIR)/1_synth.sdc $(RESULTS_DIR)/mem.json
535+
rm -f $(RESULTS_DIR)/1_* $(RESULTS_DIR)/mem.json
526536
rm -f $(REPORTS_DIR)/synth_*
527537
rm -f $(LOG_DIR)/1_*
528538
rm -f $(SYNTH_STOP_MODULE_SCRIPT)

0 commit comments

Comments
 (0)