18

Why would you want to use DDR ram and read/write on every rising and falling edge of the clock instead of just doubling your clock speed and read/write on just one of either the rising or falling edge?

Are there pros and cons to each?

Ethan
  • 463
  • 1
  • 6
  • 15
  • 5
    Sometimes you are unable to increase the clock frequency because the signal integrity will not hold at the higher frequency. – Nick Alexeev Jun 26 '18 at 15:40

2 Answers2

36

With SDR, there are two clock edges per bit, but only at most one edge on the data line.

With high frequency communication, the analog bandwidth limits how close you can put edges together on any given wire. If your clock signal hits that limit, you're wasting half of the bandwidth of the data wires.

Therefore, DDR was invented so that all of the wires hit their bandwidth limit at the same bit rate.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
  • 3
    +1. Perfect answer. DDR allows to double data rate without increasing edge slew rate, aka "bandwidth". – Ale..chenski Jun 27 '18 at 00:53
  • So DDR makes sense to get your data lines up to the same speed as the clock line... but then what about DDR2, DDR3, DDR4? – user253751 Jun 27 '18 at 11:17
  • 3
    @immibis: it still is ddr, just 2nd, 3rd, 4th generation (different bandwidth, voltages, protocol). You are probably thinking of QDR which isn't applicable here. – PlasmaHH Jun 27 '18 at 11:29
  • I was sure I remembered reading something about transfers-per-clock-cycle doubling in each generation. Upon further research it looks like that probably meant twice as many transfers per *internal* memory clock cycle, but the I/O clock still runs at half the data rate as in DDR. – user253751 Jun 27 '18 at 11:32
19

The real problem is bandwidth. The highest frequency that a data line can generate (well, not counting slew rate) is when it's sending a 101010 data pattern, which occurs at half of the data rate. With single data rate (SDR) transmission, the clock produces one complete cycle for each data bit, hence running at double the frequency of what you might see on a data line in the worst case. Double data rate runs the clock at half the data rate with one edge per data bit, hence the worst case data pattern produces the same frequency as the clock.

Generally the speed of an interface will be limited by the available bandwidth through the chip packages, pins, board, connectors, etc. If the clock requires double the bandwidth as the data, then the high frequency of the clock signal will limit the overall bandwidth of the link. With DDR, the required bandwidth is the same for the clock and the data, enabling the link to more efficiently utilize the available bandwidth.

The downside of using DDR is that it's more difficult to design. Flip flops used to capture the data bits on the receive side operate on one clock edge, either the rising edge of the falling edge. The data has to be stable at the input for a setup time before the edge and a hold time after the edge in order to be reliably latched in. With SDR, the clock can simply be inverted somewhere to meet the timing requirements. However, with DDR, a 90 degree phase shift is required, which is more difficult to generate, requiring PLLs or delay lines.

So, to summarize:

SDR

  • Pro: Simple to implement
  • Con: Inefficient bandwidth utilization as clock signal requires twice as much bandwidth as the data signals

DDR

  • Pro: Efficient bandwidth utilization as all signals require the same bandwidth
  • Con: Complex to implement
alex.forencich
  • 40,694
  • 1
  • 68
  • 109
  • 1
    Occasionally you'll see devices that take a two-phase clock directly. Effectively DDR with the phase shift at the clock generation side. – TLW Jun 27 '18 at 02:57