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

Revision 17, 3.3 KB checked in by pntsvt00, 14 years ago (diff)

la simulazione legge dalla flash

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