sv_lab/2_vcs_comp/Makefile

58 lines
1.3 KiB
Makefile

.PHONY: clean comp all
LAB = 1
ifeq ($(LAB), 1)
TB_FILE = ./rtl/testbench1.sv
else ifeq ($(LAB), 2)
TB_FILE = ./rtl/testbench2.sv
else ifeq ($(LAB), 3)
TB_FILE = ./rtl/testbench3.sv
else ifeq ($(LAB), 4)
TB_FILE = ./rtl/testbench4.sv
else
TB_FILE = ./rtl/testbench1.sv
endif
GENLIB = 1
ifeq ($(GENLIB), 1)
COMP_TB_ARG = +define+TEST1
PART_ARG = -partcomp_dir=./partitionlib
else
COMP_TB_ARG = +define+TEST2
PART_ARG = -partcomp_dir=./partitionlib_test2 -partcomp_sharedlib=./partitionlib
endif
clean:
- rm -rf csrc simv.daidir ucli.key *.log simv
comp_dut:
ifeq ($(GENLIB),1)
- vlogan -full64 +v2k -sverilog \
-l compile_dut.log -timescale=1ns/1ps \
-f ./dut_flist.f -work WORK
endif
comp_uvm:
ifeq ($(GENLIB),1)
- vlogan -full64 +v2k -sverilog \
-l compile_uvm.log -timescale=1ns/1ps \
-ntb_opts uvm-1.2 -work WORK
endif
comp_tb:
- vlogan -full64 +v2k -sverilog \
-l compile_tb.log -timescale=1ns/1ps \
-ntb_opts uvm-1.2 $(TB_FILE) ./partcfg.sv -work TB $(COMP_TB_ARG)
comp_elab:
- vcs -full64 -sverilog -LDFLAGS -Wl,--no-as-need \
-l compile_elab.log -timescale=1ns/1ps \
-ntb_opts uvm-1.2 -lca\
-partcomp -top TB.partcfg -fastpartcomp=j4 $(PART_ARG) \
-pcmakeprof
comp: comp_dut comp_uvm comp_tb comp_elab
sim:
./simv -l sim.log +UVM_NO_RELNOTES
all: comp sim