Skip to content

variables: declare ADDITIONAL_CDLS in favour of CDL_FILES - #4931

Open
Syndace wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
Syndace:additional-cdls-variable
Open

Syndace wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
Syndace:additional-cdls-variable

Conversation

@Syndace

@Syndace Syndace commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

CDL_FILES was unused but documented with useful semantics. This removes CDL_FILES and replaces it with ADDITIONAL_CDLS to match naming of other variables with similar semantics like ADDITIONAL_LEFS.

Additionally, it makes ADDITIONAL_CDLS actually function the way CDL_FILES was originally documented, by passing the additional CDLs to write_cdl in cdl.tcl, which is called in preparation of LVS.

Note that this also updates the one use of CDL_FILES in generate_abstract.tcl just to not leave stale references around, even though that code is probably broken (I don't think cdl read_masters exists). However fixing that too seemed out-of-scope to me for this PR.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the CDL_FILES variable with ADDITIONAL_CDLS to specify additional CDL master netlist files for macros. The feedback identifies three key issues: a Makefile guard that prevents block CDLs from being appended unless ADDITIONAL_CDLS is already defined, a failure in generate_abstract.tcl when handling multiple space-separated CDL files, and the need to add generate_abstract to the allowed stages for ADDITIONAL_CDLS in variables.yaml to prevent the variable from being silently erased.

Comment thread flow/Makefile Resolved
Comment on lines +31 to 34
if { [env_var_exists_and_non_empty ADDITIONAL_CDLS] } {
cdl read_masters $::env(ADDITIONAL_CDLS)
cdl out $::env(RESULTS_DIR)/$stem.cdl
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If ADDITIONAL_CDLS contains multiple space-separated file paths, passing $::env(ADDITIONAL_CDLS) directly to cdl read_masters will fail because it will be treated as a single file path with spaces. Iterating over the list of files using a foreach loop ensures each CDL file is read correctly.

if { [env_var_exists_and_non_empty ADDITIONAL_CDLS] } {
  foreach cdl_file $::env(ADDITIONAL_CDLS) {
    cdl read_masters $cdl_file
  }
  cdl out $::env(RESULTS_DIR)/$stem.cdl
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This concerns code that was broken before my PR too - I'm not sure it's in scope to fix that too.

Comment on lines +1157 to +1158
stages:
- final

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Because generate_abstract.tcl calls erase_non_stage_variables generate_abstract at the start of the script, any environment variable not explicitly declared for the generate_abstract stage in variables.yaml will be silently unset. Since ADDITIONAL_CDLS is used in generate_abstract.tcl, you must add generate_abstract to its stages list to prevent it from being erased.

  stages:
    - final
    - generate_abstract

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - this concerns code that was broken before too.

CDL_FILES was unused but documented with useful semantics. This
removes CDL_FILES and replaces it with ADDITIONAL_CDLS to match
naming of other variables with similar semantics like
ADDITIONAL_LEFS.

Additionally, it makes ADDITIONAL_CDLS actually function the way
CDL_FILES was originally documented, by passing the additional CDLs
to write_cdl in cdl.tcl, which is called in preparation of LVS.

Signed-off-by: Tim Henkes <[email protected]>
@Syndace
Syndace force-pushed the additional-cdls-variable branch from 08e843d to 8cfcdd3 Compare December 1, 2026 22:52
@openroad-ci

openroad-ci commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 5789e4d · Jenkins build #3 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.

✅ QoR is compared against the master build at this PR's merge base 58710a4.

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.

2 participants