SDRAM timings

Help & news on accelerators from TF, Amiga, Atari, CD32 etc

Moderators: terriblefire, Terriblefire Moderator

Post Reply
terriblefire
Moderator Team
Moderator Team
Posts: 5368
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

SDRAM timings

Post by terriblefire »

I've read some nasty comments about my SDRAM controller... so i figured i'd post my timing diagram and let people tell me where i can improve it..

sdram.png
sdram.png (35.54 KiB) Viewed 3594 times

The ram we have requires 20ns between RAS and CAS (ACT and RD here). So its got to be at least 2 clocks at 100Mhz. And the CAS latency (the time between CAS and data arriving on the bus) is 2 ram clock cycles. We have burst but lets just look at random access for now.

I'm using wavedrom for the diagrams..

Code: Select all

{signal: [
  
  {name: 'CPU', wave: '345.....63|',data: ['S0', 'S1', 'S2', 'S3', 'S0']},
  {name: 'CLKRAM', wave: 'p..................'},
  {name: 'CLKCPU', wave: '1010101010101010101'},
  {name: 'AS30', wave: '10........1|'},
  {name: 'DS30', wave: '10........1|'},
  {},
  {name: 'CMD', wave: '.x3xx45xxxxxxxxxxxx',data: ['ACT', 'RD','RDP']},
  {name: 'D', wave: 'x.......3.x...', data: ['data']},
  {},
  {name: 'STERM', wave: '1.......0.1|'}
]}

If people are so scathing about my ram controller then please tell me how it can be improved.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
dalek
Posts: 224
Joined: Thu Nov 08, 2018 11:03 am
Location: NSW Australia

Re: SDRAM timings

Post by dalek »

The only board I know of that you open-sourced an sdram controller is the TF330 right?

I guess the haters are too busy to submit a patch.
terriblefire
Moderator Team
Moderator Team
Posts: 5368
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: SDRAM timings

Post by terriblefire »

dalek wrote: Mon May 24, 2021 11:05 am The only board I know of that you open-sourced an sdram controller is the TF330 right?

I guess the haters are too busy to submit a patch.
Yeah TF330 ... Its the same SDRAM controller as in the MiST(er) archie core. Same in all the TF boards.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
terriblefire
Moderator Team
Moderator Team
Posts: 5368
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: SDRAM timings

Post by terriblefire »

Similarly for the 060 timings...
wavedrom.png
wavedrom.png (16.65 KiB) Viewed 3300 times

Code: Select all

{signal: [
  
  {name: 'CPU', wave: '345.....63|',data: ['S0', 'S1', 'S2', 'S3', 'S0']},
  {name: 'CLKRAM', wave: 'p..................'},
  {name: 'CLKCPU', wave: '1010101010101010101'},
  {name: 'AS30', wave: '10........1|'},
  {name: 'DS30', wave: '10........1|'},
  {},
  {name: 'CMD', wave: '.x3xx45xxxxxxxxxxxx',data: ['ACT', 'RD','RDP']},
  {name: 'D', wave: 'x.......3.x...', data: ['data']},
  {},
  {name: 'STERM', wave: '1.......0.1|'}
]}
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
User avatar
Badwolf
Posts: 2231
Joined: Tue Nov 19, 2019 12:09 pm

Re: SDRAM timings

Post by Badwolf »

terriblefire wrote: Mon May 24, 2021 9:16 am I've read some nasty comments about my SDRAM controller... so i figured i'd post my timing diagram and let people tell me where i can improve it..
Crikey, tough crowd. If they don't like yours, they'll hate mine!

Yours (536) and mine (DFB1) average to almost the same benchmarks using different clock strategies, so I think it's close to the limit (I should say that mine has segments of yours in it to the point I've made sure it inherits your licence and has your name in it against the logic assemblies I've copied but otherwise it's derived from the ground up).

Only things I could genuinely think to ask are if transitions are really on rising edge as shown in your diagram (wouldn't falling edge make more sense?) and is there any unnecessary STERM delay on writes (no CAS latency)?

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
terriblefire
Moderator Team
Moderator Team
Posts: 5368
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: SDRAM timings

Post by terriblefire »

Badwolf wrote: Fri Jun 04, 2021 7:29 pm Only things I could genuinely think to ask are if transitions are really on rising edge as shown in your diagram (wouldn't falling edge make more sense?) and is there any unnecessary STERM delay on writes (no CAS latency)?
I'm a rising edge kinda guy ;)

Its rising edge + settling time... which can be 10ns on these CPLDS.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
User avatar
Badwolf
Posts: 2231
Joined: Tue Nov 19, 2019 12:09 pm

Re: SDRAM timings

Post by Badwolf »

terriblefire wrote: Fri Jun 04, 2021 8:24 pm Its rising edge + settling time... which can be 10ns on these CPLDS.
Ah yeah, fair enough. Your clock is #jollyfast after all.

I think I've come to the end of the road with this iteration of my firmware -- it's not a happy bunny fitting into even a 288 -- so I was thinking of actually trying to port your whole 330 source to my card. Gayle and Autconfig stuff out, DSP, auto vector emulation etc in. Might cancel out.

Anyway point being it'd then give a nice before-and-after memory speed comparison. I'll shout if it works and if there's any significant difference one way or the other.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
terriblefire
Moderator Team
Moderator Team
Posts: 5368
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: SDRAM timings

Post by terriblefire »

Thanks...

Given how much work is involved in these cards and given i have started from a blank sheet on about 10 different boards im not at all upset if someone spots a mistake etc.

What gets/got me was that people said that the things wouldnt work before i even built most of them. I'm sure i could spend 5 years and tune the Tf1260 to perfection but.. it works now.. so why not let people use it.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
Post Reply

Return to “Terriblefire's channel”