Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17247 Discussions

MegaWizard SRAM using too many M9K blocks

Altera_Forum
Honored Contributor II
1,498 Views

Hi there, 

 

I have a design that requires quite a lot of dual-port RAM to perform some signal acquisition and processing.  

 

One basic block (hist_ram_16) that I need is a RAM with 18 bits of width and 2048 words in depth. Since I need quite a lot of these blocks, I would like to force each memory block to take up exactly 4 M9K (using each M9K in 9-bit mode: 18*2048 bits = 4*9*1024).  

 

For some reason, Quartus, or MegaWizard for that matter, is using 5 M9K blocks instead of 4.  

 

I already tried to change some options but could not manage to get Quartus to limit itself to 4 M9Ks. Please see all the screenshots in attachment. 

 

Does anyone have any idea on how to force the RAM block to use exactly 4 M9K blocks? Thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
795 Views

I've reproduced your problem, it looks like a bug. Did you try to compile your project and see in the report how many M9K blocks are actually used by the design? 

If using 16-bit data buses the number is correct, but with 18-bit there seems to always be extra M9K block for memories bigger than 1024 words.
0 Kudos
Altera_Forum
Honored Contributor II
795 Views

It is not a bug ... 

You have to set the 'maximum block depth' in the second image to 1024 to force it into 9-bit mode. 

Speaking of histograms: usually a histogram is taken over a limited sample depth, mostly 8 bits.
0 Kudos
Altera_Forum
Honored Contributor II
795 Views

Brilliant, it was indeed the "maximum block depth" setting. I think this field on that dialog is quite confusing (so it looks like a bug indeed...).  

 

I checked on the manual, and it has indeed an impact on the block utilization as well as on the dynamic power.  

 

Actually, it turns out that by setting it to 512 I can not only limit the number of M9K but can also save power!  

 

For those who are interested, I have attached a screenshot of the manual page here below. 

 

Thanks, nice work!
0 Kudos
Reply