top.v 396 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//K-input Look-Up Table
module top #(
    //The Look-up Table size (number of inputs)
    parameter K,

    //The lut mask.
    //Left-most (MSB) bit corresponds to all inputs logic one.
    //Defaults to always false.
    parameter LUT_MASK={2**K{1'b0}}
) (
    input [K-1:0] in,
    output out
);

    specify
        (in *> out) = "";
    endspecify

    assign out = LUT_MASK[in];

endmodule