Jump to content

How to write a good Makefile in VCS for running UVM tests?


Recommended Posts

hi, all,

 

I'm a newer in learning UVM. With the support of many UVM experts, we can find many examples for learnning UVM. However, when I tried to have a taste on some examples using VCS to compile them, the Makefile is a headache for me.

 

Could you please let me know how to write a good Makefile for compilation and running simulation in VCS?

 

Thank you in advance!

 

Liya

Link to comment
Share on other sites

  • 4 weeks later...

Well I don't have an accurate reply for your query , but some clues that may help.

 

As the example is based on ModelSim Linux Version{Makefile}, what I did to use it on my Linux NCSIM, is replaced the vsim with irun and put it in a shell script which runs.

 

So an advice , get the list of  includes and files , apply it to the command for VCS, through the script.

 

Hope it will work for you :)

 

regards,

Karandeep

Link to comment
Share on other sites

From our UVM Adopter's class, here is a portion of a Makefile that applies to VCS:

UVM_VER = uvm-1.1
UVM_SUB_VER = d
UVM_HOME = /apps/uvm

VCS             = vcs
VCS_OPTS        = -sverilog +acc +vpi -timescale=1ns/1ns $(EXTRA_VCS_OPTS)

.PHONY:	clean vcs vcs_debug vcs_std

default:
	 # To use with VCS, enter:
	 #   make vcs	or	make vcs_debug
         # To remove temporary files, enter
         #   make clean

vcs:
	$(VCS) $(VCS_OPTS) -ntb_opts uvm $(INCDIRS) $(SRCS) -R $(EXTRA_VCS_RUNOPTS)

vcs_debug:
	$(VCS) $(VCS_OPTS) -ntb_opts uvm $(INCDIRS) $(SRCS) -R -gui $(EXTRA_VCS_RUNOPTS)

vcs_std:
	$(VCS) $(VCS_OPTS) +acc +vpi $(INCDIRS) +incdir+$(UVM_HOME)/src $(UVM_HOME)/src/uvm.sv  $(SRCS) \
	$(UVM_HOME)/src/dpi/uvm_dpi.cc -CFLAGS -DVCS -R $(EXTRA_VCS_RUNOPTS)

clean:
	@echo cleaning old simulation files and libraries...
	@ -$(RM) csrc simv* work *.bak *.log *.vpd transcript \
	waves.shm *.wlf mylib lib *.vstf .restart* \
	urgReport *.so vc_hdrs.h

# EOF

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...