# HG changeset patch # User Space Falcon # Date 1438497249 0 # Node ID f7b09a54c2ce89c97d3f2160c0374ed270dae529 # Parent dda8e455c8635bb119d1e7b96fdb13f8679f0548 unet-bind: implemented the check for unclaimed instances diff -r dda8e455c863 -r f7b09a54c2ce ueda/sverp-bind/insthash.c --- a/ueda/sverp-bind/insthash.c Sun Aug 02 03:23:44 2015 +0000 +++ b/ueda/sverp-bind/insthash.c Sun Aug 02 06:34:09 2015 +0000 @@ -58,3 +58,23 @@ return(n); return(0); } + +check_unclaimed_instances() +{ + int hb; + register struct instance *n; + unsigned unclaimed_count = 0; + + for (hb = 0; hb < HASH_SIZE; hb++) + for (n = hashtab[hb]; n; n = n->nextinhash) + if (!n->claimed) { + fprintf(stderr, + "error: declared instance %s not claimed by input netlist\n", + n->name); + unclaimed_count++; + } + if (unclaimed_count) { + fprintf(stderr, "error: unclaimed instances found, aborting\n"); + exit(1); + } +} diff -r dda8e455c863 -r f7b09a54c2ce ueda/sverp-bind/main.c --- a/ueda/sverp-bind/main.c Sun Aug 02 03:23:44 2015 +0000 +++ b/ueda/sverp-bind/main.c Sun Aug 02 06:34:09 2015 +0000 @@ -72,7 +72,8 @@ input_filename); exit(1); } + check_unclaimed_instances(); - /* remaining functionality remains to be implemented */ + /* output remains to be implemented */ exit(0); }