   
################################################################################
##   ____  ____ 
##  /   /\/   / 
## /___/  \  /    Vendor: Xilinx 
## \   \   \/     Version : 1.6
##  \   \         Application : Spartan-6 GTP Wizard 
##  /   /         Filename : simulate_mti.do
## /___/   /\     
## \   \  /  \ 
##  \___\/\___\ 
##
##
## Script SIMULATE_MTI.DO
## Generated by Xilinx Spartan-6 GTP Wizard


##***************************** Beginning of Script ***************************
        
## If MTI_LIBS is defined, map unisim and simprim directories using MTI_LIBS
## This mode of mapping the unisims libraries is provided for backward 
## compatibility with previous wizard releases. If you don't set MTI_LIBS
## the unisim libraries will be loaded from the paths set up by compxlib in
## your modelsim.ini file

set XILINX   $env(XILINX)
if [info exists env(MTI_LIBS)] {    
    set MTI_LIBS $env(MTI_LIBS)
    vlib UNISIMS_VER
    vlib SECUREIP
    vmap UNISIMS_VER $MTI_LIBS/unisims_ver
    vmap SECUREIP $MTI_LIBS/secureip
   
}

## Create and map work directory
vlib work
vmap work work


##MGT Wrapper
vlog -work work  ../../../xil_s6_gtpwizard_v1_6_dp_tile.v;
vlog -work work  ../../../xil_s6_gtpwizard_v1_6_dp.v;


 
##Clock Modules 
vlog -work work  ../../example_design/mgt_usrclk_source.v;


##Example Design modules
vlog -work work  ../../example_design/frame_gen.v;
vlog -work work  ../../example_design/frame_check.v;
vlog -work work  ../../example_design/xil_s6_gtpwizard_v1_6_dp_top.v;
vlog -work work  ../demo_tb.v;

##Other modules
vlog -work work $XILINX/verilog/src/glbl.v;

##Load Design
vsim -t 1ps -L SECUREIP -L UNISIMS_VER work.DEMO_TB work.glbl -voptargs="+acc"

##Load signals in wave window
view wave
do wave_mti.do

##Run simulation
run 50 us


