Skip to the content
2 layers68 × 67 mmRam fpga, the printed circuit board in 3D

verilog and testbench for ds2604 8k x 8bit SRAM driver

Size
68 × 67 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
74
Pads
194
Tracks, vias
470, 20
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20170922)
Created
8 Sep 2018
Updated
15 Sep 2018

Overview

Ram fpga is an open-source printed circuit board by mattvenn, from the mattvenn/ds2604-sram-driver repository on GitHub. It is a 2-layer board of 68 × 67 mm with 9 parts on 74 nets, routed with 470 tracks and 20 vias.

It is built around the MC74LVXC3245DT. Its parts include 6 ICs and 1 connector. It belongs with the fPGA and programmable logic boards and the FPGA and CPLD boards of this library.

Main components

1

README

README.md

pinball high scores

Reading the high scores out of the SRAM of a pinball machine.

inspiration

Tweet thread documentation

After modelling, testing and reading/writing to the SRAM. I only needed to listen to the bus lines to know when the data was being read. That is done by addr_listener:

text
always @(clk) begin
    if(sram_ce) begin
        if(ce_counter < WAIT)
            ce_counter <= ce_counter + 1;
        else if(ce_counter == WAIT) begin
            case(sram_address)
                sc_100_k:
                    high_score[23:20] <= sram_data_pins[3:0];
                sc_10_k:
                    high_score[19:16] <= sram_data_pins[3:0];
                sc_1_k:
                    high_score[15:12] <= sram_data_pins[3:0];
                sc_100:
                    high_score[11: 8] <= sram_data_pins[3:0];
                sc_10:
                    high_score[ 7: 4] <= sram_data_pins[3:0];
                sc_1:
                    high_score[ 3: 0] <= sram_data_pins[3:0];
            endcase
        end
    else
        ce_counter <= 0;
    end 
end

plan

ram32

  • the ds2064 is socketed, so make a breakout board that passes through the connections.
  • add an FPGA that can listen to the 13 address lines, the 8 data lines and the 3 read/write/select pins = 24pins.
  • when in write mode, with address in the high score range the FPGA reads the data off the bus.
  • write ds2064 driver

board test

  • data pins tx - ok
  • data pins rx - ok - very high impedance!
  • addr pins tx - ok
  • addr pins rx - ok
  • ctrl pins rx - ok
  • ctrl pins tx - ok
  • on programming fpga, 5v line draws up to 40mA
  • added 10k resistor from tranceiver !oe to FPGA 3.3v to keep them off while being programmed

functional test

  • read and write work separately with python control
  • however, a write followed by a read works with ram non connected!

Resources

http://www.pinballsupernova.com/Williams%20Repair%20Guide/Williams%201990-1999%20WPC.pdf page 20 ram details

emulator https://github.com/neophob/wpc-emu http://bcd.github.io/freewpc/The-WPC-Hardware.html#The-WPC-Hardware

The CPU board contains the main processor: a Motorola 68B09E, running at 2Mhz. It is an 8-bit/16-bit CPU with a 64KB address space. Bank switching is required to address more than 64KB. On reset, location 0xFFFE is read to determine the address of the first instruction.

8KB of RAM is located at physical address 0x0000. When power is turned off, three AA batteries on the CPU board maintain the state of the RAM.

WPC89

fairly sure this is the main board on my doctor who pinball. good overview here

It uses a battery backed up ds2064 to store audits and score I hope.

Schematic

Available machines to try

bride

https://www.ipdb.org/machine.cgi?gid=1502 williams wpc

high speed

https://www.ipdb.org/machine.cgi?id=1176 Williams System 11

grand lizard

https://www.ipdb.org/machine.cgi?id=1070 williams system 11

fire power

https://www.ipdb.org/machine.cgi?id=856 williams system 6 (rottendog MPU327-4) good photo: https://pinside.com/pinball/market/classifieds/archive/25465

rottendog sram chip: https://www.mouser.es/datasheet/2/12/AS6C6264A-1288481.pdf

initial high score is 550,000 = 0x00_g08_64_70

couldn't find it, so got a fake new score: 803950 = 0x0c_44_6e = 80 39 50

text
     = 50 39 50

motorola 6800 is big endian, intel is little endian

After searching for packed BCD of default string - got a match at 0x1149

text
grep -A3 '^1149' dump.8192.5
1149 55
114a 00
114b 00
114c 00

Then checked for the new high score that we set 803950:

text
grep -A3 '^1149' dump.8000.newhigh
1149 80
114a 03
114b 39
114c 05

Write this to a default chip:

text
./control.py --port /dev/ttyUSB1 --addr-start 1149 --addr-end 114d --read --hex
1149 80
114a 03
114b 39
114c 05

And then read it back:

text
./control.py --port /dev/ttyUSB1 --addr-start 1149 --addr-end  114d --read --hex
1149 80
114a 03
114b 39
114c 05

But display shows 503950! Checked one byte before start address 1148:

text
55 00 00:
1148 05
1149 55
114a 00
114b 00
114c 00

80 39 50:
1148 08
1149 80
114a 03
114b 39
114c 05

And can see it's the low nibble in each byte. Don't know what the upper nibble represents. Wrote 10k to the score and it works, can beat it easily - which should make the next step easier.

wrote 10k with:

text
./control.py --port /dev/ttyUSB1 --addr-start 1148 --addr-end  114d --write --hex --value 0001000000

only lower half of the byte

text
1148 : 100ks
1149 : 10ks
114a : 1ks
114b : 100's
114c : 10's
114d : 1's

so a write to 1149 is the 10k number.

doctor who

https://www.ipdb.org/machine.cgi?id=738 williams wpc (fliptronics2)

Parts

9
QtyValueFootprintReferences
4MC74LVXC3245Package_SO:SOIC-24W_7.5x15.4mm_P1.27mmU3, U4, U5, U6
227128Package_DIP:DIP-28_W15.24mmU1, U2
2Test_PointConnector_Pin:Pin_D0.7mm_L6.5mm_W1.8mm_FlatForkTP1, TP2
1Conn_02x20_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_Vertical_SMDJ1

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    9 parts1.1kCC-BY-4.0
  • 2 layers15.6 × 17.3 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    SKR Mini TFT Thermistor Board

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    9 parts1.1kGPL-3.0
  • 2 layers39.1 × 49.5 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    Keyboard after

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    9 parts547GPL-3.0

Questions

How big is the Ram fpga PCB?

It measures 68 × 67 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ram fpga use?

9 parts, built around the MC74LVXC3245DT. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Ram fpga KiCad files?

From the mattvenn/ds2604-sram-driver repository on GitHub, at the commit this page was made from: the board is ram-fpga/ram-fpga.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Ram fpga design in my own project?

Its repository states no licence, so its author keeps all rights: ask mattvenn before reusing the design.