1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-22 02:36:15 +02:00

experimental directive "allow holes" to allow multiple holes per pad

This is for thermal vias and the unusual grounding method NXP use in
their HVQFN33 footprints.
This commit is contained in:
Werner Almesberger 2012-12-20 22:03:58 -03:00
parent 5b21495dcf
commit bb055fa209
8 changed files with 42 additions and 15 deletions

9
README
View File

@ -177,7 +177,14 @@ allow overlap
Do not check for overlaps at all.
If the "allow" directive is omitted, fped defaults to allowing
neigher overlap nor touch.
neither overlap nor touch.
There is also the following experimental directive that can be used
alone or without one of the overlap-checking directives:
allow holes
Allow multiple holes per pad.
Vectors

2
dump.c
View File

@ -591,6 +591,8 @@ static void dump_allow(FILE *file)
default:
abort();
}
if (!holes_linked)
fprintf(file, "allow holes\n");
}

1
fpd.l
View File

@ -133,6 +133,7 @@ SP [\t ]*
<INITIAL>"allow" BEGIN(ALLOW);
<ALLOW>"overlap" return TOK_ALLOW_OVERLAP;
<ALLOW>"touch" return TOK_ALLOW_TOUCH;
<ALLOW>"holes" return TOK_ALLOW_HOLES;
<INITIAL>"%del" { BEGIN(NOKEYWORD);
return TOK_DBG_DEL; }

24
fpd.y
View File

@ -462,7 +462,7 @@ static int dbg_meas(const char *name)
%token TOK_DBG_DEL TOK_DBG_MOVE TOK_DBG_FRAME
%token TOK_DBG_PRINT TOK_DBG_IPRINT
%token TOK_DBG_DUMP TOK_DBG_EXIT TOK_DBG_TSORT TOK_DBG_MEAS
%token TOK_ALLOW_OVERLAP TOK_ALLOW_TOUCH
%token TOK_ALLOW_HOLES TOK_ALLOW_OVERLAP TOK_ALLOW_TOUCH
%token <num> NUMBER
%token <str> STRING
@ -544,9 +544,16 @@ opt_setup:
setup:
unit
| allow
| unit allow
| allow unit
| allow_pads
| allow_holes
| unit allow_pads
| unit allow_pads allow_holes
| unit allow_holes
| unit allow_holes allow_pads
| allow_pads unit
| allow_pads unit allow_holes
| allow_holes unit
| allow_holes unit allow_pads
;
unit:
@ -565,7 +572,7 @@ unit:
}
;
allow:
allow_pads:
TOK_ALLOW_TOUCH
{
allow_overlap = ao_touch;
@ -576,6 +583,13 @@ allow:
}
;
allow_holes:
TOK_ALLOW_HOLES
{
holes_linked = 0;
}
;
frame_defs:
| frame_defs frame_def
;

11
hole.c
View File

@ -1,8 +1,8 @@
/*
* hole.c - Classify holes and connect them with pads
*
* Written 2010 by Werner Almesberger
* Copyright 2010 by Werner Almesberger
* Written 2010, 2012 by Werner Almesberger
* Copyright 2010, 2012 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -73,14 +73,15 @@ static void clear_links(const struct pkg *pkg)
}
int link_holes(void)
int link_holes(int linked)
{
const struct pkg *pkg;
for (pkg = pkgs; pkg; pkg = pkg->next) {
clear_links(pkg);
if (!connect_holes(pkg))
return 0;
if (linked)
if (!connect_holes(pkg))
return 0;
}
return 1;
}

6
hole.h
View File

@ -1,8 +1,8 @@
/*
* hole.h - Classify holes and connect them with pads
*
* Written 2010 by Werner Almesberger
* Copyright 2010 by Werner Almesberger
* Written 2010, 2012 by Werner Almesberger
* Copyright 2010, 2012 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -13,6 +13,6 @@
#ifndef HOLE_H
#define HOLE_H
int link_holes(void);
int link_holes(int linked);
#endif /* !HOLE_H */

3
obj.c
View File

@ -40,6 +40,7 @@ struct frame *frames = NULL;
struct frame *active_frame = NULL;
void *instantiation_error = NULL;
enum allow_overlap allow_overlap = ao_none;
int holes_linked = 1;
static struct bitset *frame_set; /* frames visited in "call chain" */
@ -577,7 +578,7 @@ int instantiate(void)
find_vec = NULL;
find_obj = NULL;
if (ok)
ok = link_holes();
ok = link_holes(holes_linked);
if (ok)
ok = refine_layers(allow_overlap);
if (ok)

1
obj.h
View File

@ -255,6 +255,7 @@ extern struct frame *frames; /* root frame first */
extern struct frame *active_frame;
extern void *instantiation_error;
extern enum allow_overlap allow_overlap;
extern int holes_linked;
struct inst;