code wiki / _hdl_build / nx_boolhunt.nx
nx_boolhunt.nx
buildroot/runtime/_hdl_build/nx_boolhunt.nx
about
nx_boolhunt.nx -- the team HUNTS its own search space: it enumerates EVERY 3-input boolean
function (all 256 truth tables), finds each one's provably-minimal circuit, and races the
compiler on each -- discovering, ITSELF, the functions where its exhaustive search beats
the compiler's heuristics (and the ones where it's behind, which name the ops it should
next author). No human picks the functions; the team sweeps the whole space. The team
generates the C for each truth table (sum-of-products) so the compiler can compile it.
license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_boolsynth.nxnx_gcc_race.nxnx_engineer_crash.nx
imported by: nx_boolhunt_test.nx
structs
| none |
consts
| 12 | const K_MAGIC_4096: i64 = 4096 |
| 13 | const K_MAGIC_8192: i64 = 8192 |
functions
| 15 | func bh_emit(buf: *u8, oi: i64, s: *u8) -> i64 { var j: i64 = 0; while s[j] != (0 as u8) { buf[oi] = s[j]; oi = oi + 1; j = j + 1 } return oi } |
| 20 | func bool_gen_c(tt: i64, path: *u8) -> i64 |
| 51 | func bse_rn(buf: *u8, oi: i64, id: i64) -> i64 |
| 62 | func bse_opmn(o: i64) -> *u8 called by 1: bse_emit_synth |
| 68 | func bse_emit_synth(op: *i64, a: *i64, b: *i64, L: i64, buf: *u8, oi: i64, icnt: *i64) -> i64 |
| 112 | func bse_emit_full(op: *i64, a: *i64, b: *i64, L: i64, buf: *u8, icnt: *i64) -> i64 |
| 120 | func bool_hunt_one(tt: i64, gccpath: *u8, res: *i64) -> i64 |