runners: Added DISK_GEOMETRY for easy multi-geometry benchmarking
So now you can easily run multiple/specific geometries without recompiling the bench runner: ./scripts/bench.py -DDISK_GEOMETRY=0,1 But note by default we only simulate NOR flash. Spitting out multiple results by default is confusing. --- Previously this was possible by either compiling multiple bench runners (with -DBENCH_NAND), or by explicit specifying full the geometry (-DREAD_SIZE, -DPROG_SIZE, ..., -DREAD_TIMING, ...) at runtime, but both were clunky and annoying to parameterize. DISK_GEOMETRY make it easy, fits well with DISK_SIZE, and adds a field to help identify the geometry in later scripts. I considered filling out test_defines.h with multiple geometries as well, but decided against it. The current idea behind test_runner is to not test specific geometries, but to instead let individual suites/cases iterate through the specific READ_SIZEs, PROG_SIZEs, etc, that are relevant. Still, added DISK_GEOMETRY to test_defines.h for consistency, but it doesn't actually control anything.
This commit is contained in:
+6
-12
@@ -4,19 +4,13 @@
|
||||
// preconfigured defines that control how tests run
|
||||
#ifdef TEST_DEFINE
|
||||
// name value (overridable)
|
||||
#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(DISK_GEOMETRY, 0 )
|
||||
TEST_DEFINE(READ_SIZE, 1 )
|
||||
TEST_DEFINE(PROG_SIZE, 1 )
|
||||
TEST_DEFINE(ERASE_SIZE, 4096 )
|
||||
TEST_DEFINE(BLOCK_SIZE, LFS3_MAX(ERASE_SIZE, 512) )
|
||||
TEST_DEFINE(BLOCK_COUNT, DISK_SIZE/LFS3_MAX(BLOCK_SIZE, 1) )
|
||||
TEST_DEFINE(BLOCK_RECYCLES, -1 )
|
||||
TEST_DEFINE(RCACHE_SIZE, LFS3_MAX(16, READ_SIZE) )
|
||||
TEST_DEFINE(PCACHE_SIZE, LFS3_MAX(16, PROG_SIZE) )
|
||||
|
||||
Reference in New Issue
Block a user