aboutsummaryrefslogtreecommitdiffstats
path: root/gowin
diff options
context:
space:
mode:
Diffstat (limited to 'gowin')
-rw-r--r--gowin/arch.cc28
-rw-r--r--gowin/arch.h21
2 files changed, 26 insertions, 23 deletions
diff --git a/gowin/arch.cc b/gowin/arch.cc
index 5a1a56e3..201641cd 100644
--- a/gowin/arch.cc
+++ b/gowin/arch.cc
@@ -759,14 +759,14 @@ void IdString::initialize_arch(const BaseCtx *ctx)
// ---------------------------------------------------------------
-BelId Arch::getBelByName(IdString name) const
+BelId Arch::getBelByName(IdStringList name) const
{
- if (bels.count(name))
- return name;
+ if (bels.count(name[0]))
+ return name[0];
return BelId();
}
-IdString Arch::getBelName(BelId bel) const { return bel; }
+IdStringList Arch::getBelName(BelId bel) const { return IdStringList(bel); }
Loc Arch::getBelLocation(BelId bel) const
{
@@ -836,14 +836,14 @@ std::vector<IdString> Arch::getBelPins(BelId bel) const
// ---------------------------------------------------------------
-WireId Arch::getWireByName(IdString name) const
+WireId Arch::getWireByName(IdStringList name) const
{
- if (wires.count(name))
- return name;
+ if (wires.count(name[0]))
+ return name[0];
return WireId();
}
-IdString Arch::getWireName(WireId wire) const { return wire; }
+IdStringList Arch::getWireName(WireId wire) const { return IdStringList(wire); }
IdString Arch::getWireType(WireId wire) const { return wires.at(wire).type; }
@@ -890,14 +890,14 @@ const std::vector<WireId> &Arch::getWires() const { return wire_ids; }
// ---------------------------------------------------------------
-PipId Arch::getPipByName(IdString name) const
+PipId Arch::getPipByName(IdStringList name) const
{
- if (pips.count(name))
- return name;
+ if (pips.count(name[0]))
+ return name[0];
return PipId();
}
-IdString Arch::getPipName(PipId pip) const { return pip; }
+IdStringList Arch::getPipName(PipId pip) const { return IdStringList(pip); }
IdString Arch::getPipType(PipId pip) const { return pips.at(pip).type; }
@@ -950,9 +950,9 @@ const std::vector<PipId> &Arch::getPipsUphill(WireId wire) const { return wires.
// ---------------------------------------------------------------
-GroupId Arch::getGroupByName(IdString name) const { return name; }
+GroupId Arch::getGroupByName(IdStringList name) const { return name[0]; }
-IdString Arch::getGroupName(GroupId group) const { return group; }
+IdStringList Arch::getGroupName(GroupId group) const { return IdStringList(group); }
std::vector<GroupId> Arch::getGroups() const
{
diff --git a/gowin/arch.h b/gowin/arch.h
index 6337255a..4754772b 100644
--- a/gowin/arch.h
+++ b/gowin/arch.h
@@ -323,10 +323,13 @@ struct Arch : BaseCtx
int getGridDimY() const { return gridDimY; }
int getTileBelDimZ(int x, int y) const { return tileBelDimZ[x][y]; }
int getTilePipDimZ(int x, int y) const { return tilePipDimZ[x][y]; }
- char getNameDelimiter() const { return '/'; }
+ char getNameDelimiter() const
+ {
+ return ' '; /* use a non-existent delimiter as we aren't using IdStringLists yet */
+ }
- BelId getBelByName(IdString name) const;
- IdString getBelName(BelId bel) const;
+ BelId getBelByName(IdStringList name) const;
+ IdStringList getBelName(BelId bel) const;
Loc getBelLocation(BelId bel) const;
BelId getBelByLocation(Loc loc) const;
const std::vector<BelId> &getBelsByTile(int x, int y) const;
@@ -344,8 +347,8 @@ struct Arch : BaseCtx
PortType getBelPinType(BelId bel, IdString pin) const;
std::vector<IdString> getBelPins(BelId bel) const;
- WireId getWireByName(IdString name) const;
- IdString getWireName(WireId wire) const;
+ WireId getWireByName(IdStringList name) const;
+ IdStringList getWireName(WireId wire) const;
IdString getWireType(WireId wire) const;
const std::map<IdString, std::string> &getWireAttrs(WireId wire) const;
uint32_t getWireChecksum(WireId wire) const;
@@ -359,8 +362,8 @@ struct Arch : BaseCtx
const std::vector<WireId> &getWires() const;
const std::vector<BelPin> &getWireBelPins(WireId wire) const;
- PipId getPipByName(IdString name) const;
- IdString getPipName(PipId pip) const;
+ PipId getPipByName(IdStringList name) const;
+ IdStringList getPipName(PipId pip) const;
IdString getPipType(PipId pip) const;
const std::map<IdString, std::string> &getPipAttrs(PipId pip) const;
uint32_t getPipChecksum(PipId pip) const;
@@ -378,8 +381,8 @@ struct Arch : BaseCtx
const std::vector<PipId> &getPipsDownhill(WireId wire) const;
const std::vector<PipId> &getPipsUphill(WireId wire) const;
- GroupId getGroupByName(IdString name) const;
- IdString getGroupName(GroupId group) const;
+ GroupId getGroupByName(IdStringList name) const;
+ IdStringList getGroupName(GroupId group) const;
std::vector<GroupId> getGroups() const;
const std::vector<BelId> &getGroupBels(GroupId group) const;
const std::vector<WireId> &getGroupWires(GroupId group) const;