syn: is an inout port supported by synthesize? export creates its block terminal twice and segfaults

未关闭
#11,991 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@povik 已经在做这个了。

开始于 2026年10月26日。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp
领域
backend, databases

调研方向

Start with the Input and Output branches in src/syn/src/flow/export.cc and trace how elaboration represents the reproduced top-level inout port. Run the Nangate45 Tcl sequence from test/ with the Verilog reproducer to confirm the export failure. Done means the issue has a defined outcome for inout ports and the run either exports the intended terminal or reports a clear unsupported case without crashing.

由索引模型根据 Issue 内容生成。

描述

syn

Is an inout port meant to be supported by synthesize? A top-level module with one ends the run with Signal 11 received in the export to the database.

Reproducer (Nangate45 from test/):

module top(inout [1:0] p, input e, output y);
  assign y = p[0] & e;
endmodule
read_lef Nangate45/Nangate45_tech.lef
read_lef Nangate45/Nangate45_stdcell.lef
read_liberty Nangate45/Nangate45_typ.lib
sv_elaborate design.sv
synthesize

The synthesis passes complete (the stats table prints), and then the process dies during the export, before anything is written.

What seems to happen: elaboration represents the inout port as both an Input instance and an Output instance named p. In src/syn/src/flow/export.cc, the Input branch creates the block terminals p[0] and p[1]. The Output branch then calls dbBTerm::create again for the same names. dbBTerm::create returns nullptr for a name already in the block, and the following bterm->setIoType(odb::dbIoType::OUTPUT) dereferences it.

The question: what is the intended behaviour for an inout port? A few possibilities:

  • one terminal with dbIoType::INOUT (when the Output meets a terminal its Input already created, set the type to INOUT instead of creating a new terminal);
  • a clean logger_->error saying inout ports are not supported yet;
  • or rejecting it earlier, at sv_elaborate.

Any of these would avoid the crash. We are happy to open a PR for whichever you prefer.

Seen at 27288f5c90. The same code is on master (7b3eb039fa).

主要语言
Verilog
星标
3.4k
派生
1.1k
平均合并
3 天 11 小时
30 天内合并 PR
245

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

The-OpenROAD-Project/OpenROAD 的其他 Issue

查看 The-OpenROAD-Project/OpenROAD 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。