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
Describe the Bug:
In NutShell's implementation of the RISC-V ISA, the amomin.w instruction behaves incorrectly under certain conditions. Specifically, when executing an instruction like amomin.w a2, t1, (a7), if the value in t1 is less than the value at the address contained in a7, the expected behavior is to store the value of t1 at the address pointed to by a7. However, it has been observed that NutShell fails to perform this memory update operation. Subsequent load operations, such as lw a3, 0(a7), confirm that the memory at (a7) retains its old value, indicating that the minimum value was not stored as expected. This behavior contrasts with Spike's correct handling of the same instruction sequence.
To Reproduce:
Set up an environment where t1< (value at address a7).
Execute amomin.w a2, t1, (a7).
Follow with lw a3, 0(a7) to load the value from (a7) into a3.
Observe that a3 contains the old value from (a7), indicating that amomin.w did not update the memory with the minimum value.
Expected Behavior:
The amomin.w instruction should atomically load the value from the address contained in rs1, compare it with the value in rs2 (in this case, t1), and write the smaller of the two values back to the memory address in rs1 (here, (a7)). This process ensures atomic read-modify-write operations crucial for multiprocessor synchronization. Upon executing lw a3, 0(a7) after amomin.w a2, t1, (a7), a3 should contain the new, smaller value, reflecting the successful memory update by amomin.w.
Screenshots
Additional context
None
The text was updated successfully, but these errors were encountered:
Describe the Bug:
In NutShell's implementation of the RISC-V ISA, the amomin.w instruction behaves incorrectly under certain conditions. Specifically, when executing an instruction like
amomin.w a2, t1, (a7)
, if the value int1
is less than the value at the address contained ina7
, the expected behavior is to store the value oft1
at the address pointed to bya7
. However, it has been observed that NutShell fails to perform this memory update operation. Subsequent load operations, such aslw a3, 0(a7)
, confirm that the memory at(a7)
retains its old value, indicating that the minimum value was not stored as expected. This behavior contrasts with Spike's correct handling of the same instruction sequence.To Reproduce:
t1
< (value at addressa7
).amomin.w a2, t1, (a7)
.lw a3, 0(a7)
to load the value from(a7)
intoa3
.a3
contains the old value from(a7)
, indicating thatamomin.w
did not update the memory with the minimum value.Expected Behavior:
The
amomin.w
instruction should atomically load the value from the address contained inrs1
, compare it with the value inrs2
(in this case,t1
), and write the smaller of the two values back to the memory address inrs1
(here,(a7)
). This process ensures atomic read-modify-write operations crucial for multiprocessor synchronization. Upon executinglw a3, 0(a7)
afteramomin.w a2, t1, (a7)
,a3
should contain the new, smaller value, reflecting the successful memory update by amomin.w.Screenshots
Additional context
None
The text was updated successfully, but these errors were encountered: