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

[BUG] Return address prediction failed #2620

Open
1 task done
AEzzejjari opened this issue Nov 20, 2024 · 2 comments
Open
1 task done

[BUG] Return address prediction failed #2620

AEzzejjari opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
CV32A65X Part: Embedded configuration Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@AEzzejjari
Copy link
Member

Is there an existing CVA6 bug for this?

  • I have searched the existing bug issues

Bug Description

The PR #2607 contains a scoreboard for the frontend stage.
Using this PR and the Dhrystone test, we detected that the RAS submodule doesn't pop an address from the stack when a return instruction is triggered.
In the event of the bug occurring, the RAS stack is full, and the variable in the Frontend module connected to the RAS input pop_data is equal to 1.

@AEzzejjari AEzzejjari added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Nov 20, 2024
@JeanRochCoulon
Copy link
Contributor

Thanks for this feedback

@JeanRochCoulon JeanRochCoulon added the CV32A65X Part: Embedded configuration label Jan 2, 2025
@Gchauvon Gchauvon self-assigned this Jan 13, 2025
@Gchauvon
Copy link
Contributor

I took your branch and check for this bug. I saw some UVM errors showing a missmatch between the scoreboard implemented in the frontend agent and the RTL.

`UVM_INFO @ 672.000 ns : uvmt_cva6_firmware_test.sv(159) uvm_test_top [TEST] Started RUN
UVM_ERROR @ 42912.000 ns : uvme_cva6_frontend_model.sv(844) uvm_test_top.env.sb.frontend_sb.frontend_model [uvme_cva6_frontend_model_c] ERROR -> the frontend sent wrong kill_s2
UVM_ERROR @ 42912.000 ns : uvme_cva6_frontend_model.sv(846) uvm_test_top.env.sb.frontend_sb.frontend_model [uvme_cva6_frontend_model_c] ERROR -> the frontend sent wrong npc, 0x80003410 != 0x8000553e, npc: 0x80003418, next_predicted_address: 0x0
UVM_ERROR @ 42932.000 ns : uvme_cva6_frontend_model.sv(846) uvm_test_top.env.sb.frontend_sb.frontend_model [uvme_cva6_frontend_model_c] ERROR -> the frontend sent wrong npc, 0x80003418 != 0x80005540, npc: 0x80003420, next_predicted_address: 0x0
UVM_ERROR @ 42952.000 ns : uvme_cva6_frontend_model.sv(846) uvm_test_top.env.sb.frontend_sb.frontend_model [uvme_cva6_frontend_model_c] ERROR -> the frontend sent wrong npc, 0x80003420 != 0x80005548, npc: 0x80003420, next_predicted_address: 0x0
UVM_ERROR @ 42972.000 ns : uvme_cva6_frontend_model.sv(831) uvm_test_top.env.sb.frontend_sb.frontend_model [uvme_cva6_frontend_model_c] ERROR -> Wrong predicted address
UVM_ERROR @ 42972.000 ns : uvme_cva6_frontend_model.sv(846) uvm_test_top.env.sb.frontend_sb.frontend_model [uvme_cva6_frontend_model_c] ERROR -> the frontend sent wrong npc, 0x80003420 != 0x80005548, npc: 0x80003420, next_predicted_address: 0x0
UVM_ERROR @ 42992.000 ns : uvme_cva6_frontend_model.sv(829) uvm_test_top.env.sb.frontend_sb.frontend_model [uvme_cva6_frontend_model_c] ERROR -> Wrong address`

However, I didn't see any weird behaviour of the RAS or in the protocol between frontend and Icache. There was no pop or push in the RAS during those UVM errors.

Do you still have this problem ? If you do, can you give me logs, waveform and/or timing to reproduce and locate this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CV32A65X Part: Embedded configuration Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

5 participants