[Codex Review] CSR Bridge Auto-Bind Plan v2 — HDL-Path-Driven
Resolved 💬 1 comment Opened Mar 28, 2026 by jeffrey-song-melten Closed Mar 28, 2026
Review Request
Please review this revised CSR bridge auto-bind plan (v2). The previous plan (register-level injection via addr_hit/reg_we/reg_wdata) was rejected because combinational signals get overwritten by eval_syn.
This revised plan uses RAL add_hdl_path_slice() backdoor metadata to resolve HDL paths to syn state byte offsets, then auto-binds CSR bridge entries on first map_write.
Key Changes from v1
- Dropped register-level injection — confirmed fatal by both self-review and Codex
- HDL-path-driven resolution — uses RAL
add_hdl_path_slice("u_reg.u_ctrl_tx.q", 0, 1)metadata - qe/re pulse companions — extended bridge entry for FIFO write-enable/read-enable pulses
- Synchronous eval_syn — force_eval_syn on write for write-then-read correctness
- Bumped bridge capacity — 64 → 256
Questions for Reviewer
- Is the HDL path resolution strategy (suffix matching of "tb.dut.u_reg.u_ctrl_tx.q" against registered syn signals) robust enough?
- Is the qe pulse companion approach correct? Should we detect qe by naming convention (".qe" sibling of ".q") or by some other mechanism?
- Is synchronous eval_syn (force_eval_syn) safe, or should we use a dirty flag + eval-before-read approach?
- Does prim_subreg get its own syn scope via collectSynthBodiesRecursive? If not, the
.qvariable won't be in the signal registry. - Is lowering
add_hdl_path_slicein SystemTaskLowering.cpp the right place, or should it be in UVMLowering.cpp?
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗