From 78779ce2e9383eb63c02400148ee552bcd0a71f6 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 19 Jun 2017 22:22:08 -0400 Subject: [PATCH] Corrected the "property parallel none" command option so that it gets applied properly to all existing cells (as well as all future cells, but normally the former is applicable in a setup file for LVS). --- base/netgen.c | 26 ++++++++++++++++++++++++++ base/netgen.h | 1 + tcltk/tclnetgen.c | 8 ++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/base/netgen.c b/base/netgen.c index 3946b48..258878a 100644 --- a/base/netgen.c +++ b/base/netgen.c @@ -871,6 +871,32 @@ int ReduceExpressions(struct objlist *instprop, struct objlist *parprops, return 0; } +/*----------------------------------------------------------------------*/ +/* Set/clear the flag bit COMB_NO_PARALLEL on all cells. Note that the */ +/* function is called with value for enabling combine parallel, so */ +/* value TRUE means clear bit, value FALSE means set bit. */ +/*----------------------------------------------------------------------*/ + +struct nlist *SetParallelCombineFlag(struct hashlist *p, void *clientdata) +{ + struct nlist *ptr; + int *value = (int *)clientdata; + + ptr = (struct nlist *)(p->ptr); + if (*value == TRUE) + ptr->flags &= (~COMB_NO_PARALLEL); + else + ptr->flags |= COMB_NO_PARALLEL; + + return NULL; /* NULL keeps search alive */ +} + +void SetParallelCombine(int value) +{ + ClearDumpedList(); + RecurseCellHashTable2(SetParallelCombineFlag, (void *)(&value)); +} + /*----------------------------------------------------------------------*/ /* Delete a property from the master cell record. */ /*----------------------------------------------------------------------*/ diff --git a/base/netgen.h b/base/netgen.h index 6c4a514..7c01784 100644 --- a/base/netgen.h +++ b/base/netgen.h @@ -35,6 +35,7 @@ extern struct property *PropertyInteger(char *name, int fnum, char *key, extern struct property *PropertyString(char *name, int fnum, char *key, double slop, char *pdefault); extern int PropertyDelete(char *name, int fnum, char *key); +extern void SetParallelCombine(int value); extern int PropertyTolerance(char *name, int fnum, char *key, int ival, double dval); extern int PropertyMerge(char *name, int fnum, char *key, int merge_type); diff --git a/tcltk/tclnetgen.c b/tcltk/tclnetgen.c index 669e435..ae0e562 100644 --- a/tcltk/tclnetgen.c +++ b/tcltk/tclnetgen.c @@ -3228,10 +3228,14 @@ _netcmp_property(ClientData clientData, return TCL_OK; } else if ((objc == 3) && (!strcmp(Tcl_GetString(objv[1]), "parallel"))) { - if (!strcmp(Tcl_GetString(objv[2]), "none")) + if (!strcmp(Tcl_GetString(objv[2]), "none")) { GlobalParallelNone = TRUE; - else if (!strcmp(Tcl_GetString(objv[2]), "all")) + SetParallelCombine(FALSE); + } + else if (!strcmp(Tcl_GetString(objv[2]), "all")) { GlobalParallelNone = FALSE; + SetParallelCombine(TRUE); + } else { Tcl_SetResult(interp, "Bad option, should be property parallel none|all", NONE);