aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-09-30 17:05:42 +0100
committerDavid Shah <davey1576@gmail.com>2018-09-30 17:06:06 +0100
commite81a95cf7e7c58f3a5ad5e3e9414b640e7a82232 (patch)
treeb44914f512bfe5b3576595c9ad0bf5a9737c0eed /ecp5/pack.cc
parent2628344298da8b86fd55a107cd3f0543dd5bfbc1 (diff)
downloadnextpnr-e81a95cf7e7c58f3a5ad5e3e9414b640e7a82232.tar.gz
nextpnr-e81a95cf7e7c58f3a5ad5e3e9414b640e7a82232.tar.bz2
nextpnr-e81a95cf7e7c58f3a5ad5e3e9414b640e7a82232.zip
ecp5: Add ccu2c_to_slice
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r--ecp5/pack.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index d2c0085b..b17f8f20 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -108,7 +108,8 @@ class Ecp5Packer
}
// Return whether or not an FF can be added to a tile (pairing checks must also be done using the fn above)
- bool can_add_ff_to_file(const std::vector<CellInfo *> &tile_ffs, CellInfo *ff0) {
+ bool can_add_ff_to_file(const std::vector<CellInfo *> &tile_ffs, CellInfo *ff0)
+ {
for (const auto &existing : tile_ffs) {
if (net_or_nullptr(existing, ctx->id("CLK")) != net_or_nullptr(ff0, ctx->id("CLK")))
return false;
@@ -459,19 +460,19 @@ class Ecp5Packer
return chains;
}
-
// Pack carries and set up appropriate relative constraints
- void pack_carries() {
+ void pack_carries()
+ {
log_info("Packing carries...\n");
- auto chains = find_chains(ctx, [](const Context *ctx, const CellInfo *cell) {
- return is_carry(ctx, cell);
- }, [](const Context *ctx, const CellInfo *cell) {
- return net_driven_by(ctx, cell->ports.at(ctx->id("CIN")).net, is_carry, ctx->id("COUT"));
- }, [](const Context *ctx, const CellInfo *cell) {
- return net_only_drives(ctx, cell->ports.at(ctx->id("COUT")).net, is_carry,
- ctx->id("CIN"), false);
- }, 1);
-
+ auto chains = find_chains(
+ ctx, [](const Context *ctx, const CellInfo *cell) { return is_carry(ctx, cell); },
+ [](const Context *ctx, const CellInfo *cell) {
+ return net_driven_by(ctx, cell->ports.at(ctx->id("CIN")).net, is_carry, ctx->id("COUT"));
+ },
+ [](const Context *ctx, const CellInfo *cell) {
+ return net_only_drives(ctx, cell->ports.at(ctx->id("COUT")).net, is_carry, ctx->id("CIN"), false);
+ },
+ 1);
}
// Pack LUTs that have been paired together