ROLE OF THE FPGA
The FPGA produces all the control signals that drive the other chips on the PCB. I can update the FPGA and modify the control signal behaviors without having to create new versions of the PCB.
The Magnetic Random Access Memory (MRAM) chip has three control signals that are used to cause it to read the contents of the currently addressed word and put the bits on the data bus or to write the values on the data bus into the currently addressed word. These are the E, W and G pins which are active low and must conform to timing specifications and sequences defined for the MRAM chip.
The MRAM data bus is bidirectional, either outputting the value read from memory or accepting new data to write into a memory location. The control pin G sets the data bus to output the data values. Data that we want to write into the MRAM chip, coming into the PCB from the 1130 Storage Buffer Register (SBR), has to be driven onto the data bus, but not when the MRAM is generating the bits while signal G is active. A Gate control signal is used to control a buffer chip, so that it is either high impedance or driving the SBR bit values into the MRAM data bus.
During a read cycle, after the MRAM has put the memory word on the data bus, output chips can pull the 1130 Sense lines low to set an internal 1130 register bit to 1. They will only do this if the bit value on the MRAM data bus is a 1, and only when a control signal allows the output to occur. Testing prior versions of the PCB has exposed issues where the output bits work well if the total number of 1 bits in a word is small, but above a certain number of 1 bit values, the word is not correctly stored in the 1130.
To help with this, the FPGA has individual control signals for all 16 data bits and the two parity bits for the word to be output. My first version of the FPGA logic will turn on control signals for three bits at a time, skewing the transfer of the word value into the 1130 across six clock cycles of the FPGA - each cycle being approximately 83 nanoseconds long. I could changes this to nine cycles of two bits each, or some other combination. However since a read cycle is only 1.6 microseconds long, trying to put each of the 18 bit values in its own clock cycle would take almost the entire read cycle.
Since the 1130 control signals such as +Storage Read are asynchronous to the FPGA clock, I have to use a chain of flipflops to synchronize and protect against metastable issues. That adds up to four clock cycles before the logic recognizes a read and begin emitting control signals. We also need a cycle or two to make the MRAM read before it places the data values on the data bus of the chip. Adding all those up, a read with all 18 bits on their own clock cycle would take 2 microseconds, exceeding the window of time available for the 1130.
VERILOG WRITTEN AND SIMULATED
I created the logic for the FPGA using the Verilog language. It monitors the hardware reset signal I generate from the PCB, then watches the 1130 for the control signals +Storage Use, +Storage Read and +Storage Write. Based on those signals, it produces the control signals for the rest of the PCB.
I wrote a testbench and simulated the logic for the FPGA. I verified that it produced reasonable sequences of the control sequences, with correct durations, which should correctly read and write to the MRAM chip on the PCB. I also saw that the pulses into the 1130 when a word is read are skewed in groups of three bits, to limit the total current flowing across the cables at any instant.
BITSTREAM GENERATED TO LOAD IN DIGILENT CMOD S7 FPGA BOARD
I synthesized the logic and created a bitstream. This will be downloaded into the Digilent CMOD S7 board, placed in an onboard memory, and used to configure the FPGA on powerup. I expect the FPGA board to arrive during the week and will set up that board with the bitstream.
WAITING ON THE NEW PCB THAT EMPLOYS THE FPGAJCLPCB.com is busy building my four layer printed circuit board for the revision of my 1130 MRAM which is a PCB that plugs into an IBM 1130 in place of an entire core memory compartment. I hope to receive the new board as well as some addition components from Digikey by the end of the week or early in the following week.
The CMOD S7 board fits in the lower left of the PCB in the image above. The MRAM chip is right in the middle of the PCB and the three cable connectors are across the top of the board.






