Expand description
fabric_soc — Phase E: the FLASHABLE reconfigurable-fabric SoC.
Phase D proved (our SAT) that a diverse program corpus projects onto ONE reconfigurable tile array under a
config word. This module makes that array real hardware: a synthesizable fabric_soc wraps the
config_<name> array (emit_config_grid_verilog) with registered I/O and a CYCLE COUNTER, so a host
presents (cfg, inputs) and reads back (result, cycles). Because the array is feed-forward
(combinational), a decision settles in ONE clock — the honest cycles/op the interpreter pays hundreds of
fetch-decode-execute cycles for. The self-checking testbench drives the SoC over a vector battery and
$displays (result, cycles); fabric_soc_lock runs it under iverilog and checks every result against
the VM and every cycle count against the 1-clock settle. The RTL, its testbench, and the constraints are
drift-locked (regenerate with FABRIC_SOC_RECORD=1), and the config-grid ≡ VM is the eval side of
fabric_whole_program_lock (Phase D).
Constants§
- CFG_
WIDTH - FABRIC_
SOURCES - The fabric SoC’s program corpus — the datapaths the ONE reconfigurable array can become, selected by the
config word. Single-final-
Return+ conditional-Setstyle so branches if-convert to select tiles. - FLOAT_
SOC_ NAME - FLOAT_
SOC_ SRC - The flashed float kernel:
fhypf(a,b) = sqrt(a*a + b*b)— the Euclidean hypotenuse as a Real. Exercises the full float lane:fp_mul(twice) +fp_addsub+fp_sqrt. It returns a FLOAT (not floored) so the SoC streams the raw f64 bits — the host floors to the integer hypotenuse (no float→int RTL needed on-chip). - N_IN
- The SoC’s input-port count — the max arity over the corpus (
clamphas three). Functions with fewer inputs ignore the extra ports (their tiles never reference them). - STATE_
SOC_ NAME - STATE_
SOC_ SRC - The flashed state-plane kernel:
grade(a,b,c)is a WHOLE MULTI-OP-CLASS program — it builds the list[a,b,c]on the heap (COLLECTIONS), sums its elements (ARITHMETIC), and clamps the total to[0, 100](CONTROL FLOW — two if-converted branches). So the flashed datapath exercises three distinct op-classes at once — Mem (HeapAlloc/Write/Read) + Arith (adds) + Select (the clamps) — all in ONE sequenced datapath on silicon: the fabric running a real program, not a single op. - WIDTH
- The datapath / config-word widths (8-bit datapath for the SAT proof; 3-bit config indexes ≤ 8 datapaths).
Functions§
- emit_
config_ grid - The reconfigurable array RTL (
config_fabric): ONE tile grid becoming any corpus datapath undercfg. - emit_
fabric_ soc - The flashable SoC: registered
(cfg, inputs)in, the combinationalconfig_fabric, acyclescounter, and registered(result, cycles, done)out. Onrstrelease the array’s output settles in one clock; the SoC latches it, setscycles = 1(the honest cost of a spatial decision), and raisesdone. Synthesizable as-is — the inputs wire to switches / a UART loader and the outputs to LEDs / a UART readback for bring-up. - emit_
fabric_ soc_ tb - The self-checking testbench: drive the SoC over
(cfg, inputs)vectors and$displaycfg result cyclesper vector.fabric_soc_lockparses these and checks each result ≡ the VM and each cycle count == 1. - emit_
float_ soc - The SIMPLE float SoC (
float_soc) for the iverilog proof:float_<name>under a CYCLE COUNTER, exposing the f64resultbits /cycles/done. A testbench presents float bit-patterns and reads the result. - emit_
float_ soc_ module - The sequenced float datapath RTL (
float_fhypf) — the fpu.v-bound micro-sequencer for the kernel. - emit_
float_ soc_ tb - A self-checking testbench for
float_soc: drive each float pair (bit-patterns), run todone, and$display(\"result_hex cycles\").float_soc_lockruns it under iverilog (with fpu.v) and checks each result’s f64 bits ≡ the model/Rust and each cycle count > 1. - emit_
nexys_ fabric_ soc - Emit the BOARD-FLASHABLE top (
nexys_fabric_soc) for the Nexys A7-100T: the reconfigurableconfig_fabricarray, a baked-in vector ROM, and a settle sweep that measures on the chip how many clocks each datapath takes. For every vector the sweep loads a prime into the launch register, lets it settle, launches the vector and captures the array’s outputLclocks later, forLfromLMAX - 1down to 1, under two primes (the vector’s inputs inverted, and the next vector),REPStimes. The settled value is the capture at2·LMAX; a result is settled inside the window only when the capture atLMAXalready equals it under both primes. The streamed cycle count is the smallestLfrom which every capture equals the settled value, the worst over the repetitions, and 0 when the result did not settle inside the window. Each record goes out the UART TX as(sync, cfg, result[8], cycles[2]); a host checks each result against the VM. 100 MHz board clock, 115200 baud (CLKS_PER_BIT = 868). Pins innexys_fabric_soc.xdc. - emit_
nexys_ fabric_ xdc - The board pin constraints for
nexys_fabric_soc(Nexys A7-100T): 100 MHz clock (E3), reset (J15), UART TX (D4), status LEDs. Nouart_rx— the vector ROM is baked in, so the SoC only streams out. - emit_
nexys_ float_ soc - The FLASHABLE float SoC (
nexys_float_soc) for the Nexys A7-100T: a baked-in(a,b)float ROM drivesfloat_<name>— pulse the datapath reset, waitdone(counting the FPU pipeline cycles), capture the f64 result, and stream the 12-byte record{0xA5, vec, result[63:0] MSB-first, cycles[15:0]}out the UART TX, looping forever. The host decodes the f64 and floors it to the integer hypotenuse. 100 MHz; 8N1 115200. - emit_
nexys_ float_ xdc - The Nexys A7-100T pin constraints for
nexys_float_soc— same ports as the fabric SoC, same pin map. - emit_
nexys_ state_ soc - The FLASHABLE state SoC (
nexys_state_soc) for the Nexys A7-100T: a baked-in(a,b,c)vector ROM drivesstate_<name>— pulse the datapath reset, waitdone(counting the multi-cycle latency), capture the result, and stream the 12-byte record{0xA5, vec, result[63:0] MSB-first, cycles[15:0]}out the UART TX, looping forever so a host can frame-lock at any time. 100 MHz; 8N1 115200 (CLKS_PER_BIT=868). - emit_
nexys_ state_ xdc - The Nexys A7-100T pin constraints for
nexys_state_soc— identical ports to the fabric SoC (100 MHz clk, reset, UART TX, LEDs), so the same pin map. - emit_
state_ soc - The SIMPLE state SoC (
state_soc) for the iverilog proof: it wrapsstate_<name>with a CYCLE COUNTER (cycles from reset-release todone) and exposesresult/cycles/done. A host/testbench presents(a,b,c), pulsesrst, and reads back the multi-cycle result — the board-independent ≡VM proof surface. - emit_
state_ soc_ module - The sequenced state-plane datapath RTL (
state_grade) — the LUTRAM-heap micro-sequencer for the kernel. - emit_
state_ soc_ tb - A self-checking testbench for
state_soc: drive each(a,b,c)vector, pulserst, run untildone, and$display(\"result cycles\").state_soc_lockruns it under iverilog and checks each result ≡ the VM and each cycle count > 1 (a sequenced state program, not a 1-clock combinational decision). - fabric_
grids_ json - The placed-and-routed tile arrays as JSON — the source of truth for every technical drawing of the fabric,
so a drawing of a tile array is the placer’s own output, never hand-drawn.
Contains the five
config_fabricislands (the 8×3 array that runs 14/14 vectors on both boards) and the Horner cubic residual on both placers (the diagonalroute_straight_linebehindgrid_horner.v, and the area-minimizingroute_leveled). Pinned tobenchmarks/silicon/fabric_grids.jsonbyfabric_grids_lock. - float_
soc_ vectors - The
(a, b)float pairs the float SoC runs on silicon → each hypotenuse (mostly Pythagorean integers). - state_
soc_ vectors - The input battery the state SoC runs on silicon (each a
(a,b,c)triple →clamp(a+b+c, 0, 100)). Chosen to exercise the pass-through, the UPPER clamp (sum > 100), and the LOWER clamp (sum < 0) — so the control flow is genuinely taken on hardware, not just present. - table
- The compiled config table (padded islands on one array). The single source of truth for the RTL and the testbench’s expected values — both derive from it, never hand-typed.
- vectors
- The test vectors the testbench drives — a battery per datapath, spanning each function’s cases. Kept in
sync with
fabric_soc_lock’s expected computation (both iterate this same list).