Skip to content

Make slang ignore Verilog definitions of macros#3975

Merged
maliberty merged 3 commits intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:synth-oyvind-blackboxes
Mar 12, 2026
Merged

Make slang ignore Verilog definitions of macros#3975
maliberty merged 3 commits intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:synth-oyvind-blackboxes

Conversation

@openroad-ci
Copy link
Collaborator

@openroad-ci openroad-ci commented Mar 10, 2026

Fixes #3849, respin of #3967

CI Could not Update Rules

[ERROR] asap7/aes-block: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/aes-mbff: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/aes: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/aes_lvt: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/cva6: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/ethmac: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/ethmac_lvt: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/gcd-ccs: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/gcd: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/ibex: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/jpeg: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/jpeg_lvt: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/mock-alu: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/mock-cpu: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/riscv32i-mock-sram: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/riscv32i: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/swerv_wrapper: No metrics found, please check the latest CI build for issues.
[ERROR] asap7/uart: No metrics found, please check the latest CI build for issues.
[ERROR] gf180/aes-hybrid: No metrics found, please check the latest CI build for issues.
[ERROR] gf180/aes: No metrics found, please check the latest CI build for issues.
[ERROR] gf180/ibex: No metrics found, please check the latest CI build for issues.
[ERROR] gf180/jpeg: No metrics found, please check the latest CI build for issues.
[ERROR] gf180/riscv32i: No metrics found, please check the latest CI build for issues.
[ERROR] gf180/uart-blocks: No metrics found, please check the latest CI build for issues.
[ERROR] ihp-sg13g2/aes: No metrics found, please check the latest CI build for issues.
[ERROR] ihp-sg13g2/gcd: No metrics found, please check the latest CI build for issues.
[ERROR] ihp-sg13g2/i2c-gpio-expander: No metrics found, please check the latest CI build for issues.
[ERROR] ihp-sg13g2/ibex: No metrics found, please check the latest CI build for issues.
[ERROR] ihp-sg13g2/jpeg: No metrics found, please check the latest CI build for issues.
[ERROR] ihp-sg13g2/riscv32i: No metrics found, please check the latest CI build for issues.
[ERROR] ihp-sg13g2/spi: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/aes: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/ariane133: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/ariane136: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/black_parrot: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/bp_be_top: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/bp_fe_top: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/bp_multi_top: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/dynamic_node: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/gcd: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/ibex: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/jpeg: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/mempool_group: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/swerv: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/swerv_wrapper: No metrics found, please check the latest CI build for issues.
[ERROR] nangate45/tinyRocket: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hd/aes: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hd/chameleon: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hd/gcd: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hd/ibex: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hd/jpeg: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hd/microwatt: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hd/riscv32i: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hs/aes: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hs/gcd: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hs/ibex: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hs/jpeg: No metrics found, please check the latest CI build for issues.
[ERROR] sky130hs/riscv32i: No metrics found, please check the latest CI build for issues.

Updated Rules

[WARNING] Multiple clocks not supported. Will use first clock: mrx_clk_pad_i: 300.0000.
[WARNING] Multiple clocks not supported. Will use first clock: mrx_clk_pad_i: 300.0000.
[WARNING] Multiple clocks not supported. Will use first clock: clk: 333.0000.
[WARNING] Multiple clocks not supported. Will use first clock: clk_i: 3.0000.
designs/nangate45/mempool_group/rules-base.json updates:

Metric Old New Type
synth__design__instance__area__stdcell 271098.37 424000.0 Failing
placeopt__design__instance__area 295108 451188 Failing
placeopt__design__instance__count__stdcell 163160 198708 Failing
cts__timing__setup__tns -10300.0 -11900.0 Failing
globalroute__timing__setup__tns -11100.0 -14200.0 Failing
detailedroute__route__wirelength 4029078 5795200 Failing
finish__design__instance__area 303227 461696 Failing

[WARNING] Multiple clocks not supported. Will use first clock: ext_clk: 15.0000.

Messages from CI

[INFO] asap7/minimal not included in CI.
[INFO] gf12 not included in the update.
[INFO] gf55 not included in the update.
[INFO] nangate45/bp_quad not included in CI.
[INFO] rapidus2hp not included in the update.

oharboe and others added 2 commits March 10, 2026 17:37
When using the slang HDL frontend, macros defined in ADDITIONAL_LIBS
liberty files were not automatically blackboxed. If the same module
had a competing Verilog definition in the source files, slang would
elaborate the Verilog version instead of using the liberty view.

Fix by extracting cell names from ADDITIONAL_LIBS and passing them
as --blackboxed-module arguments to slang, making the behavior
consistent with the builtin Verilog frontend.

Tested:

  asap7/uart with a fake ADDITIONAL_LIBS containing uart_tx:
    Confirmed slang blackboxes uart_tx from the liberty file
    instead of elaborating it from the Verilog source.

  asap7/cva6 (which uses slang and ADDITIONAL_LIBS with fakeram
    macros that also have .sv definitions in VERILOG_FILES):
    make DESIGN_CONFIG=designs/asap7/cva6/config.mk do-yosys-canonicalize
    Passes in ~5s with no errors.

  asap7/uart without ADDITIONAL_LIBS:
    Normal synthesis still passes (no regression).

Fixes The-OpenROAD-Project#3849

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Signed-off-by: Martin Povišer <povik@cutebit.org>
@povik povik added the UpdateRules Starts GHA to update rules label Mar 10, 2026
@openroad-ci openroad-ci removed the UpdateRules Starts GHA to update rules label Mar 10, 2026
@maliberty maliberty requested a review from povik March 10, 2026 20:15
@povik povik added the UpdateRules Starts GHA to update rules label Mar 11, 2026
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@openroad-ci openroad-ci removed the UpdateRules Starts GHA to update rules label Mar 11, 2026
@povik
Copy link
Contributor

povik commented Mar 11, 2026

@maliberty this one should be good to go. The degradation on nangate45/mempool_group is because we were losing macros in the baseline result.

@maliberty maliberty merged commit 5808340 into The-OpenROAD-Project:master Mar 12, 2026
8 checks passed
@maliberty maliberty deleted the synth-oyvind-blackboxes branch March 12, 2026 11:25
@oharboe
Copy link
Collaborator

oharboe commented Mar 12, 2026

😌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[slang] Automatically blackbox macros from ADDITIONAL_LIBS

4 participants