Page 1 of 1
SDRAM timings
Posted: 24 May 2021 09:16
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
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.
Re: SDRAM timings
Posted: 24 May 2021 11:05
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.
Re: SDRAM timings
Posted: 24 May 2021 11:34
by terriblefire
dalek wrote: 24 May 2021 11:05
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.
Re: SDRAM timings
Posted: 03 Jun 2021 14:43
by terriblefire
Similarly for the 060 timings...
wavedrom.png
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|'}
]}
Re: SDRAM timings
Posted: 04 Jun 2021 19:29
by Badwolf
terriblefire wrote: 24 May 2021 09:16
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
Re: SDRAM timings
Posted: 04 Jun 2021 20:24
by terriblefire
Badwolf wrote: 04 Jun 2021 19:29
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.
Re: SDRAM timings
Posted: 04 Jun 2021 21:47
by Badwolf
terriblefire wrote: 04 Jun 2021 20:24
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
Re: SDRAM timings
Posted: 05 Jun 2021 00:00
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.