An if and else if chain tests its conditions in order. The first true condition wins, so the hardware is a chain of select stages about one deep per condition.
Order matters here. Moving a condition changes which input wins, so reorder a chain only when the meaning stays the same.
A case over disjoint selector values tests all items together. It permits a parallel tree with depth as low as ceil(log2(n)), though whether the tool builds it depends on optimisation and mapping.
Overlapping items still resolve in order, like a chain. Keep items disjoint and add a default so the parallel reading holds.
An 8:1 select shows the gap. The chain stacks seven 2:1 stages, while the permitted parallel tree reaches depth 3 with seven MUX2 cells from the teaching library.
8:1 select of one bit, built from 2:1 stages
priority chain: 8 inputs need 7 nested stages
chain depth = 8 - 1 = 7 stages
parallel tree: depth = ceil(log2(8)) = 3 stages
tree cells = 8 - 1 = 7 MUX2
MUX2 area is 5 teaching-library units
tree area = 7 x 5 = 35 unitsif chain and then as a tree. What are the two depths?The chain is 7 stages deep, while the permitted parallel tree reaches depth 3. Both arrange seven 2:1 selects, only the arrangement differs.
case items overlap. Which one wins, and what does that say about the structure?The first item in order wins. The structure is priority for those items, not parallel.