Arya Reais-Parsi | e4bec99 | 2020-12-18 13:56:31 -0800 | [diff] [blame] | 1 | ///////// BASIC LUT ///////// |
| 2 | // Assumptions: |
| 3 | // MEM_SIZE is a multiple of CONFIG_WIDTH |
| 4 | |
| 5 | module lut #( |
| 6 | parameter INPUTS=4, |
| 7 | parameter MEM_SIZE=2**INPUTS |
| 8 | ) ( |
| 9 | // IO |
| 10 | input [INPUTS-1:0] addr, |
| 11 | output out, |
| 12 | |
| 13 | // Block Style Configuration |
| 14 | input clk, |
| 15 | input comb_set, |
| 16 | input [MEM_SIZE-1:0] config_in |
| 17 | ); |
| 18 | |
| 19 | block_config_latches #(.ADDR_BITS(INPUTS), .PREDEC(1)) latches0 ( |
| 20 | .addr(addr), |
| 21 | .out(out), |
| 22 | .clk(clk), |
| 23 | .comb_set(comb_set), |
| 24 | .config_in(config_in) |
| 25 | ); |
| 26 | |
| 27 | endmodule |
| 28 | |