code wiki / _hdl_build / nx_store_hist.nx

nx_store_hist.nx

buildroot/runtime/_hdl_build/nx_store_hist.nx

5251 B139 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic store
docsdependenciesstructsconstsfunctions

about

nx_store_hist.nx -- GENERIC seg-store plane column HISTOGRAM. Reads a plane FULLY (internal sts_load, not subject to the 64KB tools/call RESPONSE cap that truncates a raw load -- eats seq488 for reads), counts distinct values of one TAB column, sorts by count desc, and writes 'count TAB value' rows to an output plane (small -> fully readable). Enables FULL-SCALE verification of large planes. SUBCLASS of nx_ingest_base (ib_bput/ib_bputc/ib_bputn/ib_werr/ib_wn/ib_refuse). No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_ingest_base.nx nx_store_seed_lib.nx nx_syscalls.nx nx_store_hist.nx

imports: nx_ingest_base.nxnx_store_seed_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ib_refuse ib_werr ib_wr ib_slen sys_write sys_exit hs_atoi sys_mmap sts_load ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq ss_r32 ↻

structs

none

consts

10const HS_CAP: i64 = 4194304
11const HS_OCAP: i64 = 65536
12const HS_MAXVALS: i64 = 512
13const HS_VALSTORE: i64 = 131072
14const HS_TAB: i64 = 9
15const HS_NL: i64 = 10
16const HS_STDERR: i64 = 2
17const HS_MAXCOL: i64 = 16
18const HS_PAIR: i64 = 2
19const HS_SPB: i64 = 256
20const HS_CANDCAP: i64 = 1024
21const HS_ARGC_MIN: i64 = 4
22const HS_EXIT_USAGE: i64 = 2
23const HS_EXIT_IO: i64 = 1
24const HS_D0: i64 = 48
25const HS_D9: i64 = 57

functions

27func hs_streq(a: *u8, b: *u8) -> i64
called by 1: main
33func hs_atoi(s: *u8) -> i64
called by 1: main
39func hs_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 1: main
55func main(argc: i64, argv: *i64) -> i64