OpenCores
URL https://opencores.org/ocsvn/versatile_mem_ctrl/versatile_mem_ctrl/trunk

Subversion Repositories versatile_mem_ctrl

[/] [versatile_mem_ctrl/] [trunk/] [sim/] [rtl_sim/] [bin/] [sim_xilinx.tcl] - Blame information for rev 15

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 mikaeljf
# Usage:
2
# cd /versatile_mem_ctrl/trunk/sim/rtl_sim/run/
3
# vsim -gui -do ../bin/sim_xilinx.tcl
4
 
5
set DESIGN_NAME "versatile_memory_controller"
6
set WAVE_FILE wave_ddr.do
7
set FORCE_LIBRARY_RECOMPILE 0
8
 
9
# Quit simulation if you are running one
10
quit -sim
11
 
12
# Create and open project
13
if {[file exists ${DESIGN_NAME}_sim_xilinx.mpf]} {
14
project open ${DESIGN_NAME}_sim_xilinx
15
} else {
16
project new . ${DESIGN_NAME}_sim_xilinx
17
}
18
 
19
# Compile Xilinx libraries
20
if {![file exists unisims_ver] || $FORCE_LIBRARY_RECOMPILE} {
21
vlib unisims_ver
22
vmap unisims_ver unisims_ver
23
vlog -work unisims_ver /opt/Xilinx/11.1/ISE/verilog/src/unisims/*.v
24
}
25
if {![file exists simprims_ver] || $FORCE_LIBRARY_RECOMPILE} {
26
vlib simprims_ver
27
vmap simprims_ver simprims_ver
28
vlog -work simprims_ver /opt/Xilinx/11.1/ISE/verilog/src/simprims/*.v
29
}
30
if {![file exists xilinxcorelib_ver] || $FORCE_LIBRARY_RECOMPILE} {
31
vlib xilinxcorelib_ver
32
vmap xilinxcorelib_ver xilinxcorelib_ver
33
vlog -work xilinxcorelib_ver /opt/Xilinx/11.1/ISE/verilog/src/XilinxCoreLib/*.v
34
}
35
 
36
# Compile the glbl.v module
37
vlog /opt/Xilinx/11.1/ISE/verilog/src/glbl.v
38
 
39
# Compile project source code
40
vlog ../../../rtl/verilog/versatile_mem_ctrl_ip.v +incdir+../../../rtl/verilog/
41
 
42
# Compile test bench source code
43
vlog ../../../bench/ddr/ddr2.v +incdir+../../../bench/ddr/
44
vlog ../../../bench/wb0_ddr.v ../../../bench/wb1_ddr.v ../../../bench/wb4_ddr.v +define+x16 ../../../bench/tb_top.v +incdir+../../../bench/
45
 
46
# Quit without asking
47
set PrefMain(forceQuit) 1
48
 
49
# Invoke the simulator
50
# -gui      Open the GUI without loading a design
51
# -novopt   Force incremental mode (pre-6.0 behavior)
52
# -L        Search library for design units instantiated from Verilog and for VHDL default component binding
53
vsim -gui -novopt -L unisims_ver -L xilinxcorelib_ver work.versatile_mem_ctrl_tb work.glbl
54
 
55
# Open waveform viewer
56
view wave -title "${DESIGN_NAME}"
57
 
58
# Open signal viewer
59
view signals
60
 
61
# Run the .do file to load signals to the waveform viewer
62
#do $WAVE_FILE
63
 
64
# Run the simulation
65
run 330 us
66
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.