-
Notifications
You must be signed in to change notification settings - Fork 44
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
Parity Implementation (with preferably per-register storage, not per-field) #35
Comments
Checked the spec - seems pretty straightforward to implement |
One caveat - implementing a parity-bit per register rather than per-field can potentially result in a functional safety hazard which results in the parity calculation to fail. Consider a register contains two fields (fields
For this reason, I'm not sure sharing a parity bit across multiple fields is always going to be possible. It may be possible in some situations - if fields are not writable by hardware, or are guaranteed to always be updated together. |
You can work around this by making the update incremental by using the fact that parities are linear.
Case 1 will create a false positive parity error after the update finishes The issue with this is that you need individual XOR trees for each field anyways, so why not also spend the additional flop to store the parity information in the first place. |
However, I have a more general question regarding the parity feature. From quickly checking the spec it looks as if the mechanism behind the parity is left to the implementer. How would the RTL/HW side of this mechanism look like? Will there be one |
From the spec, 9.10-c-4 states:
This implies that there is a single |
And good point @philipaxer regarding the incremental mechanism. That is surely a possibility. Also agree that the added complexity doesn't really seem worth it - may as well just implement a parity storage FF for each field. |
Great discussion! @philipaxer I think you've just found a bug in my implementation...:) (I've implemented parity on our existing in-house register toolchain). Makes sense that for registers where not all fields can be guaranteed to be updated together (e.g. HW writable) to have per-field parity. Much simpler. @philipaxer not sure I follow your logic about the WA/incremental flow, still thinking about it. However in our design which is a huge ASIC, only a few percent of registers are hw-writable (most are sw=rw hw=r). |
Hi, Just FYI, I'm' now starting to implement parity. I'll try to implement it "on top of" the repo's which I've forked, which add support for limited Parametrization. One thing though; the spec says that 'paritycheck' applies to a field component only. Is there a way to elegantly propagate downward a UDP ? I've defined UDP as such: how can I auto-attach it to all addrmap/regfile/reg instances/components and have the addrmap's udp value propagate downward to the regfile? |
Sounds great! Regarding
It will automatically bind that assignment to all field definitions within the same lexical scope. |
I'll try.. Sadly I need a pilot that delivers both features (parametrization and parity) .. so they kinda have to be on top of each other. BTW it's going really well really fast, I'm starting to know my way around the code I guess. Also parity is sort of "more of the same" being a copy/paste/modify of the original register/field logic and doing something that lives in parallel to the existing code. So it turns out quite easy. Thanks allot for the tip! regarding paritycheck. I love how SystemRDL is structured and generic and allows this! Will post my changes, thanks for your support! |
I've just now pushed an initial parity implementation. Would you like me to port those changes as a branch of the original 2 projects, or fork the projects to *-Parity and implement there? |
Implemented. Will be in the next release. @galaviel I ended up taking a slightly different approach than you, but your implementation was a good reference so thanks for sharing it! |
Awesome! |
A feature which is a must for us (functional safety) is to protect the contents of the register file/storage with parity... I see that currently it is not supported (adding 'paritycheck;'
In addition, for efficiency (less storage) it would be great to implement only 1 parity bit per register (and not 1 bit per field).
whenever any of the register fields (that have parity) change, either from the HW (hw=w) or SW side, parity should be re-calculated.
The text was updated successfully, but these errors were encountered: