sourceextensions/blender/demos/hex-build.xtl
1⍝│ Blender, 11: HEX1000-UART from source to a configured Tang Nano 9K.
2⍝│ Run just ext blender hex-build with the OSS CAD Suite on PATH:
3⍝│ synthesize, place, route, pack, then render this video and Short.
4⍝│ The build evidence stays in work/hexbuild/evidence.json.
5⍝│ Title: HEX1000-UART: build process
6⍝│ Command: just ext blender hex-build
7
8"bl:" u̲se< "Blender"
9"bp:" u̲se< "Bpy"
10"vd:" u̲se< "Video"
11"hb:" u̲se< "HexBuild"
12
13ʰc̲heck ← { result →
14 n̲ot "exit 0\nerrors 0\n" m̲atch 16 t̲ake result ? ⎕P̲ANIC "hex-build: Blender failed: " c̲at result
15 result
16}
17
18rawcells ← n̲umbers ᵇˡr̲ead "work/hexbuild/cells.txt"
19rawroutes ← n̲umbers ᵇˡr̲ead "work/hexbuild/routes.txt"
20cells ← (((t̲ally rawcells) d̲iv 4) c̲at 4) r̲eshape rawcells
21routes ← (((t̲ally rawroutes) d̲iv 2) c̲at 2) r̲eshape rawroutes
22stats ← f̲loor n̲umbers ᵇˡr̲ead "work/hexbuild/stats.txt"
23"the build (LUTs, flip-flops, placed logic, route tiles, routed nets, bitstream bytes):"
24stats
25_ ← "work/hexbuild/run.py" ᵇˡw̲rite! ᵇᵖlauncher
26_ ← "work/hexbuild/hex-build.cues.toml" ᵇˡw̲rite! (ʰᵇc̲ues stats, ʰᵇcueTable) ᵛᵈc̲ues 0
27_ ← "work/hexbuild/hex-build.srt" ᵇˡw̲rite! (ʰᵇc̲ues stats, ʰᵇcueTable) ᵛᵈs̲rt 0
28_ ← "work/hexbuild/video.py" ᵇˡw̲rite! ((ᵛᵈlandscape, cells, routes, stats) ʰᵇs̲cene 0) c̲at (ᵛᵈr̲ender "hex-build.mp4") c̲at ᵛᵈreport
29_ ← "work/hexbuild/short.py" ᵇˡw̲rite! ((ᵛᵈshorts, cells, routes, stats) ʰᵇs̲cene 0) c̲at (ᵛᵈr̲ender "hex-build-short.mp4") c̲at ᵛᵈreport
30"rendering the landscape video ..."
31r ← "work/hexbuild/run.py" ᵇˡr̲un! "work/hexbuild/video.py work/hexbuild/out"
32ʰc̲heck r
33"rendering the Short ..."
34shortRun ← "work/hexbuild/run.py" ᵇˡr̲un! "work/hexbuild/short.py work/hexbuild/out-short"
35ʰc̲heck shortRun
36ᵇˡr̲ead "work/hexbuild/out/report.txt"