{"id":599,"date":"2013-07-14T15:37:29","date_gmt":"2013-07-14T15:37:29","guid":{"rendered":"http:\/\/retroramblings.net\/?p=599"},"modified":"2026-08-14T12:56:44","modified_gmt":"2026-08-14T12:56:44","slug":"the-insanity-continues","status":"publish","type":"post","link":"https:\/\/retroramblings.net\/?p=599","title":{"rendered":"The insanity continues&#8230;"},"content":{"rendered":"<p>Building on my previous rather perverse mashup of Amiga and ZPU technology, my old Amiga 500 motherboard currently has not just one, but *two* ZPU processors!<\/p>\n<p><a href=\"http:\/\/retroramblings.net\/wp-content\/uploads\/2013\/07\/SDRAMCheck.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-603\" alt=\"SDRAMCheck\" src=\"http:\/\/retroramblings.net\/wp-content\/uploads\/2013\/07\/SDRAMCheck.jpg\" width=\"718\" height=\"500\" srcset=\"https:\/\/retroramblings.net\/wp-content\/uploads\/2013\/07\/SDRAMCheck.jpg 718w, https:\/\/retroramblings.net\/wp-content\/uploads\/2013\/07\/SDRAMCheck-300x208.jpg 300w, https:\/\/retroramblings.net\/wp-content\/uploads\/2013\/07\/SDRAMCheck-430x300.jpg 430w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/a><!--more--><\/p>\n<p>One of these is running a general purpose SDRAM test program.\u00a0 This is general enough to run unmodified on a number of different FPGA boards; the price for this generality is that the program has no display capabilities, and simply sends its output to a UART-style debug channel.<\/p>\n<p>Therefore, the second ZPU&#8217;s job is to receive data from this debug channel and print what it receives to the Amiga&#8217;s screen.<\/p>\n<p>The SDRAM tester program performs a number of checks on the RAM:<\/p>\n<ul>\n<li>The simplest is a straightforward sanity check, writing a handful of bit patterns to memory location 0, reading it back and making sure it hasn&#8217;t been corrupted.\u00a0 It actually reads it back twice, with a string of reads long enough to clear the SDRAM cache in between the two.\u00a0 Thus the sanity check tests the cache as well as the data lines of the SDRAM chip.<\/li>\n<li>The next test is an address aliasing check.\u00a0 If there are bad solder joints on the SDRAM chip&#8217;s address lines, the RAM will appear to work fine for small datasets, but the bad joint will effectively split the RAM in half, making one half inaccessible, and the other half appear twice in the memory map.\u00a0 To check for this, I write a 32-bit bit pattern to locations 0, 4, 8, 16, 32, 64, 128, &#8230;. right up to the start of the second 32 megabytes (since the largest RAM chip on my FPGA boards is 64 meg, and the 64 meg boundary is where the program ROM starts on my ZPU variant.)\u00a0 Having written the test pattern, I then write a different pattern to location zero, then check all the other locations to make sure the change hasn&#8217;t propagated through to any of the others.\u00a0 As a bonus, if there are no bad address lines, this test tells me the size of the SDRAM chip in use.<\/li>\n<li>The final test is an LFSR-based check.\u00a0 I use a Linear Feedback Shift Register to generate a pseudo-random series of addresses.\u00a0 To each address I write a 16-bit word containing the lower 16 bits of the address.\u00a0 I do a couple of hundred thousand writes, then reset the LFSR and read the values back, checking that they&#8217;re correct.<\/li>\n<\/ul>\n<p>The actual memory check program can be found in my <a href=\"https:\/\/github.com\/robinsonb5\/ZPUTest\">ZPUTest github repo<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building on my previous rather perverse mashup of Amiga and ZPU technology, my old Amiga 500 motherboard currently has not just one, but *two* ZPU processors!<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-599","post","type-post","status-publish","format-standard","hentry","category-amiga","category-fpga"],"_links":{"self":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=599"}],"version-history":[{"count":4,"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/599\/revisions"}],"predecessor-version":[{"id":605,"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/599\/revisions\/605"}],"wp:attachment":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}