Skip to content

Verilog: use scope stack for lookup#1809

Merged
tautschnig merged 1 commit intomainfrom
verilog-scope-stack
Apr 22, 2026
Merged

Verilog: use scope stack for lookup#1809
tautschnig merged 1 commit intomainfrom
verilog-scope-stack

Conversation

@kroening
Copy link
Copy Markdown
Collaborator

This changes the identifier lookup to use the scope stack instead of the parent pointer chain.

The ordering of the scopes used for Verilog identifier lookup does not necessarily match the parent child ordering. As an example, modules are in the "definition" or root scope, visible across compilation unit, but identifiers in the compilation unit scope in which the module is defined are nevertheless visible in the module.

This changes the identifier lookup to use the scope stack instead of the
parent pointer chain.

The ordering of the scopes used for Verilog identifier lookup does not
necessarily match the parent child ordering.  As an example, modules are in
the "definition" or root scope, visible across compilation unit, but
identifiers in the compilation unit scope in which the module is defined are
nevertheless visible in the module.
@kroening kroening force-pushed the verilog-scope-stack branch from d1578a0 to ea15de7 Compare April 17, 2026 22:31
@kroening kroening marked this pull request as ready for review April 17, 2026 22:32
@tautschnig tautschnig merged commit f533877 into main Apr 22, 2026
11 checks passed
@tautschnig tautschnig deleted the verilog-scope-stack branch April 22, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants