Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xtofalex committed Sep 24, 2024
2 parents d49e9e0 + ffddad5 commit 46643aa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
13 changes: 2 additions & 11 deletions flow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ do-yosys:
.PHONY: do-yosys-canonicalize
do-yosys-canonicalize: yosys-dependencies
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
($(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys_canonicalize.log)
# NOTE! YOSYS_FLAGS is omitted here because "-v 3" silences helpful error messages
($(TIME_CMD) $(YOSYS_EXE) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys_canonicalize.log)

$(RESULTS_DIR)/1_synth.rtlil: $(YOSYS_DEPENDENCIES)
$(UNSET_AND_MAKE) do-yosys-canonicalize
Expand Down Expand Up @@ -720,17 +721,7 @@ endif

# STEP 3: Timing Driven Mixed Sized Placement
#-------------------------------------------------------------------------------
ifneq ($(MACRO_PLACEMENT)$(MACRO_PLACEMENT_TCL),)
SKIP_TDMS:=1
endif
ifeq ($(RTLMP_FLOW), 1)
SKIP_TDMS:=1
endif
ifneq ($(SKIP_TDMS), 1)
$(eval $(call do-step,2_3_floorplan_tdms,$(RESULTS_DIR)/2_2_floorplan_io.odb $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES),tdms_place))
else
$(eval $(call do-copy,2_3_floorplan_tdms,2_2_floorplan_io.odb,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES)))
endif

# STEP 4: Macro Placement
#-------------------------------------------------------------------------------
Expand Down
24 changes: 15 additions & 9 deletions flow/scripts/tdms_place.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
source $::env(SCRIPTS_DIR)/load.tcl
load_design 2_2_floorplan_io.odb 1_synth.sdc

proc find_macros {} {
set macros ""
Expand All @@ -17,14 +16,21 @@ proc find_macros {} {
return $macros
}

set_dont_use $::env(DONT_USE_CELLS)
if {!([env_var_exists_and_non_empty MACRO_PLACEMENT] ||
[env_var_exists_and_non_empty MACRO_PLACEMENT_TCL]) &&
![env_var_equals RTLMP_FLOW 1]} {
load_design 2_2_floorplan_io.odb 1_synth.sdc

if {[find_macros] != ""} {
global_placement -density $::env(PLACE_DENSITY) \
-pad_left $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \
-pad_right $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT)
set_dont_use $::env(DONT_USE_CELLS)

if {[find_macros] != ""} {
log_cmd global_placement -density $::env(PLACE_DENSITY) \
-pad_left $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \
-pad_right $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT)
} else {
puts "No macros found: Skipping global_placement"
}
write_db $::env(RESULTS_DIR)/2_3_floorplan_tdms.odb
} else {
puts "No macros found: Skipping global_placement"
log_cmd exec cp $::env(RESULTS_DIR)/2_2_floorplan_io.odb $::env(RESULTS_DIR)/2_3_floorplan_tdms.odb
}

write_db $::env(RESULTS_DIR)/2_3_floorplan_tdms.odb

0 comments on commit 46643aa

Please sign in to comment.