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

SRAM vs SDRAM

Altera_Forum
Honored Contributor II
31,034 Views

Hi, 

 

I am about to design a system with uClinux, and I was wondering if the performances would be correct if I only used an SDRAM. SRAM is a bit expensive if I want to have enough memory to run my linux (I guess I need at least 4MB). However, I have read in some threads around here that SDRAM performances were quite bad. Is there any experience here of people running linux without SRAM ? 

 

My second question is quite the same and about the Altera Cyclone devboard : I use the standard design (using SRAM as exception address thus), and I follow the Quick Start Guide to build a kernel, that I run from the SDRAM. In this case, I suppose the whole kernel is uploaded in SDRAM and then executed from there. My question is : is the SRAM still in use ? Do I lose any performance if I remove it ? I can see that ramfs file systems are mounted but I guess its only in SDRAM. I suppose the /dev/ramX are linked to the SDRAM, not the SRAM, so is the SRAM in use ? 

 

Thanks a lot 

 

cetic
0 Kudos
17 Replies
Altera_Forum
Honored Contributor II
30,298 Views

Hi cetic, 

 

> ... I have read in some threads around here that SDRAM performances 

> were quite bad. 

 

I've found the SDRAM controller performance to be pretty awful. Given 

the logic area it occupies and its performance, I no longer consider it a 

viable alternative for many new designs. 

 

> SRAM is a bit expensive if I want to have enough memory to run 

> my linux (I guess I need at least 4MB). 

 

I've switched to PSRAM (pseudo SRAM) for new designs. It eliminates 

the SDRAM controller and it performs better. The cost is 

very attractive ... the expense is the number of pins you must use. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Thanks for your reply, 

 

that means that the system I am currently using on the Altera Cyclone devboard is very slow, I guess. Do you still have an idea whether the SRAM is used or not ? 

My question is do I still need a SRAM if I made a custom board where Linux is run from a SDRAM (just like on the devboard) ? Any way I will check the PSRAM solution. 

 

Thanks, 

 

cetic
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

> Do you still have an idea whether the SRAM is used or not ? 

 

I don't believe it's used in the kernel version I'm using. It might 

be mapped in mtd ... I never checked ... and I didn't see it mapped 

into a region in the startup either. 

 

> do I still need a SRAM if I made a custom board where Linux is 

> run from a SDRAM (just like on the devboard) ? 

 

No, the SRAM is not necessary -- you can run linux just fine without 

it. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Dear Scott, 

 

may I ask you what PSRAM you use (manufacturer) and what amount of memory I need to run a linux properly ? 

 

Thanks a lot 

 

cetic
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Hi cetic, 

 

I'm using Micron MT45W4MW16PFA (4M x 16-bit), but will be 

switching to the MT45W2MW16PFA (2M x 16-bit) if all goes well. 

 

The marketing name for the part family is "ASYNCHRONOUS CellularRAM". 

 

> what amount of memory I need to run a linux properly ? 

 

That depends on your application's memory requirements. For my 

application 8 MB is plenty, but 4 MB might be a tad too tight. The 

two parts above are pin compatible ... so I'm not terribly concerned. 

 

You might want to do some experimenting on a development 

board (altera or microtronix) ... to get a better feel for your 

requirements. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Thanks a lot 

 

cetic
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Have you considered using mainstream DDR RAM instead of SDRAM? 

Altera's DDR RAM controller offers better performance than our SDRAM controller.
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Can anyone provide any form of performance data using DDR SRAM and nios2? 

 

Marco would you mind providing some insight?
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

 

--- Quote Start ---  

originally posted by smcnutt@Jan 20 2005, 07:29 PM 

hi cetic, 

 

> ... i have read in some threads around here that sdram performances 

> were quite bad. 

 

i've found the sdram controller performance to be pretty awful. given 

the logic area it occupies and its performance, i no longer consider it a 

viable alternative for many new designs. 

 

> sram is a bit expensive if i want to have enough memory to run 

> my linux (i guess i need at least 4mb). 

 

i've switched to psram (pseudo sram) for new designs. it eliminates 

the sdram controller and it performs better[/b]. The cost is 

very attractive ... the expense is the number of pins you must use. 

 

Regards, 

--Scott 

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

--- Quote End ---  

[/b] 

--- Quote End ---  

 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

I&#39;ve found the SDRAM controller performance to be pretty awful. Given 

the logic area it occupies and its performance, I no longer consider it a 

viable alternative for many new designs.[/b] 

--- Quote End ---  

 

 

Is these tru, If so, how much slower will it be. Frequeny
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

 

--- Quote Start ---  

originally posted by smcnutt@Feb 3 2005, 02:33 PM 

i&#39;m using micron mt45w4mw16pfa (4m x 16-bit), but will be 

switching to the mt45w2mw16pfa (2m x 16-bit) if all goes well. 

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

--- quote end ---  

 

--- Quote End ---  

 

 

What is the difference in prize of this memory compared to sdram ? half ? twice ? 

 

Regards. 

 

Michael Schmitt
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Hi Michael, 

 

> What is the difference in prize of this memory compared to sdram ? half ? twice ? 

 

Depending on density, roughly twice. E.g. for low quantity: 

 

MT48LC8M16 (8M x 16): ~ 10 USD 

MT45W8MW16 (8M x 16): ~ 16 USD 

MT45W4MW16 (4M x 16): ~ 11 USD 

 

Your mileage may vary ;-) 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Hi smcnutt, 

 

do you use a 16 bit or 32 bit external databus to the psram ?? 

 

thanks for your replay nepomuk
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

> do you use a 16 bit or 32 bit external databus to the psram ?? 

 

16-bit 

 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

 

--- Quote Start ---  

originally posted by smcnutt@Jan 20 2005, 01:29 PM 

hi cetic, 

 

> ... i have read in some threads around here that sdram performances 

> were quite bad. 

 

i&#39;ve found the sdram controller performance to be pretty awful. given 

the logic area it occupies and its performance, i no longer consider it a 

viable alternative for many new designs. 

 

> sram is a bit expensive if i want to have enough memory to run 

> my linux (i guess i need at least 4mb). 

 

i&#39;ve switched to psram (pseudo sram) for new designs. it eliminates 

the sdram controller and it performs better[/b]. The cost is 

very attractive ... the expense is the number of pins you must use. 

 

Regards, 

--Scott 

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

--- Quote End ---  

[/b] 

--- Quote End ---  

 

 

Scott, 

 

I&#39;ve been consdering using PSRAM for our upcoming NIOS II system, mainly due to it&#39;s much lower power consumption vs DDR. 

 

Do you use the PSRAM as a simple SRAM replacement (in which mode it has quite slow 70ns access times) or do you make use of the Burst mode to get much faster average access rates?  

 

I&#39;ve been tinking about knocking up an interface block to access it in burst mode but the effectiveness of that depends on whether the NIOS can cache grabs it&#39;s instruction stream in bursts or not. 

 

Mark.
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

Hi Mark, 

 

> Do you use the PSRAM as a simple SRAM replacement (in which mode it has 

> quite slow 70ns access times) or do you make use of the Burst mode to get much 

> faster average access rates? 

 

I use it as a simple SRAM replacement. As for the access times ... on the board I was 

referring to, I was (continue) to use a 50 MHz clock. So compared to SDRAM with 

anything more than 3.5 clocks per access, the PSRAM isn&#39;t slow ;-). And I observed 

SDRAM performance that was _much_ worse than that. Aside from the extra pins, 

the PSRAM was ideal for the application -- and I was able to move to a lower 

density FPGA. 

 

Also, to be fair, I haven&#39;t re-visited the matter -- so I don&#39;t know if the SDRAM 

controller has improved. 

 

>I&#39;ve been tinking about knocking up an interface block to access it in burst mode 

 

Same here ... I&#39;m thinking the same for our new board. But unfortunately, like many 

other things ... it&#39;s still just thinking. ;-) This might be a good candidate to add to 

a wish list for the Altera design teams. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

What kind of power restrictions are you on? I persoally don&#39;t think DDR is too heavy on power... that is, without using Vtt termination. I doubt you could get to speeds high enough to require Vtt termination, unless you had multiple chips banked. 

 

Maybe DDR2?
0 Kudos
Altera_Forum
Honored Contributor II
30,298 Views

 

--- Quote Start ---  

originally posted by jdhar@Feb 20 2006, 12:11 PM 

what kind of power restrictions are you on? i persoally don&#39;t think ddr is too heavy on power... that is, without using vtt termination. i doubt you could get to speeds high enough to require vtt termination, unless you had multiple chips banked. 

 

maybe ddr2? 

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

--- quote end ---  

 

--- Quote End ---  

 

 

Thanks Scott, I agree, a PSRAM IP block from Altera would be very nice! 

 

jdhar: I have looked at DDR and DDR2, though I can only go on what the data sheets tell me as I&#39;ve no personal experience. In our battery powered app a 256Mb DDR looks like taking anywhere between 300mW and 600mW, whereas the equivalent amount of PSRAM takes no more than 120mW.  

 

I don&#39;t really need the full DDR speed, I just want to be able to run one or several NIOS processors at around 80MHz without incurring too much slow down due to slow RAM. PSRAM in burst mode looks like it could be a perfect match, but I&#39;m still in two minds.
0 Kudos
Reply