Forum Discussion

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

onchip memory in MRAM block

Hello All,

On my board, a EP2S30 device loads itself from an EPCS16 using AS configuration, and runs the Nios code wholly from on-chip memory. I ran into a problem stemming, apparently, from the fact that MRAM memory blocks don't accept initialization files.

In the default system generation, SOPC builder chose MRAM for the onchip memory, but this didn't work - the software didn't run at system start-up. Only when I manually changed the assignment of the onchip memory to M4K blocks it began to work. I thought of this solution by seeing that onchip memory uses the altsyncram mega function, and in the documentation of that megafunction I saw that one can't specify an initialization file for a MRAM block.

Why is this ? Is it really impossible to specify a .hex file for initialization of MRAM memory ? If so, why does SOPC builder use it for on-chip memory at all ?

Thanks in advance

4 Replies

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

    It's a hardware limitation of the MRAM memory itself. Also, not all people want to use their onchip RAM for code.

    Cheers,

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

    --- Quote Start ---

    originally posted by slacker@Mar 15 2006, 10:41 AM

    it's a hardware limitation of the mram memory itself. also, not all people want to use their onchip ram for code.

    cheers,

    - slacker

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=13474)

    --- quote end ---

    --- Quote End ---

    Indeed, as I found later, MRAM memory can&#39;t be initialized with a .hex file. So I guess it&#39;s initialized to all zeros ?

    Can I use it anyway in my code by specifying it as another "onchip ram" and placing data in it ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by eliben@Mar 16 2006, 03:15 PM

    can i use it anyway in my code by specifying it as another "onchip ram" and placing data in it ?

    --- Quote End ---

    use m4k rom instead for readonly sections and any ram for data sections.

    or use bootloader, that will copy your code from storage to mram area
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi

    "use m4k rom instead for readonly sections and any ram for data sections.

    or use bootloader, that will copy your code from storage to mram area "

    how to add boot loader??

    can anybody please elaborate?

    thanks and regards

    prasad