write_xaiger to flatten 1'bx/1'bz to 1'b0 again
authorEddie Hung <eddie@fpgeh.com>
Fri, 21 Jun 2019 02:40:17 +0000 (19:40 -0700)
committerEddie Hung <eddie@fpgeh.com>
Fri, 21 Jun 2019 02:40:17 +0000 (19:40 -0700)
backends/aiger/xaiger.cc

index 55a95d8357b243f380e5d75e92fce9581af09459..82f0f24b2226fa1e5ab6457c6b68c2f308a7471c 100644 (file)
@@ -104,8 +104,10 @@ struct XAigerWriter
                                aig_map[bit] = bit2aig(alias_map.at(bit));
                        }
 
-                       if (bit == State::Sx || bit == State::Sz)
-                               log_error("Design contains 'x' or 'z' bits. Use 'setundef' to replace those constants.\n");
+                       if (bit == State::Sx || bit == State::Sz) {
+                               log_debug("Bit '%s' contains 'x' or 'z' bits. Treating as 1'b0.\n", log_signal(bit));
+                               aig_map[bit] = 0;
+                       }
                }
 
                log_assert(aig_map.at(bit) >= 0);