
A TPU-inspired accelerator targeting small neural network training and inference. Designed around a weight-stationary 2×2 systolic MAC array with FP8 (E4M3FN) operands and FP32 accumulation. Written in SystemVerilog, targeting ASIC implementation in SkyWater’s 130 nm process using the high-density standard-cell library.
The host writes four E4M3FN weights through ui_in and loads them into the 2×2 array. Each activation row contains two FP8 values. The array multiplies that row by the weight matrix and returns one FP32 sum per column.
Assert ena, hold rst_n low across a rising clock edge, then release reset. Send command and operand bytes on ui_in. Assert input valid on uio[0] and hold the byte and input last (uio[2]) stable until input ready (uio[1]) is high at a rising edge. Send each matrix in row-major order and assert input last on its fourth data byte.
0x20, then the four identity matrix weights 38 00 00 38 (hex).0x40, then 38 40 BC 41 for the rows [1, 2] and [-1.5, 2.25]. The final activation starts the multiply.uio[5]. Capture uo_out on each rising edge with both output valid (uio[4]) and output ready high. Expect row-major FP32 words 3F800000 40000000 BFC00000 40100000, least significant byte first. Output last (uio[6]) is high on the sixteenth byte.0x69 to repeat the multiply using the buffered matrices with ReLU (bit 0) and FP8 output (bit 3). Expect the four bytes 38 40 00 41, with output last on the fourth byte.A digital host supplies the clock, drives the commands and operand bytes, and samples the result bus.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | s_axis_tdata[0] (cmd / FP8 data bit 0) | m_axis_tdata[0] (result byte bit 0) | s_axis_tvalid (input) |
| 1 | s_axis_tdata[1] (cmd / FP8 data bit 1) | m_axis_tdata[1] (result byte bit 1) | s_axis_tready (output) |
| 2 | s_axis_tdata[2] (cmd / FP8 data bit 2) | m_axis_tdata[2] (result byte bit 2) | s_axis_tlast (input) |
| 3 | s_axis_tdata[3] (cmd / FP8 data bit 3) | m_axis_tdata[3] (result byte bit 3) | |
| 4 | s_axis_tdata[4] (cmd / FP8 data bit 4) | m_axis_tdata[4] (result byte bit 4) | m_axis_tvalid (output) |
| 5 | s_axis_tdata[5] (cmd / FP8 data bit 5) | m_axis_tdata[5] (result byte bit 5) | m_axis_tready (input) |
| 6 | s_axis_tdata[6] (cmd / FP8 data bit 6) | m_axis_tdata[6] (result byte bit 6) | m_axis_tlast (output) |
| 7 | s_axis_tdata[7] (cmd / FP8 data bit 7) | m_axis_tdata[7] (result byte bit 7) |