From fb8d5a83aac3679529d42243c95a5ff04f954275 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 12 Feb 2026 02:39:11 -0600 Subject: [PATCH] runners: Tweaked ERASE_WIDTH to prefer ERASE_SIZE over BLOCK_SIZE Mostly for consistency with other defines. In theory this better maps to BLOCK_SIZE as a logical multiple of the physical ERASE_SIZE, but the lack of subblock erasing (what would that even look like?) means this should have no affect on simulated timings. It does change the number of erases, however, in case that is useful for something. --- runners/bench_defines.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runners/bench_defines.h b/runners/bench_defines.h index 34863c37..b3c825af 100644 --- a/runners/bench_defines.h +++ b/runners/bench_defines.h @@ -90,7 +90,9 @@ BENCH_DEFINE(NOR_PROG_WIDTH, (DISK_SIM == 0) ? LFS3_MIN(256, BLOCK_SIZE) : BLOCK_SIZE ) - BENCH_DEFINE(NOR_ERASE_WIDTH, BLOCK_SIZE ) + BENCH_DEFINE(NOR_ERASE_WIDTH, (DISK_SIM == 0) + ? LFS3_MIN(ERASE_SIZE, BLOCK_SIZE) + : BLOCK_SIZE ) BENCH_DEFINE(NOR_READ_TIMING, (DISK_SIM == 0) ? 0 : 0 ) BENCH_DEFINE(NOR_PROG_TIMING, (DISK_SIM == 0) ? 1563 : 0 ) BENCH_DEFINE(NOR_ERASE_TIMING, (DISK_SIM == 0) ? 10986 : 0 ) @@ -128,7 +130,9 @@ BENCH_DEFINE(NAND_PROG_WIDTH, (DISK_SIM == 0) ? LFS3_MIN(2048, BLOCK_SIZE) : BLOCK_SIZE ) - BENCH_DEFINE(NAND_ERASE_WIDTH, BLOCK_SIZE ) + BENCH_DEFINE(NAND_ERASE_WIDTH, (DISK_SIM == 0) + ? LFS3_MIN(ERASE_SIZE, BLOCK_SIZE) + : BLOCK_SIZE ) BENCH_DEFINE(NAND_READ_TIMING, (DISK_SIM == 0) ? 12 : 0 ) BENCH_DEFINE(NAND_PROG_TIMING, (DISK_SIM == 0) ? 122 : 0 ) BENCH_DEFINE(NAND_ERASE_TIMING, (DISK_SIM == 0) ? 15 : 0 )