Fixing mistakes in rev. 1 of the ALU

Posted on Sun 19 April 2020 in MUPS16

Well, it turned out that there were more problems with the first revision of the ALU than I thought:

  • I knew I'd left three pairs of inputs floating across two ICs in the comparison unit, but it turned out I'd also completely neglected to wire up power or ground. Both these problems came about because I'd used Kicad's support for showing the individual units in a multi-unit IC (like the quad-AND and quad-OR gates I used here) in the schematic. While that makes it easier to show the behaviour you're modelling, it's up to you to make sure you add all 5 units (4 logical, and 1 for power) to the schematic. If you forget one or more, you get no warning, and it doesn't show up as unconnected in the design rules check. In this case, I was missing three logic units and three power units:
    schematic

  • My logic for enabling the bus output drivers in the arithmetic/logic unit was wrong. It was enabling the drivers whenever alu_out was low, without accounting for whether the operation was a shift:

    schematic
    I should have been feeding the inverted SHIFT_ENABLE to the second enable input of the drivers:

    schematic

These will need fixing properly in a second revision of the board, but for now I've bodged in some fixes with jumper cables and solder. Since I couldn't easily get at the second enable input of the arithmetic bus drivers, I took advantage of the fact that I had a floating OR gate and killed two birds with one stone by cutting the OUT_ENABLE line going to the enable pin on the chips, and patching in ~OUT_ENABLE | ~SHIFT_ENABLE, using a single NOT gate soldered to wires, and the spare OR gate. The other floating gates and missing power/ground wires were fixed with jumper cables.