diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-18 09:51:28 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-18 09:51:28 -0700 |
commit | 3d283e69f83573ae39bf95a668abb45116a77fd1 (patch) | |
tree | 2839d6b42a9df372946877343b7b0de0dbaba47f /techlibs/ecp5 | |
parent | 2b0e28b2617e8aa3a274358755282fb21c88fc5f (diff) | |
parent | b304744d1506ae5a672639b6baab43c9bce97f00 (diff) | |
download | yosys-3d283e69f83573ae39bf95a668abb45116a77fd1.tar.gz yosys-3d283e69f83573ae39bf95a668abb45116a77fd1.tar.bz2 yosys-3d283e69f83573ae39bf95a668abb45116a77fd1.zip |
Merge remote-tracking branch 'origin/xaig' into xc7mux
Diffstat (limited to 'techlibs/ecp5')
-rw-r--r-- | techlibs/ecp5/cells_map.v | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/techlibs/ecp5/cells_map.v b/techlibs/ecp5/cells_map.v index 53a89e8a3..b504d51e2 100644 --- a/techlibs/ecp5/cells_map.v +++ b/techlibs/ecp5/cells_map.v @@ -70,6 +70,8 @@ module \$lut (A, Y); parameter WIDTH = 0; parameter LUT = 0; + input [WIDTH-1:0] A; + output Y; // Need to swap input ordering, and fix init accordingly, // to match ABC's expectation of LUT inputs in non-decreasing @@ -86,19 +88,15 @@ module \$lut (A, Y); endfunction function [2**P_WIDTH-1:0] permute_init; - input [2**P_WIDTH-1:0] orig; integer i; begin permute_init = 0; for (i = 0; i < 2**P_WIDTH; i = i + 1) - permute_init[i] = orig[permute_index(i)]; + permute_init[i] = LUT[permute_index(i)]; end endfunction - parameter [2**P_WIDTH-1:0] P_LUT = permute_init(LUT); - - input [WIDTH-1:0] A; - output Y; + parameter [2**P_WIDTH-1:0] P_LUT = permute_init(); generate if (WIDTH == 1) begin |