aboutsummaryrefslogtreecommitdiffstats
path: root/generic/synth/cells_map.v
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-12-01 17:07:36 +0000
committerDavid Shah <dave@ds0.me>2019-12-01 17:07:36 +0000
commitf57c2bcebb9a5e0722fe90ac9b5d11d4db518c22 (patch)
treefce5718c1750c73eb3075d42ea586017d36b1378 /generic/synth/cells_map.v
parent89e15d488ad5c24536ef9ee5762995dfe2d02c6e (diff)
downloadnextpnr-f57c2bcebb9a5e0722fe90ac9b5d11d4db518c22.tar.gz
nextpnr-f57c2bcebb9a5e0722fe90ac9b5d11d4db518c22.tar.bz2
nextpnr-f57c2bcebb9a5e0722fe90ac9b5d11d4db518c22.zip
generic: Don't assume unused LUT inputs are zero
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'generic/synth/cells_map.v')
-rw-r--r--generic/synth/cells_map.v4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/synth/cells_map.v b/generic/synth/cells_map.v
index a6027534..1d0939e0 100644
--- a/generic/synth/cells_map.v
+++ b/generic/synth/cells_map.v
@@ -4,7 +4,9 @@ module \$lut (A, Y);
input [WIDTH-1:0] A;
output Y;
- LUT #(.K(`LUT_K), .INIT(LUT)) _TECHMAP_REPLACE_ (.I(A), .Q(Y));
+ localparam rep = 1<<(`LUT_K-WIDTH);
+
+ LUT #(.K(`LUT_K), .INIT({rep{LUT}})) _TECHMAP_REPLACE_ (.I(A), .Q(Y));
endmodule
module \$_DFF_P_ (input D, C, output Q); DFF _TECHMAP_REPLACE_ (.D(D), .Q(Q), .CLK(C)); endmodule