You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store conditional speculative failures currently can happen as soon as a SC is executed:
function clause execute (STORECON(aq, rl, rs2, rs1, width, rd)) = {
if speculate_conditional () == false then {
/* should only happen in rmem
* rmem: allow SC to fail very early
*/
X(rd) = zero_extend(0b1); RETIRE_SUCCESS
But that doesn't seem quite right. A real design is always going to check alignment and probably do address translation before the SC has a chance to fail in this way (especially after we change the reservation to use physical addresses - see #360).
After #360 is done I believe the fix is to change this:
if match_reservation(vaddr) == false then {
/* cannot happen in rmem */
X(rd) = zero_extend(0b1); cancel_reservation(); RETIRE_SUCCESS
} else {
to this
if not(speculate_conditional()) | not(match_reservation(addr)) then {
// Spurious failure (this is allowed), or the reservation
// address does not match.
X(rd) = zero_extend(0b1); RETIRE_SUCCESS
} else {
We have been using the code like this to inject spurious SC failures (when it fails when it could have succeeded) into the Sail model for months and it is working perfectly.
I'm not at all familiar with what rmem requires, so we might want to double check with those guys if this is going to break their stuff.
The text was updated successfully, but these errors were encountered:
Store conditional speculative failures currently can happen as soon as a SC is executed:
But that doesn't seem quite right. A real design is always going to check alignment and probably do address translation before the SC has a chance to fail in this way (especially after we change the reservation to use physical addresses - see #360).
After #360 is done I believe the fix is to change this:
to this
We have been using the code like this to inject spurious SC failures (when it fails when it could have succeeded) into the Sail model for months and it is working perfectly.
I'm not at all familiar with what rmem requires, so we might want to double check with those guys if this is going to break their stuff.
The text was updated successfully, but these errors were encountered: