PeakRDL-regblock icon indicating copy to clipboard operation
PeakRDL-regblock copied to clipboard

Raising an error for unauthorized read or write

Open imerkado91 opened this issue 1 year ago • 6 comments

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?

imerkado91 avatar Dec 11 '23 09:12 imerkado91

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.

amykyta3 avatar Jan 12 '24 06:01 amykyta3

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.

NajamKhalil avatar Jan 22 '24 04:01 NajamKhalil

Yes currently it is tied to a constant zero.

amykyta3 avatar Jan 22 '24 05:01 amykyta3

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.

NajamKhalil avatar Jan 22 '24 05:01 NajamKhalil

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.

amykyta3 avatar Jan 22 '24 05:01 amykyta3

Got it. Thanks for your support.

NajamKhalil avatar Jan 22 '24 09:01 NajamKhalil