Altera_Forum
Honored Contributor
13 years agoMegaWizard Memory Compiler: why is the 9th bit not for free?
I'm trying to tailor a larger memory to my needs. This is for a Cyclone II, which has only M4K memory blocks. It shall be a simple dual port, one port writes, another reads, with different clocks.
Precision helps my application, so I'm trying to exploit that the blocks can be 9 bits wide (or multiples of it), instead of 8. Now I'm puzzled that configuring for 9 bit width costs me extra blocks!? (Or is this a bug in the resource estimation?) Example: Configure a memory 8 bits wide, 512 words deep. Resource usage is one M4K. Increase width to 9 bit: still 1 M4K, as expected. Double the depth to 1024 words, gives 3 M4Ks?! Reduce width to 8 bit: back to the normal 2 M4Ks. Similar strangeness for wider and deeper. My real case is 128 vs. 144 bits wide, 2048 words deep. Needs 72 M4Ks instead of 64 for increasing the width to what shall be available already. Where is this coming from? Are there better ways to design memory? Also, I'd like to have a non power of two size (within M4K granularity, of course). Thanks Jörg Edit: Tested with Quartus 11 and 12, Windows and Linux.