The-OpenROAD-Project / The-OpenROAD-Project/OpenROAD

`syn` does not infer latches — silently emits a combinational loop

Open
#10,770 4 comments 0 reactions 1 assignee View on GitHub

@maliberty is already working on this.

Since Aug 19, 2026.

syn
Dominant language
Verilog
Stars
3.1k
Forks
1k
Avg merge
2d 23h
Merged PRs (30d)
136

Description

Summary

OpenROAD's integrated synthesis (sv_elaborate + synthesize) does not infer level-sensitive latches. A standard transparent-latch RTL pattern (always @* if (clk) q = d;) is treated as a combinational loop and "fixed" with a loop_breaker, producing a netlist with zero sequential elements and no warning. Yosys infers the latch correctly from the identical source.

Minimal reproducer

latchtest.v:

module latchtest (clk, d, q);
  input  clk, d;
  output q;
  reg    q;
  always @* if (clk) q = d;   // transparent-high D latch: q holds when clk==0
endmodule

Synthesize with the integrated flow:

read_liberty asap7sc7p5t_*.lib
sv_elaborate --top latchtest latchtest.v
synthesize
Observed
Build succeeded: 0 errors, 0 warnings
loop_breaker: 1 cells, 1 bits
[INFO SYN-0056] liveness: replaced 0 register bits, 0 combinational bits

The result is pure combinational logic — no latch cell (e.g. asap7 DHLx1) is instantiated. The latch's hold path is implemented as a combinational loop broken by a loop_breaker.

The identical result (loop_breaker / 0 register bits, no latch) occurs with an explicit sensitivity list, always @(clk or d) if (clk) q = d; — so this is not a sensitivity-list coding issue.

Expected

A latch cell is inferred (as the equivalent yosys flow does). On asap7, the same source through yosys yields exactly one DHLx1_ASAP7_75t_R.

Impact

Any latch-based design is silently mis-synthesized into combinational loops, with no synthesis-time error.

Workaround

Use the yosys synthesis path (in ORFS: SYNTH_USE_SYN=0, the default), which infers latches correctly.

Environment
  • OpenROAD 4c26918f5a (26Q2-2270); also reproduces on master b442cabf87 (2026-06-26).
  • Platform: asap7. Linux x86-64, gcc 13.3, RELWITHDEBINFO build.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.