We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 23321

MIG v1.7 - How do I set up a simulation for a MIG-generated controller? What changes must be made to the testbench and "do" script to run a MIG simulation?


MIG v1.7 controllers provide a Verilog testbench and a ModelSim "do" script. However, when I run a simulation with the provided files, the simulation does not complete. What changes must be made to run a simulation with the generated MIG controller?


The testbench and ModelSim "do" script provided with the MIG v1.7 controllers are meant only as a starting point in simulating the controllers; modifications are required for both files.

The testbench must be modified to match the memory interface. The top level of the MIG design must be connected to the appropriate third-party memory model(s). For example, if the MIG controller is 64-bits wide with eight components, the testbench must have eight instantiations of the memory model with the ports connected appropriately to the top-level MIG instantiation. The testbench generates the required clocks and reset. Please note, the testbench clock frequency may have to be modified to match the MIG generated controller frequency (target frequency).

The simulation "do" script also requires modification. Ensure that all MIG-generated ".rtl", testbench, memory model, and "glbl.v" files are compiled before executing the "vsim" command. The vsim command should include the "+notimingchecks" option. Also, ensure that simulation is run for more than 200 microseconds to allow for initialization and calibration to complete. An example "do" script is as follows:

vlib work

##The following line to compile the parameters file should be removed for Virtex-5 designs

vlog "../rtl/mem_interface_top_parameters_0.v"

vlog "../rtl/*.v"

vlog "ddr2.v"

vlog "glbl.v"

vlog "ddr2_test_tb.v"

vsim -t ps +notimingchecks -L unisims_ver work.ddr2_test_tb glbl

view wave

add wave *

view structure

view signals

run 250us

Further details on the simulation script file are included in the "Readme.txt" file located in the "sim" directory of the generated design.

Starting with the MIG v2.0 release (available with 9.2i IP Update #2), simulation files are provided that match the MIG generated design and include a ModelSim "do" script. No modifications are required to simulate the provided example design.
AR# 23321
Date Created 09/04/2007
Last Updated 11/08/2011
Status Archive
Type General Article