code wiki / _hdl_build / _dcb_probe.nx
_dcb_probe.nx source
↩ module page · 26 lines · 1024 B
1// _dcb_probe.nx -- isolation probe: dc_lane_b alone on _dgp0's exact paths.
2// Manual steps give 0; the organ recorded 1. If THIS prints 0, dc_lane_b is
3// sound in isolation and the defect is dc_one's composition (the context-
4// sensitive miscompile class striking the instrument). license_tier: ORIGINAL
5import "nx_dc_core.nx"
6
7func main() -> i64 {
8 let rb: i64 = dc_lane_b("runtime/_hdl_build/_dgp0.nx" as *u8,
9 "/tmp/_dcbp0.s" as *u8,
10 "/tmp/_dcbp0.elf" as *u8)
11 dc_w(1, "DCBPROBE rcB=" as *u8)
12 dc_wn(1, rb)
13 dc_w(1, "\n" as *u8)
14 let ra: i64 = dc_lane_a("_dgp0" as *u8)
15 dc_w(1, "DCBPROBE rcA=" as *u8)
16 dc_wn(1, ra)
17 dc_w(1, "\n" as *u8)
18 let rb2: i64 = dc_lane_b("runtime/_hdl_build/_dgp0.nx" as *u8,
19 "/tmp/_dcbp0.s" as *u8,
20 "/tmp/_dcbp0.elf" as *u8)
21 dc_w(1, "DCBPROBE rcB-after-laneA=" as *u8)
22 dc_wn(1, rb2)
23 dc_w(1, "\n" as *u8)
24 sys_exit(0)
25 return 0
26}