-
Notifications
You must be signed in to change notification settings - Fork 19
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
Write chiplet module constraints in AirScript #253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Overcastan! This looks correct, but I think we can actually do something much simpler, as I proposed inline
4a479d8
to
426330e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all looks correct now @Overcastan - I would just simplify a bit more and do some minor renaming as noted inline
constraints/miden-vm/chiplets.air
Outdated
hash_chiplet([s[1], s[2], chip_columns]) when !s[0] | ||
bitwise_chiplet([s[2], chip_columns]) when s[0] & !s[1] | ||
memory_chiplet([chip_columns]) when s[0] & s[1] & !s[2]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be chiplet_columns
rather than chip_columns
.
Also, I think this is simple enough now that we can just move this to the main chiplets
evaluator and remove this helper evaluator
constraints/miden-vm/chiplets.air
Outdated
|
||
ev chiplets_constraints(main: [s[3], chiplet_columns[15]]): | ||
enf chiplet_selector_constraints([s]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would remove this empty line
constraints/miden-vm/chiplets.air
Outdated
### Chiplets Constraints ########################################################################## | ||
|
||
ev chiplets_constraints(main: [s[3], chiplet_columns[15]]): | ||
enf chiplet_selector_constraints([s]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would do a bit of renaming for more consistency with our other files
chiplet_selector_constraints
->chiplet_selectors
chiplet_constraints
-> deletedchiplets_constraints
->chiplets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Overcastan, there's an error I just noticed, otherwise this is nearly ready.
constraints/miden-vm/chiplets.air
Outdated
|
||
### Chiplets Constraints ########################################################################## | ||
|
||
ev chiplets(main: [s[3], chiplet_columns[15]]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it would be good to have a comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Addressing: #201
This PR adds constraints for the chiplet module.