aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-12-31 17:06:03 -0800
committerEddie Hung <eddie@fpgeh.com>2019-12-31 17:06:03 -0800
commit96db05aaefd970c819ba1f75b7246c5958527b8b (patch)
treec95746f801d13a1399406faf5538d40d6a5e0774 /backends
parente5ed8e8e2172c243bcca651eedd81053a5d7f575 (diff)
downloadyosys-96db05aaefd970c819ba1f75b7246c5958527b8b.tar.gz
yosys-96db05aaefd970c819ba1f75b7246c5958527b8b.tar.bz2
yosys-96db05aaefd970c819ba1f75b7246c5958527b8b.zip
parse_xaiger to not take box_lookup
Diffstat (limited to 'backends')
-rw-r--r--backends/aiger/xaiger.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc
index 3e40562b7..be900f0e7 100644
--- a/backends/aiger/xaiger.cc
+++ b/backends/aiger/xaiger.cc
@@ -414,14 +414,25 @@ struct XAigerWriter
auto w = box_module->wire(port_name);
log_assert(w);
if (w->get_bool_attribute("\\abc9_carry")) {
- if (w->port_input)
+ if (w->port_input) {
+ if (carry_in != IdString())
+ log_error("Module '%s' contains more than one 'abc9_carry' input port.\n", log_id(box_module));
carry_in = port_name;
- if (w->port_output)
+ }
+ if (w->port_output) {
+ if (carry_out != IdString())
+ log_error("Module '%s' contains more than one 'abc9_carry' output port.\n", log_id(box_module));
carry_out = port_name;
+ }
}
else
r.first->second.push_back(port_name);
}
+
+ if (carry_in != IdString() && carry_out == IdString())
+ log_error("Module '%s' contains an 'abc9_carry' input port but no output port.\n", log_id(box_module));
+ if (carry_in == IdString() && carry_out != IdString())
+ log_error("Module '%s' contains an 'abc9_carry' output port but no input port.\n", log_id(box_module));
if (carry_in != IdString()) {
log_assert(carry_out != IdString());
r.first->second.push_back(carry_in);