mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 01:24:51 +02:00
Implemented glob-style matching for label selection. Introduces
an optional extra argument to the "select" command that can be used to select labels by glob-style matching; e.g., "select area labels VSS*" or "select less area labels *_1". This will help in managing labels after flattening a standard cell design; e.g., by using "select less area labels */VDD".
This commit is contained in:
+14
-5
@@ -413,7 +413,7 @@ SelectIntersect(scx, type, xMask, negate)
|
||||
*/
|
||||
|
||||
void
|
||||
SelectArea(scx, types, xMask)
|
||||
SelectArea(scx, types, xMask, globmatch)
|
||||
SearchContext *scx; /* Describes the area in which material
|
||||
* is to be selected. The resulting
|
||||
* coordinates should map to the coordinates
|
||||
@@ -433,6 +433,10 @@ SelectArea(scx, types, xMask)
|
||||
* considered. 0 means treat everything as
|
||||
* expanded.
|
||||
*/
|
||||
char *globmatch; /* If non-NULL, and if L_LABELS is among the
|
||||
* selection types, then do glob-style matching
|
||||
* of any labels against this string.
|
||||
*/
|
||||
{
|
||||
Rect labelArea, cellArea;
|
||||
|
||||
@@ -457,8 +461,13 @@ SelectArea(scx, types, xMask)
|
||||
/* Select labels. */
|
||||
|
||||
if (TTMaskHasType(types, L_LABEL))
|
||||
(void) DBCellCopyAllLabels(scx, &DBAllTypeBits, xMask,
|
||||
SelectUse, &labelArea);
|
||||
{
|
||||
if (globmatch != NULL)
|
||||
DBCellCopyGlobLabels(scx, &DBAllTypeBits, xMask, SelectUse, &labelArea,
|
||||
globmatch);
|
||||
else
|
||||
DBCellCopyAllLabels(scx, &DBAllTypeBits, xMask, SelectUse, &labelArea);
|
||||
}
|
||||
else (void) DBCellCopyAllLabels(scx, types, xMask, SelectUse, &labelArea);
|
||||
|
||||
/* Select unexpanded cell uses. */
|
||||
@@ -803,7 +812,7 @@ chunkdone:
|
||||
|
||||
if (less)
|
||||
{
|
||||
SelRemoveArea(&bestChunk, &typeMask);
|
||||
SelRemoveArea(&bestChunk, &typeMask, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -813,7 +822,7 @@ chunkdone:
|
||||
if (DBIsContact(type))
|
||||
TTMaskSetOnlyType(&typeMask, type);
|
||||
|
||||
SelectArea(&newscx, &typeMask, xMask);
|
||||
SelectArea(&newscx, &typeMask, xMask, NULL);
|
||||
}
|
||||
|
||||
if (pArea != NULL) *pArea = bestChunk;
|
||||
|
||||
Reference in New Issue
Block a user