[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

  1. Dropped register-level injection — confirmed fatal by both self-review and Codex
  2. HDL-path-driven resolution — uses RAL add_hdl_path_slice("u_reg.u_ctrl_tx.q", 0, 1) metadata
  3. qe/re pulse companions — extended bridge entry for FIFO write-enable/read-enable pulses
  4. Synchronous eval_syn — force_eval_syn on write for write-then-read correctness
  5. Bumped bridge capacity — 64 → 256

Questions for Reviewer

  1. Is the HDL path resolution strategy (suffix matching of "tb.dut.u_reg.u_ctrl_tx.q" against registered syn signals) robust enough?
  2. Is the qe pulse companion approach correct? Should we detect qe by naming convention (".qe" sibling of ".q") or by some other mechanism?
  3. Is synchronous eval_syn (force_eval_syn) safe, or should we use a dirty flag + eval-before-read approach?
  4. Does prim_subreg get its own syn scope via collectSynthBodiesRecursive? If not, the .q variable won't be in the signal registry.
  5. Is lowering add_hdl_path_slice in SystemTaskLowering.cpp the right place, or should it be in UVMLowering.cpp?

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗