Skip to content

Commit aac6714

Browse files
committed
Verification for pfpu32_muldiv: MULT (and some DIV)
This adds formal verification for the multiplication outputs in pfpu32_muldiv, and some division outputs too. To achieve this, I assumed (but not yet verified) that the muldiv module will not receive further requests for the 12 cycles following a division request, since the module will be busy with the Goldschmidt algorithm. To make verification of the multiplication output tractable, I've split it into two pieces. The `pfpu_muldiv_check` target in the Makefile checks a series of assertions that together imply an assumption in the `pfpu_muldiv` target. Unfortunately, making the first set of assertions isn't enough to guide the solver towards proving the assumption within a reasonable amount of time.
1 parent e836ee4 commit aac6714

File tree

3 files changed

+407
-1
lines changed

3 files changed

+407
-1
lines changed

bench/formal/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ TESTS := mor1kx_cache_lru \
2929
mor1kx_bus_if_wb32 \
3030
pfpu32_addsub \
3131
pfpu32_cmp \
32+
pfpu32_muldiv_check \
3233
pfpu32_muldiv
3334

3435
# tests that no longer work keep them here so we can easily

bench/formal/pfpu32_muldiv_check.sby

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[options]
2+
mode prove
3+
depth 20
4+
5+
[engines]
6+
smtbmc yices
7+
8+
[script]
9+
read -formal f_multiclock_pfpu32_op.v
10+
read -formal -D PFPU32_MULDIV -D PFPU32_CHECK_MUL_ASSUMPTIONS pfpu32_muldiv.v
11+
12+
13+
prep -top pfpu32_muldiv
14+
15+
[files]
16+
f_multiclock_pfpu32_op.v
17+
../../rtl/verilog/pfpu32/pfpu32_muldiv.v
18+
../../rtl/verilog/mor1kx-defines.v
19+
../../rtl/verilog/mor1kx-sprs.v

0 commit comments

Comments
 (0)