Monday, July 18, 2016

Continuing to debug and improve 1442 device, also working on exhibit at VCF W

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130


Restructuring the GUI

-- virtual 1442 --

I need to send the changed status for the 1442 down to the FPGA prior to the end of the current read, punch or feed cycle, in order to have it post properly with the DSW when the operation complete interrupt on IL4 is emitted. This is a small change. The Python code that sends the NR or last card&NR DSW has to be moved before I fetch the pre-punch buffer. That will set the conditions for the device. No change is needed in the fpga.

My first priority is to find and fix the bug that causes cards in the stacker file to be offset by one column. I spent another half hour walking through the logic for both copy-over and fetch, hoping to notice the problem. I rewrote the logic and added a few LED outputs, then went to test again.

Once again the annoying problem with failure to get a valid poll response back. I rebooted the Windows laptop just in case this is a USB driver and windows issue. When I restarted, I had the same problem. Interestingly, it is related to the spurious problem yesterday when core load wouldn't work.

I sent 0x5d48 to the FPGA as the command word, which is a poll on UCW 11 (device number as implemented in my logic, not the 1130 area code used to address it). However, the reflection back had it as 0x5548. That is, bit 4 when numbering starting from the left, was 0 when it should be 1. My core failure yesterday was loading core but failed to verify because any word with bit 4 set was loaded as a 0, not a 1.

The only things in common are the USB path for transactions - the bit is dropped somewhere between where I load the words to send and when it arrives in the FPGA. That could be python failures, USB driver software, the USB module on the fpga board or the signal line from the USB to the fpga chip for that bit position. I think USB does some kind of checksumming of transactions, which points to a broken chip or trace on my $200 FPGA board.

The problem arose yesterday morning and went away spontaneously by the afternoon. Lets see if it does the same today. Alternatively, I will:

  1. reload the same bitstream just in case it is a failure in the flash load
  2. make a trivial change to the fpga logic, resynthesize and load
  3. build a transaction in the GUI to echo to the fpga, allowing me to validate the state of the link
The first test delivered the same results. I will save the bitstream file before doing test two above, so that I can make sure any improvement is not a random hardware healing. After I changed a few LED connections but otherwise left the design alone, I loaded the resynthesized logic and the problem went away!

I went back to the saved bitstream to confirm that the problem recurred. This is an artifact of the toolchain. Nothing in my logic should be timing sensitive concerning the input bit 4 from the USB module. Now I have to consider any particular run of the toolchain potentially corrupt, which means that I have to do two runs with minor changes and produce dual bitstreams, in order to know immediately if the flaw is in my logic or spurious Xilinx effects.

My last test yielded a different problem with the copy over process - now I get column 1 repeated three times before the rest of the card is copied. What????? Will need to test for Xilinx disease before I try to troubleshoot this. Made a trivial change and reran the toolchain.

Repeated with two versions of bitstream, so the problem is real. I am going to rethink my method of loading up the response to the get special data transaction. I build up a temporary array of 10 words as the get special logic loop fetches from the punch buffer, then when the loop signals its end I copy from the temporary array to the output words to send back to the GUI.

With the new bitstream loaded, I fired up the system, ran through some cards. and found that I was fetching nothing but blank columns. Time to look closer at my logic to capture the value of the punch buffer during the fetch loop.

Couldn't see why this isn't working, but rewrote it anyway. Still fetching nothing but zeroes. Perhaps their is a problem over in the copy-over process? In case there are glitches in the buffer address lines I registered those. No change, however.

I did some testing of the last card processing logic. It worked exactly as desired when the last card box is checked - one the last card, the DSW has last card set, op complete and not ready. When I turned off the last card checkbox, it didn't stop on the next to last card, it emptied the hopper entirely but did at least show op complete and not ready in the last DSW issued.

I updated my GUI logic to recognize when the reader has one card left in the hopper, if last card is not selected, and turn the device not ready at that point.  I ran out of test time today but will resume tomorrow.

PLANNING FOR VCF WEST EXHIBITION

It is less than three weeks until the event. I need to prioritize my work on the SAC Interface box, as I only need the devices which will be part of my exhibition. That will free up time for other work prepping the 1130 and preparing exhibit signage. My wish list is virtual 1442 reader/punch, virtual 2310 disk drive and mirror 1053 console printer devices.

A 12 foot van with lift gate is waiting in my name. Will get it Friday, load up and bring everything to CHM that evening. The show runs Saturday and Sunday, with move-out the final evening. Much easier than my prior plan to use a horse trailer, which would have involved two trips each way, winches, ramps and sweat. Plus, I don't have to disassemble the 1130 into two parts.

 I need to script out a few demonstrations and walk through them, so that everything goes smoothly during the show. With that, I can figure out a schedule for performing them. I anticipate that I will also allow a few visitors to prepare card decks on the PC for execution on the 1130. To support this, I will have Brian Knittel's 1130 simulator available for them to test out everything in advance.

I hope to bring my 1130 replica as part of the exhibit, which will require some work to get it ready. I need to finish some cosmetics - painting the metal top cover for certain, but I hope to build quicky side panels and paint them, to improve the visual appearance. I will look for some kind of hardboard to use for those panels. Essential, before I bring it, is to hook up the FPGA, load its firmware and make sure all my wiring is in place.

My 1130 has some problems with the lamps in the display pedestal. At a minimum I have to carefully close up the compartment but if I see a very safe alternative I will replace the missing few.  The lamps go into boards which are very finicky to handle and insert, while the lamps themselves have brittle leads that snap off with the slightest flexing. After some peering, I chose to close it up as-is.

I spent some time creating signage and printing it out. Some discuss the 1130 and the replica, others cover the demonstration times or label the physical boxes present. I then drew out the cutting diagram to turn a 4 x 8 foot hardboard panel into the missing covers on my 1130 replica. These will be sprayed with a sand texture paint as a first coat, to get the pebbling effect of IBM machines, then sprayed with as close a spray paint color as I can find to either IBM Classic Blue or IBM Garnet Rose. I also need some medium tone gray to match the top of the 1130. 

Core reading is working in virtual 1442 device

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

Restructuring the GUI

-- virtual 1442 --

I made a change to the logic that simulates the emission of IL0 interrupts for each card column of the 1442. I had written the state machine to reflect the timing of a 1442 - 20+ ms wait from starting a read or punch until the first column is under the photocells and then a column arrives every 1.125 ms causing an interrupt. The remaining time, 40 ms as the card comes to a stop in the next station, is modeled before it signals completion and drops the busy status.

My prior logic waited for the program to issue the XIO Read to pick up the results of a card column before it moved on with the delay and emission of the next column interrupt. A real 1442 does not do this - it fires off column interrupts every 1.125ms whether the CPU is able to keep up with XIO Read or not. I now simulate this exact behavior, same for punch except the interrupts are once per 6.125ms in that case.

No difference in the behavior after this change. I am going to set up some logic to tell me if the buffer is loaded with the duplicated character or if it is a phenomenon of access during the XIO Read. When I tried to test, I had multiple failures that are hard to understand given the small changes I made. Some look to be hardware problems in the 1130 itself or the SAC interface.

For example, when I try to load core from a file, I get errors where bit 4 is not writing when it should be. It writes just fine when I toggle it in from the console, so it may be an issue with my SAC Interface driver for that bit. Why it would act up now is a mystery.

I attempted a test of the 1442 but encountered timeouts in the transactional engine. This sets me back as I now have to redo all the diagnostics to a very basic level until I find the cause of the stall, then go back to working on the 1442 device behavior.

Well, when I had it all set up with the new low level diagnostics, I powered up and the problems went away! Loading core works well, all 16 bits. The transactions don't time out at all. I attribute this to one of those Xilinx things, where the untrustworthy toolchain produces broken output and it all goes away with a re-synthesis even with trivial changes.

I can turn back to work on the off by one issues, in main core and as the data is copied over from pre-read to pre-punch buffers and then extracted to the stacker files.

My traps to record whether I had a 0 or 1 bit in row 12 of card column 2 failed - since I had a pair, one triggering for a value of 0 and one triggering for a value of 1, it means that the triggering conditions didn't occur. I looked at the case where the Remitter is running, putting out interrupts on IL0 and seeking XIO reads from the software, when the buffer address is 2.

I am not sure how this can fail, since I am loading the buffer even if it might be off by one. I did notice that the sensitivity list for the process had the wrong signals listed, so that might have given me a nonfunctional process for one of the traps. I changed things and tried again.

The traps are still not working, but my fixes have corrected the off-by-one problem for reading into core. I still have a problem with the data fetched from the pre-punch buffer, but that could be a failure in several places:

  • the copy function between pre-read and pre-punch buffers might be shifting the data
  • the get special data transaction may be sending the data incorrectly
  • the GUI program may be handling the returned data wrong before writing to the file
I will shoot the problem by instrumenting the GUI to show me exactly what is returned from the transaction. This will isolate the problem to either the GUI or the FPGA. I set up the diagnostic messages and ran the system again. 

The data is coming up shifted over by one - the first word is always a space, then card column 1 shows up in word 2, etc. This puts the problem down in the fpga, but it could be in one of two places - the copyover process or the get special data transaction process. I will look over both bits of logic to see if I spot anything, plus look at what diagnostic LEDs will help me track this down.

I tried a few changes and ran the tests again, but had the same issue. It is hard to see how the copyover process can get this wrong, since it uses a single index to address both buffers simultaneously and does the write operation to pre-punch several cycles after the address has stabilized. 

If it is the get special data transaction that is malfunctioning, I can't see where it is going wrong. The code that loads up the outgoing data words is a series of if statements driven by the counter which is stepped from 0 to 9 for each transaction and the address to read the buffer is stepped from its start value in concert with the counter. If the problem was here, I would expect to lose every tenth character, not to see the entire card image shifted over by 1. 

I need some inspiration for how to track this one down. It is late so I will stop testing for the day, which has been generally successful. Now that the off-by-one error is gone, reading works solidly. Remaining known issues:
  • data coming out of the stacker is shifted over, so that we have only cols 1-79 with an initial blankcolumn
  • When we read the final card with last card selected, the status is not returned along with the operation complete. This needs a small change to both GUI and FPGA to make this happen
I also need to test:
  • feed only cycles - should copy card contents from hopper to the stacker
  • punch operations of a whole card
  • punch of a short card
  • punch to a non-blank card
  • hopper emptying without last card selected



Sunday, July 17, 2016

Virtual 1442 slogging along, cleaning up and improving

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

Restructuring the GUI

-- virtual 1442 --

I found code flaws that may have caused one of my outstanding errors, the duplication of card columns 71-80 across the entire card in the output stacker files. I proceeded to testing in the afternoon, having spent the morning as a volunteer examiner for an FCC amateur radio licensing test session at the Saratoga firehouse.

I also rethought the flow in the GUI to address the problem that the last card is not completing its read. As I did that, I realized that my code to model the hopper and pre-read buffer was not going to properly support the 1442 semantics so I made substantial changes.

In the real 1442, a deck of cards sits in the hopper initially. The operator pushes the Start button to cause one cycle when the first card of the deck is loaded into the pre-read station. The way that I synchronize between FPGA and the GUI, I don't move the card into the pre-read buffer until I see an XIO Control that starts a read, punch or feed.

This matters when the last card of the hopper goes into the machine. On a real 1442, that card moves into the pre-read station and the reader will go out of ready. The user may push the Start button again
to set it into the special 'last card' mode and make it ready again.

This is a crossroads for the operator. If they select last card, the very next read will return a special bit in the DSW informing the software that the last card was read. If not, the operator must put additional cards into the hopper before the machine can be made ready and respond to a read.

This behavior allows the operator to feed vary large numbers of cards through the reader, more than can fit into the input hopper at one time. The hopper empties, the operator sticks on more cards, then the Start button resumes reading. When the entire deck is done, the operator hits Start with no new cards, telling the software that the entire deck of cards has been read.

On my virtual 1442, the operator selects the last card mode via a checkbox when the deck is loaded. If the last card mode is not chosen, then the virtual reader will become not ready when one card is left in the deck. The problem is that this last card is NOT down in the pre-read buffer, it is still in the PC file that was loaded in the hopper. In order to add more cards to the hopper, I must remember and deal wtih that final card image of the prior file.

My restructured logic will handle adding cards to the hopper when it runs out If the hopper already has one card in it, I read that last card from the current PC file, save it temporarily, then open the new file that will reload the hopper. I bump the count of cards from the new file by one if I did the save from the old file.

During the main card reading process in the GUI, if I have a saved card from the reload of the hopper, I pass that in rather than read one from the newly opened PC file. If there was no saved card, we just read normally from the hopper file.

For a last card sequence, when the card count reaches 0, the special status bit in the DSW signals last card, and we make the reader not-ready. When the user clicks on the hopper icon after this, the first click empties the hopper and closes the file. The next click loads a new file into the hopper and makes it ready.

This slightly cumbersome method will require a bit of testing, once I have the basic reading process working correctly. First up, some testing.

The issue with duplicating columns 71-80 is fixed. I have the off by one problem in both the data read into memory and in the file coming out of the stacker, which identifies the problem as sitting in my read buffer logic. I have some garbling where data in columns are misplaced - only happens every ninth column. These are primary issues, which I need to fix to get basic reading, feeding and punching working correctly.

The restructured code does read all cards completely when we get to an empty hopper with last card set. However, it does not stop at card 1 when last card is unset and I am getting undesired errors trying to read past the end of the hopper file. These can be deferred if the solution isn't obvious, until the core functions are correct.

I believe I found the issue with the garbling problem in the buffer and in memory after a read and prepared for a new test. Garbling is fixed. Unfortunately, it didn't correct the reading issue. After another shot, I am suspecting that I have a problem with sending out the IL0 interrupts too rapidly.

The particular code I am running, copied from the CE Handbook, has an interrupt handler for L0 that does an XIO Sense DSW to reset the trigger condition in the 1442, then an XIO Read to pick up the value for that column, and finally a BOSC instruction to reset the interrupt level and go back to wait.

To see if there is some issue related to timing, I slowed the emulated 1442 down 100 to 1000x, which spaces out the column interrupts by a few seconds each. No change at all in the behavior - the card columns 1 to 80 are stored in memory as 1, 1, . .. 79 and the pre-punch buffer fetch of the data that was copied over is blank 1 . . 79 instead of doubling column 1. I wish I could see what was causing the problem. I have rewritten many chunks of logic in the area, yet the flaw persists.

I restored the timing of the logic and went back to deep inspection. Until I have some clue about the failure mechanism at play, I can't even choose the signals to monitor.

-- test loop programs for debugging --

I set up memory files with the hand programs from the CE Handbook, so that I can quickly load them and test various peripherals without the time consuming toggling through the console.

MARCHANT FIGUREMATIC MECHANICAL CALCULATOR

I picked up a Marchant mechanical calculator at a very good price - free - and will need to do a bit of work to restore it to proper operation. This is a unit that can do add, subtract, multiply and divide rapidly on long numbers. This machine was the fastest way for computers to do calculations - computers being people who computed using machines or slide rules - until the WWII era when tools like Eniac were built to achieve higher speeds.

When I plug it in, the motor is grinding but nothing is moving. A couple of buttons are stuck down. I need to free up the mechanism, lubricate anything that might be jammed, and see if I can get it working again. I won't be working on this again for a few months, due to the VCF West exhibition and Xerox Alto restorations which are a priority. 

Saturday, July 16, 2016

Good progress on virtual 1442 card reader

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

Restructuring the GUI

-- virtual 1442 --

I can see the cause of the error I last detected, where all 80 columns of a read card have the same value. The FSM for controlling the read buffer is befouling the buffer address lines. I redesigned and recoded the section and went out to test. The test was not successful so I need to refine the instrumentation.

By this point, the push transactions complete for all eighty columns and the state machine moved on to the f1442 emit state. In that stage, the machine should loop through the eighty columns triggering 80 interrupts on IL0 and responding to 80 XIO Read commands from the test software.

I wasn't seeing the interrupts triggered, so I looked to the emitter FSMs for read and punch. I found a defect and corrected it, then went back to testing. The next run did indeed fire off the IL0 interrupts to request reads for the 80 columns. It also triggered the fake XIO Init Read operation which tells my GUI code to fetch the pre-punch buffer contents. The transaction timed out at this point so I first have to look at the logic to handle the get special data transactions for the eighty characters.

I did some more restructuring of the logic and set up traps to tell me what col 12 of the first card column is when the preread buffer is being written. Once I know it stores the right value, the next step is to see it present the right value during the column XIO Read, After this works, I can check that it fetches the same value out during the fetch once the read is done and it is being copied over to the pre-punch buffer.

The value delivered to the XIO Read is always a blank column, but my first test needs to be whether the card buffer is returning anything other than blanks. There is still the open question of whether the black box block RAM was properly included in the design, since there are messages:
Could not resolve non-primitive black box cell 'blk_mem_gen_0' instantiated as 'C1403CardBuff
Once the test pointed at a problem with delivering the retrieved value to the XIO Read, I moved the diagnostics to that point and looked again. I did see one other anomaly - I had a four card deck with last card enabled, saw four reads issued but didn't get the fake IR triggered for the last one. My logic for detecting the last card and acting on it is not working properly, and that is an error in the GUI not the FPGA. 

The GUI code to handle the last card situation was moved around to fix the problem I discovered. I will test this as I debug the basics of the read functionality. Now that I seem to have good values in the read buffer, the next area to confirm is how that data gets handed off to an XIO Read instruction. 

I see good values set up in the signal that should be gated into core during the XIO Read instruction. Not sure why it isn't working, will have to zoom in very close to see what is happening. After a minor change, I am getting all card columns reading into storage now, which is excellent. 

Unfortunately, I have an 'off by one' problem with the data going into columns. Column 1 of the real card shows up in columns 1 and 2 of memory, then column 2 of the card is in memory location for column 3, and so forth. Probably a timing issue in my FSMs. 

The physical 1442 has a hopper, two stations inside and a stacker. The stations are pre-read and pre-punch. My virtual device has a PC file as the hopper, two buffers in the fpga for the stations and PC files for the stackers. 

A feed operation (or a read or punch) takes a card image from the file and moves it into the pre-read buffer. The data that was in the pre-red buffer before the feed operation will be copied over into the pre-punch buffer. Data sitting in the pre-punch buffer will be output to the stacker files during the feed. 

Thus, once cycle of read or punch or feed consists of:
  • fpga sees the XIO Control to start the read, punch or feed
  • fpga notifies the GUI that an operation has begun
  • GUI reads the PC hopper file and extracts one card image
  • GUI pushes the card image down as eight 10-column transactions
  • when the pre-read buffer is filled by the transactions, the operation begins
  • logic in the fpga emits an interrupt on IL0 for each card column
  • logic in the fpga will provide the data from the pre-read buffer to the XIO Read
  • when the card has been read (80 columns or the count if less), the GUI is notified
  • the GUI extracts the data from the pre-punch buffer and puts it in the stacker file
  • the fpga waits for the extraction transactions to fetch all eighty columns
  • the fpga copies over the data from pre-read buffer to pre-punch buffer
  • the fpga signals operation complete via interrupt IL4
Thus, the data read from the file in cycle N may be read during that cycle, or it will move to the pre-punch buffer where it can be punched over in cycle N+1 and then ejected to the stacker. There is always one card sitting 'inside' the 1442 but not yet written out to the stacker files. 

The GUI compensates for this with a special first time card process that ignores the data fetched from the pre-punch buffer on the first card through the virtual device, since in cycle 1 there was nothing in pre-punch to come out the stacker. NPRO will reset that flag, just as it clears out the cards from the physical machine. 

I have a flaw somewhere in the logic because the stacker file output consists of 80 columns of data per card, but it is the last 10 columns of the card duplicated ten times. I don't yet know if this is a flaw in the transactions that fetch the pre-punch data or if it is a flaw in the copy-over process. I will need instrumentation to discover that. 

My current known problems with the 1442 virtual device:

  1. Off by one error in columns delivered to 1130
  2. Corrupted copyover or pre-punch buffer fetch
  3. Handling of the last card is still wrong - setting not-ready status at wrong time
  4. Emptying hopper file results in GUI python error due to defect in code
I will be working on these tonight with study and bench testing, but have no more test time today on the real hardware.  In addition to the known problems and any new defects I discover, I have not yet tested card punching, feed only IO, stacker select or Prog Load (boot). 

Thursday, July 14, 2016

Debugging virtual 1442 reader/punch

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130


Restructuring the GUI

-- virtual 1442 --

I began debugging the virtual 1442 reader/punch next, as it will be convenient to book up the diagnostics properly from this card reader. Suitable diagnostic LEDs and GUI messages were set up.
When I ran a hand loop to read, I saw my main 1442 state machine advanced to its first stage, However, my GUI side didn't push down the card image and I didn't see it detect the read attempt at all.

Instrumented the GUI to learn more about what it saw, plus looked at the FPGA code to check for the alert that should be occurring as it sees the start read command. When I went out to test, I had to sit and wait while the jackbooted thugs of Microsoft forced a software update on my tablet. Finally, I could load the bitstream and begin my test.

It appeared that my logic to set the device ready was not working properly, thus blocking the XIO from being accepted. New LED diagnostic assignments and a run through the toolchains and loading process, then I could look into this symptom. However, the source of the problem appears to be in my GUI code, where I restructured some code and had the following snippet setting the status of the device:

                DSW1442 = self.theapp.my1442.getCOpen()     #open or not

I then pushed the word DSW1442 down to the FPGA. My model function getCOen() returns 0 if the file is closed, 1 if it is open. I then pushed that to the FPGA to load the DSW. However, the bottom bit of the DSW is the Not Ready bit, thus a value of 1 means the reader is not ready and a value of 0 means it is good to go. My code was making the device not ready when I had cards in the hopper.

I put in some code to reverse the value of DSW1442 before pushing it to the FPGA. My testing then triggered the read, which my GUI caught, but in the process of pushing down the card image to the FPGA, the transactional engine stalled and I began getting timeouts reading from the USB. This points me to an entirely new area of investigation and diagnostic messages. 

The transaction that pushes ten columns of data into the read buffer has a state machine, wsastate, that was triggered but the read buffers state machine, rbstate, didn't budge. Time to look closer at the triggering logic and the rbstate state machine.

I definitely kicked off the write special data transaction since that fsm advanced, but I wasn't sure if I had any movement of the rbstate machine, so I set up a process to show me if the machine ever reached a non-idle state. It hadn't.

Time to look at the transaction itself, to see if it emitted the trigger to start the read buffer. As I looked at it, I could see clear errors and it was obvious that this file I was given from the disk recovery was a stale file from early coding. It could never have worked, yet I had successfully debugged it all before the PC crash. Sigh. I will have to desk check and then exhaustively test the code to get it back to a working state.

First I will instrument the transactional engine to see where it stalled. That will point me at the next issue to address. The result of that testing led to my getting the push transaction to work. Now, the 1442 completed several card cycles, but the data being stored in memory was the same value for all eighty columns.

This could be the result of the 'black box' errors from the Vivado toolchain, if it hasn't really set up the block ram. That would give me just one value, probably the last one entered. Next up I will march through the storing operation in the read buffer and the retrieval by the XIO Read processor, looking for the next new-old problem to resolve.

XEROX ALTO RESTORATION PROJECT

A replacement CRT tube was bought by one of the team members (Al) and will be installed in the monitor to return it to full brightness. The team won't meet again until some time in early August, due to vacations and other time commitments.

I did locate a good cable I can use for the fgpa based Diablo disk drive emulator/driver, which I will wire up to my expansion card for a Digilent Nexys2 fpga board. As soon as I get through the VCF West event, I can turn my attention to building and testing the Diablo emulator/driver. 

Wednesday, July 13, 2016

Virtual 2310 drive passes tests, just needs to run more comprehensive diagnostic to get 'signed off'

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

Restructuring the GUI

-- virtual 2310 --

I ran a quick test this morning before heading to Computer History Museum for my regular Wednesday time with the restoration teams. It showed that two of my FSMs did not return to idle position, as they should. The disk seek machine didn't go to idle, nor did the busy machine, while the operation complete machine remained at idle.

I looked over the logic a bit while I am at CHM as well as designed some new instrumentation for the testing this afternoon, when I get back to the 1130. I wasn't happy with the way I had built the seek timing emulation state machine so I restructured it.

Late afternoon back home, with the air conditioning powered up, I could resume some testing. I found some timing issues with my seek timing simulation, particularly a timer that overflowed before I reached my termination count, but I corrected that to confirm proper operation.

I had success with an operation complete after my seek was executed. Further, it did move the virtual disk cylinder out to the proper location. I subsequently did a read of the sector and everything matched.

If I can get either a DCIP Analyze to run or the disk diagnostic to run properly, I will feel much better about this. As it is, I have to check the disk with hand entered instructions which isn't exhaustive.
Everything I tested matched what I expected. I did seeks in both directions, tried seeking backwards past cylinder zero, read several sectors in different spots on the disk, and that looked good.

My disk diagnostic program is set up as a core load, which I ran on the IBM 1130 simulator then dumped as a file. I just couldn't get it to try a different disk drive, it kept accessing the internal disk drive. The diagnostic listing says that I have to start it with bit switch 15 up, which causes it to pause for customization. I will do a session on the simulator to yield a workable copy of the diagnostic.

My standalone DCIP utility suffers from a problem I have seen before. It can think that it has a 1403 or 1132 printer available and it will go into a loop waiting for the printer to come ready. That won't happen since I am running without printers, but it blocks me from dumping sectors or doing a disk analyze. I need to get a DCIP core image that will run properly without a printer. I think it was caused by the way I set up the core load file.

Thus, it is frustrating to find that my two test programs are both flawed and can't be used now. I do have a third method I could use, entering a boot card image into low core and trying to boot the DMS2 image on the virtual disk cartridge. Testing tomorrow will focus on getting at least one of these methods to satisfy me.


Seek and read of virtual 2310 working, small issue with seek op complete, plus other progress

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

Restructuring the GUI

-- virtual 2310 disk drive --

First thing this morning, I went out, entered a hand loop to exercise my disk drive and tested to see how it worked, and found it properly reading a sector into storage and producing valid sense afterwards. I also checked a seek program to shuttle out and in the max distance and saw the carriage home bit go on and off, indicating that it moved away from cyl 0 and back.

My display status showed cylinder 0, even when I ran the code that seeked out and back. That is understandable because my Python code does not see seek instructions, only IR and IW commands, so it won't know that the cylinder has changed.

When I poll for the IR or IW after a seek, one of the fields returned is the cylinder and sector, which is then used to pick the right part of the virtual cartridge file for reading/writing. I know this worked okay for at least the sector value, because the DCIP utility begins with a test IO to cylinder 0 sector 1 and I saw the sector number come up.

I don't, however, believe the cylinder number is showing up properly. It was working when I began restructuring my code, so I expected this was a relatively small problem to fix. Indeed, I saw where my conversion from multiple transactions to get device status to a single poll transaction had omitted to carry over the cylinder number in the change.

It appears that my problem is some flaw in my seek logic, because the fpga shows the device remains busy and no operation complete interrupt is requested. I need to look into this more deeply, which will require some new instrumentation.

The first think I looked at was whether the seek amount was not picked up properly. Next, I will see whether the disk seek modeling ever completes. However, when I single stepped through the execution I discovered that my XIO processing in the 1131 itself is not working properly.

The XIO Control I issued should pick up the low half of the IOCC in the E1 execution cycle, determine it is an XIO Control for device 20 (my virtual disk drive), and then pick up the data value for the seek in cycle E2.

Unfortunately, it advanced to an execution cycle E3, which should only take place for XIO Read or XIO Write instructions. Something is wrong in the execution control logic. Time to run some general CPU diagnostics and see if this is the only flaw or if other instructions are misbehaving.

I picked out some points to observe during operation of an XIO instruction, to verify that the machine is decoding the type of XIO instruction properly. There is a signal (XIO E R/W) that is generated in a card on page DN201 and drives the setting of the E3 flipflop on page KD111. It should not be on unless the instruction was a read or write. The decoding of the type of XIO happens on DU101 page.

I listed the pins to sample with a scope to check what DU101, DN201 and KD111 think are happening. DN201 and DU101 are using the U register bits to make these decisions - U is a saved copy of the A register, often used to allow the A register to do arithmetic of various types during set clock cycles of an instruction.

When I powered up the machine, it was no longer going into E3 for XIO Control - I think the fact that my air conditioning had brought the garage down to a datacenter like temperatures, compared to the somewhat hot temps when I started, made the difference.

I now found that my seek amount is being properly captured by the XIO Control to the disk device, but it is not triggering the interrupt nor coming out of busy. Time to debug the seek simulation logic.

I saw the seek timing simulation FSM walk through its states and finish on 'done', but its trigger for the op20state FSM didn't fire it off. I recognized that I had once again used poor design practices for triggers synchronizing various FSMs, which happens when my brain thinks of the code as programming, not hardware.

The dseek FSM steps through various countdowns to model the time delay of a seek, finishing on state dseekdone for one cycle before moving to the idle state. During the dseekdone cycle, I emitted a trigger dseektrigger that should start the op20state FSM moving forward.

What actually happens is that at the clock edge when the FSM moves into dseekdone stage, it begins emitting the signal dseektrigger and stops sending it out at the next clock edge when it moves into the idle state. The op20state FSM is watching for dseektrigger in order to switch from its idle state to its 'on' state. However, dseektrigger is changing, either going on or going off, at the clock edge which is also when the op20state FSM is deciding whether to move to 'on' or stay in 'idle.

Having signals changing too close to the clock is a classic error in hardware design. You want to have a setup time before the clock edge to let the signal become stable, and a hold time after the clock edge to keep things stable around the time that op20state is deciding on its next state.

I need to turn on these triggers and leave them on across a clock edge - either by coding two states that are sequentially reached, both of which emitting the trigger, or using separating combinatorial logic to introduce a delay after the clock edge, or by interlocking. An interlock would hold the dseek FSM at the dseekdone state until the op20state has reached the 'on' state. I chose the interlock method.

These kinds of problems are pernicious because they can work sometimes, but when a new load restructures the placement of the logic, they fail. All depends on routing delays and placement, which are out of your hands.

My testing shows that the seek is occurring properly and not hanging up. The one flaw - it should be triggering an operation complete interrupt on level 2, but nothing happens. I restructured the code in a way that should be more solid but for some reason that I must be too tired to see tonight, I just can't trigger the interrupt request for seeks. The seek works - my new cylinder tracking value is correct, and the busy condition goes away, but my operation complete is just not switching on.

-- mirror console entry switches --

My mirror console entry function does not see the proper bits. Worse, it exits its polling loop after it sees the first read. The latter problem is in the GUI but I suspect the first part is FPGA based. I fixed the loop termination, but not sure yet whether I did anything for the problem capturing the data word.

The data is still not being captured by the mirror device adapter, although the bit switches complete their read into memory. This will take some more diagnostic instrumentation, but since it isn't a high
priority, it will go on the back burner for now. It may in fact be a problem with the XIO instruction processing, detected during the debugging of the virtual disk drive.

With the machine working well, I still didn't capture the proper values for the console bit switches while executing an XIO Read to area 7. I will do some quick checks to see what should be happening and cross check with my mirror read logic, while I am testing with new diagnostic LEDS to troubleshoot the disk seek hangup.

My mirror read module was latching the contents of the B register at the T4 clock of XIO E3 stage, which could be a trifle early if the device gating its data into memory is a bit slow. I changed the module to latch on T6 of E3, when the value should be stable.

Still nothing showing up from the mirror read module. Not sure what is going wrong, since my mirror read code used to work. One possibility is that the high priced data recovery service may have found old stale files on the hard disk and not current versions that work properly. If so, I have to start from scratch working on that function.

SOURCE OF SPORADIC POWER ON ISSUES

About every ten or fifteen times I power on the 1130 system, it remains in Reset state and has to be power cycled to restore operation. I did some tracing of the way that power up reset is applied and removed, determining that the agent which drives the reset is relay 3 in the power sequencing logic in the power supplies. It should pick as a result of +48V supply coming up, which drops the reset.

I will have to trace the state of the relay 3 when next I experience the permanent reset - it is either sticky contacts on the relay or a failure of the 48V supply to come online. I had been worried that it might be intermittent SLT logic but this will be easily fixable if it becomes more persistent.