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] Problem in replacing 'define macro <text> to vlog +define+macro=<text> in Questasim

Status
Not open for further replies.

dhivya34

Junior Member level 1
Junior Member level 1
Joined
Aug 7, 2012
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,399
Problem in replacing 'define macro <text> to vlog +define+macro=<text> in Questasim

Hi

My code has the following ifdef
`ifdef SIMFILE
`include `SIMFILE
`endif


While compiling I give
vlog +define+SIMFILE="file1.sim" -f file_list.f
When I give this way file1.sim is actually not included.

Whereas it gets included only when I explicitly define as:
`define SIMFILE "test1.sim"

I learnt from questa manual and understood that +define+SIMFILE="file1.sim" along vlog is equivalent to `define SIMFILE "file1.sim"
But when I give the +define method mentioned above, the quotes are not actually taken. It either doesnt include the specified file or displays error like "missing quotes"

I find the problem with the quotes.I need to do +define+ along with vlog instead of `define
Kindly help me with this.

Thanks
 

Re: Problem in replacing 'define macro <text> to vlog +define+macro=<text> in Questas

I found the solution.
It should be
vlog +define+SIMFILE=\"file1.sim\"

Hope this might help someone
 

Re: Problem in replacing 'define macro <text> to vlog +define+macro=<text> in Questas

You have to be very careful with scripts as different shells will strip the the quotes away before passing them to vlog.

You can use a SystemVerilog technique to add the quotes inside your source so you can use

vlog +define+SIMFILE=file1.sim

In your source, you can do

`define QUOTE (str) `"str`"

f = $fopen(`QUOTE(`SIMFILE));
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top