Added an experimental option for the cifoutput tech file section to

force magic to scale down the internal grid to the minimum
manufacturing grid size specified in the cifoutput section, upon
reading the techfile.
This commit is contained in:
Tim Edwards 2023-01-13 17:21:37 -05:00
parent ff608b51f1
commit f06f3b47db
4 changed files with 13 additions and 1 deletions

View File

@ -1 +1 @@
8.3.360
8.3.361

View File

@ -315,6 +315,7 @@ typedef struct cifstyle
#define CWF_SEE_NO_VENDOR 0x10 /* Hide magic's GDS from vendor cells */
#define CWF_NO_ERRORS 0x20 /* Do not generate error msgs and fdbk */
#define CWF_STRING_LIMIT 0x40 /* Use older Calma format character limit */
#define CWF_MINIMUM_GRID 0x80 /* Force minimum grid scaling */
/* procedures */

View File

@ -1018,6 +1018,8 @@ CIFTechLine(sectionName, argc, argv)
{
if (strcmp(argv[i], "calma-permissive-labels") == 0)
CIFCurStyle->cs_flags |= CWF_PERMISSIVE_LABELS;
else if (strcmp(argv[i], "set-minimum-grid") == 0)
CIFCurStyle->cs_flags |= CWF_MINIMUM_GRID;
else if (strcmp(argv[i], "grow-euclidean") == 0)
CIFCurStyle->cs_flags |= CWF_GROW_EUCLIDEAN;
else if (strcmp(argv[i], "see-no-vendor") == 0)

View File

@ -44,6 +44,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/heap.h"
#include "cif/cif.h"
#include "cif/cif.h"
#include "cif/CIFint.h"
#include "drc/drc.h"
#include "mzrouter/mzrouter.h"
#include "wiring/wiring.h"
@ -757,6 +758,14 @@ skipsection:
if ((filename != NULL) && (retval == TRUE))
{
/* If the tech file insists that the grid should be set */
/* to the minimum, then enforce it. */
if (CIFCurStyle && (CIFCurStyle->cs_flags & CWF_MINIMUM_GRID))
{
DBLambda[0] = 1;
DBLambda[1] = CIFCurStyle->cs_scaleFactor / CIFCurStyle->cs_gridLimit;
}
/* If internal scalefactor is not the default 1:1, then we */
/* need to scale the techfile numbers accordingly. */