polarfire-soc / platform

Other
6 stars 12 forks source link

sleep_ms delays microseconds not milliseconds #18

Open keck9939 opened 6 months ago

keck9939 commented 6 months ago

mss_util.c contains a routine void sleep_ms(uint64_t msecs), which from its name and signature would imply that it will delay for the specified number of milliseconds. However, it actually seems to delay for the specified number of microseconds. Either it should be renamed, or modified so that it works in milliseconds.

This applies to the 2024.1 tag of the platform repository and effects the 2024.04 tag of the discovery-kit-reference design (and probably most of the code examples).

mallynch commented 6 months ago

Thanks for pointing out, we will fix this.