aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r--ecp5/pack.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index 18debb74..73e15609 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -24,6 +24,7 @@
#include "cells.h"
#include "chain_utils.h"
#include "design_utils.h"
+#include "globals.h"
#include "log.h"
#include "util.h"
NEXTPNR_NAMESPACE_BEGIN
@@ -266,11 +267,17 @@ class Ecp5Packer
}
}
} else {
- log_error("TRELLIS_IO required on all top level IOs...\n");
+ // Create a TRELLIS_IO buffer
+ std::unique_ptr<CellInfo> tr_cell =
+ create_ecp5_cell(ctx, ctx->id("TRELLIS_IO"), ci->name.str(ctx) + "$tr_io");
+ nxio_to_tr(ctx, ci, tr_cell.get(), new_cells, packed_cells);
+ new_cells.push_back(std::move(tr_cell));
+ trio = new_cells.back().get();
}
packed_cells.insert(ci->name);
- std::copy(ci->attrs.begin(), ci->attrs.end(), std::inserter(trio->attrs, trio->attrs.begin()));
+ for (const auto &attr : ci->attrs)
+ trio->attrs[attr.first] = attr.second;
auto loc_attr = trio->attrs.find(ctx->id("LOC"));
if (loc_attr != trio->attrs.end()) {
@@ -1041,6 +1048,7 @@ class Ecp5Packer
pack_lut_pairs();
pack_remaining_luts();
pack_remaining_ffs();
+ promote_ecp5_globals(ctx);
ctx->check();
}