code wiki / _hdl_build / nx_csp_arc_gate.nx
nx_csp_arc_gate.nx
buildroot/runtime/_hdl_build/nx_csp_arc_gate.nx
dependencies 3 imports · 0 importers
imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.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
| none |
functions
| 16 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 18 | func dom_min(mask: i64) -> i64 { var v: i64=1; while v<=3 { if ((mask>>(v-1))&1)==1 { return v } v=v+1 } return 0 } called by 1: revise_less |
| 19 | func dom_max(mask: i64) -> i64 { var v: i64=3; while v>=1 { if ((mask>>(v-1))&1)==1 { return v } v=v-1 } return 0 } called by 1: main |
| 20 | func popc(mask: i64) -> i64 { var c: i64=0; var v: i64=0; while v<3 { if ((mask>>v)&1)==1 { c=c+1 } v=v+1 } return c } |
| 22 | func revise_less(A: i64, B: i64) -> i64 { let mx: i64=dom_max(B); var nm: i64=0; var v: i64=1; while v<=3 { if ((A>>(v-1))&1)==1 { if v<mx { nm=nm|(1<<(v-1)) } } v=v+1 } return nm } |
| 24 | func revise_greater(B: i64, A: i64) -> i64 { let mn: i64=dom_min(A); var nm: i64=0; var v: i64=1; while v<=3 { if ((B>>(v-1))&1)==1 { if v>mn { nm=nm|(1<<(v-1)) } } v=v+1 } return nm } |
| 26 | func main() -> i64 |