This improves the addPassthrough logic to avoid forcing the inlining of
a generated mantle wire if the wire is driving an instance input and has
multiple drivers. In the case of multiple drivers of an instance input,
this will generate a concat node in verilog, and we would like to avoid
having concat expressions in instance input statements.
We avoid having weird _$_U names by instead generating the mantle wire
name based on the instance name + port name (generated from the select
path). We add some safety logic to ensure it's a unique name to avoid
name conflicts with existing instances.
Follow up to https://github.com/rdaly525/coreir/pull/948 to handle the concat node case.
This improves the addPassthrough logic to avoid forcing the inlining of a generated mantle wire if the wire is driving an instance input and has multiple drivers. In the case of multiple drivers of an instance input, this will generate a concat node in verilog, and we would like to avoid having concat expressions in instance input statements.
We avoid having weird _$_U names by instead generating the mantle wire name based on the instance name + port name (generated from the select path). We add some safety logic to ensure it's a unique name to avoid name conflicts with existing instances.