Skip to content

Commit 4e5af57

Browse files
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.
1 parent 9800d98 commit 4e5af57

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.468
1+
8.3.469

database/DBcellname.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -2294,8 +2294,14 @@ DBFindUse(id, parentDef)
22942294
he = HashLookOnly(&parentDef->cd_idHash, id);
22952295
if (delimit != NULL) *delimit = '[';
22962296
if (he == NULL)
2297-
return (CellUse *) NULL;
2297+
{
2298+
/* Try again without ignoring the delimiter */
2299+
if (delimit != NULL)
2300+
he = HashLookOnly(&parentDef->cd_idHash, id);
22982301

2302+
if (he == NULL)
2303+
return (CellUse *) NULL;
2304+
}
22992305
return (CellUse *) HashGetValue(he);
23002306
}
23012307

tcltk/toolkit.tcl

+14-2
Original file line numberDiff line numberDiff line change
@@ -1440,11 +1440,22 @@ proc magic::gencell_dialog {instname gencell_type library parameters} {
14401440

14411441
if {$instname != {}} {
14421442
# Remove any array component of the instance name
1443-
set instname [string map {\\ ""} $instname]
1444-
if {[regexp {^(.*)\[[0-9,]+\]$} $instname valid instroot]} {
1443+
set baseinstname [string map {\\ ""} $instname]
1444+
if {[regexp {^(.*)\[[0-9,]+\]$} $baseinstname valid instroot]} {
1445+
set originstname $instname
14451446
set instname $instroot
1447+
} else {
1448+
set instroot ""
14461449
}
14471450
set gname [instance list celldef [subst $instname]]
1451+
if {$gname == ""} {
1452+
# Check if name inherited brackets but is not an array
1453+
if {$instroot != ""} {
1454+
set testinstname [string map {\[ \\\[ \] \\\]} $baseinstname]
1455+
set gname [instance list celldef [subst $testinstname]]
1456+
set instname $originstname
1457+
}
1458+
}
14481459
set gencell_type [cellname list property $gname gencell]
14491460
if {$library == {}} {
14501461
set library [cellname list property $gname library]
@@ -1562,6 +1573,7 @@ proc magic::gencell_dialog {instname gencell_type library parameters} {
15621573
magic::gencell_dialog \$inst $gencell_type $library {} ; \
15631574
destroy .params}]
15641575
} else {
1576+
set instname [string map {\[ \\\[ \] \\\]} $instname]
15651577
button .params.buttons.apply -text "Apply" -command \
15661578
"magic::gencell_change $instname $gencell_type $library {}"
15671579
button .params.buttons.okay -text "Okay" -command \

0 commit comments

Comments
 (0)