################################################################################
##$Date: 2010/02/25 05:23:23 $
##$RCSfile: example_sim_do.ejava,v $
##$Revision: 1.2 $
################################################################################
##   ____  ____ 
##  /   /\/   / 
## /___/  \  /    Vendor: Xilinx 
## \   \   \/     Version : 1.7
##  \   \         Application : RocketIO Wizard 
##  /   /         Filename : example_sim.do
## /___/   /\     Timestamp : 02/08/2005 09:12:43
## \   \  /  \ 
##  \___\/\___\ 
##
##
## Script VSIM.DO
## Generated by Xilinx RocketIO 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  ../src/rocketio.v;

##Unused MGT Wrapper 
vlog -work work  ../src/unused_mgt.v;

##Reset Block
vlog -work work  ../example/gt11_init_tx.v;
vlog -work work  ../example/gt11_init_rx.v;

##Calibration Block
vlog -work work  ../src/cal_block_v1_4_1.v;

##Clock Modules 
vlog -work work  ../src/mgt_clock_module.v;

##Example Design modules
vlog -work work  ../example/frame_gen.v;
vlog -work work  ../example/frame_check.v;
vlog -work work  ../example/example_mgt_top.v;
vlog -work work  ../testbench/example_tb.v;

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

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

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

##Run simulation
run 25 us


