diff options
author | gatecat <gatecat@ds0.me> | 2021-04-28 14:49:26 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-06 11:47:06 +0100 |
commit | 6a3eacddd60713d9c0d470d13a54a0c42f7d87c9 (patch) | |
tree | 52452bdd4993a2885b4fd886263435ac1e87a54c /ice40 | |
parent | e1717bd771f51e3a2c370ffa64d50de6b8ee6ca6 (diff) | |
download | nextpnr-6a3eacddd60713d9c0d470d13a54a0c42f7d87c9.tar.gz nextpnr-6a3eacddd60713d9c0d470d13a54a0c42f7d87c9.tar.bz2 nextpnr-6a3eacddd60713d9c0d470d13a54a0c42f7d87c9.zip |
Add default base implementation of cluster API
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/archdefs.h | 4 | ||||
-rw-r--r-- | ice40/chains.cc | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ice40/archdefs.h b/ice40/archdefs.h index 038a3131..c2b7019c 100644 --- a/ice40/archdefs.h +++ b/ice40/archdefs.h @@ -22,6 +22,7 @@ #include <boost/functional/hash.hpp> +#include "base_clusterinfo.h" #include "idstring.h" #include "nextpnr_namespaces.h" @@ -122,7 +123,7 @@ struct ArchNetInfo struct NetInfo; -struct ArchCellInfo +struct ArchCellInfo : BaseClusterInfo { union { @@ -154,6 +155,7 @@ struct ArchCellInfo }; typedef IdString BelBucketId; +typedef IdString ClusterId; NEXTPNR_NAMESPACE_END diff --git a/ice40/chains.cc b/ice40/chains.cc index 7eb03105..2607959a 100644 --- a/ice40/chains.cc +++ b/ice40/chains.cc @@ -292,12 +292,14 @@ class ChainConstrainer // Place carry chain chain.cells.at(0)->constr_abs_z = true; chain.cells.at(0)->constr_z = 0; + chain.cells.at(0)->cluster = chain.cells.at(0)->name; + for (int i = 1; i < int(chain.cells.size()); i++) { chain.cells.at(i)->constr_x = 0; chain.cells.at(i)->constr_y = (i / 8); chain.cells.at(i)->constr_z = i % 8; chain.cells.at(i)->constr_abs_z = true; - chain.cells.at(i)->constr_parent = chain.cells.at(0); + chain.cells.at(i)->cluster = chain.cells.at(0)->name; chain.cells.at(0)->constr_children.push_back(chain.cells.at(i)); } } |