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++

about Memory Access..help!

Altera_Forum
Honored Contributor II
1,709 Views

How use Nios II specific a piece of datas, such as 1000 datas , save to designated SDRAM , suppose that I save to the datals when storing 1000 fully, then throw these 1000 datas with UART out, wait for and finish the storing device can just store DATA...please help or support reference design... 

 

thanks..
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
389 Views

I'm not totally sure of what you're trying to do, but it does sound easy... 

 

Here's what I hear you asking: 

1) Nios II stores some data in SDRAM 

2) Nios II process data 

3) Nios II write all data out the UART 

 

Can you just "malloc" the memory you need in SDRAM and then write/ read to it? Once the data is in memory, you can then just call the HAL function (using STDIO libraries) to write this data out the com port? 

 

Please let me know if your problem is more complicated than this. 

Cheers, 

 

eight_ball 

 

 

 

--- Quote Start ---  

originally posted by suway1219@Apr 17 2006, 09:56 PM 

how use nios ii specific a piece of datas, such as 1000 datas , save to designated sdram , suppose that i save to the datals when storing 1000 fully, then throw these 1000 datas with uart out, wait for and finish the storing device can just store data...please help or support reference design... 

 

thanks.. 

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

--- quote end ---  

 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
389 Views

 

--- Quote Start ---  

originally posted by eight_ball@Apr 20 2006, 03:12 AM 

i&#39;m not totally sure of what you&#39;re trying to do, but it does sound easy... 

 

here&#39;s what i hear you asking: 

1) nios ii stores some data in sdram 

2) nios ii process data 

3) nios ii write all data out the uart 

 

can you just "malloc" the memory you need in sdram and then write/ read to it?  once the data is in memory, you can then just call the hal function (using stdio libraries) to write this data out the com port? 

 

please let me know if your problem is more complicated than this. 

cheers, 

 

eight_ball 

 

 

 

--- quote start ---  

originally posted by suway1219@apr 17 2006, 09:56 pm 

How use Nios II specific a piece of datas, such as 1000 datas , save to designated SDRAM , suppose that I save to the datals when storing 1000 fully, then throw these 1000 datas with UART out, wait for and finish the storing device can just store DATA...please help or support reference design... 

 

thanks.. 

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

--- Quote End ---  

[/b] 

--- Quote End ---  

 

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

[/b] 

--- Quote End ---  

 

 

 

If I setup sdram well in SOPC Builder, set the place of run code as SDRAM in Nios II IDE, is this auto access the data with SDRAM when I programming ?
0 Kudos
Altera_Forum
Honored Contributor II
389 Views

 

--- Quote Start ---  

originally posted by suway1219+apr 20 2006, 08:33 am--><div class='quotetop'>quote (suway1219 @ apr 20 2006, 08:33 am)</div> 

--- quote start ---  

<!--quotebegin-eight_ball@Apr 20 2006, 03:12 AM 

i&#39;m not totally sure of what you&#39;re trying to do, but it does sound easy... 

 

here&#39;s what i hear you asking: 

1) nios ii stores some data in sdram 

2) nios ii process data 

3) nios ii write all data out the uart 

 

can you just "malloc" the memory you need in sdram and then write/ read to it?  once the data is in memory, you can then just call the hal function (using stdio libraries) to write this data out the com port? 

 

please let me know if your problem is more complicated than this. 

cheers, 

 

eight_ball 

 

 

 

--- quote start ---  

originally posted by suway1219@apr 17 2006, 09:56 pm 

How use Nios II specific a piece of datas, such as 1000 datas , save to designated SDRAM , suppose that I save to the datals when storing 1000 fully, then throw these 1000 datas with UART out, wait for and finish the storing device can just store DATA...please help or support reference design... 

 

thanks.. 

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

--- Quote End ---  

[/b] 

--- Quote End ---  

 

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

[/b] 

--- Quote End ---  

 

 

 

If I setup sdram well in SOPC Builder, set the place of run code as SDRAM in Nios II IDE, is this auto access the data with SDRAM when I programming ? 

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

[/b] 

--- Quote End ---  

 

 

Yes. If you set up the SDRAM to be: 

1) Controlled by the Instruction and Data Masters of the Nios II CPU from SOPC Builder 

2) Specify that the TEXT, DATA, and BSS segments are located in SDRAM from teh Nios II IDE library configuration 

 

However, it is up to the design of your program to copy data into and out of the SDRAM. Do you plan to have the Nios II processor operate on the data by itself, or are you planning to have another peripheral operate on the data?
0 Kudos
Altera_Forum
Honored Contributor II
389 Views

Thank you very much. 

Yes, I plan to have the Nios II processor operate on the data by itself. 

How can I do ?
0 Kudos
Reply