Author Topic: Double-buffered memory module?  (Read 3575 times)

0 Members and 1 Guest are viewing this topic.

Offline Spike101Topic starter

  • Contributor
  • Posts: 42
  • Country: at
Double-buffered memory module?
« on: April 17, 2015, 07:06:09 am »
Hi,

I'm looking for a special kind of memory module, but i don't know how it's called and how i can best search for it. Maybe someone here can help me out.
I need a (SPI or something) memory module, a few kB in size, which has actually two memory regions - one for reading and one for writing to it. If you write to the writing region, the reading region is not affected directly. Only if a clock signal is generated, everything from the write region is copied into the read region in one atomic operation.

The reason is, I'd like to implement a led matrix display which should play some animations, and this kind of frame-buffer would make synchronization very easy..

How is something like this called?

thanks for your help,
Sebastian
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7761
  • Country: nl
Re: Double-buffered memory module?
« Reply #1 on: April 17, 2015, 07:13:41 am »
Just use an extra dataline (call it BufferSelect) which tells each module which buffer to use, when you're ready updating all the modules change the signal on the line.

PS. don't use flash, use SRAM.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 14135
Re: Double-buffered memory module?
« Reply #2 on: April 17, 2015, 07:16:00 am »
That's too specialised and alternative techniques exist, (e.g. double buffering) so I doubt its ever been commercially available as a single chip or even as a chipset.

With parallel data and address buses it could be implemented in hardware, but the moment you serialise its interface, you need a smart controller to track the current address in each region and can no longer simply toggle an address line to swap regions.
« Last Edit: April 17, 2015, 07:20:36 am by Ian.M »
 

Offline cyr

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: se
Re: Double-buffered memory module?
« Reply #3 on: April 17, 2015, 07:17:49 am »
You could probably implement that in software by simply having a 2x larger memory and just switching between reading/writing the upper and lower half. The atomic update operation would be updating the read address offset. That's how this kind of double-buffering is typically done.

Of course you need to then copy the data from the read half to the new write half manually unless you create the next frame data from scratch each time.
 

Offline Spike101Topic starter

  • Contributor
  • Posts: 42
  • Country: at
Re: Double-buffered memory module?
« Reply #4 on: April 17, 2015, 08:04:09 am »
Thanks for your replies.

Too bad something like this dosn't seem to exist. I would have thought that's a readily available solution..
The other idea was to do it in software and just switch pointers, and that's what I'll probably do now.
 

Offline DanielS

  • Frequent Contributor
  • **
  • Posts: 798
Re: Double-buffered memory module?
« Reply #5 on: April 17, 2015, 02:38:25 pm »
Too bad something like this dosn't seem to exist. I would have thought that's a readily available solution..
The other idea was to do it in software and just switch pointers, and that's what I'll probably do now.
Well, when there is such a simple hardware/software work-around that does almost exactly what you ask using commodity SRAM or just a region of regular RAM, how marketable would such a niche atomic copy-on-write RAM be? It would likely end up far more expensive due to how small the market for it is.

While it is neat to have a chip that does exactly what you want, sometimes it just is not economically sensible.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16394
  • Country: za
Re: Double-buffered memory module?
« Reply #6 on: April 17, 2015, 04:58:57 pm »
Dual port RAM is what you want. It has a single memory with 2 separate address and data busses, so each side can write or read at will, with the only problem being writing to the same address at the same time by both sides, where the last to deassert the bus wins, or writing to the same byte while the other is reading, where you will get either the new or the old data read.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->