Skip to content

Commit

Permalink
Corrected an issue with "instance celldef" when the instance name
Browse files Browse the repository at this point in the history
contains brackets which are not indicating a cell array.  Also
fixed a related issue with the PDK toolkit code, in which the
gencell routines fail if an instance name contains brackets which
are not indicating a cell array.
  • Loading branch information
RTimothyEdwards committed Apr 5, 2024
1 parent 9800d98 commit 4e5af57
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.468
8.3.469
8 changes: 7 additions & 1 deletion database/DBcellname.c
Original file line number Diff line number Diff line change
Expand Up @@ -2294,8 +2294,14 @@ DBFindUse(id, parentDef)
he = HashLookOnly(&parentDef->cd_idHash, id);
if (delimit != NULL) *delimit = '[';
if (he == NULL)
return (CellUse *) NULL;
{
/* Try again without ignoring the delimiter */
if (delimit != NULL)
he = HashLookOnly(&parentDef->cd_idHash, id);

if (he == NULL)
return (CellUse *) NULL;
}
return (CellUse *) HashGetValue(he);
}

Expand Down
16 changes: 14 additions & 2 deletions tcltk/toolkit.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1440,11 +1440,22 @@ proc magic::gencell_dialog {instname gencell_type library parameters} {

if {$instname != {}} {
# Remove any array component of the instance name
set instname [string map {\\ ""} $instname]
if {[regexp {^(.*)\[[0-9,]+\]$} $instname valid instroot]} {
set baseinstname [string map {\\ ""} $instname]
if {[regexp {^(.*)\[[0-9,]+\]$} $baseinstname valid instroot]} {
set originstname $instname
set instname $instroot
} else {
set instroot ""
}
set gname [instance list celldef [subst $instname]]
if {$gname == ""} {
# Check if name inherited brackets but is not an array
if {$instroot != ""} {
set testinstname [string map {\[ \\\[ \] \\\]} $baseinstname]
set gname [instance list celldef [subst $testinstname]]
set instname $originstname
}
}
set gencell_type [cellname list property $gname gencell]
if {$library == {}} {
set library [cellname list property $gname library]
Expand Down Expand Up @@ -1562,6 +1573,7 @@ proc magic::gencell_dialog {instname gencell_type library parameters} {
magic::gencell_dialog \$inst $gencell_type $library {} ; \
destroy .params}]
} else {
set instname [string map {\[ \\\[ \] \\\]} $instname]
button .params.buttons.apply -text "Apply" -command \
"magic::gencell_change $instname $gencell_type $library {}"
button .params.buttons.okay -text "Okay" -command \
Expand Down

0 comments on commit 4e5af57

Please sign in to comment.