Wednesday, August 22, 2007

How to install XILINX smartmodels in Modelsim

Smartmodels are simulation models for xilnx complex devices in fpga, like rocketIO, powe pc 
etc.  First Xilnx Modelsim XE doesn't  support smartmodels so you have to use Modelsim SE.
Step 1.
Go to your ISE Webpack installation (exp. c:\xilinx91) then \smartmodel\nt\image\pcnt\ and run sl_admin.exe.  Then click install  and select the path for files  needed for 
installation ( your_ise_dir\smartmodel\nt\image\pcnt\ ), select smartmodels  you wish to install.

Step 2.
You must make the following changes to the "modelsim.ini" file located in the Modelsim  directory:
Open modelsim.ini file.

 After the lines:
; Simulator resolution
; Set to fs, ps, ns, us, ms, or sec with optional prefix of 1, 10, or 100.

edit the statement that follows, from "Resolution = ns" to "Resolution = ps."

 After the lines:
; Specify whether paths in simulator commands should be described
; in VHDL or Verilog format. For VHDL, PathSeparator = /
; for Verilog, PathSeparator = .

comment the following statement by adding a semicolon (;) at the beginning of the line:
PathSeparator = /

 After the line:
; List of dynamically loaded objects for Verilog PLI applications

add the following statement:
Veriuser=$LMC_HOME/lib/pcnt.lib/swiftpli_mti.dll

After the line:
; Logic Modeling's SmartModel SWIFT software (Windows NT)

add the following statements:  
libsm = $MODEL_TECH/libsm.dll
libswift=$LMC_HOME/lib/pcnt.lib/libswift.dll

(for ISE 9.1 and above)  

Make sure that %LMC_HOME%\lib\pcnt.lib is in the Path user variable.

NOTE: It is important that you do not change the order in which the commands appear in the "modelsim.ini" file. The simulation might not work if you do not follow the order recommended above.

Got to control panel->system->advanced->enviroment variables
if not defined create this variables:
variable name: LMC_HOME    
variable value: your_ise_dir\smartmodel\nt\installed_nt

in your path variable you must add
rest_of_the_path;C:\Modeltech_6.2c\win32;%LMC_HOME%\bin;%LMC_HOME%\lib\pcnt.lib;


Step 3
Open modelsim and enter in your transcript window:
modelsim> compxlib -s mti_se -arch virtex5(or other  architecture)

Step 4
type
vsim> vsim unisim.ppc405

if there's no errors you you succeeded else repeat from Step 1.

Hope it helps!

NOTE: If you are running ModelSim Standalone with a ".mpf" file, make sure these changes are made in that file, too. 

No comments: