True split-dict: partition dictionary across both halves

Importance-based partitioning — highest-importance entries on left
(central) for zero-latency local lookup, remainder on right
(peripheral) queried over BLE on miss. Both halves embed their own
MPHF binary. Configurable block size for tighter compression.
This commit is contained in:
afiqzudinhadi 2026-07-02 11:08:28 +08:00
parent 9d2d5e4e2d
commit 20218fa2ab
7 changed files with 209 additions and 58 deletions

28
Kconfig
View file

@ -81,15 +81,31 @@ config STENO_DICT_MAX_SIZE
The MPHF compiler auto-trims to fit.
menuconfig STENO_SPLIT_DICT
bool "Split dictionary storage on peripheral"
bool "Split dictionary across both halves"
default n
select STENO_DICT_MPHF
help
Store the steno dictionary on the peripheral half and
perform lookups over BLE. This frees flash on the central
side at the cost of added lookup latency.
Partition the steno dictionary across both keyboard halves.
Left (central) gets highest-importance entries for zero-latency
local lookup. Right (peripheral) gets remaining entries, queried
over BLE on local miss. Both halves have their own MPHF dict.
if STENO_SPLIT_DICT
config STENO_DICT_LEFT_MAX_SIZE
int "Left half dict budget (bytes)"
default 430080
help
Flash budget for left (central) partition. Default 420KB.
Highest-importance entries fill this first.
config STENO_DICT_RIGHT_MAX_SIZE
int "Right half dict budget (bytes)"
default 545792
help
Flash budget for right (peripheral) partition. Default 533KB.
Remaining entries after left partition is filled.
config STENO_SPLIT_CACHE_SIZE
int "LRU cache entries on central side"
default 64
@ -104,6 +120,10 @@ config STENO_SPLIT_TIMEOUT_MS
default 50
range 10 500
config STENO_SPLIT_LOG_LEVEL
int "Split dict log level"
default 3
endif # STENO_SPLIT_DICT
endif # STENO_ENGINE