Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHow to define contant look up tables (LUT) ??
Hello.. I can define LUT4 (4 input, 16 bit init value) and LUT5 (5 input, 32 bit init value) look up tables with constant values on Lattice Diamond in this way; LUT5 # (.init (32'h3...
Altera_Forum
Honored Contributor
15 years agoYou can just create a behavioral description, like the one below.
The tools will then sort it out for you. module LUT4 (input wire A, input wire B, input wire C, input wire D, output wire Z); param INIT=16'b0000_0000_0000_0000; assign Z <= INIT[{D, C, B, A}]; endmodule