System/1 Build Log
An ongoing chronology of System/1's construction, and any other related musings.
13th July, 2014 - Main Register File testing completed
When I last tried to test the register file board, I found myself with a somewhat perplexing issue; occasionally writing to one register would also write to another register at the same time, but not consistently.
It took a while to convince myself that this was indeed what was happening; since the '4514 decoder being used to select the register to be updated should only ever produce a logic high on one of the sixteen outputs at a time, it seemed on the face of it rather implausible. Unfortunately it only ever seemed to happen when tests were being run automatically in loops; setting values for the input lines by hand never caused more than one LOAD signal to be asserted, and hooking the logic analyser up to the two most commonly-confused such signals seemingly chased the problem away!
For a while I entertained the possibility that the problem was actually in reading the contents — one register accidentally getting selected by mistake, which would be hard to diagnose since the registers always output their contents for the two 74150s to tap off. Of course, the '150s are the two chips that have to sit in bodged-together adapters because of the earlier cock-up with the DIP sockets being too narrow, so I spent some time scrutinising the adapters closely to make sure they definitely weren't touching each other (which could short some of the right-hand pins of IC3 to the corresponding left-hand pins of IC4). This showed a couple of slightly-suspicious looking pins, but trimming those down just in case didn't make a difference. Blast. I guess it was too much to hope that this would be something as simple as that!
Eventually I proved to myself that it was indeed writes that were going astray, by waiting for the test to error out and then removing the 'correct' register from the board before reading the one that had been incorrectly modified. Whilst doing this during one test iteration, I happened to check the voltage on the removed register's LOAD pin; 5V during a write, as expected, but there was something nagging at the back of my mind...
... and then I suddenly got a horrible feeling that I'd wasted far too many hours tracking down an incredibly stupid mistake. A quick check with the multimeter, a calculator and a 74HC family datasheet confirmed it; I'd completely forgotten that the mbed, despite having 5V-tolerant inputs, is a 3.3V device. I had been running the register file board at 5V, mainly out of habit, but it was being fed with 3.3V signals on the board's inputs; for 74HC devices running on a VDD of 5V, 3.3V falls just below the upper end of the no-man's-land between VIL and VIH — high enough to almost always be read as a 1, but officially out-of-spec. After turning the bench supply down to 3.3V (with some dark mutterings under my breath), the test loop ran for a while with no errors; to be sure, though, I left it running overnight and still saw no failures.
A stupid mistake indeed, and one I shall hopefully not repeat! It is worth remembering that the two 74150s should really run from a VCC of 5V, so instead of lowering the supply voltage for testing I should be using level converters on the mbed's outputs. That would be a bit of a pain to set up, though, especially since the TTL chips are working properly at the moment. I'll see how I get on doing it this way, but will definitely bear this abuse of their specs in mind if things start acting strangely again in the future.