sdhost的makefile脚本

MODEL_PATH=-f model_ahb.list
RTL_PATH=-f ../../rtl/rtl_ahb.list
TB_PATH=../../verif
VERB=UVM_DEBUG
OUTPUT_DIR=./logs
TEST_ID +=${TEST}_${N}
VPD=+vpdfile+${TEST_LOG}/${TEST_ID}.vpd
TEST_LOG =${OUTPUT_DIR}/${TEST_ID}
SEED=1
BUS_ARG=0
HIGH_SPEED=0
PERIOD=10
BLOCK_LEN=512
SOFT_RST=1
DIVIDER=1
FLAG=0
COV =-cm line+cond+fsm+tgl -cm_dir ./logs/COV
COV +=  -cm_hier exclude_coverage.fl
TEST=cmd_test_multiblock_read

all: comp run

try:
	make comp 
	make run TEST=cmd_test_single_read                                            N=1
regr:
	make comp
	make run TEST=cmd_test_single_read                                            N=1
	make run TEST=cmd_test_single_read           BUS_ARG=1                        N=2
	make run TEST=cmd_test_single_read           BUS_ARG=0 HIGH_SPEED=1           N=3
	make run TEST=cmd_test_single_read           BUS_ARG=1 HIGH_SPEED=1           N=4
	make run TEST=cmd_test_single_read     BLOCK_LEN=256                          N=5
	make run TEST=cmd_test_single_read    BUS_ARG=1 BLOCK_LEN=256                 N=6
	make run TEST=cmd_test_soft_reset           SOFT_RST=0                          N=7
	make run TEST=cmd_test_single_read           DIVIDER=0                        N=8
	make run TEST=cmd_test_single_read           DIVIDER=2                        N=9
	make run TEST=cmd_test_multiblock_read       BUS_ARG=0                        N=10
	make run TEST=cmd_test_multiblock_read       BUS_ARG=1                        N=11
	make run TEST=cmd_test_multiblock_read       BUS_ARG=0 HIGH_SPEED=1           N=12
	make run TEST=cmd_test_multiblock_read       BUS_ARG=1 HIGH_SPEED=1           N=13
	make run TEST=cmd_test_read_to_error                                          N=14
	make run TEST=cmd_test_crc_error             FLAG=1                           N=15
	make run TEST=cmd_test_crc_error             FLAG=1 BUS_ARG=1                 N=16
	make run TEST=cmd_test_response_timeout      FLAG=1                           N=17
	make run TEST=cmd_test_hw_stop_clk                                            N=18
	make run TEST=reg_test_default_value_check                                    N=19 
	make run TEST=reg_test_bit_bash                                               N=20
	make run TEST=reg_test_frontwr_backrd                                         N=21
	make run TEST=reg_test_backwr_frontrd                                         N=22
	make run TEST=reg_test_read_only                                              N=23
	make run TEST=cmd_test_bistmode                                               N=24
comp:
	vcs -full64 -sverilog -ntb_opts uvm -debug +define+SD -timescale=1ns/1ps \
  	$(RTL_PATH)   -v2005 +v2k\
		$(MODEL_PATH)  $(COV)    \
  +incdir+../tb \
  +incdir+../agent/ahb \
  +incdir+../agent/sdio \
  +incdir+../tests \
  +incdir+../tests/seqlib \
  +incdir+../env \
	../env/reg_model/ahb_reg_model.sv \
	../env/reg_model/ahb_reg_block.sv \
  ../agent/ahb/ahb_pkg.sv \
  ../agent/ahb/ahb_if.sv \
  ../agent/sdio/sdio_pkg.sv \
  ../agent/sdio/sdio_if.sv \
  ../env/sdhost_env_pkg.sv \
  ../tests/sdhost_test_pkg.sv \
  ../tb/sdhost_tb.sv \
  -l comp.log

run:
	rm -rf logs/${TEST_ID}
	mkdir logs/${TEST_ID}
	./simv +notimingcheck +nospecify +delay_mode_unit +bus_arg=${BUS_ARG} +high_speed=${HIGH_SPEED} \
		 +block_len=${BLOCK_LEN} +soft_rst=${SOFT_RST} +sd_clk_div=${DIVIDER} +flag=${FLAG}  \
	-assert enable_diag +VPD_ON \
		+UVM_TESTNAME=${TEST} +UVM_VERBOSITY=${VERB} +ntb_random_seed=${SEED}  \
  	-l ${TEST_LOG}/${TEST_ID}.log $(COV) \
	   $(VPD)  -cm_name ${TEST_ID}

dve:
	dve -vpd vcdplus.vpd&

clean:
	rm -rf csrc simv* *.log 
  
ral: xls2csv csv2sv

xls2csv:
	./scripts/xlsx2csv.py -s1 register_map.xlsx > ./reg_map.csv

csv2sv:
	./scripts/uvm_ral_gen.pl -reg_map_tbl ./reg_map.csv -module_name ahb
	mv ./ahb_*.sv ../env/reg_model/

 上面是sdhost的脚本,其实也适用于大多数的项目,注意修改路径!!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值