Fix abc_test024
authorEddie Hung <eddie@fpgeh.com>
Wed, 29 May 2019 22:24:09 +0000 (15:24 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 29 May 2019 22:24:09 +0000 (15:24 -0700)
backends/aiger/xaiger.cc

index 2ffd460dd8c8949ecab95e93c1f3621beabbd845..bf696bfd6a2041a666256f017e9971b2af5b7266 100644 (file)
@@ -152,10 +152,11 @@ struct XAigerWriter
                                undriven_bits.insert(bit);
                                unused_bits.insert(bit);
 
-                               if (wire->port_input)
-                                       input_bits.insert(bit);
-                               else if (keep)
+                               if (wire->port_input || keep) {
+                                       if (bit != wirebit)
+                                               alias_map[bit] = wirebit;
                                        input_bits.insert(wirebit);
+                               }
 
                                if (wire->port_output || keep) {
                                        if (bit != wirebit)
@@ -166,7 +167,7 @@ struct XAigerWriter
                }
 
                for (auto bit : input_bits)
-                       undriven_bits.erase(bit);
+                       undriven_bits.erase(sigmap(bit));
 
                for (auto bit : output_bits)
                        if (!bit.wire->port_input)