[otbn] Fix wrapping for grs1 increment with bn.lid/bn.sid
[otbn] Fix wrapping for grs1 increment with bn.lid/bn.sid

Because grs1 has a 14-bit signed immediate added to it, we can have a
valid address even when grs1 is really big. For example, suppose that
x21 is 0x1000 in

    bn.lid   x10, -2144(x21++)

Then we should write x21 = 0x1020 (rather than the 0x20 that we were
writing).

Similarly, if x21 is 0xffffffc0 (2^32 - 64) then

    bn.lid   x10, 64(x21++)

loads from the valid address of 0 and should increment x21 to
0xffffffe0.

Getting this right implies a 27-bit adder, plus extra muxing for the
top bits of increment_out. To avoid that, we could e.g. change the
spec to only operate on the lower 16 bits of the base address (which
would then need an 11-bit adder and no muxing on most of the upper
bits: much more manageable!)

Signed-off-by: Rupert Swarbrick <290093e2ad2515ed2f14d749293c8cf8e02ca274@lowrisc.org>

lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan