code wiki / (root) / nx_tier.nx

nx_tier.nx

buildroot/runtime/nx_tier.nx

11444 B235 linesdepth 0pulls 0 transitivereach 17704 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_tier.nx -- substrate-wide tier configuration. Single point of edit for scale-agnostic substrate. Per user directive 2026-05-13: "with the i64 it looks hardcoded everywhere if we really want this dynamic dont we want that to be a changeable value everywhere so it can switch to i128 and i256 etc." Per cardinals: - feedback-numeric-tier-ladder.md (N0..N9 swap) - feedback-scale-agnostic-substrate.md (MCU..HPC swap) - feedback-substrate-additive-not-restrictive.md (declare cost) SEMANTIC ALIASES (not all should swap simultaneously): nx_int -- DEFAULT ARITHMETIC integer. Swappable across the numeric tier ladder. Swap this to i128 to make the entire substrate compute in 128-bit integers. nx_size -- MEMORY-SIZE integer. Always platform-pointer-width. Used for buffer sizes, mmap byte counts, struct sizes. Does NOT swap with nx_int -- changing this would break pointer arithmetic. Stays i64 on RV64. nx_idx -- ARRAY-INDEX integer. Same width as nx_size on flat-memory targets. Distinct alias so future GPU/distributed targets can change indexing without touching arithmetic. nx_byte -- The byte type. Stays u8. Distinct alias so MCU targets that emulate u16-byte memory could rebind. HARDWARE-TIER BUFFER SIZES (declare cost, don't restrict): NX_BUF_TINY -- 64 B (MCU-friendly; stack-safe) NX_BUF_SMALL -- 256 B (MCU heap-friendly) NX_BUF_MEDIUM -- 4096 B (page-size; workstation default) NX_BUF_LARGE -- 64 KiB (server-friendly) NX_BUF_HUGE -- 1 MiB (HPC; assumes virtual memory) Use these instead of `sys_mmap(4096)` etc. so the substrate

dependencies 0 imports · 2872 importers

nx_tier.nx _ab_mk_erf.nx _ft_diag.nx _offc_gap3_repro_v2.nx _offc_gap3_repro_v3.nx _pe_f64atan.nx _pe_f64erf.nx _pe_f64gamma.nx _pe_f64log.nx _pe_f64pow.nx _pe_f64sincos.nx

diagram shows first 10 each side; +0 more imports, +2862 more importers in the complete lists below.

imports: none

imported by: _ab_mk_erf.nx_ft_diag.nx_offc_gap3_repro_v2.nx_offc_gap3_repro_v3.nx_pe_f64atan.nx_pe_f64erf.nx_pe_f64gamma.nx_pe_f64log.nx_pe_f64pow.nx_pe_f64sincos.nx_pe_f64sinhcosh.nx_pe_f64tan.nx_pp_minimal2.nx_ts_diag.nx_ttt_diag.nx_ttt_test_trace.nx_wb_mathk.nxnx_5wh_log.nxnx_a11y_check.nxnx_a11y_check_test.nxnx_abi_lock.nxnx_abi_lock_test.nxnx_abortive.nxnx_abs.nxnx_abs_diff.nxnx_aces_native.nxnx_activation_steer.nxnx_actor.nxnx_actor_role_audio_grader.nxnx_actor_role_audio_grader_test.nxnx_actor_role_game_logic.nxnx_actor_role_game_logic_test.nxnx_actor_role_image_grader.nxnx_actor_role_image_grader_test.nxnx_actor_role_llm.nxnx_actor_role_llm_test.nxnx_actor_role_llm_v2.nxnx_actor_role_llm_v2_autoreg_test.nxnx_actor_role_llm_v2_real_autoreg_test.nxnx_actor_role_llm_v2_real_test.nxnx_actor_role_llm_v2_test.nxnx_adaptive_bitrate.nxnx_adaptive_layer.nxnx_add_10.nxnx_add_100.nxnx_add_1000.nxnx_add_101.nxnx_add_102.nxnx_add_103.nxnx_add_104.nxnx_add_105.nxnx_add_106.nxnx_add_107.nxnx_add_108.nxnx_add_109.nxnx_add_11.nxnx_add_110.nxnx_add_111.nxnx_add_112.nxnx_add_113.nxnx_add_114.nxnx_add_115.nxnx_add_116.nxnx_add_117.nxnx_add_118.nxnx_add_119.nxnx_add_12.nxnx_add_120.nxnx_add_121.nxnx_add_122.nxnx_add_123.nxnx_add_124.nxnx_add_125.nxnx_add_126.nxnx_add_127.nxnx_add_128.nxnx_add_129.nxnx_add_13.nxnx_add_130.nxnx_add_131.nxnx_add_132.nxnx_add_133.nxnx_add_134.nxnx_add_135.nxnx_add_136.nxnx_add_137.nxnx_add_138.nxnx_add_139.nxnx_add_14.nxnx_add_140.nxnx_add_141.nxnx_add_142.nxnx_add_143.nxnx_add_144.nxnx_add_145.nxnx_add_146.nxnx_add_147.nxnx_add_148.nxnx_add_149.nxnx_add_15.nx +2772 more (shown cap 100 declared)

structs

none

consts

197const NX_BUF_TINY: nx_size = 64
198const NX_BUF_SMALL: nx_size = 256
199const NX_BUF_MEDIUM: nx_size = 4096
200const NX_BUF_LARGE: nx_size = 65536
201const NX_BUF_HUGE: nx_size = 1048576
205const NX_TIER_MCU: nx_int = 0
206const NX_TIER_SOVEREIGN_CHIP: nx_int = 1
207const NX_TIER_FAMILY_DEVICE: nx_int = 2
208const NX_TIER_WORKSTATION: nx_int = 3
209const NX_TIER_SERVER: nx_int = 4
210const NX_TIER_HPC: nx_int = 5
214const NX_NUM_N0_I32: nx_int = 0
215const NX_NUM_N1_I64: nx_int = 1
216const NX_NUM_N2_I128: nx_int = 2
217const NX_NUM_N3_I256: nx_int = 3
218const NX_NUM_N4_I512: nx_int = 4
219const NX_NUM_N5_BIGINT: nx_int = 5
227const NX_SIZEOF_NX_INT: nx_size = 8 // nx_int currently i64 -> 8 bytes
228const NX_SIZEOF_NX_SIZE: nx_size = 8 // nx_size always pointer-width
229const NX_SIZEOF_NX_IDX: nx_size = 8 // nx_idx alias of nx_size
233const NX_FD_STDIN: nx_fd = 0
234const NX_FD_STDOUT: nx_fd = 1
235const NX_FD_STDERR: nx_fd = 2

functions

none