mirror of https://github.com/YosysHQ/nextpnr.git
apply constraints
This commit is contained in:
parent
a6d0219f69
commit
ea6cb97ced
|
|
@ -261,6 +261,9 @@ struct GateMateCCFReader
|
|||
|
||||
log("size = %d src=%s pB=(%d,%d, %d,%d)\n", size, src_location.c_str(), x1, y1, x2,
|
||||
y2);
|
||||
IdString scopename(ctx, src_location.c_str());
|
||||
ctx->createRectangularRegion(scopename, x1, y1, x2, y2);
|
||||
uarch->scopenames.emplace(scopename);
|
||||
} else {
|
||||
log_error("Placebox format invalid: %s in line %d\n", pb_position.c_str(), lineno);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ struct GateMateImpl : HimbaechelAPI
|
|||
MultiDieStrategy strategy;
|
||||
dict<int, IdString> index_to_die;
|
||||
dict<IdString, int> die_to_index;
|
||||
pool<IdString> scopenames;
|
||||
|
||||
private:
|
||||
bool getChildPlacement(const BaseClusterInfo *cluster, Loc root_loc,
|
||||
|
|
|
|||
|
|
@ -519,6 +519,17 @@ void GateMatePacker::assign_regions()
|
|||
log_info("Assign cell region based on attributes..\n");
|
||||
for (auto &cell : ctx->cells) {
|
||||
CellInfo &ci = *cell.second;
|
||||
std::string scope = "top";
|
||||
if (ci.attrs.count(ctx->id("scopename"))) {
|
||||
scope = str_or_default(ci.attrs, ctx->id("scopename"), "");
|
||||
scope = "top " + scope;
|
||||
} else if (ci.attrs.count(ctx->id("hdlname"))) {
|
||||
scope = str_or_default(ci.attrs, ctx->id("hdlname"), "");
|
||||
scope = "top " + scope;
|
||||
}
|
||||
IdString name = IdString(ctx,scope.c_str());
|
||||
if (uarch->scopenames.count(name))
|
||||
ctx->constrainCellToRegion(ci.name, name);
|
||||
if (ci.attrs.count(id_GATEMATE_DIE) != 0) {
|
||||
std::string die_name = str_or_default(ci.attrs, id_GATEMATE_DIE, "");
|
||||
IdString die = ctx->id(die_name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue