Interview Question · Code Reading
Constraining an Asynchronous FIFO
The Question
The interviewer asks
An async FIFO is constrained with the SDC below. Timing is clean. What is wrong with it?
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*]You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
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.
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.
rptr0 → rdatasetup check, latest arrival3 cells
- Clock latency
- Cell delay
- Setup time
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).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | rptr0/CLK → rptr0/Q | dfxtp_1 | rise | 0.3559 | 0.3559 | 0.0892 |
rptr0/Q → rmux_hi/S0 | wire r0 | rise | 0.0000 | 0.3559 | 0.0892 | |
| 2 | rmux_hi/S0 → rmux_hi/X | mux4_1 | fall | 0.5323 | 0.8882 | 0.0797 |
rmux_hi/X → rmux/A1 | wire hi | fall | 0.0000 | 0.8882 | 0.0797 | |
| 3 | rmux/A1 → rmux/X | mux2_1 | fall | 0.2886 | 1.1768 | 0.0500 |
rmux/X → rdata/D | wire rd | fall | 0.0000 | 1.1768 | 0.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.
What Interviewers Listen For (Staff)
A good staff answer makes this a rule for the whole chip. Crossings come from the CDC tool's report, and exceptions are reviewed against it. It forbids a broad clock cut where a specific bound is needed.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
WhyWhat IfProve ItCompareScale It
- Constraining an Asynchronous FIFO
-
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?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
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. All cycles- Cycle 7
Launch at 0 ns, capture at 7 ns: 7 ns for the path.
- Cycle 14
Launch at 10 ns, capture at 14 ns: 4 ns for the path.
- 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 mem5is written onwclkand read through the mux tree intordataonrclk. The SDC has twocreate_clocklines and nothing else.Whole pathmem5 → rdatasetup check, latest arrival3 cells
- Clock latency
- Cell delay
- Setup time
- Launch at 20 ns
The tool picked the third
wclkedge, at 20 ns. - Capture at 21 ns
The next
rclkedge after it is at 21 ns. That pair is the closest the two clocks ever come. - 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).
Cell Arc Through Edge Delay (ns) Time (ns) Slew (ns) 1 mem5/CLK→mem5/Qdfxtp_1 fall 0.3040 20.3040 0.0213 mem5/Q→rmux_hi/A1wire m5 fall 0.0000 20.3040 0.0213 2 rmux_hi/A1→rmux_hi/Xmux4_1 fall 0.4680 20.7720 0.0797 rmux_hi/X→rmux/A1wire hi fall 0.0000 20.7720 0.0797 3 rmux/A1→rmux/Xmux2_1 fall 0.2886 21.0606 0.0500 rmux/X→rdata/Dwire rd fall 0.0000 21.0606 0.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.
- Cycle 7
-
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.
-
CompareFalse Path vs Multicycle PathL1 JuniorL2 Mid-Level
Compare a false path with a multicycle path. When is each the right exception?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
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.
-
What IfA Configuration Register Written While RunningL2 Mid-Level
What if software writes the false-pathed configuration register while the block is running?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
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
-
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?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
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.
-
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]2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
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
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).
Cell Arc Through Edge Delay (ns) Time (ns) Slew (ns) d0→a0_reg/Dwire d0 fall 0.0000 0.2000 0.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 fromd0is timed again: slack 0.5837 ns.Self-Check
Tick each key point you covered in your answer.
-
What IfA False Path That Covers the ResetL1 JuniorL2 Mid-Level
What if the same broad false path also covers the reset input?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
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