1. 程式人生 > >IC驗證中Makefile檔案

IC驗證中Makefile檔案

#!/bin/sh

RTL_PATH=-f ../../rtl/rtl.fl
TB_PATH=../../verif
VERB=UVM_DEBUG
SEED=$(shell date +%s)
TEST=
N=0
OUT_DIR=./logs
TEST_ID +=${TEST}_${N}
VPD=+vpdfile+${TEST_LOG}/${TEST_ID}.vpd
TEST_LOG+${OUTPUT_DIR}/${TEST_ID}
COV =-cm line+cond+fsm+tgl -cm_dir ./logs/COV
COV += -cm_hier exclude_bist.fl
all:clean comp run

regr:
    make comp
    make run TEST=sramc_test_addr_100 N=0
    make run TEST=sramc_test_rand_hsize HSIE_W=0 HSIZE+R=0 N=1
comp:
    vcs -mcfu -sverilog -ntb_opts uvm -debug -timescale=1ns/1ns \
    $(RTL_PATH) \
    +incdir+../tb \
    +incdir+../agent/ahb \
    +incdir+../tests \
    +incdir+../test/seqlib \
    +incdir+../env \
    ../agent/ahb/ahb_pkg.sv \
    ../agent/ahb/ahb_if.sv \
    ../env/sramc_env_pkg.sv \
    ../test/sramc_test_pkg.sv \
    ../tb/sramc_tb.sv \
    $(COV) -l comp.log

run:
    rm -rf logs/${TEST_ID}
    mkdir logs/${TEST_ID}
    ./simv +VPD+ON \
    +UVM_TESTNAME=${TEST} +UVM_VERBOSITY=${VERB} +ntb_random_seed=${SEED} -l ${TEST_LOG}/${TEST_ID}.log \
    $(VPD) $(COV) -cm_name $(TEST_ID)

dve:
    dve -vpd vcdplus.vpd&
urg:
    urg -dir simv.vdb -report both
clean:
    rm -rf csrc somv* *.log DVEfiles ucli.key logs