How to Use Addresses with Single Port RAM on FPGA
ram contains 64 memory units, so addr ranges from 0 to 63. A 6-bit wide signal is enough to hold a number from 0 to 63. From ram[addr]&lt;=data; and assign out = ram[addr_reg];, you can see addr represents a binary number. It's not meant to be used as 6 individual signals.