Difference between revisions of "ModelSim SE Installation"

From MCEWiki
 
(27 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
This page describes the proceedure for installing the latest version of ModelSim available from the ModelSim website, and compiling the Altera .vhd files that are necessary to create simulation libraries.  
 
This page describes the proceedure for installing the latest version of ModelSim available from the ModelSim website, and compiling the Altera .vhd files that are necessary to create simulation libraries.  
  
== Download ModelSim SE X.Yz ==
+
== Download ModelSim SE ==
 
* Download the latest version of ModelSim SE here:  http://www.model.com/downloads/default.asp, and store the downloaded files here:  http://www.phas.ubc.ca/~scuba2/sc2mce/library/sw_lib/.
 
* Download the latest version of ModelSim SE here:  http://www.model.com/downloads/default.asp, and store the downloaded files here:  http://www.phas.ubc.ca/~scuba2/sc2mce/library/sw_lib/.
* Install ModelSim
+
* Install ModelSim.  '''Note''': Altera takes some time to issue libraries that are compatible with the latest version of ModelSim.  By that time, the version of ModelSim they are compatible with is usually no longer available from the ModelSim website.  Therefore, it is in your best interest to store old versions of ModelSim.  To check that Altera has created the libraries that you need to support the version of ModelSim that you are installing, check here:  http://www.altera.com/support/software/nativelink/simulation/modelsim/eda_pro_msimfull_setup.html
* Get the corresponding project and library files from CVSIn CVS, the ModelSim project and library files that are used for MCE firmware simulations are tagged by the version of ModelSim that they are compatible with.  For example, the CVS_ROOT\mce\scripts\modelsim directory has a tag called 'modelsim_63g_library'.  Retrieve the tag that corresponds to your ModelSim installation.
 
* '''Note''': Altera takes some time to issue libraries that are compatible with the latest version of ModelSim.  By that time, the version of ModelSim they are compatible with is usually no longer available from the ModelSim website.  Therefore, it is in your best interest to store old versions of ModelSim.  To check that Altera has created the libraries that you need to support the version of ModelSim that you are installing, check here:  http://www.altera.com/support/software/nativelink/simulation/modelsim/eda_pro_msimfull_setup.html
 
  
  
== Licensing ModelSim SE X.Yz ==
+
== Licensing ModelSim SE ==
 
'''Method 1:'''
 
'''Method 1:'''
 
* When asked by the installation window if you need to install a new license, click 'No'.  A License Wizard may then start automatically.  If one doesn't, try the following.
 
* When asked by the installation window if you need to install a new license, click 'No'.  A License Wizard may then start automatically.  If one doesn't, try the following.
 
  
 
'''Method 2:'''
 
'''Method 2:'''
Line 18: Line 15:
 
* Type '1700@rwinsecurity.triumf.ca' or 'licensing.triumf.ca' in the dialog box
 
* Type '1700@rwinsecurity.triumf.ca' or 'licensing.triumf.ca' in the dialog box
 
* Click 'Ok'
 
* Click 'Ok'
 
  
 
'''Method 3:'''
 
'''Method 3:'''
Line 26: Line 22:
  
  
== Set up ModelSim SE X.Yz ==
+
== Set up ModelSim SE ==
'''Method 1:'''
+
When installing Modelsim6.6c and Quartus10.0SP1 on Win7-64bit, I took some notes [[ Setting up Altera libraries in ModelSim SE | here ]] What is listed below predates my installation, but it is more or less true.
* If the location of your repository has changed, you will need to manually edit the following files in a text editor to reflect the correct paths:  mce.cr.mti, mce.mpf.
 
* Update your repository to the whichever combination of released tags you prefer.  Updating the CVS repository to HEAD may cause compilation errors in ModelSim, because it is not necessarily working code.
 
* Start ModelSim SE
 
* Load the project stored at C:\mce\scripts\modelsim\mce.mpf
 
  
 +
* Note that the following versions work together:  '''Quartus 9.0 SP2''' and '''ModelSim 6.3b.'''  Have both of these programs installed cleanly on your system before proceeding any further.
 +
* Retrieve the '''quartus90_modelsim63b''' tag for VHDL files in CVS_ROOT\mce\cards.  Updating the CVS repository to HEAD may cause compilation errors in ModelSim, because the HEAD is not necessarily working code.
 +
* Retrieve the '''quartus90_modelsim63b''' tag for ModelSim script and library files in CVS_ROOT\mce\scripts\modelsim\ -- or whichever tag in that directory that corresponds to the one that you retrieved for the VHDL files above.
 +
* If necessary, manually edit '''mce.cr.mti''' and '''mce.mpf''' to reflect correct paths if your repository is not in a standard location.  You usually will not have to do this.
 +
* If you're starting from a pre-existing project file, start ModelSim and go to File->Open.  Select 'Project Files (.ini, .mpf)' as the file type, and load CVS_ROOT\mce\scripts\modelsim\mce
 +
* Navigate to the 'Library' tab of the 'Workspace' pane.
 +
* If any of the following libraries already exist, delete them and create new ones by the same name.  They should initially be empty, but when you compile the project (later), they will become populated with objects.  If you are starting from scratch, create a new project in CVS_ROOT\mce\scripts\modelsim\, and create the libraries listed below.
 +
** work
 +
** altera
 +
** altera_mf
 +
** components
 +
** lpm
 +
** sys_param
 +
** stratixiii
 +
* Note: only ever delete the libraries listed above.  If you delete any of the ones listed below, you will have to re-install ModelSim to regenerate them:
 +
** ieee
 +
** modelsim_lib
 +
** std
 +
** std_developerskit
 +
** synopsys
 +
** verilog
 +
* Navigate to the 'Project' tab of the 'Workspace' pane.
 +
* In the top-level of the workspace, you should see the following files:
 +
** altera_mf_components.vhd (change properties to "altera_mf" library)
 +
** 220model.vhd (change 'Properties' to "lpm" library)
 +
** altera_mf.vhd (change 'Properties' to "altera_mf" library)
 +
** altera_europa_support_lib.vhd (change 'Properties' to "altera" library)
 +
** 220pack.vhd (change 'Properties' to "lpm" library)
 +
** stratixiii.vhd (change 'Properties' to "stratixiii" library)
 +
** stratixiii_components.vhd (change 'Properties' to "stratixiii" library)
 +
** stratixiii_atoms.vhd (change 'Properties' to "stratixiii" library)
 +
* If these files do not appear there, copy them from C:\altera\81\quartus\eda\sim_lib or \synthesis (for stratixiii.vhd) to CVS_ROOT\mce\scripts\modelsim\ and add them to the top level of the project.
 +
* Compile these files using the compile->compile order command.  Make sure that in the 'VHDL' tab of the 'Properties' pane, they are not checked for 'Synthesis.'
 +
* Now change the 'Properties' of these files so that you don't re-compile them every time you compile the rest of the files.  Select them all, and right click on one.  Select 'Properties...', and click on the 'Do Not Compile' check box under the 'General' tab.
 +
* If you are starting from a pre-existing project file, you should see a set of folders in the 'Project' tab of the 'Workspace' pane.  If you are starting from scratch, create the following project folders by selecting 'File->New->Folder', and in each folder load all the .vhd files that are contained directories in parenthesis by selecting 'File->Add To Project->Existing File...':
 +
** library (CVS_ROOT\mce\cards\library)
 +
** cards->bias_card (CVS_ROOT\mce\cards\bias_card)
 +
** cards->clock_card (CVS_ROOT\mce\cards\clk_card)
 +
** cards->all_cards (CVS_ROOT\mce\cards\all_cards)
 +
** cards->readout_card (CVS_ROOT\mce\cards\readout_card)
 +
** cards->addr_card (CVS_ROOT\mce\cards\addr_card)
 +
** cards->system (CVS_ROOT\mce\cards\system)
 +
* Change properties of files in certain folders to be compiled to specific libraries
 +
** Files from the library->sys_param folder go in the "sys_param" library
 +
** Files from the library->components folder go in the "components" library
 +
** Files from the cards folder go in the "work" library
 +
* Now select 'Compile->Compile Order..' from the menu, and select the 'Auto Generate' button.
  
'''Method 2:'''
+
* Non-specific instructions on how to set up a ModelSim for Altera FPGAs are here: http://www.altera.com/support/software/nativelink/simulation/modelsim/eda_view_using_msim.html
* Load ModelSim SE
 
* Create a project called 'mce'
 
* Create the standard libraries:  std, modelsim_lib, lpm, components, altera_mf.
 
* Add the following files to the project's 'Top Level':
 
** C:\Modeltech_X.Yz\vhdl_src\textio.vhd
 
** C:\Modeltech_X.Yz\vhdl_src\standard.vhd
 
** C:\altera\quartus60\eda\sim_lib\altera_mf_components.vhd
 
** C:\altera\quartus60\eda\sim_lib\altera_mf.vhd
 
** C:\altera\quartus60\eda\sim_lib\220pack.vhd
 
** C:\altera\quartus60\eda\sim_lib\220model.vhd
 
* Compile these files
 
* Change the 'Properties' of these files.  Select them all, and right click on one.  Select 'Properties...', and click on the 'Do Not Compile' check box under the 'General' tab.
 
* Create the following project folders by selecting 'File->New->Folder', and in each folder load all the .vhd files that are contained directories in parenthesis by selecting 'File->Add To Project->Existing File...':
 
** library (C:\mce\cards\library)
 
** cards/bias_card (C:\mce\cards\bias_card)
 
** cards/clock_card (C:\mce\cards\clk_card)
 
** cards/all_cards (C:\mce\cards\all_cards)
 
** cards/readout_card (C:\mce\cards\readout_card)
 
** cards/addr_card (C:\mce\cards\addr_card)
 
** cards/system (C:\mce\cards\system)
 
* Add files
 
* Create libraries
 
* Change properties of files to be in specific libraries
 
 
 
Non-specific instructions on how to set up a ModelSim for Altera FPGAs are here:
 
* http://www.altera.com/support/software/nativelink/simulation/modelsim/eda_view_using_msim.html
 
 
 
  
 
== Starting a Simulation ==
 
== Starting a Simulation ==
 
* To add a new simulation configuration, click on 'Project->Add To Project->Simulation Configuration'
 
* To add a new simulation configuration, click on 'Project->Add To Project->Simulation Configuration'
 
* In the 'Simulation Configuration' window, click on the 'Design' tab, expand the 'work' library, and select 'tb_cc_rcs_bcs_ac'.  Change the 'Simulation Configuration Name' to something informative, and change the 'Resolution' drop-down menu to 'ps'.
 
* In the 'Simulation Configuration' window, click on the 'Design' tab, expand the 'work' library, and select 'tb_cc_rcs_bcs_ac'.  Change the 'Simulation Configuration Name' to something informative, and change the 'Resolution' drop-down menu to 'ps'.
* Select 'Compile->Compile Order...' and click on 'Auto Generate'.  The project should now compile.  If id does not, fix the problems.  In some cases you may need to remove files from the project that do not exist anymore.  In other cases, you may have to add files to the project that have not yet been added.  In still other cases, you may have to get a different card tag.  Finally, you may have to fix coding errors.
+
* Select 'Compile->Compile Order...' and click on 'Auto Generate'.  The project should now compile.  If id does not, fix the problems.  In some cases you may need to remove files from the project that do not exist anymore.  In other cases, you may have to add files to the project that have not yet been added.  In still other cases, you may have to get a different card tag.  Finally, you may have to fix coding errors. '''Note:'''  counter.vhd is the only files that compiles with warnings.  If you notice warnings during the compilation of any other files, you should fix the problem.
 
+
* Once every file compiles, double click on the simulation configuration file that you created above.  The 'Transcript' pane will tell you if there are problems associated with starting the simulation.  If there are problems, fix them.
'''Note:'''  counter.vhd is the only files that compiles with warnings.  If you notice warnings during the compilation of any other files, you should fix the problem.
 
  
* Once every file compiles, double click on the simulation configuration file that you created above.  The 'Transcript' pane will tell you if there are problems associated with starting the simulation.  If there are problems, fix them.
+
[[Category:Development Tools]]

Latest revision as of 19:06, 31 August 2016

This page describes the proceedure for installing the latest version of ModelSim available from the ModelSim website, and compiling the Altera .vhd files that are necessary to create simulation libraries.

Download ModelSim SE


Licensing ModelSim SE

Method 1:

  • When asked by the installation window if you need to install a new license, click 'No'. A License Wizard may then start automatically. If one doesn't, try the following.

Method 2:

  • Load 'Start->All Programs->ModelSim X.Yz->Licensing Wizard'
  • Click 'Continue'
  • Type '1700@rwinsecurity.triumf.ca' or 'licensing.triumf.ca' in the dialog box
  • Click 'Ok'

Method 3:

  • Browse to 'Start->Control Panel->System Properties'. Select the 'Advanced' tab. Click on the 'Environment Variables' button. Add the following 'User Variables'.
    • LM_LICENSE_FILE=1700@trwinsecurity.triumf.ca
    • MGLS_LICENSE_FILE=1700@trwinsecurity.triumf.ca


Set up ModelSim SE

When installing Modelsim6.6c and Quartus10.0SP1 on Win7-64bit, I took some notes here What is listed below predates my installation, but it is more or less true.

  • Note that the following versions work together: Quartus 9.0 SP2 and ModelSim 6.3b. Have both of these programs installed cleanly on your system before proceeding any further.
  • Retrieve the quartus90_modelsim63b tag for VHDL files in CVS_ROOT\mce\cards. Updating the CVS repository to HEAD may cause compilation errors in ModelSim, because the HEAD is not necessarily working code.
  • Retrieve the quartus90_modelsim63b tag for ModelSim script and library files in CVS_ROOT\mce\scripts\modelsim\ -- or whichever tag in that directory that corresponds to the one that you retrieved for the VHDL files above.
  • If necessary, manually edit mce.cr.mti and mce.mpf to reflect correct paths if your repository is not in a standard location. You usually will not have to do this.
  • If you're starting from a pre-existing project file, start ModelSim and go to File->Open. Select 'Project Files (.ini, .mpf)' as the file type, and load CVS_ROOT\mce\scripts\modelsim\mce
  • Navigate to the 'Library' tab of the 'Workspace' pane.
  • If any of the following libraries already exist, delete them and create new ones by the same name. They should initially be empty, but when you compile the project (later), they will become populated with objects. If you are starting from scratch, create a new project in CVS_ROOT\mce\scripts\modelsim\, and create the libraries listed below.
    • work
    • altera
    • altera_mf
    • components
    • lpm
    • sys_param
    • stratixiii
  • Note: only ever delete the libraries listed above. If you delete any of the ones listed below, you will have to re-install ModelSim to regenerate them:
    • ieee
    • modelsim_lib
    • std
    • std_developerskit
    • synopsys
    • verilog
  • Navigate to the 'Project' tab of the 'Workspace' pane.
  • In the top-level of the workspace, you should see the following files:
    • altera_mf_components.vhd (change properties to "altera_mf" library)
    • 220model.vhd (change 'Properties' to "lpm" library)
    • altera_mf.vhd (change 'Properties' to "altera_mf" library)
    • altera_europa_support_lib.vhd (change 'Properties' to "altera" library)
    • 220pack.vhd (change 'Properties' to "lpm" library)
    • stratixiii.vhd (change 'Properties' to "stratixiii" library)
    • stratixiii_components.vhd (change 'Properties' to "stratixiii" library)
    • stratixiii_atoms.vhd (change 'Properties' to "stratixiii" library)
  • If these files do not appear there, copy them from C:\altera\81\quartus\eda\sim_lib or \synthesis (for stratixiii.vhd) to CVS_ROOT\mce\scripts\modelsim\ and add them to the top level of the project.
  • Compile these files using the compile->compile order command. Make sure that in the 'VHDL' tab of the 'Properties' pane, they are not checked for 'Synthesis.'
  • Now change the 'Properties' of these files so that you don't re-compile them every time you compile the rest of the files. Select them all, and right click on one. Select 'Properties...', and click on the 'Do Not Compile' check box under the 'General' tab.
  • If you are starting from a pre-existing project file, you should see a set of folders in the 'Project' tab of the 'Workspace' pane. If you are starting from scratch, create the following project folders by selecting 'File->New->Folder', and in each folder load all the .vhd files that are contained directories in parenthesis by selecting 'File->Add To Project->Existing File...':
    • library (CVS_ROOT\mce\cards\library)
    • cards->bias_card (CVS_ROOT\mce\cards\bias_card)
    • cards->clock_card (CVS_ROOT\mce\cards\clk_card)
    • cards->all_cards (CVS_ROOT\mce\cards\all_cards)
    • cards->readout_card (CVS_ROOT\mce\cards\readout_card)
    • cards->addr_card (CVS_ROOT\mce\cards\addr_card)
    • cards->system (CVS_ROOT\mce\cards\system)
  • Change properties of files in certain folders to be compiled to specific libraries
    • Files from the library->sys_param folder go in the "sys_param" library
    • Files from the library->components folder go in the "components" library
    • Files from the cards folder go in the "work" library
  • Now select 'Compile->Compile Order..' from the menu, and select the 'Auto Generate' button.

Starting a Simulation

  • To add a new simulation configuration, click on 'Project->Add To Project->Simulation Configuration'
  • In the 'Simulation Configuration' window, click on the 'Design' tab, expand the 'work' library, and select 'tb_cc_rcs_bcs_ac'. Change the 'Simulation Configuration Name' to something informative, and change the 'Resolution' drop-down menu to 'ps'.
  • Select 'Compile->Compile Order...' and click on 'Auto Generate'. The project should now compile. If id does not, fix the problems. In some cases you may need to remove files from the project that do not exist anymore. In other cases, you may have to add files to the project that have not yet been added. In still other cases, you may have to get a different card tag. Finally, you may have to fix coding errors. Note: counter.vhd is the only files that compiles with warnings. If you notice warnings during the compilation of any other files, you should fix the problem.
  • Once every file compiles, double click on the simulation configuration file that you created above. The 'Transcript' pane will tell you if there are problems associated with starting the simulation. If there are problems, fix them.