runners: Added optional BENCH/TEST_NAND geometry
Having BENCH/TEST_NAND ifdefs that enable the relevant timings, but _not_ the relevant geometry, is certainly a choice. Defaulting to NAND geometry when BENCH/TEST_NAND is defined is more useful, if only for minimizing confusion.
This commit is contained in:
+14
-2
@@ -4,9 +4,17 @@
|
||||
// preconfigured defines that control how benches run
|
||||
#ifdef BENCH_DEFINE
|
||||
// name value (overridable)
|
||||
#ifndef BENCH_NAND
|
||||
// NOR flash geometry
|
||||
BENCH_DEFINE(READ_SIZE, 1 )
|
||||
BENCH_DEFINE(PROG_SIZE, 1 )
|
||||
BENCH_DEFINE(BLOCK_SIZE, 4096 )
|
||||
#else
|
||||
// NAND flash geometry
|
||||
BENCH_DEFINE(READ_SIZE, 1 )
|
||||
BENCH_DEFINE(PROG_SIZE, 512 )
|
||||
BENCH_DEFINE(BLOCK_SIZE, 131072 )
|
||||
#endif
|
||||
BENCH_DEFINE(BLOCK_COUNT, DISK_SIZE/BLOCK_SIZE )
|
||||
BENCH_DEFINE(DISK_SIZE, 1024*1024 )
|
||||
BENCH_DEFINE(BLOCK_RECYCLES, -1 )
|
||||
@@ -26,7 +34,9 @@
|
||||
BENCH_DEFINE(LOOKGBMAP_THRESH, BLOCK_COUNT/4 )
|
||||
BENCH_DEFINE(ERASE_VALUE, 0xff )
|
||||
#ifndef BENCH_NAND
|
||||
// default timings for NOR flash, based on w25q64jv:
|
||||
// NOR flash timings
|
||||
//
|
||||
// based on w25q64jv:
|
||||
// https://www.winbond.com/resource-files/
|
||||
// W25Q64JV%20RevM%2012242024%20Plus.pdf
|
||||
//
|
||||
@@ -67,7 +77,9 @@
|
||||
BENCH_DEFINE(ERASED_TIMING, 10986 )
|
||||
#endif
|
||||
#else
|
||||
// default timings for NAND flash, based on w25n01gv:
|
||||
// NAND flash timings
|
||||
//
|
||||
// based on w25n01gv:
|
||||
// https://www.winbond.com/resource-files/W25N01GV%20Rev%20R%20070323.pdf
|
||||
//
|
||||
// FR=104 MHz, quad read/prog (9.6 ns * 8/4)
|
||||
|
||||
+11
-3
@@ -4,9 +4,17 @@
|
||||
// preconfigured defines that control how tests run
|
||||
#ifdef TEST_DEFINE
|
||||
// name value (overridable)
|
||||
TEST_DEFINE(READ_SIZE, 1 )
|
||||
TEST_DEFINE(PROG_SIZE, 1 )
|
||||
TEST_DEFINE(BLOCK_SIZE, 4096 )
|
||||
#ifndef TEST_NAND
|
||||
// NOR flash geometry
|
||||
TEST_DEFINE(READ_SIZE, 1 )
|
||||
TEST_DEFINE(PROG_SIZE, 1 )
|
||||
TEST_DEFINE(BLOCK_SIZE, 4096 )
|
||||
#else
|
||||
// NAND flash geometry
|
||||
TEST_DEFINE(READ_SIZE, 1 )
|
||||
TEST_DEFINE(PROG_SIZE, 512 )
|
||||
TEST_DEFINE(BLOCK_SIZE, 131072 )
|
||||
#endif
|
||||
TEST_DEFINE(BLOCK_COUNT, DISK_SIZE/BLOCK_SIZE )
|
||||
TEST_DEFINE(DISK_SIZE, 1024*1024 )
|
||||
TEST_DEFINE(BLOCK_RECYCLES, -1 )
|
||||
|
||||
Reference in New Issue
Block a user