Skip to content

Commit 68a6ac0

Browse files
committed
example: Hazard3 CPU
The Hazard3 RISC-V CPU comes with SVA assertions. This script downloads the RTL, and runs ebmc to check them.
1 parent b7a55de commit 68a6ac0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

examples/Hazard3/Hazard3.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
# abort on error
4+
set -e
5+
6+
# clone Hazard3 repo if not done yet
7+
if [ ! -e Hazard3/.git ] ; then
8+
git clone https://github.com/Wren6991/Hazard3
9+
git checkout v1.0
10+
fi
11+
12+
cd Hazard3/hdl
13+
14+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 \
15+
arith/hazard3_alu.v \
16+
arith/hazard3_priority_encode.v \
17+
arith/hazard3_onehot_encode.v \
18+
arith/hazard3_onehot_priority.v \
19+
arith/hazard3_shift_barrel.v
20+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 arith/hazard3_multdiv_seq.v
21+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 arith/hazard3_shift_barrel.v
22+
23+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 hazard3_core.v
24+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 hazard3_cpu_2port.v
25+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 hazard3_csr.v
26+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 hazard3_decode.v
27+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 hazard3_frontend.v
28+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 hazard3_instr_decompress.v
29+
ebmc -I . -I HAZARD3_ASSERTIONS --bound 0 hazard3_power_ctrl.v
30+

0 commit comments

Comments
 (0)