code wiki / _hdl_build / nx_pm_plan.nx
nx_pm_plan.nx source
↩ module page · 60 lines · 2859 B
1// nx_pm_plan.nx -- the Nishi PM's PLANNING + SCHEDULING capability: turn the roadmap (the maturity-ladder
2// gaps) into estimated, ordered work with check-in cadence and completion ETAs the operator can read
3// (operator: "have them begin the process and building the log... giving a time estimate to checkins and
4// completions per the nishi pm... the goal being hardware then bits up... we are on 3rd party hardware
5// working to move towards first while still trying to get full value out of 3rd party").
6//
7// Estimates are in BUILD-UNITS (BU): 1 BU ~= one autonomous build+verify iteration (NOT wall-clock --
8// wall-clock depends on run cadence; the PM is honest about that). license_tier: ORIGINAL Uses the
9// maturity ladder for cur/target levels.
10
11import "nx_maturity_auditor.nx"
12import "nx_syscalls.nx"
13
14// the migration axis: where each item sits on 3rd-party -> sovereign-bridge -> first-party.
15const PM_PARTY_THIRD: i64 = 1 // runs ON 3rd-party silicon/OS -- extract full value now
16const PM_PARTY_BRIDGE: i64 = 2 // sovereign artifact that still runs on 3rd-party HW (our toolchain on Linux)
17const PM_PARTY_FIRST: i64 = 3 // first-party / sovereign target -- the migration goal
18
19// bits-up layer index (0=hardware ... 8=app); the team builds bottom-up, "like mankind builds on the previous".
20const PM_L_HARDWARE: i64 = 0
21const PM_L_ISA: i64 = 1
22const PM_L_ASM: i64 = 2
23const PM_L_LINK: i64 = 3
24const PM_L_COMPILER: i64 = 4
25const PM_L_RUNTIME: i64 = 5
26const PM_L_OSFUND: i64 = 6
27const PM_L_SERVICE: i64 = 7
28const PM_L_APP: i64 = 8
29
30// effort (BU) = rungs-to-target * layer_weight (heavier near the hardware/kernel). layer_weight is DATA.
31func pm_effort(cur_level: i64, target_level: i64, layer_weight: i64) -> i64 {
32 if target_level <= cur_level { return 0 }
33 return (target_level - cur_level) * layer_weight
34}
35
36// number of check-ins for an item so long work reports progress: ceil(effort/quantum), >=1 when effort>0.
37func pm_checkins(effort: i64, quantum: i64) -> i64 {
38 if effort <= 0 { return 0 }
39 if quantum <= 0 { return 1 }
40 let c: i64 = (effort + quantum - 1) / quantum
41 if c < 1 { return 1 }
42 return c
43}
44
45func pm_party_label(p: i64) -> *u8 {
46 if p == PM_PARTY_THIRD { return "THIRD-PARTY" as *u8 }
47 if p == PM_PARTY_BRIDGE { return "BRIDGE" as *u8 }
48 return "FIRST-PARTY" as *u8
49}
50func pm_layer_label(l: i64) -> *u8 {
51 if l == PM_L_HARDWARE { return "L0-HARDWARE" as *u8 }
52 if l == PM_L_ISA { return "L1-ISA" as *u8 }
53 if l == PM_L_ASM { return "L2-ASM" as *u8 }
54 if l == PM_L_LINK { return "L3-LINK" as *u8 }
55 if l == PM_L_COMPILER { return "L4-COMPILER" as *u8 }
56 if l == PM_L_RUNTIME { return "L5-RUNTIME" as *u8 }
57 if l == PM_L_OSFUND { return "L6-OSFUND" as *u8 }
58 if l == PM_L_SERVICE { return "L7-SERVICE" as *u8 }
59 return "L8-APP" as *u8
60}