# Tests for opt_parallel_prefix # # Notation: # N = number of leaves in the prefix chain (so N-1 cells originally) # For full-demand chains (all intermediates as port outputs), expected # network cell counts and depths per topology are: # Kogge-Stone : cells = sum_{l=0..ceil(log2 N)-1} (N - 2^l), depth = ceil(log2 N) # Sklansky : cells = sum_{l=0..ceil(log2 N)-1} (N - 2^l rounded up to half-block boundaries) # depth = ceil(log2 N) # Brent-Kung : cells ~= 2N - log2(N) - 2 (power-of-2 N), depth = 2*ceil(log2 N) - 2 # Han-Carlson : cells ~= N/2 * log2(N) (power-of-2 N), depth = ceil(log2 N) + 1 # ============================================================================ # Group A: Basic correctness for each supported op (equiv only) # ============================================================================ # Test A1: 4-input AND prefix chain log -header "A1: 4-input AND prefix chain" log -push design -reset read_verilog <