hdl.xfrm: mark internal registers used in lowering Sample().
This commit is contained in:
parent
94b23dd2c8
commit
c5d67b0461
3 changed files with 4 additions and 7 deletions
|
|
@ -78,17 +78,13 @@ class FIFOContract:
|
|||
with m.If((read_1 == entry_1) & (read_2 == entry_2)):
|
||||
m.next = "DONE"
|
||||
|
||||
cycle = Signal(max=self.bound + 1, reset=1)
|
||||
m.d.sync += cycle.eq(cycle + 1)
|
||||
with m.If(cycle == self.bound):
|
||||
m.d.comb += Assert(read_fsm.ongoing("DONE"))
|
||||
|
||||
initstate = Signal()
|
||||
m.submodules += Instance("$initstate", o_Y=initstate)
|
||||
with m.If(initstate):
|
||||
m.d.comb += Assume(write_fsm.ongoing("WRITE-1"))
|
||||
m.d.comb += Assume(read_fsm.ongoing("READ"))
|
||||
m.d.comb += Assume(cycle == 1)
|
||||
with m.If(Past(initstate, self.bound - 1)):
|
||||
m.d.comb += Assert(read_fsm.ongoing("DONE"))
|
||||
|
||||
return m.lower(platform)
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class FHDLTestCase(unittest.TestCase):
|
|||
|
||||
if mode == "hybrid":
|
||||
# A mix of BMC and k-induction, as per personal communication with Clifford Wolf.
|
||||
script = "setattr -unset init w:*"
|
||||
script = "setattr -unset init w:* a:nmigen.sample_reg %d"
|
||||
mode = "bmc"
|
||||
else:
|
||||
script = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue