Currently ModDef::add_port errors out if there is already a port with the same name. We could consider allowing add_port to return the existing port instead, if the IO definition is the same. This could either be the default behavior of add_port, or there could be an add_port variant with this behavior.
Reported by @twabbott-openai
Currently
ModDef::add_porterrors out if there is already a port with the same name. We could consider allowingadd_portto return the existing port instead, if theIOdefinition is the same. This could either be the default behavior ofadd_port, or there could be anadd_portvariant with this behavior.Reported by @twabbott-openai