Directories in script

A

ALuPin

Hi,

I am working with ispLEVER 5.0 and Modelsim 6.0c

When performing functional simulation in Modelsim I use the following
..do-script.
The problem: If I want someone else to use the script there is always
the problem that it is fixed to certain directories.
Is there some possibility to make it global ?


vlib work
set SRC_DIR1
"h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl/ddr_wbridge_complex"
set SRC_DIR2 "h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl"
set SRC_DIR3 "h:/eda/lattice/dvi/dvi_pc_top/image_ddrmem_wbridge"
vcom ${SRC_DIR2}/ddr_sdram_package.vhd
vcom ${SRC_DIR2}/mt46v16m16.vhd
vcom ${SRC_DIR2}/pll_ddr.vhd
vcom ${SRC_DIR2}/ddr_datapath.vhd
vcom ${SRC_DIR2}/ddr_controller.vhd
vcom ${SRC_DIR2}/ddr_sdram_ctrl.vhd
vcom ${SRC_DIR3}/fifo1_wddr.vhd
vcom ${SRC_DIR3}/fifo2_wddr.vhd
vcom ${SRC_DIR3}/image_ddrmem_wbridge.vhd
vcom ${SRC_DIR1}/ddr_wbridge_complex.vhd
vcom ${SRC_DIR1}/tb_ddr_wbridge_complex.vhd
vsim tb_ddr_wbridge_complex
do Simulationsplot_functional.do
run 100us -all
configure wave -signalnamewidth 1
set StdArithNoWarnings 1
set IgnoreWarning 1

Rgds
André
 
M

Mike Treseler

When performing functional simulation in Modelsim I use the following
.do-script.
The problem: If I want someone else to use the script there is always
the problem that it is fixed to certain directories.

Have the script reference an environment variable
instead of a local constant for SRC_DIR1, SRC_DIR2 and SRC_DIR3.
Of course both you and someone else will have to
set these variables in your .bashrc or control panel.

-- Mike Treseler
 
K

Klaus Falser

Hi,

I am working with ispLEVER 5.0 and Modelsim 6.0c

When performing functional simulation in Modelsim I use the following
.do-script.
The problem: If I want someone else to use the script there is always
the problem that it is fixed to certain directories.
Is there some possibility to make it global ?


vlib work
set SRC_DIR1
"h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl/ddr_wbridge_complex"
set SRC_DIR2 "h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl"
set SRC_DIR3 "h:/eda/lattice/dvi/dvi_pc_top/image_ddrmem_wbridge"
vcom ${SRC_DIR2}/ddr_sdram_package.vhd
vcom ${SRC_DIR2}/mt46v16m16.vhd
vcom ${SRC_DIR2}/pll_ddr.vhd
vcom ${SRC_DIR2}/ddr_datapath.vhd
vcom ${SRC_DIR2}/ddr_controller.vhd
vcom ${SRC_DIR2}/ddr_sdram_ctrl.vhd
vcom ${SRC_DIR3}/fifo1_wddr.vhd
vcom ${SRC_DIR3}/fifo2_wddr.vhd
vcom ${SRC_DIR3}/image_ddrmem_wbridge.vhd
vcom ${SRC_DIR1}/ddr_wbridge_complex.vhd
vcom ${SRC_DIR1}/tb_ddr_wbridge_complex.vhd
vsim tb_ddr_wbridge_complex
do Simulationsplot_functional.do
run 100us -all
configure wave -signalnamewidth 1
set StdArithNoWarnings 1
set IgnoreWarning 1

Rgds
André
I would split the task and create a makefile for compiling
and updating the work library. This depends on the source
directory, but you could use a relative pathes like
.../../src/ddr_sdram_ctrl.vhd
Once the library is up to date, you can start your simulation
with another script, which does not depend on the source location
anymore.

Best regards
Klaus
 
M

Mike Treseler

Klaus said:
I would split the task and create a makefile for compiling
and updating the work library.

Very good point.

Using emacs vhdl-mode you can define a
set of source directories and vhdl-mode
will scan them for you, find all the .vhd files
and generate the Makefile you need to compile
all the design units in the right order
by just saying "make"
or "make.exe" on the command line.
This can save you time because make keeps
track of file dates and only compiles
sources that need it.

Of course you can also create the Makefile
in an editor, but it might be easier
to load emacs than it is to learn make.

-- Mike Treseler
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top