Skip to content

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

  • Run tracing for a tile, and the differential harness (#18, part; kpu-gen’s kpu_gen.trace and tests/fuzz, branes-ai/embodied-ai-soc-generator #27, #45, #83, #84, #85).

    • systars.trace. TileRecorder taps a SystolicTop simulation and writes a trace bundle in kpu-gen’s format: every command from accept to completion with its AXI transactions, the internal lanes (lanes.py: L2 ports, slots, the Combiner, each process’s queue; the fine L1 and result-buffer lanes), and the first error. check_trace checks its invariants, render draws a text report and an SVG timeline, and perf.summary summarises it. python -m systars.trace BUNDLE [--check] [--svg DIR] [--perf] reports on a saved one.
    • What changed from kpu-gen. lanes.py, check.py, render.py and perf.py are kpu-gen’s. probes.py and recorder.py keep only the standalone-tile path: no NoC links, SoC DMA, memory cells or annotation-derived residencies, and those tables stay empty.
    • The differential harness (tests/fuzz). It runs random Matmul programs against the reference models and shrinks a failure. just fuzz [SEEDS] runs it and writes each failure’s trace (into KPU_FUZZ_RUN), and just tile-trace [SEED] traces one seed. pytest tests/fuzz runs a default set, and writes a failure’s trace only if KPU_FUZZ_RUN names a directory. tests/unit/test_tile_trace.py is kpu-gen’s, without its SoC test.
    • Not yet. The .dflow export for kpu-sim’s viewer needs an issuer that annotates its commands (the rest of #18). New guide: docs/guides/tile-trace.md.
    • Review fixes ahead of kpu-gen (esg#107): perf counts a load clock where the previous block’s last element leaves; an unmapped first-error command type is recorded, not a crash; --svg keeps the dots in a bundle’s name; an unfinished bar ends at the last recorded clock; a fuzz program without its decoys is refused; the stream check uses the streaming flag to catch a block replaced before its last element left.
  • The tile’s queued and forward-hit status outputs (#52, 2026-11-17; the systolic part of branes-ai/embodied-ai-soc-generator#85, kpugen PR #93).

    • Queued ports. SystolicTop gains bm_in_queued, bm_out_queued and streamer_queued: a process has a command at its queue’s head, waiting for its credits and tokens or for its process to be ready. tests/unit/test_trace_hooks.py checks that a command waiting on a token stays queued and unstarted.
    • forward_hit. The Combiner’s new output: an accumulate commit took its row from the pipeline’s recent commits, not the bank. test_combiner.py checks it, and the file is now identical to kpugen’s.
    • Not ported. kpugen’s perf summary (kpu_gen.trace.perf, the reference runs and the CLI) has no counterpart here.
    • Docs fix. SystolicTop’s docstring now names the per-process ports with the #43 names.
  • The tile’s first error, captured behind the sticky error bits (#51, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#84 part 1, kpugen PR #88).

    • Error kinds. The scratchpad, SlotPool and the Streamer gain an error_kind output: the first error’s kind, stable from the clock their sticky bit rises. Examples are both reads in one group, a busy bank, a slot released without a wait, or a stream buffer loaded without its credit.
    • The capture. SystolicTop latches the first event, a bit rising or an AXI error response, in err_info: the source, the kind, the command (type and ID, once its process has started one; for an impossible slot, the command at the head of its queue), and MULTI for a second source in the same clock. err_cycle holds the clock, from the new free-running cycle, and err_rearm re-arms the capture.
    • Decoding. errors.py holds the tables, and FirstError.decode turns err_info into names. tests/unit/test_first_error.py checks every source.
    • systars-only. kpugen’s CSRs (ERR_INFO, ERR_CYCLE, CYCLE) and its runtime’s reporting have no counterpart here.
    • A review fix ahead of kpugen (esg#106). A SYNC fault at a command’s completion (a signal or a release) now names the command that completed, not the one started last or waiting at the queue head (SlotPool.error_at_completion).
  • The Combiner replaces the accumulator (#38, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#74, #75, #76 and #77, kpugen PRs #78, #79, #81 and #82). A unit on the result path between L1 and L2, in four parts:

    • The merge (memory/combiner.py). Result rows go into L2’s result group of 1R1W pipelined banks, as an overwrite or an accumulate. Commits are in order, one per clock; the last combiner_latency commits are forwarded, so back-to-back K blocks onto the same rows see each other’s sums. STORE reads in the clocks the merge leaves free (combiner_read_ready).
    • The epilogue (memory/epilogue.py), on a reduction’s final commit: requantization (scale, round-to-nearest-even shift, saturation to input_bits) and the SFU bank (NONE, RELU, RELU6, CLIP), in either order.
    • MXINT8 (memory/mx.py). A finished row is encoded as OCP Microscaling blocks of min(32, C) with one E8M0 scale each, packed in place.
    • Four profiles, named by each final COMPUTE’s epilogue code (EPILOGUE_FINAL, profile index). SystolicTop takes them on cmb_scale_<n>, cmb_control_<n> and cmb_clip_<n> (kpugen’s tile: CSRs). Matmul reads its profile’s format at START, so C’s element size and STORE’s row bytes follow; Conv2d refuses a narrow or MX profile. SystolicTop.busy covers the Combiner’s pipeline.

    The docs (docs/architecture/combiner.md, the lineage page, NOTICE, README, CLAUDE.md) no longer describe a Gemmini-style accumulator. Review fixes ahead of kpugen (esg#105): when requantizing first, a CLIP bound outside the narrow range now saturates the narrow result instead of wrapping it (RTL and model), and the post-SFU result is held at max(16, input_bits) bits. #38 stays open, as esg#68 does, for MXFP8 and fusing the bias (today a LOAD into the result group).

  • A banked L2 of two bank groups of 1R1W macros (#17, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#24, kpugen PR #73). The scratchpad is now built the way real SRAM macros allow, in place of the idealized model whose every bank had two read ports.

    • Two bank groups by address half. A below l2_group_rows, B above. The ISA’s TileBuffers places A slots in the A group and B slots in the B group, so the Streamer’s two reads of a clock never share a macro (OS, WS and IS).
    • Banks. Each group’s rows interleave over l2_group_banks 1R1W pipelined banks, max(l2_bank_occupancy, ceil(group rows / l2_macro_rows)); any count, not only powers of two. Writes have their own port and never wait.
    • Conflict monitor. A crossbar connects the two read ports to the groups, and a sticky bank-conflict monitor (SystolicTop.l2_error) flags both reads in one group, a busy bank, or a row past L2.
    • Reference model. The idealized model stays as the reference (l2_ideal): a long GEMM gives bit-identical C in the same cycles on both, in every dataflow.
    • Config. sp_banks is now derived (two groups of l2_group_banks). LocalAddr’s scratchpad bank decode moved into the L2 layout: an L2 address is a linear row. New fields: l2_bank_occupancy, l2_macro_rows, l2_ideal.
    • systars-only. The cocotb systolic_top bench places its B tiles at B_BASE, the B group’s first row. kpugen’s L2_B_BASE CSR and runtime changes have no counterpart here. New page: docs/architecture/l2.md.
  • Lineage and credits (2026-11-16). A new Lineage page sets out where systars’s method comes from: Karp, Miller and Winograd’s uniform recurrence equations, and Moldovan’s, Quinton’s and S. Y. Kung’s space-time mapping with a schedule vector τ and a projection P. It shows OS, WS and IS as three projections of matrix multiply under one linear schedule, and the hexagonal array as a fourth. The free schedule max(i, j) + k, which no τ produces, is the kind of schedule the KPU executes and a systolic array cannot (after branes-ai/domain_flow). The page credits Gemmini for the execute command set, the local address encoding and the accumulator, and the module docstrings of those three point to it. New NOTICE (Gemmini’s BSD-3 notice) and CITATION.cff (SYSTARS 1988 as the preferred citation, the foundations as references). The README’s Acknowledgments become “Lineage and credits”, and the 2025 implementation plan is marked historical.

  • Onboarding documentation (2026-11-16). New pages for engineers joining the project: Introduction (systolic arrays, the wavefront, the 1988 SYSTARS lineage and the link to the KPU), Your first week (setup, running the array, exercises, the verification layers and a map of current, legacy and side-package code), The systolic tile (the data path, memory levels, processes, the three dataflows and current limits, with a data path diagram), Key ideas and a glossary. The landing page links them, and the site’s Getting Started group opens with them. The README’s component table, default dataflow, project structure and roadmap now match the code, and examples/README.md lists the directories that exist.

  • Docs: the Combiner (2026-11-14, #38). A new concept for the KPU tile, defined for kpugen (branes-ai/embodied-ai-soc-generator#68), that systars and kpu-sim don’t have yet. It is a unit on the result path between L1 and L2. It merges intermediate partials (the WS/IS reduction across K blocks), fuses bias, activation, scaling and block-format conversion as results are written to L2, and replaces the accumulator: the KPU tile has no separate accumulator. docs/architecture/combiner.md compares it with today’s accumulator, which has no scaling despite its header’s diagram. The README and CLAUDE.md point to it. In kpu-sim the Combiner is the Vector Engine, renamed (stillwater-sc/kpu-sim#429); its activations run on SFU banks, and its first block formats are OCP Microscaling (MX), MXINT8 first, then MXFP8.

  • cocotb: Matmul and Conv2d on the Verilated SystolicTop (#12, 2026-11-10; port of branes-ai/embodied-ai-soc-generator#19). A new systolic_top target (4x4, OS, WS and IS, systars.targets.systolic_top_config) and bench, verif/cocotb/tests/systolic_top/. tb/isa.py records an ISA instruction’s command stream in the Amaranth simulator, and the test pushes it onto the tile’s command port as a host would, without waiting for completions. tb/axi.py serves the AXI master from a byte array and rejects any burst that crosses a 4 KB boundary. Eleven tests:

    • a 9x7x10 Matmul tiled in M, N and K, in each dataflow, plain and with a bias row and accumulate;
    • a Conv2d with padding, stride, dilation, odd channel counts and a bias;
    • LOADs, STOREs and a WS GEMM across 4 KB boundaries;
    • an OS and a WS GEMM issued command by command.

    Each checks the result against a reference and that every other byte is untouched. kpugen drives its tile through CSRs and builds one tile per dataflow; here commands go straight onto the command port and one build runs every dataflow. just test-cocotb runs the new suite, and just lint-rtl waives CASEINCOMPLETE (Amaranth FSMs, as kpugen does) and SYMRSVDWORD (the interrupt port).

  • Accumulator loads: Matmul and Conv2d with a bias or accumulating onto the output, and padding without a zero row (#10 in #30, 2026-11-08; realigned with branes-ai/embodied-ai-soc-generator#47 by #32, 2026-11-09). A LOAD whose local address has bit 31 set moves its rows into the accumulator, and with bit 30 also set adds them onto the accumulator’s rows. It writes in the clocks the Streamer leaves the shared write port free, and is the accumulator slot pool’s second producer (SlotPool(producers=2)). New LOAD opcodes: CLEAR writes zero rows with no L3 read, and BROADCAST/BROADCAST_TRANSPOSE read one row and write it to every row. With these:

    • Matmul computes C = A @ B + D (D a matrix, or with CONFIG_D_STRIDE = 0 one row added to every row of C) and C += A @ B, in OS, WS and IS;
    • Conv2d adds a bias row under every output position, accumulates onto Y, and writes padded positions with CLEAR instead of reading a zero row.

    UNSUPPORTED_BIAS and UNSUPPORTED_ACCUMULATE are gone, and Conv2d ignores CONFIG_ZERO_ADDR. docs/isa-instructions.md, “Bias and accumulate”.

  • The PolarFire flow drops memory initial values too, and a test runs GEMMs from random memory (#27, 2026-11-06; kpugen parity, branes-ai/embodied-ai-soc-generator#38). The polarfire prep in just synth is now proc; delete t:$meminit_v2; attrmap -remove init;, the same as kpugen’s, whose tile accumulator otherwise lands in initialized flip-flops. On hardware, memories start unspecified, not at zero: the design never reads a scratchpad or accumulator word before writing it, and the host must write before it reads (docs/development-workflow.md, “Synthesis”). test_no_read_before_write (tests/unit/test_gemm_systolic.py) fills every scratchpad and accumulator word with full-width random data and checks OS, WS and IS GEMMs, including COMPUTE_ACCUMULATE, stay exact; tests/unit/test_targets.py checks that no target carries memory contents. The scratchpad and accumulator banks (and SystolicTop) keep references to their memories for testbenches; the hardware is unchanged.

  • just synth <target> for every module, and a PolarFire target (#25, 2026-11-06). systars.targets is the one list of RTL targets (name, top module, factory) that just gen, just synth and CI read (python3 -m systars.targets list), ported from kpugen. just gen now also writes the Scratchpad and the Accumulator. just synth generic|ice40|ecp5|polarfire maps every target onto the device’s cells and prints the counts, and just synth-report writes the resource report. The PolarFire flow is Yosys’s synth_microchip -family polarfire, after dropping the registers’ init values, which PolarFire flip-flops don’t have. CI’s synthesis jobs now call these recipes, with polarfire added to the matrix, instead of synthesizing only the PE inline. The PolarFire plan has Yosys’s counts for a 16x16 array.

  • Wavefront animations: a 2x2 -> 4x4 -> 16x16 progression from the RTL (#23, 2026-11-05). systars.wavefront records one tile or several back to back, started on the Streamer’s schedule (streamer_starts, checked against the Streamer in tests/unit/test_execute_controller.py), and checks every cell by value, so any array size works, with any operands that fit the PE’s input widths (label_operands and its int8 limit are gone; A @ B is checked in int64, so int8 operand arrays don’t wrap). render_svg draws a value view (operands, running sums, C filling in, C == A @ B on screen), an index view (kN / mN, with the L1 stream buffers feeding the edges) and a front view (cells coloured by k / m, results moving north, PEs busy per clock), with captions that name the clock and phase and that dwell on the first product, the first result and each next tile. Each cell is one SMIL animation, and cells that step through the same colours share one, so the 16x16 three-tile OS animation is about 320 KB. Theme-aware colours (prefers-color-scheme) and a viridis palette. STAGES defines the docs’ progression. scripts/gen_wavefronts.py / just wavefronts write the committed SVGs in docs/wavefront/, and just wavefronts-check and tests/unit/test_wavefront.py fail when they are stale. examples/gemm/08_rtl_wavefront.py gains --stage, --view, --tiles and --small. The wavefront page is rewritten around the progression: the reduction (2x2), the stagger from the L1 stream buffers (4x4) and the schedule (16x16, back-to-back tiles and the north drain), OS beside WS; the textbook model (examples 02, 03) is now a labelled aside. docs/rtl-wavefront-{os,ws}.svg are replaced.

  • A registered fabric, L1 stream buffers and a bubble-free Streamer (#15, 2026-11-03; ported from branes-ai/embodied-ai-soc-generator#21). Every PE has an input register on each link, so values move one PE per clock and a PEArray is only a structural grouping (8x8 up to 64x64 PEs). OS results move north on the last marker into L1 result buffers; first overwrites, so a reduction spans commands (cmd_chain) with C held in the PEs. WS and IS share one stationary mode. L1 (memory/stream_buffer.py): one-block stream buffers per row and column with one credit each, whose staggered starts are the skew, and result buffers that turn columns back into rows. The Streamer (controller/execute.py) starts a command only when the fabric can take it on schedule and never stalls: with K >= R, C tiles stream back to back, and a reduction’s end waits for the north drain (2R - 1 clocks between reductions, free with K >= 2R - 1). It reports each command’s L2 release (exec_completed, once its last block is in L1) and its result (exec_result) separately; l1_error is sticky. Matmul runs OS, WS or IS (CONFIG_DATAFLOW, OS by default), laying tiles out with the corner turns; Conv2d runs OS. tests/unit/test_execute_controller.py, test_stream_buffer.py, test_systolic_array.py, test_gemm_systolic.py

  • Corner turns in the BlockMover (#15; ported from branes-ai/embodied-ai-soc-generator#21). LOAD and STORE take the new DmaOpcode.TRANSPOSE (0x04), a MEMCPY that turns one tile’s rows into its columns through a corner-turn buffer of one tile: LOAD writes the tile column-major into L2 (one L2 row per L1 stream buffer, for OS’s B, WS’s A and IS’s stationary A), and STORE turns an input-stationary result (columns of C) back into row-major rows in L3. Any address, stride and partial rows, as MEMCPY; len is clamped to one tile. tests/unit/test_block_mover.py

  • Credits and tile-ready tokens (#9, 2026-11-02; ported from branes-ai/embodied-ai-soc-generator#16). SystolicTop queues each process’s commands (BlockMover LOAD and STORE, Streamer) and dispatches a queue’s head only when its credits and tokens are there (controller/sync.py: SlotPool, Sync). L2 and the accumulator hold whole tiles in slots (l2_slots, acc_slots), one credit each; a command’s cmd_sync acquires and signals the slot it fills and waits for and releases the slot it reads. Matmul and Conv2d push their commands ahead with no completion round trip, double-buffered (buffers=2): an 8x8x16 Matmul on a 4x4 array drops from 1091 to 686 cycles with bit-identical results. New ports: cmd_sync, {load,store,exec}_started[_id], the slot state bits and sync_error. tests/unit/test_credits.py

  • The BlockMover moves a tile from or to any byte address (#8, 2026-11-02; ported from branes-ai/embodied-ai-soc-generator#14). Following the KPU’s CSP model (kpu-sim), the AXI port is SystolicTop’s link to L3 and LOAD/STORE are the BlockMover’s two legs. A LOAD or STORE now moves a whole tile: len rows, stride bytes apart (cmd_stride; 0 = one beat), row_bytes bytes each (cmd_row_bytes; 0 = a whole row). A row may start at any byte (a 1- or 2-beat burst, shifted into place); a loaded row is zero-filled past row_bytes, and a stored row writes only its own bytes, with AXI byte strobes (StreamWriter.data_strb). Consecutive beats from a beat boundary still stream as one burst (up to 256 beats). tests/unit/test_block_mover.py. Bursts were not yet split at 4 KB boundaries; that is fixed by #11 (see Fixed)

  • Matmul and Conv2d on dense layouts (#8): Matmul computes any M, N and K with dense row-major A, B and C at any address, and Conv2d dense NHWC X, F and Y, both verified end to end through a real SystolicTop. They issue one LOAD per operand tile (Conv2d: one per output position, and one per filter tile) and one STORE per output tile

  • RTL wavefront animation (src/systars/wavefront.py, examples/gemm/08_rtl_wavefront.py, 2026-11-01; ported from branes-ai/embodied-ai-soc-generator#12). Runs the real SystolicArray in simulation, records what every PE sees in every cycle, and checks every PE in every stream cycle (and out_last, and the result) against the predicted wavefront. Renders text frames and an animated SVG, each cell showing which k or m is there (read back from the RTL’s values), with the PEArray boundaries marked. tests/unit/test_wavefront.py runs the check on 7 shapes, OS and WS, and shows that a skew bug is caught. Two SVGs are in the wavefront page (since replaced by the progression, #23). The existing examples 02–05 animate a Python model, not the RTL

  • The tile’s bursts never cross a 4 KB boundary (2026-11-09, #11; port of branes-ai/embodied-ai-soc-generator#18). AXI forbids a burst that crosses one, and the BlockMover’s LOAD and STORE legs could issue them. A streamed burst now ends at the boundary. A row that spills from the last beat of a 4 KB page into the next is now two 1-beat bursts; a STORE issues the second once the first is acknowledged.
    • The unit AXI memory model (tests/unit/_axi.py) asserts that no read or write burst crosses 4 KB, and that WLAST marks a write burst’s last beat. It can also log every burst. AXI_4KB is in the new systars.dma.axi.
    • New tests: rows spilling across a boundary and streamed tiles crossing one, for both LOAD and STORE, and a GEMM with each operand straddling a boundary (TestFourKBoundaries in tests/unit/test_block_mover.py). kpugen’s cocotb systolic_tile tests have no systars counterpart yet (#12).

The Matmul and Conv2d ISA instructions issue commands the tile executes (2026-11-01)

Section titled “The Matmul and Conv2d ISA instructions issue commands the tile executes (2026-11-01)”

Ported from branes-ai/embodied-ai-soc-generator#11, items 4–6 of #2. They emitted private opcodes (EXEC_PRELOAD 0x01 and EXEC_COMPUTE 0x02, which the execute controller does not decode, while their LOAD_A 0x10 is its PRELOAD), a CONFIG dataflow of 0/1/2 that the controller reads as 0/1, and scratchpad and accumulator addresses with the bank in bank << 16, where the memories decode it from the low bits. Now:

  • both issue on a shared command port (isa/command.py): the target controller (cmd_type) and that controller’s own opcode (DmaOpcode, ExecOpcode), with SystolicTop’s fields. connect_to_top wires an instruction to a SystolicTop
  • they issued one command at a time and waited for its completion (cmd_completed); since #9 they push commands ahead, ordered by credits and tokens
  • both run weight-stationary, loading one matrix row per scratchpad row at its exact address, with tile buffers at consecutive LocalAddr rows
  • Conv2d addressing: the output position (batch, row, column) of each M-tile row was never decoded, the kernel offsets were dropped, and stride, padding and dilation were never applied. Conv2d is now an implicit GEMM: one K tile per kernel offset and chunk of input channels, each row loading the input pixel that offset reads, or a zero row (CONFIG_ZERO_ADDR) in the padding. Its M-tile counters are 40 bits wide (batch * out_h * out_w overflowed 16)

tests/unit/test_matmul.py and tests/unit/test_conv2d.py run the issued commands through a Python model of SystolicTop (tests/unit/_isa.py) and match numpy; Matmul also drives a real SystolicTop to a correct C. See ISA instructions.

SystolicTop computes a GEMM end to end (2026-11-01)

Section titled “SystolicTop computes a GEMM end to end (2026-11-01)”

Ported from branes-ai/embodied-ai-soc-generator#9, items 1–3 and 7 of #2. SystolicTop now runs LOAD A and B, CONFIG, PRELOAD, COMPUTE and STORE C to a verified A @ B, output-stationary and weight-stationary. The previous execute path could not:

  • B was never read: both operands shared the scratchpad’s one read port, and the address mux preferred A. The scratchpad has a second read port (in every bank), and A and B stream at one row per cycle
  • COMPUTE never completed: it waited for an out_last pulse that had already passed, and dropped the outputs produced meanwhile
  • A, B and control were skewed inconsistently: A was registered in every PE and at PEArray boundaries, B only at boundaries, and valid not at all across PEArray columns. Now every signal crossing a PEArray boundary passes through one register, and SystolicArray skews its inputs and deskews its outputs itself
  • B-stationary held no weight: the PE multiplied the incoming partial sum. The PE now has a weight register, loaded by PRELOAD, and partial sums flow down
  • OS results could not be read out: the PE ignored in_d in OS. Results now drain down each column through a shift chain, bottom row first
  • The tile’s control is organised as CSP processes, one per hop (#44, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#98, kpugen PRs #100 and #101).

    • One BlockMover (controller/blockmover.py). Its inbound leg (BlockMoverIn, L3 → L2 or the Combiner) and outbound leg (BlockMoverOut, the Combiner → L3) share the tile’s one L3 port with their engines. SystolicTop has one blockmover submodule in place of four.
    • The result path (controller/result_path.py) is a process of its own, the L1 → L2 hop. ResultPath holds L1’s result buffers (north, south), the result tiles’ descriptors and the row writes into the Combiner. It emits each tile’s result (was streamer_result), on which SystolicTop emits the Combiner slot’s token. The Streamer keeps L2 → L1 → fabric and describes each producing COMPUTE’s result tile to the result path as the command starts.
    • Firing rules. Each process’s docstring states its inputs, firing rule, outputs and the credits it returns, and SystolicTop‘s has the tile’s hop table. l1_error and the first-error capture merge both processes’ L1 errors.
    • Unchanged. The command interface is still one stream (cmd_type names the process). No behaviour changes: the schedule tests, which check exact clocks, pass unchanged.
    • Ported 1:1. blockmover.py, result_path.py and test_result_path.py are identical to kpugen’s. This was possible because #34, #17, #38, #51, #18 and #52 realigned the files first.
  • The tile’s hooks for a trace (#18, part: the systolic RTL of branes-ai/embodied-ai-soc-generator#27, kpugen PRs #91 and #92). SlotPool gains a reading output beside free and ready. SystolicTop builds its submodules in __init__ (systolic_array, scratchpad, combiner, stream_reader, stream_writer, bm_in, bm_out, streamer, l2_slots, combiner_slots), and the Streamer builds its L1 buffers there (a_buf, b_buf, north, south, w_buf), so a testbench or a trace’s probes reach their signals before a simulation starts. tests/unit/test_trace_hooks.py checks them. The generated Verilog changes only by the reading wires. kpugen’s trace package (lanes, recorder, rendering, checks) isn’t ported here; it builds on the tile-flow recorder (#14), and #18 stays open for it.

  • Nearest-neighbour weight loading, overlapped with compute (#34, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#55, kpugen PR #56). The fabric no longer broadcasts a weight-shift enable. A weight travels down its column’s chain with a w_valid marker, one PE per clock. Each PE takes it into a shadow register and passes the old one south. A stationary stream’s first element (first) swaps the shadow in, so the weights change with the wavefront.

    • PRELOAD beside the stream. PRELOAD goes through new north-edge L1 weight buffers, with its own issue path on the scratchpad’s B port, running beside the stream on port A. It doesn’t wait for the previous stream, so WS and IS tiles with new weights stream back to back when M >= max(R, C). Before, every weight change cost about 2R + C - 1 idle clocks (5 on 2x2, 11 on 4x4).
    • Breaking: PRELOAD’s L2 tile is column-major (C rows, row j = W[:, j]). Matmul’s WS now loads B with TRANSPOSE and IS loads A with MEMCPY. A host that lays out its own stationary tile must do the same.
    • Static and registered signals. in_control_dataflow is documented static configuration, registered once per PEArray. out_collision is a registered OR tree, so the sticky error is set one or two clocks late.
    • Events. A PRELOAD’s completed event may come before that of the COMPUTE ahead of it, so completed is no longer in command order. The L2 credit is returned by the slot cmd_sync names, and result events stay in command order (docs/isa-instructions.md).
    • New structural test. tests/unit/test_fabric_structure.py checks on the elaborated PEArray and SystolicArray that every cell input comes from its neighbour or its own edge.
    • Wavefront views. They draw the weights coming down the chains (wN), and the WS animations are regenerated. systars’s progression (wavefront.py) was ported by hand, since kpugen has the earlier, single-tile recorder.
  • The control processes carry the KPU model’s names (#43, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#97, kpugen PR #99). LoadController, StoreController and ExecuteController become BlockMoverIn (the BlockMover’s L3 → L2 leg, a LOAD), BlockMoverOut (its L2 → L3 leg, a STORE) and Streamer (L2 → L1 → fabric, an EXECUTE), in controller/blockmover_in.py, blockmover_out.py and streamer.py. TransposeLoadController becomes TransposeBlockMoverIn. SystolicTop follows:

    • the bm_in, bm_out and streamer submodules;
    • the per-process ports {bm_in,bm_out,streamer}_{busy,started,completed};
    • streamer_result.

    The shared names stay: the LOAD/STORE/EXECUTE command types and SystolicConfig’s queue lengths. The tests (test_blockmover_in.py, test_blockmover_out.py, test_streamer.py) and docs follow. The generated Verilog differs from main only in names.

  • SystolicConfig lost the 16 fields no RTL read (#42, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#96). They were Gemmini’s array options, carried over by SYSTARS:

    • the reservation-station sizes (rs_entries_*);
    • the feature switches (has_*);
    • the pipeline delays (tile_latency, array_output_delay);
    • output_bits, sp_singleported, combiner_sub_banks, combiner_singleported, blockmover_maxbytes and max_in_flight_reqs, with the unused max_block_len* properties.

    The presets lose their values for them. ld/st/ex_queue_length stay, since they size the processes’ command queues. tests/unit/test_config.py checks that the RTL reads every config field, from the syntax trees (a comment or docstring is no read, a property’s reads count). The generated Verilog is unchanged.

  • The tile’s blocks carry the KPU model’s names (#37, 2026-11-17; port of branes-ai/embodied-ai-soc-generator#67, kpugen PR #72). A rename only: the Verilog differs from main only in names.

    • The accumulator is the Combiner’s storage: memory/accumulator.py → memory/combiner.py (Accumulator, AccumulatorBank → Combiner, CombinerBank); acc_capacity_kb, acc_banks, acc_sub_banks, acc_singleported, acc_latency, acc_slots → combiner_*; LocalAddr.is_acc / IS_ACC_BIT → is_combiner / IS_COMBINER_BIT; SystolicTop’s acc_free / acc_ready → combiner_*. acc_bits keeps its name: it is the MAC’s accumulate width.
    • dma/ → blockmover/: the engines keep their names. DmaOpcode, DmaFlags and DmaDescriptor become BlockMoverOpcode, BlockMoverFlags and BlockMoverDescriptor; dma_buswidth and dma_maxbytes become blockmover_*; the controllers’ dma_* ports become engine_*. AXI_4KB moves to systars.blockmover.axi.
    • The gen target and cocotb suite accumulator are now combiner, as are the just test-cocotb loop and the CI matrix. docs/architecture/dma-descriptors.md is now blockmover-descriptors.md, and the docs follow.
  • The implementation plan’s layout (2026-11-17). docs/plan/implementation.md showed the pygemmini/ layout the project was first planned in. It now shows the repository as it is, with each module’s role, and a table of the planned modules that were not built or were built differently (the reservation station became controller/sync.py, LoopMatmul and LoopConv the ISA instructions). The code sketches drop the pygemmini/ prefix. The lineage page and CITATION.cff give the Yale dissertation’s year, 1993.

  • CI calls the just recipes just ci runs (#29, 2026-11-10). lint.yml runs just lint-python, just format-check, just typecheck, just gen and just lint-rtl, so CI now lints every generated target, not only the PE, with the justfile’s waivers. test.yml runs just test-unit and, on Python 3.11, just test-cov xml in its place (the suite ran twice there before). Its cocotb job is now one job per suite (just test-cocotb-component): pe, pe_array, systolic_array, scratchpad, accumulator and systolic_top, where only pe ran before. No workflow generates RTL with inline Python any more. The “Amaranth Simulation Tests” job is gone: it re-ran the unit tests matching -k sim. just test-cov takes the report format (default html). docs/development-workflow.md, “Running the Full Test Suite”.

  • Accumulator loads follow kpugen’s design (#32, 2026-11-09). #30 implemented #10 systars-first, and kpugen’s esg#47 then resolved esg#17 differently. systars now ports esg#47, so the systolic files are 1:1 again:

    • the opcodes are renumbered: CLEAR = 0x05, BROADCAST = 0x06 (they were 0x06 and 0x05), and BROADCAST_TRANSPOSE = 0x07 is new;
    • the accumulator slot’s LOADED state and cmd_sync’s RESUME bit are gone. A LOAD into the accumulator takes the slot’s credit as the pool’s second producer, and the in-order LOAD queue orders it before the COMPUTEs;
    • Matmul supports a bias and accumulating in IS, and both together;
    • CONFIG_ZERO_ADDR is back as an ignored register;
    • LocalAddr bit 30 on a LOAD into the accumulator adds the rows.
    • tests/unit/test_credits.py replays LOADs into the accumulator as that pool’s producer, cycle by cycle on a real SystolicTop, for Matmul with a bias, accumulate or both in every dataflow, and Conv2d with a bias row, with and without accumulating onto Y (a review of #33; kpugen’s file has the same gap).
  • The GitHub Pages site is built with Astro Starlight (#20, 2026-11-04), the same setup as stillwater-sc/universal and stillwater-sc/mtl5, replacing MkDocs. Pages are still written in docs/; docs-site/sync-content.mjs generates the site’s content from them and from this changelog, and fails on a relative link that resolves to nothing or a top-level page with no place in the sidebar. starlight-links-validator fails the build on a broken internal link or anchor. just docs / just docs-serve build and serve the site (Node >= 22.23.4). CI builds it on docs pull requests and deploys it from main with SHA-pinned actions. Removed: mkdocs.yml and the docs extra in pyproject.toml. Fixed: the README’s link to the implementation plan.

  • Streamer commands (#15): OS COMPUTE takes an A tile row-major and a B tile column-major, K <= KB per command (chain longer reductions); stationary COMPUTE streams a column-major tile. The array’s latency contract is replaced by per-edge result clocks (SystolicArray.os_result_clock, stationary_result_clock); the shift-chain ports in_d/out_c become in_w/out_w and the north results out_c/out_c_valid.

  • Conv2d runs output-stationary (#15): an array without OS (LEAN_CONFIG, CHIP_CONFIG) cannot run Conv2d until a column-write LOAD exists (branes-ai/embodied-ai-soc-generator#25).

  • A consumer takes a slot’s token at its start (#15): SlotState.READING, so with several Streamer commands in flight the next consumer of a slot waits for the next tile’s token. Measured, 8x8x16 Matmul on a 4x4 array: 907 -> 744 cycles with one and two buffers (was 1091 -> 686): the Streamer returns L2 early, and the run is BlockMover-bound.

  • ISA command port (#9): cmd_completed is replaced by cmd_store_completed (an instruction only needs to know its STOREs are done) and the port gains cmd_sync. SystolicTop.cmd_ready now means the target process’s queue has room, not that its controller is idle, and {load,store,exec}_busy include queued commands. Matmul and Conv2d place tiles in ring-ordered slots (isa.command.TileBuffers) instead of fixed scratchpad rows, and take buffers (default 2)

  • ISA layout check (#8): require_beat_aligned is gone from Matmul and Conv2d, and START reports UNSUPPORTED_LAYOUT only for a zero stride or output rows that would overlap. C and Y rows no longer need to hold whole N tiles. The ISA examples use dense operands (07_isa_matmul.py loses --any-layout)

  • Bank counts (#8): sp_banks and acc_banks must be powers of two, and one bank takes no address bits. With one bank, every other row selected a bank that did not exist; with a count that is not a power of two, some rows did

  • ISA instructions: InternalOpcode and the dbg_sp_bank_*/dbg_acc_bank ports are gone; cmd_rs1/cmd_rs2/cmd_rd are 32-bit and carry execute operands only. START reports UNSUPPORTED_LAYOUT when the DMA could not move a row (today N and K must each fit one tile for Matmul, and real convolutions do not fit; require_beat_aligned=False skips the check), and UNSUPPORTED_BIAS for a bias. UNSUPPORTED_ACCUMULATE rejects the accumulate option (CONFIG_OPTIONS bit 0): C or Y is never loaded into the accumulator, so it would have added stale rows from an earlier tile or instruction. Conv2d gains CONFIG_ZERO_ADDR, and CONFIG_Y_STRIDE is the byte distance between output positions. The ISA examples (examples/gemm/07_isa_matmul.py, examples/conv/01_isa_conv2d.py) are rewritten against the new port, with a cycle limit

  • Execute semantics: COMPUTE overwrites its destination rows and COMPUTE_ACCUMULATE adds to them. OS computes C[R x C] = A[R x K] @ B[K x C] from Aᵀ and B rows; WS computes C[M x C] = A[M x R] @ W with W loaded by PRELOAD (which no longer reads the accumulator, and does nothing in OS). Details in controller/execute.py

  • PE ports: in_psum/out_psum (WS partial sums) and in_shift (shift chain); the propagate double buffer, the rounding shift, id and the PE’s pass-through registers are gone, and so is PEWithShift (unused)

  • Generated RTL: the cocotb PEArray is 2x2, and gen/systolic_array.v is a 2x2 grid of 2x2 PEArrays (4x4 PEs)

  • Unit-test simulations (tests/unit/_sim.py) end when the testbench returns, with a cycle limit as a watchdog

Bugs found reviewing the kpugen port (2026-10-31)

Section titled “Bugs found reviewing the kpugen port (2026-10-31)”

These were found in code review of branes-ai/embodied-ai-soc-generator#1, which ports this repository’s systolic stack. Each RTL fix has a test that fails on the previous code.

  • Accumulator: accumulate writes were lost when accumulate dropped after the request cycle (as ExecuteController drives it). Writes are now always pipelined, with a transparent read-modify-write read. Accumulate adds each element separately (no carries between packed elements), and activations apply per element (memory/activation.py)
  • Store/top: activation was applied twice (store ReLU + accumulator read activation driven from the live command port) and to the whole packed row. It is now applied once, per element, from the latched command. Load/Store reject rows wider than dma_buswidth (were silently truncated)
  • SystolicTop: per-controller completion ports; the summary completed drops simultaneous completions
  • ExecuteController: CONFIG decodes the latched rs1, not the live port
  • DescriptorEngine: transfers ended at half their length; multi-burst (> 256 beats) and zero-length transfers
  • StridedStreamReader / MatrixLoader: could not elaborate (Python if on a Signal), packed elements at a 32-bit stride, and MatrixLoader.busy was never driven
  • SRAMReadScheduler: missed the one-cycle read_valid pulse and hung
  • LocalAddr: make_sp_addr/make_acc_addr used the bank value’s bit length as the row shift; now instance methods using the configured bank bits
  • SystolicConfig validates row/bank geometry; Matmul/Conv2d reject non-power-of-two dims; Conv2d no longer reports IDLE in CALC_TILES; CONFIG_INPUT_DIMS comment corrected
  • Examples: int8 wraparound (03-06), scratchpad overlap in 01 for size > 16, --step crash in 02, workload-scaled cycle limit in conv 01, run_all_gemm_demos.sh runs from any directory
  • Scripts/CI: OSS CAD Suite installs through a private temp dir, with archive verification and a staged replace (bin/lib/oss-cad-suite.sh); $OSS_CAD_SUITE honoured and on PATH for just recipes (after the venv); non-root just install; docs deploy concurrency and permissions; authenticated setup-oss-cad-suite; the Verilator pre-commit hook fails on errors; pytest discovery no longer collects cocotb tests
  • Tests: PE tests now assert their results; new tests for accumulator row semantics, descriptor-engine transfers, the read scheduler, LocalAddr layout, and reader elaboration

Repository Velocity Report Script (2025-12-23)

Section titled “Repository Velocity Report Script (2025-12-23)”
  • Velocity Report Generator (scripts/repo_velocity.py): Measures development velocity across multiple repositories
    • Tracks source code files only: C/C++, Python, Go, Shell, CMake, Verilog/VHDL
    • Excludes large files (>100k lines) that are likely generated content
    • Reports: total LOC, commits, lines added/deleted, net change, contribution percentage
    • Multiple output formats: markdown (default), CSV, JSON
    • Configurable date range via --since and --until arguments
    • Supports both branes-ai and stillwater-sc organization repos

OSS-CAD-SUITE PATH in Virtual Environment (2025-12-23)

Section titled “OSS-CAD-SUITE PATH in Virtual Environment (2025-12-23)”
  • Venv Activation Script: Fixed missing Yosys/Verilator in PATH after activating .venv

    • .venv/bin/activate now automatically adds /opt/oss-cad-suite/bin to PATH
    • RTL generation (just gen) and synthesis checks now work without manual environment sourcing
  • Setup Script Enhancement (bin/setup-dev-env.sh): Auto-patches venv activation

    • New step patches .venv/bin/activate to include OSS-CAD-SUITE path
    • Idempotent: skips if already patched
    • Ensures just ci works immediately after source .venv/bin/activate

MasPar MP-2 SIMD Implementation (2025-12-21)

Section titled “MasPar MP-2 SIMD Implementation (2025-12-21)”
  • SIMD Package (src/systars/simd/): New package for classic SIMD architectures

    • Distinct from SIMT (no divergence handling, pure lock-step execution)
    • MasPar MP-1/MP-2 as first implementation
  • MasPar Simulator (src/systars/simd/maspar/): Complete MP-2 SIMD array processor

    • MasParConfig: Hardware configuration (64x64 array, 64 registers/PE, 64KB local memory)
    • PE: Processing Element with 32-bit ALU, registers, local memory
    • PEArray: 2D mesh with 8-neighbor XNET connectivity (toroidal wrap-around)
    • ACU: Array Control Unit for instruction fetch/decode/broadcast
    • MasParSim: Top-level simulator with GEMM and Conv2D support
  • Instruction Set (src/systars/simd/maspar/instruction.py): 40+ opcodes

    • Integer ALU: IADD, ISUB, IMUL, IAND, IOR, IXOR, ISHL, ISHR, IMOV
    • Floating-point: FADD, FSUB, FMUL, FFMA
    • Memory: LD, ST, LDI (load immediate)
    • XNET: 8 directions (N, S, E, W, NE, NW, SE, SW)
    • Router: ROUTE_SEND, ROUTE_RECV
    • Control: SETMASK, CLRMASK (PE masking)
    • Reduction: REDUCE_SUM, REDUCE_MAX, REDUCE_MIN
    • Comparison: ICMP_EQ/NE/LT/LE/GT/GE
  • Matrix Multiplication (GEMM): Cannon’s algorithm implementation

    • Pre-skewed data distribution for parallel execution
    • XNET shifts: A west, B north each iteration
    • Performance: 4x4 GEMM in 29 cycles (16 instructions)
  • 2D Convolution (Conv2D): 3x3 kernel support

    • Leverages XNET 8-neighbor mesh for efficient gather
    • 36 instructions: 9 LDI + 8 XNET + 1 init + 18 MAC
    • Kernels: identity, box, edge, sharpen, sobel_x, sobel_y
  • Animation Examples (examples/simd/maspar/):

    • 01_animated_maspar.py: GEMM visualization with Cannon’s algorithm
    • 02_animated_conv2d.py: Conv2D visualization with kernel selection
  • Pre-defined Configurations:

    • DEFAULT_MASPAR_CONFIG: 64x64 MP-2
    • SMALL_MASPAR_CONFIG: 4x4 for testing
    • MEDIUM_MASPAR_CONFIG: 16x16
    • LARGE_MASPAR_CONFIG: 128x128
    • MP1_CONFIG: 64x64 with 4-bit ALU (8 cycles for 32-bit ops)

SM-Level LSU with MSHR Tracking (2025-12-20)

Section titled “SM-Level LSU with MSHR Tracking (2025-12-20)”
  • SM-Level Load/Store Unit (src/systars/simt/sm_lsu.py): Restructured from per-partition LSUs to single SM-level LSU

    • Single MIO queue (16 entries) shared by all 4 partitions
    • 64 MSHRs tracking cache lines at 128B granularity
    • Primary/secondary miss optimization: multiple warps share same MSHR for same cache line
    • 1 IPC processing bandwidth to LSU pipe
    • Shared memory bypass (no MSHR tracking needed)
    • Statistics: total_primary_misses, total_secondary_misses, total_mio_queue_full_stalls
  • MSHR Data Structures:

    • MSHREntry: Tracks cache line address, state, waiters, cycles remaining
    • MSHRWaiter: Partition ID, warp ID, thread mask, destination register, thread offsets
    • MIOQueueEntry: Queued memory request with partition/warp info, addresses, data
  • Config Parameters (src/systars/simt/config.py):

    • num_mshrs: int = 64 - Number of Miss Status Holding Registers per SM
    • mio_queue_depth: int = 16 - Depth of MIO queue
    • lsu_issue_bandwidth: int = 1 - Requests processed per cycle
  • Architecture Benefits:

    • 64 MSHRs vs previous 8 outstanding requests (4 partitions × 2 pending)
    • Secondary miss optimization reduces redundant memory traffic
    • Cross-partition visibility for better load balancing
    • Matches NVIDIA’s proven SM architecture

SIMT Visualization Enhancements (2025-12-20)

Section titled “SIMT Visualization Enhancements (2025-12-20)”
  • Timeline Logging (examples/simt/01_animated_simt.py): Pipeline event tracing

    • TimelineLogger class for CSV-format event capture
    • Logs ISSUE, COMPLETE, and STALL events with cycle-accurate timing
    • --timeline FILE command line option to enable logging
    • Summary statistics printed at end of simulation
  • Store Completion Tracking: Distinguish computed vs stored elements

    • GEMMTracker now tracks pending stores per warp
    • Matrix header shows status: [computing], [ST pending: N], or [COMPLETE]
    • Summary shows both “Computed: X/Y” and “Stored: X/Y” counts
  • Updated Matrix Visualization: Clear visual state progression

    • W# (dim) = not started
    • ░░ / ▓░ = partial progress (some FFMAs done)
    • ▓▓ (yellow) = computed but ST pending
    • ██ (green) = truly complete (stored to memory)

Multi-Partition Warp Distribution (2025-12-20)

Section titled “Multi-Partition Warp Distribution (2025-12-20)”
  • Warp Distribution Bug: Fixed tiled GEMM loading all warps into partition 0 only
    • Now distributes warps across all 4 partitions (P0-P3)
    • 32×32 GEMM now uses all 128 ALU cores instead of just 32
    • Added global warp ID calculation for proper GEMM tracking across partitions
  • Memory Instruction Drops: Fixed critical bug where LD/ST instructions were silently dropped
    • When LSU queue was full (max_pending=2), issue() returned False and instruction was lost
    • Warps continued executing with garbage register data, causing incorrect results
    • Fix: Added pending_memory_requests buffer to retry rejected instructions on subsequent cycles
    • Warps now properly stall until their memory request is accepted by LSU
    • Added total_lsu_rejections statistic to track queue-full events
  • Matmul ISA Instruction (src/systars/isa/matmul.py): High-level tiled matrix multiply

    • Configuration interface: dimensions (M, N, K), addresses, strides, options
    • Automatic dataflow selection: Output-Stationary, A-Stationary, B-Stationary
    • Tiled computation with edge tile handling for arbitrary matrix sizes
    • Internal command generation: LOAD_A, LOAD_B, LOAD_D, EXEC_CONFIG, EXEC_PRELOAD, EXEC_COMPUTE, STORE_C
    • Backpressure handling via valid/ready handshake on command interface
    • Double buffering with bank toggling for latency hiding
  • ISA Module (src/systars/isa/__init__.py): New ISA instructions package

  • Matmul Example (examples/gemm/07_isa_matmul.py): Interactive demonstration

    • Shows configuration, tiling, command generation, and dataflow selection
    • Supports configurable M, N, K dimensions and array size
    • Validates command counts against expected values
  • Matmul Unit Tests (tests/unit/test_matmul.py): 13 comprehensive tests

    • Configuration interface tests
    • Address calculation for tiled operations
    • Dataflow selection heuristics
    • Command emission verification
    • Backpressure handling
    • Double buffering bank toggling
    • Multi-tile execution
    • Bias loading (LOAD_D)
    • Error handling
  • Implementation Plan (docs/plan/isa-instructions.md): Design documentation for Matmul and Conv2d

  • Multi-Architecture Structure: Reorganized src/systars/simt/ to support multiple architectures

    • simt/nv/: NVIDIA Streaming Multiprocessor (current implementation)
    • simt/nv_v1/: Legacy NVIDIA SM with per-partition LSU bug
    • simt/amd/: AMD RDNA/CDNA placeholder (NotImplementedError)
    • simt/maspar/: MasPar MP-1/MP-2 placeholder (NotImplementedError)
  • Backward Compatibility Layer (src/systars/simt/__init__.py):

    • Re-exports all NVIDIA symbols for existing code: from systars.simt import SMSim
    • Explicit architecture selection now possible: from systars.simt.nv import SMSim
  • Common Protocols (src/systars/simt/base.py):

    • ProcessorSim: Protocol for top-level processor simulation
    • MemorySubsystem: Protocol for memory read/write operations
    • SIMTConfigBase: Abstract base for architecture configurations
  • Round-Robin Warp Distribution Fix:

    • Changed from sequential fill (P0=8, P1=8, P2=2, P3=0 for 18 warps)
    • To balanced round-robin (P0=5, P1=5, P2=4, P3=4 for 18 warps)
    • Fixed in both sm_controller.py and examples/simt/01_animated_simt.py
  • Unit Tests CI: Added OSS CAD Suite (Yosys) to unit tests job for full Verilog generation test coverage
  • Dependencies: Added numpy>=1.24 to dev dependencies for GEMM demo/e2e tests
  • Added skip-if-no-Yosys logic to 3 tests in test_gemm_demo.py and test_gemm_e2e.py
  • All 23 Verilog generation tests now properly skip when Yosys unavailable (safety net)

Skew Buffer Timing Visualization (2025-12-17)

Section titled “Skew Buffer Timing Visualization (2025-12-17)”
  • Interactive Step Mode: --step flag for manual single-stepping through animation
  • Dynamic Sizing: --k now defaults to --size for intuitive square matrix behavior
  • Timeline Logging: Cycle-by-cycle event log with throughput metrics after validation
  • SRAM Timing Display: Fixed k-value calculation showing k=-1 when data became valid
  • Column Alignment: Fixed Skew A (4-char) and Skew B (5-char) column width consistency
  • Dot-Value Alignment: Changed dot position to align with value ones digit
  • Dynamic Left Margin: Margin now scales with array size (7 + max_depth * 4)
  • FIFO Register Mapping: Fixed slot assignment so data enters at deepest register, not R0
    • Formula: R[d] displays fifo[d - depth + fifo_len]
  • Display Timing: All state now captured and displayed consistently after step()

Examples and Wavefront Visualization (2025-12-16)

Section titled “Examples and Wavefront Visualization (2025-12-16)”
  • Examples Framework (examples/): User-facing demonstration applications

    • examples/common/dram_model.py: Simulated DRAM with matrix load/store operations
    • examples/common/tensor_utils.py: Matrix packing, unpacking, and tiling utilities
    • examples/gemm/01_simple_matmul.py: Complete matrix multiply demo with command generation
    • examples/gemm/02_animated_wavefront.py: Terminal animation of systolic wavefront
    • examples/gemm/03_wavefront_gif.py: GIF generator for shareable animations
  • Wavefront Documentation (docs/wavefront-animation.md): Comprehensive guide

    • Theory of wavefront data flow and skewing patterns
    • Cycle-by-cycle breakdown of systolic array operation
    • Visualization tool usage and color coding guide
    • GIF generation for Slack/documentation sharing
  • End-to-End Integration Tests (tests/unit/test_gemm_e2e.py)

    • SimulatedAXIDRAM class for testing with inline AXI handling
    • Tests for load, store, execute, and full GEMM sequence
    • Verification against NumPy reference computations
  • Top-Level Integration (src/systars/top.py): SystolicTop module

    • Wires all accelerator components together
    • Command dispatch to load/store/execute controllers
    • AXI interface connection to StreamReader/StreamWriter
  • LocalAddr (src/systars/memory/local_addr.py): Unified address encoding utilities

    • Static methods for bit field extraction: is_acc(), accumulate(), read_full_row(), is_garbage()
    • Instance methods for bank/row decoding: sp_bank(), sp_row(), acc_bank(), acc_row()
    • Address construction helpers: make_sp_addr(), make_acc_addr(), make_garbage_addr()
  • ScratchpadBank (src/systars/memory/scratchpad.py): Single bank local memory

    • Configurable read latency pipeline
    • Byte-level write masking with granularity=8
    • Read/write ports with valid signaling
  • Scratchpad (src/systars/memory/scratchpad.py): Multi-bank scratchpad controller

    • Address-based bank selection routing
    • Parallel bank instantiation
    • Pipelined bank selection to match read latency
  • AccumulatorBank (src/systars/memory/accumulator.py): Single bank accumulator memory

    • Activation functions: NONE, RELU, RELU6
    • Accumulate mode (read-modify-write) for partial sum accumulation
    • Signed data storage with configurable width
  • Accumulator (src/systars/memory/accumulator.py): Multi-bank accumulator controller

    • Bank selection via address decoding
    • Activation function passthrough to banks
  • Unit Tests: 34 new tests for memory subsystem

    • tests/unit/test_local_addr.py: 11 tests for address encoding
    • tests/unit/test_scratchpad.py: 12 tests for scratchpad memory
    • tests/unit/test_accumulator.py: 11 tests for accumulator memory
  • ProcessingElement (PE): MAC unit with input/weight propagation
  • PEArray: Combinational grid of PEs with systolic data flow
  • SystolicArray: Top-level pipelined grid of PEArrays
  • SystolicConfig: Centralized configuration dataclass