Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for [lsb+:width] slices #4917

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChrisDodd
Copy link
Contributor

Initial support for Verilog-style [lsb+:width] slices, allowing variable index slices with a constant width.

Most backends will probably require that these be strength-reduced to constant (normal) indexes, which will happen with eg. unrolled loops where the index depends on the loop index.

@ChrisDodd ChrisDodd force-pushed the cdodd-slice branch 2 times, most recently from 4a72192 to 422673f Compare September 17, 2024 01:34
@fruffy fruffy added the p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/). label Sep 17, 2024
@ChrisDodd ChrisDodd force-pushed the cdodd-slice branch 5 times, most recently from 379c843 to 7ad797d Compare September 20, 2024 01:48
- allows for non-const lsb slices (width must still be const)

Signed-off-by: Chris Dodd <cdodd@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants