Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,685 Views

[ModelSim] How to set design files to be recognized as SystemVerilog also in Modelsi?

Hello, 

 

What settings should I do so that Quartus-II will recognize all the "*.v" files as SystemVerilog files for synthesys as well as for simulations?  

 

I did the following settings in the Project Navigator window: 

1) RightClick on a file  

2) select 'Properties' 

3) select 'Type: SystemVerilog HDL File' 

 

But, when I invoke ModelSim from Quartus-II, it performs the following commands:  

vlog -vlog01compat -work work +incdir+L:/projects/RFGen/amp/rtl/sync {L:/projects/RFGen/amp/rtl/sync/sync_att.v} vlog -vlog01compat -work work +incdir+L:/projects/common/rstn {L:/projects/common/rstn/rstn_sync.v}  

 

So, the tool does not compile the files as SystemVerilog, but as just Verilog-2001 files (use -vlog01compat switch instead of -sv switch) 

 

So, what settings should I do in the Quartus-II so that it will generate the following lines for the simulation (-sv switch will be instead): 

 

vlog -sv -work work +incdir+L:/projects/RFGen/amp/rtl/sync {L:/projects/RFGen/amp/rtl/sync/sync_att.v} vlog -sv -work work +incdir+L:/projects/common/rstn {L:/projects/common/rstn/rstn_sync.v}  

 

Thank you
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
95 Views

Can I recommend you follow the recognised working practice and use the .sv suffix for SystemVerilog files? Then you won't have any of these issues. 

 

Alternatively, don't run ModelSim from within Quartus. Run it up separately and use your own tcl script (perhaps initially crafted with help from Quartus) and run it directly from within ModelSim - either via 'Tools' -> 'Tcl' -> 'Execute macro...' or directly on the command line with "do {script}.tcl" 

 

I'm not aware of any other settings within Quartus to help with this issue. 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor I
95 Views

OK...  

 

Should I compile the Altera libraries (like ALTPLL, other IPs, etc) in some special way when I invoke the ModelSim as a stands-alone tool?  

 

As far as I know, when I invoke the ModelSim from Quartus-II, all these libraries are compiled automatically...  

 

BTW, could you please provide more info on NativeLink? What's it's purpose and how to use it? 

 

Thank you!
Altera_Forum
Honored Contributor I
95 Views

Yes. Refer to my last post in this thread (http://www.alteraforum.com/forum/showthread.php?t=54455). This shows you how to add Altera libraries to your ModelSim simulation. Quartus does 'hold your hand' a little in this respect when you run your simulations through it. 

 

I'm afraid I've no experience to offer with regards to NativeLink. However, I'm pretty sure it will rely on you constructing your project in a 'standard' manner, with files with the 'correct' suffix. Having a quick look here (https://www.altera.com/support/support-resources/design-examples/design-software/simulation/modelsim...) it doesn't look like it gives you anything over and above the standard Quartus install. Maybe I'm missing something... 

 

Cheers, 

Alex