aboutsummaryrefslogtreecommitdiffstats
path: root/backends/aiger
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-09-29 11:26:22 -0700
committerGitHub <noreply@github.com>2019-09-29 11:26:22 -0700
commit8474c5b366660153cae03a9de4af8e1ed809856d (patch)
treecd157ab16b528565ced19f422ffece1c6110f53e /backends/aiger
parentce0631c371f69f0132ea9ee4bc8f5ee576dbb1a3 (diff)
parentb3d8a60cbd94176076f23c4ea6c94ec24e6773e0 (diff)
downloadyosys-8474c5b366660153cae03a9de4af8e1ed809856d.tar.gz
yosys-8474c5b366660153cae03a9de4af8e1ed809856d.tar.bz2
yosys-8474c5b366660153cae03a9de4af8e1ed809856d.zip
Merge pull request #1359 from YosysHQ/xc7dsp
DSP inference for Xilinx (improved for ice40, initial support for ecp5)
Diffstat (limited to 'backends/aiger')
-rw-r--r--backends/aiger/xaiger.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc
index 87ba0aedf..4018cc9de 100644
--- a/backends/aiger/xaiger.cc
+++ b/backends/aiger/xaiger.cc
@@ -350,6 +350,8 @@ struct XAigerWriter
if (!box_module || !box_module->attributes.count("\\abc_box_id"))
continue;
+ bool blackbox = box_module->get_blackbox_attribute(true /* ignore_wb */);
+
// Fully pad all unused input connections of this box cell with S0
// Fully pad all undriven output connections of this box cell with anonymous wires
// NB: Assume box_module->ports are sorted alphabetically
@@ -394,7 +396,10 @@ struct XAigerWriter
rhs = it->second;
}
else {
- rhs = module->addWire(NEW_ID, GetSize(w));
+ Wire *wire = module->addWire(NEW_ID, GetSize(w));
+ if (blackbox)
+ wire->set_bool_attribute(ID(abc_padding));
+ rhs = wire;
cell->setPort(port_name, rhs);
}
@@ -405,12 +410,7 @@ struct XAigerWriter
if (O != b)
alias_map[O] = b;
undriven_bits.erase(O);
-
- auto jt = input_bits.find(b);
- if (jt != input_bits.end()) {
- log_assert(keep_bits.count(O));
- input_bits.erase(b);
- }
+ input_bits.erase(b);
}
}
}
@@ -429,7 +429,7 @@ struct XAigerWriter
// inherit existing inout's drivers
if ((wire->port_input && wire->port_output && !undriven_bits.count(bit))
|| keep_bits.count(bit)) {
- RTLIL::IdString wire_name = wire->name.str() + "$inout.out";
+ RTLIL::IdString wire_name = stringf("$%s$inout.out", wire->name.c_str());
RTLIL::Wire *new_wire = module->wire(wire_name);
if (!new_wire)
new_wire = module->addWire(wire_name, GetSize(wire));