1 |
4 |
vladimirar |
#######################################################################
|
2 |
|
|
# Copyright 2014-2015 SyoSil ApS
|
3 |
|
|
# All Rights Reserved Worldwide
|
4 |
|
|
#
|
5 |
|
|
# Licensed under the Apache License, Version 2.0 (the
|
6 |
|
|
# "License"); you may not use this file except in
|
7 |
|
|
# compliance with the License. You may obtain a copy of
|
8 |
|
|
# the License at
|
9 |
|
|
#
|
10 |
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
11 |
|
|
#
|
12 |
|
|
# Unless required by applicable law or agreed to in
|
13 |
|
|
# writing, software distributed under the License is
|
14 |
|
|
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
15 |
|
|
# CONDITIONS OF ANY KIND, either express or implied. See
|
16 |
|
|
# the License for the specific language governing
|
17 |
|
|
# permissions and limitations under the License.
|
18 |
|
|
#######################################################################
|
19 |
|
|
scbtest_DEPS := syoscb
|
20 |
|
|
|
21 |
|
|
scbtest_SRC := $(TB_DIR)/pk_scbtest.sv $(TB_DIR)/scbtest_top.sv
|
22 |
|
|
|
23 |
|
|
scbtest_INC_DIR := $(TB_DIR) $(TB_DIR)/test
|
24 |
|
|
|
25 |
|
|
scbtest_VLOG_OPTS :=
|
26 |
|
|
|
27 |
|
|
# Simple rule to capture the package dependency on the included files
|
28 |
|
|
$(TB_DIR)/pk_scbtest.sv : $(TB_DIR)/cl_scbtest_env.svh
|
29 |
|
|
@touch $(TB_DIR)/pk_scbtest.sv
|
30 |
|
|
|
31 |
|
|
#############################################################################
|
32 |
|
|
# Common targets
|
33 |
|
|
#############################################################################
|
34 |
|
|
.PHONY: help_tb_common
|
35 |
|
|
help_tb_common:
|
36 |
|
|
@echo "############### TB targets ##################"
|
37 |
|
|
@echo ""
|
38 |
|
|
|
39 |
|
|
#############################################################################
|
40 |
|
|
# Mentor targets
|
41 |
|
|
#############################################################################
|
42 |
|
|
ifeq ($(VENDOR),MENTOR)
|
43 |
|
|
$(COMPILE_DIR)/work/compiled_tb : $(scbtest_SRC) $(foreach dep,$(scbtest_DEPS),$(COMPILE_DIR)/$(dep)_vc/compiled_vc) \
|
44 |
|
|
| $(COMPILE_DIR)/work
|
45 |
|
|
$(VLOG) -work $(COMPILE_DIR)/work $(VLOG_OPTS) $(scbtest_VLOG_OPTS) \
|
46 |
|
|
$(foreach lib,$(scbtest_DEPS), -L $(COMPILE_DIR)/$(lib)_vc) \
|
47 |
|
|
$(foreach inc_dir,$(scbtest_INC_DIR),+incdir+$(inc_dir)) \
|
48 |
|
|
$(scbtest_SRC)
|
49 |
|
|
@touch $@
|
50 |
|
|
|
51 |
|
|
$(COMPILE_DIR)/work : | $(COMPILE_DIR)
|
52 |
|
|
$(VLIB) $(COMPILE_DIR)/work
|
53 |
|
|
|
54 |
|
|
.PHONY : compile_tb
|
55 |
|
|
compile_tb : $(COMPILE_DIR)/work/compiled_tb
|
56 |
|
|
|
57 |
|
|
.PHONY: help_tb
|
58 |
|
|
help_tb: help_tb_common
|
59 |
|
|
@echo " TARGET: compile_tb"
|
60 |
|
|
@echo " Shortcut to compile TB"
|
61 |
|
|
@echo ""
|
62 |
|
|
@echo " TARGET: $(COMPILE_DIR)/work"
|
63 |
|
|
@echo " Create vlib"
|
64 |
|
|
@echo ""
|
65 |
|
|
@echo " TARGET: $(COMPILE_DIR)/work/compiled_tb"
|
66 |
|
|
@echo " Compile TB"
|
67 |
|
|
@echo ""
|
68 |
|
|
endif
|
69 |
|
|
|
70 |
|
|
#############################################################################
|
71 |
|
|
# Cadence targets
|
72 |
|
|
#############################################################################
|
73 |
|
|
ifeq ($(VENDOR),CADENCE)
|
74 |
|
|
.PHONY: help_tb
|
75 |
|
|
help_tb: help_tb_common
|
76 |
|
|
@echo " No targets available"
|
77 |
|
|
@echo ""
|
78 |
|
|
endif
|
79 |
|
|
|
80 |
|
|
#############################################################################
|
81 |
|
|
# Synopsys targets
|
82 |
|
|
#############################################################################
|
83 |
|
|
ifeq ($(VENDOR),SYNOPSYS)
|
84 |
|
|
.PHONY : compile_tb
|
85 |
|
|
compile_tb: $(scbtest_SRC) synopsys_uvm $(foreach dep,$(scbtest_DEPS),compile_$(dep)_vc)
|
86 |
|
|
vlogan -ntb_opts uvm-$(UVM_VERSION) -sverilog $(VLOG_OPTS) \
|
87 |
|
|
$(foreach inc_dir,$(scbtest_INC_DIR),+incdir+$(inc_dir)) \
|
88 |
|
|
$(scbtest_SRC)
|
89 |
|
|
|
90 |
|
|
.PHONY: elaborate_tb
|
91 |
|
|
elaborate_tb: compile_tb
|
92 |
|
|
vcs -sverilog -ntb_opts uvm-$(UVM_VERSION) scbtest_top
|
93 |
|
|
|
94 |
|
|
.PHONY: help_tb
|
95 |
|
|
help_tb: help_tb_common
|
96 |
|
|
@echo " TARGET: compile_tb"
|
97 |
|
|
@echo " Compile TB"
|
98 |
|
|
@echo ""
|
99 |
|
|
@echo " TARGET: elab_tb"
|
100 |
|
|
@echo " Elaborate TB"
|
101 |
|
|
@echo ""
|
102 |
|
|
endif
|
103 |
|
|
|