From 590b6fb3cd94da56ee99c8df78c4ca27c2d9fdcc Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 28 Aug 2023 18:40:11 +0200 Subject: [PATCH] better ERC messaging in case of errors (shorts, pins with missing attrs), ...) --- src/netlist.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/netlist.c b/src/netlist.c index 3d4d0025..5b59e5e6 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -272,17 +272,17 @@ static int hash_inst_pin(int what, int i, int j) } - if(for_netlist && jnetlist_count && for_netlist && jinst[i].name, j, prop_ptr); + my_snprintf(str, S(str), "Error: instance %s, symbol %s: missing all or name or dir attributes on pin " + " %d\n" + "attribute string:\n%s", + xctx->inst[i].instname, xctx->inst[i].name, j, prop_ptr ? prop_ptr : ""); statusmsg(str,2); err |= 1; - if(!xctx->netlist_count) { - xctx->inst[i].color = -PINLAYER; - xctx->hilight_nets=1; - } + xctx->inst[i].color = -PINLAYER; + xctx->hilight_nets=1; } rot=xctx->inst[i].rot; flip=xctx->inst[i].flip; @@ -648,7 +648,7 @@ static int signal_short( const char *tag, const char *n1, const char *n2) { int err = 0; char str[2048]; - if( n1 && n2 && strcmp( n1, n2) ) + if( xctx->netlist_count && n1 && n2 && strcmp( n1, n2) ) { err |= 1; my_snprintf(str, S(str), "Error: %s shorted: %s - %s", tag, n1, n2);