Thursday, December 2, 2021

Big Verilog source update on OpenCores.org

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.