Clock period improvements left on the table due to SYNTH_MINIMUM_KEEP_SIZE counting macros
メンテナーはふだん 1 日以内に返信
@joaomai がすでに取り組んでいます。
2026年10月22日 から。
評価
この issue はまだ評価されていません。
説明
Description
SYNTH_MINIMUM_KEEP_SIZE decides which modules hierarchical synthesis keeps. The expectation is that it measures the logic yosys works on: since @povik's #2552 the decision is keep_hierarchy -min_cost on yosys's cost estimate of each module, in NAND2 equivalents.
A macro is no work for yosys, but it counts. keep_hierarchy -min_cost needs a cost for every instanced blackbox, and convert_liberty_areas gives each Liberty cell, SRAM macros included, the gate equivalent of its area; since #4650 an AUTO_MEMORIES macro gets its generated view's area the same way. A small wrapper around macros therefore looks like a large module of logic and is kept, and its boundary stays wherever a path runs through it.
Example, asap7/riscv32i (SYNTH_MINIMUM_KEEP_SIZE=10000): the only module kept is dmem, four fakeram7_256x32 instances (1,376 µm² of Liberty area) and 56 µm² of address decode. Its boundary sits on the worst path, between the ALU's address adder and the SRAMs' enable decode, which synthesis then optimises apart. Through global route at 780 ps:
| min reg2reg period | reg2reg endpoints within 10 % of it: faster / slower | |
|---|---|---|
today: dmem kept |
835.6 ps | – |
dmem flattened, which is what the rule decides with macro cost 0 |
791.8 ps | 995 / 3 |
Details and the measurement in #4713 (closed, FYI only).
Suggested Solution
Make the rule measure what it is for: a blackbox macro, Liberty or AUTO_MEMORIES, costs 0 (or 1) gate equivalents towards its parent's size. keep_hierarchy -min_cost still has a cost for every blackbox, so the error that made a cost necessary does not come back.
The designs this can change are those that synthesise hierarchically with a keep threshold and have macros (make print-* on master; the gf12 designs not checked): asap7/coralnpu, asap7/riscv32i; nangate45/ariane133, ariane136, black_parrot, bp_be_top, bp_fe_top, bp_multi_top, bp_quad, mempool_group, tinyRocket. Their keep decisions change only where a macro sits under a module the rule would otherwise flatten, and their QoR may move either way.
Additional Context
variables.yaml describes the threshold as an area in NAND2 units. Stating there which is intended, the logic yosys works on or area including macros, would make the behaviour less surprising either way.
- 主要言語
- Verilog
- スター
- 767
- フォーク
- 544
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 96
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
The-OpenROAD-Project/OpenROAD-flow-scripts のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4717 ·
メンテナーはふだん 1 日以内に返信
-
Make SYNTH_HDL_FRONTEND=slang default再び着手できるかも @jeffng-or が 31 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4548 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Use percent of minimum clock period対応中かも @migueldalberto が 22 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4583 · コメント 7 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
asap7 cva6 fails in PSM with demo constraint file対応中かも @gadfort が 37 日前に担当しました。 オープンpsm
The-OpenROAD-Project/OpenROAD-flow-scripts#4539 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
GF180 platform tech LEF omits Nwell, causing SRAM OBS truncation on OpenDB import対応中かも @bandhambalaji が 4 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4496 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信