Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

onchip memory in MRAM block

Altera_Forum
Honored Contributor II
1,294 Views

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
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
560 Views

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

 

Cheers, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
560 Views

 

--- 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 ?
0 Kudos
Altera_Forum
Honored Contributor II
560 Views

 

--- 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
0 Kudos
Altera_Forum
Honored Contributor II
560 Views

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
0 Kudos
Reply