Get rid of BelType and PortPin in generic arch

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-08-08 17:22:05 +02:00
parent f875a37467
commit abf5ea84b9
3 changed files with 9 additions and 18 deletions

View File

@ -238,15 +238,15 @@ CellInfo *Arch::getConflictingBelCell(BelId bel) const { return bels.at(bel).bou
const std::vector<BelId> &Arch::getBels() const { return bel_ids; } const std::vector<BelId> &Arch::getBels() const { return bel_ids; }
BelType Arch::getBelType(BelId bel) const { return bels.at(bel).type; } IdString Arch::getBelType(BelId bel) const { return bels.at(bel).type; }
WireId Arch::getBelPinWire(BelId bel, PortPin pin) const { return bels.at(bel).pins.at(pin).wire; } WireId Arch::getBelPinWire(BelId bel, IdString pin) const { return bels.at(bel).pins.at(pin).wire; }
PortType Arch::getBelPinType(BelId bel, PortPin pin) const { return bels.at(bel).pins.at(pin).type; } PortType Arch::getBelPinType(BelId bel, IdString pin) const { return bels.at(bel).pins.at(pin).type; }
std::vector<PortPin> Arch::getBelPins(BelId bel) const std::vector<IdString> Arch::getBelPins(BelId bel) const
{ {
std::vector<PortPin> ret; std::vector<IdString> ret;
for (auto &it : bels.at(bel).pins) for (auto &it : bels.at(bel).pins)
ret.push_back(it.first); ret.push_back(it.first);
return ret; return ret;

View File

@ -128,12 +128,6 @@ struct Arch : BaseCtx
IdString archId() const { return id("generic"); } IdString archId() const { return id("generic"); }
IdString archArgsToId(ArchArgs args) const { return id("none"); } IdString archArgsToId(ArchArgs args) const { return id("none"); }
IdString belTypeToId(BelType type) const { return type; }
IdString portPinToId(PortPin type) const { return type; }
BelType belTypeFromId(IdString id) const { return id; }
PortPin portPinFromId(IdString id) const { return id; }
int getGridDimX() const { return gridDimX; } int getGridDimX() const { return gridDimX; }
int getGridDimY() const { return gridDimY; } int getGridDimY() const { return gridDimY; }
int getTileDimZ(int x, int y) const { return tileDimZ[x][y]; } int getTileDimZ(int x, int y) const { return tileDimZ[x][y]; }
@ -151,10 +145,10 @@ struct Arch : BaseCtx
CellInfo *getBoundBelCell(BelId bel) const; CellInfo *getBoundBelCell(BelId bel) const;
CellInfo *getConflictingBelCell(BelId bel) const; CellInfo *getConflictingBelCell(BelId bel) const;
const std::vector<BelId> &getBels() const; const std::vector<BelId> &getBels() const;
BelType getBelType(BelId bel) const; IdString getBelType(BelId bel) const;
WireId getBelPinWire(BelId bel, PortPin pin) const; WireId getBelPinWire(BelId bel, IdString pin) const;
PortType getBelPinType(BelId bel, PortPin pin) const; PortType getBelPinType(BelId bel, IdString pin) const;
std::vector<PortPin> getBelPins(BelId bel) const; std::vector<IdString> getBelPins(BelId bel) const;
WireId getWireByName(IdString name) const; WireId getWireByName(IdString name) const;
IdString getWireName(WireId wire) const; IdString getWireName(WireId wire) const;

View File

@ -46,9 +46,6 @@ struct DelayInfo
} }
}; };
typedef IdString BelType;
typedef IdString PortPin;
typedef IdString BelId; typedef IdString BelId;
typedef IdString WireId; typedef IdString WireId;
typedef IdString PipId; typedef IdString PipId;