SDR SDRAM controller for Xilinx Spartan-3E

Aug 04, 2007 15 Replies

Hello,



I would like to utilize a controller for a SINGLE data rate SDRAM (Micron MT48LC16M16A2TG-75, to be specific). In the past I've used Xilinx' MiG 1.4 to obtain a DDR2 controller, which I ended up pretty happy with (after forgetting the via dolorosa to set it up...). Its main benefit is a simple and convenient FIFO-based user interface.



For some reason, I thought that MiG would create an SDR controller as well (it's simpler, after all), but it turned out I'm very wrong: The last piece of attention on Xilinx' behalf to SDR, which I've managed to find, is xapp134. That paper, along with its HDL code, originates in 1999, and is more or less the same ever since. The controller offered is hence adapted to Virtex-I and Spartan-II, and is yucky is several respects.



Newer application notes (as well as MiG) relate to faster memory classes (DDR, DDR2, QDR, you name it), with controllers eating up some clock resources to solve timing problems. And all I wanted was a cheap memory with reasonably simple access.



Given the situation, I'm considering to create a DDR controller with MiG for a memory with similar attributes (bus width, array size, etc) and then hack it down to SDR. Since the command interface is the same, that should leave me with changing the data flow, and make the burst timing right. Not much fun, but hey, after debugging the MiG DDR controller, I should survive this one as well.



And here's the irony: I picked this SDRAM to make things simpler for me.



So before I start this little self torture, does anyone have a better idea?



Thanks, Eli



I would consider a revision to the circuit board. How long will a MT48LC16M16 be stocked by distributors?

-- Mike Treseler

Well, the board is already assembled and under initial hardware checkups. So it's a bit late for that...

And honestly, I can't see why DDR should be used when the bandwidth isn't required. From my previous experience, it's far more complicated than talking with an SDR chip, which is more or less like any synchronous chip.

Eli

NorthWest Logic provides a SDR controller for the Spartan-3E. Xilinx only provides DDR and more complicated reference designs.

More info here:

formatting link

Cheers Jaco

I have the same problems, just I want to SDR in an MB embedded system. Luckily I know that Xilinx OPB SDRAM controller sucks so the new Spartan3E boards will have DDR on board. If you need only 1kB FIFO style burst transfers than I can provide you with some working example.

Cheers,

Guru

Write one from scratch? SDR SDRAM is (as you rightly say) fairly straight-forward, especially if you don't need to maximise bandwidth, so you can have a simple state machine controlling it.

I did one a very long time ago (my first bit of serious VHDL, so it can't have been that hard :-)...

Alternatively, you could use a DDR controller and ignore every other byte :-)

Cheers, Martin

martin.j.thompson@trw.com TRW Conekt - Consultancy in Engineering, Knowledge and Technology http://www.conekt.net/electronics.html

I'm with Martin. Write your own SDRAM controller from scratch. It's really not difficult, and you can optimize it for your particular application. It shouldn't take more than a couple of days to write, simulate and verify it.

-a

Thank you for your answers. What I really wanted to verify, is that there isn't an easy way which I've missed.

And writing a controller for a very specific purpose from scratch is indeed not difficult, but writing one which makes a fairly good use of the bandwidth for a reasonable, but unknown access pattern, well, well...

So I'll stick to my previous plan to downgrade the MiG controller, which has two great advantages: I know it, and I've seen it working.

startup sequence. I'll report back if I come across something worth mentioning.

Thanks again, Eli

Could you use the mch_opb_sdram controller from Xilinx EDK in your application ?

The mch_opb_sdram controller is the same s*it. He would only get a bunch of stuff that he does not need and low bandwidth.

Guru

I second that...

In the early stages of writing my own DDR controller, I thought I can get a bit of inspiration from mch_opb_ddr. That was wrong. I've never seen such a crude VHDL coding style. To me it looks like the result of a class of VHDL beginners. Lots of asynchronous processes with huge sensitivity lists, component instantiations that make the dataflow more mysterious than obvious, etc. When counting all the required modules (ipif*, etc.) it gives a 200 page book.

Now I have my own small (~2000 lines including Microblaze interface) controller, with open row management for all banks, burst support (>350MB/s from a

16Bit/133MHz DDR) and 5 independent ports with local burst data caches and an easy command like interface... The size is about the same as the mch_opb_ddr. The Microblaze R/W memory performance also nearly doubled, and there are still some unnecessary latencies left for later optimization.

So my recommendation is the same: Write the controller on your own. You can adopt its interface exactly to your needs and avoid unnecessary protocol conversion cycles. It can only get better...

Georg Acher, acher@in.tum.de http://www.lrr.in.tum.de/~acher "Oh no, not again !" The bowl of petunias

Would there be any remote possibility of imagining that you might some day consider the idea of putting this on OpenCores ?

PS : I read your homepage, quite interesting ! I see you do home soldering of BGAs. Since you're in Europe like me, can you point me to a PCB prototyping fab that can handle the PCB tolerances needed for BGA escape routing ? PCB-POOL cannot...

|> Would there be any remote possibility of imagining that you might some |> day consider the idea of putting this on OpenCores ?

It's a paid job, but I will consider it.

|> PS : I read your homepage, quite interesting ! I see you do home |> soldering of BGAs.

Unfortunately, this system doesn't work with lead free anymore. The 40 deg higher melting point is enough to ruin the PCB :-(

|> Since you're in Europe like me, can you point me to a PCB prototyping fab |> that can handle the PCB tolerances needed for BGA escape routing ? |> PCB-POOL cannot...

Ask them about about a special offer. I had 5 PCBs, 4 layer, 28*12cm each. It was cheaper than in the pool... About 5 years ago, they tolerated 0.13/0.13mm in the pool setup.

Georg Acher, acher@in.tum.de http://www.lrr.in.tum.de/~acher "Oh no, not again !" The bowl of petunias

Has anybody tried the new version of the Multi Port Memory Controller ?

Now comes with many interfaces, among them OPB and a simple general purpose...

formatting link

(require registration)

Waiting for some spare time to give it a try...

The new version is about the same as the fist one.

The MPMC2 is a very powerful architecture available for a couple of years. The problem is that it supports only DDR or DDR2 and is NOT just a few clicks to get it running.

Guru

I'm in agreement also, having written a number of them.

20% of the work is getting the timing to the DRAM chip. 80% of the work is getting the right rows open for -your- access requirements.

Snag the simulation model from the Micron web site before they tear them down.

G.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required