diff options
Diffstat (limited to 'common/nextpnr.cc')
-rw-r--r-- | common/nextpnr.cc | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc index dd1ebc59..f05f4a55 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -104,13 +104,6 @@ std::string IdStringList::str(const Context *ctx) const return s; } -TimingConstrObjectId BaseCtx::timingWildcardObject() -{ - TimingConstrObjectId id; - id.index = 0; - return id; -} - std::string &StrRingBuffer::next() { std::string &s = buffer.at(index++); @@ -119,76 +112,6 @@ std::string &StrRingBuffer::next() return s; } -TimingConstrObjectId BaseCtx::timingClockDomainObject(NetInfo *clockDomain) -{ - NPNR_ASSERT(clockDomain->clkconstr != nullptr); - if (clockDomain->clkconstr->domain_tmg_id != TimingConstrObjectId()) { - return clockDomain->clkconstr->domain_tmg_id; - } else { - TimingConstraintObject obj; - TimingConstrObjectId id; - id.index = int(constraintObjects.size()); - obj.id = id; - obj.type = TimingConstraintObject::CLOCK_DOMAIN; - obj.entity = clockDomain->name; - clockDomain->clkconstr->domain_tmg_id = id; - constraintObjects.push_back(obj); - return id; - } -} - -TimingConstrObjectId BaseCtx::timingNetObject(NetInfo *net) -{ - if (net->tmg_id != TimingConstrObjectId()) { - return net->tmg_id; - } else { - TimingConstraintObject obj; - TimingConstrObjectId id; - id.index = int(constraintObjects.size()); - obj.id = id; - obj.type = TimingConstraintObject::NET; - obj.entity = net->name; - constraintObjects.push_back(obj); - net->tmg_id = id; - return id; - } -} - -TimingConstrObjectId BaseCtx::timingCellObject(CellInfo *cell) -{ - if (cell->tmg_id != TimingConstrObjectId()) { - return cell->tmg_id; - } else { - TimingConstraintObject obj; - TimingConstrObjectId id; - id.index = int(constraintObjects.size()); - obj.id = id; - obj.type = TimingConstraintObject::CELL; - obj.entity = cell->name; - constraintObjects.push_back(obj); - cell->tmg_id = id; - return id; - } -} - -TimingConstrObjectId BaseCtx::timingPortObject(CellInfo *cell, IdString port) -{ - if (cell->ports.at(port).tmg_id != TimingConstrObjectId()) { - return cell->ports.at(port).tmg_id; - } else { - TimingConstraintObject obj; - TimingConstrObjectId id; - id.index = int(constraintObjects.size()); - obj.id = id; - obj.type = TimingConstraintObject::CELL_PORT; - obj.entity = cell->name; - obj.port = port; - constraintObjects.push_back(obj); - cell->ports.at(port).tmg_id = id; - return id; - } -} - Property::Property() : is_string(false), str(""), intval(0) {} Property::Property(int64_t intval, int width) : is_string(false), intval(intval) @@ -286,30 +209,6 @@ Property Property::from_string(const std::string &s) return p; } -void BaseCtx::addConstraint(std::unique_ptr<TimingConstraint> constr) -{ - for (auto fromObj : constr->from) - constrsFrom.emplace(fromObj, constr.get()); - for (auto toObj : constr->to) - constrsTo.emplace(toObj, constr.get()); - IdString name = constr->name; - constraints[name] = std::move(constr); -} - -void BaseCtx::removeConstraint(IdString constrName) -{ - TimingConstraint *constr = constraints[constrName].get(); - for (auto fromObj : constr->from) { - auto fromConstrs = constrsFrom.equal_range(fromObj); - constrsFrom.erase(std::find(fromConstrs.first, fromConstrs.second, std::make_pair(fromObj, constr))); - } - for (auto toObj : constr->to) { - auto toConstrs = constrsFrom.equal_range(toObj); - constrsFrom.erase(std::find(toConstrs.first, toConstrs.second, std::make_pair(toObj, constr))); - } - constraints.erase(constrName); -} - const char *BaseCtx::nameOfBel(BelId bel) const { const Context *ctx = getCtx(); |