1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

Added relaxation of pad overlap checking. Not GUI-settable yet.

- README, fpd.l, fpd.y: added directives "allow touch" and "allow overlap" to
  make overlap checking more permissive
- dump.c (dump_allow, dump): generate "allow" directive
- obj.h, obj.c (allow_overlap): added global variable for strictness of overlap
  checking
- overlap.h, overlap.c (overlap, ...), layer.h, layer.c (refine_layers):
  strictness of overlap checking is passed as an argument
- hole.c (check_through_hole), layer.h, layer.c (refine_copper), obj.c
  (instantiate): updated callers of "overlap" to provide "allow" argument



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5974 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2010-08-09 04:16:37 +00:00
parent b2b3a46119
commit e6b2658a65
11 changed files with 153 additions and 42 deletions

11
layer.c
View File

@@ -113,7 +113,8 @@ static int refine_overlapping(struct inst *copper, struct inst *other)
}
static int refine_copper(const struct pkg *pkg_copper, struct inst *copper)
static int refine_copper(const struct pkg *pkg_copper, struct inst *copper,
enum allow_overlap allow)
{
const struct pkg *pkg;
struct inst *other;
@@ -126,7 +127,7 @@ static int refine_copper(const struct pkg *pkg_copper, struct inst *copper)
continue;
for (other = pkg->insts[ip_pad_copper]; other;
other = other->next)
if (copper != other && overlap(copper, other)) {
if (copper != other && overlap(copper, other, allow)) {
fail("overlapping copper pads "
"(\"%s\" line %d, \"%s\" line %d)",
copper->u.pad.name, copper->obj->lineno,
@@ -136,7 +137,7 @@ static int refine_copper(const struct pkg *pkg_copper, struct inst *copper)
}
for (other = pkg->insts[ip_pad_special]; other;
other = other->next)
if (overlap(copper, other))
if (overlap(copper, other, ao_none))
if (!refine_overlapping(copper, other))
return 0;
}
@@ -155,7 +156,7 @@ static void mirror_layers(layer_type *layers)
}
int refine_layers(void)
int refine_layers(enum allow_overlap allow)
{
const struct pkg *pkg;
struct inst *copper;
@@ -163,7 +164,7 @@ int refine_layers(void)
for (pkg = pkgs; pkg; pkg = pkg->next)
for (copper = pkg->insts[ip_pad_copper]; copper;
copper = copper->next) {
if (!refine_copper(pkg, copper))
if (!refine_copper(pkg, copper, allow))
return 0;
if (copper->u.pad.hole)
mirror_layers(&copper->u.pad.layers);