-
Notifications
You must be signed in to change notification settings - Fork 164
Add annotateReg
#3091
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
base: master
Are you sure you want to change the base?
Add annotateReg
#3091
Conversation
4b22325 to
d74e388
Compare
martijnbastiaan
left a comment
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.
Cool! Could you open an issue saying termToData should (perhaps) use the evaluator?
| go decls (Attributes ty attrs0:ticks) = do | ||
| tcm <- Lens.view tcCache | ||
| case coreView tcm ty of |
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.
Could you please add a comment why you're doing this whole block?
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.
I've added some comments, let me know whether you want me to elaborate it even further
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.
LGTM!
d74e388 to
1194408
Compare
a function to add synthesis attributes (e.g. `ASYNC_REG`) to register declarations in the HDL generated by the Clash compiler.
1194408 to
bd4aed8
Compare
A function to add synthesis attributes (e.g.
ASYNC_REG) to register declarations in the HDL generated by the Clash compiler.The implementation extends the information you can carry around in a
Tick. This made it possible to add attributes to the assigned result of any declaration primitive, which includesregister,delayanddflipflop. It means we didn't have to add any logic to these primitives nor hard-code a list of primitives for which this annotation mechanism works. It also avoid the fragility of the type synonym based approach.