23.1.1.1 ModelSim

Since the installation path varies for each user and each installation, this document uses $ALSDIR to indicate the location where the software is installed. If you are a Unix user, simply create an environment variable called ALSDIR and set its value to the installation path. If you are a Windows user, replace

$ALSDIR with the installation path in the commands.

Use the following procedure to compile libraries for the ModelSim simulators. Type UNIX commands at the UNIX prompt. Type Windows commands on the command line of the ModelSim Transcript window. The commands below are for Windows. To make the commands work for UNIX, use forward slashes instead of back slashes.

This procedure compiles a Microchip VITAL library in the $ALSDIR\lib\vtl\95\mti directory. You must compile the FPGA library models for the VITAL libraries to work properly.

Important: If there is already an MTI directory in the $ALSDIR\lib\vtl\95 directory, compiled libraries may be present, and you may not need to perform the following procedure.
  1. Create a library called mti in the $ALSDIR\lib\vtl\95 directory.
  2. Invoke the ModelSim simulator (Windows only).
  3. Change to the $ALSDIR\lib\vtl\95\mti directory. Enter the following command at the prompt: cd $ALSDIR\lib\vtl\95\mti
  4. Create a <vhd_fam> family library. Enter the following command at the prompt: vlib <vhd_fam>
  5. Map the VITAL libray to the <vhd_fam> directory. Enter the following command at the prompt: vmap <vhd_fam> $ALSDIR\lib\vtl\95\mti\<vhd_fam>
  6. Compile your VITAL libraries.

    vcom -work <vhd_fam> ../<act_fam>.vhd

    For example, to compile the 40MX library for your simulator, type the following command:

    vcom -work a40mx ../40mx.vhd

  7. (Optional) Compile the migration library. Only perform this step if you need to use the migration library. Type the following command at the prompt:

vcom -work <vhd_fam> ../<act_fam>_mig.vhd