Skip to content

Exp/hybrid shannon ready - #24

Merged
johnsony0 merged 55 commits into
realise-lab:dev/hybrid_systolic_heapfrom
tonykorycki:exp/hybrid-shannon-ready
Oct 23, 2026
Merged

johnsony0 merged 55 commits into
realise-lab:dev/hybrid_systolic_heapfrom
tonykorycki:exp/hybrid-shannon-ready

Conversation

@tonykorycki

Copy link
Copy Markdown

depends on #23

After PR #23, the limiting path ran through o_read_ready:

buffer compares -> shift-valid scan -> m_rd_rdy / h_rd_rdy -> o_read_ready -> user command vs pull/evict -> heap buffer decode -> shift-valid scan -> buffer register enables

The buffers' command-dependent control is now computed for both values of o_read_ready in parallel, and the real value
selects between them last. Readiness and decode run side by side instead of end to end. This is an exact rewrite (f(r) = r ? f(1) : f(0)), so behaviour is identical cycle for cycle.

xcau25p-1, 11 × 2047 trees PR #23 This PR
Fmax, 128 bit (best of 3 placer directives) 110–115 MHz 125.0 MHz (met at 8.0 ns)
Fmax, 128 bit (sweep script) 101.3 met / best 111.0 102.3 met / best 120.3
Fmax, 16 bit (sweep script) 175 met / best 181.7 176.8 met at 175 / best 187.8
Cycles per enqueue / dequeue 3.34 / 4.59 3.34 / 4.59 (identical)
Operations per µs, enqueue / dequeue ~34 / ~25 ~37.4 / ~27.2
CLB LUTs 81.1k 80.3k

Against the original design, that's 2.1x Fmax and 2.0–2.1x throughput at 128b .

Changes

hybrid_systolic_heap.sv:

  • Pull and evict split into a state-only condition (pull_ok / evict_ok) and the command-dependent part
  • A two-iteration loop computes, for each value of o_read_ready:
    • the per-buffer user/pull/evict choice;
    • the enqueue-forward and write-IB[0] decisions;
    • both 14-bit shift-valid scans.

o_read_ready then selects. Only narrow control is duplicated - 128-bit data and compares are computed once.

In the region slack table, the main->heap and heap->heap buffer paths go from about −1.0 ns to +0.1 ns at 125 MHz.

Notes

  • The gain depends on the tool keeping the late select, which it did in every run. If Fmax falls back to about 115 MHz after a tool or setting change, check this first.
  • The 11-way tree max is now the limiting path again (about −0.7 ns at 133 MHz).

tonykorycki and others added 30 commits July 11, 2026 18:36
Change run_sim.sh from using grep to check each module for compilation errors or tb errors, to checking the exit status from the tb.  Removed now-unused -o pipefail from flags . In order to see entire tb run before exiting, added an error counter to each tb, read with `$fatal` at the end to produce exit status.
…g_tb

Icarus Verilog 12.0 can't force an entire unpacked array or a single word
of one, so IB/OB/size are seeded with plain hierarchical assignments
instead. Addresses review comment from prof Rovinski on PR realise-lab#14.
Added documentation headers to all modules, matching bram_tree.sv
the restored comment contained a reference to an o_ready port that does not exist in the bram_tree.sv module. The copied comment on bram_tree_pipelined.sv also had this mistake.
Both removed, though they describe something that could be quite useful...
src files wip - my bash script didnt do quite as well on those
had to update the comments as well and fix some script failure by hand
…ay logic

The heap buffer's eviction becomes a replace on the tree and on the buffer: writing heap_IB[2] races the sorting network.
@johnsony0
johnsony0 merged commit 0dfd3b3 into realise-lab:dev/hybrid_systolic_heap Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants