Add ability to override Cluster methods in Himbaechel
This commit is contained in:
parent
6d9322457e
commit
b4ca68c8ef
@ -684,7 +684,20 @@ struct Arch : BaseArch<ArchRanges>
|
|||||||
|
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
|
|
||||||
// clusters: BaseArch; for now
|
// Cluster methods
|
||||||
|
CellInfo *getClusterRootCell(ClusterId cluster) const override { return uarch->getClusterRootCell(cluster); }
|
||||||
|
|
||||||
|
BoundingBox getClusterBounds(ClusterId cluster) const override { return uarch->getClusterBounds(cluster); }
|
||||||
|
|
||||||
|
Loc getClusterOffset(const CellInfo *cell) const override { return uarch->getClusterOffset(cell); }
|
||||||
|
|
||||||
|
bool isClusterStrict(const CellInfo *cell) const override { return uarch->isClusterStrict(cell); }
|
||||||
|
|
||||||
|
bool getClusterPlacement(ClusterId cluster, BelId root_bel,
|
||||||
|
std::vector<std::pair<CellInfo *, BelId>> &placement) const override
|
||||||
|
{
|
||||||
|
return uarch->getClusterPlacement(cluster, root_bel, placement);
|
||||||
|
}
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
|
|
||||||
bool pack() override;
|
bool pack() override;
|
||||||
|
@ -69,6 +69,22 @@ BoundingBox HimbaechelAPI::getRouteBoundingBox(WireId src, WireId dst) const
|
|||||||
return bb;
|
return bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CellInfo *HimbaechelAPI::getClusterRootCell(ClusterId cluster) const
|
||||||
|
{
|
||||||
|
return ctx->BaseArch::getClusterRootCell(cluster);
|
||||||
|
}
|
||||||
|
BoundingBox HimbaechelAPI::getClusterBounds(ClusterId cluster) const
|
||||||
|
{
|
||||||
|
return ctx->BaseArch::getClusterBounds(cluster);
|
||||||
|
}
|
||||||
|
Loc HimbaechelAPI::getClusterOffset(const CellInfo *cell) const { return ctx->BaseArch::getClusterOffset(cell); }
|
||||||
|
bool HimbaechelAPI::isClusterStrict(const CellInfo *cell) const { return ctx->BaseArch::isClusterStrict(cell); }
|
||||||
|
bool HimbaechelAPI::getClusterPlacement(ClusterId cluster, BelId root_bel,
|
||||||
|
std::vector<std::pair<CellInfo *, BelId>> &placement) const
|
||||||
|
{
|
||||||
|
return ctx->BaseArch::getClusterPlacement(cluster, root_bel, placement);
|
||||||
|
}
|
||||||
|
|
||||||
HimbaechelArch *HimbaechelArch::list_head;
|
HimbaechelArch *HimbaechelArch::list_head;
|
||||||
HimbaechelArch::HimbaechelArch(const std::string &name) : name(name)
|
HimbaechelArch::HimbaechelArch(const std::string &name) : name(name)
|
||||||
{
|
{
|
||||||
|
@ -95,6 +95,13 @@ struct HimbaechelAPI
|
|||||||
// Cell->bel pin mapping
|
// Cell->bel pin mapping
|
||||||
virtual bool map_cell_bel_pins(CellInfo *cell) const { return false; }
|
virtual bool map_cell_bel_pins(CellInfo *cell) const { return false; }
|
||||||
|
|
||||||
|
// Cluster
|
||||||
|
virtual CellInfo *getClusterRootCell(ClusterId cluster) const;
|
||||||
|
virtual BoundingBox getClusterBounds(ClusterId cluster) const;
|
||||||
|
virtual Loc getClusterOffset(const CellInfo *cell) const;
|
||||||
|
virtual bool isClusterStrict(const CellInfo *cell) const;
|
||||||
|
virtual bool getClusterPlacement(ClusterId cluster, BelId root_bel,
|
||||||
|
std::vector<std::pair<CellInfo *, BelId>> &placement) const;
|
||||||
// --- Flow hooks ---
|
// --- Flow hooks ---
|
||||||
virtual void pack(){}; // replaces the pack function
|
virtual void pack(){}; // replaces the pack function
|
||||||
// Called before and after main placement and routing
|
// Called before and after main placement and routing
|
||||||
|
Loading…
Reference in New Issue
Block a user