← Physical Design Interviews

Interview Question · Code Reading

Constraining an Asynchronous FIFO

L3 Seniorstacdcexceptions

The Question

The interviewer asks

An async FIFO is constrained with the SDC below. Timing is clean. What is wrong with it?

sdc
create_clock -name wclk -period 10 [get_ports wclk]
create_clock -name rclk -period 7 [get_ports rclk]
set_clock_groups -asynchronous -group [get_clocks wclk] -group [get_clocks rclk]
set_max_delay 7 -from [get_cells wptr_reg*] -to [get_cells rq1_reg*]
Reveal the Model Answer

set_clock_groups -asynchronous acts as false paths between the two clocks. In SDC precedence a false path outranks set_max_delay, so the pointer bound is dropped (confirmed on OpenSTA 3.1.0). So the Gray-pointer skew is never bounded. Use path-level exceptions instead: a false path on the data that is safe by protocol. Add a max delay, with clock latency ignored, on each pointer bit. Keep the synchroniser flops under normal same-clock timing.

Every Crossing Needs Its Own ReasonPointers and ready flags enter first-stage synchronizers. Stored data reaches the read register through a separate path.
Every crossing needs its own reasonPointers and ready flags enter first-stage synchronizers. Stored data reaches the read register through a separate path. component Write domain wclk · write pointer ·memory component Readsynchronizers Pointer and readyfirst stages component Read domain rclk · read pointer ·output component Writesynchronizers Pointer and readyfirst stages Bounded Gray / readypathsNormal same-clocktimingBounded Gray / readypathsNormal same-clocktimingStable-word protocol+ data bound
Read the diagram as text
  • Write domain: wclk · write pointer · memory
  • Read synchronizers: Pointer and ready first stages
  • Read domain: rclk · read pointer · output
  • Write synchronizers: Pointer and ready first stages
  • Write domain → Read synchronizers: Bounded Gray / ready paths
  • Read synchronizers → Read domain: Normal same-clock timing
  • Read domain → Write synchronizers: Bounded Gray / ready paths
  • Write synchronizers → Write domain: Normal same-clock timing
  • Write domain → Read domain: Stable-word protocol + data bound

Reset enters each domain through its own release synchronizer. The local reset distribution still needs recovery and removal checks.

Timing pathWorst Setup Path with Asynchronous Clock Groups

rptr0 → rdatasetup check, latest arrival3 cells

  • Clock latency
  • Cell delay
  • Setup time
Worst setup path with asynchronous clock groups01234567time (ns)launch rclk ↑capture rclk ↑Data arrivesRequired byrptr0/CLK → rptr0/Q (dfxtp_1): 0.3559 ns1rmux_hi/S0 → rmux_hi/X (mux4_1): 0.5323 ns2rmux/A1 → rmux/X (mux2_1): 0.2886 ns3setup −0.0999 nsslack +5.7233 ns · metarrival 1.1768required 6.9001Worst setup path with asynchronous clock groups0246time (ns)launch rclk ↑capture rclk ↑Data arrivesRequired byrptr0/CLK → rptr0/Q (dfxtp_1): 0.3559 ns1rmux_hi/S0 → rmux_hi/X (mux4_1): 0.5323 ns2rmux/A1 → rmux/X (mux2_1): 0.2886 ns3setup −0.0999 nsslack +5.7233 ns · metarrival 1.1768required 6.9001
Read the path as a table

Launch: rclk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: rclk rise edge at 7.0000 ns, latency 0.0000 ns, library setup time −0.0999 ns.

Arrival 1.1768 ns, required 6.9001 ns, slack 5.7233 ns (met).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1rptr0/CLK → rptr0/Qdfxtp_1rise0.35590.35590.0892
rptr0/Q → rmux_hi/S0wire r0rise0.00000.35590.0892
2rmux_hi/S0 → rmux_hi/Xmux4_1fall0.53230.88820.0797
rmux_hi/X → rmux/A1wire hifall0.00000.88820.0797
3rmux/A1 → rmux/Xmux2_1fall0.28861.17680.0500
rmux/X → rdata/Dwire rdfall0.00001.17680.0500
The report
Startpoint: rptr0 (rising edge-triggered flip-flop clocked by rclk)
Endpoint: rdata (rising edge-triggered flip-flop clocked by rclk)
Path Group: rclk
Path Type: max

Fanout       Cap      Slew     Delay      Time   Description
-------------------------------------------------------------------------------------
                    0.1000    0.0000    0.0000   clock rclk (rise edge)
                              0.0000    0.0000   clock network delay (ideal)
                    0.1000    0.0000    0.0000 ^ rptr0/CLK (sky130_fd_sc_hd__dfxtp_1)
     2    0.0082    0.0892    0.3559    0.3559 ^ rptr0/Q (sky130_fd_sc_hd__dfxtp_1)
                                                 r0 (net)
                    0.0892    0.0000    0.3559 ^ rmux_hi/S0 (sky130_fd_sc_hd__mux4_1)
     1    0.0018    0.0797    0.5323    0.8882 v rmux_hi/X (sky130_fd_sc_hd__mux4_1)
                                                 hi (net)
                    0.0797    0.0000    0.8882 v rmux/A1 (sky130_fd_sc_hd__mux2_1)
     1    0.0017    0.0500    0.2886    1.1768 v rmux/X (sky130_fd_sc_hd__mux2_1)
                                                 rd (net)
                    0.0500    0.0000    1.1768 v rdata/D (sky130_fd_sc_hd__dfxtp_1)
                                        1.1768   data arrival time

                    0.1000    7.0000    7.0000   clock rclk (rise edge)
                              0.0000    7.0000   clock network delay (ideal)
                              0.0000    7.0000   clock reconvergence pessimism
                                        7.0000 ^ rdata/CLK (sky130_fd_sc_hd__dfxtp_1)
                             -0.0999    6.9001   library setup time
                                        6.9001   data required time
-------------------------------------------------------------------------------------
                                        6.9001   data required time
                                       -1.1768   data arrival time
-------------------------------------------------------------------------------------
                                        5.7233   slack (MET)

After set_clock_groups -asynchronous, the worst setup path stays inside one clock. The crossing paths are gone from the report.

Self-Check

Tick each key point you covered in your answer.

What Interviewers Listen For (Senior)

A good senior answer lists every crossing first. It knows which exception wins in SDC, and it keeps a bound on the skew of the Gray-coded pointer.

Cross-Questions

Where the interviewer goes next. Open a node to practise that follow-up.

WhyWhat IfProve ItCompareScale It

  1. Constraining an Asynchronous FIFO
  2. WhyWhy Unrelated Clocks Need an ExceptionL2 Mid-Level

    Why does a FIFO between a 10 ns and a 7 ns clock fail setup by 0.16 ns if you declare no exception at all?

    Reveal the Model Answer

    Without an exception, STA treats the clocks as related. It finds the tightest launch-capture pair over their 70 ns common period. That is launch at 20 ns and capture at 21 ns, only 1 ns apart. The memory-to-read path cannot meet 1 ns, so it fails. Real asynchronous clocks have no fixed phase, so the check is meaningless and must be replaced by the right exceptions.

    Rising Edges of Wclk and Rclk, 0 to 24 NsOne column per nanosecond; a 1 marks a rising edge.
    0123456789101112131415161718192021222324wclk ↑ (10 ns)rclk ↑ (7 ns)launchcapture
    1. Cycle 7

      Launch at 0 ns, capture at 7 ns: 7 ns for the path.

    2. Cycle 14

      Launch at 10 ns, capture at 14 ns: 4 ns for the path.

    3. Cycle 21

      Launch at 20 ns, capture at 21 ns: 1 ns for the path.

    The tool times a wclk-to-rclk path against the smallest of these gaps.

    Timing pathA Memory Word Read Across the Two ClocksThe word mem5 is written on wclk and read through the mux tree into rdata on rclk. The SDC has two create_clock lines and nothing else.

    mem5 → rdatasetup check, latest arrival3 cells

    • Clock latency
    • Cell delay
    • Setup time
    A memory word read across the two clocks2020.120.220.320.420.520.620.720.820.92121.1time (ns)launch wclk ↑capture rclk ↑Data arrivesRequired bymem5/CLK → mem5/Q (dfxtp_1): 0.3040 ns1 dfxtp_1rmux_hi/A1 → rmux_hi/X (mux4_1): 0.4680 ns2 mux4_1rmux/A1 → rmux/X (mux2_1): 0.2886 ns3 mux2_1setup −0.0999 nsslack −0.1605 ns · violatedarrival 21.0606required 20.9001A memory word read across the two clocks2020.220.420.620.821time (ns)launch wclk ↑capture rclk ↑Data arrivesRequired bymem5/CLK → mem5/Q (dfxtp_1): 0.3040 ns1 dfxtp_1rmux_hi/A1 → rmux_hi/X (mux4_1): 0.4680 ns2 mux4_1rmux/A1 → rmux/X (mux2_1): 0.2886 ns3 mux2_1setup −0.0999 nsslack −0.1605 ns · violatedarrival 21.0606required 20.9001
    1. Launch at 20 ns

      The tool picked the third wclk edge, at 20 ns.

    2. Capture at 21 ns

      The next rclk edge after it is at 21 ns. That pair is the closest the two clocks ever come.

    3. Violated

      Clock-to-Q and two mux levels take 1.0606 ns, so the slack is -0.1605 ns.

    Read the path as a table

    Launch: wclk rise edge at 20.0000 ns, clock latency 0.0000 ns (ideal). Capture: rclk rise edge at 21.0000 ns, latency 0.0000 ns, library setup time −0.0999 ns.

    Arrival 21.0606 ns, required 20.9001 ns, slack −0.1605 ns (violated).

    CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
    1mem5/CLK → mem5/Qdfxtp_1fall0.304020.30400.0213
    mem5/Q → rmux_hi/A1wire m5fall0.000020.30400.0213
    2rmux_hi/A1 → rmux_hi/Xmux4_1fall0.468020.77200.0797
    rmux_hi/X → rmux/A1wire hifall0.000020.77200.0797
    3rmux/A1 → rmux/Xmux2_1fall0.288621.06060.0500
    rmux/X → rdata/Dwire rdfall0.000021.06060.0500
    The report
    Startpoint: mem5 (rising edge-triggered flip-flop clocked by wclk)
    Endpoint: rdata (rising edge-triggered flip-flop clocked by rclk)
    Path Group: rclk
    Path Type: max
    
    Fanout       Cap      Slew     Delay      Time   Description
    -------------------------------------------------------------------------------------
                        0.1000   20.0000   20.0000   clock wclk (rise edge)
                                  0.0000   20.0000   clock network delay (ideal)
                        0.1000    0.0000   20.0000 ^ mem5/CLK (sky130_fd_sc_hd__dfxtp_1)
         1    0.0014    0.0213    0.3040   20.3040 v mem5/Q (sky130_fd_sc_hd__dfxtp_1)
                                                     m5 (net)
                        0.0213    0.0000   20.3040 v rmux_hi/A1 (sky130_fd_sc_hd__mux4_1)
         1    0.0018    0.0797    0.4680   20.7720 v rmux_hi/X (sky130_fd_sc_hd__mux4_1)
                                                     hi (net)
                        0.0797    0.0000   20.7720 v rmux/A1 (sky130_fd_sc_hd__mux2_1)
         1    0.0017    0.0500    0.2886   21.0606 v rmux/X (sky130_fd_sc_hd__mux2_1)
                                                     rd (net)
                        0.0500    0.0000   21.0606 v rdata/D (sky130_fd_sc_hd__dfxtp_1)
                                           21.0606   data arrival time
    
                        0.1000   21.0000   21.0000   clock rclk (rise edge)
                                  0.0000   21.0000   clock network delay (ideal)
                                  0.0000   21.0000   clock reconvergence pessimism
                                           21.0000 ^ rdata/CLK (sky130_fd_sc_hd__dfxtp_1)
                                 -0.0999   20.9001   library setup time
                                           20.9001   data required time
    -------------------------------------------------------------------------------------
                                           20.9001   data required time
                                          -21.0606   data arrival time
    -------------------------------------------------------------------------------------
                                           -0.1605   slack (VIOLATED)

    The memory read with no exception: timed against the 1 ns gap, it fails by 0.1605 ns.

    Self-Check

    Tick each key point you covered in your answer.

  3. Prove ItSolve L8.1.1: Keep the FIFO Crossings VisibleSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem L8.1.1

  4. CompareFalse Path vs Multicycle PathL1 JuniorL2 Mid-Level

    Compare a false path with a multicycle path. When is each the right exception?

    Reveal the Model Answer

    A false path removes paths from timing entirely. It is for signals that can never propagate in one cycle in practice, such as static configuration written before use. A multicycle path keeps the check but gives it N cycles, for data that is guaranteed stable for N cycles. A false path is the riskier promise, because a wrong one hides a real path forever; never false-path a reset release.

    Self-Check

    Tick each key point you covered in your answer.

  5. What IfA Configuration Register Written While RunningL2 Mid-Level

    What if software writes the false-pathed configuration register while the block is running?

    Reveal the Model Answer

    Then the false path is no longer true. The new value can reach a capture flop in any cycle, untimed. Some bits may then be caught a cycle late or go metastable. Either forbid writes while the block runs, and check that rule with an assertion. Or time the path for real.

    Self-Check

    Tick each key point you covered in your answer.

    Half-Truth

    "It is a configuration register, so it is always a false path."

    The exception holds only if software writes it before use. A write in mission mode makes the path real.

    Source Lesson L2.8 key points

  6. Scale ItAuditing Constraints on a Large ChipL3 Senior

    You inherit SDC for a chip with forty clocks. How do you audit it before trusting any timing result?

    Reveal the Model Answer

    Check coverage first: every register clocked, every port with a delay, zero unexplained unconstrained endpoints. Then review every exception against a written reason, since a false path or clock group trusted by STA removes checks for good. Compare the clock relationships with the design spec and the CDC report. Re-run the audit whenever the SDC or the netlist changes.

    Self-Check

    Tick each key point you covered in your answer.

  7. What IfA False Path That Swallowed Real PathsL1 JuniorL2 Mid-Level

    Asked if they propose a false path between the clocks

    To silence one slow configuration input, someone writes the line below. What else disappears from timing?

    sdc
    set_false_path -from [all_inputs]
    Reveal the Model Answer

    Every path from every input, including the clock-domain data inputs that really do need timing. In lesson L2.8 that line turned two flop data pins into unconstrained endpoints. A report through the data input then found no paths at all. Writing the exception on the one port, -from [get_ports cfg], left the other path timed with 0.5837 ns of slack.

    Timing pathd0 → a0_reg

    d0 → a0_regsetup check, latest arrival0 cells

    • Clock latency
    • Cell delay
    • Input delay
    • Setup time
    d0 → a0_reg00.10.20.30.40.50.60.70.80.91time (ns)launch clk ↑capture clk ↑Data arrivesRequired byinput delay 0.2000 nssetup −0.2163 nsslack +0.5837 ns · metarrival 0.2000required 0.7837d0 → a0_reg00.20.40.60.81time (ns)launch clk ↑capture clk ↑Data arrivesRequired byinput delay 0.2000 nssetup −0.2163 nsslack +0.5837 ns · metarrival 0.2000required 0.7837
    Read the path as a table

    Launch: clk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk rise edge at 1.0000 ns, latency 0.0000 ns, library setup time −0.2163 ns.

    Arrival 0.2000 ns, required 0.7837 ns, slack 0.5837 ns (met).

    CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
    d0 → a0_reg/Dwire d0fall0.00000.20000.0000
    The report
    Startpoint: d0 (input port clocked by clk)
    Endpoint: a0_reg (rising edge-triggered flip-flop clocked by clk)
    Path Group: clk
    Path Type: max
    
    Fanout       Cap      Slew     Delay      Time   Description
    -------------------------------------------------------------------------------------
                        0.1000    0.0000    0.0000   clock clk (rise edge)
                                  0.0000    0.0000   clock network delay (ideal)
                                  0.2000    0.2000 v input external delay
         1    0.0017    0.0000    0.0000    0.2000 v d0 (in)
                                                     d0 (net)
                        0.0000    0.0000    0.2000 v a0_reg/D (sky130_fd_sc_hd__edfxtp_1)
                                            0.2000   data arrival time
    
                        0.1000    1.0000    1.0000   clock clk (rise edge)
                                  0.0000    1.0000   clock network delay (ideal)
                                  0.0000    1.0000   clock reconvergence pessimism
                                            1.0000 ^ a0_reg/CLK (sky130_fd_sc_hd__edfxtp_1)
                                 -0.2163    0.7837   library setup time
                                            0.7837   data required time
    -------------------------------------------------------------------------------------
                                            0.7837   data required time
                                           -0.2000   data arrival time
    -------------------------------------------------------------------------------------
                                            0.5837   slack (MET)

    With the exception written only on cfg, the path from d0 is timed again: slack 0.5837 ns.

    Self-Check

    Tick each key point you covered in your answer.

  8. What IfA False Path That Covers the ResetL1 JuniorL2 Mid-Level

    What if the same broad false path also covers the reset input?

    Reveal the Model Answer

    Then the reset release has no recovery or removal check. A release near the clock edge can leave some flops in reset for one cycle longer than others. The design then starts in a mixed state. Time the release through its synchroniser, and keep recovery and removal checked.

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "Reset is asynchronous, so it needs no timing."

    Asserting it is asynchronous, but releasing it is checked against the clock by recovery and removal arcs.

    Source Lesson L2.1 key points

What People Get Wrong

Common wrong answers and why they fail.

Misconception

"Async clock groups and a max delay on the pointers work together."

set_clock_groups -asynchronous acts as false paths, and a false path outranks set_max_delay in SDC. This was confirmed on OpenSTA 3.1.0. Only path-level false paths on the data leave the pointer bound in force.

Source Synopsys, Using the Synopsys Design Constraints Format (application note), timing exception precedence; confirmed on OpenSTA 3.1.0 in ASIC Point lessons L2.6 and L8.1

Missed Corner

"Crossings are the CDC tool's job; STA needs nothing."

The Gray code is only safe if the pointer bits arrive within one destination period of each other. That is a physical timing bound only STA can check on the routed design.

Source ASIC Point lesson L8.1; Dassa and Mirsky, DVCon, as cited in L8.1

Learn It, Then Prove It