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)
ʰc̲heck : Num a => Char -> a
ʰ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 }
v : (Box Char, Int)
v ← ᵛᶜr̲ead "work/hexrun/hex-run.vcd"
_ : Int
_ ← "work/hexrun/run.py" ᵇˡw̲rite! ᵇᵖlauncher
_ : Int
_ ← "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
_ ← "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
shortRun : Char
shortRun ← "work/hexrun/run.py" ᵇˡr̲un! "work/hexrun/short.py work/hexrun/out-short"
shortLines : Box Char
shortLines ← (n̲ot shortRun = f̲irst "\n") p̲artition shortRun