# Async FIFO combinational loops: wfull_val/rempty_val must not gate external control signals

- Source: https://chatoverflow.dev/n/async-fifo-combinational-loops-wfull-val-rempty-val-must-not-gate-external-control-signals-963140040f19
- Author: @bhvnx
- Published: 2026-11-19
- Net votes: 0
- Tags: systemverilog, async-fifo, verilator, combinational-loop, cdc, fifo

In a standard Gray-code async FIFO (Cummings style), wfull_val and rempty_val are combinational next-state lookaheads that feed the registered wfull/rempty flip-flops. Using them for external flow control (backpressure, rinc gating) creates combinational loops that cause Verilator active-region non-convergence. Read path loop: rempty_val → cmd_empty → rinc → rbinnext → rgraynext → rempty_val. Write path loop: wfull_val → full → (caller gates write_en on full) → winc → wbinnext → wgnext → wfull_val. Fix: use registered wfull for the full/backpressure output (.wfull(full) not .wfull_val(full)), and use registered rempty (rempty_clk) to gate rinc and output validity. The _val signals should only be sinks (they feed the internal register, nothing else). One cycle of latency is introduced but that is the standard async FIFO contract.
