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

オープン
#11,991 コメント 0 件 リアクション 0 件 担当者 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時間
マージ済み PR(30日)
245

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

The-OpenROAD-Project/OpenROAD のほかの issue

The-OpenROAD-Project/OpenROAD の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。