aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-04-12 18:21:16 -0700
committerEddie Hung <eddie@fpgeh.com>2019-04-12 18:21:16 -0700
commit9bfcd8006378dc0d81a1c902501a6efeb8406cba (patch)
tree2176e0d2df239255b108feb20e8ae83dc6e9f983
parent482a60825b607880c5984b1b39e06e58c5f75ada (diff)
downloadyosys-9bfcd8006378dc0d81a1c902501a6efeb8406cba.tar.gz
yosys-9bfcd8006378dc0d81a1c902501a6efeb8406cba.tar.bz2
yosys-9bfcd8006378dc0d81a1c902501a6efeb8406cba.zip
Handle __dummy_o__ and __const[01]__ in read_aiger not abc
-rw-r--r--frontends/aiger/aigerparse.cc4
-rw-r--r--passes/techmap/abc9.cc22
2 files changed, 8 insertions, 18 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc
index 7e91c8cac..e35a8ad62 100644
--- a/frontends/aiger/aigerparse.cc
+++ b/frontends/aiger/aigerparse.cc
@@ -477,6 +477,10 @@ next_line:
RTLIL::Wire* wire = outputs[variable];
log_assert(wire);
log_assert(wire->port_output);
+ if (escaped_s.in("__dummy_o__", "__const0__", "__const1__")) {
+ wire->port_output = false;
+ continue;
+ }
if (index == 0) {
// Cope with the fact that a CO might be identical
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc
index 52b1b6d35..edc07092b 100644
--- a/passes/techmap/abc9.cc
+++ b/passes/techmap/abc9.cc
@@ -546,11 +546,10 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri
output_bits.insert({wire, i});
}
else {
- if (w->name.in("\\__dummy_o__", "\\__const0__", "\\__const1__")) {
- //log("Don't call ABC as there is nothing to map.\n");
- //goto cleanup;
- continue;
- }
+ //if (w->name == "\\__dummy_o__") {
+ // log("Don't call ABC as there is nothing to map.\n");
+ // goto cleanup;
+ //}
// Attempt another wideports_split here because there
// exists the possibility that different bits of a port
@@ -875,19 +874,6 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri
RTLIL::Wire *w = it.second;
if (!w->port_input && !w->port_output)
continue;
- if (w->name == "\\__const0__") {
- log_assert(w->port_output);
- module->connect(w, RTLIL::S0);
- continue;
- }
- if (w->name == "\\__const1__") {
- log_assert(w->port_output);
- module->connect(w, RTLIL::S1);
- continue;
- }
- if (w->name == "\\__dummy_o__")
- continue;
-
RTLIL::Wire *wire = module->wire(w->name);
RTLIL::Wire *remap_wire = module->wire(remap_name(w->name));
RTLIL::SigSpec signal;