[otbn] fix increment for BN.SID and BN.LID
The read/write pointer has to be incremented
by 32 when accessing dmem in order to address
full 256-bit dmem cells.
Signed-off-by: Felix Miller <felix.miller@gi-de.com>
diff --git a/hw/ip/otbn/dv/otbnsim/sim/insn.py b/hw/ip/otbn/dv/otbnsim/sim/insn.py
index 6b9ce2f..eb780f3 100644
--- a/hw/ip/otbn/dv/otbnsim/sim/insn.py
+++ b/hw/ip/otbn/dv/otbnsim/sim/insn.py
@@ -796,7 +796,7 @@
state.gprs.get_reg(self.grd).write_unsigned(new_grd_val)
if self.grs1_inc:
- new_grs1_val = (grs1_val + 1) & ((1 << 32) - 1)
+ new_grs1_val = (grs1_val + 32) & ((1 << 32) - 1)
state.gprs.get_reg(self.grs1).write_unsigned(new_grs1_val)
@@ -822,7 +822,7 @@
state.dmem.store_u256(addr, wrs_val)
if self.grs1_inc:
- new_grs1_val = (grs1_val + 1) & ((1 << 32) - 1)
+ new_grs1_val = (grs1_val + 32) & ((1 << 32) - 1)
state.gprs.get_reg(self.grs1).write_unsigned(new_grs1_val)
if self.grs2_inc: