Skip to content

Commit d54712d

Browse files
committed
DFT: fix scan_enable buffering + bump OpenROAD
1 parent a2e74d9 commit d54712d

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

flow/scripts/dft_scan_pre_global_route.tcl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,28 @@ proc dft_buffer_scan_enable_net {} {
697697
return
698698
}
699699

700+
if { [info commands buffer_scan_enable] != "" } {
701+
set inserted 0
702+
if { [catch {
703+
set inserted [buffer_scan_enable -buffer_cell $buffer_cell -max_fanout $max_fanout -max_levels $max_levels]
704+
} err] } {
705+
puts "DFT: WARNING: buffer_scan_enable failed: $err"
706+
return
707+
}
708+
if { $inserted > 0 } {
709+
puts "DFT: inserted $inserted buffer(s) for scan_enable"
710+
catch { detailed_placement }
711+
}
712+
return
713+
}
714+
715+
if { [info commands insert_buffer] == "" } {
716+
puts "DFT: WARNING: no buffer_scan_enable/insert_buffer command available; skipping scan_enable buffering"
717+
return
718+
}
719+
720+
puts "DFT: WARNING: using legacy insert_buffer for scan_enable buffering (buffer_scan_enable not available)"
721+
700722
set total_inserted 0
701723

702724
for { set level 0 } { $level < $max_levels } { incr level } {

flow/scripts/variables.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ export TIME_CMD
104104
ifneq (${IN_NIX_SHELL},)
105105
export OPENROAD_EXE ?= $(shell command -v openroad)
106106
else
107-
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
107+
# Prefer a local submodule build if present; fall back to the installed binary.
108+
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/OpenROAD/build/bin/openroad)
109+
ifeq ($(origin OPENROAD_EXE),file)
110+
ifeq (,$(shell test -x $(OPENROAD_EXE) && echo "true"))
111+
export OPENROAD_EXE := $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
112+
endif
113+
endif
108114
endif
109115
ifneq (${IN_NIX_SHELL},)
110116
export OPENSTA_EXE ?= $(shell command -v sta)

0 commit comments

Comments
 (0)