[CU]IC仿真makefile示例3

 1 test = test_base
 2 TB_TOP = ./test.sv
 3 UVM_HOME = ../../uvm-1.1
 4 verbosity = UVM_MEDIUM
 5 #option = UVM_OBJECTION_TRACE
 6 uvm_ver = uvm-1.0
 7 seed = 1
 8 SOLVER = 2
 9 
10 default: uvm
11 
12 all: simv
13     ./simv -l simv.log +ntb_random_seed=$(seed) +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity)
14 
15 uvm: uvm_simv
16     ./simv -l simv.log +ntb_random_seed=$(seed) +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity)
17 
18 uvm_simv uvm_compile: *.sv
19     vcs -sverilog ${UVM_HOME}/src/dpi/uvm_dpi.cc -CFLAGS -DVCS ${UVM_HOME}/src/uvm_pkg.sv +incdir+${UVM_HOME}/src -timescale="1ns/100ps" -l comp.log -debug_all $(DUT) $(HARNESS_TOP) $(TB_TOP)
20 
21 run:
22     ./simv -l simv.log +ntb_random_seed=$(seed) +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity)
23 
24 random: simv
25     ./simv -l simv.log +ntb_random_seed_automatic +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity)
26 
27 simv compile: *.sv $(TB_TOP)
28     vcs -sverilog -ntb_opts ${uvm_ver} -timescale="1ns/100ps" -l comp.log -debug_all $(TB_TOP)
29 
30 dve_i: uvm_simv
31     ./simv -l simv.log -gui +ntb_random_seed=$(seed) +UVM_TESTNAME=$(test)
32 
33 solution: nuke
34     cp ../../solutions/lab2/*.sv .
35 
36 mycopy: nuke
37     cp ../lab1/*.sv .
38     cp ../../solutions/lab2/packet_da_3.sv.orig packet_da_3.sv
39 
40 original: copy
41 
42 copy: nuke
43     cp ../../solutions/lab1/*.sv .
44     cp ../../solutions/lab2/packet_da_3.sv.orig packet_da_3.sv
45     cp ../../solutions/lab2/test_collection.sv.orig test_collection.sv
46 
47 clean:
48     rm -rf simv* csrc* *.tmp *.vpd *.key log *.h temp *.log .vcs* *.txt DVE* *~
49 
50 nuke: clean
51     rm -rf *.sv
52 
53 help:
54     @echo =======================================================================
55     @echo  "                                        "
56     @echo  " USAGE: make target <seed=xxx> <verbosity=YYY> <test=ZZZ>              "
57     @echo  "                                        "
58     @echo  "  xxx is the random seed.  Can be any integer except 0. Defaults to 1  "
59     @echo  "  YYY sets the verbosity filter.  Defaults to UVM_MEDIUM                     "
60     @echo  "  ZZZ selects the uvm test.     Defaults to test_base                    "
61     @echo  "                                        "
62     @echo  " ------------------------- Test TARGETS ------------------------------ "
63     @echo  " all             => Compile TB and DUT files and run the simulation    "
64     @echo  " compile         => Compile TB and DUT files                           "
65     @echo  " run             => Run the simulation with seed                       "
66     @echo  " random          => Run the simulation with random seed                "
67     @echo  " dve_i           => Run simulation interactively with DVE              "
68     @echo  "                                                                       "
69     @echo  " -------------------- ADMINISTRATIVE TARGETS ------------------------- "
70     @echo  " help       => Displays this message.                                  "
71     @echo  " clean      => Remove all intermediate simv and log files              "
72     @echo  " nuke       => Remove all source code and debug files                  "
73     @echo  " original   => Return content of lab back to original state            "
74     @echo  " copy       => Copy files from previous lab's solution directory       "
75     @echo  " mycopy     => Copy files from user's previous lab directory           "
76     @echo  " solution   => Copy files from solutions directory for lab             "
77     @echo  "                                       "
78     @echo  " ---------------------- EMBEDDED SETTINGS -----------------------------"
79     @echo  " -timescale=\"1ns/100ps\"                                              "
80     @echo  " -debug_all                                                            "
81     @echo =======================================================================
 1 # Makefile for UVM Lab1
 2 rtl_path = ../../rtl
 3 TB_TOP = ./test.sv
 4 UVM_HOME = ../../uvm-1.1a
 5 test = test_base
 6 verbosity = UVM_MEDIUM
 7 uvm_ver = uvm-1.1
 8 seed = 1
 9 defines = UVM_NO_DEPRECATED+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR
10 plus = 
11 #option = UVM_OBJECTION_TRACE
12 SOLVER = 2
13 
14 all: simv run
15 
16 simv compile: *.sv
17     vcs -sverilog -ntb_opts ${uvm_ver} -timescale="1ns/100ps" -l comp.log -debug_all +vcs+vcdpluson $(DUT) $(HARNESS_TOP) $(TB_TOP) +define+${defines}
18 
19 run:
20     ./simv -l simv.log +ntb_random_seed=$(seed) +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity) +${plus}
21 
22 uvm1.1a: uvm_compile run
23     ./simv -l simv.log +ntb_random_seed=$(seed) +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity) +${plus}
24 
25 uvm_compile: *.sv
26     vcs -sverilog ${UVM_HOME}/src/dpi/uvm_dpi.cc -CFLAGS -DVCS ${UVM_HOME}/src/uvm_pkg.sv +incdir+${UVM_HOME}/src+${VCS_HOME}/etc/uvm-1.1/vcs ${VCS_HOME}/etc/uvm-1.1/vcs/uvm_custom_install_vcs_recorder.sv -timescale="1ns/100ps" -l comp.log -debug_all +vcs+vcdpluson $(DUT) $(HARNESS_TOP) $(TB_TOP) +define+${defines}
27 
28 random: simv
29     ./simv -l simv.log +ntb_random_seed_automatic +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity) +${plus}
30 
31 dve_i: simv
32     ./simv -l simv.log -gui +ntb_random_seed=$(seed) +UVM_TESTNAME=$(test) +ntb_solver_mode=$(SOLVER) +UVM_VERBOSITY=$(verbosity) +${plus}
33 
34 solution: nuke
35     cp ../../solutions/lab1/*.sv .
36 
37 original: copy
38 
39 copy: nuke
40     rm -rf *.sv
41     cp ../../solutions/lab1/driver.sv.orig driver.sv
42     cp ../../solutions/lab1/packet.sv.orig packet.sv
43     cp ../../solutions/lab1/packet_sequence.sv.orig packet_sequence.sv
44     cp ../../solutions/lab1/input_agent.sv.orig input_agent.sv
45     cp ../../solutions/lab1/router_env.sv.orig router_env.sv
46     cp ../../solutions/lab1/test_collection.sv.orig test_collection.sv
47 
48 clean:
49     rm -rf simv* csrc* *.tmp *.vpd *.key log *.h temp *.log .vcs* *.txt DVE* *~
50 
51 nuke: clean
52     rm -rf *.sv
53 
54 help:
55     @echo =======================================================================
56     @echo  "                                        "
57     @echo  " USAGE: make target <seed=xxx> <verbosity=YYY> <test=ZZZ>              "
58     @echo  "                                        "
59     @echo  "  xxx is the random seed.  Can be any integer except 0. Defaults to 1  "
60     @echo  "  YYY sets the verbosity filter.  Defaults to UVM_MEDIUM               "
61     @echo  "  ZZZ selects the uvm test.       Defaults to test_base                "
62     @echo  "                                        "
63     @echo  " ------------------------- Test TARGETS ------------------------------ "
64     @echo  " all             => Compile TB and DUT files and run the simulation    "
65     @echo  " compile         => Compile TB and DUT files                           "
66     @echo  " run             => Run the simulation with seed                       "
67     @echo  " random          => Run the simulation with random seed                "
68     @echo  " dve_i           => Run simulation interactively with DVE              "
69     @echo  "                                                                       "
70     @echo  " -------------------- ADMINISTRATIVE TARGETS ------------------------- "
71     @echo  " help       => Displays this message.                                  "
72     @echo  " clean      => Remove all intermediate simv and log files              "
73     @echo  " nuke       => Remove all source code and debug files                  "
74     @echo  " original   => Return content of lab back to original state            "
75     @echo  " copy       => Copy all necessary files for starting lab               "
76     @echo  " solution   => Copy all files from solutions directory                 "
77     @echo  "                                       "
78     @echo  " ---------------------- EMBEDDED SETTINGS -----------------------------"
79     @echo  " -timescale=\"1ns/100ps\"                                              "
80     @echo  " -debug_all                                                            "
81     @echo =======================================================================

 

posted on 2022-04-28 22:22  _见贤_思齐  阅读(243)  评论(0编辑  收藏  举报

导航