Paganini wrote:
Sorry to hear that George; hope you're feeling better!
Thanks
Quote:
I tried a couple of the fx2pipe fixes from the thread that Dave (Hoglet) linked to upthread, with no luck. I didn't try Cannelloni; it looks like the project is defunct, and the available source code is outdated. But, if you get good results with it I may change my mind!
I'll post here if I get it working - I don't have a good understanding of what it's trying to do yet though, e.g. the need for the "-a" option as I thought the idea was to do synchronous captures. I suspect it is not seeing my clock signal but I don't know how that is configured, it will probably require understanding the firmware code to diagnose it further. And this could then be the problem with fx2pipe as well - it may not be related to libusb at all.
Quote:
What I would like to do is have some kind of test program in a ROM that I could boot from then use the logic analyzer / decoder to observe it. I'm thinking of doing this with a minimal Blue August configuration - CPU, ROM, RAM, decoding glue, but not IO - and gradually increasing the system clock speed to see when I start getting errors.
That should be good. The issue with clock speed really depends on your system - there's a question of whether to take the data bus sample from just before the phi2 falling edge or just after it, which matters a lot if the sample rate is not much higher than double the system clock rate because it's possible that neither of those samples actually includes the right data bus data! I think hoglet found that for different Acorn computers it worked better in different configurations. But so long as the sample rate is much higher than the CPU clock rate, it should be good. I tried to get four or five samples in each PHI2 phase, which means a sample rate 8-10x higher than the system clock.
Quote:
First, I guess, does this seem like a good idea? And, second, what would such a test ROM look like, and does one exist already? I've seen the Klaus Dorman test suite mentioned in a few threads. Would that work for this? My impression is that maybe it wouldn't be a good choice, since it seems to have been designed for testing emulators, not real hardware, and supplies a full 64k memory image. It seems to be designed to run from RAM and requires an interactive monitor program to load it on real hardware.
The Dormann tests are pretty good. I had some doubts but Dave encouraged me to give them a go, and it was worth it.
The tests fairly thoroughly cover aspects of the CPU's behaviour - all combinations of operands for each operation, for example - but they're not soak tests (out of the box) and they don't particularly test your address decoding, for example - all the absolute addressing mode tests use the same block of memory, it doesn't exercise the whole memory map. So you could supplement them with something that does.
They do have an option to verify that instructions didn't corrupt other areas of memory, but I didn't enable this.
You can enable an option to get text-based output from it in case of errors, which also allows you to give input to tell it to continue or skip - and this also allows asking it to rerun the whole test suite after it finishes. I rigged the "get chararcter" mode to alternately return "C" for continue and "R" for rerun, so that I could leave it running unattended for a soak test.
They are by default designed to be loaded by some form of monitor program, but you can change some settings to make it work from ROM instead. For my purposes I made my ROM copy the test suite to RAM and run it from there because my system runs faster from RAM and that's what I wanted to test.
I had to make a minor change to the test code as well to work around an assembler error related to testing of BRK, which is not possible when the system vectors are in ROM. There's an option to skip this test, but it still caused errors unless a couple of extra labels were defined, so I just defined them in a random place!
By far the biggest obstacle to running the Dormann tests is the assembler itself, which is unusual and no longer officially available. A copy of the assembler is bundled with the tests, and I think there's also a github fork with the test suite converted to a more common assembler. I used the supported assembler to assemble the image, then embedded it in my ROM code as a binary blob so that my ROM code could still be written with an assembler that I'm more familiar with.