Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,018 Views

how to calculate the number of M9k that nios onchip memory occupied?

hi everyone 

in project A, i set the nios onchip memory size to be 20480 bytes, the quartus told me(Fitter report) it occupy 20 M9Ks, its implementation bits is 163840 

 

then i use copy project in quartus, copy the project A to a new place, let's name it project B, i re-compilate the project, the Fitter report told me the nios on chip memory occupy 32M9Ks! 

 

i am a little confused, 

in binary system, the 20480 bytes should occupy the same space with 2048*16 bytes, that is 2048*16*8=83,886,080bits=28.4 M9Ks, that is 29M9Ks 

 

why in project A it only occupy 20 M9Ks? 

 

why in project B it occupy 32 M9Ks? 

 

thanks!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
64 Views

 

--- Quote Start ---  

why in project A it only occupy 20 M9Ks? 

--- Quote End ---  

This is fine and makes perfect sense. 1024 bytes per M9K block. 20 x 1024 bytes = 20 M9K blocks. 

 

 

--- Quote Start ---  

why in project B it occupy 32 M9Ks? 

--- Quote End ---  

It shouldn't. I can only presume you are not (quite) doing what you think you are in copying the project. 

 

 

--- Quote Start ---  

i am a little confused, 

in binary system, the 20480 bytes should occupy the same space with 2048*16 bytes, that is 2048*16*8=83,886,080bits=28.4 M9Ks, that is 29M9Ks 

--- Quote End ---  

I dare say you are 'a little confused'. 20480 bytes fits into 20 x M9K blocks, as project A confirms. 28.4, 29 or 32 are not necessary. 

 

I suggest you do a little more digging. 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor I
64 Views

Probably you can attach the fitter report.

Altera_Forum
Honored Contributor I
64 Views

hi, thanks for replying. 

 

i check the fitter report: 

http://www.alteraforum.com/forum/attachment.php?attachmentid=11266&stc=1  

 

 

i also think that may be my problem, but the fitter report shows that the 163840 bit occupy 32M9ks 

 

 

by the way, when i change the on chip memory size from 20480 bytes to 16384 bytes, the fitter report told me it takes only 16 M9ks 

 

can you give me more advise? thanks!
Altera_Forum
Honored Contributor I
64 Views

Something that caught my eye: "Note: Fitter may spread logical memories into multiple blocks to improve timing. The actual required RAM blocks can be found in the Fitter Resource Usage section." 

 

You can try changing SEED, system frequency. 

 

What version are you using before 15.0?
Reply