# HG changeset patch # User Mychaela Falconia # Date 1605413927 0 # Node ID d1a507d34e771d6758d38ee37cbb1b2eca8dd2f2 # Parent 64d4abf63e1e8664e527db0d1aefcbd7dc138cbf netdiff: donl-netmatch2 factored out diff -r 64d4abf63e1e -r d1a507d34e77 .hgignore --- a/.hgignore Sun Nov 15 04:11:01 2020 +0000 +++ b/.hgignore Sun Nov 15 04:18:47 2020 +0000 @@ -25,6 +25,7 @@ ^netdiff/convert/tedax2donl$ ^netdiff/flip2pin/donl-flip2pin$ ^netdiff/match/donl-netmatch$ +^netdiff/match/donl-netmatch2$ ^netdiff/match/donl-pindiff$ ^netdiff/match/donl-pinreport$ ^netdiff/renpart/donl-rename-parts$ diff -r 64d4abf63e1e -r d1a507d34e77 netdiff/match/Makefile --- a/netdiff/match/Makefile Sun Nov 15 04:11:01 2020 +0000 +++ b/netdiff/match/Makefile Sun Nov 15 04:18:47 2020 +0000 @@ -1,9 +1,10 @@ CC= gcc CFLAGS= -O2 -PROGS= donl-netmatch donl-pindiff donl-pinreport +PROGS= donl-netmatch donl-netmatch2 donl-pindiff donl-pinreport BINDIR= /usr/local/bin NETMATCH_OBJS= main.o rdpass.o +NETMATCH2_OBJS= match.o rdpass.o PINDIFF_OBJS= pindiff.o rdpass.o PINREPORT_OBJS= main2.o rdpass.o @@ -12,6 +13,9 @@ donl-netmatch: ${NETMATCH_OBJS} ${CC} ${CFLAGS} -o $@ ${NETMATCH_OBJS} +donl-netmatch2: ${NETMATCH2_OBJS} + ${CC} ${CFLAGS} -o $@ ${NETMATCH2_OBJS} + donl-pindiff: ${PINDIFF_OBJS} ${CC} ${CFLAGS} -o $@ ${PINDIFF_OBJS} diff -r 64d4abf63e1e -r d1a507d34e77 netdiff/match/match.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netdiff/match/match.c Sun Nov 15 04:18:47 2020 +0000 @@ -0,0 +1,34 @@ +#include +#include +#include "struct.h" + +char *infnames[2]; +struct pin_info *database; + +write_matching_nets() +{ + struct pin_info *p; + + for (p = database; p; p = p->next) { + if (!p->netnames[0] || !p->netnames[1]) + continue; + printf("%s\t%s\n", p->netnames[0], p->netnames[1]); + } +} + +main(argc, argv) + char **argv; +{ + int i; + + if (argc != 3) { + fprintf(stderr, "usage: %s net1 net2\n", argv[0]); + exit(1); + } + infnames[0] = argv[1]; + infnames[1] = argv[2]; + for (i = 0; i < 2; i++) + read_pass(i); + write_matching_nets(); + exit(0); +}