Skip to content

Commit 2d6c032

Browse files
committed
ihp-sg13g2: fix SDC_FILE lockup problem
`make DESIGN_CONFIG=designs/ihp-sg13g2/gcd/config.mk SDC_FILE= print-SDC_FILE` would cause make to simply lock up, now it terminates Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 95e9b74 commit 2d6c032

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

flow/platforms/ihp-sg13g2/config.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,12 @@ export CLKGATE_MAP_FILE = $(PLATFORM_DIR)/cells_clkgate.v
6363
# Define ABC driver and load
6464
export ABC_DRIVER_CELL = sg13g2_buf_4
6565
export ABC_LOAD_IN_FF = 6.0
66-
# Set yosys-abc clock period to first "clk_period" value or "-period" value found in sdc file
67-
export ABC_CLOCK_PERIOD_IN_PS ?= $(shell sed -nE "s/^set clk_period (.+)|.* -period (.+) .*/\1\2/p" $(SDC_FILE) | head -1 | awk '{print $$1*1000}')
66+
ifeq ($(origin ABC_CLOCK_PERIOD_IN_PS), undefined)
67+
ifneq ($(wildcard $(SDC_FILE)),)
68+
# Set yosys-abc clock period to first "clk_period" value or "-period" value found in sdc file
69+
export ABC_CLOCK_PERIOD_IN_PS ?= $(shell sed -nE "s/^set clk_period (.+)|.* -period (.+) .*/\1\2/p" $(SDC_FILE) | head -1 | awk '{print $$1*1000}')
70+
endif
71+
endif
6872

6973
# -----------------------------------------------------
7074
# Sizing

0 commit comments

Comments
 (0)