programextensions/blender/demos/hex-run.xtl

Blender, 10: HEX1000-UART computing C0DE+BEEF=, from a simulation of its board. scripts/hex1000-sim.sh runs X_eTaL-fpga's board Verilog (at FPGA_COMMIT) under iverilog, the text sent over its serial line, into a waveform (VCD); scripts/hex1000-browser.py types the same text at the live browser calculator in headless Chrome. This program reads the waveform (Vcd.xtl), checks it -- the line carries the text, the board receives it, Hex1000.xtl replaying the clocks agrees with the circuit's registers at every one, the display ends as the evaluator's (hx:c_alc) and the browser's -- and only then writes the video (HexRun.xtl): the bits arriving and the key matrix in slow motion, the typing as a time-lapse, one addition in slow motion, the display, the browser's screen beside it. A YouTube video and a Short, with a cue sheet and subtitles. Title: HEX1000-UART: execution Command: just ext blender hex-run Run: just ext blender hex-run (the simulation, the browser, then this: about 25 minutes, 1261 frames twice)

source · imports bl: extensions/blender/lib/Blender.xtl; bp: extensions/blender/lib/Bpy.xtl; vd: extensions/blender/lib/Video.xtl; vc: extensions/blender/demos/Vcd.xtl; hr: extensions/blender/demos/HexRun.xtl

ʰc̲heck : Num a => Char -> a

function (private) · line 25
ʰc̲heck ← { result →
  n̲ot "exit 0\nerrors 0\n" m̲atch 16 t̲ake result ? ⎕P̲ANIC "hex-run: Blender failed: " c̲at result
  0
}
Used in: _

v : (Box Char, Int)

value · line 30
v ← ᵛᶜr̲ead "work/hexrun/hex-run.vcd"

_ : Int

function · line 33
_ ← "work/hexrun/run.py" ᵇˡw̲rite! ᵇᵖlauncher

_ : Int

function · line 34
_ ← "work/hexrun/hex-run.cues.toml" ᵇˡw̲rite! (ʰʳc̲ues v, ʰʳcueTable) ᵛᵈc̲ues 0

_ : Int

function · line 35
_ ← "work/hexrun/hex-run.srt" ᵇˡw̲rite! (ʰʳc̲ues v, ʰʳcueTable) ᵛᵈs̲rt 0

_ : Int

function · line 38
_ ← "work/hexrun/video.py" ᵇˡw̲rite! ((ᵛᵈlandscape, v, "work/hexrun/browser.png") ʰʳs̲cene 0) c̲at (ᵛᵈr̲ender "hex-run.mp4") c̲at ᵛᵈreport

_ : Int

function · line 39
_ ← "work/hexrun/short.py" ᵇˡw̲rite! ((ᵛᵈshorts, v, "work/hexrun/browser.png") ʰʳs̲cene 0) c̲at (ᵛᵈr̲ender "hex-run-short.mp4") c̲at ᵛᵈreport

r : Char

value · line 41
r ← "work/hexrun/run.py" ᵇˡr̲un! "work/hexrun/video.py work/hexrun/out"
Used in: _, lines

_ : Int

function · line 42
_ ← ʰc̲heck r

lines : Box Char

value · line 44
lines ← (n̲ot r = f̲irst "\n") p̲artition r

shortRun : Char

value · line 48
shortRun ← "work/hexrun/run.py" ᵇˡr̲un! "work/hexrun/short.py work/hexrun/out-short"
Used in: _, shortLines

_ : Int

function · line 49
_ ← ʰc̲heck shortRun

shortLines : Box Char

value · line 50
shortLines ← (n̲ot shortRun = f̲irst "\n") p̲artition shortRun