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

Raising an error for unauthorized read or write #76

Open
imerkado91 opened this issue Dec 11, 2023 · 6 comments
Open

Raising an error for unauthorized read or write #76

imerkado91 opened this issue Dec 11, 2023 · 6 comments
Labels
feature request New feature or request

Comments

@imerkado91
Copy link

Is it possible to add an indication for unauthorized read/write (or maybe it already exists and I missed it...)

For example, let's say that a field/reg is defined as sw=w, but the SW is trying to read this field/reg, we would like to see an indication/error assertion for it (and the other way around with sw=r when it tries to write).
is it supported? Is there a way to add this?

@amykyta3 amykyta3 added the feature request New feature or request label Jan 6, 2024
@amykyta3
Copy link
Member

amykyta3 commented Jan 12, 2024

Currently not supported, but it is something I was considering adding eventually.

There would be some limitations with this - like only issuing an error if a write occurred on a register that contains only read-only fields, and vice-versa. SystemRDL lets you define registers that have mixed-type fields so it would not be possible to assert this error on a per-field basis.

@NajamKhalil
Copy link

Will you kindly share the list of condition on which this error may get asserted so that in case some one try to implement this at there end it would be easy for them.If i am not the AMBA APB specs says this error assertion is not necessary as per specs,"Completers are not required to support PSLVERR. Where a Completer does not include PSLVERR, the appropriate input to the Requester is tied LOW."And you are doing the same thing by assigning it to zero.

@amykyta3
Copy link
Member

Yes currently it is tied to a constant zero.

@NajamKhalil
Copy link

Any idea about the list of conditions on which this error may get asserted.?
Since i am unable to find it on the specs of AMBA apb protocol handbook.

@amykyta3
Copy link
Member

AMBA does not specify this. It is up to the implementation of a register file device to decide.
A PSLVERR may be due to accessing an address without an assigned register, or writing a register that is read-only, or vice-versa. It really depends on what requirements a particular project needs and what is appropriate.
For PeakRDL, if implemented, I would make it configurable.

@NajamKhalil
Copy link

Got it.
Thanks for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Development

No branches or pull requests

3 participants