m-labs / nmigen

A refreshed Python toolbox for building complex digital hardware. See https://gitlab.com/nmigen/nmigen
https://nmigen.org
Other
646 stars 55 forks source link

Usability? Can we warn if a Statement is never assigned to a domain? #303

Closed RobertBaruch closed 4 years ago

RobertBaruch commented 4 years ago

All too often I've been charging ahead writing formal assertions, and I forget to put one in a domain, writing:

Assert(...)

instead of

m.d.comb += Assert(...)

This sort of thing is silently ignored, so I go on merrily believing my formal verification worked, when in fact I simply never verified certain assertions.

If anything, this is especially nasty for Asserts, Assumes, and Covers that do not get added to a domain. Can there at least be a warning there? Is it possible?

whitequark commented 4 years ago

Absolutely possible, and we should do this. We already do this for Elaboratables.

whitequark commented 4 years ago

Fixed in my fork.