Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
    • Low-Power RTL Hub
    • DFT and Scan Hub
    • Physical Awareness Hub
      • Why RTL structure affects place and route
      • Wire-length-aware micro-architecture
      • Congestion-aware coding patterns
      • Floorplan hooks and hierarchy contracts
    • Waveform Debug Hub
    • STA and ECO Hub
    • RTL-to-Implementation Closure
    • DFT-Ready RTL
    • Capstone: Resilient Streaming Peripheral
    • Principal Design Review
    • Senior RTL Interview Questions & Model Answers
  • Glossary and Notation
Loading lesson

‹Physical Awareness Hub
  1. Topics
  2. RTL Design
  3. Senior & Interview
  4. Physical Awareness Hub
  5. Congestion-aware coding patterns

Part 9 · Senior · Senior

Congestion-aware coding patterns

Two-level muxing as a physical locality hypothesis, with finite functional comparisons against a flat mux.

On this page

    Why this matters

    An 8:1 mux over eight wide buses pulls every source towards one spot. Congestion hotspots come from many-to-one muxes, large decode trees and centralised control.

    After this lesson you can: split a wide mux into local levels, check the split against a flat reference, and say why the structure alone does not prove a gain.

    Spread the mux

    Congestion hotspots often come from many-to-one muxes, massive decode trees, and centralized control. Distribute decisions where possible.

    • Localize muxing and decode close to data origin.

    • Evaluate pipelining against diagnosed timing paths and the architectural latency budget.

    • Prefer structured hierarchy over huge monolithic logic clouds.

    Two levels instead of one

    An 8:1 mux can pull eight buses toward one spot. Factoring into two 4:1 muxes plus a 2:1 suggests local source grouping, but synthesis can flatten or merge the structure. Placement regions and supported preservation controls may be needed; inspect mapped drivers, routing congestion and timing under identical flow settings before claiming a benefit.

    Level

    Selected by

    Chooses

    First, near each source group

    sel[1:0]

    One of four words per group

    Second, at the meeting point

    sel[2]

    Between the two group winners

    Two-level mux: src0 to src3 enter 4:1 mux A and src4 to src7 enter 4:1 mux B, both selected by sel[1:0]; their outputs enter a 2:1 mux selected by sel[2], which drives y.
    Each group of four sources is selected near its origin by sel[1:0]; only the two winners travel to the final 2:1 mux on sel[2].

    Read it top-down. A flat 8:1 mux pulls all eight buses to one spot; this split sends only two buses to the meeting point, if the tool keeps the structure and places each 4:1 near its group.

    Common mistakes

    Common pitfall

    A flat wide mux places every source at the mercy of one sink: the router must pull all the buses to a single point, and the area around it congests. Group sources by origin, select locally, and merge only the group winners.

    Interview

    Likely question: “How is a congestion hotspot relieved in RTL?”

    • Split wide centralized muxes into levels near the data.

    • Pipeline between levels on very wide paths.

    • Prove the split still selects correctly for every select.

    Check yourself Can two levels of smaller muxes eliminate congestion by construction?

    No. They suggest local grouping, but mapped topology and placement decide whether routes stay local. Compare routed congestion and timing, including any new final-stage bottleneck.

    Check yourself A flat 16:1 mux takes sixteen 32-bit buses from sixteen blocks across the floorplan. Why is it a congestion risk, and what is the first RTL response?

    Every bus must route to the one place where the mux sits, so wires crowd around it and lengthen. Select within each nearby group first and mux the few group winners, then check the routed result.

    Testbench

    The two-level mux checked against a flat reference with data rotations and independent walking-one/walking-zero patterns on every source. Each selected data bit must follow the selected source, including the low nibble.

    mux2level.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    `timescale 1ns/1ps
    module mux2level (
      input  logic [7:0] src0,
      input  logic [7:0] src1,
      input  logic [7:0] src2,
      input  logic [7:0] src3,
      input  logic [7:0] src4,
      input  logic [7:0] src5,
      input  logic [7:0] src6,
      input  logic [7:0] src7,
      input  logic [2:0] sel,
      output logic [7:0] y
    );
      logic [7:0] grp_lo, grp_hi;
      always_comb begin
        case (sel[1:0])
          2'd0:    grp_lo = src0;
          2'd1:    grp_lo = src1;
          2'd2:    grp_lo = src2;
          default: grp_lo = src3;
        endcase
        case (sel[1:0])
          2'd0:    grp_hi = src4;
          2'd1:    grp_hi = src5;
          2'd2:    grp_hi = src6;
          default: grp_hi = src7;
        endcase
        case (sel[2])
          1'b0:    y = grp_lo;
          default: y = grp_hi;
        endcase
      end
    endmodule
    

    Remember

    • Mux and decode close to the data origin; merge only the group winners.

    • Two 4:1 muxes plus a 2:1 suggest local grouping, but synthesis can flatten them.

    • Judge the result by routed congestion and timing under identical flow settings.

    Keep going

    • Interview: run a mock interview on this topic

    Related topics

    • Floorplan hooks and hierarchy contracts

    Previous

    285 / 350

    Next: Floorplan hooks and hierarchy contracts

    Up next

    Up nextFloorplan hooks and hierarchy contracts

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Why RTL structure affects place and route