Corrected an issue with "instance celldef" when the instance name

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.
This commit is contained in:
Tim Edwards 2024-04-05 17:47:44 -04:00
parent 9800d98dee
commit 4e5af57f3c
3 changed files with 22 additions and 4 deletions

View File

@ -1 +1 @@
8.3.468
8.3.469

View File

@ -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);
}

View File

@ -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]
@ -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 \