3

I'm trying to use something from VHDL 2008 (it can be done with 2002, of course, but it's much cleaner in 2008). If I compile the file in the command line setting the version manually it succeeds, but trying to get modelsim to compile it fails because the version is set as 2002.

When I try accessing the compile options, in the compile menu, it's grayed out.

Modelsim version is 10.5b intel starter (just updated because of this) and the files are part of a project. Is this a paid feature, or am I doing something wrong?

João Fernandes
  • 491
  • 7
  • 17
  • 3
    On the command line it is `vcom -2008 ...`. You can also edit the `modelsim.ini` file and change the default VHDL version. Search for the line `VHDL93 = ...` and replace it by `VHDL93 = 2008` (yes, this variable name is... strange). I cannot help with the graphical user interface, I never use it for compilation. – Renaud Pacalet Aug 01 '18 at 05:29
  • Editing the `modelsim.ini` was exactly what I needed. Worth noting that if the project was already created, the settings are copied to `project_directory/project_name.mpf`, and that takes priority. (I do need to be less dependent on GUIs, but I find it a lot more convenient.) Thanks a lot! – Vinicius Lambardozzi Aug 01 '18 at 11:21
  • Is there some way to change that via command line, rather than modifying the modelsim.ini file? – mbrandalero Mar 16 '20 at 12:52

1 Answers1

2

You can do it through the GUI by right clicking on the files you want to compile with VHDL 2008 in your Project view, and selecting Properties... to access the Project Compiler Settings.

Then select VHDL > Language Syntax > Use 1076-2008.

cynthi8
  • 801
  • 3
  • 10
  • It seems that simply setting compile switches for individual files is insufficient. I had to go to [ Settings | Compiler Settings | VHDL Input ] and select [ VHDL 2008 ]. Otherwise the Quartus tcl script modelsim.tcl (in the installation directory) adds "-93" to the autogenerated vcom command lines, which overrides any "VHDL93" specifications in any of the modelsim.ini files. Changing the above settings resulted in "-2008" instead. – plasmo Jun 12 '21 at 20:11