Skip to content

Verilog: modport port expressions - #1985

Draft
kroening wants to merge 1 commit into
mainfrom
kroening/modport-port-expressions
Draft

Verilog: modport port expressions#1985
kroening wants to merge 1 commit into
mainfrom
kroening/modport-port-expressions

Conversation

@kroening

@kroening kroening commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Implements IEEE 1800-2017 25.5.2 modport port expressions (input .name(expr))
  • Extends the parser to accept the modport port expression syntax
  • Creates symbols for modport port expressions during interface port instantiation, with the expression type-checked in the interface context
  • Resolves hierarchical accesses (e.g., port.upper_half) to the underlying expression at type-check time

Test plan

  • Regression test regression/verilog/interface/modport_expression1.desc changed from KNOWNBUG to CORE and passes
  • All existing Verilog regression tests pass (make -C regression/verilog test)
  • All EBMC regression tests pass (make -C regression/ebmc test)
  • All SMV regression tests pass (make -C regression/smv test)

@kroening
kroening marked this pull request as draft July 8, 2026 01:33
@kroening
kroening force-pushed the kroening/modport-port-expressions branch from 558d715 to 3821cea Compare July 8, 2026 01:36
Implements IEEE 1800-2017 25.5.2 modport port expressions, which allow
naming sub-expressions of interface signals in a modport declaration:

  modport split(input .upper_half(data[7:4]), input .lower_half(data[3:0]));

The parser is extended to accept the `direction . name ( expr )` syntax.
During interface port instantiation, the modport port expressions are
type-checked and added to the symbol table so that hierarchical access
(e.g., port.upper_half) resolves to the underlying expression.
@kroening
kroening force-pushed the kroening/modport-port-expressions branch from 3821cea to e64b1a7 Compare July 8, 2026 01:54
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.

1 participant