Erik Pohle,
Technical University of Munich, in a project for computer science chair "Computer Technology and Computer Organization"
https://github.com/TUM-LRR/era-gp-sim
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/1484904455132.46875%40tum.de.
Thank you guys for your quick responses!
We had indeed a similar "workaround" which also involved adding 1 to the lui part if necessary. We were wondering if there might be a simpler solution but now with your confirmation we'll implement it.
Thanks again for your help.
Sincerely,
Erik
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAFAcib9vKVXn%3DXyNnZ8hWxcR0njY-y4Ha4u1%2BDgXGB-KGNQrHQ%40mail.gmail.com.
On 21 Jan 2017, at 5:25 AM, Bruce Hoult <br...@hoult.org> wrote:
It *should* be obvious, but It would not hurt!Maybe something like:Because the offsets for load/store and JALR are signed 12 bit with a -2048 to +2047 range, the value calculated by a preceding LUI or AUIPC should be to the closest multiple of 4 KB, whether higher or lower than the target address.e.g. for target address thi(t) = ((t+0x800) & ~0xfff) >> 12; // the & is redundant because of the shiftlo(t) = t & 0xfff;For a PC-relative address t should be the difference between the actual target and the instruction following the load/store or branch instruction.
(I'm not 100% sure of the last sentence. The documentation is also not clear on exactly what value of the PC is used — the current instruction or the next instruction)
On Fri, Jan 20, 2017 at 6:58 PM, Josh Bleecher Snyder <josh...@gmail.com> wrote:> As Stefan, says, adding 1 to the high twenty bits if bit 11 is 1 is
> sufficient. e.g. ((Val+0x800) >> 12) & 0xfffff.
This comes up a lot. I wonder whether it's worth a well-placed
sentence in the spec.
-josh
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAFAcib9vKVXn%3DXyNnZ8hWxcR0njY-y4Ha4u1%2BDgXGB-KGNQrHQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAMU%2BEkx_XiEVHy_VO1X4we7FyY1c1_QgH8FtsNOctAMHNT4iCQ%40mail.gmail.com.