Monday, January 3, 2022

OpenCores project download failures

It appears the MCS-4 project download link on the OpenCores site points to a tarball created in 2019. I've emailed the OpenCores site maintainers to alert them, but I don't know how long it will take them to correct the problem.

In the meantime, I've created my own tarball of these sources and placed it on Google Drive:

Download link: mcs-4_20220103.tar.gz
File size: 1456944 bytes
MD5 checksum: e2ee2aa03b7dfefd5f10d3e2a6323889

Thursday, December 2, 2021

Big Verilog source update on

November 15th, 2021, marked the 50th anniversary of the release of the MCS-4 chipset. I figure this is as good a time as ever to update my MCS-4 project on OpenCores.

 Here's a summary of the changes:

  • Created subdirectories under rtl/verilog for each of the four initial MCS-4 chips. 
  • Moved the i4004 CPU-specific Verilog module files into the i4004 subdirectory.
  • Updated the i4004 CPU Verilog modules with a few bugfixes.
  • Published Verilog modules for the i4001 ROM, i4002 RAM, and i4003 Shift Register chips.

These are the Verilog sources I used in my Busicom 141-PF re-creation using a gutted Canon P170-DH calculator, so I'm pretty sure they work correctly.

Let me know if you find these files useful, or if you find what you think is a bug.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License

Tuesday, September 21, 2021

Naked Chips

If you're turned on by looking at pictures of naked chips, check out ZeptoBars

Mikhail Svarichevsky strips transistors and integrated circuits of their packaging and posts beautiful photographs of the bare chips.

It appears he was once looking to acquire a i4004 CPU, but he's crossed it off his list. I looked for the results but didn't see an entry for one.

One of the more fascinating things to see is his comparisons of real versus "fake" chips. I've noticed BSS83 MOSFETs listed for sale from questionable sources. When (if?) I ever finish my i4004 reconstruction, I may buy some of these transistors and send them to him along with a couple real ones for comparison.

Wednesday, September 8, 2021

Resistor-Transistor Logic

A few years ago I found myself taking a Swedish immersion language class in Stockholm with three other American coworkers. For those who have not taken an immersion language class, the entire class is taught in the language you're trying to learn. This is a very effective way to learn, but often results in confusion as you try to figure out what the teacher is trying to communicate.

One evening, the teacher pointed at the ring on another classmate's hand. He said "gift" and wrote it on the board. We looked at each other in confusion, thinking "How does he know it's a gift? Maybe she bought it for herself?

The next thought was, "Maybe it means something else in Swedish?" My three coworkers pulled out their little 22,000 word Berlitz Swedish/English dictionaries and searched for "gift". Ah ha! It does have a different meaning in Swedish! It means.... "poison". Poison? It's a poison ring? Who wears a poison ring?

I also had the little Berlitz pocket dictionary, but I'd also brought a 174,000 word dictionary. Sure enough, it too gave a translation of "gift" as "poison", but unlike the Berlitz dictionary it also gave a second translation: "married".

See, it's possible for the same word to have more than one meaning. The same goes for acronyms.

 Almost all digital logic integrated circuits in use today use a technology known as Complementary Metal Oxide Semiconductor, usually known by the acronym "CMOS". But there are a number of other technologies out there, some still in use and some that are not. Many will be familiar with Transistor-Transistor Logic or TTL. But before TTL came RTL: Resistor-Transistor Logic. This technology used NPN bipolar  transistors with integrated pull-up resistors, and was one of the first successful series of small-scale integrated logic circuits.

The RTL Cookbook (pdf), written by Donald E. Lancaster and first published in 1969, was a very popular introduction to this logic family. My first introduction to integrated logic circuits was another of his books, the TTL Cookbook.

Here's Figure 1-1 of the RTL Cookbook, showing the structure of the basic RTL building block, the 2-input NOR gate:

Notice the similarity between this and the 2-input NOR gate found in the i4004.

The primary difference is the use of bi-polar NPN transistors in RTL, and P-channel MOS transistors in the i4004, but the operation is basically the same.

Monday, March 15, 2021

A simulated Busicom 141-PF using Verilator?

Last summer I came up with the grand idea of mating my Verilog implementation of the Busicom 141-PF with a simulated keyboard and printer using the Verilog Procedural Interface (VPI) and the Icarus simulator. However, a quick experiment showed that the simulation would run far too slowly to be useful.

Today, while browsing through this blog, it occurred to me that there is a Verilog compiler called Verilator that converts synthesizable Verilog into multithreaded C++. The published benchmarks suggest the resulting program runs as much as 100 times faster than simulation, and can take advantage of multi-core CPUs. That's pretty much what I'd need to make this work.

Verilator supports the SystemVerilog Direct Programming Interface (DPI), and a very limited subset of VPI. I suspect I could implement the keyboard and printer interfaces using either.

Scoping the CCLK line

Given how much time I spent fretting over the layout of the configuration clock (CCLK) circuit (1, 2, 3, 4), it seemed strange that I hadn't gone back and checked what the signal actually looked like on the board.

Thursday, December 17, 2020

KiCad import of an Eagle project

Now that I've gotten the FPGA-based emulation of the i4004 CPU running, I thought I'd go back to the discrete component implementation. It would be nice to get that running for the 50th anniversary of the chip, and that's only 11 months away.

That project, though, was started using Eagle as a PCB CAD tool. I haven't used Eagle in about four years, having spent all my hobbyist efforts on KiCad. I could finish them using my perpetually-licensed Eagle 7 installation, but do I really want to? I'd have to relearn the UI, after spending so long with the KiCad UI.

I've long wondered whether it would be worth the effort to move the remaining four PCBs from Eagle to KiCad. Each of these PCBs have complete schematics occupying several Eagle schematic pages. I'd completed basic layouts, and started routing to some extent. I knew KiCad v5 had an Eagle import capability, but how would it handle this situation?

Frankly, I didn't hold out much hope for this working well enough to be practical.

With KiCad v6 on the horizon it seemed smarter to try that rather than play with v5. After updating my KiCad sources with the latest code I rebuilt and installed v6. Then I created a new KiCad project and started experimenting with the Eagle import feature.

It took a few tries to figure out how this is supposed to work. However, quite to my surprise, the results look very good. The schematics imported cleanly, including the custom symbols I'd created for the FDV-301 and BSS-83 MOSFETs. The inter-sheet connections were all properly translated to global labels (Eagle 7 has no concept of hierarchical sheets). The layouts and initial routing I'd done also came across nicely.

This might actually work!