Skip to content

Commit 4c4bee1

Browse files
authored
Merge pull request #3233 from Pinata-Consulting/ihp-lockup
ihp-sg13g2: fix SDC_FILE lockup problem
2 parents 26b6db9 + 2d6c032 commit 4c4bee1

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)