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# 17729

6.2 / 6.1 EDK - SimGen: How do I write a "do" file to run the simulation after I run the "system.do" file (ModelSim) (SimGen) (EST)?


Keywords: EST, SimGen, EDK 6, simulation, do, run

Urgency: Standard

General Description :
SimGen writes me a "do" file that compiles all the correct files for my system. How do I get to load the simulation and run the design file from there?


To load the system and run the design, the following can be cut and pasted into a file.

*********************************************Copy begin here********************************************************
#Load the configuration statement for the blockram so all the memory is populated correctly.

#The name system_conf is in the system_init.vhd where it says:
#configuration system_conf of system is
# for all : bram1_wrapper use configuration work.bram1_conf;
#end for;
#end for;
#end system_conf;

#Make sure that you load the configuration when doing the vsim.
vsim -t ps system_conf

#add all the waves
add wave *

#Log all signals recursively so you do not need to restart sim after adding signals
log -r /*

#Drive the reset (active low)
force -freeze sim:/system/sys_reset 0 0

#Provide a 10Mhz clock
force -freeze sim:/system/sys_clk 1 0, 0 {50 ns} -r 100000

#Run the simulation with the reset
run 100 ns

#Set reset to 1 active low
force -freeze sim:/system/sys_reset 1 0

# When using a UART with 19200 baud rate
run 50 ms

*********************************************Copy end here********************************************************

If the snippet is cut and pasted into a text file and saved as "run.do" (or any other name), then the following line:

# type do followed by the name of the do file here
do run.do

can be added to the default "system.do" file. This will call the "run.do" file when the "system.do" file is executed.

AR# 17729
Date 03/05/2006
Status Archive
Type General Article
Page Bookmarked