Architecture
- 39 SystemVerilog RTL sources: buffers, sequencers, NoC mappers, routers, cluster datapath, post-processing, Avalon-MM I/O and top-level control. No vendor IP; buffer RAMs are inferred M20K/MLAB.
- Single Avalon-MM master to the HPS DDR4 controller (512-bit data, 24-bit word address). Activation fetch, weight fetch and output drain are arbitrated onto one read port and one write port.
- Double-banked (ping-pong) activation and weight buffers. 34 activation banks hold a 32-row band plus a 2-row halo, so each row is fetched from DRAM once instead of once per tile.
- Q output-channel groups, each an 8×2 cluster NoC followed by an adder tree, ReLU/pooling and a shared output stage buffer. Weights enter at one corner and propagate; activations enter from the left, and each cluster inherits 2 of its 4 taps from its northern neighbour.
- Seven-stage cluster pipeline: input register, routing, four parallel transform lanes (Bᵀd), multiply, sum, output transform (Aᵀ), channel accumulation. FC layers take a bypass that skips the transforms.
- Transform-domain overlap reuse: transformed columns are kept across tile boundaries, so a sweep of width W evaluates W+2 column transforms instead of 6⌈W/4⌉.
- Phase-offset multiplier pooling: four clusters skewed one cycle apart have constant combined product demand (5+1+0+0), so six shared multipliers per transform row replace 30 per cluster with 9.
- F(2,3) and F(4,3) are an elaboration-time switch (WINO_CONFIG). Larger and strided kernels decompose into 3×3 sub-kernels, so F(m,3) is the only compute primitive.
Verification Architecture
- One self-checking SystemVerilog testbench per module (39 in total), from transforms and MACs up through the cluster, NoC, sequencers, buffers, arbiter and top level. Each bench prints PASS/FAIL with the first mismatches.
- Python/NumPy generators build stimulus and golden vectors. The golden direct convolution is cross-checked against 2-D Winograd, per-lane 1-D Winograd and a cycle-faithful MAC-row streaming model before any RTL comparison, so a wrong reference model fails before it can mask an RTL bug.
- Behavioural DDR model (fake_ddr) with configurable read latency, jitter, bus turnaround and refresh, standing in for the HPS DDR4 controller.
- Reusable SVA macro library (ASSERT_NO_X, ASSERT_IMPLY, ASSERT_NEXT) bound inside module benches to check X-propagation and handshake and mode invariants every cycle.
- Sequencer benches dump fetch traces, which Python scripts check and render as HTML fetch grids for review.
- Benches are parameterized over F(2,3) and F(4,3) (-gM=2|4); F(4,3) benches run at 32 bits so values compare exactly.
- Flow: directed SystemVerilog plus Python scoreboarding in Questa. No UVM environment yet.
Verification Strategy
- Directed tests per module against Python golden vectors, plus layer-level RTL execution of all 13 VGG-16 convolution layers at full size.
- Constrained-random stimulus ($urandom) in 12 benches, including the Winograd MAC, line buffer, channel accumulator, buffer banks, router, burst packer, RAM arbiter and output sequencer.
- Concurrent SVA assertions in the MAC, line buffer, filter-transform buffer, cluster and accumulator benches.
- Closed-form model checks: transform, buffer-read and memory-word counts measured in RTL are compared exactly against the analytical model.
- PlannedAvalon-MM protocol assertions: no simultaneous read/write, address/data stable under waitrequest, single-cycle done pulses.
- PlannedTop-level geometry sweep with golden compare (10 shapes, from a single 34×34 tile to 224×224 and 14×14×512).
- PlannedMemory stress: DDR latency, jitter and turnaround sweeps, random waitrequest, arbiter fairness and region-canary checks.
- PlannedFunctional coverage (covergroups) and coverage-closure reporting. None is collected today.
- PlannedFormal verification of control FSMs and handshakes. Not started.
- PlannedUVM environment for the Avalon-MM boundary.
Results
- RTL execution of all 13 VGG-16 conv layers (F(4,3), Q=32) reproduces the closed-form transform, buffer-read and memory-word counts exactly: W+2 column transforms on each of 59,306 channel passes and 10 buffer reads on each of 2,163,732 column steps.
- Output values: 1,984 / 1,984 output lanes match a bit-accurate model of the arithmetic on a 64²×3→32 layer.
- Executed cycles are 0.954× the serial model in aggregate (2,280,501 vs 2,389,817), because fetch, compute and store overlap.
- Synthesis (Quartus Prime Pro 20.2, Arria-10 SX, F(4,3), Q=4): timing closes at 250 MHz; 293 multipliers pack into 147 DSP blocks (8.7%), 78.5% ALMs, 1,218 M20K, 6.47 W total.
- Throughput (model built on the RTL-validated counts): 539.8 GOPS on the VGG-16 backbone (93.7% of the arithmetic bound), 1.87 GOPS per multiplier and 83.5 GOPS/W.
- Reuse: 1.45× fewer column transforms, 1.20× fewer activation-buffer reads and 23.3× fewer DRAM read transactions than independent tile fetch.
- Accuracy: the bit-exact INT8 F(4,3) datapath loses 0.40 points of ImageNet top-1 on VGG-16.
- Bugs the testbenches exposed and fixed: a config-arrival-order race in the output stage buffer size, a weight-advance race in the weight buffer, a premature DRAIN→IDLE controller transition, and cluster pipeline registers that ignored their stage enables. About 100 fix commits are tracked in history.
- Reproducible: each bench is one Python generator plus one vlog/vsim command (seeded RNG, default_rng(0)), and the regression greps for PASS/FAIL.
- PlannedEnd-to-end golden match of the full accelerator on main (tb_accelerator_conv_32x32x3).
- PlannedOn-board run on the Arria-10 SoC dev kit.
Evidence
if (WINO_CONFIG == F4) begin : g_f43
assign transformed[0] = 4*d[0] - 5*d[2] + d[4];
assign transformed[1] = -4*d[1] - 4*d[2] + d[3] + d[4];
assign transformed[2] = 4*d[1] - 4*d[2] - d[3] + d[4];
assign transformed[3] = -2*d[1] - d[2] + 2*d[3] + d[4];
assign transformed[4] = 2*d[1] - d[2] - 2*d[3] + d[4];
assign transformed[5] = 4*d[1] - 5*d[3] + d[5];
end else begin : g_f23
assign transformed[0] = d[0] - d[2];
assign transformed[1] = d[1] + d[2];
assign transformed[2] = d[2] - d[1];
assign transformed[3] = d[1] - d[3];
endalways_comb begin
p0_col = 2'd0;
p1_col = 2'd0;
for (int c = 0; c < 4; c++) begin
if (valid[c] && phase[c] == 2'd0) p0_col = 2'(c);
if (valid[c] && phase[c] == 2'd1) p1_col = 2'(c);
end
for (int k = 0; k < 5; k++) begin
mul_x[k] = x[p0_col][k];
mul_f[k] = f[p0_col][k];
end
mul_x[5] = x[p1_col][0];
mul_f[5] = f[p1_col][0];
end`ASSERT_NO_X(a_no_x, {M1, M2, M0_M3, result_valid})
`ASSERT_IMPLY(a_fc_zero, layer_mode == NOC_MODE_FC, M1 == 0 && M2 == 0)
`ASSERT_IMPLY(a_fc_valid, layer_mode == NOC_MODE_FC, result_valid == (act_en && filter_en))
`ASSERT_IMPLY(a_conv_valid_needs_act, layer_mode == NOC_MODE_CONV && result_valid, act_en)
`ASSERT_IMPLY(a_conv_valid_after_clear, layer_mode == NOC_MODE_CONV && clear_iacts, !result_valid)assert (wino2d == S * S * direct[:, :tiled]).all(), "2D Winograd != S^2 * direct"
assert (AT @ lanes_1d == S * S * direct[:, :tiled]).all(), "vertical + lane 1D Winograd != S^2 * direct"
assert (AT @ lanes_mac == S * S * direct).all(), "mac_row dataflow != S^2 * direct"
assert fits(lanes_mac, DATA_WIDTH[m]) and fits(S * S * direct, DATA_WIDTH[m]), "cluster datapath overflow"

