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

Strange performance counters after following Simple System guide #2101

Closed
noas1019 opened this issue Nov 17, 2023 · 1 comment · Fixed by #2102 or #2105
Closed

Strange performance counters after following Simple System guide #2101

noas1019 opened this issue Nov 17, 2023 · 1 comment · Fixed by #2102 or #2105
Labels
Type:Question Questions

Comments

@noas1019
Copy link

Hi, I closely followed the guide in https://github.com/lowRISC/ibex/blob/master/examples/simple_system/README.md to try and simulate Ibex to run some tests, but I get strange results from the performance counters no matter the test used (everything but cycles and instructions retired is 0). I've attached the results of hello_test and dit_test respectively, can someone point me to where the simulation is going wrong?
hello_test
dit_test

My Environment

I'm running Ibex in Visual Studio Code using an Ubuntu wsl terminal. All the pre-requisites in the simple_system guide were installed (along with RISC-V toolchain from https://github.com/lowRISC/lowrisc-toolchains/releases/tag/20230811-1), and the commands to build the simulation + software and run them are straight from the guide.

EDA tool and version:

N/A

Operating system:

Ubuntu 22.04.2 LTS

Version of the Ibex source code:

7aec140

@noas1019 noas1019 added the Type:Question Questions label Nov 17, 2023
@noas1019 noas1019 changed the title Ask a question related to Ibex Strange performance counters after following Simple System guide Nov 17, 2023
@rswarbrick
Copy link
Contributor

rswarbrick commented Nov 20, 2023

Hmm, this is a bug in our simple system guide. Kind of! The reason we're getting zeroes here is that the default configuration that you're picking has no performance counters. Unsurprisingly, this means that the counter numbers that are reported at the end of the simulation are all zero.

Fixes that we need to do:

  1. Update the simple system documentation to use ibex_config.py. Something like this should work: fusesoc --cores-root=. run --target=sim --setup --build lowrisc:ibex:ibex_simple_system $(util/ibex_config.py opentitan fusesoc_opts)
  2. Update the simple system wrapper C++ code to not report numbers that it doesn't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Question Questions
Projects
None yet
2 participants