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:
parent
9800d98dee
commit
4e5af57f3c
|
|
@ -2294,8 +2294,14 @@ DBFindUse(id, parentDef)
|
||||||
he = HashLookOnly(&parentDef->cd_idHash, id);
|
he = HashLookOnly(&parentDef->cd_idHash, id);
|
||||||
if (delimit != NULL) *delimit = '[';
|
if (delimit != NULL) *delimit = '[';
|
||||||
if (he == NULL)
|
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);
|
return (CellUse *) HashGetValue(he);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1440,11 +1440,22 @@ proc magic::gencell_dialog {instname gencell_type library parameters} {
|
||||||
|
|
||||||
if {$instname != {}} {
|
if {$instname != {}} {
|
||||||
# Remove any array component of the instance name
|
# Remove any array component of the instance name
|
||||||
set instname [string map {\\ ""} $instname]
|
set baseinstname [string map {\\ ""} $instname]
|
||||||
if {[regexp {^(.*)\[[0-9,]+\]$} $instname valid instroot]} {
|
if {[regexp {^(.*)\[[0-9,]+\]$} $baseinstname valid instroot]} {
|
||||||
|
set originstname $instname
|
||||||
set instname $instroot
|
set instname $instroot
|
||||||
|
} else {
|
||||||
|
set instroot ""
|
||||||
}
|
}
|
||||||
set gname [instance list celldef [subst $instname]]
|
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]
|
set gencell_type [cellname list property $gname gencell]
|
||||||
if {$library == {}} {
|
if {$library == {}} {
|
||||||
set library [cellname list property $gname 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 {} ; \
|
magic::gencell_dialog \$inst $gencell_type $library {} ; \
|
||||||
destroy .params}]
|
destroy .params}]
|
||||||
} else {
|
} else {
|
||||||
|
set instname [string map {\[ \\\[ \] \\\]} $instname]
|
||||||
button .params.buttons.apply -text "Apply" -command \
|
button .params.buttons.apply -text "Apply" -command \
|
||||||
"magic::gencell_change $instname $gencell_type $library {}"
|
"magic::gencell_change $instname $gencell_type $library {}"
|
||||||
button .params.buttons.okay -text "Okay" -command \
|
button .params.buttons.okay -text "Okay" -command \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue