diff options
Diffstat (limited to 'generic/arch.cc')
-rw-r--r-- | generic/arch.cc | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/generic/arch.cc b/generic/arch.cc index d306a9ec..583c74d8 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -184,6 +184,21 @@ void Arch::setGroupDecal(GroupId group, DecalXY decalxy) refreshUiGroup(group); } +void Arch::setWireAttr(IdString wire, IdString key, const std::string &value) +{ + wires.at(wire).attrs[key] = value; +} + +void Arch::setPipAttr(IdString pip, IdString key, const std::string &value) +{ + pips.at(pip).attrs[key] = value; +} + +void Arch::setBelAttr(IdString bel, IdString key, const std::string &value) +{ + bels.at(bel).attrs[key] = value; +} + // --------------------------------------------------------------- Arch::Arch(ArchArgs args) : chipName("generic"), args(args) {} @@ -251,6 +266,8 @@ const std::vector<BelId> &Arch::getBels() const { return bel_ids; } IdString Arch::getBelType(BelId bel) const { return bels.at(bel).type; } +const std::map<IdString, std::string> &Arch::getBelAttrs(BelId bel) const { return bels.at(bel).attrs; } + WireId Arch::getBelPinWire(BelId bel, IdString pin) const { return bels.at(bel).pins.at(pin).wire; } PortType Arch::getBelPinType(BelId bel, IdString pin) const { return bels.at(bel).pins.at(pin).type; } @@ -276,6 +293,8 @@ IdString Arch::getWireName(WireId wire) const { return wire; } IdString Arch::getWireType(WireId wire) const { return wires.at(wire).type; } +const std::map<IdString, std::string> &Arch::getWireAttrs(WireId wire) const { return wires.at(wire).attrs; } + uint32_t Arch::getWireChecksum(WireId wire) const { // FIXME @@ -328,6 +347,8 @@ IdString Arch::getPipName(PipId pip) const { return pip; } IdString Arch::getPipType(PipId pip) const { return pips.at(pip).type; } +const std::map<IdString, std::string> &Arch::getPipAttrs(PipId pip) const { return pips.at(pip).attrs; } + uint32_t Arch::getPipChecksum(PipId wire) const { // FIXME @@ -425,9 +446,9 @@ bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay // --------------------------------------------------------------- -bool Arch::place() { return placer1(getCtx(), Placer1Cfg()); } +bool Arch::place() { return placer1(getCtx(), Placer1Cfg(getCtx())); } -bool Arch::route() { return router1(getCtx(), Router1Cfg()); } +bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); } // --------------------------------------------------------------- |