-
Notifications
You must be signed in to change notification settings - Fork 518
/
Copy pathMakefile.questa.inc
45 lines (40 loc) · 2.34 KB
/
Makefile.questa.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# =============================================================================
# Amazon FPGA Hardware Development Kit
#
# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use
# this file except in compliance with the License. A copy of the License is
# located at
#
# http://aws.amazon.com/asl/
#
# or in the "license" file accompanying this file. This file is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or
# implied. See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
clean:
cd $(SIM_ROOT)/.. && rm -rf modelsim.ini
cd $(SIM_ROOT)/.. && rm -rf *.log
cd $(SIM_ROOT)/.. && rm -rf *.jou
cd $(SIM_ROOT)/.. && rm -rf .cxl.questasim.version
cd $(SIM_ROOT)/.. && rm -rf compile_simlib.log
cd $(SIM_ROOT)/.. && rm -rf vivado.log
cd $(SIM_DIR) && rm -rf work
cd $(SIM_DIR) && rm -rf transcript
QUESTA_C_INCLUDE_ARGS = $(foreach inc_dir,$(C_INCLUDE_DIRS),-ccflags "-I$(inc_dir)")
compile: $(COMPILE_CL_IP_DIR) generate_sim_file_list
cd ${SIM_DIR} && ln -s -f $(COMPLIB_DIR)/modelsim.ini
cd $(SIM_DIR) && vlog $(C_FILES) $(QUESTA_C_INCLUDE_ARGS) -ccflags "-DSV_TEST" -ccflags "-DSCOPE" -ccflags "-DQUESTA_SIM" -ccflags "-DINT_MAIN"
cd $(SIM_DIR) && vlog +define+QUESTA_SIM +define+DMA_TEST $(DEFAULT_DEFINES) -mfcu -sv -64 -timescale 1ps/1ps -93 -L $(COMPLIB_DIR)/unisims_ver -L $(COMPLIB_DIR)/unimacro_ver -L $(COMPLIB_DIR)/secureip -f $(SCRIPTS_DIR)/top.$(SIMULATOR).f
run:
ifeq ($(TEST),test_null)
ifneq ($(C_TEST),test_null)
cd $(SIM_DIR) && vsim -c tb $(C_TEST) glbl -voptargs="+acc" -64 -t ps -sv_seed random $(LIBLISTS_ARGS) $(PLUSARGS) -l $(TEST).log -do "run -all; quit -f" | $(FILTER_OUT_HBM_META_INJECTIONS) | $(FILTER_OUT_EMPTY_LINES)
else
cd $(SIM_DIR) && vsim -c tb $(TEST) glbl -voptargs="+acc" -64 -t ps -sv_seed random $(LIBLISTS_ARGS) $(PLUSARGS) -l $(TEST).log -do "run -all; quit -f" | $(FILTER_OUT_HBM_META_INJECTIONS) | $(FILTER_OUT_EMPTY_LINES)
endif
else
cd $(SIM_DIR) && vsim -c tb $(TEST) glbl -voptargs="+acc" -64 -t ps -sv_seed random $(LIBLISTS_ARGS) $(PLUSARGS) -l $(TEST).log -do "run -all; quit -f" | $(FILTER_OUT_HBM_META_INJECTIONS) | $(FILTER_OUT_EMPTY_LINES)
endif