Make slang ignore Verilog definitions of macros#3975
Merged
maliberty merged 3 commits intoThe-OpenROAD-Project:masterfrom Mar 12, 2026
Merged
Conversation
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
approved these changes
Mar 10, 2026
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Contributor
|
@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
approved these changes
Mar 12, 2026
Collaborator
|
😌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
[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.