Mixing Verilog and SystemVerilog files

V

Verictor

Guest
Hi,

I have a group of design files are in *.v format. The top level test
environment files, however, are in *.sv (SystemVerilog) format.
Simulator is Ncverilog. All files have passed Ncverilog individually
(no syntax errors etc). But when simulating the whole system, ie.,
*.sv + *.v, one problem happened. Some *.v files contain keywords used
in SystemVerilog. For example, one *.v file has variable call "final",
which is not a keyword in Verilog but *is* in SystemVerilog. Those *.v
files are not supposed to be edited due to IP issues. It will be
clumpsy to change so many variable names too.

The simulation option for ncverilog I used is +sv (ignore others
irrelevent to this topics). Are there ways in ncverilog to specify
which option is for *.v and the other for *.sv?

Thanks.
 
On Jul 14, 3:28 pm, Verictor <stehu...@gmail.com> wrote:
The simulation option for ncverilog I used is +sv (ignore others
irrelevent to this topics). Are there ways in ncverilog to specify
which option is for *.v and the other for *.sv?
There is a new tool called irun in the IUS installation, that helps
with this kind of mixed-language issues (I think it would have been
named more logically ncrun, except that it also handles Specman e
code). It looks at file suffixes like .v and .sv and compiles each in
the appropriate mode.
 
On Jul 14, 4:52 pm, sh...@cadence.com wrote:
On Jul 14, 3:28 pm, Verictor <stehu...@gmail.com> wrote:



The simulation option for ncverilog I used is +sv (ignore others
irrelevent to this topics). Are there ways in ncverilog to specify
which option is for *.v and the other for *.sv?

There is a new tool called irun in the IUS installation, that helps
with this kind of mixed-language issues (I think it would have been
named more logically ncrun, except that it also handles Specman e
code).  It looks at file suffixes like .v and .sv and compiles each in
the appropriate mode.
I tried irun. Same errors. Do you know the switches in 'irun' that can
turn on this feature?

thanks
 
On Jul 15, 11:52 am, Verictor <stehu...@gmail.com> wrote
I tried irun. Same errors. Do you know the switches in 'irun' that can
turn on this feature?
I suspect that you used +sv. That apparently forces it to compile
everything as SV. You need to leave that off, so it is free to
compile the .v files without the +sv option. It will automatically
provide the option for the .sv files.
 

Welcome to EDABoard.com

Sponsor

Back
Top