std::set<std::string> cell_types;
std::vector<const RTLIL::Design*> designs;
+ CellTypes()
+ {
+ }
+
+ CellTypes(const RTLIL::Design *design)
+ {
+ setup(design);
+ }
+
void setup(const RTLIL::Design *design = NULL)
{
if (design)
}
}
+ void insert(RTLIL::SigSpec sig, const std::set<T> &data)
+ {
+ sig.expand();
+ for (auto &c : sig.chunks) {
+ if (c.wire == NULL)
+ continue;
+ assert(c.width == 1);
+ bitDef_t bit(c.wire, c.offset);
+ bits[bit].insert(data.begin(), data.end());
+ }
+ }
+
void erase(RTLIL::SigSpec sig)
{
sig.expand();
}
}
+ void erase(RTLIL::SigSpec sig, const std::set<T> &data)
+ {
+ sig.expand();
+ for (auto &c : sig.chunks) {
+ if (c.wire == NULL)
+ continue;
+ assert(c.width == 1);
+ bitDef_t bit(c.wire, c.offset);
+ bits[bit].erase(data.begin(), data.end());
+ }
+ }
+
void find(RTLIL::SigSpec sig, std::set<T> &result)
{
sig.expand();