Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

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!

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?