Closed smunaut closed 2 days ago
I apologize for taking half a year to get around to this---It was posted with very unfortunate timing and dropped completely off my radar.
I don't see any particular issue with your patch. It seems solid enough that if the left-hand side is undefined, then it must be an as-yet undeclared node that needs to be created.
I'm not 100% sure from the LRM but when cross-checking the vehavior of a couple of verilog parsers, the LHS of an
assign
statement doesn't have to be pre-declared using awire
statement. That doesn't work for the bracket notation.So :
is valid, but
is not for instance.
Currently
netgen
doesn't accept that. See included reproducer that ends up with 'pin matching failed'.netgen_bug.tar.gz
I'll open a PR with a proposed fix that basically creates the node as needed. I'm not 100% sure it's the correct fix, but it seems to fix this particular reproducer, but please double check it's actually the right thing to do.