DRAMARDUINO - Dram tester with Arduino

This is the right place to discuss on how to implement hardware vsync, adding a VIA or AY chipset, puting multiple roms, or how to design a new flash expansion card.
User avatar
TA2KQ
Private
Posts: 5
Joined: Sun Feb 07, 2021 6:51 pm

Re: DRAMARDUINO - Dram tester with Arduino

Post by TA2KQ »

While we are at it, another question:

I have a set of TI 6154 chips I bought from China, they are not fakes, but they are used (pulled from old boards)
These chips all test fine with this tester, but they cause intermittent errors when I use them in the computer.
Someone said they may be somewhat "tired" chips, and the conditions of this tester are more forgiving than the conditions of the computer, especially in the speed they are read / written, or refreshed.
This sounds quite logical to me. What are your thoughts, and what can be done to make this code more challenging to identify this kind of faults?

Thanks to all!
Bora
User avatar
Dbug
Site Admin
Posts: 4143
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by Dbug »

I wonder if it's possible to emulate what memtest+ does, like trying to access the ram in one direction, the other direction, randomly, testing with different patterns, etc... to detect edge cases like ram that "mostly work" but fails now and then.
User avatar
mikeb
Flight Lieutenant
Posts: 282
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by mikeb »

TA2KQ wrote: Thu Feb 11, 2021 11:35 am I have a set of TI 6154 chips I bought from China
Skipping past the obvious objections regarding fakes, and relabelled chips, what is the FULL numbering from the top of the chip? Often, the part number is immediately followed by a speed indication, and there are plenty of 4164-like chips that are too slow for Oric (which accesses the DRAM three times in every 1 microsecond cycle) that work just fine in other 1MHz computers (accessed once per cycle).

E.g. TI6154-1 TI6154-15 ... -2 ? -3? would indicate 100ns, 150ns, 200ns, 300ns access times. 100/150ns should be fine. Any slower is not going to work reliably (or at all).
User avatar
iss
Wing Commander
Posts: 1480
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by iss »

I second @mikeb: what's the full name of the chips? A readable picture will be best :). I can't find any info about such thing like TI 6154... else about the "tired" chips - this sounds like "conspiracy" :).
Dbug wrote: Thu Feb 11, 2021 3:16 pm I wonder if it's possible to emulate what memtest+ does, like trying to access the ram in one direction, the other direction, randomly, testing with different patterns, etc... to detect edge cases like ram that "mostly work" but fails now and then.
The tester makes 4 loops with different data. As I said I found some lazy chips which starts to pass the test after some time for heating.
User avatar
TA2KQ
Private
Posts: 5
Joined: Sun Feb 07, 2021 6:51 pm

Re: DRAMARDUINO - Dram tester with Arduino

Post by TA2KQ »

They are TMS4164-20NL, date code AP8432
They seem to be genuine, rubbing with IPA and acetone did not reveal anything. They are obviously second hand with solder marks on their pins small scratches here and there. Oh, and I confess, I bought them for a Sinclair Spectrum and testing them on it. 😊
User avatar
mikeb
Flight Lieutenant
Posts: 282
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by mikeb »

TA2KQ wrote: Thu Feb 11, 2021 9:24 pm They are TMS4164-20NL, date code AP8432
They seem to be genuine, rubbing with IPA and acetone did not reveal anything. They are obviously second hand with solder marks on their pins small scratches here and there. Oh, and I confess, I bought them for a Sinclair Spectrum and testing them on it. 😊
Ah, well, those are on the slow side (200ns) and so may be unreliable. They can't guarantee to get the data out in time for access by the CPU and ULA (twice) in each 1MHz clock cycle. So while they may work "mostly", you will have screen glitches from the ULA getting bad data, and more importantly, all sorts of unreliability with data being read from memory, which will put all sorts of interesting bugs into working code :(
User avatar
Dbug
Site Admin
Posts: 4143
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by Dbug »

mikeb wrote: Fri Feb 12, 2021 5:33 pm
TA2KQ wrote: Thu Feb 11, 2021 9:24 pm They are TMS4164-20NL, date code AP8432
Ah, well, those are on the slow side (200ns) and so may be unreliable. They can't guarantee to get the data out in time for access by the CPU and ULA (twice) in each 1MHz clock cycle. So while they may work "mostly", you will have screen glitches from the ULA getting bad data, and more importantly, all sorts of unreliability with data being read from memory, which will put all sorts of interesting bugs into working code :(
Naive question: If you have slow ram chips, and you use them only from $0000 to $B4000 and from $C000 to $FFFF, where only the 6502 is actually doing active reads, using fast chips for the area frequently accessed by the ULA, would that work?
User avatar
kenneth
Flight Lieutenant
Posts: 460
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by kenneth »

The RAM chip is used in a "slice" of all the memory, and not in an area of ​​the memory, we cannot have different speeds. :wink:
User avatar
mikeb
Flight Lieutenant
Posts: 282
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by mikeb »

Dbug wrote: Fri Feb 12, 2021 6:53 pm If you have slow ram chips, and you use them only from $0000 to $B4000 and from $C000 to $FFFF, where only the 6502 is actually doing active reads, using fast chips for the area frequently accessed by the ULA, would that work?
Good thought!

As Kenneth said -- and definitely not under current hardware. Although each chip is a 1 bit x 64k slice up the whole memory map, and so the speed affects every address, the address being accessed bounces about during the 1MHZ cycle. e.g. Processor: 0x500, ULA: 0xBB80 ULA: 0xB500 ... (slow, quick, quick).

You could (for some crazy reason) split DRAM up into slow and fast banks, but you'd have to do that electrically between the ULA and the DRAM, identify what addresses are being accessed, and direct the requests to the fast bank (for all screen memory) and slow bank (for everything else).

It would be a lot of work for a "look what *I* did!" project, and you'd still need enough FAST (normal!) DRAM (16K at least) to feed the ULA, as well as 64K of slow DRAM so I don't think it's a good project to attempt :)
User avatar
TA2KQ
Private
Posts: 5
Joined: Sun Feb 07, 2021 6:51 pm

Re: DRAMARDUINO - Dram tester with Arduino

Post by TA2KQ »

mikeb wrote: Fri Feb 12, 2021 5:33 pm
TA2KQ wrote: Thu Feb 11, 2021 9:24 pm They are TMS4164-20NL, date code AP8432
They seem to be genuine, rubbing with IPA and acetone did not reveal anything. They are obviously second hand with solder marks on their pins small scratches here and there. Oh, and I confess, I bought them for a Sinclair Spectrum and testing them on it. 😊
Ah, well, those are on the slow side (200ns) and so may be unreliable. They can't guarantee to get the data out in time for access by the CPU and ULA (twice) in each 1MHz clock cycle. So while they may work "mostly", you will have screen glitches from the ULA getting bad data, and more importantly, all sorts of unreliability with data being read from memory, which will put all sorts of interesting bugs into working code :(
Interesting... My knowledge of digital electronics is at novice level at best, so bare with me, but doesn't 200ns translate into 5Mhz? The CPU clock in a ZX Spectrum is 3.5MHz. I also didn't know that in a ZX Spectrum the CPU and the ULA access the RAM twice in one clock cycle, how does that work? I thought the ULA actually "stopped" the CPU when it needs to access the RAM, and that RAM is the "lower" 16K where the screen image is kept. I know that the CPU clock is generated inside the ULA and fed to the CPU via a transistor which is controlled by the ULA to stop the CPU whenever it needs to do something sneaky with the data bus, so in theory, there shouldn't be 2 reads/writes in 1 clock cycle. Also these chips that causing problems are used in the "upper" 32K range of the RAM, I really don't know whether the ULA ever needs to access there. I'll do some research on whether it is possible to use 200ns DRAM chips in a ZX Spectrum upper RAM which may cast some light on the subject. I am hoping that this problem I am having will inspire the coders in making this DRAM test code better and more aggressive so that it can catch not only absolutely defective chips but these kind of intermittent problems too. Cheers, and stay safe!
User avatar
mikeb
Flight Lieutenant
Posts: 282
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by mikeb »

TA2KQ wrote: Tue Feb 16, 2021 9:53 am Interesting... My knowledge of digital electronics is at novice level at best, so bare with me, but doesn't 200ns translate into 5Mhz?
200ns would be 5MHz if it was a simple period to frequency conversion. 200ns is how long it takes from presenting a row-column address pair and saying "READ!" to valid data being available. So, factor in some time for "setting up row address", DRAM takes it, "Setting up column address", DRAM takes THAT, wait 200ns, grab valid data ... in practice you can't pull one byte out of DRAM every 200ns. That applies to Oric/Spectrum/any use of DRAM.

No idea about the exact mechanics of the Spectrum's ULA/Graphics, anything I wrote was about the specifics of Oric which is *not* entirely "textbook normal" on its timings. This manifests itself in Oric being a "1MHz machine" that requires a 2MHz 6502A part -- because the actual clock ACTIVE time for the 6502 is 33% of the clock cycle (333ns, too short for a 1MHZ part which needs 450-500ns needed!).

So the 6502 has to be over and done QUICKLY to get out of the way for the ULA to double-dip into memory to produce the picture. On an Oric, there's not much latitude to use slower than 150ns DRAM, or to use a 6502/1MHz as a replacement processor. It just won't work.

A Spectrum memory map is clearly different to Oric, so any comments on that aspect were again based on Oric's map.

It sounds like the Spectrum approach was that the ULA forces the CPU to stop to make space for access to DRAM, which is one (simpler) way of dealing with, I suppose it makes exact timing of software slightly more interesting. Oric doesn't need to do this, both the CPU and ULA have equal opportunity to access memory (CPU on 33% high part of cycle, ULA twice on 66% low part).
mmu_man
Flight Lieutenant
Posts: 301
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by mmu_man »

It seems Jan Beta had a try at building it, he even mentions the forum:

User avatar
iss
Wing Commander
Posts: 1480
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by iss »

mmu_man wrote: Mon Feb 28, 2022 5:21 pm It seems Jan Beta had a try at building it, he even mentions the forum:
Indeed! And #DRAMARDUINO is on the Hacakday. :)
franks3dshop
Private
Posts: 2
Joined: Thu Mar 10, 2022 3:20 pm

Re: DRAMARDUINO - Dram tester with Arduino

Post by franks3dshop »

Hi all, I just added my 2 cents to this project here is the modified version with these modifications:

- I have added a ratio to slowdown the blinking (BLINK_RATIO) so not too get epilepsy from the thing!
- Added more feedback on the serial port about the test in progress and at what address the error first occurs.

I wish to also add a 0.9" OLED screen to better follow the process like some version on Ebay

I used this board with a Arduino Nano (can also use a Arduino Uno) :
https://www.pcbway.com/project/sharepro ... _Nano.html



Frank
Franks3dShop-assembled.jpg
dramduino.ino.2021.11.09.zip
(17.28 KiB) Downloaded 154 times
franks3dshop
Private
Posts: 2
Joined: Thu Mar 10, 2022 3:20 pm

Re: DRAMARDUINO - Dram tester with Arduino

Post by franks3dshop »

Did a test today and it works! It will work with a 16x2 LCD module with a PCF8574 module.
IMG_2923.JPG
IMG_2924.JPG
Made a small video:
https://youtu.be/0HXAVb3HuZQ
Attachments
dramarduino.ino.2022.03.10.zip
(17.59 KiB) Downloaded 252 times
Post Reply