microsoft / cheriot-ibex

cheriot-ibex is a RTL implementation of CHERIoT ISA based on LowRISC's Ibex core.
Apache License 2.0
73 stars 14 forks source link

pmode active-low? #23

Closed alda-tuk closed 6 months ago

alda-tuk commented 6 months ago

Hi,

according to the README, section "Backward compatibility", I understand that setting the cheri_pmode_i input to '1' enables backward compatibility, i.e., all CHERIoT features are disabled.

However, in the calculation of rv32_lsu_err, this input is used in logical conjunction with address bound and permission violations. Essentially, if cheri_pmode_i is '0', it prevents the error from being raised.

Is cheri_pmode_i active-low, i.e., is the backward compatibility mode enabled with cheri_pmode_i = 0, contrary to the README/documentation?

Thank you and best regards,

Anna

marnovandermaas commented 6 months ago

Hi Anna, yes pmode stands for protection mode. It means that when pmode is set to 1 the capability checks are enabled. So backward compatibility mode should set it to 0. This should be updated in the README. Would you like make this change in a pull request?

alda-tuk commented 6 months ago

Thanks for the confirmation. I created a pull request.

marnovandermaas commented 6 months ago

Thanks for the fix, this issue can now be closed.