-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkirsch_tb.sim
65 lines (52 loc) · 2.1 KB
/
kirsch_tb.sim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
set period [ examine -radix decimal {sim:/kirsch_tb/period} ]
set bubbles [ examine -radix decimal {sim:/kirsch_tb/bubbles} ]
set num_pixels [ expr 256 * 256 ]
set run_time [ expr ($num_pixels + 100) * $period * ($bubbles + 1) ]
echo bubbles=$bubbles
echo runtime=$run_time
if { $gui_mode } {
#------------------------------------------------------
# add waves only if in gui mode
add wave sim:/kirsch_tb/clk
add wave sim:/kirsch_tb/reset
add wave sim:/kirsch_tb/i_valid
add wave -radix unsigned sim:/kirsch_tb/i_pixel
if { $sim_mode eq "PROG_MODE" } then {
#------------------------------------------
# signals that are traced in --prog mode
# uncomment the lines below and
# add a signal name from your lab3.vhd to the end of each line below
#
# add wave -color "cornflower blue" -radix unsigned
# add wave -color "coral" -radix decimal
# add wave -color "slate blue"
#------------------------------------------
} else {
#------------------------------------------
# signals that are traced in --chip and --logic mode
#------------------------------------------
}
#------------------------------------------------------
# additional signals that are traced in all modes
#
add wave sim:/kirsch_tb/o_mode
add wave -radix unsigned sim:/kirsch_tb/o_row
add wave -radix unsigned sim:/kirsch_tb/o_col
add wave sim:/kirsch_tb/o_valid
add wave sim:/kirsch_tb/o_edge
add wave sim:/kirsch_tb/o_dir
#------------------------------------------------------
}
#----------------------------------------------------------------------
# code to run in both command line and gui mode
run $run_time ns
# run 11 ms
#----------------------------------------------------------------------
# if in gui mode, then zoom to see the complete simulation trace
# if in command line mode, exit
if { $gui_mode } {
wave zoom full
} else {
exit
}
#----------------------------------------------------------------------