Monday, July 27, 2015

Debugging read/display logic in fpga based controller for Pertec D3422 disk

PERTEC D3422 DRIVE RESTORATION

The fpga board has four seven segment display characters. I use the last two to display the hexadecimal value of the current byte, while the first two record the hexadecimal address of that byte. A button allow me to start at the first character and to step through one byte at a time. I can set up a five bit address in the slide switches on the board, with that set as the sector or the current cylinder by pushing either of the two remaining buttons. This should be sufficient for my initial testing.

I received confirmation from Mike and Martin, two Altair Pertec hard disk restorers who were able to confirm that the Altair controller wrote the head value in ones-complement, just as I saw when reading the tracks.

Another change I introduced was to pulse the Start/Stop line active for only 1 us, doing this about 100 times a second, each time resetting the timer in the +5V Timer board so that it will not shut down the drive.

Ultimately, I will emit the pulsing only when the controller is executing some command. That way, when there is an extended period where the drive is really idle, the board will spin down the drive and shut off most of the power consumption.

I worked through the debugging of all the new or changed logic in the fpga, then fired up the system for the first tests in the early evening. The first problem I found was that the Start/Stop pulsing idea was a non-starter. It attempted to start the disk, but wasn't long enough to complete the latch for spinup, so then it timed out and went back to safe just in time to receive the next short pulse.

I wasn't sure what was working or not working properly, since the overall function didn't seem to give me a number of bytes to display. When I push the button to advance to the next sequential byte, the byte counter leaps to the maximum value.

After some adjustments, I fixed that issue but wasn't sure the machinery was working properly. This required setting up a number of diagnostic outputs - steady state conditions can be displayed on the 8 LEDs on the board, but four of those also had an external connection where I could hook the scope to capture pulses or short conditions. Thus, four steady state diagnostic outputs and four outputs that could be either very short/dynamic or steady.

Digging through complex mechanisms with many states, tracking key signals, and matching them to the real time disk signals - all this takes time. I exhausted the time today and have more to do tomorrow. 

No comments:

Post a Comment