Hi Jose,
I revisited this thread because I need a similar feature.
I use a class based design method instead of the function approach. The class usually has only two methods: _init_() and rtl(self).
The _init_() accepts all incoming arguments but usually has options to accept unspecified output arguments (=None) . This allows for very concise ‘structural’ designs (with very little glue signals), wasn’t it for the requirement to also call the rtl() and the fact that the @block
naming is not that great.
So I have to add two extra lines; one to call the rtl() method and a second to give that rtl a ‘useful’ name.
At the time I wrote an rtlinstances() function to automate this but because of calling a lower level rtl() this method needs to be @block
decorated as well and consequently I get double redundant naming.
You can see a (now quite dated) gist on this: https://gist.github.com/josyb/d119a2f3f12dcc28533ac612e30576af
Now coming to my question: did you envision to extend the @block
with arguments? Because with arguments we could perhaps in the future when we get to hierarchical conversion add such an argument to specify/limit the hierarchy depth.
Anyway, I copied your changes over to my local branch and it seems to function fine. (needs a little more testing but it sounds very promising).
Thank you.
Best regards,
Josy