Repository navigation
Conversation
There was a problem hiding this comment.
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.
| if { [env_var_exists_and_non_empty ADDITIONAL_CDLS] } { | ||
| cdl read_masters $::env(ADDITIONAL_CDLS) | ||
| cdl out $::env(RESULTS_DIR)/$stem.cdl | ||
| } |
There was a problem hiding this comment.
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
}
There was a problem hiding this comment.
This concerns code that was broken before my PR too - I'm not sure it's in scope to fix that too.
| stages: | ||
| - final |
There was a problem hiding this comment.
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_abstractThere was a problem hiding this comment.
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]>
08e843d to
8cfcdd3
Compare
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 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 |
Signed-off-by: Tim Henkes <[email protected]>
CDL_FILESwas unused but documented with useful semantics. This removesCDL_FILESand replaces it withADDITIONAL_CDLSto match naming of other variables with similar semantics likeADDITIONAL_LEFS.Additionally, it makes
ADDITIONAL_CDLSactually function the wayCDL_FILESwas originally documented, by passing the additional CDLs towrite_cdlincdl.tcl, which is called in preparation of LVS.Note that this also updates the one use of
CDL_FILESingenerate_abstract.tcljust to not leave stale references around, even though that code is probably broken (I don't thinkcdl read_mastersexists). However fixing that too seemed out-of-scope to me for this PR.