←News detail

36Kr · AIUpdated Nov 2 23:46

Former Microsoft engineer uses ChatGPT to build a homemade 4MB memory board for a 1970 PDP-11, successfully booting UNIX in multi-user mode

AI summary

Former Microsoft engineer Dave Plummer used ChatGPT and EasyEDA to design a memory board based on a Lattice MachXO2 FPGA, expanding a 1970 DEC PDP-11 with 4MB of RAM and successfully booting UNIX in multi-user mode. Original PDP-11 memory cost about $1,000 per MB, so 4MB would cost about $4,000, and Plummer had never done FPGA programming before. During testing he encountered an issue where odd addresses could not be accessed; after modifying the FPGA code, it passed all tests.

Body · AI translation

Now that memory prices are skyrocketing, many people are crying out that they "can't afford memory"—so what should be done?

Building one yourself seems like it might not be a bad idea.

This sounds like something only hardware enthusiasts would do, but recently, a former Microsoft engineer actually took action.

Dave Plummer was involved in developing Windows Task Manager and Windows Pinball. After retiring, he still hasn't stayed idle, continuing to tinker with various computer projects.

This time, with the help of ChatGPT, he designed a memory board from scratch, preparing to expand a vintage computer born in the 1970s with 4MB of RAM.

What's even more interesting is that Plummer had never tried FPGA programming before. From circuit design and PCB layout to FPGA controller development and actual hardware testing, he figured out almost the entire project as he went along. This endeavor also reveals another possibility for AI-assisted development beyond software.

Old computer memory is too expensive, so he decided to build his own

The subject of Dave Plummer's tinkering this time is a DEC PDP-11.

This is a classic minicomputer born in 1970, holding a rather important place in the history of computing. The early development of the UNIX operating system is also closely tied to the PDP-11.

However, after several decades, parts for these old computers are no longer as easy to buy as modern hardware. Memory in particular.

Plummer complained in a post on the social platform X, "If you think regular memory is expensive enough, try PDP-11 memory. If you can even find it, it costs roughly $1000 per MB."

In other words, to equip this old computer with a full 4MB of memory, the memory alone could cost $4000.

At that price, forget upgrading an old computer—it would be more than enough to buy a pretty decent modern computer.

So Plummer decided to take a different approach: since it's so expensive, he might as well build one himself.

From schematic to PCB, ChatGPT helped him design it step by step

This project was not simply about soldering a few memory chips together.

With the help of ChatGPT and the online circuit design tool EasyEDA, Dave Plummer started from the schematic and completed the circuit design, PCB layout and routing step by step, even preparing the bill of materials needed for production.

Dave Plummer admitted that he had made PCBs before, but had never attempted such a complex project.

To get this homemade memory actually running, he first had to understand the PDP-11's hardware architecture.

Some PDP-11 models use the Q-Bus to connect various function boards. Therefore, Dave Plummer designed this homemade memory as a standalone board, then inserted it into the backplane together with the board carrying the M8190 processor for actual testing.

The core of this memory board is a Lattice MachXO2 FPGA chip (model 2000HC), which serves as the memory controller, connected externally to four ISSI 1MB memory chips. In addition, the board is equipped with a U2S input/output chip, DIP switches, communication interfaces and several capacitors, together forming a complete circuit.

In terms of address space, the system with the M8190 uses 22-bit addressing, supporting up to 4MB of addressable space, with the top 256KB of address space reserved for input/output devices and read-only memory (ROM). This also means that the homemade memory board must not only provide sufficient storage capacity but also follow the original system's address mapping rules.

Simply put, the FPGA coordinates data transfer between the modern memory chips and the PDP-11, allowing this old computer to access memory in the original way.

After the design was complete, Dave Plummer ordered five PCBs in one go, preparing to begin actual testing.

At this point, the hardware design of the homemade memory board was basically complete. But the real challenge had only just begun.

Flashing an FPGA for the first time took several rounds of tinkering, and ultimately Unix ran successfully

Just because the circuit board is done doesn't mean it will work properly.

Dave Plummer next needed to flash the FPGA program he had written into it. The problem was that he had never programmed an FPGA chip before.

So he bought an FT232H adapter board and connected it up. Later he installed openFPGALoader and began figuring out the entire flashing process.

There were plenty of pitfalls along the way. After several failures, he finally succeeded in writing the program into the FPGA. "This is a completely new field for me!" Dave Plummer said.

He then inserted the newly made RAM board into the PDP-11's backplane and tested it together with the mainboard carrying the M8190 CPU.

At this point, good news arrived.

The computer was already able to recognize this new memory board, and the system also displayed 4MB of RAM as well as the address space reserved for ROM. For someone attempting such a complex hardware project for the first time and who had never even flashed an FPGA before, this was already quite impressive progress.

But Dave Plummer soon discovered that the matter was not over yet.

During testing, Dave Plummer encountered a rather basic but easy-to-trip-over problem: this RAM could not properly access odd addresses.

The problem lay in how the memory controller handled data.

The PDP-11 uses a 16-bit data bus and can transfer two bytes at a time. When reading data, the CPU automatically selects the byte it needs from these two bytes based on the address.

But the memory controller designed by Dave Plummer still needed to return both bytes in full at once. The same applied to writing: the CPU had to use bit-select signals to tell the memory controller which byte was to be modified. Otherwise, the entire 16-bit data might be written, causing the data in the other byte to be overwritten as well.

Clearly, Dave Plummer's initial FPGA code did not correctly handle this logic, causing problems with memory access.

One netizen joked about this, saying he "built 4MB of memory, but in the end only 2MB."

Dave Plummer responded that this memory "can only return every other word," which also confirmed that the problem lay in the data access logic.

Fortunately, this did not mean the memory board itself had a major problem. In a later X post, Plummer updated the project's progress, saying: "I got it working! Modified the FPGA code... now it has passed all tests!"

Even more exciting, he not only fixed the memory access problem but also successfully got this PDP-11 to boot into UNIX multi-user mode.

Among these, multi-user mode means the system needs to manage multiple users and processes simultaneously, placing higher demands on memory stability and integrity.

Compared with ordinary memory tests, being able to boot into UNIX multi-user mode is clearly more convincing verification. And this success also turned the entire project from "looks usable" into truly usable.

Someone suggested using a Raspberry Pi; he said he had tried that long ago

For an old computer born in 1970, being able to achieve a 4MB expansion with a modern self-made memory board is itself quite interesting. As Dave Plummer shared this attempt, it also sparked a lot of discussion.

Some netizens also proposed another idea: since the old computer's memory interface is so troublesome, why not directly use a Raspberry Pi to connect to the PDP-11's bus and emulate memory through software?

Plummer's answer was quite straightforward: he had basically already done that last week.

Previously, he used a modern QBone DEC interface board equipped with a BeagleBone Black to provide memory support for the PDP-11 through software.

In other words, this FPGA memory board was not his only solution to the old computer's memory problem, but rather an attempt closer to a traditional hardware implementation.

Looking back on this endeavor, perhaps the most interesting part is not that ChatGPT designed a perfect RAM in one go.

From schematic diagrams and PCB layout to FPGA programming, AI helped Dave Plummer cross the threshold of many unfamiliar fields, but the problems encountered in actual testing still required him to troubleshoot, modify, and verify bit by bit on his own.

And now, this self-made RAM is no longer just "looks usable." It has passed testing and even enabled an old computer born in the 1970s to successfully boot into UNIX multi-user mode.

For an old engineer trying FPGA programming for the first time, this endeavor was clearly quite worthwhile.

Reference:

This article is from the WeChat public account "CSDN", compiled by Tu Min, and published by 36Kr with authorization.

Source

36Kr · AI