-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecode_tb.tcl
39 lines (31 loc) · 1.19 KB
/
decode_tb.tcl
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
proc AddWaves {} {
;#Add waves we're interested in to the Wave window
add wave -position end sim:/decode_tb/clk
add wave -position end sim:/decode_tb/dut/reset
add wave -position end sim:/decode_tb/dut/no_instr
add wave -position end sim:/decode_tb/reset
add wave -position end sim:/decode_tb/if_pc
add wave -position end sim:/decode_tb/if_instr
add wave -position end sim:/decode_tb/ex_pc
add wave -position end sim:/decode_tb/ex_opcode
add wave -position end sim:/decode_tb/ex_regs
add wave -position end sim:/decode_tb/ex_regd
add wave -position end sim:/decode_tb/ex_regt
add wave -position end sim:/decode_tb/ex_immed
add wave -position end sim:/decode_tb/dut/registers
add wave -position end sim:/decode_tb/dut/write_busy
add wave -position end sim:/decode_tb/out_registers
add wave -position end sim:/decode_tb/dut/stall
add wave -position end sim:/decode_tb/hazard
}
vlib work
;# Compile components if any
vcom decode.vhd
vcom decode_tb.vhd
;# Start simulation
vsim decode_tb
;# Generate a clock with 1ns period
#force -deposit clk 0 0 ns, 1 0.5 ns -repeat 1 ns
;# Add the waves
AddWaves
run 100ns