Setting Cygwin for running Questa on window

1.Installing Cygwin.

You should install some softwares like : shell, make, perl …. See the link below.

2.Writting makefile and running it on Cygwin (See Example Makefile below).

#—————————————————————————–
#
# Guide :
#    1.Run make compile : compile TB/RTL code.
#    2.Run make simulate : Simulation.
#   3.Run make view : Invoke waveform.

#—————————————————————————–
#Source code directory
RTL_DIR = ../rtl
TB_DIR = ../tb
TEST = tb.v
#—————————————————————————–
#RTL code
RTL_SRC = $(RTL_DIR)/cnt.v
#—————————————————————————–
#TB code
TB_SRC = $(TB_DIR)/$(TEST)
#—————————————————————————–
#Tools
COMPILER = vlog
SIMULATOR = vsim
#—————————————————————————–
#Tool options, compile and simulate flags
COFLAGS = -f
SFLAGS = -c
     -t
     ns -l report.log
     -voptargs=”+acc”
     -do “run -all” work.tb
#—————————————————————————–
#Tool output
#—————————————————————————–
#PHONY
.PHONY : compile simulate
#—————————————————————————–
#MAKE DIRECTIVES
compile: $(TB_SRC) $(RTL_SRC)
    vlib work
    vmap work work
    $(COMPILER) $(TB_SRC) $(RTL_SRC)

simulate:
    $(SIMULATOR) $(SFLAGS)
    vcd2wlf test.vcd test.wlf    
view :
    vsim -i -view test.wlf &
clean :
    rm -rf test.vcd
    test.wlf
    report.log
    work

3.Running example ( this is a counter module).

Start Cygwin on your Desktop and goto simulation folder and running makefile( compile, simulate, view).

picture9

Invoke waveform.

picture10

Now it is easy to run Questa on window. You can write a new makefile and adding more compile or simulation options or calling UVM lib ….

Link of Counter example :

http://www.mediafire.com/file/xpg32he0iygvap6/counter.rar

//——————-DONE———————//

Advertisements

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