Fixed-Shape CNN Hardware Accelerator & Architecture Study

Fixed 8×8 Image, 3×3 Kernel, 6×6 Output • Verilog-2001 RTL • Yosys 0.70 CMOS Synthesis • 100% Bit-Exact

10/10 REGRESSIONS PASS YOSYS 0.70 CMOS SYNTHESIS ICARUS VERILOG 12.0
Engineering & Verification Disclaimers:
Combinational Logic Gates
2,474 gates
Generic CMOS (569 AND, 1355 NOT, 550 OR) | Sequential: 62 DFFs
Active Compute Latency
324 cycles
3.24 μs @ 100 MHz ref (9 cycles/pixel)
Total Execution Latency
326 cycles
Measured sim: 326 cyc | Preload: 0 cyc (streaming)
Peak Arithmetic Density
200.0 MOPS
648 integer operations / frame

Interactive 2D Convolution Visualizer

Architecture A: 1 serial MAC unit accumulating 9 products sequentially over 9 clock cycles per pixel.

8x8 Input Image (0-255)
3x3 Kernel Weights
6x6 Convolved Feature Map (Complete 24-bit Output)
Pixel: 0 / 35 (Row 0, Col 0)
Click 'Play' or 'Step' to view the hardware MAC dot-product equation.

Side-by-Side PPA Trade-Off Matrix

Directly extracted from physical Yosys 0.70 standard cell synthesis & Icarus Verilog simulations.

Architectural Metric Serial Baseline (A) Parallel 9-MAC (B) Speedup / Scaling
Design Dimensions Fixed 8x8 -> 6x6 output Fixed 8x8 -> 6x6 output Hardcoded coordinate bounds
Arithmetic Datapath 1 Multiplier + Acc 9 Multipliers + Adder Tree 9.0x Datapath Parallelism
Adder Tree Type Sequential Accumulator Single-Cycle Combinational Non-pipelined (3 stages logic)
ReLU Activation N/A max(0, X) [Redundant for uint] Placeholder for signed support
Buffer Preload Latency 0 cycles (Streaming) 73 cycles (64 img + 9 krn) Preload overhead
Active Compute Cycles 324 cycles (9 cyc/px) 36 cycles (1 cyc/px) 9.00x Compute Speedup
Measured Simulation Cycles 326 cycles (vvp) 111 cycles (vvp: 73 load + 38 comp) 2.94x Total Speedup
Analytical Cycle Formula 1 start + 36*9 + 1 = 326 cycles 73 load + 1 start + 36 comp + 1 = 111 cycles 100% agreement with simulation
Inference Throughput (Compute) 308,642 frames/s 2,777,778 frames/s 9.00x Compute Throughput
Inference Throughput (Total) 306,748 frames/s 900,901 frames/s 2.94x Total Throughput
Peak Arithmetic Density 200.0 MOPS 1,800.0 MOPS (1.80 GOPS) 9.00x MOPS
Combinational Logic Gates 2,474 gates 28,522 gates 11.53x Combinational Scaling
Sequential Storage (DFFs) 62 flip-flops (0 buffer) 614 flip-flops (584 buffer) 9.90x Sequential Scaling (95.1% buffer)
Total Generic Cells 2,536 cells 29,136 cells 11.49x Total Cell Scaling
Memory Implementation Streaming reads (0 buffer DFFs) Multi-port register array (584 DFFs) 9-way concurrent read precludes SRAM
Critical Path Topology 1 Mult + 1 Acc (~35 gate levels) 1 Mult + 3 Adders (~68 gate levels) Adder tree is timing bottleneck
Cell Breakdown (ABC) 569 AND, 1355 NOT, 550 OR 7795 AND, 14926 NOT, 5217 OR Generic CMOS logic gates
RTLIL Logical Nets* 3,882 nets 43,694 nets 11.26x Logical Nets (Not routing)
Multi-Vector Verification PASS (8 suites, 16 regressions) PASS (8 suites, 16 regressions) 100% Bit-Exact Match

Verified Multi-Vector Regression Suite

Both architectures independently verified bit-exact against Python reference model in Icarus Verilog across normal, boundary, and multi-seed conditions:

1. Normal Random: Pseudo-random 8-bit (seed 42) [PASS: 36/36 EXACT]
2. Boundary Minimum: All Zeros (Image=0, Kernel=0) [PASS: 36/36 EXACT]
3. Boundary Maximum: All 255 (Max 585,225 accumulation) [PASS: 36/36 EXACT]
4. High-Frequency: Checkerboard Pattern (0xAA / 0x55) [PASS: 36/36 EXACT]
5. Impulse Response: Single Center Pixel & Weight [PASS: 36/36 EXACT]
6. Seed 100 Random: Dynamic range stress distribution [PASS: 36/36 EXACT]
7. Seed 2024 Random: High-entropy distribution [PASS: 36/36 EXACT]
8. Seed 9999 Random: Extreme variance distribution [PASS: 36/36 EXACT]
9. Hardware Protection: Buffer Write Guard in Compute [PASS: BLOCKED]
10. Fault Recovery: Mid-Compute Synchronous Reset & Restart [PASS: RECOVERED]

Resume Bullet Points (ASIC / FPGA RTL Engineering)