Skip to content

Commit 149b39a

Browse files
oharboeclaude
andcommitted
fix: use SDC_FILE_EXTRA for mock-cpu util.tcl sourcing
Use SDC_FILE_EXTRA variable instead of hardcoded paths to source mock-array/util.tcl. This works correctly in both Make and Bazel. Cherry-pick of PR #4093. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 8b89e39 commit 149b39a

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

flow/designs/asap7/mock-cpu/config.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export DESIGN_NICKNAME = mock-cpu
55

66
export VERILOG_FILES = $(wildcard $(DESIGN_HOME)/src/fifo/*.v)
77
export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.sdc
8+
export SDC_FILE_EXTRA = $(DESIGN_HOME)/src/mock-array/util.tcl
89

910
export CORE_UTILIZATION = 40
1011
export CORE_ASPECT_RATIO = 1

flow/designs/asap7/mock-cpu/constraint.sdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# This fifo is from http://www.sunburst-design.com/papers/CummingsSNUG2002SJ_FIFO1.pdf
44

5-
source $::env(DESIGN_HOME)/src/mock-array/util.tcl
5+
source $::env(SDC_FILE_EXTRA)
66

77
set sdc_version 2.0
88

flow/designs/asap7/mock-cpu/io.tcl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# bazel has root of OpenROAD-flow-scripts as working directory
2-
foreach prefix {"" flow/} {
3-
set f ${prefix}designs/src/mock-array/util.tcl
4-
if { [file exists $f] } {
5-
source $f
6-
}
7-
}
1+
source $::env(SDC_FILE_EXTRA)
82

93
set_io_pin_constraint -order -group -region bottom:* \
104
-pin_names [concat [match_pins .*] [match_pins clk input 1]]

0 commit comments

Comments
 (0)