code wiki / _hdl_build / nx_energy_probe_test.nx
nx_energy_probe_test.nx
buildroot/runtime/_hdl_build/nx_energy_probe_test.nx
about
nx_energy_probe_test.nx -- exercise the real-hardware probe end to end: detect
the node's energy source, measure a fixed workload's real consumption in that
source's native unit, and report HONESTLY (joules only from a joule source;
cycles labeled as the speed proxy when no power sensor exists). This is the
"real hardware, any hardware" half of the triangle -- on a RAPL/battery node it
yields real energy; on a bare node it falls to the universal cycle counter.
Known answer: detection returns a usable source (never NONE) AND the live
counter advances over real work. exit 0.
dependencies 1 imports · 0 importers
imports: nx_energy_probe.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const EP_ITERS: i64 = 2000000 |
functions
| 16 | func ep_workload(seed: i64) -> i64 called by 1: main |
| 23 | func _emit(name: *u8, v: i64) -> i64 called by 1: main |
| 32 | func _puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } called by 1: main |
| 34 | func main() -> i64 |