sourcelibs/Hex1000/demos/circuit.xtl
1⍝!/usr/bin/env xetal
2⍝ HEX1000 at its ports, the specification its circuit
3⍝ (demos/hex1000.xir, rtl/hex1000.v) must reproduce clock for clock:
4⍝ the keys 12+34= typed from reset at the calculator program, one
5⍝ instruction per clock. Line 1: the K inputs at each clock; line 2: O
6⍝ after reset and after each clock; then the 16 R latches, a row after
7⍝ reset and after each clock. Run with "just demo-lib Hex1000 circuit".
8ʰˣ⁼u̲se< "Hex1000"
9keys ← 1 2 16 3 4 19
10(st, digits, done, took) ← ʰˣCalcRom ʰˣt̲ype (ʰˣReset, keys, 9000)
11(ks, os, rs) ← ʰˣCalcRom ʰˣr̲ecord (ʰˣReset, keys, took)
12ks
130 c̲at os
14(ʰˣl̲atches ʰˣReset) c̲at rs