Lattice Semiconductor Corporation
Home > About Us > Newsletters > LatticeNEWS April 2008 > Lattice Listens Q&A

LatticeNEWS April 2008

Lattice Listens

Q: I would like to use ModelSim SE, rather than the ModelSim Lattice OEM version, to simulate a LatticeSCM design that uses PCS and/or Systembus. What must I do to use ModelSim SE?  

A: When using the standalone ModelSim SE for the first time, it is necessary to set up and compile the Lattice OEM libraries for the PCS and/or Systembus components. Below are the recommended instructions. These lines can be entered manually at the command prompt or executed from within a script file.

  1. Unzip the following directories into a directory of choice:
    C:/ispLEVER_installation_directory/ispFPGA/maco/bin/nt/jtaga-mti_6.0.zip
    C:/ispLEVER_installation_directory/ispFPGA/maco/bin/nt/sysbusa-mti_6.0-V2-1.zip
    C:/ispLEVER_installation_directory/ispFPGA/maco/bin/nt/pcsa-mti_6.0-V2-1.zip

  2. In ModelSim SE, define the logical working library names and then create a mapping of the logical working library name to the physical library directory by entering the following commands:
    vlib pcsa_mti_work
    vmap pcsa_mti_work path_to_library/pcsa_mti_work
    vlib sysbusa_mti_work
    vmap sysbusa_mti_work path_to_library/sysbusa_mti_work
    vlib jtaga_mti_work
    vmap jtaga_mti_work path_to_library/jtaga_mti_work

  3. In ModelSim SE, rebuild the library image with the commands shown below. The -work option specifies the library to regenerate and –refresh rebuilds the library image using models delivered as compiled libraries instead of using source code. (Note: Right-clicking on the library to do a refresh does not fully refresh the library. Therefore the refresh must be done on the MTI command line or in a script.)
    vlog –refresh –work sysbusa_mti_work
    vlog –refresh –work pcsa_mti_work
    vlog –refresh –work jtaga_mti_work

  4. In order for the ModelSim SE compiler to reference a location to search for unknown components (such as AND, OR, CLKDIV, etc.), enter the command below, where /path/filename.v is the Verilog design file, for every Verilog design file to be compiled.
    vlog  –y  C:/ispLEVER_installation_directory/cae_library/simulation/verilog/scm +libext+.v /path/filename.v

  5. The jtaga_mti_work library contains the correct jtaga component. Therefore, delete the one in the work directory, as shown below:
    vdel JTAGA

  6. Enter the following command to start the simulation and reference the three newly-compiled libraries. For the argument work.testbench, testbench is the design module name.
    vsim –t 1fs –novopt –L pcsa_mti_work –L sysbusa_mti_work –L jtaga_mti_work work.testbench

    Note: For ModelSim Lattice OEM, it would be necessary to include “-L sc_vlg” in the vsim command line. This option is not needed for ModelSim SE because the –y option in step 4 addresses finding the component.





Legal | Privacy Policy | Press | Careers | Investor Relations | Contact Us | Site Map | | Follow us  Lattice Semiconductor on Facebook  Lattice Semiconductor on Twitter  Lattice Semiconductor on YouTube  © Lattice Semiconductor Corporation 2012