Modelsim Directory

Hi,

I have written a little .do-script with which the VHDL files are compiled and the simulation is performed.

When I open Modelsim I have to go to FILE --> CHANGE DIRECTORY and then I have to enter the path of my simulation directory including my script.

How can I do this directory changing automatically at the beginning of my script ? Is there any command ?

I would appreciate your help.

Here is the script

vlib work # Compile base libraries vcom util1164.vhd vcom stdlogar.vhd vcom io_utils.vhd vcom mti_pkg.vhd # Compile test vectors vcom vec_gen.vhd vcom ed_comnd.vhd

vcom -93 ../../../sdram_ctrl/sdram_positions_arbitration/ fraction_sdram_numbers_fifo.vhd vcom -93 ../../../sdram_ctrl/sdram_positions_arbitration/ mux_fraction_fifo_outputs.vhd vcom -93 ../../../sdram_ctrl/sdram_positions_arbitration/sdram_pos_arbiter.vhd vcom -93 ../../../sdram_ctrl/sdram_positions_arbitration/ sdram_positions_arbitration.vhd

vcom -93 ../../../sdram_ctrl/valid_bytes_in_row.vhd vcom -93 ../../../sdram_ctrl/tristate_buffer.vhd vcom -93 ../../../sdram_ctrl/sdram_controller.vhd vcom -93 ../../../sdram_ctrl/sdram_ctrl.vhd vcom -93 ./mt48lc8m16a2.vhd vcom -93 ../../../sie_trans_fs/read_burst_fifo.vhd vcom -93 ../../../sie_trans_fs/crc16_8bit_in.vhd vcom -93 ../../../sie_trans_fs/sie_trans_fs.vhd

vcom -93 ./tb_sdram_ctrl_sie_fs.vhd vsim tb_sdram_ctrl_sie_fs do Simulationsplot_sdram_ctrl_sie_fs.do run 1200us -all

configure wave -signalnamewidth 1 set StdArithNoWarnings 1 set IgnoreWarning 1 set DefaultRadix unsigned

Reply to
ALuPin
Loading thread data ...

You can use an identifier to have a fully parametric script, so that you can get rid of physical location of your HDL codes.

Example:

---- do script ---- ... set designlib /home/AluPin/sdram_chip ... vcom -93 $designlib/sdram_ctrl/sdram_positions_arbitration/sdram_pos_arbiter.vhd ...

--- end of script ---

You can further parametrize your RTL simulation environment by placing "$designlib" into a separate *.do script. This way you can move the complete design directory to another location. In this case you just need to update the *.do script called in your script:

--- do script --- ... do chip_global.do

--
This is a SUNW,Ultra-80 machine.
  3:15pm  up 56 day(s), 3 min(s),  1 user,  load average: 0.14, 0.13, 0.08
Reply to
Utku Ozcan

hi,

i solved that annoing problem modifing the modelsim.ini file that in my computer is placed into the directory:

C:\Programs\Modeltech_xe\examples

the line that i added (or changed... i do not remember) is the following:

#########################

; VSIM Startup command Startup = do wdir.do

#########################

and the wdir.do file is placed in the same directory with the following command:

#########################

cd e:/work/fs/sim

#########################

hope this help

andrea

Reply to
Andrea Sabatini

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.