DoPECC
back to Machine Log

Diagnostic Microcode

Prev Entry Next Entry

The ROM emulator provided the ability to simplify the problem of diagnosing microcode execution faults by the use of custom diagnostic microcode. Rather than tracing the execution of the Wang code and attempting to test all of the machine functions that each step depended upon, one could craft specific microcodes that could test specific sections of the machine.

Consider the following one-line diagnostic microcode, with thanks to Douglas Miller:

000: V = 0 + 0 + 1; CA = RAM(15,15,V); JUMP 000

This single line increments the 4-bit V register, reads RAM into CA register from a location where the lower 4 bits are defined by the V register, and then jumps to itself. The result is an endless loop that generates a repeating 4-bit count in V and a repeating cycle of RAM reads from 16 consecutive locations. All in one line of microcode. As an added bonus, the V register also gives rise to the N0 register which is exposed on the 38-pin IO connector. Monitoring this connector for an incrementing count provides a convenient way of monitoring this microcode.

This single line nevertheless tests quite a number of machine functions:

It was straightforward to burn this miniature microcode image into the EPROM emulator and run it.

Results - N0 Register Fault

Two high order bits stuck zero
Two high order bits stuck zero (opens in new tab)
Two high order bits stuck zero N reg stuck bits Two high order bits stuck zero The HP16500C logic analyser was set up for state trace on the N0 register, triggered by the end of Prime and clocked by the Ros signal. This was designed to give one state sample per microcode cycle, captured after ALU operations were complete and before the ROM address was updated to the next address.

The V register outputs are essential for RAM addressing and display generation. A fault of this type is a showstopper and would explain the machine being dead

The trace shows an immediate problem, the two high order bits of N0 show an incrementing pattern but the two lower bits are stuck. The lower bits show a correct count pattern and this suggests that the ALU and V-register are likely to be OK. The V-register content is captured into parallel form and it’s more likely that a ‘2 stuck bit’ pattern arises from the parallel capture logic.

Results - Confirm V register is OK

Correct 4-bit count values
Correct 4-bit count values (opens in new tab)
Correct 4-bit count values V register OK Correct 4-bit count values Moving the analyzer to the parallel outputs of the V shift register showed a correct 4-bit count and pointed to the gates that transferred the V register to the MAV.

Diagnosis with Vintage Tools

Vintage logic analyzer with vintage calculator
Vintage logic analyzer with vintage calculator (opens in new tab)
Vintage logic analyzer with vintage calculator HP1600A with Wang 600 Vintage logic analyzer with vintage calculator

During the analysis of this fault a fellow restorer commented on how much harder this would have been with the tools available in the early 1970s. This prompted the dusting-off of the HP1600A, probably the first recognisable Logic Analyzer. The 1600A was introduced in 1976, too late to help with the design and development of the 600 series but perhaps a great assistance to the Service Engineers who did the chip-level diagnosis and repairs.

The 1600A was connected to the gates where the V register becomes the MAVx 4-bit low order RAM address and was readily able to show that the low-order 4 bits still show a corrupted count with the two lowest bits stick high.

The schematic showed that the two stuck signals were associated with a single 9946 quad NAND gate. Logic probing with a 1970s HP545A probe confirmed that this chip was defective. Once the general area of a fault is identified the 545A is a quick and easy way to scan for stuck or invalid logic levels, the latter being a common failure mode in vintge logic ICs.

Faulty 9946 IC - Replacement Options

The 9946 is an unusual IC, a member of Fairchild’s short lived DTuL family. DTuL was an immediate predecessor to TTL that was overtaken by the 7400 TTL family, examples are very rare today. Fortunately DTuL is electrically similar to TTL and 7400 parts can often be substituted.

The venerable 7400 quad NAND gate is logically equivalent to the 9946. This looked like an easy substitution except that the 9946 is used with outputs connected together in a wire-OR configuration. The 74HCT00’s on-hand cannot be used in this configuration. A moment’s thought recalled the less common 7401 TTL IC, a quad NAND with open collector outputs, well suited to wire-OR configuration. Checking the TTL databooks was rewarded with a feeling of luck on finding that the 7401 appeared to be exactly pin-compatible with the 9946 and then disappointment on finding that there are multiple 7401 variations and only the (uncommon) 74H01 is pin-compatible. Substituting more common 7401 variants requires four pin pairs to be swapped.

It’s not clear why an uncommon IC like the 9946 was used in this case. First thought was that the 7401 may not have been available in the early 1970s, but the 7401 was used (in the wire ROM) of the the Wang 700 series and so was available to the 600 designers. Perhaps something as simple as the 9946 being cheaper at the time.

Replace 9946 with 74H01N

9946 replaced with (older) 74H01
9946 replaced with (older) 74H01 (opens in new tab)
9946 replaced with (older) 74H01 9946 replaced with (older) 74H01

SN74H01Ns were obtained NOS and arrived with date codes 1970-week19, two years before machine CC2001 was built! They were TI chips, pins oxidized but cleaned up easily and soldered well.

A substitution of this kind requires pullup resistors which can be calculated to suit the circuit configuration and fitted on the rear of the board.

The 1600A was set up on the IO connector, as noted above if the N-register outputs on this connector were OK then this would confirm that the 74H01 had fixed the fault, and that the other logic between the 74H01 and the connector was also working correctly.

Repair Successful

1600A shows good repair
1600A shows good repair (opens in new tab)
1600A shows good repair 1600A shows good repair Running the 1-word microcode diagnostic, a correct 4-bit count was seen.

The MAV gating fault has been repaired by replacing a failed 9946 IC with a 74H01