aboutsummaryrefslogtreecommitdiffstats
path: root/backends/aiger/xaiger.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-11-22 13:24:28 -0800
committerEddie Hung <eddie@fpgeh.com>2019-11-22 13:24:28 -0800
commit8ef241c6f4a976dca67760c43e820d4e812f2fc2 (patch)
tree25f21c29042df1bb9e53faeaf711a2a67a4828c0 /backends/aiger/xaiger.cc
parentc761fa49b73e9ad3680b05e89442adb6fb22b543 (diff)
downloadyosys-8ef241c6f4a976dca67760c43e820d4e812f2fc2.tar.gz
yosys-8ef241c6f4a976dca67760c43e820d4e812f2fc2.tar.bz2
yosys-8ef241c6f4a976dca67760c43e820d4e812f2fc2.zip
Revert "write_xaiger to not use module POs but only write outputs if driven"
This reverts commit 0ab1e496dc601f8e9d5efbcc5b2be7cf6b2d9673.
Diffstat (limited to 'backends/aiger/xaiger.cc')
-rw-r--r--backends/aiger/xaiger.cc34
1 files changed, 11 insertions, 23 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc
index c69b0fa85..5d125b653 100644
--- a/backends/aiger/xaiger.cc
+++ b/backends/aiger/xaiger.cc
@@ -542,30 +542,18 @@ struct XAigerWriter
}
for (auto bit : unused_bits)
- if (holes_mode)
- undriven_bits.erase(bit);
- else if (!undriven_bits.count(bit))
- output_bits.insert(bit);
-
- if (!holes_mode) {
- for (auto port : module->ports) {
- auto wire = module->wire(port);
- if (!wire->port_output)
- continue;
- for (int i = 0; i < GetSize(wire); i++) {
- SigBit wirebit(wire, i);
- SigBit bit = sigmap(wirebit);
- if (bit == State::Sx)
- continue;
- if (!undriven_bits.count(bit)) {
- output_bits.insert(wirebit);
- }
- }
+ undriven_bits.erase(bit);
+
+ if (!undriven_bits.empty() && !holes_mode) {
+ bool whole_module = module->design->selected_whole_module(module->name);
+ undriven_bits.sort();
+ for (auto bit : undriven_bits) {
+ if (whole_module)
+ log_warning("Treating undriven bit %s.%s like $anyseq.\n", log_id(module), log_signal(bit));
+ input_bits.insert(bit);
}
-
- if (!undriven_bits.empty())
- for (auto bit : undriven_bits)
- input_bits.insert(bit);
+ if (whole_module)
+ log_warning("Treating a total of %d undriven bits in %s like $anyseq.\n", GetSize(undriven_bits), log_id(module));
}
if (holes_mode) {