Вы находитесь на странице: 1из 2

ModelSim 5.

8 EWS This document is intended to help you set up your ModelSim environment on the EWS linux stations. This procedure may be used to setup ModelSim on the EL231 labs once the SE version is installed. (The paths will of course be different.) 1. Log into a EWS linux machine. a. You may SSH into one from EL231 using PuTTY just remember to enable X forwarding. 2. Run your ece412 or ece412_G# script to set up the proper paths for ModelSim 3. Create a dir where you would like your work to be simulated. /nmnt/work1/ece412/kkielty2/testSim - as an example 4. Open ModelSim by running vsim a. ModelSim starts up in the directory from which you ran its command. It is critical that you change into your working directory every time you start ModelSim if it does not open there. 5. Create the necessary libraries a. First build a library for your work by right clicking in the Library pane on the left and selecting new->Library b. Select a new library and a logical mapping to it c. In the Library Name field you may specify a name or simply leave it as work d. In the Library Physical Name field insert the path to the directory you created in 3, ex. /nmnt/work1/ece412/kkielty2/testSim e. Repeat this procedure for a library that you will call unisim. (path may be something like /nmnt/work1/ece412/kkielty2/unisim) 6. Compile the unisim libraries a. First you will need to move them to your Linux machine so that ModelSim can see them. The files you want to move over are in the local Windows hard drive in the lab. i. C:\Xilinx\vhdl\src\unisims 1. unisim_SMODEL.vhd 2. unisim_VCOMP.vhd 3. unisim_VITAL.vhd 4. unisim_VPKG.vhd ii. C:\Xilinx\verilog\src\ise\ 1. unisim_comp.v b. Next you will need to compile them. In ModelSim click Compile>compile c. Select unisim as the library d. Using CTRL select the 4 files you just copied and hit Compile. This may give you errors. If you see these then simply compiles the files in this order: VCOMP, VPKG, VITAL, SMODEL i. You probably dont need SMODEL disk space may be an issue ii. Also compile in the verilog file. This is vitally important! 7. Compile your design.

a. Compile your design in a similar fashion by first coping over the necessary files then compiling them after pointing to your work library 8. Using ModelSim a. Most of you know how to use ModelSim by now but in case you dont here are a few pointers i. To run a simulation type vsim <lib>.<design> 1. vsim work.vga_top ii. To quit a simulation type quit sim iii. If you make a change to your design remember to recompile it in ModelSim iv. Use .do files or write vhdl testbenches to stress your design v. To simulate bRAMs you will have to uncomment lines in your .vhd files that pertain to unisim library. That is where the simulation files for bRAMs are located. If you get stuck simply ask a TA for help. Good luck.

Вам также может понравиться