Special detection of name clashes involving generate block names.
Here we are trying to defend against NOT OK things such as:
wire foo; if (version == 1) begin : foo ... end
Note that the above is NOT OK even if
For everything else, our nameclash handling basically works as follows. For any arbitrary scope, check for name clashes by:
This works for almost everything (wire names, module instance names, port
names, etc.), but our scopeitem-alist building code only collects the names
from top-level named genblocks and genarrays. This makes perfect sense in
post-elaboration contexts where any conditional generates have been eliminated,
but it isn't right for us here because it doesn't get things like
That's actually good. It's needs to be OK to have things like this:
if (version == 1) begin : foo ... end else if (version == 2) begin : foo <--- no name clash with foo from above ... end
So if scopeitem-alist collection was ``smarter'' and somehow dived down into
the if/else blocks, we might think that there was a name clash for
Anyway, our goal here is basically to augment the scopeitem-alist that we would normally produce with a supplemental scopeitem alist that accounts for the named blocks within any if/case/loop generate constructs.