Skip to content

Support const grant-once operations#309

Open
guosran wants to merge 2 commits into
tancheng:masterfrom
guosran:fix/grant-once-const-rtl
Open

Support const grant-once operations#309
guosran wants to merge 2 commits into
tancheng:masterfrom
guosran:fix/grant-once-const-rtl

Conversation

@guosran

@guosran guosran commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses #292 with minimized GRANT_ONCE_CONST support. This PR updates GrantRTL.py plus shared opcode definitions in lib/opt_type.py.

Changes

  • Add const-input support for grant-once operations.
  • Track grant-once state per control-memory slot so independent control slots do not share state.
  • Add the required shared const opcode entry.

Validation

Part of the master-based small conv passing set.

@guosran guosran force-pushed the fix/grant-once-const-rtl branch from a9e92c0 to ce8b992 Compare June 25, 2026 19:46
@guosran guosran marked this pull request as draft June 25, 2026 20:04
@guosran

guosran commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

Grant-once with a const threshold should grant only the first matching event.

input stream: 0, 1, 1, 1
const condition: grant when input == 1

Expected output grant:
0, 1, 0, 0

@guosran guosran marked this pull request as ready for review June 26, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant