Fixed handling of cell ports that aren't wires
authorAndrew Zonenberg <azonenberg@drawersteak.com>
Fri, 11 Aug 2017 23:16:25 +0000 (16:16 -0700)
committerAndrew Zonenberg <azonenberg@drawersteak.com>
Mon, 14 Aug 2017 17:28:16 +0000 (10:28 -0700)
passes/opt/opt_rmports.cc

index afbbecf84af40987efd4c476586a275c043caa46..5522dfa8efc1332d1f2c77d35b107da81f0e0c6e 100644 (file)
@@ -90,6 +90,9 @@ struct OptRmportsPass : public Pass {
                                for(int i=0; i<conn.second.size(); i++)
                                {
                                        auto sig = conn.second[i].wire;
+                                       if(sig == NULL)
+                                               continue;
+
                                        //log("  sig %s\n", sig->name.c_str());
                                        if( (sig->port_input || sig->port_output) && (used_ports.find(sig->name) == used_ports.end()) )
                                                used_ports.emplace(sig->name);