-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathinstructions.txt
49 lines (29 loc) · 1.12 KB
/
instructions.txt
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
IMPORTANT: Run these on a modern Linux install such as recent Ubuntu distributions
or on `linux.andrew.cmu.edu` servers. Older versions such as RHEL7.9 (used on the ece0XX
cluster) will not work properly.
1. To use Icarus Verilog:
# Use SV2V to convert the SystemVerilog to Verilog-2005
sv2v MatMul.sv MatMul_tb.sv > _mm_tb.v
# Compile with Icarus
iverilog -s MatMul_tb -o _mm_tb.vvp _mm_tb.v
# Run the simulation
vvp _mm_tb.vvp
# View the waveforms with GTKWave, this can be done over X-Forwarding
# or by copying the file to your local machine and running GTKWave locally
gtkwave _mm_out.vcd
2. To use Verilator:
# Note the contents of MatMulDemo.cpp
cat MatMulDemo.cpp
# (optionally) delete the old build directory if needed
rm -r obj_dir
# Use Verilator to compile the SystemVerilog to C++
verilator -Wno-lint --trace --cc MatMul.sv --exe MatMulDemo.cpp
# Compile the actual binaries
make -C obj_dir -f VMatMul.mk VMatMul
# Run the simulation binary
./obj_dir/VMatMul
3. To use CocoTB:
# Note the contents of MatMulTester1.mk and MatMulTester1.py
cat MatMulTester1.mk
# Execute the simulation
make -f MatMulTester1.mk