From 20077d3d56a68a3fddf1be829b9406f1a6ca262b Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 3 Mar 2021 17:31:45 -0500 Subject: [PATCH] Modifed the handling of parallelized no-connects so that the behavior can be turned on or off from the setup using "property parallel open" to allow parallelizing devices with no-connect pins vs. "property parallel connected" to only allow parallelizing of devices with all pins connected. --- base/netgen.c | 12 ++++++++---- base/netgen.h | 1 + tcltk/tclnetgen.c | 10 ++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/base/netgen.c b/base/netgen.c index ab8e97f..0c8dc86 100644 --- a/base/netgen.c +++ b/base/netgen.c @@ -50,6 +50,7 @@ int NextNode; int Composition = NONE; int QuickSearch = 0; int GlobalParallelNone = FALSE; +int GlobalParallelOpen = TRUE; int AddToExistingDefinition = 0; /* default: overwrite cell when reopened */ @@ -3164,10 +3165,13 @@ int CombineParallel(char *model, int file) /* can be treated as equivalent for the purpose of parallelization. */ nodecount = (int *)CALLOC((tp->nodename_cache_maxnodenum + 1), sizeof(int)); - for (ob = tp->cell; ob; ob = ob->next) { - if (ob->node >= 0) - if (ob->type != NODE) - nodecount[ob->node]++; + + if (GlobalParallelOpen) { + for (ob = tp->cell; ob; ob = ob->next) { + if (ob->node >= 0) + if (ob->type != NODE) + nodecount[ob->node]++; + } } lob = NULL; diff --git a/base/netgen.h b/base/netgen.h index 9de7dfe..20e55f3 100644 --- a/base/netgen.h +++ b/base/netgen.h @@ -149,6 +149,7 @@ extern int NoOutput; /* set this to 1 to disable stdout output */ extern int Composition; /* direction of composition */ extern int UnixWildcards; /* TRUE if *,?,{},[] only; false if full REGEXP */ extern int GlobalParallelNone; /* If TRUE, don't parallel combine any cells */ +extern int GlobalParallelOpen; /* If TRUE, parallel combine cells w/no-connects */ /* magic internal flag to restrict searches to recently placed cells */ extern int QuickSearch; /* does re"CellDef"ing a cell add to it or overwrite it??? */ diff --git a/tcltk/tclnetgen.c b/tcltk/tclnetgen.c index 6f57700..e34522f 100644 --- a/tcltk/tclnetgen.c +++ b/tcltk/tclnetgen.c @@ -3417,9 +3417,15 @@ _netcmp_property(ClientData clientData, GlobalParallelNone = FALSE; SetParallelCombine(TRUE); } + else if (!strcmp(Tcl_GetString(objv[2]), "connected")) { + GlobalParallelOpen = FALSE; + } + else if (!strcmp(Tcl_GetString(objv[2]), "open")) { + GlobalParallelOpen = TRUE; + } else { - Tcl_SetResult(interp, "Bad option, should be property parallel none|all", - NULL); + Tcl_SetResult(interp, "Bad option, should be property parallel " + "none|all|connected", NULL); return TCL_ERROR; } return TCL_OK;