import unittest
from nmigen import Signal, Module
-from nmigen.hdl.ast import Cover, Const
+from nmigen.hdl.ast import Cover, Const, Assume
from nmutil.formaltest import FHDLTestCase
from nmutil.singlepipe import ControlBase
extra = Const(0, 1)
m.d.sync += cnt.eq(cnt + (do_issue & (dut.rdmaskn[i] | extra)))
cnt_masked_read.append(cnt)
+ # If the ALU is idle, do not assert valid
+ with m.If(cnt_alu_read == cnt_alu_write):
+ m.d.comb += Assume(~alu.n.o_valid)
# Ask the formal engine to give an example
m.d.comb += Cover((cnt_issue == 2)