aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r--ecp5/pack.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index 18debb74..cb111fc6 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -266,11 +266,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()) {