aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-11-07 14:24:58 +0000
committerDavid Shah <dave@ds0.me>2018-11-15 11:30:27 +0000
commitc5a3571a061b1340355bb758be71a86922ee863f (patch)
tree846c3b8a21805eee55f495ce94046b23206bdd79 /ecp5/pack.cc
parent983903887d1f6b3be2060fdfdd680b67006b8e08 (diff)
downloadnextpnr-c5a3571a061b1340355bb758be71a86922ee863f.tar.gz
nextpnr-c5a3571a061b1340355bb758be71a86922ee863f.tar.bz2
nextpnr-c5a3571a061b1340355bb758be71a86922ee863f.zip
ecp5: Working on DCU
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r--ecp5/pack.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index 73e15609..4f1c7f79 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -1033,12 +1033,34 @@ class Ecp5Packer
}
}
+ // "Pack" DCUs
+ void pack_dcus() {
+ for (auto cell : sorted(ctx->cells)) {
+ CellInfo *ci = cell.second;
+ if (ci->type == id_DCUA) {
+ // Empty port auto-creation to generate correct tie-downs
+ BelId exemplar_bel;
+ for (auto bel : ctx->getBels()) {
+ if (ctx->getBelType(bel) == id_DCUA) {
+ exemplar_bel = bel;
+ break;
+ }
+ }
+ NPNR_ASSERT(exemplar_bel != BelId());
+ for (auto pin : ctx->getBelPins(exemplar_bel))
+ if (ctx->getBelPinType(exemplar_bel, pin) == PORT_IN)
+ autocreate_empty_port(ci, pin);
+ }
+ }
+ }
+
public:
void pack()
{
pack_io();
pack_ebr();
pack_dsps();
+ pack_dcus();
pack_constants();
pack_dram();
pack_carries();