Difference between revisions of "ModelSim SE Installation"

From MCEWiki
(Set up ModelSim SE X.Yz)
(Set up ModelSim SE X.Yz)
Line 54: Line 54:
 
** C:\mce\scripts\modelsim\220model.vhd (change properties to "lpm" library)
 
** C:\mce\scripts\modelsim\220model.vhd (change properties to "lpm" library)
 
** C:\mce\scripts\modelsim\altera_europa_support_lib.vhd (change properties to "altera" library)
 
** C:\mce\scripts\modelsim\altera_europa_support_lib.vhd (change properties to "altera" library)
* Compile these files
+
* Compile the library files '''one at a time''' otherwise not all the library items may show up.
 
* 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.
 
* 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...':
 
* 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...':

Revision as of 12:45, 24 June 2009

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


Licensing ModelSim SE X.Yz

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 X.Yz

Method 1:

  • 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 .vhd firmware tags in CVS_ROOT\mce\cards. Updating the CVS repository to HEAD may cause compilation errors in ModelSim, because it is not necessarily working code. Instead, try updating your repository to a tag that corresponds to the version of ModelSim being installed, i.e. 'modelsim_63g_library'.
  • Get the corresponding ModelSim project and library files from CVS. In 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.
  • Start ModelSim SE
  • Load the project stored at CVS_ROOT\mce\scripts\modelsim\mce.mpf

Method 2:

  • Load ModelSim SE
  • Create a project called 'mce'
  • Create the following 12 libraries:
    • work
    • altera
    • altera_mf
    • components
    • lpm
    • sys_param
    • ieee
    • modelsim_lib
    • std_developerskit
    • synopsis
    • verilog
    • std
  • Add the following files to the project's 'Top Level'. Periodically, it will be necessary to update these files to more recent version. The place to look for these files is "C:\Modeltech_x.xy\vhdl_src\std" and "C:\altera\80\quartus\eda" and "C:\altera\80\quartus\libraries".
    • C:\mce\scripts\modelsim\textio.vhd (change properties to "std" library)
    • C:\mce\scripts\modelsim\standard.vhd (change properties to "std" library)
    • C:\mce\scripts\modelsim\altera_mf_components.vhd (change properties to "altera_mf" library)
    • C:\mce\scripts\modelsim\altera_mf.vhd (change properties to "altera_mf" library)
    • C:\mce\scripts\modelsim\220pack.vhd (change properties to "lpm" library)
    • C:\mce\scripts\modelsim\220model.vhd (change properties to "lpm" library)
    • C:\mce\scripts\modelsim\altera_europa_support_lib.vhd (change properties to "altera" library)
  • Compile the library files one at a time otherwise not all the library items may show up.
  • 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 (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)
  • Add all the .vhd files from the directories in parentheses above
  • Change properties of files to be in specific libraries
    • Files from library->sys_param go in the "sys_param" library
    • Files from library->components go in the "components" library
    • Files from cards go in the "work" library

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.