hdl.ast: implement Initial.
This is the last remaining part for first-class formal support.
This commit is contained in:
parent
40abaef858
commit
ed7e07c6c1
8 changed files with 68 additions and 16 deletions
|
|
@ -181,9 +181,7 @@ class SyncFIFO(Elaboratable, FIFOInterface):
|
|||
|
||||
if platform == "formal":
|
||||
# TODO: move this logic to SymbiYosys
|
||||
initstate = Signal()
|
||||
m.submodules += Instance("$initstate", o_Y=initstate)
|
||||
with m.If(initstate):
|
||||
with m.If(Initial()):
|
||||
m.d.comb += [
|
||||
Assume(produce < self.depth),
|
||||
Assume(consume < self.depth),
|
||||
|
|
@ -351,10 +349,7 @@ class AsyncFIFO(Elaboratable, FIFOInterface):
|
|||
]
|
||||
|
||||
if platform == "formal":
|
||||
# TODO: move this logic elsewhere
|
||||
initstate = Signal()
|
||||
m.submodules += Instance("$initstate", o_Y=initstate)
|
||||
with m.If(initstate):
|
||||
with m.If(Initial()):
|
||||
m.d.comb += Assume(produce_w_gry == (produce_w_bin ^ produce_w_bin[1:]))
|
||||
m.d.comb += Assume(consume_r_gry == (consume_r_bin ^ consume_r_bin[1:]))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue