From 1538d26073911e6969bca8cbcff3da09891a846b Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 24 Jul 2018 12:39:33 +0200 Subject: [PATCH 1/2] Add CellInfo data for placement constraints Signed-off-by: Clifford Wolf --- common/nextpnr.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/nextpnr.h b/common/nextpnr.h index 3ba4f3b3..ca0854e5 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -273,6 +273,16 @@ struct CellInfo : ArchCellInfo // cell_port -> bel_pin std::unordered_map pins; + + // placement constraints + CellInfo *constr_parent; + stdL::vector constr_children; + const int UNCONSTR = INT_MIN; + int constr_x = UNCONSTR; // this.x - parent.x + int constr_y = UNCONSTR; // this.y - parent.y + int constr_z = UNCONSTR; // this.z - parent.z + bool constr_abs_z = false; // parent.z := 0 + // parent.[xyz] := 0 when (constr_parent == nullptr) }; struct DeterministicRNG From f86fc6e7fdf91341a1bd44415e578767fa0b13fb Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 24 Jul 2018 12:41:08 +0200 Subject: [PATCH 2/2] Typo fix Signed-off-by: Clifford Wolf --- common/nextpnr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/nextpnr.h b/common/nextpnr.h index ca0854e5..4a1aaac1 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -276,7 +276,7 @@ struct CellInfo : ArchCellInfo // placement constraints CellInfo *constr_parent; - stdL::vector constr_children; + std::vector constr_children; const int UNCONSTR = INT_MIN; int constr_x = UNCONSTR; // this.x - parent.x int constr_y = UNCONSTR; // this.y - parent.y