aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-02-23 11:42:33 +0000
committergatecat <gatecat@ds0.me>2021-02-23 13:11:10 +0000
commit162793aa87c1be7571ee27445205ce267f18c0c7 (patch)
treeeb49451604c28c4b5444370508983681edbfd1ae /common/nextpnr.h
parent72b7a2e1076fa2c7949ada3f6d13f44a05d872c2 (diff)
downloadnextpnr-162793aa87c1be7571ee27445205ce267f18c0c7.tar.gz
nextpnr-162793aa87c1be7571ee27445205ce267f18c0c7.tar.bz2
nextpnr-162793aa87c1be7571ee27445205ce267f18c0c7.zip
Refactor some common code to CellInfo methods
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index c2fe5192..ed227fb6 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -664,6 +664,14 @@ struct CellInfo : ArchCellInfo
void unsetParam(IdString name);
void setAttr(IdString name, Property value);
void unsetAttr(IdString name);
+
+ // return true if the cell has placement constraints (optionally excluding the case where the only case is an
+ // absolute z constraint)
+ bool isConstrained(bool include_abs_z_constr = true) const;
+ // check whether a bel complies with the cell's region constraint
+ bool testRegion(BelId bel) const;
+ // get the constrained location for this cell given a provisional location for its parent
+ Loc getConstrainedLoc(Loc parent_loc) const;
};
enum TimingPortClass