vmm on questasim

下载是在Questasim上运行vmm时用到的Makefile,其中vmm_str_dpi.h和vmm_str_dpi.c是vmm代码中的一个DPI代码的头文件和代码文件,因为vmm中使用了这些代码中的c函数,该Makefile只调试了简单的generator到bfm的阶段,其他scoreboard等没调试过。

shell := /bin/bash 

DPI_OBJ := vmm_str_dpi.so 
all: compile sim;
compile: $(DPI_OBJ)
    if [ ! -e work ]; then vlib work; fi
    vlog -sv -novopt +incdir+/opt/questasim/vmm-1.1.1/sv -dpiheader vmm_str_dpi.h -f filelist 
sim:
    vsim -c -novopt top -sv_lib vmm_str_dpi -do run.tcl -l vsim.log -wlf vsim.wlf 
%.o: /opt/questasim/vmm-1.1.1/sv/std_lib/%.c
    gcc -g -c -m64 -fPIC -Wall -pedantic -I. -I/opt/questasim/questasim/include $< 
%.so: %.o
    gcc -shared -lm -m64 -Wl,-Bsymbolic -Wl,-export-dynamic -o $@ $<
Advertisements
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s