Skip to content

Commit d0d891a

Browse files
committed
make unroller work for constants.
Sequential circuits with constant next states make it quite awkward to assume no constants are passed to unroll.At. This commit checks for that.
1 parent 00a0388 commit d0d891a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

logic/unroll.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ func (u *Unroll) At(m z.Lit, d int) z.Lit {
5858
res = u.dmap[v][d]
5959
goto Done
6060
}
61+
if v == 1 {
62+
if m.IsPos() {
63+
res = u.C.T
64+
} else {
65+
res = u.C.F
66+
}
67+
goto Done
68+
}
6169
n = u.S.nodes[v]
6270
if n.b == z.LitNull {
6371
// input

0 commit comments

Comments
 (0)