Date:2012-12-21 02:03:58 (6 years 8 months ago)
Author:Werner Almesberger
Commit:bb055fa2094a7b7cb8f96e67c1a46db4856146a2
Message: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.
Files: README (1 diff)
dump.c (1 diff)
fpd.l (1 diff)
fpd.y (4 diffs)
hole.c (2 diffs)
hole.h (2 diffs)
obj.c (2 diffs)
obj.h (1 diff)

Change Details

README
177177Do not check for overlaps at all.
178178
179179If the "allow" directive is omitted, fped defaults to allowing
180neigher overlap nor touch.
180neither overlap nor touch.
181
182There is also the following experimental directive that can be used
183alone or without one of the overlap-checking directives:
184
185allow holes
186
187Allow multiple holes per pad.
181188
182189
183190Vectors
dump.c
591591    default:
592592        abort();
593593    }
594    if (!holes_linked)
595        fprintf(file, "allow holes\n");
594596}
595597
596598
fpd.l
133133<INITIAL>"allow" BEGIN(ALLOW);
134134<ALLOW>"overlap" return TOK_ALLOW_OVERLAP;
135135<ALLOW>"touch" return TOK_ALLOW_TOUCH;
136<ALLOW>"holes" return TOK_ALLOW_HOLES;
136137
137138<INITIAL>"%del" { BEGIN(NOKEYWORD);
138139                  return TOK_DBG_DEL; }
fpd.y
462462%token TOK_DBG_DEL TOK_DBG_MOVE TOK_DBG_FRAME
463463%token TOK_DBG_PRINT TOK_DBG_IPRINT
464464%token TOK_DBG_DUMP TOK_DBG_EXIT TOK_DBG_TSORT TOK_DBG_MEAS
465%token TOK_ALLOW_OVERLAP TOK_ALLOW_TOUCH
465%token TOK_ALLOW_HOLES TOK_ALLOW_OVERLAP TOK_ALLOW_TOUCH
466466
467467%token <num> NUMBER
468468%token <str> STRING
...... 
544544
545545setup:
546546    unit
547    | allow
548    | unit allow
549    | allow unit
547    | allow_pads
548    | allow_holes
549    | unit allow_pads
550    | unit allow_pads allow_holes
551    | unit allow_holes
552    | unit allow_holes allow_pads
553    | allow_pads unit
554    | allow_pads unit allow_holes
555    | allow_holes unit
556    | allow_holes unit allow_pads
550557    ;
551558
552559unit:
...... 
565572        }
566573    ;
567574
568allow:
575allow_pads:
569576    TOK_ALLOW_TOUCH
570577        {
571578            allow_overlap = ao_touch;
...... 
576583        }
577584    ;
578585
586allow_holes:
587    TOK_ALLOW_HOLES
588        {
589            holes_linked = 0;
590        }
591    ;
592
579593frame_defs:
580594    | frame_defs frame_def
581595    ;
hole.c
11/*
22 * hole.c - Classify holes and connect them with pads
33 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 by Werner Almesberger
4 * Written 2010, 2012 by Werner Almesberger
5 * Copyright 2010, 2012 by Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
7373}
7474
7575
76int link_holes(void)
76int link_holes(int linked)
7777{
7878    const struct pkg *pkg;
7979
8080    for (pkg = pkgs; pkg; pkg = pkg->next) {
8181        clear_links(pkg);
82        if (!connect_holes(pkg))
83            return 0;
82        if (linked)
83            if (!connect_holes(pkg))
84                return 0;
8485    }
8586        return 1;
8687}
hole.h
11/*
22 * hole.h - Classify holes and connect them with pads
33 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 by Werner Almesberger
4 * Written 2010, 2012 by Werner Almesberger
5 * Copyright 2010, 2012 by Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
1313#ifndef HOLE_H
1414#define HOLE_H
1515
16int link_holes(void);
16int link_holes(int linked);
1717
1818#endif /* !HOLE_H */
obj.c
4040struct frame *active_frame = NULL;
4141void *instantiation_error = NULL;
4242enum allow_overlap allow_overlap = ao_none;
43int holes_linked = 1;
4344
4445
4546static struct bitset *frame_set; /* frames visited in "call chain" */
...... 
577578    find_vec = NULL;
578579    find_obj = NULL;
579580    if (ok)
580        ok = link_holes();
581        ok = link_holes(holes_linked);
581582    if (ok)
582583        ok = refine_layers(allow_overlap);
583584    if (ok)
obj.h
255255extern struct frame *active_frame;
256256extern void *instantiation_error;
257257extern enum allow_overlap allow_overlap;
258extern int holes_linked;
258259
259260
260261struct inst;

Archive Download the corresponding diff file

Branches:
master



interactive