The site study: ring and pool on the per-block metric

Status: in progress. The design space is scanned and the selection rule applied, the ten best designs checked at 10,000 blocks, and two pool designs run as RTL against pysim (below); six more are next at RTL (plans/aoa_buffer_pool.md). Every number on this page is pysim, model v7 (cache v7), seeds 1 to 3, 2,000 blocks a seed, unless a row says otherwise. The cycle models it rests on were measured with Vitis HLS, Vivado and xsim 2025.1 on the xczu48dr at 4 ns.

This page gathers what the study reports, in four parts: the data, the two memory designs, the metric, and the front.

Key numbers

   
The two designs (pysim, full load) pool, $R = 2$: block error 1.53%, p99 6,549 cycles, 29% of the part; ring, $R = 4$: 1.88%, 6,615, 39%
At equal memory ($R = 2$, 29%) the pool 1.53%, the ring 10.1% (its reads come back late): the ring needs twice the memory to qualify
pysim against RTL (whole DUT, 7 designs, xsim 2025.1) 5 exact in every count and per-block rate, p99 within 13 cycles; 1 was a model error, since fixed; 1 is a framework limit (three readers at once); the ranking identical
One design, 2,000 blocks pysim about 12 s; RTL about 1 hour (one search unit; 1.9 h with two)
Calibration, the whole design 43 min measured at C = 8; at C = 12 not yet timed (the replay charges 27 to 38 min, C = 8’s per-block times)
Synthesis and implementation about 9 hours of every design search, with or without pysim (a 16 × 16 search unit 2.3 h; a capture variant 8.5 to 14 min)
The optimization replayed (TPE, 30 runs) the best design in 15 to 19 tool-hours with pysim against 45 to 83 at RTL on the full trace (3.0 to 4.3 times less); RTL on 200-block traces misses it at 65% and 80%
Thresholds searched in pysim 243 evaluations in about 15 minutes, no synthesis; the derived defaults are at the optimum

The paper’s two designs

The paper compares one ring and one pool, both with catch-up and alike in everything but the memory (the pool is on the front’s small end; the ring is the same build with a ring, the smallest that qualifies): two 512-bit banks, 16 lanes, one search unit and one check unit; the ring at $R = 4$, the pool at $R = 2$. Beside them, the front’s fast end (the pool with two search units). The rest of the space is the exploration that finds them (the front, below); the variants without catch-up are one result (none qualifies), and the pool’s hold depth a note.

  pool, $R = 2$ ring, $R = 4$ pool, $R = 2$, 2 search units (fast end)
resource level 29% 39% 51%
block error against the golden (miss + false alarm) 1.53% (1.49 + 0.04) 1.88% (0.47 + 1.41) 1.09% (1.08 + 0.02)
its range over the three seeds 1.43 to 1.71% 1.32 to 2.50% 0.93 to 1.30%
block error against the truth 2.07% 2.44% 1.63%
azimuth error, median / p90 (degrees) 1.00 / 1.73 1.01 / 1.73 1.00 / 1.73
reported in a sector other than the home one 0.28% 0.37% 0.23%
block delay median / p90 / p99 (cycles at 250 MHz) 59 / 3,625 / 6,549 67 / 4,151 / 6,615 59 / 2,423 / 4,656
p99’s range over the seeds 6,484 to 6,584 6,591 to 6,659 4,520 to 4,728

pysim, model v7, full load, seeds 1 to 3, 2,000 blocks each.

  • What the detector loses by itself: the golden, with no hardware delay, against the truth – 0.52% of the occupied blocks missed, 0.04% of the empty ones reported present (means of seeds 1 to 3). The rest of the error against the truth is what the hardware adds, which is what the error against the golden measures.
  • The two stores err in opposite directions at almost the same total: the pool misses (a pulsing emitter’s block it could not hold), the ring false-alarms (a stream it kept active). The pool does it with less memory (29% against 39% of the part, block RAM bound) and the same delay.
  • The direction is equally good in all three: a median error of 1 degree, the grid’s resolution.
  • At equal memory the pool wins outright: the ring at the pool’s $R = 2$ (the same 29% of the part) has a block error of 10.1% (4.6% missed + 5.5% false alarms; p99 4,186): its slots are overwritten while their jobs wait, 161 to 184 reads a run come back late, and each late read leaves its stream’s answer stale. The ring needs twice the memory ($R = 4$) to qualify.

The data: three sectors of a ray-traced site

The workload is the ray-traced site: the Denver scene traced with Sionna RT into a pool of 6,422 positions an emitter can be heard from, three sectors of a 16-element array 40 m up, and four frequency channels, so $C = 12$ streams (stream $j = 4s + f$, sector $s$, frequency $f$). One emitter at a time occupies a frequency, anywhere on the site, and is heard in every sector it has a path to (2.1 sectors on average); its samples carry each path’s delay and its direction through that sector’s steering vector.

  • Traffic. The timing workload’s on/off process per frequency: activations, bursts (2 of the 4 frequencies at once) and pulsing episodes, scaled by a load $s$ that scales the arrivals and keeps the durations (dse.oracle.LOAD_SCAN). The scan ran loads 1.0, 0.75 and 0.5; at those, 50%, 44% and 35% of the (frequency, block) pairs are occupied (seed 1).
  • Sector gating (the siteg workloads): an arrival is searched only in the sectors within 3 dB of the frequency’s strongest. It halves the searches and loses no detection on 1,000 blocks.
  • The reference is the bit-exact golden run on the same samples: it answers every block with no delay, so what a design loses against it is what the hardware loses.

The two designs: a ring of slots and a pool of buffers

Both write the twelve streams’ blocks at two 512-bit words a cycle into the same block RAMs (two banks of 512 bits or four of 256, n_banks), and both serve jobs from the same pools of search units (the covariance and the angular scan, n_search, A lanes) and check units (n_check). They differ in what the memory promises a job.

  The ring (architecture) The pool (ring.PoolLayout)
The memory $R$ slots, each one block of every stream, overwritten in turn the same memory cut into one-stream buffers: 16 / 32 / 64 at $R$ = 1 / 2 / 4
A notified block is safe for $R - 1$ block periods, then overwritten holds its buffer until its job is answered
Overload shows as a late read: the header no longer names the job’s block; the job is lost a drop at the front: no buffer free, the block is not kept, the stream’s state unchanged
The credit a separate count (n_cred 4 or 16) the buffer itself
A header written first, read last none: a held buffer is never written
Its cost the same block RAM at equal $R$ (space.ring_ramb36)  

Catch-up is the same idea in both. While a stream’s search is out, its later blocks are not searched (the stream is pending). When the answer arrives, the result may already be stale: an emitter that left during the search is still reported present. With catch-up, the capture looks back for the first block in which the stream crossed the threshold the answer is watching, and notifies from there:

  • the ring looks through its last $R$ slots;
  • the pool holds that one block’s buffer while the stream is pending, and frees it if the answer makes it irrelevant. A stream caught up at a block’s end may hold that block too: it comes after the new job’s block and is still in its buffer. (Without that, a pulsing emitter lost a block at each catch-up: the model v6 had this gap; it is traced in plans/aoa_buffer_pool.md.)

The design space is 432 ring designs and 216 pool designs, of which 336 and 180 fit the part (516 in all):

  • n_banks 2 or 4;
  • A 8 or 16 lanes;
  • n_search and n_check 1, 2 or 4 each;
  • R 2, 4 or 8 for the ring and 1, 2 or 4 for the pool;
  • n_cred 4 or 16 (the ring only);
  • catch-up on or off.

A design’s resource level is its largest fraction of any one resource of the xczu48dr. Here that is DSPs (set by the search units) or block RAM (set by $R$).

At RTL so far (Vivado 2025.1, out of context at 4 ns; plans/aoa_buffer_pool.md, At RTL):

  • The pool’s capture closes at 4 ns at $R$ = 1 and 2, with and without catch-up (WNS +0.17 to +0.44 ns). Catch-up costs about 1,300 to 1,700 LUTs and no block RAM.
  • The pool’s end of block is 44 cycles, against the ring’s 53.

The metric: a per-block answer, and when it is final

The event metric of the earlier pages (an emitter detected or not, and its decision time) is replaced by one that scores what the detector says about every frequency in every block (score.py: block_answers, block_truth, stream_commit_cycles, score_blocks).

  • The answer. For each frequency and block: is an emitter present? A stream is active from the block of its arrival decision to the block of its departure decision. A frequency is present if any of its three streams is, reported in the active sector with the largest SNR estimate, with that sector’s azimuth plus its yaw (0, 120 or 240°).
  • Block error = miss rate (over the occupied blocks) + false-alarm rate (over the empty ones), against the golden’s answers. The two rates are summed rather than counted together, so the measure does not depend on how many blocks are occupied.
  • Block delay, for each correctly present block: from the block’s last sample to the moment its answer is committed, i.e. can no longer change. That is:
    • the block’s end of block, if no job of its stream is out;
    • the answer of the job it waits on, if one is.

    A frequency commits with its last sector. The study ranks on the p99.

Both are computed against the truth as well (for the detector’s own accuracy) and carry the azimuth error; the hardware is ranked against the golden.

The selection rule (dse.scan.RULE_V5):

  • A design qualifies if its block error is within 5%, averaged over seeds 1 to 3.
  • A load passes if at least 20 designs qualify at each resource level of 50%, 65% and 80%, and the front of resource level against block delay p99 has at least 3 steps.
  • The study takes the heaviest load that passes, ring and pool together.

The front

load designs qualifying at ≤ 50% / 65% / 80% of those at 80%: ring / pool front steps best p99 at ≤ 65% (cycles) passes
1.0 516 30 / 86 / 116 71 / 45 3 4,376 yes

Full load passes, so it is the study’s load: the rule takes the heaviest load that passes. Load 0.75 passes too (152 qualifying at 80%, 92 ring and 60 pool, a front of three steps, the best p99 at 65% 2,808 cycles); load 0.5 does not (238 qualifying but a front of two steps).

Resource level against block delay p99 at full load, the qualifying designs coloured by store and catch-up

Each point is one design (the mean of three seeds; x jittered by ±0.5 points to separate designs of one cost). Coloured: block error within 5%; grey: above. Circles are ring designs, triangles pool designs. The step line is the front of the qualifying designs.

By store and catch-up, at full load:

store catch-up lowest block error (miss + false alarm) at resource level p99 there (cycles) qualifying at ≤ 80% fastest qualifying p99
ring no 5.76% (0.01 + 5.75) 56% 3,586 0 –
pool no 5.75% (0.01 + 5.74) 53% 3,676 0 –
ring yes 0.52% (0.00 + 0.52) 77% 12,214 71 6,307
pool yes 1.09% (1.08 + 0.02) 51% 4,656 45 4,376

Block error against resource level at full load, by store and catch-up

What the scan shows:

  1. Catch-up is what makes a design qualify. Without it the error floor is stale false alarms (an emitter that left while its stream’s search was out stays reported), the same in ring and pool.
  2. The ring with catch-up reaches the lowest error, 0.52% at $R = 8$, but only with the memory that costs: with 2 search units it is block-RAM-bound at $R$ = 4 (56%) and 8 (77%), and slower – its fastest qualifying design has a p99 of 6,307 cycles, its lowest-error design 12,214.
  3. The pool with catch-up holds the fast end of the front. It qualifies at $R$ = 1 or 2, so with two search units it stays at 51% (DSP-bound): 1.09% error at a p99 of 4,656 cycles at $R = 2$. Its errors are the other kind: misses, not false alarms (below).
  4. The front’s three steps are all pool designs with catch-up:

    resource level p99 (cycles) block error design
    28% 8,311 1.65% 4 banks, 1 search unit, $R = 2$
    29% 6,549 1.53% 2 banks, 1 search unit, $R = 2$
    51% 4,376 4.71% 2 banks, 2 search units, $R = 1$

    The fastest is under the bar at 2,000 blocks but not at 10,000 (below); without it the fast step is the same design at $R = 2$ (51%, 4,656, 1.09%), and the front keeps three steps.

The ten best at 10,000 blocks

Five times longer, the same seeds (dse/top10.py; block error against the golden, p99 in cycles):

design resource level 2,000 blocks 10,000 blocks (miss + false alarm)
pool, 2 search units, $R = 2$ 51% 1.09%, 4,656 1.19% (1.16 + 0.03), 4,733
pool, 2 search units, $R = 1$ 51% 4.71%, 4,376 5.04% (1.47 + 3.57), 4,457
pool, 1 search unit, $R = 2$ 29% 1.53%, 6,549 1.72% (1.67 + 0.05), 6,583
pool, 4 banks, 1 search unit, $R = 2$ 28% 1.65%, 8,311 1.99% (1.93 + 0.06), 8,425
ring, 2 search units, $R = 4$ 56% 1.07%, 6,309 1.20% (0.03 + 1.17), 6,405
ring, 2 search units, $R = 8$ 77% 0.52%, 12,214 0.67% (0.01 + 0.66), 12,911
ring, 4 banks, 1 search unit, $R = 4$ 39% 2.63%, 7,764 3.28% (1.70 + 1.58), 7,824

(The other three of the ten are near-copies: an extra check unit, or 4 credits instead of 16.) Every error rises a little with the length – the first 2,000 blocks of each seed are slightly easier – and the order is unchanged; every p99 moves by 2% or less but the ring’s at $R = 8$ (6%). The pool at $R = 1$ crosses the 5% bar on all three seeds (4.99% to 5.12%): with one spare buffer a bank it can seldom hold the block that catch-up needs.

The pool’s hold depth: error against delay

Why do the pool’s designs miss about 1%, while the ring’s report about 1% false alarms? Both come from pulsing emitters, whose energy switches on and off every block. Each switch needs a job (a search, then a check, …), and a stream’s jobs cannot keep up with that, so the chain of jobs falls behind and eventually skips a block; which block it skips decides the kind of error. The pool can hold more than one block per stream while it waits (a chain of up to K, capture._CaptureStage.pool_holds; a pysim study, the design is K = 1). The pool at $R = 2$ with two search units:

K held blocks block error miss false alarm delay p90 delay p99 (cycles)
1 (the design) 1.09% 1.08% 0.02% 2,423 4,656
2 0.91% 0.01% 0.90% 2,432 7,780
4 0.54% 0.02% 0.52% 2,434 12,143
8 0.32% 0.07% 0.25% 2,470 18,216

More holds let the chain fall further behind before it skips anything: the error falls and the p99 grows, while the p90 does not move (only the pulsing emitters’ blocks wait). The hold depth plays the role of the ring’s $R$: at about 0.5% error the pool at K = 4 has the ring’s delay (12,143 against the ring at $R = 8$, 12,214) at 51% of the part against 77% – in the model; a K above 1 is not built in HLS.

The thresholds: searched with no synthesis

The capture’s two energy thresholds – the arrival threshold (set by the gate’s false-alarm target, pfa_gate) and the departure threshold relative to it (depart_gate_ratio) – are registers the host writes. A new pair needs no csynth, no implementation and no calibration: it is a pysim run. The study tuned them on seeds 4 to 6 and scored the choice on seeds 1 to 3, fixed before tuning, against the truth (the golden moves with the thresholds, so it cannot be the reference): a grid of five arrival targets (1e-4 to 1e-2) by five ratios (0.96 to 1.04), three designs, 243 runs in about 15 minutes on four cores (dse/thresholds.py).

design ratio 0.96 0.98 1.0 1.02 1.04
pool, 2 search units, $R = 2$ 11.38% 2.28% 1.52% 1.51% 1.53%
pool, 1 search unit, $R = 2$ 11.55% 2.83% 2.09% 2.09% 2.11%
ring, 2 search units, $R = 4$ 11.48% 2.44% 1.67% 1.65% 1.65%

Block error against the truth on the tuning seeds, at the default arrival target (1e-3).

  • The departure threshold must not go below the arrival one. The arrival threshold is only 3.7% to 5.9% above the noise’s mean energy, so at a ratio of 0.96 the departure threshold is within 1% of it: a block of noise alone often fails to fall below it, and a stream stays active for blocks after its emitter has gone – false alarms. Above 1 the surface is flat.
  • The arrival target matters little from 1e-4 to 3e-3, and costs at 1e-2 (more searches).
  • On the held-out seeds the tuned pairs equal the defaults, which were derived from the false-alarm targets: 1.64% against 1.63% (pool, 2 search units), 2.10% against 2.07% (pool, 1 search unit), 1.62% against 1.64% (ring). The defaults sit on the flat part.

The study’s point is the method: a setting the hardware takes at run time is explored in pysim alone, a quarter of an hour for 243 evaluations, where each RTL evaluation would be an hour of xsim.

At RTL: the pool’s whole design against pysim

The lab ran the whole DUT with the pool at RTL (Vitis HLS, Vivado and xsim 2025.1, xczu48dr at 4 ns; plans/aoa_buffer_pool.md, At RTL: the pool’s whole DUT; harness examples/aoa_detect/dut_rtl.py, which takes any design of the space). For that, the search and check units gained a pool mode: they address a block by its buffer and read no header. The ring’s builds are unchanged, byte for byte over 1,282 generated files, and the pool’s units are 126 to 672 LUTs smaller.

Two designs: $R = 2$, two banks of 512 bits, 16 lanes, one search and one check unit, with and without catch-up; 200 blocks of load 0.25, seed 1.

  without catch-up with catch-up
notifications and answers, RTL = pysim 77 / 77 77 / 77
decisions, RTL = pysim 75, the same set 75, the same set
miss and false-alarm rates against the golden, RTL = pysim 0, 0.65% 0, 0
block delay p99, RTL / pysim (cycles) 4,181 / 4,190 4,197 / 4,205
xsim time for the run (458,660 cycles) 395 s 392 s

Every count, every decision and the metric’s rates are exact; the p99 is within 9 cycles. Per job:

  • The check unit is 24 cycles faster at RTL and the search 1: the header read the pool no longer makes. pysim had charged the pool the ring’s time. From cache v7 the model charges the measured time.
  • A few jobs whose read overlapped the other unit’s finish 15 to 18 cycles sooner at RTL: the framework’s model of two readers on one memory front, as found before for the ring.
  • 4 of the 77 notifications arrive 1 or 2 cycles early and are not explained; two are a cycle outside the gate’s bar. They are recorded as residuals.

What each step costs at C = 12

Vitis HLS, Vivado and xsim 2025.1 on the lab machine (8 cores), pysim on one core of the cloud machine:

Step Time Per Source
pysim, one design, 2,000 blocks about 12 s (median 13 s over the 516 designs) design cache v7
pysim, the whole space (516 designs × 3 seeds × 2,000 blocks) 5.6 hours of CPU, about 1.5 hours on 4 cores sweep cache v7
RTL simulation, the whole DUT, 2,000 blocks (4.17 million cycles), one 16 × 16 search unit about 1.0 hour of xsim (1,162 cycles a second) design the pool’s whole-DUT run, dut_rtl_pool.json
the same, two 16 × 16 search units / four 1.9 / 3.75 hours design scaled from it by the C = 8 model of each unit’s share (dse/replay_site.py)
five whole-DUT runs side by side on 8 cores 183 to 257 cycles a second each: 1.2 to 1.6 hours for 500 blocks design dut_v4.json
implementing the capture (synthesis and place and route), a ring or pool variant 8.5 to 14 minutes block configuration capture_impl.json
implementing a 16 × 16 search unit 2.1 hours once search_impl.json (C = 8)

So a design costs about 300 times more at RTL than in pysim (an hour against 12 seconds at one search unit), before the units’ implementation, which both pay once. The other blocks’ build times at C = 12 are not yet timed; the replay prices them as at C = 8 (the earlier study’s costs).

The optimization, replayed: RTL against pysim

The same black-box optimizer (Optuna’s TPE) searches the site’s space twice: once measuring each design at RTL, once in pysim (dse/replay_site.py, the method of the earlier study’s replay). Both start with nothing built; each trial is one design; every step is charged its tool time (the costs above), one tool at a time. The objective is the rule’s: the lowest block delay p99 with a block error of at most 5%, at a resource level of at most 50%, 65% or 80%. The arms that explore on something other than the full RTL trace end by confirming their five best designs at RTL on 2,000 blocks, charged to them. 30 runs of 150 trials per arm and level. pysim stands in for RTL’s numbers (below), at RTL’s cost; seed 1 throughout.

The share of runs whose pick is within 5% of the best, against tool time, at three resource levels

arm at ≤ 50%: tool hours, runs finding the best at ≤ 65% at ≤ 80%
pysim, TPE, then 5 confirmed at RTL 15.0 h, 93% 19.1 h, 100% 19.2 h, 100%
pysim of the whole space, then 5 confirmed 17.5 h, yes 22.8 h, yes 23.2 h, yes
RTL, 2,000 blocks 45.1 h, 93% 75.0 h, 100% 82.6 h, 100%
RTL, 500 blocks, then 5 confirmed 24.4 h, 93% 36.9 h, 100% 38.6 h, 100%
RTL, 200 blocks, then 5 confirmed 19.4 h, 97% 29.1 h, 7% 31.0 h, 3%
RTL, 2,000 blocks, random search 35.6 h, 43% 68.0 h, 53% 83.2 h, 53%

Median tool hours per run (serial), and the share of the 30 runs whose pick at RTL is the best design at that level.

  • pysim finds the best design in 3.0 to 4.3 times less tool time than the same optimizer at RTL on the full trace. Its simulation is 0.2 hours of the 15 to 19; the rest is synthesis (about 9 hours, the same in every arm: the search unit’s implementation alone is 2.3) and confirming five designs at RTL (5 to 10 hours).
  • Short RTL traces are cheaper but can mislead. On 500 blocks the optimizer still finds the best, at 1.6 to 2 times pysim’s time. On 200 blocks it fails at 65% and 80%: there the fastest designs are ones without catch-up, whose block error on 200 blocks is 4.91% – inside the bar – and on 2,000 blocks 5.46 to 5.64%. Every design it shortlists fails the confirmation.
  • Sweeping the whole space in pysim costs little more than TPE (17.5 to 23 hours, 216 to 480 designs simulated) and answers every level at once.
  • At 50%, two of the 30 runs miss the best in every TPE arm alike (the same optimizer seeds): they settle on the pool with two 8 × 8 search units, 48% slower in p99. That is the optimizer’s miss, not the measurement’s.

The pysim arm’s advantage grows with the trace: a design costs about 12 seconds in pysim and an hour or more at RTL, so the RTL arm can afford few long traces, and short ones can mislead it.

How far pysim can be trusted here

Seven designs of the site have been run as the whole DUT at RTL against pysim (Vitis HLS, Vivado and xsim 2025.1): five ring designs on 500 blocks (the timing, plans/aoa_site_c12_rtl.md Part D) and the two pool designs above.

  designs outcome (results, losses or block rates, counters) p99, RTL against pysim
exact 5 of 7 (ring 1 to 3, both pool) identical within 13 cycles (about 0.1%)
a late search charged a whole search (ring, $R = 2$) 1 86 missed in pysim against 47 –
three units reading at once (ring, two banks) 1 31 missed against 29; 440 notifications against 444 +3.6%
  • The late search was a modelling error: the unit skips the scan on a late read. With its measured time (from v6), pysim gives that design’s RTL results exactly.
  • Three readers at once is the framework’s model of the shared memory front: with two readers it is within a few cycles, with three it finishes the last read about 200 cycles late. Framework code, not fixed; it matters most for designs with many units.
  • pysim ranks the designs as the RTL does (Spearman 1.0 on p99 and on loss over the five ring designs).
  • Not yet checked at RTL: full load, and designs with two search units in the pool (the six designs next at RTL cover full load).

xsim runs the whole design at 183 to 257 cycles a second with five runs side by side and about 1,170 alone: one to one and a half hours a design for 500 blocks, where pysim takes seconds to minutes.

What is next

  • The paper’s two designs at RTL against pysim at full load (1,000 blocks), each also implemented out of context to check the resource model (the lab, plans/prompts/aoa_lab_rtl2.txt); then the fast end’s two search units, once the RTL harness traces jobs across several units.
  • The DSE-cost replay and the agentic study on the site (plans/aoa_site_replay.md, a proposal).
  • Records made before the corrections: the C = 8 study (v3) and the site’s v4 to v6 records. v7 has the late-read time, the pool’s catch-up fix and the pool’s units’ measured tails (24 cycles a check, 1 a search less than the ring’s, from the RTL above).

The figures are made by python -m examples.aoa_detect.dse.plots_site; the rule by python -m examples.aoa_detect.dse.scan --v5.