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

Unexpected impact of PerformanceInMips parameter #553

Open
notsleep196 opened this issue Nov 21, 2023 · 0 comments
Open

Unexpected impact of PerformanceInMips parameter #553

notsleep196 opened this issue Nov 21, 2023 · 0 comments

Comments

@notsleep196
Copy link

notsleep196 commented Nov 21, 2023

Hello!

I'm new to renode and i'm trying to understand how to control the performance and time flow of simulation. Sorry if this issue duplicates any of existing issues, but after reading this, this and some other issues it's still not clear.

Description

I'm trying to understand frequency and performance configuration using very simple firmware (example from platformio).
I see that blinking of the LED on stm32f4-discovery board works as expected. HAL_Delay(1000) gives delay of 1 second.

When I use renode to emulate the same firmware. If I use stm32f4.repl file without anyy changes, I see that HAL_Delay(1000) gives delay less that 1 second.

From documentation and issues I understood that main parameters that control the time of execution are:

  1. PerformanceInMips
  2. systickFrequency

So i have questions about both of parameters:

  1. Does systickFrequency mean frequency of microcontroller (168 MHz for my situation)? This question caused by information that systick timer gives a reference time base of 1 ms. So for microcontroller with CPU freq 168 MHz it should be 168/8=21 MHz, but, by default, for stm32f4 it is set to 72 MHz.
  2. Why increasing of PerformanceInMips makes execution slower? It is unexpected that more "powerful" CPU (with bigger value of MIPS) works slower and HAL_Delay(1000) can give delay bigger than 1 second. And if i set smaller value of PerformanceInMips parameter the execution becomes faster.

Looking forward for your reply!

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

1 participant