Due to a problem in the Intel® Quartus® Prime Pro Edition Software version 21.1, you may find that your RAMs are not being inferred if you declare them as 2D RAMs, hence using a large amount of ALM resources and causes a long compilation time. This is because the Intel® Quartus® Prime Pro Edition Software interprets the 2D RAMs as 3D RAMs, and is unable to generate the .mif file.
A RAM defined in VHDL as a 2D array of integers has n rows and m columns with k-bit integers. Since the integers are represented by k-bits, this adds 1 dimension and synthesis generates a 3D RAM for the 2D array of integers in VHDL.
An example VHDL code of 2D RAM that can result in this problem:
type ram_t is array (0 to 3, 0 to 3) of integer range 0 to 7;
There is no workaround to this problem.
This problem is fixed starting with the Intel® Quartus® Prime Pro Edition Software version 21.3.