1.1 RTL Quality Checks & Unintentional Latch Detection
Before launching logic synthesis, the RTL codebase must pass stringent frontend quality gates. The most catastrophic error in sequential design is the unintentional transparent latch. In standard cell ASICs (such as GPDK045), latches consume excessive power, complicate static timing analysis (borrowing time, multi-phase clocking), and lack synchronous scan-chains.
Unintentional latches occur when an asynchronous combinational block (always_comb or always @*) has incomplete conditional coverage (e.g., missing else or missing default in a case statement).
// Missing else branches in comb block
always_comb begin
if (en)
q = d; // When en=0, q retains state!
// Inferred transparent D-latch (LDHQX1)
end
// Synchronous sequential template
always_ff @(posedge clk or negedge rst_n) begin
if (!rst_n)
q <= 1'b0;
else if (en)
q <= d; // Inferred DFFASX1
end
# 1. Enable strict linting and design rule reporting set_db / .information_level 9 set_db / .hdl_error_on_blackbox true set_db / .hdl_error_on_latch true; # Halts elaboration if any latch is inferred! # 2. Check for latches explicitly after elaboration elaborate $DESIGN_TOP check_design -all > reports/check_design_pre_synth.rpt report_latches > reports/inferred_latches.rpt # Inspecting reports/inferred_latches.rpt must yield 0 latches for standard synchronous IP.
set_db / .hdl_error_on_latch true guarantees that accidental latches immediately throw a fatal error during elaborate rather than silently propagating through syn_generic and ruining post-route hold timing!