aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-24 11:21:10 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-24 11:21:10 +0200
commit4359197dfe49f981966222679d8270b0d4dc311d (patch)
tree7e2f4404a307e21f1f290aab7237ab4cb94f0b21 /ice40/pack.cc
parenta09f95bb06025afecd5753c969443928f1f0894a (diff)
downloadnextpnr-4359197dfe49f981966222679d8270b0d4dc311d.tar.gz
nextpnr-4359197dfe49f981966222679d8270b0d4dc311d.tar.bz2
nextpnr-4359197dfe49f981966222679d8270b0d4dc311d.zip
ice40: Trim BRAM constant inputs, reduces routing congestion around BRAM
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/pack.cc')
-rw-r--r--ice40/pack.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index 7e2e389c..164fa756 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -311,6 +311,9 @@ static void set_net_constant(const Context *ctx, NetInfo *orig, NetInfo *constne
(user.port != ctx->id("CLK") &&
((constval && user.port == ctx->id("CE")) || (!constval && user.port != ctx->id("CE"))))) {
uc->ports[user.port].net = nullptr;
+ } else if (is_ram(ctx, uc) && !constval && user.port != ctx->id("RCLK") && user.port != ctx->id("RCLKN") && user.port != ctx->id("WCLK") && user.port != ctx->id("WCLKN")
+ && user.port != ctx->id("RCLKE") && user.port != ctx->id("WCLKE")) {
+ uc->ports[user.port].net = nullptr;
} else {
uc->ports[user.port].net = constnet;
constnet->users.push_back(user);