Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The least-significant bit of JALR target address should be set to zero #1

Closed
colin4124 opened this issue Apr 22, 2016 · 1 comment
Closed

Comments

@colin4124
Copy link

The The RISC-V Instruction Set Manual: Volume I Version 2.0 Page 15, 2.5 Control Transfer Instructions writes that:

The indirect jump instruction JALR (jump and link register) uses the I-type encoding. The target
address is obtained by adding the 12-bit signed I-immediate to the register rs1, then setting the
least-significant bit of the result to zero.

I found id_stage.sv line 433:

`JT_JALR: jump_target = regfile_data_ra_id + imm_i_type;

It does not set the least-significant bit of the result to zero.

Maybe you does it but I have found that ?

@atraber
Copy link
Contributor

atraber commented Apr 29, 2016

You are correct, we definitely missed that.
Luckily the compiler has never issued any instructions that would have had the LSB set, so we never noticed.

We have fixed this issue internally and will push it to github soon.

Good catch! thanks a lot

@atraber atraber closed this as completed Apr 29, 2016
MikeOpenHWGroup pushed a commit to MikeOpenHWGroup/cv32e40p that referenced this issue Aug 27, 2020
…igner_rvc_if

Moved Aligner and RVC to IF stage
micprog pushed a commit to micprog/cv32e40p that referenced this issue Feb 10, 2021
Update tech_cells_generic dep, add fpnew dep
pascalgouedo pushed a commit that referenced this issue Feb 28, 2024
jstraus59 referenced this issue Mar 12, 2024
* Signed-off-by: Pascal Gouedo <pascal.gouedo@dolphin.fr>

* Added clipr/clipur note about rs2.

Signed-off-by: Pascal Gouedo <pascal.gouedo@dolphin.fr>

---------

Signed-off-by: Pascal Gouedo <pascal.gouedo@dolphin.fr>
rohan-10xe added a commit to rohan-10xe/cv32e40p-mod that referenced this issue May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants