Update Makefile to work with EF style
diff --git a/verilog/dv/mprj_por/Makefile b/verilog/dv/mprj_por/Makefile
index 242d99c..5d0825f 100644
--- a/verilog/dv/mprj_por/Makefile
+++ b/verilog/dv/mprj_por/Makefile
@@ -14,7 +14,7 @@
#
# SPDX-License-Identifier: Apache-2.0
-## PDK
+## PDK
PDK_PATH = $(PDK_ROOT)/sky130A
## Caravel Pointers
@@ -35,6 +35,7 @@
GCC_PREFIX?=riscv32-unknown-elf
## Simulation mode: RTL/GL
+SIM_DEFINES = -DFUNCTIONAL -DSIM
SIM?=RTL
.SUFFIXES:
@@ -47,12 +48,12 @@
%.vvp: %_tb.v %.hex
ifeq ($(SIM),RTL)
- iverilog -DFUNCTIONAL -DSIM -I $(PDK_PATH) \
+ iverilog $(SIM_DEFINES) -I $(PDK_PATH) \
-I $(CARAVEL_BEHAVIOURAL_MODELS) -I $(CARAVEL_RTL_PATH) \
-I $(UPRJ_BEHAVIOURAL_MODELS) -I $(UPRJ_RTL_PATH) \
$< -o $@
else
- iverilog -DFUNCTIONAL -DSIM -DGL -I $(PDK_PATH) \
+ iverilog $(SIM_DEFINES) -DGL -I $(PDK_PATH) \
-I $(CARAVEL_BEHAVIOURAL_MODELS) -I $(CARAVEL_RTL_PATH) -I $(CARAVEL_VERILOG_PATH) \
-I $(UPRJ_BEHAVIOURAL_MODELS) -I$(UPRJ_RTL_PATH) -I $(UPRJ_VERILOG_PATH) \
$< -o $@
@@ -82,6 +83,10 @@
ifeq (,$(wildcard $(GCC_PATH)/$(GCC_PREFIX)-gcc ))
$(error $(GCC_PATH)/$(GCC_PREFIX)-gcc is not found, please export GCC_PATH and GCC_PREFIX before running make)
endif
+# check for efabless style installation
+ifeq (,$(wildcard $(PDK_ROOT)/sky130A/libs.ref/*/verilog))
+SIM_DEFINES := ${SIM_DEFINES} -DEF_STYLE
+endif
# ---- Clean ----