fpga: tools: Add UHD_FPGA_DIR definition to synthesis
This adds a Verilog definition named `UHD_FPGA_DIR that corresponds to the location of the UHD "fpga" directory. This allows you to include files in your out-of-tree modules relative to the FPGA directory. For example, you could include the library header file rfnoc_chdr_utils.vh using the following: `include `"`UHD_FPGA_DIR/usrp3/lib/rfnoc/core/rfnoc_chdr_utils.vh`" Some simulators may not support `" outside of the context of a `define, in which case you can do the following: `define RFNOC_CHDR_UTILS_PATH \ `"`UHD_FPGA_DIR/usrp3/lib/rfnoc/core/rfnoc_chdr_utils.vh`" `include `RFNOC_CHDR_UTILS_PATH Original-commit: 66267f515802ff3f965fd44e1f0d3097ada7484f
This commit is contained in:
@@ -52,6 +52,7 @@ SETUP_AND_LAUNCH_SIMULATION = \
|
||||
export VIV_SIM_USER_DO=$(MODELSIM_USER_DO); \
|
||||
export VIV_MODE=$(VIVADO_MODE); \
|
||||
export VIV_SIM_64BIT=$(MODELSIM_64BIT); \
|
||||
export VIV_VERILOG_DEFS="UHD_FPGA_DIR=$(BASE_DIR)/../.."; \
|
||||
$(TOOLS_DIR)/scripts/launch_vivado.sh -mode $(VIVADO_MODE) -source $(call RESOLVE_PATH,$(TOOLS_DIR)/scripts/viv_sim_project.tcl) -log xsim.log -nojournal
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
@@ -65,8 +66,8 @@ SETUP_AND_LAUNCH_VLINT = \
|
||||
export VLINT_DESIGN_SRCS=$(EXP_DESIGN_SRCS); \
|
||||
export VLINT_SIM_SRCS=$(EXP_SIM_SRCS); \
|
||||
export VLINT_INC_SRCS=$(EXP_INC_SRCS); \
|
||||
export VLINT_SVLOG_ARGS="$(SVLOG_ARGS)"; \
|
||||
export VLINT_VLOG_ARGS="$(VLOG_ARGS)"; \
|
||||
export VLINT_SVLOG_ARGS="$(SVLOG_ARGS) +define+UHD_FPGA_DIR=$(BASE_DIR)/../.."; \
|
||||
export VLINT_VLOG_ARGS="$(VLOG_ARGS) +define+UHD_FPGA_DIR=$(BASE_DIR)/../.."; \
|
||||
export VLINT_VHDL_ARGS="$(VHDL_ARGS)"; \
|
||||
export VLINT_MODELSIM_INI="$(MODELSIM_INI)"; \
|
||||
$(TOOLS_DIR)/scripts/launch_vlint.sh
|
||||
|
||||
Reference in New Issue
Block a user