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

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

eliminato baco store consecutivi. esegue correttamente il codice

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
51add wave sim:/tb_top/W1_inst/dram_wb_inst/*
52#exit
53pause
54onerror {resume}
55#Log all the objects in design. These will appear in .wlf file#
56log -r /*
57#View sim_tb_top signals in waveform#
58add wave sim:/tb_top/*
59
60#Change radix to Hexadecimal#
61radix hex
62#Supress Numeric Std package and Arith package warnings.#
63#For VHDL designs we get some warnings due to unknown values on some signals at startup#
64# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0#
65#We may also get some Arithmetic packeage warnings because of unknown values on#
66#some of the signals that are used in an Arithmetic operation.#
67#In order to suppress these warnings, we use following two commands#
68set NumericStdNoWarnings 1
69set StdArithNoWarnings 1
70
71#Choose simulation run time by inserting a breakpoint and then run for specified #
72#period. For more details, refer to Simulation Guide section of MIG user guide (UG086).#
73when {/sim_tb_top/phy_init_done = 1} {
74if {[when -label a_100] == ""} {
75when -label a_100 { $now = 50 us } {
76nowhen a_100
77report simulator control
78report simulator state
79if {[examine /sim_tb_top/error] == 0} {
80echo "TEST PASSED"
81stop
82}
83if {[examine /sim_tb_top/error] != 0} {
84echo "TEST FAILED: DATA ERROR"
85stop
86}
87}
88}
89}
90
91#In case calibration fails to complete, choose the run time and then stop#
92when {$now = @500 us and /sim_tb_top/phy_init_done != 1} {
93echo "TEST FAILED: CALIBRATION DID NOT COMPLETE"
94stop
95}
96
97echo "NOTE: Initial 200us power on period is skipped for simulation.
98      Change SIM_ONLY parameter in sim_tb_top file to activate this."
99
100run -all
101stop
102
Note: See TracBrowser for help on using the repository browser.