-
Notifications
You must be signed in to change notification settings - Fork 1
/
sim.do
45 lines (38 loc) · 1.17 KB
/
sim.do
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
#==============================================
# clear
#==============================================
quit -sim
.main clear
#==============================================
# Create work library
#==============================================
vlib work
vmap work work
#================================================================
# Compiling
#================================================================
# Compile the common files
vlog -sv common_parts/control_constants.v
vlog -sv common_parts/adder.v
vlog -sv common_parts/alu.v
vlog -sv common_parts/regFile.v
vlog -sv common_parts/alu_op_gen.v
vlog -sv common_parts/immediate_gen.v
vlog -sv common_parts/inst_decoder.v
vlog -sv common_parts/mux2.v
vlog -sv common_parts/mux4.v
vlog -sv common_parts/syn_reg.v
# Compile the files for singlecycle implementation
vlog -sv controlpath_single.v
vlog -sv datapath_single.v
vlog -sv top_single.v
# Compile the test file
vlog -sv test_single.v
#================================================================
# Simulation settings
#================================================================
# Set top and no optimization
vsim -novopt test
# Add waves
# Run simulation
run 1000