Hdl21
Hdl21 copied to clipboard
Allow zero-arg `h.generator`
Currently to make an argument-less Generator
, you need to actually declare a parameter and give it a type. Often h.HasNoParams
is used for the latter, like so:
@h.generator
def PmosIdac(_: h.HasNoParams) -> h.Module:
# ...
The issue: we should be able to just write
@h.generator
def PmosIdac() -> h.Module: # <= here
# ...
We do enough inspection of the Generator
call-signature already, and lots of tuning when we invoke them during elaboration. This should be a pretty straightforward case to add.