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

Revision 34, 3.2 KB checked in by pntsvt00, 14 years ago (diff)

versione pre-pre-alpha

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