Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] ModelSim tcl directory path

Status
Not open for further replies.

nsgil85

Member level 4
Joined
Dec 11, 2012
Messages
73
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,833
Hi

I'v batch file that run modelsim:
Code:
set a="%~dp0"
set a=%a:\=/%
vsim -gui -do "cd %a%" -do compile.tcl
Pause&Exit
The directory path in modelsim is where the batch file is located ("C:\HDL\Blocks\simulate\open_modelsim.bat")

compile.tcl file is:
Code:
vlib lib
vmap work lib
vcom -novopt -O0 tb_file.vhd
#vcom -novopt -O0 C:\HDL\file.vhd
#i want to use more generic like this:
vcom -novopt -O0 file.vhd
i'm trying to figure out how do i write tcl script to compile a vhd file that located on parent of the current directory. ("C:\HDL\file.vhd")

Thanks
Gil
 

vcom ../file.vhd

".." is like a folder but it indicates the previous folder
"." indicates the current folder
 
It should be noted that \ in modelsim do files (tcl) are escapes, not directory hierarchy. The directory separator is /.

The original posted tcl do file could have used C:/HDL/file.vhd and it would have worked.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top