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.
Stan
Private
Posts: 3
Joined: Fri Oct 21, 2022 8:02 am

Re: DRAMARDUINO - Dram tester with Arduino

Post by Stan »

Hi,
I've purchased a vintage DRAM tester from eBay recently, and while I was waiting, I decided to buy an Arduino and try making some basic tester.
Here is how I came across this forum thread.
I had some free time, made some 'google research', and made some software updates over the iss's ino code that I would like to share with you.
Major updates:
- fillx() accepts custom 8-bit test patterns
- first fills the entire DRAM with the test pattern, then reads back and verifies (readx() func) in a second pass
- stops after MAX_ERRORS count of errors, not after first error
- added Auto-find 4164/41256. The jumper is no longer required, but if closed, will force a 4164 test. This is not the best auto-find solution though, as it writes/reads only one bit.
- readAddress and writeAddress routines rewritten for direct port manipulation - significant speed increase

Other updates that I have on my mind would require hardware changes (such as 4116 12V -5V DRAM support)

It was real fun to see how the Arduino tester catches single-bit errors while the 50-euro ebay tester didn't:
Screenshot bad ram.png
Attachments
dramarduino_new.zip
(2.43 KiB) Downloaded 40 times
User avatar
iss
Wing Commander
Posts: 1479
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by iss »

@Stan: Cool! I like the pattern test, 64/256 detection and MAX_ERRORS improvements.
Not sure about new 'blink' mode (IMO the speed-up comes mainly because no in-test blinking).
I'll test asap and make the changes 'official' :wink:
Stan
Private
Posts: 3
Joined: Fri Oct 21, 2022 8:02 am

Re: DRAMARDUINO - Dram tester with Arduino

Post by Stan »

I also do not like the blinking :D I'm leaving it you or anybody who has something in mind about it.

>>>(IMO the speed-up comes mainly because no in-test blinking).
Not only. Looks like every arduino's digitalWrite(); digitalRead(); does a bunch of operations that can last several microseconds and we have a lot of them for every DRAM read or write.
https://roboticsbackend.com/arduino-fast-digitalwrite/

Whereas a direct read from a port even needs a delay because DRAM is not so fast:

/* column */
setBus(c);
PORTB &= ~(1 << PORTB_CAS);

/* bit read value */
__asm__("nop\n\t"); //62.5ns
__asm__("nop\n\t"); //62.5ns
__asm__("nop\n\t"); //62.5ns
__asm__("nop\n\t"); //62.5ns
ret = PINB & (1 << PINB_DO);
User avatar
iss
Wing Commander
Posts: 1479
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: DRAMARDUINO - Dram tester with Arduino

Post by iss »

Stan wrote: Wed Oct 26, 2022 8:30 am... arduino's digitalWrite(); digitalRead();
Yes, this is well known and direct port I/O is the way, which I made already in assembler... :wink:
Stan
Private
Posts: 3
Joined: Fri Oct 21, 2022 8:02 am

Re: DRAMARDUINO - Dram tester with Arduino

Post by Stan »

Good. Just saying that skipping the LED blinks is not the real reason for the speed up.
Post Reply