Merge pull request #1284 from smunaut/bist-overflow

fix overflow in BIST
This commit is contained in:
enjoy-digital 2022-04-27 10:08:59 +02:00 committed by GitHub
commit 665367fe67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ void sdram_bist_loop(uint32_t loop, uint32_t burst_length, uint32_t random) {
static uint32_t compute_speed_mibs(uint32_t length, uint32_t ticks) {
uint32_t speed;
//printf("(%u, %u)", length, ticks);
speed = length*(CONFIG_CLOCK_FREQUENCY/(1024*1024))/ticks;
speed = (uint64_t)length*(CONFIG_CLOCK_FREQUENCY/(1024*1024))/ticks;
return speed;
}