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.

a question about "-sverilog" option of vcs

Status
Not open for further replies.

xiaojigao

Newbie level 6
Joined
Oct 12, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
China
Activity points
1,389
I have an RTL design(suppose it's name is dut.v) which is writen in verilog, and a testbench(suppose it's name is tb.sv) which is writen in systemverilog. When I simulate my RTL using vcs, I add "-sverilog" option to support systemverilog. But I find a problem: vcs will compile both dut.v and tb.sv as systemverilog. This is not what I wanted.
I hope vcs compiling dut.v as verilog, and compiling tb.sv as systemverilog. How can I achieve my goal ? Is there any options to tell vcs "just compile files as their file extensions"? i.e. compile *.v file as verilog, and compile *.sv as systemverilog. I know irun(cadence EDA tool) can do this. But I don't know how to tell vcs do this. If I remove "-sverilog" option, it will compile all files as verilog and will report compile error when compile tb.sv.

Then I will explain why I want vcs to compile dut.v as verilog.
If there are below lines of code in dut.v:
reg aa;
assign aa = sel ? bb : cc;


Actually these code is not correct, below aa should be decleared as wire, but not reg. But, if this file is compiled as systemverilog, it will not report error. This is not what I wanted.
(I wonder if these code can be synthesised correctly and will not report error?)

Thanks very much!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top