source: XOpenSparcT1/trunk/sim/simula.do @ 26

Revision 26, 3.2 KB checked in by pntsvt00, 13 years ago (diff)

checkpoint: baco con store consecutivi

Line 
1#start with: vsim -c -do simula.do
2
3set DEFINE +define+DEBUG+FPGA_SYN
4#+FPGA_NEW_IRF
5set INCLUDEDIR +incdir+../T1-common/include/
6vlib work
7
8#Map the required libraries here.#
9
10#Compile all modules#
11
12vlog  $DEFINE $INCLUDEDIR ../T1-common/common/*.v
13vlog  $DEFINE $INCLUDEDIR  ../Top/*.v
14vlog  $DEFINE +incdir+../OC-UART $INCLUDEDIR ../OC-UART/*.v
15vlog  $DEFINE $INCLUDEDIR ../NOR-flash/*.v
16vlog  $DEFINE $INCLUDEDIR ../os2wb/*.v
17vlog  $DEFINE $INCLUDEDIR ../T1-common/m1/*.V
18vlog  $DEFINE $INCLUDEDIR ../T1-common/srams/*.v
19vlog  $DEFINE $INCLUDEDIR ../T1-common/u1/*.V
20vlog  $DEFINE $INCLUDEDIR/ ../T1-FPU/*.v
21vlog  $DEFINE $INCLUDEDIR +incdir+../WB ../WB/*.v
22vlog  $DEFINE $INCLUDEDIR ../WB2ALTDDR3/*.v
23vlog  $DEFINE $INCLUDEDIR ../Xilinx/*.v
24vlog  $DEFINE $INCLUDEDIR ../T1-CPU/exu/*.v
25vlog  $DEFINE $INCLUDEDIR ../T1-CPU/ffu/*.v
26vlog  $DEFINE $INCLUDEDIR ../T1-CPU/ifu/*.v
27vlog  $DEFINE $INCLUDEDIR ../T1-CPU/lsu/*.v
28vlog  $DEFINE $INCLUDEDIR ../T1-CPU/mul/*.v
29vlog  $DEFINE $INCLUDEDIR ../T1-CPU/rtl/*.v
30vlog  $DEFINE $INCLUDEDIR ../T1-CPU/spu/*.v
31vlog  $DEFINE $INCLUDEDIR ../T1-CPU/tlu/*.v
32
33#Compile files in sim folder (excluding model parameter file)#
34#$XILINX variable must be set
35vlog  $env(XILINX)/../../verilog/src/glbl.v
36#vlog  $XILINX/../../verilog/src/glbl.v
37vlog  +define+DEBUG ../sim/*.v
38
39#Pass the parameters for memory model parameter file#
40vlog  +incdir+. +define+x512Mb +define+sg37E +define+x16 ddr2_model.v
41
42#Load the design. Use required libraries.#
43
44
45vsim -t ps -novopt +notimingchecks -L unisims_ver -L XilinxCoreLib work.tb_top glbl
46
47#vsim -c -t ps -novopt +notimingchecks -L unisims_ver -L XilinxCoreLib work.tb_top glbl
48#vsim -c -t ps -novopt +notimingchecks work.tb_top glbl
49
50add wave sim:/tb_top/W1_inst/dram_wb_inst/*
51#exit
52pause
53onerror {resume}
54#Log all the objects in design. These will appear in .wlf file#
55log -r /*
56#View sim_tb_top signals in waveform#
57add wave sim:/tb_top/*
58
59#Change radix to Hexadecimal#
60radix hex
61#Supress Numeric Std package and Arith package warnings.#
62#For VHDL designs we get some warnings due to unknown values on some signals at startup#
63# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0#
64#We may also get some Arithmetic packeage warnings because of unknown values on#
65#some of the signals that are used in an Arithmetic operation.#
66#In order to suppress these warnings, we use following two commands#
67set NumericStdNoWarnings 1
68set StdArithNoWarnings 1
69
70#Choose simulation run time by inserting a breakpoint and then run for specified #
71#period. For more details, refer to Simulation Guide section of MIG user guide (UG086).#
72when {/sim_tb_top/phy_init_done = 1} {
73if {[when -label a_100] == ""} {
74when -label a_100 { $now = 50 us } {
75nowhen a_100
76report simulator control
77report simulator state
78if {[examine /sim_tb_top/error] == 0} {
79echo "TEST PASSED"
80stop
81}
82if {[examine /sim_tb_top/error] != 0} {
83echo "TEST FAILED: DATA ERROR"
84stop
85}
86}
87}
88}
89
90#In case calibration fails to complete, choose the run time and then stop#
91when {$now = @500 us and /sim_tb_top/phy_init_done != 1} {
92echo "TEST FAILED: CALIBRATION DID NOT COMPLETE"
93stop
94}
95
96echo "NOTE: Initial 200us power on period is skipped for simulation.
97      Change SIM_ONLY parameter in sim_tb_top file to activate this."
98
99run -all
100stop
101
Note: See TracBrowser for help on using the repository browser.